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

Fix kv -mount flag error when mount and secret path are the same #17679

Merged
merged 5 commits into from
Nov 1, 2022

Conversation

ccapurso
Copy link
Contributor

@ccapurso ccapurso commented Oct 26, 2022

Using the -mount flag with kv subcommands fails with the following error when the mount and secret paths are the same:

❯ vault kv get -mount=secret secret

WARNING! The following warnings were returned from Vault:

  * Non-listing operations on the root of a K/V v2 mount are not supported.

== Secret Path ==
secret/data

The fix results in basically the same change across many files. Given the distributed nature of the logic it could benefit from some refactoring but fixing the issue first and introducing some consolidation of logic at a later date if we determine that's prudent seemed safer.

Fixes #17576
Fixes #16639

Copy link
Collaborator

@digivava digivava left a comment

Choose a reason for hiding this comment

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

Thank you for taking the time to fix this edge case! Much appreciated.

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