HARDENED
Return
openjdk11-jdk-fips

openjdk11-jdk-fips

latest

An OpenJDK 11 JDK FIPS image providing the Java 11 development kit and tools for compiling and running Java applications with FIPS support

Getting Started

To pull the image:

docker pull registry.hardened.eu/library/openjdk11-jdk-fips:latest

Example: Compiling a Minimal Application

Here’s how to build and run a simple Java application using the Hardened B.V. openjdk11-jdk-fips image:

cat >HelloWorld.java <<EOL
class HelloWorld {
    public static void main(String args[]) {
        System.out.println("Hello Hardened B.V. users!");
    }
}
EOL

Create a multi-stage Dockerfile, compile with the JDK-image:

cat >Dockerfile <<EOL
FROM registry.hardened.eu/library/openjdk11-jdk-fips:latest as dev
COPY HelloWorld.java HelloWorld.java
RUN javac HelloWorld.java

FROM registry.hardened.eu/library/openjdk11-jdk-fips:latest
COPY --from=dev /home/hardenedeu/HelloWorld.class .
CMD ["java", "HelloWorld"]
EOL

Build and run the image:

docker build -t my-java-app .
docker run my-java-app

Expected output:

Hello Hardened B.V. users!

Verifying Image Signatures

All Hardened B.V. images are signed using cosign. You can verify the signature using the following steps:

Save the public key:

cat >hardened.pub <<EOL
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEbxhUFlXkIIbDzdRAR9rc6kDPNb+k
J48lhqqlOMyiq3jkbKXNj2sEFMduFlNh63MrZA59PKf4TjS1AiCrvaFXNA==
-----END PUBLIC KEY-----
EOL

Verify the image signature:

cosign verify --key hardened.pub registry.hardened.eu/library/openjdk11-jdk-fips:latest

The verification will show the signature details and confirm the image’s authenticity.

To verify the SBOM, run the following command:

cosign verify-attestation --type spdxjson --key hardened.pub registry.hardened.eu/library/openjdk11-jdk-fips:latest

To download the SBOM, run the same command and decode it:

cosign verify-attestation --type spdxjson --key hardened.pub registry.hardened.eu/library/openjdk11-jdk-fips:latest | jq -r .payload | base64 -d | jq -r .predicate > openjdk11-jdk-fips-spdx.json

Trademarks

This software is packaged by Hardened B.V. All trademarks are property of their respective owners. Use of these images does not imply any affiliation or endorsement.