-
Notifications
You must be signed in to change notification settings - Fork 244
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-73334] make plugin FIPS-140 compliant by blocking PKCS#12 certificates when in FIPS mode #539
Conversation
PKCS#12 is not FIPS compliant as such we need to block these certificate uploades when in FIPS mode.
This is expected to be a temporary measure pending JENKINS-73335 as such no tests are introduced for this, rather manual testing was performed.
<j:set var="keyStoreSourceDescriptors" value="${descriptor.getPropertyType('keyStoreSource').applicableDescriptors}"/> | ||
<j:choose> | ||
<j:when test="${keyStoreSourceDescriptors.isEmpty()}"> | ||
<div class="warning">Jenkins has no <code>KeyStoreSources</code> available, Certificate credentials will not be able to be created.</div> |
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.
this is a small UI warning as I intend to follow up with https://issues.jenkins.io/browse/JENKINS-73335 so this should not live for that long, hence no tests for this
@@ -435,6 +436,7 @@ public static class UploadedKeyStoreSource extends KeyStoreSource implements Ser | |||
@SuppressWarnings("unused") // by stapler | |||
@Deprecated | |||
public UploadedKeyStoreSource(String uploadedKeystore) { | |||
ensureNotRunningInFIPSMode(); |
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.
other plugins are using this code directly, so we can not just not register the extension.
Whilst this will break other plugins, those other plugins are not Compliant and are usign a byte[] that is a PKCS#12 cert - so they are not compliant anyway.
I am not intending to fix /adapt any of these plugins.
JENKINS-73334 Block PKCS#12 certificates due to FIPS-140 compliance issues.
Testing done
manual testing of the form entry in FIPS and non FIPS mode (
mvn clean hpi:run -Djenkins.security.FIPS140.COMPLIANCE=true
)screenshots
FIPS mode:
Regular Mode:
Submitter checklist