-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Add flags to recursively list secrets for KV Engine. #6463
Conversation
Adds `-recursive', `-depth', `-filter' and `-concurrent' flags to the vault CLI's `kv list' subcommand. Description of the flags: * recursive Recursively list data for a given path. * depth Specifies the depth for recursive listing. * filter Specifies a regular expression for filtering paths. * concurrent Specifies the number of concurrent recursions to run. Reference: hashicorp#5275.
👋 - Not sure why |
@jefferai - Can you please review? |
We need to discuss internally whether or not we want this functionality and if so whether it should be client or server side. |
Thanks for considering it guys |
@jefferai Regarding your last comment about serverside or clientside. This feature would be ideal for other projects that integrate with Vault. Currently in order to get a picture of what keys exist you must recursively traverse the entire tree LISTing on each "folder". While it could be done clientside, it would also be costly for larger vault installations. While doing this serverside would still incur a cost, it is in-memory which would be an orders-of-magnitude smaller cost considering the TCP/TLS connections that would need to be established per path. In the end, both client- and server-side have use cases, but client-side has the ability to be done today through the API. Given there are several tickets regarding this feature, it appears an official server-side implementation would be a welcome addition to the project. Thoughts? |
Hello! Any update on this? |
A similar PR was opened in the KV repo, but subsequently closed: The reasoning for closing involves possible acl exploitation. Do you feel like that's a possible issue with this implementation? |
hashicorp/vault-plugin-secrets-kv#38 ACL exploit was possible because the implementation happened on the server-side. This PR implements the functionality via the client-side where an ACL exploit is not possible. I personally think that both hashicorp/vault-plugin-secrets-kv#38 and this PR are not the right way to implement this feature due to the fact that current |
Is there a semi-canonical way to do this somewhere, until an official solution is implemented? Maybe some reference implementation? |
I'm not sure that it is "semi-canonical", but I'm using this little bash script:
If I want to hide errors, I do |
Hi folks! I'm going to go ahead and close this PR - please feel free to re-open it (and rebase off of main) if the questions can be answered and you'd like to continue working on it. Thanks! |
Reference: #5275.