-
Notifications
You must be signed in to change notification settings - Fork 782
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
consul-template incompatible with KV Secrets Engine Version 2; has misleading and harmful failure message. #1146
Comments
Given a KV v2 secret backend of
|
@gmr Can you provide a full walkthrough on that example, please? I am not very familiar enough with this to fill in the gaps, and can't successfully recreate it. Thanks. |
So if you call your kv v2 secret backend
Note the addition of |
To expand slightly on the above. If you're trying to enumerate secrets you have to use:
|
@gmr Hello, Gavin. I tried to use your recommendations, but still doesn't working.. |
Does anyone has any updates on this ? |
@gmr I tried this and it works on KV v2 but doesn't work with KV v1. |
@kjanshair I would not expect it to. The paths are different. That usage is documented in the consul-template README IIRC. |
@gmr I see:
For KV v1, but does not updating. |
Complete issue description. #1199 |
consul-template does not appear to work with the Hashicorp Vault KV Secrets Engine version 2. While not necessarily a significant problem, there are several related problems that cause this to be extremely troublesome:
-dev
automatically puts the KV Secrets Engine into version 2.As a new user of Vault and consul-template, these problems have caused me to waste a considerable amount of time and have lead to a very poor initial impression with both tools. Simply having some relevant failure messages would have greatly improved my experience.
Consul Template version
consul-template v0.19.5 (f8c8205)
Installed via Homebrew
Configuration
No custom consul-template configuration.
Command
consul-template -vault-renew-token=false -template "in.tpl:out.txt" -once -dry
Debug output
https://gist.github.com/apeschel/8ea15fb79836a3a428cd3ec84f55dce7
Expected behavior
consul-template should connect to vault running KV Secrets Engine version 2, or at least generate a relevant version incompatibility error message.
Actual behavior
consul-template generates a misleading "key not found" message.
Steps to reproduce
Start a vault with the given config:
Create a vault, login, and add a secret:
Create a simple template:
Output generated as expected:
Upgrade to KV Secrets Engine version 2:
consul-template is no longer able to connect to the vault:
The text was updated successfully, but these errors were encountered: