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

[JEP-237] disable escapeHatch when Jenkins is in FIPS mode #418

Merged
merged 4 commits into from
Oct 11, 2024

Conversation

olamy
Copy link
Member

@olamy olamy commented Oct 8, 2024

The escapeHatch login uses a non compliant encryption library (along with an non compliant encryption algotithm) (BCrypt) for storing the escape hatch password.

Whilst some equivallent functionality could be written (storing the password in PBKDF2 for example), the security implications on a back-door user in a FIPS compliant setup would be questionable.
Therefor this PR just disables the ability to create or use the escapeHatch when Jenkins is in FIPS mode.

This PR does not mean that the plugin is now FIPS compliant, it just makes it one step closer to be by removing one blocker.

Signed-off-by: Olivier Lamy [email protected]

Testing done

Submitter checklist

  • 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
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@olamy olamy requested a review from a team as a code owner October 8, 2024 00:50
Copy link

codecov bot commented Oct 8, 2024

Codecov Report

Attention: Patch coverage is 57.14286% with 3 lines in your changes missing coverage. Please review.

Project coverage is 71.77%. Comparing base (45809bf) to head (ab4ab83).
Report is 16 commits behind head on master.

Files with missing lines Patch % Lines
...va/org/jenkinsci/plugins/oic/OicSecurityRealm.java 57.14% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #418      +/-   ##
============================================
- Coverage     71.88%   71.77%   -0.12%     
- Complexity      206      208       +2     
============================================
  Files            16       16              
  Lines           900      907       +7     
  Branches        126      126              
============================================
+ Hits            647      651       +4     
- Misses          186      189       +3     
  Partials         67       67              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@olly-cb
Copy link

olly-cb commented Oct 8, 2024

let's be honest Codecov is useless here....

Copy link
Member

@fcojfernandez fcojfernandez left a comment

Choose a reason for hiding this comment

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

maybe we should add a test proving that in CasC the escape hatch cannot be configured.

@olamy
Copy link
Member Author

olamy commented Oct 8, 2024

oops I forgot a test class :)

@jtnord jtnord changed the title In FIPS env, escapeHatch cannot be enabled disable escapeHatch when Jenkins is in FIPS mode Oct 8, 2024
fcojfernandez
fcojfernandez previously approved these changes Oct 9, 2024
@fcojfernandez fcojfernandez dismissed their stale review October 9, 2024 07:32

missing one thing

Copy link
Member

@fcojfernandez fcojfernandez left a comment

Choose a reason for hiding this comment

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

as per https://github.com/jtnord/oic-auth-plugin/pull/1/files, this check should be included in the readresolve

@olamy
Copy link
Member Author

olamy commented Oct 9, 2024

as per https://github.com/jtnord/oic-auth-plugin/pull/1/files, this check should be included in the readresolve

done with 4623768

Signed-off-by: Olivier Lamy <[email protected]>
@jtnord jtnord changed the title disable escapeHatch when Jenkins is in FIPS mode [JEP-237] disable escapeHatch when Jenkins is in FIPS mode Oct 11, 2024
@jtnord jtnord enabled auto-merge October 11, 2024 15:00
@jtnord jtnord merged commit 2679db6 into jenkinsci:master Oct 11, 2024
19 checks passed
@olamy olamy added the bug label Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants