-
Notifications
You must be signed in to change notification settings - Fork 20
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
[set-keychain-accessibility] - accessibility; #34
[set-keychain-accessibility] - accessibility; #34
Conversation
integrate accessibility level for iOS Keychain;
Hi @cladvd, thanks for the contribution :) I have a few remarks regarding the implementation: |
Fix regression of Accessibility property in context method; Move enum in KVault class;
Hi @gaebel thank you for the advice, I've moved the enum in KVault class and removed the optional on the property. |
After having a second thought about this, I think it should only be needed to put this into the |
Co-authored-by: Jan <[email protected]>
Puh, tough question! I would solely rely on the keychain instance for handling accessibility and probably leave it in the update section as well. I would probably omit it in the first query. By doing so, you could update that accessibility value according to the current keychain instance, if and only if it is resolvable for the current device state. |
@gaebel The cleaner solution would be to probably have an own set function with accessibility as parameter, but as it wouldn't be available in the common part, the current solution seems to be alright. We could stretch it and add the function in addition to the common part. So it's more the choice of the developer how to handle things on the iOS side, what do you think? |
Yeah, I'd probably remove it from the |
Sounds great! |
remove accessibility from update method
…om/cladvd/KVault into feature/set-keychain-accessibility
I've removed it from update method. |
@@ -222,7 +240,8 @@ actual open class KVault( | |||
kSecClass to kSecClassGenericPassword, | |||
kSecAttrAccount to account, | |||
kSecReturnData to kCFBooleanTrue, | |||
kSecMatchLimit to kSecMatchLimitOne | |||
kSecMatchLimit to kSecMatchLimitOne, | |||
kSecAttrAccessible to accessibility.value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding the accessibility to the value
(read) query will only narrow the results down, you can remove it.
Yeah, this would also be a possibility. I may still add get/set functions for the accessibility in the iOS target, I can use those in a unit test to verify the changes. Just remove the accessibility from the query in the |
remove accessibility from value method;
removed 😃 |
Integrated the definition of accessibility level for the keychain of iOS