-
Notifications
You must be signed in to change notification settings - Fork 92
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 access control options #178
Support access control options #178
Conversation
Thanks for the PR. I'm happy to add more of the security framework functionality, but I'd prefer not to make breaking changes to existing Rust APIs. If you need to modify existing tests to compile the code, that's a breaking change. |
Totally agree, thanks for the tips! |
@kornelski I tried to make your suggestions, I think I got something decent It's not touching the function signatures, and the tests are passing, i restructured the password options (hope it's what you wanted). Now I'm not sure exactly how to expose my new |
@Mikescops / @kornelski Do you guys have plans to merge this PR. |
@dmolokanov I'd love to do so yes, but i need feedback first |
9e76127
to
85421c8
Compare
601e14d
to
1aa4832
Compare
Looks good, thank you. |
Came here looking for the same thing, biometric support for keychain passwords. Seems that this PR added PasswordOptions, but I can't find a way to actually plumb them in to the generic password creation API. use security_framework::passwords_options::{AccessControlOptions, PasswordOptions};
fn main() {
let access_control_options = AccessControlOptions::USER_PRESENCE;
let mut entry = PasswordOptions::new_generic_password("my_service3", "test1");
entry.set_access_control_options(access_control_options);
// How to actually use this?
} This example also errors with:
which comes from |
Hello,
I'm trying to implement the support of the Keychain Item Accessibility (see Apple documentation here).
The goal is for instance to ask for user presence (faceId, touchId) when requesting a password from the keychain. This options are widely supported on ios/macos/tvos/... so I thought it makes sense to include it in this library.
Disclaimer: I'm not familiar with Rust at all, so I did my best to get into it, here is a draft so let me know if I'm heading in the right direction and any guidance/help is welcomed!
I didn't added tests yet, didn't want to spend too much time if I'm already not doing things right