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

WIP: Support Access Control Flags #96

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

Conversation

sosheskaz
Copy link

This is a rough draft to enable access control flags.

I am not very familiar with the Keychain API, nor Swift/Go integration, so this implementation is likely flawed.

  1. I am not sure how to easily or safely test this change, especially given that by its nature it cannot be run non-interactively.
  2. I could not figure out how to reference the flag values (like SecAccessControlCreateFlags.userPresence so I re-created the values instead.
  3. I am not sure if using the native type (SecAccessControlCreateFlags which seems to boil down to a ulong) in Go. Is a conversion layer better than direct referencing like I am doing?

Most of what I am doing here is guessing... wonder if any insight can be given on further changes that should be made, or if a more experienced contributor could help me get this over the finish line.

@allen-branch
Copy link

allen-branch commented Mar 10, 2024

I spent some time trying an approach similar to yours and I believe I was very close, but because the binary does not have any entitlements, it will fail with this error, https://developer.apple.com/documentation/security/errsecmissingentitlement.

I can't confirm that's the reason it's failing though due to now having an apple developer account to try it in a signed app with proper entitlements.

See master...allen-branch:go-keychain:master

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.

2 participants