Skip to content
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

secretBytes is not correctly decrypted #8

Open
rbjorklin opened this issue Oct 5, 2020 · 3 comments
Open

secretBytes is not correctly decrypted #8

rbjorklin opened this issue Oct 5, 2020 · 3 comments

Comments

@rbjorklin
Copy link
Contributor

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.

@Colum
Copy link

Colum commented Apr 15, 2021

Any updates on this feature? Also interested.

@hoto
Copy link
Owner

hoto commented Apr 15, 2021

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.

@lebe-dev
Copy link

lebe-dev commented Aug 8, 2022

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}"
))

Repository owner deleted a comment from DavideStagni Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants