You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use Vault Transit Secret Engine to generate asymmetric keys. We would like to inject the current/latest generated public key into a k8s Pod. The injection happens via Vault Agent Sidecar Injector and annotation based Consul-template injection.
Describe the solution you'd like
We would like to have a new template function transit <PATH> where PATH is a path to a Transit Secret Engine, which points to the latest key. e.g. : transit/export/public-key/fookey/latest
Then we could inject the secret like this:
apiVersion: ...kind: ...spec:
annotation:
vault.hashicorp.com/agent-inject-secret-signing_key: | {{ with transit "transit/export/public-key/signing_key/latest" }} {{ .Data.key }} {{ end }}
Can you submit a pull request?
No.
The text was updated successfully, but these errors were encountered:
consul-template has a built-in secret template function which enables a generic read/write interface to any Vault backend. This includes the transit backend, so in your case something like this could work:
{{ with secret "transit/export/public-key/some-kind-of-key/latest" }}
{{ range .Data.keys }}{{ . }}{{ end }}{{ end }}
Which problem is this feature request solving?
We use Vault Transit Secret Engine to generate asymmetric keys. We would like to inject the current/latest generated public key into a k8s Pod. The injection happens via Vault Agent Sidecar Injector and annotation based Consul-template injection.
Describe the solution you'd like
We would like to have a new template function
transit <PATH>
where PATH is a path to a Transit Secret Engine, which points to the latest key. e.g. :transit/export/public-key/fookey/latest
Then we could inject the secret like this:
Can you submit a pull request?
No.
The text was updated successfully, but these errors were encountered: