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

SecItemAdd [-25308 errSecInteractionNotAllowed] User interaction is not allowed #6

Open
art-divin opened this issue Jan 4, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@art-divin
Copy link
Owner

art-divin commented Jan 4, 2021

Note: this is a duplicate of my TSI ticket, this issue will be updated along w/ the received feedback.

When I create an XPC service
And that XPC service runs a command line tool via NSTask API
And that command line tool tries to use SecItemAdd to store an item in Keychain
Then I receive -25308 error which is errSecInteractionNotAllowed in Keychain API reference

However, when there's no XPC service between Main app (UI) and command line tool, then SecItemAdd works as expected (i.e. NSTask is run from the app that user has launched comparing to XPC service that was launched with launchd)

@art-divin art-divin added the bug Something isn't working label Jan 4, 2021
@art-divin
Copy link
Owner Author

Follow-up of dev forums: https://developer.apple.com/forums/thread/670702

@art-divin
Copy link
Owner Author

Received feedback, will try things out. Will keep you posted!

@art-divin
Copy link
Owner Author

Did a workaround, a lot of progress. Soon the Release!

@I-m-SuperMan
Copy link

https://developer.apple.com/forums/thread/114159

add kSecAttrAccessibleAlways to kSecAttrAccessible will fix this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants