-
Notifications
You must be signed in to change notification settings - Fork 146
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
Vault credentials not found for KV version 2 based secrets using Vault token as credential #211
Comments
Same behavior on Jenkins 2.333 and Vault 1.9.3 |
I went deep.. tl;dr: Longer version: A bit more context of deployment where Jenkins and Vault are setup. Both are deployed with images pulled from docker.io, runs on the same server and are behind Traefik. Communication between Jenkins and Vault happens over Traefik. Did not check what Traefik does with URLs, but what I found is following: That part of code: hashicorp-vault-plugin/src/main/java/com/datapipe/jenkins/vault/VaultAccessor.java Lines 114 to 122 in 182c0fb
Should return call this:
For Vault URL creation, that helper is called:
It does the job with setting And the question is: at which level that |
Excluded Traefik from communication between Jenkins and Vault - used direct URL aka
With |
Take a look to this : #209 |
Based on following example, I tried to setup working retrieval of secrets from Vault KV version 2 engine and was unable to have it working:
Working example of scripted pipeline for KV version 1 secret engine:
Not working example of scripted pipeline for KV version 2 secret engine:
Build error:
vault_token
is a token used to access Vault configured with JCasCjenkins.yml
Vault secrets retrievals using Vault CLI:
Versions:
May I ask if KV v2 secrets retrieval does work? If yes, how to setup it? Thanks!
The text was updated successfully, but these errors were encountered: