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

ignore leading slash in kv get command #16443

Merged
merged 2 commits into from
Jul 28, 2022
Merged

Conversation

ccapurso
Copy link
Contributor

Handling of leading slashes was not consistent in the vault kv get command. This can be fixed by simply ignoring the leading slash of the requested path. The following will all successfully fetch a secret at path secret/foo:

vault kv get /secret/foo

vault kv get secret/foo

vault kv get -mount=secret /foo

vault kv get -mount=secret foo

Fixes #16238

@ccapurso ccapurso marked this pull request as ready for review July 25, 2022 20:39
@ccapurso ccapurso requested a review from AnPucel July 25, 2022 20:39
Copy link
Contributor

@averche averche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Copy link
Contributor

@AnPucel AnPucel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we'll take this change to get parity closer to kv list

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

Successfully merging this pull request may close these issues.

vault kv get no longer works with leading slash in path
3 participants