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
What Operating System are you using (both controller, and any agents involved in the problem)?
Ubuntu 20
Reproduction steps
Create a freestyle job
Check the box for Vault plugin
Provide Vault path and credentials
Provide secrets path
Store the secret in a variable
Use script to echo the variable
Expected Results
Expected the job to run and use the credentials pulled. Confirmed the paths are correct (as they can be pulled from the same API URI outside of Jenkins).
Actual Results
The job failed due to being unable to get credentials.
Console output:
Running as SYSTEM
[EnvInject] - Loading node environment variables.
Building in workspace /var/lib/jenkins/jobs/test_vault_plugin/workspace
Retrieving secret: <secret URL redacted>
FATAL: Vault response returned 0 for secret path <secret path redacted>
java.lang.IllegalArgumentException: Illegal character(s) in message header value: <this spits out the Vault token>
at java.base/sun.net.www.protocol.http.HttpURLConnection.checkMessageHeader(HttpURLConnection.java:559)
at java.base/sun.net.www.protocol.http.HttpURLConnection.isExternalMessageHeaderAllowed(HttpURLConnection.java:494)
at java.base/sun.net.www.protocol.http.HttpURLConnection.setRequestProperty(HttpURLConnection.java:3189)
at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.setRequestProperty(HttpsURLConnectionImpl.java:312)
at com.bettercloud.vault.rest.Rest.get(Rest.java:278)
Caused: com.bettercloud.vault.rest.RestException
at com.bettercloud.vault.rest.Rest.get(Rest.java:288)
at com.bettercloud.vault.api.Logical.read(Logical.java:94)
Caused: com.bettercloud.vault.VaultException
at com.bettercloud.vault.api.Logical.read(Logical.java:120)
at com.bettercloud.vault.api.Logical.read(Logical.java:76)
at com.datapipe.jenkins.vault.VaultAccessor.read(VaultAccessor.java:117)
at com.datapipe.jenkins.vault.VaultAccessor.retrieveVaultSecrets(VaultAccessor.java:169)
Caused: com.datapipe.jenkins.vault.exception.VaultPluginException: Vault response returned 0 for secret path <secret path redacted>
at com.datapipe.jenkins.vault.VaultAccessor.retrieveVaultSecrets(VaultAccessor.java:188)
at com.datapipe.jenkins.vault.VaultBuildWrapper.provideEnvironmentVariablesFromVault(VaultBuildWrapper.java:99)
at com.datapipe.jenkins.vault.VaultBuildWrapper.setUp(VaultBuildWrapper.java:73)
at jenkins.tasks.SimpleBuildWrapper.setUp(SimpleBuildWrapper.java:294)
at hudson.model.Build$BuildExecution.doRun(Build.java:158)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:526)
at hudson.model.Run.execute(Run.java:1900)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
at hudson.model.ResourceController.execute(ResourceController.java:101)
at hudson.model.Executor.run(Executor.java:442)
Finished: FAILURE
Anything else?
No response
The text was updated successfully, but these errors were encountered:
Jenkins and plugins versions report
Environment
What Operating System are you using (both controller, and any agents involved in the problem)?
Ubuntu 20
Reproduction steps
Expected Results
Expected the job to run and use the credentials pulled. Confirmed the paths are correct (as they can be pulled from the same API URI outside of Jenkins).
Actual Results
The job failed due to being unable to get credentials.
Console output:
Anything else?
No response
The text was updated successfully, but these errors were encountered: