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

Encrypt stored client secret value #59

Merged
merged 3 commits into from
Mar 25, 2022
Merged

Conversation

zbynek
Copy link
Contributor

@zbynek zbynek commented Mar 19, 2022

Fixes https://issues.jenkins.io/browse/SECURITY-1891 from security advisory

When serializing, the encrypted value is used. Deserialization checks if the string is in format {encrypted} and treats it as encrypted or plain text accordingly.

This includes changes from #58 so that the CI build can be downloaded and used for fixing both vulnerabilities.

CC @jvz @Wadeck

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • [n/a] Link to relevant pull requests, esp. upstream and downstream changes
  • [n/a] Ensure you have provided tests - that demonstrates feature works or fixes the issue

Copy link

@Kevin-CB Kevin-CB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I manually tested this fix for SECURITY-1833 & SECURITY-1891 and it's look complete.

However, you should changed in GitLabSecurityRealm/config.jelly the <f:textbox /> by a <f:password /> since it's a secret.

Recommendation:
https://www.jenkins.io/doc/developer/security/secrets/#secrets-and-configuration-forms

@zbynek
Copy link
Contributor Author

zbynek commented Mar 25, 2022

@Kevin-CB thanks for reviewing both issues. I've changed the control to password as you suggested. Btw. I don't have access to either of the Jira issues, so if anything is needed from me to get these PRs merged, please let me know here.

Copy link
Member

@basil basil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

@basil basil merged commit 7f9f95b into jenkinsci:master Mar 25, 2022
@zbynek zbynek deleted the encrypt-secret branch March 25, 2022 21:45
@basil
Copy link
Member

basil commented Mar 25, 2022

Released in 1.14.

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

Successfully merging this pull request may close these issues.

None yet

3 participants