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

vault cli to support only fields output #13701

Closed
kucharskim opened this issue Jan 19, 2022 · 4 comments · Fixed by #13893
Closed

vault cli to support only fields output #13701

kucharskim opened this issue Jan 19, 2022 · 4 comments · Fixed by #13893

Comments

@kucharskim
Copy link

Ability to list fields under specific key. During administrative work I often only want to see what fields are present under specific key, without exposing sensitive content of those fields:

$ vault kv get -format json secret/keys/tls/example.com | jq -r '.data.data|keys[]'
CERT
KEY

Having convenient vault cli option for same above output would be good feature to have.

@ccapurso ccapurso linked a pull request Feb 7, 2022 that will close this issue
@ccapurso
Copy link
Contributor

ccapurso commented Feb 7, 2022

Hi, @kucharskim. Thank you for your submission! We are planning to include a new KVv2 endpoint with the 1.10 release that should provide a solution to your request. The KV secret engine PR can be found here. The linked pull request is associated with the docs updates which will be merged once the KVv2 dependency has been updated.

@kucharskim
Copy link
Author

How is this going to be visible from a user perspective? Is this specific Vault version or combination of components?

@ccapurso
Copy link
Contributor

That's a great question. The KV secret engine is built-in and thus the changes made to add this endpoint will be made available with version 2 of the KV secret engine in the upcoming Vault 1.10.0 release. This new section discussing the endpoint will be added to Vault's API docs (https://www.vaultproject.io/api-docs) once the release has been made available. As with with other KV-related endpoints, access to this endpoint will need to be made available via your policies.

@abdennour
Copy link

abdennour commented Jul 2, 2022

I asked similar question somewhere since 3 years.. I can see the question is duplicated again.. This means that there is big demand on this feature... For the time being, this is our refuge script:

https://gist.github.com/abdennour/d088b0413687b76037b45e6308c7a889.js

This beautiful script will load vault path into a set of files where names of files are the keys, and content of these files are the values of those keys.

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

Successfully merging a pull request may close this issue.

4 participants