-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
Support Metadata LIST #334
Comments
Hey @FinHorsley,
Here is a link to it's usage and documentation: https://github.com/rajanadar/VaultSharp#list-secrets Hey there is this method already available, can you validate if this works? Thanks, |
@konidev20 Ah, sorry i sent the wrong request 🤦♂️ I meant to use the following, to get a list of all keys at the mountPath (rather than just all keys for a given secret path, within a mountPath)
which gives a response of {"request_id":"6a7fb8b6-ce32-86cc-5075-16c3403418c4","lease_id":"","renewable":false,"lease_duration":0,"data":{"keys":["client:x","client:y","client:q","client:z"]},"wrap_info":null,"warnings":null,"auth":null} However, I can't do the same with VaultSharp as await vaultClient.V1.Secrets.KeyValue.V2.ReadSecretPathsAsync(
null, 👈 // causes Vault exception
mountPoint: "kv-clients"); Got it working with the following, but I'm not sure if this is abusing the VaultSharp methods? await vaultClient.V1.Secrets.KeyValue.V2.ReadSecretPathsAsync(
"/", 👈 // returns all keys in mountPath "kv-clients"
mountPoint: "kv-clients"); |
You're right, this is because we have an
The code snippet you provided would certainly work. And IMO is not a misuse. I think we can do without the [Edit]
I would recommend you to continue the second method you have shown above. [/Edit] |
Describe the feature request or question
Support for listing all keys at mount-path.
e.g.
Link to the Vault API Docs that support this feature
https://developer.hashicorp.com/vault/api-docs/secret/kv/kv-v2#list-secrets
Additional context
N/A
The text was updated successfully, but these errors were encountered: