Skip to content

Commit e1e2568

Browse files
committed
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 0bb15d3 commit e1e2568

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
@@ -1004,12 +1004,6 @@ class BuildPlugin implements Plugin<Project> {
10041004
// TODO: remove this once ctx isn't added to update script params in 7.0
10051005
systemProperty 'es.scripting.update.ctx_in_params', 'false'
10061006

1007-
// Set the system keystore/truststore password if we're running tests in a FIPS-140 JVM
1008-
if (project.inFipsJvm) {
1009-
systemProperty 'javax.net.ssl.trustStorePassword', 'password'
1010-
systemProperty 'javax.net.ssl.keyStorePassword', 'password'
1011-
}
1012-
10131007
testLogging {
10141008
showExceptions = true
10151009
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)