Skip to content

Commit

Permalink
add fips mode flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Ikuni17 committed Apr 25, 2024
1 parent ab96ed6 commit 803945c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/kbn-test/src/es/test_es_cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`,
Expand All @@ -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(),
Expand Down
2 changes: 2 additions & 0 deletions test/package/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 803945c

Please sign in to comment.