Configure the SafeNet Luna SA HSM
gateway83
The
API Gateway
supports the use of the SafeNet Luna SA Hardware Security Module. This section provides basic step-by-step instructions on how to install this HSM. For more information, refer to the .The client software on the
API Gateway
machine must already have a partition assigned to it in the Luna HSM.Step 1: Install the Luna Client Software
The first step is to install the Luna client.
Before proceeding, make sure you have access to the Luna client installation files and client patch files (in the case of Luna 5).
To install the Luna client software
:- Use SCP to copy the Linux 64-bit SafeNet client files over to a temporary directory on theAPI Gateway.
- While logged in as therootuser, navigate to the directory on theAPI Gatewaycontaining the client files and then run the install script:# ./install.sh
- Enteryto agree to the license.
- Enteryto install the Luna SA client.
- Enteryto install the JSP for Luna.
- Enternto not install the SDK for Luna.
Step 2: Connect Client to a Partition
After the Luna client is installed, the next step is to connect it to the Luna partition. The following assumes that DNS is used.
(1) This procedure requires access to the Luna appliance admin password (available from your Luna administrator). (2) CA recommends that each
API Gateway
cluster be assigned its own Luna partition for its exclusive use.To connect the Luna client to a partition
:- Navigate to the Luna SA command directory:# cd /usr/lunasa/bin
- Copy the Luna appliance server certificate to the client:# ./ctp admin@<LunaBoxHostname>:server.pem . (for Luna 4) # ./scp admin@<LunaBoxHostname>:server.pem . (for Luna 5)
- Register the server with the client:# ./vtl addServer -n <LunaBoxHostname> -c server.pem
- Generate a client certificate:# ./vtl createCert -n <ClientHostname>
- Copy the client certificate to the server:# ./ctp /usr/lunasa/cert/client/<ClientHostname>.pem admin@<LunaBoxHostname>: (for Luna 4) # ./scp /usr/lunasa/cert/client/<ClientHostname>.pem admin@<LunaBoxHostname>: (for Luna 5)
- Log in to the Luna HSM appliance to register the client with the server, then assign the client to a server partition:# ssh admin@lunaboxhostname lunash:> client register -client <ClientHostname> -hostname <ClientHostname> lunash:> client assignPartition -client <ClientHostname> -partition <GatewayPartition>
- Run the following command only if the hostname is not resolvable:lunash:> client hostip map <ClientHostname> <ClientIP> (for Luna 4) lunash:> client hostip map -client <ClientHostname> -ip <ClientIP> (for Luna 5)
- Log out from the Luna HSM:lunash:> exit
- Set the read permissions for the certificate files in the following directories:# chmod a+r /usr/lunasa/cert/server/*.pem # chmod a+r /usr/lunasa/cert/client/*.pem
- Verify that the client is connected to its assigned partition:# ./vtl verifyWhen the verification is successful, the Luna slots partitions will be displayed.If the verification is unsuccessful, edit the fileChrystoki.confwithin the /etc directory and then try again. The setting should be disabled, as shown:Misc = { PE1746Enabled = 0; }
- Run the following command to verify that your token client PIN is correct for this partition and that the partition is empty:# ./cmu listEnter the partition password and follow the instructions on the Luna PED pad. If the verification is successful, you will see a display similar to the following back on the command line:
nExitCode returned was =0 Please enter password for token in slot 1 : ******************* handle=9??????? label=root.ame2.l7tech.com handle=11?????? label=root.ame2.l7tech.com--cert0 handle=30?????? label=SSL--cert0 handle=32?????? label=SSL handle=48?????? label=hmm--cert0 handle=49?????? label=hmm handle=55?????? label=ame2.l7tech.com--cert0 handle=56?????? label=ame2.l7tech.com handle=121????? label=peanuts--cert0 handle=128????? label=ssl_x4150upgrade handle=130????? label=ssl_x4150upgrade--cert0 handle=133????? label=peanuts handle=175????? label=ca handle=180????? label=caec handle=183????? label=caec--cert0 handle=189????? label=ca--cert0 handle=266????? label=test--cert0 handle=269????? label=test handle=296????? label=testca handle=298????? label=testca--cert0 handle=308????? label=peanuts2 handle=310????? label=peanuts2--cert0 handle=419????? label=NEWSSL--cert1 handle=432????? label=NEWSSL--cert0 handle=495????? label=peanuts2_ca handle=503????? label=peanuts2_ca--cert0
Step 3: Configure the JDK
The final step involves copying the .JAR files from the JSP into the JDK (Java Development Kit) for the
API Gateway
appliance.To configure the JDK for the
:API Gateway
- Navigate to the following directory on the Gateway:# cd /usr/lunasa/jsp/lib
- Copy the Luna .JAR files over to the Gateway:# cp libLunaAPI.so Luna*.jar /opt/SecureSpan/JDK/jre/lib/ext
- Change the file permissions of the Luna files to make them readable by the Gateway:# chmod a+r /opt/SecureSpan/JDK/jre/lib/ext/*Luna*
- Open the following file in a text editor:/opt/SecureSpan/JDK/jre/lib/security/java.security
- Add the following line to the file and then save and close the file:com.safenetinc.luna.provider.createExtractableKeys=trueIf your Luna machine has FIPS mode enabled, insert the following line to the java.security file as an addition:security.provider.10=com.safenetinc.luna.provider.LunaProvider
- Set the file permissions for the Luna client as follows:# chmod -R 655 /usr/safenet
- Restart the CAPI Gateway:service ssg restart
Step 4: Enable SafeNet Luna on the
API Gateway
At this point, you may now enable the SafeNet Luna HSM on the
API Gateway
. Do one of the following:- If you will be accessing theAPI Gatewayusing the Policy Manager (either browser or desktop client) over the default ports 8443/9443, follow both"To reset the default list"and"To enable SafeNet Luna"below.
- If you will be accessing theAPI Gatewayonly using the browser client over a custom port, follow"To enable SafeNet Luna"only.
To reset the default list
:The following procedure corrects an issue that may occur when using the Policy Manager browser client over the default ports.
- Start the Policy Managerdesktopclient and connect to theAPI Gateway. Alternatively, you may use the browser client over port 8443.
- Run theManage Listen Portstask. The Manage Listen Ports dialog is displayed.
- Select port9443and then click [Properties]. The Listen Port Properties are displayed.
- Select the [SSL/TLS Settings] tab.
- Click [Use Default List] and then click [OK] to close the dialog box.
Repeat the steps above for port
2124
if the Gateway continues to show a "starting" status.To enable SafeNet Luna
:- Run theManage Private Keystask. The Manage Private Keys dialog is displayed.
- Click [Manage Keystores] to display the Manage Keystore dialog.
- Click [Enable SafeNet HSM]. The "Current keystore type" should now display "SafeNet Luna HSM".
- Enter theAPI Gatewaypartition password when prompted.
- Restart theAPI Gateway.
You can confirm that the SafeNet Luna HSM is in effect by doing any of the following:
- Under the Manage Private Keys task, check that the default SSL key shows location "HSM Luna".
- When creating a new private key, the location should be "HSM Luna".
- You should be unable to export a private key.
If the SafeNet Luna HSM is enabled but the
API Gateway
is unable to connect to it on startup, the API Gateway
will fall back to the software keystore.