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

Support KV v2 backend in Vault provider #1331

Closed
michael2m opened this issue Aug 29, 2020 · 3 comments
Closed

Support KV v2 backend in Vault provider #1331

michael2m opened this issue Aug 29, 2020 · 3 comments

Comments

@michael2m
Copy link

michael2m commented Aug 29, 2020

The current provider for secrets from HashiCorp Vault does not work for secrets stored in the KV version 2 backend. It leads to errors retrieving secrets. This is due to differences in the JSON structure of the response (wrapping in an additional "data" object). Note that KV v2 has the path to the secret include an additional "data" segment as well, e.g. "secret/data/path/to/it" for a secret "path/to/it". However this is compatible with current implementation of the secret provider in secretless-broker (ensuring the ID covers the proper path).

Proposal to support KV v2 backend: extend the current Vault provider in secretless-broker to parse an optional version indicator in the ID of the secret being retrieved. Currently it accepts: "path/to/secret" (with implied field "value") and "path/to/secret#somefield" with explicit field "somefield". This could be extended to support an optional version and delimiter prepended to the ID, e.g. "v2:path/to/secret" or "v2:path/to/secret#somefield". When omitted it should imply "v1", to not break current current behavior and expect the KV v1 backend.

@izgeri
Copy link
Contributor

izgeri commented Aug 31, 2020

@michael2m thanks for filing this request!

I'm not sure what our timeline for making this change would be, but if you're interested in contributing you can find more info in our Secretless Contributing Guide and in our general Conjur Contributing Guide. You can also contact us on Discourse - we have a channel specifically devoted to Secretless development, and we'd be happy to help you get up and running.

@izgeri
Copy link
Contributor

izgeri commented Sep 4, 2020

Per @michael2m's email request, I've marked this as implementing for him 🎉

michael2m pushed a commit to michael2m/secretless-broker that referenced this issue Sep 4, 2020
michael2m pushed a commit to michael2m/secretless-broker that referenced this issue Sep 24, 2020
author Meijer <[email protected]> 1600974439 +0200
committer Meijer <[email protected]> 1600975585 +0200
gpgsig -----BEGIN PGP SIGNATURE-----

 iQEzBAABCAAdFiEENNCse3F81nWmdIMC5yKUC9jzJWYFAl9s8uEACgkQ5yKUC9jz
 JWbUKAgAoDu0xMpFpssM3+hQ5nnBmJIg8w34CRU4+0/1sxUS6J3+m1PggHC/SfQY
 rK+/GAb93iGfZZrj5m24sP/4dWS5Zfl5QT+po52YHs1or83BtbqyReIqE7wsWf7y
 NfS9z8JtXAHFBS3h3UeERFmcGyyrDXCi08tTDPFkAkbYaPVr+pW1Qos2uL8mP+io
 kHO/9oJb/EzsMC1klopLHHggvrUrctd67I0MSpX5Ke0lw4FgNBExENjAGKSKthXP
 zZ7N0IPqxzBaHpMNsMNJDptnkxWf6809pVE/ejnWUT/lQDecljJS1WqCknD3MhAw
 Ii2Mx/i2JDhycOWm1fBlQfmdARmNJw==
 =Gk8f
 -----END PGP SIGNATURE-----

Support Vault backend KVv2. Connected to cyberark#1331.

Signed-off-by: Michael Meijer <[email protected]>
michael2m pushed a commit to michael2m/secretless-broker that referenced this issue Sep 24, 2020
michael2m pushed a commit to michael2m/secretless-broker that referenced this issue Sep 25, 2020
michael2m pushed a commit to michael2m/secretless-broker that referenced this issue Sep 25, 2020
michael2m pushed a commit to michael2m/secretless-broker that referenced this issue Sep 25, 2020
michael2m pushed a commit to michael2m/secretless-broker that referenced this issue Sep 25, 2020
michael2m pushed a commit to michael2m/secretless-broker that referenced this issue Sep 25, 2020
michael2m pushed a commit to michael2m/secretless-broker that referenced this issue Sep 25, 2020
michael2m pushed a commit to michael2m/secretless-broker that referenced this issue Sep 25, 2020
michael2m pushed a commit to michael2m/secretless-broker that referenced this issue Sep 25, 2020
sgnn7 pushed a commit that referenced this issue Sep 25, 2020
sgnn7 pushed a commit that referenced this issue Sep 25, 2020
sgnn7 added a commit that referenced this issue Sep 28, 2020
Contrib: Support Vault backend KVv2. Connected to #1331.
@sgnn7
Copy link
Contributor

sgnn7 commented Sep 28, 2020

Fixed via #1345 and queued for next release (>= 1.7.1). Thanks @michael2m - much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants