Install the JCE provider for AWS CloudHSM Client SDK 5
The JCE provider for AWS CloudHSM Client SDK 5 is compatible with OpenJDK 8, OpenJDK 11, OpenJDK 17,
OpenJDK 21, and OpenJDK 25. You can download both from the OpenJDK
website
Use the following sections to install and provide credentials to the provider.
Note
To run a single HSM cluster with Client SDK 5, you must first manage
client key durability settings by setting
disable_key_availability_check to True.
For more information, see Key
Synchronization and Client SDK 5 Configure Tool.
Step 1: Install the JCE provider
-
Use the following commands to download and install the JCE provider.
-
Bootstrap Client SDK 5. For more information about bootstrapping, see Bootstrap the Client SDK.
-
Locate the following JCE provider files:
Step 2: Provide credentials to the JCE provider
Before your Java application can use an HSM, the HSM needs to first authenticate the application. HSMs authenticate using either an explicit login or implicit login method.
Explicit login – This method lets you provide
AWS CloudHSM credentials directly in the application. It uses the method from the AuthProvider
Implicit login – This method lets you set AWS CloudHSM credentials either in a new property file, system properties, or as environment variables.
-
System properties – Set credentials through system properties when running your application. The following examples show two different ways that you can do this:
-
Environment variables – Set credentials as environment variables.
Note
When setting environment variables, you must escape any special characters that may be interpreted by your shell.
Credentials might not be available if the application does not provide them or if you attempt an operation before the HSM authenticates session. In those cases, the CloudHSM software library for Java searches for the credentials in the following order:
-
System properties
-
Environment variables