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

Entry listing and searching #144

Closed
soywod opened this issue Aug 16, 2023 · 15 comments
Closed

Entry listing and searching #144

soywod opened this issue Aug 16, 2023 · 15 comments

Comments

@soywod
Copy link
Contributor

soywod commented Aug 16, 2023

First of all, thank you for this great crate!

Context

I am working on Pimalaya, a project that tries to improve open-source tools related to Personal Information Management. I try to design a lib built at the top of you keyring crate that would be a bit higher level (including caching with keyutils, prompt for passwords etc). I also plan to develop a CLI at top of my lib.

Issue

Your crate seems to be focused on Entry, which means you expose a get set and delete. But for the CLI I also need to list and search entries, is it sth you plan to expose as well? I can propose a draft if you are interested in.

@brotskydotcom
Copy link
Collaborator

Hi Clément. This is an intriguing idea. Are you proposing to build search support into all of the underlying keystore implementations so that you can surface some sort of entry search? I would certainly be interested in seeing a PR for that!

@soywod
Copy link
Contributor Author

soywod commented Aug 20, 2023 via email

@brotskydotcom
Copy link
Collaborator

Sorry for the late reply. I'd be very interested in seeing a PR that covers a listing in all platforms. I have consistently resisted the idea of adding any feature that only works on some platforms.

@soywod
Copy link
Contributor Author

soywod commented Aug 26, 2023 via email

@Buckram123
Copy link

I'd be very interested in seeing a PR that covers a listing in all platforms.
Alright then, I come back to you whenever I have something. It may be in few weeks, maybe months.

Is there any progress to this? I would really want to use it!

@soywod
Copy link
Contributor Author

soywod commented Feb 1, 2024 via email

@wiimmers
Copy link

wiimmers commented Apr 7, 2024

I was also interested in this for a sort of passwordless login code format I had for an API of mine. I just wanted to check if the credential made by the app to store the login code existed. I have a working version to list target names in Windows, but want to make sure that's the goal of this before I try to make it work on other platforms. It's just a vector of strings that can be iterated to match a target name given by the client.

@brotskydotcom
Copy link
Collaborator

It doesn't sound like you need any new features in the crate in order to do what you want. If you can iterate the possible credential names, then you can use the crate to check if a credential with that name exists, and get its password.

@wiimmers
Copy link

wiimmers commented Apr 7, 2024

Yes! I implemented, into the crate, a function called targets into the Entry struct. Then pointed to a default credential retriever function outside of the struct that points to the platform specific modules credential retriever (in my case, only Windows so far) and returns a list of all the targets in the store. I could be mistaken, but is this the feature looking to be added? Or is it a list of the whole entry; target, password, etc. and then a search function that we want? Thanks 👍🏻

@brotskydotcom
Copy link
Collaborator

I think the feature that @soywod proposed was meant to be more of a general search feature, where one might (for example) be able to iterate over all entries currently in the store. There is no one currently working on this, as far as I know.

@wiimmers
Copy link

wiimmers commented May 1, 2024

Search feature #169
I've started a pull request for this feature, details can be found in the PR.

@wiimmers
Copy link

wiimmers commented May 20, 2024

keyring-search a separate library for broad keystore searching. #169 still under development but will need some tweaks to fit with the functionality of the rest of the crate.

@wiimmers
Copy link

keyring-search is on crates.io now, v0.1.0. Should be fully functional aside from BSD implementations. Going to spend the rest of this week buttoning up the documentation and polishing this up.

@brotskydotcom
Copy link
Collaborator

I have closed #169 now that @wiimmers has released keyring-search. If he has the time, we will create some code in this crate for search for keyring-created credentials. But until then I recommend that people use the new crate for their searches.

@brotskydotcom
Copy link
Collaborator

Closing this issue now that keyring-search is available on crates.io.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants