From 803945c759fe950289efa5947258168601748e9c Mon Sep 17 00:00:00 2001 From: Brad White Date: Thu, 25 Apr 2024 11:55:30 -0600 Subject: [PATCH] add fips mode flag --- packages/kbn-test/src/es/test_es_cluster.ts | 8 +++++++- test/package/Vagrantfile | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/kbn-test/src/es/test_es_cluster.ts b/packages/kbn-test/src/es/test_es_cluster.ts index 0f94a76d87f715..12f020175fd4eb 100644 --- a/packages/kbn-test/src/es/test_es_cluster.ts +++ b/packages/kbn-test/src/es/test_es_cluster.ts @@ -182,6 +182,7 @@ export function createTestEsCluster< } = options; const clusterName = `${CI_PARALLEL_PROCESS_PREFIX}${customClusterName}`; + const isFIPSMode = process.env.FTR_FIPS_MODE === '1'; const defaultEsArgs = [ `cluster.name=${clusterName}`, @@ -192,7 +193,12 @@ export function createTestEsCluster< : ['discovery.type=single-node']), ]; - const esArgs = assignArgs(defaultEsArgs, customEsArgs); + const esArgs = assignArgs( + defaultEsArgs, + // ML has issues running in FIPS mode due to custom OpenSSL + // Remove after https://github.com/elastic/kibana-operations/issues/96 + isFIPSMode ? [...customEsArgs, 'xpack.ml.enabled=false'] : customEsArgs + ); const config = { version: esTestConfig.getVersion(), diff --git a/test/package/Vagrantfile b/test/package/Vagrantfile index f5ac24db969540..73be8e0a32659e 100644 --- a/test/package/Vagrantfile +++ b/test/package/Vagrantfile @@ -48,6 +48,8 @@ Vagrant.configure("2") do |config| echo "export OPENSSL_MODULES=/usr/local/lib64/ossl-modules" >> /etc/profile.d/kibana-fips-env.sh echo "export TEST_BROWSER_HEADLESS=1" >> /etc/profile.d/kibana-fips-env.sh echo "export ES_TMPDIR=/home/vagrant/kibana/.es/tmp" >> /etc/profile.d/kibana-fips-env.sh + # Remove after https://github.com/elastic/kibana-operations/issues/96 + echo "export FTR_FIPS_MODE=1" >> /etc/profile.d/kibana-fips-env.sh SHELL fips.vm.provision "ansible" do |ansible| ansible.playbook = "fips.yml"