Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ if (BuildParams.inFipsJvm) {
dependsOn 'fipsResources'
}
testClusters.configureEach {
setTestDistribution(TestDistribution.DEFAULT)
extraConfigFile "fips_java.security", fipsSecurity
extraConfigFile "fips_java.policy", fipsPolicy
extraConfigFile "cacerts.bcfks", fipsTrustStore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ public class ElasticsearchNode implements TestClusterConfiguration {
"path.repo",
"discovery.seed_providers",
"cluster.deprecation_indexing.enabled",
"cluster.initial_master_nodes"
"cluster.initial_master_nodes",
"xpack.security.enabled"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has the effect that allows you to enable security via the integ_test distribution (in x-pack or core). I think that is a good thing especially if we want to start using the integ_test distro for all module/plugin REST tests.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that security is disabled by default for INTEG_TEST distribution.

if (node.getTestDistribution().equals(TestDistribution.INTEG_TEST)) {
node.defaultConfig.put("xpack.security.enabled", "false");

I think that means most FIPS related stuff will not be excercised in tests with INTEG_TEST distribution even the fips.gradle file configures a bunch of settings, e.g. xpack.security.fips_mode.enabled. Theoretically, this is probably a reduced coverage for FIPS since we are currently forcing DEFAULT distribution for FIPS tests?

That said, there are still tons of tests that use the DEFAULT distribution so that coverage is not really an issue. And we can later look into whether it is necessary and how to enable security for INTEG_TEST.

Copy link
Contributor Author

@jakelandis jakelandis Oct 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Theoretically, this is probably a reduced coverage for FIPS since we are currently forcing DEFAULT distribution for FIPS tests?

I don't think this will reduce coverage since security is also disabled for FIPS tests with the DEFAULT distribution. Individual tests can enable security. Before this change they could only enable security if they used the default distribution, but with this change they can override for any REST test.

setting 'xpack.security.enabled', 'false'

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I missed that. Thanks!


);

Expand Down