How to integrate Ranger KMS, KTS, and KeyHSM with with the Luna 7 HSM appliance
supplied by SafeNet.
The task described in this procdural section guides you through setting up the Luna 7
hardware security moudule (HSM) supplied by SafeNet, for use with Ranger components
supplied by Cloudera. The process inlcudes setting up Luna 7 HSM on a client (host),
intalling KeyHSM and using Luna 7 HSM to validate keys.
You must:
Acquire the Luna 7 HSM from SafeNet.
Have both Ranger Key Management System and Key Trustee Server installed in your
environment.
Get KeyHSM software.
See related topics for more information about installing Ranger KMS and KTS to
store keys.
The following Luna SA Slots/Partitions were found:
Slot Serial # Label
==== ============= ===========
0 462309014 par1
Install and Configure HSM
SSH to active/passive KTS node.
Obtain Key HSM software.
Install Key HSM software.
# rpm -ivh keytrustee-keyhsm-*.rpm
Move the Key Trustee Server and Key HSM installation directory.
cd /usr/share/keytrustee-server-keyhsm/
usermod -G keytrustee,hsmusers keyhsm
Configure Key HSM to use SafeNet Luna client.
Run # keyhsm setup luna
# keyhsm setup luna
Use the hostname and any port above 1024 )
The recommended port is 9090.
Provide data about the HSM slot.
# service keyhsm setup luna
-- Configuring keyHsm General Setup --
Please enter keyHsm SSL listener IP address: oks-hsm.vpc.cloudera.com
Please enter keyHsm SSL listener PORT number: 9090
validate Port: :[ Successful ]
-- Configuring SafeNet Luna HSM --
Please enter SafeNetHSM Slot Number: 0
Please enter SafeNet HSM password (input suppressed):
Configuration stored in: 'application.properties'. (Note: You can also use service keyHsm settings to quickly view your current configuration)
Configuration saved in 'application.properties' file
Validate the Key HSM service.
$ service keyhsm validate
Check Key HSM is stopped :[Successful]
Configuration Available :[Successful]
Port 127.0.0.1:9090 available :[Successful]
Unlimited-Strength JCE :[Successful]
Validate cipher list :[Successful]
HSM availability :[Successful]
All services available: :[Successful]
Login Ranger UI using keyadmin user role for creating an encryption zone
key.
Validating Keys in Luna HSM
Login to Luna HSM machine.
ssh admin@luna-2.atx.cloudera.com
[luna-2] lunash:>partition showContents -par par1
Enter the password for the partition and the Keys will be visible as partition
objects.
Ranger KMS is successfully started.
You can now create Encryption zone keys using hadoop command or from Ranger UI
using credentials of keyadmin user. Optionally, you can change the default encryption
algoritm for KeyHSM and Luna 7.
Configuring encryption algorithms for Luna 7🔗
How to change the default encryption algorithm for KeyHSM and Luna
7.7.
KeyHSM supports configuring the specific encryption algorithm used by the Luna 7.7 HSM. This
section describes how to configure which specific encryption algorithm Luna 7
uses, by replacing the KeyHSM default algorithm with one of the optional
supported algorithms.
Stop the KeyHSM service.
Navigate to the KeyHSM root directory.
In the KeyHSM root dir, open the
application.properties file.
Find the hsm.luna.encryption.algorithm property, with
default value=RSA/ECB/PKCS1Padding.
Edit the application properties file to replace the default value with one
of the following ones:
Encryption algorithms supported by KeyHSM/Luna 7.7 HSM:
RSA/ECB/PKCS1Padding (default)
RSA
RSA_ECB_OAEPSHA_224ANDMGF1Padding
AES_RSA_NONE_OAEPSHA_512ANDMGF1Padding
AES_CBC_PKCS5Padding
RSA_NONE_OAEP_WITH_SHA224AndMGF1Padding
RSA_NONE_OAEP_WITH_SHA256AndMGF1Padding
RSA_NONE_OAEP_WITH_SHA384AndMGF1Padding
RSA_NONE_OAEP_WITH_SHA1AndMGF1Padding
Upgrade Scenario:
Unlock the encryption zones with existing keys.
Backup the zone data.
Stop the KeyHSM.
Change the algorithm value as described previously.
Start the KeyHSM.
Create new keys using the new algorithm value.
Lock the encryption zone with new keys.
This site uses cookies and related technologies, as described in our privacy policy, for purposes that may include site operation, analytics, enhanced user experience, or advertising. You may choose to consent to our use of these technologies, or