jenkinsci / hashicorp-vault-plugin

Jenkins plugin to populate environment variables from secrets stored in HashiCorp's Vault.
https://plugins.jenkins.io/hashicorp-vault-plugin/
MIT License
217 stars 143 forks source link

Base64 decoding in JCasC #307

Open amoutaux opened 1 year ago

amoutaux commented 1 year ago

What feature do you want to see added?

The JCasC offers the base64 and decodeBase64 helpers that can be applied to a secret prior to use, but they are not applicable here. Also, the secretBytes of a file Credential are automatically base64-decoded before being passed to a pipeline.

When migrating to hashicorp-vault-plugin (say from file Credential to vaultFileCredentialImpl), there is no way to retrieve the same behavior. A base64-encoded file that lies in Vault cannot be passed to a pipeline decoded already which forces us to modify the way pipelines handle such Credentials.

Did I miss anything ?

Thanks a lot

Upstream changes

No response