Add support for Vault KV secrets engine v2 #86
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR builds on top of #84 (thanks @mopemope!), but completely separates the handling of Vault KV secret engine v1 and v2 to ensure that no breaking changes are introduced for v1 users, for example when asking for the secret with key "data".
This PR also
ℹ️ In the future it could be nice to have both secret engines handled by one backend, but it might require a bit more work, similar to what the Vault CLI does here: https://github.com/hashicorp/vault/blob/28fc7714655b34d700150f8f81589013d6a07e55/command/kv_get.go#L94-L147
Background info: