-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
Implementation of keyring-search #176
Conversation
tested for no duplicates
It is worth mentioning that linux-test.sh has also been modified to test the keyutils specific tests for the search feature. The line: |
Thanks so much for this contribution! I'm very busy right now working on a libdbus-based (fully synchronous) version of secret-service to go into a new major version (along with the newly-released async secret-service crate), and I'm hoping we can get this PR ready to go into that new release as well (which will allow us to make non-backwards-compatible changes to the API if necessary). Are there any such changes that you think you make this a better fit? |
The current API worked well with the search library, and implementing entry creation from search results was relatively painless. From there they work as any other entry would. One thing that I found through working with this was a minor inconvenience regarding 'service' and 'comment' on the Windows platform. If an entry is created from a searched credential then keyring chooses to build a comment for that credential. This leads to long comments that, after a password is set and stored, don't necessarily make sense. If there is some way to prevent the duplicity or mangled nature of these comments, I believe that would improve the functionality a bit. However, unless using keyring-search or keyring, Windows credential manager does not display these comments and thus is not imperative to proper functionality of the crates. |
Hey @wiimmers, I see your point. I can probably fix this issue with the v3 release, because that's where I can make breaking changes in the way the credentials are formatted (or introduce new API in the credential stores to allow setting these values). Can you try rebasing this PR against the current master and we can take a look at what might be needed? I can also look at supporting search in the mock store. |
Hey there, I've had a chance to look over the code now, and I think maybe if we change approach this can be done much more simply (and with a bit more generality). Instead of doing the search in our entry structure, I think we can just let people do the search in your crate, and then once they have the desired credential in hand they can just hand it to the keyring's keystore and let the keystone create the Entry. That way there's just one new entry point in each keystore - call it Is this making any sense to you? Does it sound like a good idea? |
Yes! I like the sound of that and I am all for simplicity and added generality in my mind just means more use cases for keyring. Apologies for my sparse replies, big changes for family and me this past week. I began rebasing and going through conflicts yesterday but have not finished. How do you suggest I move forward from here? I can start creating |
Hi @wiimmers my fingers are crossed that the "big changes" for your family are good ones! Yes, you and I agree: I would like to close this PR and then if you can update to the released |
An implementation of keyring-search into the keyring crate.
So far efforts have been made for all platform specific modules. However, the mock module remains untouched. Some work has been done to attempt to get this to work using generics and now modified keyring-search
MockCredentialStore
. I am hoping for some collaboration in getting this to work.The CLI example has been modified to show the functionality of the crate, with the ability to search and create entries from those search results.
The search function uses all three of the keyring-search by methods (
by_user
,by_target
,by_service
) and then filters duplicate results. This way clients need not specify extra parameters and simply pass a search query.