DirectorySecurity Advisories
Sign In
Directory
elasticsearch-fips logoFIPS

elasticsearch-fips

Last changed

Create your Free Account

Be the first to hear about exciting product updates, critical vulnerability alerts, compare alternative images, and more.

Sign Up
Versions
Overview
Provenance
Specifications
SBOM
Vulnerabilities
Advisories

Chainguard Image for elasticsearch-fips

Chainguard Images are regularly-updated, minimal container images with low-to-zero CVEs.

Download this Image

This image is available on cgr.dev:

docker pull cgr.dev/ORGANIZATION/elasticsearch-fips:latest

Be sure to replace the ORGANIZATION placeholder with the name used for your organization's private repository within the Chainguard registry.

Elastic license is required to use this image!

To run Elasticsearch in FIPS mode, you will need to provide a license key. To obtain a license for Elasticsearch, see their subscriptions page here.

This image is equipped with the essential components for Elasticsearch to operate in FIPS mode. However, it's important for users to ensure they use it in line with FIPS compliance standards.

This includes tasks such as KeyStore generation, configuration, and launching Elasticsearch with the correct configuration parameters. More guidance is provided in the sections below.

KeyStore

Elasticsearch requires a bcfips-compatible KeyStore to manage its SSL/TLS certificates.

Although Elasticsearch supports various KeyStore types, only BCKFS offers the capability to operate in approved (strict) mode under FIPS standards, ensuring only approved ciphers are used.

BCKFS KeyStore creation

To create keystore you can use keytool from this image like so:

docker run -v $(pwd):/tmp/keystore --entrypoint keytool cgr.dev/chainguard-private/elasticsearch-fips \
  -v -keystore /tmp/keystore/server.keystore \
  -storetype bcfks \
  -providername BCFIPS \
  -alias "localhost" \
  -genkeypair -sigalg SHA512withRSA -keyalg RSA \
  -dname CN="localhost" \
  -storepass "<YOUR TLS KEYSTORE PASSWORD>"
  -keypass "<YOUR TLS KEY PASSWORD, can be the same>"

Run image

Running in a production environment

When deploying ElasticSearch, you must provide passwords for the Elastic user, Elastic KeyStore, and the TLS KeyStore. The TLS KeyStore must be volume mounted at /usr/share/elasticsearch/config/server.keystore:

docker run \
  -it --rm \
  -p 9200:9200 \
  -e "discovery.type=single-node" \
  -e "ELASTIC_PASSWORD=<YOUR ELASTIC PASSWORD>" \
  -e "KEYSTORE_PASSWORD=<YOUR ELASTIC KEYSTORE PASSWORD>" \
  -e "xpack.security.transport.ssl.keystore.password=<YOUR TLS KEYSTORE PASSWORD>" \
  -v /tmp/server.keystore:/usr/share/elasticsearch/config/server.keystore \
  cgr.dev/images-private/elasticsearch-fips:latest

It will take a few moments for ElasticSearch to start.

ElasticSearch should now be accessible via localhost:9200

FIPS validation

You'll see the JVM security providers loaded after starting Elasticsearch if it is running in FIPS mode:

JVM Security Providers: [bcjsse, bcfips, sun]

Additionally, you can check bcfips is enforcing minimum password lengths, by running the container with a non-compliant Elasticsearch KeyStore password, such as 1234:

Caused by: org.bouncycastle.crypto.fips.FipsUnapprovedOperationError:
password must be at least 112 bits

Adding plugins to the image

Elasticsearch provides a mechanism to add plugins to the image. This process is outlined in the Elasticsearch ECK documentation.

Unlike the upstream Elasticsearch image, we provide all Elasticsearch utilities in the local path so that they can be ran directly. Due to this, we do not need to prefix bin/ to the executable path for elasticsearch-plugin, and we can just invoke it directly. Here's an example installing the analysis-icu plugin:

FROM cgr.dev/<REGISTRY>/elasticsearch-fips:latest
RUN elasticsearch-plugin install --batch analysis-icu

Debugging

KeyStore corrupted error upon launch

Error Message:

BCFKS KeyStore corrupted: MAC calculation failed.

Solution: The error indicates that a KeyStore was detected, but there was an issue parsing it. Usually this means that the password used to create the KeyStore does not match what was provided to Elasticsearch.

Password must be at least 112 bits

Error Message:

Exception in thread "main" java.security.GeneralSecurityException: Error generating an encryption key from the provided password
...
Caused by: org.bouncycastle.crypto.fips.FipsUnapprovedOperationError: password must be at least 112 bits

Solution: This is expected whenever Elasticsearch is running in strict (approved) mode for FIPS. Choose a longer user or KeyStore password which is compliant.

Contact Support

If you have a Zendesk account (typically set up for you by your Customer Success Manager) you can reach out to Chainguard's Customer Success team through our Zendesk portal.

What are Chainguard Images?

Chainguard Images are a collection of container images designed for security and minimalism.

Many Chainguard Images are distroless; they contain only an open-source application and its runtime dependencies. These images do not even contain a shell or package manager. Chainguard Images are built with Wolfi, our Linux undistro designed to produce container images that meet the requirements of a secure software supply chain.

The main features of Chainguard Images include:

-dev Variants

As mentioned previously, Chainguard’s distroless Images have no shell or package manager by default. This is great for security, but sometimes you need these things, especially in builder images. For those cases, most (but not all) Chainguard Images come paired with a -dev variant which does include a shell and package manager.

Although the -dev image variants have similar security features as their distroless versions, such as complete SBOMs and signatures, they feature additional software that is typically not necessary in production environments. The general recommendation is to use the -dev variants only to build the application and then copy all application artifacts into a distroless image, which will result in a final container image that has a minimal attack surface and won’t allow package installations or logins.

That being said, it’s worth noting that -dev variants of Chainguard Images are completely fine to run in production environments. After all, the -dev variants are still more secure than many popular container images based on fully-featured operating systems such as Debian and Ubuntu since they carry less software, follow a more frequent patch cadence, and offer attestations for what they include.

Learn More

To better understand how to work with Chainguard Images, we encourage you to visit Chainguard Academy, our documentation and education platform.

Licenses

Chainguard Images contain software packages that are direct or transitive dependencies. The following licenses were found in the "latest" version of this image:

  • Apache-2.0

  • BSD-3-Clause

  • Elastic-2.0

  • FTL

  • GCC-exception-3.1

  • GPL-2.0-only

  • GPL-2.0-or-later

For a complete list of licenses, please refer to this Image's SBOM.

Software license agreement

Compliance

This is a FIPS validated image for FedRAMP compliance.

This image is STIG hardened and scanned against the DISA General Purpose Operating System SRG with reports available.

Learn more about STIGsGet started with STIGs

Related images

Category
FIPS
STIG
application
byol

Safe Source for Open Sourceâ„¢
Media KitContact Us
© 2024 Chainguard. All Rights Reserved.
Private PolicyTerms of Use

Product

Chainguard Images