​
DirectorySecurity Advisories
Sign In
Directory
elasticsearch-fips logoFIPS

elasticsearch-fips

Last changed

Sign In for Updates

Get notified of upcoming product changes, critical vulnerability notifications and patches and more.

Sign In
Versions
Overview
Provenance
Specifications
SBOM
Vulnerabilities
Advisories

Elasticsearch FIPS

An elastic license is required to use this image!

A Wolfi-based image tailored for Elasticsearch, incorporating the required bouncycastle FIPS modules (bcfips) to facilitate Elasticsearch's operation in FIPS mode.

Both OpenJDK and Elasticsearch have been configured to harness the BouncyCastle FIPS API at their core. The included bcfips module meets FIPS 140-2 compliance requirements and is accredited under: FIPS certificate 4616.

Disclaimer

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.

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

  • GPL-2.0-only

  • GPL-2.0-or-later

  • GPL-3.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
analytics
application
Bring Your Own License

Media KitContact Us
© 2024 Chainguard. All Rights Reserved.
Private PolicyTerms of Use

Product

Chainguard Images