Last changed
Get notified of upcoming product changes, critical vulnerability notifications and patches and more.
Sign InChainguard Images are regularly-updated, minimal container images with low-to-zero CVEs.
This image is available on cgr.dev
:
Be sure to replace the ORGANIZATION
placeholder with the name used for your organization's private repository within the Chainguard registry.
This is a base image containing both the OpenJDK JRE and the Bouncy Castle crypto libraries for FIPS.
When using the OpenJDK Chainguard Image for FIPS compliance, please make sure to read the security policy and adapt your code as needed. Follow these documents:
This image is currently available in the following versions and variants:
Java version | Image name |
---|---|
Java 21 |
|
Java 17 |
|
Java 11 |
|
java.policy
and java.security
files configured?An updated version of the java.security
configuration file is shipped under
the default location ($JAVA_HOME/conf/security/java.security
) in this image and
is configured as described below:
It excludes every default security provider except for the SUN
provider,
leaving only the following configuration:
It loads the java.policy
file shipped under /usr/lib/jvm/jdk-fips-config/java.policy
as an additional policy file, at position 2, leaving the policy configuration
as:
The additional policy file is configured as described in the BCFIPS user manual:
It configures the keystore.type
as bcfks
, in order for Keystores to be
FIPS-compliant.
It sets the algorithms for the KeyManagerFactory
and TrustManagerFactory
as PKIX:
It sets BCFIPS to approved_only
mode:
Whenever possible ensure to use --module-path /usr/share/java/bouncycastle-fips
, as that allows one to execute
classes, jars, modules correctly with bouncycastle-fips JCA & JSSE
providers available to the JRE.
There are many additional environment variables preset in the image
that enable using CLASSPATH
instead if desired.
This image ships with the following components:
/usr/share/java/bouncycastle-fips
:
bc-fips.jar
bctls-fips.jar
bcpkix-fips.jar
$JAVA_HOME/conf/security/java.security
/usr/lib/jvm/jdk-fips-config/java.policy
This image ships with the following environment variables exported by default:
JDK_JAVA_FIPS_OPTIONS="--add-exports java.base/sun.security.internal.spec=ALL-UNNAMED --add-exports=java.base/sun.security.provider=ALL-UNNAMED"
JAVA_FIPS_CLASSPATH=/usr/share/java/bouncycastle-fips/*
JAVA_TRUSTSTORE_OPTIONS="-Djavax.net.ssl.trustStoreType=FIPS"
In addition, the following environment variables are also exported by default and can be updated as needed:
CLASSPATH=$JAVA_FIPS_CLASSPATH:.:./*
JDK_JAVA_OPTIONS=$JDK_JAVA_FIPS_OPTIONS $JAVA_TRUSTSTORE_OPTIONS
When updating your classpath variable, make sure to keep the path to the
bouncycastle-fips
folder in your classpath, so the Bouncy Castle libraries
are discoverable:
When updating the JDK_JAVA_OPTIONS
environment variable, make sure to specify
the exports options required for Bouncy Castle to work properly:
If you need the use of the converted keystore, make sure to also add the
JAVA_TRUSTSTORE_OPTIONS
variable to your JDK_JAVA_OPTIONS
:
Alternatively, these can be also set as an argument to the JVM tools via the
--class-path
/-cp
and -D
options. Please note these arguments take
precedence over the environment variables:
As part of the effort to build this image, a set of tests was created that validates that the BCFIPS and BCJSSE providers are in use.
Some of these tests are shipped in the image in
/usr/lib/bcfips-policy-140-3
. They validate that allowed algorithms
are available, and dissallowed ones are blocked.
To consume this image as a base image, add it in the FROM
statement of your Dockerfile. In order for the predefined
environment variables to be correctly consumed, java -jar
must not be used, as it overrides CLASSPATH
options.
Instead, add your jars to the CLASSPATH
and invoke the main class directly:
This can also be worked into a multistage build using the JDK FIPS variant for compiling your application:
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.
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
VariantsAs 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.
To better understand how to work with Chainguard Images, we encourage you to visit Chainguard Academy, our documentation and education platform.
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
Bitstream-Vera
FTL
GCC-exception-3.1
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 agreementThis 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