-
Notifications
You must be signed in to change notification settings - Fork 47
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
Supporting k/v v2 #23
Comments
@petems is it possible to upgrade the keystore on Vault from v1 to v2? Or do we need to copy the keys one by one 🤕 |
Upgrade is possible, we did that. Read the documentation for v2 store, there's instructions for upgrading: https://www.vaultproject.io/docs/secrets/kv/kv-v2.html Note: you have to modify your policies and clients to work with new paths. |
See also PR #41 which propose another approach to be v1 and v2 compatible. |
@arcenik can you please check the #41 PR, please? It feels like the
|
Hello @jhejl I think that you should make you own PR or create a new issue instead of putting file diff in an issue concerning an already merge PR. Although, I don't see the point of moving the 'data' part of the path outside of get_kv_v2 function. Best regards. |
wonder if #41 is usable and if we can create a tag. |
I just tested the change in #41 and it looks like it didnt work (I tried in my test environment at the time and it had but I think it was misconfifured) I might be able to give this a go over the weekend and re-work it more 😄 |
I can confirm that the changes from #41 do not work with KV2. I created to mounts - hiera_backend (as kv1) and hiera_backend (as kv2) with the same parameters inside.
Current result:
Would be great if someone could provide a working solution for KV2. |
Can you also provides corresponding audit log from vault ? |
Yep, vault responses with an error 404. Seems like something is wrong in the api call.
|
|
First of all, my previous message was slightly wrong, however, I managed the create #43 (on top of #41) which works for me.
Please test it, improve it. |
For your reference: Asciinema preview: Vault secrets shuffler |
I'm using the default_field set to value and your solution does not work with my setup as you do not use the same mapping between hiera and vault. My mapping:
Your mapping:
Depending of the mapping, you need to place the 'data' item (for v2) need to be placed on a different place. |
I'll try to look at this ... now I'm commuting: Cambridge (UK), to Netherlands :) Because we really need to get this working :) The fact that "it crashes", I believe is fine and it does it with every backend, if the default value is not supplied. |
ping :) |
Hmm, I thought my pipeline should've done that already, let me check |
It would be nice to be able to support the new k/v v2 backend, especially as it's now default for the main
kv
mount.Blockers
Right now, the Vault gem does not have an easy way of using the new KV v2 backend
The following issues will need to be solved/merged before hiera_vault can support v2:
hashicorp/vault-ruby#195
hashicorp/vault-ruby#194
hashicorp/vault-ruby#196
The text was updated successfully, but these errors were encountered: