Skip to content

Commit bc98ec8

Browse files
cwperksreta
andauthored
Check for -Dorg.bouncycastle.fips.approved_only in testclusters to run with FIPS enforcement (opensearch-project#20685)
* Also check for -Dorg.bouncycastle.fips.approved_only in testclusters to enforce running with FIPS enforcement Signed-off-by: Craig Perkins <craig5008@gmail.com> Co-authored-by: Andriy Redko <andriy.redko@aiven.io>
1 parent 3b2e27a commit bc98ec8

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

buildSrc/src/main/java/org/opensearch/gradle/info/FipsBuildParams.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ public static boolean isInFipsMode() {
3636
return DEFAULT_FIPS_MODE.equals(fipsMode);
3737
}
3838

39+
public static boolean isInFipsApprovedOnlyMode() {
40+
return isInFipsMode() && "true".equals(System.getProperty("org.bouncycastle.fips.approved_only"));
41+
}
42+
3943
public static String getFipsMode() {
4044
return fipsMode;
4145
}

buildSrc/src/main/java/org/opensearch/gradle/testclusters/OpenSearchNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ public synchronized void start() {
549549
logToProcessStdout("installed plugins");
550550
}
551551

552-
if (FipsBuildParams.isInFipsMode() && keystorePassword.isEmpty()) {
552+
if (FipsBuildParams.isInFipsApprovedOnlyMode() && keystorePassword.isEmpty()) {
553553
throw new TestClustersException("Can not start " + this + " in FIPS JVM, missing keystore password");
554554
}
555555

0 commit comments

Comments
 (0)