- Newest
- Most votes
- Most comments
Hello,
As you rightfully noted, you can use the ClientSDK v5 to retrieve the key with the same key label that was retrieved using Client SDK v3.
However, looking at the error that is presented when using ClientSDK v5, I am inclined to note that the error is returned due to the Key availability check that is enabled by default, when using ClientSDK v5[1].
The Key Availability check that is done by the ClientSDK v5 upon performing key operations, is to ensure that the key is available on more than one HSM within the CloudHSM cluster before the application is able to use the key.
To address the error that is being returned, the following 2 approaches can be considered:
a. You can proceed with adding an additional HSM to the CloudHSM cluster, where you would place the additional HSM in another subnet within the same VPC. So when keys are created on the HSM, then the key would get synchronized across all HSMs within the cluster. This is to ensure high availability, in the event that one of the HSMs encounters an issue. We generally recommend having a CloudHSM cluster with atleast 3 HSMs, with each HSM being in a different subnet and availability zone[2].
b. If adding an additional HSM to the CloudHSM cluster, is not possible, then you can also proceed with disabling the Key Availability Check that is performed by the ClientSDK v5, before the application uses the key. Looking at the error being returned, I see that you are using the ClientSDK v5 JCE provider. So to disable the Key Availability Check using JCE, you would generally run the below command on the client instance:
- On Linux:
sudo /opt/cloudhsm/bin/configure-jce --disable-key-availability-check
- On Windows:
"C:\Program Files\Amazon\CloudHSM\bin\configure-jce.exe" --disable-key-availability-check
I sincerely hope the above helps with the query of concern.
References:
[1] https://docs.aws.amazon.com/cloudhsm/latest/userguide/working-client-sync.html
[2] See subheader "Configuration" - https://aws.amazon.com/blogs/security/cloudhsm-best-practices-to-maximize-performance-and-avoid-common-configuration-pitfalls/
answered 2 years ago
Relevant content
asked 3 years ago
- AWS OFFICIALUpdated 2 years ago
