Skip to content

Fix keychain key bug#237

Merged
mdmathias merged 14 commits into
masterfrom
mdmathias/keychain-keys
Feb 6, 2024
Merged

Fix keychain key bug#237
mdmathias merged 14 commits into
masterfrom
mdmathias/keychain-keys

Conversation

@mdmathias
Copy link
Copy Markdown
Collaborator

This PR addresses a bug where the key attributes used to query the keychain were not being added correctly, and where therefore unused. The mistake was that the key names were assumed to match the static constants.

Fixes #236.

This change fixes a bug where the String representation of these keys were supplied to the keychain query as opposed to the actual key names.
@mdmathias
Copy link
Copy Markdown
Collaborator Author

Hi @olvrlrnz please take a look and help us to make sure that this change meets the need. Thanks!

Comment thread Examples/Example-macOS/Source/GTMAppAuthExampleViewController.m
Comment thread Examples/Example-macOS/Source/GTMAppAuthExampleViewController.m Outdated
@mdmathias mdmathias marked this pull request as ready for review January 29, 2024 22:47
@olvrlrnz
Copy link
Copy Markdown

Just tried it in our code base, LGTM
image

Also update use of kSecAttrAccessible on macOS to only occur if also using kSecUseDataProtectionKeychain per Apple docs: https://developer.apple.com/documentation/security/ksecattraccessible\?language\=objc
The other existing methods either take an accessibility param or an optional param.
@mdmathias
Copy link
Copy Markdown
Collaborator Author

@olvrlrnz Sorry for bugging you again, but I made some changes since you last looked. Would you mind double checking for me? 🙏

Comment thread GTMAppAuth/Sources/KeychainStore/KeychainStore.swift
Comment thread GTMAppAuth/Sources/KeychainStore/KeychainStore.swift
Comment thread GTMAppAuth/Sources/KeychainStore/KeychainStore.swift
@mdmathias mdmathias merged commit d7b2c1f into master Feb 6, 2024
@mdmathias mdmathias deleted the mdmathias/keychain-keys branch February 6, 2024 21:33
@olvrlrnz
Copy link
Copy Markdown

Thanks for fixing this. Would it be possible to create a 4.0.1 release so we can update the package in Xcode?

@mdmathias
Copy link
Copy Markdown
Collaborator Author

Absolutely. We need to figure out what version we call this. In any case, we will be making a new release to include a privacy manifest very shortly. I think that will come out in the next few weeks. Stay tuned for that, and sorry for the delay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

KeychainAttribute does not work as expected

3 participants