jenkins-credentials-decryptor
jenkins-credentials-decryptor copied to clipboard
secretBytes is not correctly decrypted
It looks like most secrets are encrypted by the Secret class. This however does not seem to be the case with SecretBytes which has it's own implementation. This seems to invalidate the assumption made here which makes the code take the wrong branch (else). Forcing the use of decryptNewFormatCredentials
unfortunately doesn't fix the issue.
Any updates on this feature? Also interested.
Hey, I'm blessed of not having to use Jenkins for the past couple of years, so I'd probably won't touch this decryptor in a veeeery long time. Sorry.
Solution: Go to script page - http://[JENKINS]/script
and execute:
println(new String(com.cloudbees.plugins.credentials.SecretBytes.fromString("{YOUR-SECRET}").getPlainData(), "ASCII"))
or:
println(hudson.util.Secret.decrypt(
"{YOUR-SECRET}"
))