Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding touch ID support (via new data protection keychain) #136

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

alexw23
Copy link

@alexw23 alexw23 commented May 7, 2024

This update mainly enables Touch ID support and adds support for data protection keychain.

From this article, macOS has two keychain implementations:

  • File-based keychain
  • Data protection keychain

Currently this package is using the (File-based keychain). However eventually, the file-based keychain will be phased out and is unofficially deprecated by Apple.

The new keychain (data_protection_keychain.go) is mostly copied from keychain.go. There were some challenges because keychain.go currently relies on 99-designs/go-keychain which is quite an old version, and the latest version of keybase/go-keychain has removed support for file-based keychain.

Merging keybase/go-keychain back into 99designs/go-keychain doesn't make sense as keybase is more actively maintained. I've locked to my current PR of keychain/go-keychain.

The existing keychain.go can still be used but should be considered as FileBasedKeychain. I didn't rename it for compatibility reasons.

Testing hasn't been added yet because end-to-end testing the data protection keychain requires a signed macOS app, so we need to figure out how to do that on a CI/CD level.

@alexw23 alexw23 changed the title WIP: Adding touch ID support (via new data protection keychain) Adding touch ID support (via new data protection keychain) May 7, 2024
alexw23 added 5 commits May 7, 2024 18:36
SecItemUpdate only accepts the SetData (kSecValueData) param for an update when SetAccessControl (kSecAttrAccessControl) was set on original item.
Also added a check to ensure we are running in a bundled app context.
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.

1 participant