diff --git a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/distribution/DockerFipsElasticsearchDistributionType.java b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/distribution/DockerFipsElasticsearchDistributionType.java new file mode 100644 index 0000000000000..96f1cc0e87489 --- /dev/null +++ b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/distribution/DockerFipsElasticsearchDistributionType.java @@ -0,0 +1,27 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the "Elastic License + * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side + * Public License v 1"; you may not use this file except in compliance with, at + * your election, the "Elastic License 2.0", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +package org.elasticsearch.gradle.internal.distribution; + +import org.elasticsearch.gradle.ElasticsearchDistributionType; + +public class DockerFipsElasticsearchDistributionType implements ElasticsearchDistributionType { + + DockerFipsElasticsearchDistributionType() {} + + @Override + public String getName() { + return "dockerFips"; + } + + @Override + public boolean isDocker() { + return true; + } +} diff --git a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/distribution/InternalElasticsearchDistributionTypes.java b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/distribution/InternalElasticsearchDistributionTypes.java index 2fb7da6636858..b25917a42ed36 100644 --- a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/distribution/InternalElasticsearchDistributionTypes.java +++ b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/distribution/InternalElasticsearchDistributionTypes.java @@ -20,7 +20,7 @@ public class InternalElasticsearchDistributionTypes { public static ElasticsearchDistributionType DOCKER_IRONBANK = new DockerIronBankElasticsearchDistributionType(); public static ElasticsearchDistributionType DOCKER_CLOUD_ESS = new DockerCloudEssElasticsearchDistributionType(); public static ElasticsearchDistributionType DOCKER_WOLFI = new DockerWolfiElasticsearchDistributionType(); - public static ElasticsearchDistributionType DOCKER_FIPS = new DockerWolfiElasticsearchDistributionType(); + public static ElasticsearchDistributionType DOCKER_FIPS = new DockerFipsElasticsearchDistributionType(); public static List ALL_INTERNAL = List.of( DEB, diff --git a/distribution/docker/src/docker/Dockerfile.fips b/distribution/docker/src/docker/Dockerfile.fips index b8fa023e1016e..2384f3932437e 100644 --- a/distribution/docker/src/docker/Dockerfile.fips +++ b/distribution/docker/src/docker/Dockerfile.fips @@ -17,7 +17,7 @@ RUN cat < instance.yml instances: - name: "node1" dns: - - "node1.example.com" + - "node1.local" cn: - "node1.elasticsearch.cluster" EOF @@ -29,6 +29,7 @@ RUN cp node1/node1.key config WORKDIR /usr/share/elasticsearch/config # Add fips specific configuration RUN cat <> elasticsearch.yml +cache.hash_algo: "ssha256" xpack.security.fips_mode.enabled: true xpack.security.enabled: true xpack.security.http.ssl.enabled: true