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

Support the data protection keychain on macOS #240

Open
brotskydotcom opened this issue Mar 3, 2025 · 2 comments
Open

Support the data protection keychain on macOS #240

brotskydotcom opened this issue Mar 3, 2025 · 2 comments
Milestone

Comments

@brotskydotcom
Copy link
Collaborator

For historical reasons, the macOS credential store only supports the file-based keychain, not the more-modern data-protection keychain that syncs with iCloud and iOS. It would be great to introduce support for the data-protection keychain.

Ideally, the data protection keychain would be the default, but that would orphan keychain entries created in earlier versions unless an extra check were done on reads. Perhaps auto-migration could be done of older entries.

@soywod
Copy link
Contributor

soywod commented Mar 5, 2025

Hmm looks like the edge case I was worrying about in our previous discussion. MacOS ends up with multiple credential stores, then selecting on as default becomes an opinion.

@brotskydotcom
Copy link
Collaborator Author

MacOS ends up with multiple credential stores

Luckily it's not quite that bad :). The mac keychain credential store already has the notion of "which keychain to use" built in: that's what the target parameter determines. So from an API point of view, this just means I need to add a new target selector to identify that the user wants to use the protected keychain rather than one of the macOS file-based keychains.

As to which keychain should be the default one, I'm going to leave it as the login (aka "user") keychain for backwards compatibility. People who want to use the protected keychain will need to specify it as their desired target.

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

No branches or pull requests

2 participants