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.
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.