-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[JENKINS-73506] Reject fetch requests that use credentials with HTTP in FIPS mode #1615
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two optional comments that do not block merge.
Signed-off-by: Olivier Lamy <[email protected]>
some changes proposed here PereBueno#1 |
reject wrong setup for mbp scan and reject saving data
Co-authored-by: Mark Waite <[email protected]>
Co-authored-by: Mark Waite <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
* @return {@code false} if using any credentials with a non TLS protocol with FIPS mode activated | ||
* @see FIPS140#useCompliantAlgorithms() | ||
*/ | ||
public static boolean isFIPSCompliantTLS(String credentialsId, String remoteUrl) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Restricted(NoExternalUse.class)
?
JENKINS-73506 - Checks for FIPS compliance in AbstractSCMSource
This is a follow-up of #1611
That PR left a case without covering: SCMSources could be configured with invalid values and, when fetched (e.g. multibranch pipelines) credentials could be leaked.
IllegalArgumentException
throwing has no effect here (other than the logs), as MBPs handle that, so failures would be transparent to the user, also credentials could come from other sources (e.g.GIT_PASSWORD
). Form validation is still in place and wasn't modified.Therefore, in this case we are interrupting fetch operation, so we can be sure credentials are not leaked.
When trying to fetch a remote with credentials and an insecure URL we will
TaskListener
so it's show in the UI.Added a unit test checking fetch is interrupted.
Also tested manually and checked fetching is interrupted as expected
Checklist
Types of changes
What types of changes does your code introduce?