Skip to content

Commit 92483d4

Browse files
authored
Add FIPS specific testclusters configuration (#41199)
ClusterFormationTasks auto configured these properties for clusters. This PR adds FIPS specific configuration across all test clusters from the main build script to prevent coupling betwwen testclusters and the build plugin. Closes #40904
1 parent f4757b9 commit 92483d4

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

build.gradle

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,21 @@ allprojects {
598598
}
599599
}
600600

601+
subprojects {
602+
// Common config when running with a FIPS-140 runtime JVM
603+
if (project.ext.has("inFipsJvm") && project.ext.inFipsJvm) {
604+
tasks.withType(Test) {
605+
systemProperty 'javax.net.ssl.trustStorePassword', 'password'
606+
systemProperty 'javax.net.ssl.keyStorePassword', 'password'
607+
}
608+
project.pluginManager.withPlugin("elasticsearch.testclusters") {
609+
project.testClusters.all {
610+
systemProperty 'javax.net.ssl.trustStorePassword', 'password'
611+
systemProperty 'javax.net.ssl.keyStorePassword', 'password'
612+
}
613+
}
614+
}
615+
}
601616

602617

603618

buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -993,12 +993,6 @@ class BuildPlugin implements Plugin<Project> {
993993
// TODO: remove this once ctx isn't added to update script params in 7.0
994994
systemProperty 'es.scripting.update.ctx_in_params', 'false'
995995

996-
// Set the system keystore/truststore password if we're running tests in a FIPS-140 JVM
997-
if (project.inFipsJvm) {
998-
systemProperty 'javax.net.ssl.trustStorePassword', 'password'
999-
systemProperty 'javax.net.ssl.keyStorePassword', 'password'
1000-
}
1001-
1002996
testLogging {
1003997
showExceptions = true
1004998
showCauses = true

modules/reindex/build.gradle

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,6 @@ dependencies {
9595
es090 'org.elasticsearch:elasticsearch:0.90.13@zip'
9696
}
9797

98-
// Issue tracked in https://github.com/elastic/elasticsearch/issues/40904
99-
if (project.inFipsJvm) {
100-
testingConventions.enabled = false
101-
integTest.enabled = false
102-
}
103-
10498
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
10599
logger.warn("Disabling reindex-from-old tests because we can't get the pid file on windows")
106100
integTest.runner {

0 commit comments

Comments
 (0)