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.

@ccapurso ccapurso merged commit 80c2dec into main Nov 1, 2022
@ccapurso ccapurso deleted the fix-iss-17576 branch November 1, 2022 13:57
@ccapurso ccapurso added this to the 1.12.2 milestone Nov 1, 2022
jayant07-yb pushed a commit to jayant07-yb/hashicorp-vault-integrations that referenced this pull request Mar 15, 2023
…hicorp#17679)

* fix mount flag behavior for kv subcommands

* fix mount flag behavior for kv metadata subcommands

* add tests

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