Skip to content

Commit

Permalink
Add FIPS specific testclusters configuration (elastic#41199)
Browse files Browse the repository at this point in the history
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 elastic#40904
  • Loading branch information
alpar-t authored and Gurkan Kaymak committed May 27, 2019
1 parent cda9b1b commit 7d27feb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
15 changes: 15 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,21 @@ allprojects {
}
}

subprojects {
// Common config when running with a FIPS-140 runtime JVM
if (project.ext.has("inFipsJvm") && project.ext.inFipsJvm) {
tasks.withType(Test) {
systemProperty 'javax.net.ssl.trustStorePassword', 'password'
systemProperty 'javax.net.ssl.keyStorePassword', 'password'
}
project.pluginManager.withPlugin("elasticsearch.testclusters") {
project.testClusters.all {
systemProperty 'javax.net.ssl.trustStorePassword', 'password'
systemProperty 'javax.net.ssl.keyStorePassword', 'password'
}
}
}
}



Original file line number Diff line number Diff line change
Expand Up @@ -993,12 +993,6 @@ class BuildPlugin implements Plugin<Project> {
// TODO: remove this once ctx isn't added to update script params in 7.0
systemProperty 'es.scripting.update.ctx_in_params', 'false'

// Set the system keystore/truststore password if we're running tests in a FIPS-140 JVM
if (project.inFipsJvm) {
systemProperty 'javax.net.ssl.trustStorePassword', 'password'
systemProperty 'javax.net.ssl.keyStorePassword', 'password'
}

testLogging {
showExceptions = true
showCauses = true
Expand Down
6 changes: 0 additions & 6 deletions modules/reindex/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,6 @@ dependencies {
es090 'org.elasticsearch:elasticsearch:0.90.13@zip'
}

// Issue tracked in https://github.com/elastic/elasticsearch/issues/40904
if (project.inFipsJvm) {
testingConventions.enabled = false
integTest.enabled = false
}

if (Os.isFamily(Os.FAMILY_WINDOWS)) {
logger.warn("Disabling reindex-from-old tests because we can't get the pid file on windows")
integTest.runner {
Expand Down

0 comments on commit 7d27feb

Please sign in to comment.