UKHomeOffice / vault-sidekick

Vault sidekick
Apache License 2.0
195 stars 62 forks source link

Support secrets from v2 kv store #84

Closed luke-richardson closed 5 years ago

luke-richardson commented 5 years ago

The v2 kv secrets engine returns the secret data in a different format (https://www.vaultproject.io/api/secret/kv/kv-v2.html#sample-response-1) than v1, this means that vault-sidekick writes a string representation of a map with "data" and "metadata" keys to file, rather than the secret data.

This change introduces a check to identify if the secrets engine is a v1 or v2 response.

gambol99 commented 5 years ago

Sorry for the massive delay @luke-richardson .. thank you kindly .. LGTM