Unable to retrieve secret stored by kv v2 secret engine in Vault.


Userlevel 4
Badge

Issue:

Retrieval fails for a kv v2 Vault secret via the credential:get() pipeline function.

 

Workaround:

With a kv v2 Vault secret, it is stored slightly differently, and the access path and JSON response is a bit different.

As a workaround, you can insert 'data/' after your root secret mount path, and additionally prepend 'data/' to your secret key.

For example, for a kv v1 secret that is typically accessed by 'secret/my-secret&passwd', it will be accessed as 'secret/data/my-secret&data/passwd' when stored as a kv v2 secret.


0 replies

Be the first to reply!

Reply