Manual Chapter :
Implementing the SafeNet Luna HSM with BIG-IP Systems
Applies To:
Show VersionsBIG-IP APM
- 17.1.2, 17.1.1, 17.1.0, 17.0.0, 16.1.5, 16.1.4, 16.1.3, 16.1.2, 16.1.1, 16.1.0, 16.0.1, 16.0.0
BIG-IP Analytics
- 17.1.2, 17.1.1, 17.1.0, 17.0.0, 16.1.5, 16.1.4, 16.1.3, 16.1.2, 16.1.1, 16.1.0, 16.0.1, 16.0.0
BIG-IP LTM
- 17.1.2, 17.1.1, 17.1.0, 17.0.0, 16.1.5, 16.1.4, 16.1.3, 16.1.2, 16.1.1, 16.1.0, 16.0.1, 16.0.0
BIG-IP AFM
- 17.1.2, 17.1.1, 17.1.0, 17.0.0, 16.1.5, 16.1.4, 16.1.3, 16.1.2, 16.1.1, 16.1.0, 16.0.1, 16.0.0
BIG-IP DNS
- 17.1.2, 17.1.1, 17.1.0, 17.0.0, 16.1.5, 16.1.4, 16.1.3, 16.1.2, 16.1.1, 16.1.0, 16.0.1, 16.0.0
BIG-IP ASM
- 17.1.2, 17.1.1, 17.1.0, 17.0.0, 16.1.5, 16.1.4, 16.1.3, 16.1.2, 16.1.1, 16.1.0, 16.0.1, 16.0.0
Implementing the SafeNet Luna HSM with BIG-IP Systems
Overview: Setting up the SafeNet Luna SA HSM with BIG-IP systems, using a script
The Gemalto SafeNet Luna SA HSM is an external hardware security module that
is available for use with BIG-IP systems.
Because it is network-based, you can use the SafeNet solution with all BIG-IP platforms,
including VIPRION® Series chassis and
appliances and BIG-IP Virtual Edition (VE). You can also configure multiple HSMs as an
HA (high availability) group to use with BIG-IP systems.
SafeNet Luna is now produced by Gemalto.
The BIG-IP system, when in
appliance mode, does not support the SafeNet SA HSM installation/uninstallation.
Both
RSA-based and
ECDHE-ECDSA cipher suites use the network HSM. After installation on
the BIG-IP system, the SafeNet Luna SA HSM is compatible with Access Policy Manager and Application Security Manager™, without additional
configuration steps.
For information about using the iControl® interface to configure the
Luna SA HSM with BIG-IP systems, consult the F5 DevCentral site
(
https://devcentral.f5.com/icontrol/
).For additional information about using the Luna SA HSM, contact Gemalto
SafeNet Technical Support (supportportal.gemalto.com).
Prerequisites for setting up SafeNet Luna SA HSM with BIG-IP systems
Before you can use SafeNet Luna SA HSM with the BIG-IP system, you
must make sure that:
- The SafeNet device is installed on your network.
- The SafeNet device and the BIG-IP system can communicate with each other.
- The SafeNet device has a virtual HSM (HSM Partition) defined before you install the client software on the BIG-IP system.
- The BIG-IP system is licensed for external interface and network HSM.
Additionally, before you begin the installation process, make sure that you have access
to:
- The Luna SA Client software. See theInteroperability Matrix for BIG-IP TMOS with SafeNet Clients and HSMsupplemental document available on AskF5 for supported SafeNet client and HSM versions with BIG-IP TMOS versions information.
- The Luna SA Customer Documentation.
If you install the Luna SA HSM (external HSM) on a system with a FIPS card
(internal HSM) installed, the Luna SA HSM takes precedence. You cannot use the SafeNet
Luna SA HSM on a BIG-IP system that is running another external HSM.
BIG-IP TMOS with SafeNet Luna SA HSM
only supports IPv4.
Preparing to install the Luna SA client on the BIG-IP system
Before you can set up the SafeNet Luna SA client software on a BIG-IP
system, you must obtain a valid Gemalto SafeNet Luna SA client license.
To
use the Luna SA HSM, you need to obtain the software tarball from Gemalto SafeNet, and
install the Luna SA client software onto the BIG-IP system.
- Log in to the Gemalto (SafeNet) support portal.
- Download the appropriate document, using the download passwordF5Clientdownload!.For supported SafeNet client and HSM versions with BIG-IP TMOS versions information, see the Interoperability Matrix for BIG-IP TMOS with SafeNet Clients and HSM supplemental document available on AskF5.
- Log in to the command-line interface of the BIG-IP system using an account with administrator privileges.
- Create a directory under/sharednamedsafenet_install.mkdir /shared/safenet_install
- Copy the software tarball to/shared/safenet_install
Installing and registering the Luna SA client
You install and register the Luna SA client so that you can use the Luna SA device
with the BIG-IP system. You provide the passwords for your Luna SA
device during the installation process. If you are setting up the Luna SA client on a
VIPRION system, you run the configuration script only on the
primary blade, and then the system propagates the configuration to the additional active
blades.
- Log in to the command-line interface of the system using administrator privileges.
- If you are installing the Luna SA client on a VIPRION system, and you are using the management network to connect to the HSM, disableip checkon the HSM. If you are not installing on a VIPRION system, or you are using a self IP address to communicate with the HSM, skip this step.tls ipcheck disableservice restart ntlsThis step allows the same certificate to be used from multiple IP addresses, identifying multiple blades.
- Install and register the Luna SA client on the BIG-IP system, using the parameters indicated.nethsm-safenet-install.sh
- Parameters for a typical installation or on the primary blade of a VIPRION system.--hsm_ip_addr=<luna_sa_device_IP_address> [--image=<Luna_x.x_Client_Software.tar>]The following example sets up the version 6.2 client where the Luna SA device has an IP address of172.27.13.59:nethsm-safenet-install.sh --hsm_ip_addr=172.27.13.59 --image=Luna_6.2_Client_Software.tar --hsm_partition_name="par0"The VIPRION system propagates the configuration to additional active blades, but you need to reload the PATH environment variable on any blades with already-open sessions:source ~/.bash_profile
- Parameters when multiple HSMs are configured as an HA group.--hsm_ip_addr="<SafeNet HSM1_IP_address> <SafeNet HSM2_IP_address>" --hsm_ha_group=<Label name for the SafeNet HSM HA group>] [--image=<Luna_x.x_Client_Software.tar>]The following example sets up the version 6.2 client for an HA group namedluna_ha_testwhere the Luna SA devices in the group have IP addresses of10.10.10.100and10.10.10.101:nethsm-safenet-install.sh --hsm_ip_addr="10.10.10.100 10.10.10.101" --hsm_ha_group=luna_ha_test --image=Luna_6.2_Client_Software.tar
Install all components when prompted. During the installation, you will register your client IP address with the SafeNet device and assign the Luna SA client to a previously defined HSM partition. For an HA configuration, this must be the first slot.By default, the script sets up the SafeNet Luna SA client software to use 20 threads. To adjust this number, run this command before you restart thepkcs11dservice:tmsh sys crypto fips external-hsm num-threads <. Changing the number of threads affects performance.integer>
Setting up the Luna SA client on a newly added or activated blade
After you set up the Luna SA client on the primary blade of a VIPRION system, the system propagates the configuration to the additional
active blades. If you subsequently add a secondary blade, activate a disabled blade, or
power-on a powered-off blade, you need to run a script on the new secondary
blade.
- Log in to the command-line interface of the system using an account with administrator privileges.
- Run this script on any new or re-activated secondary blade:safenet-sync.sh <HSM partition password> -v
- If you make the new blade a primary blade before running the synchronization script, you need to run the regular client installation and registration procedure on the new primary blade only.nethsm-safenet-install.sh
Generating a key/certificate using tmsh
You can use the Traffic Management Shell (
tmsh
) to generate a
key and certificate.- Log in to the command-line interface of the system using an account with administrator privileges.
- Open the TMOS Shell (tmsh).tmsh
- Generate the key.create sys crypto key<key_name>gen-certificate common-name<cert_name>security-type nethsmThis example generates an external HSM key namedtest_keyand a certificate namedtest_safenet.comwith the security type ofnethsm:create sys crypto key test_key gen-certificate common-name test_safenet.com security-type nethsm
- Verify that the key was created.list sys crypto key test_key.keyInformation about the key displays:sys crypto key test_key.key { key-id <32-digit string> key-size 2048 key-type rsa-private security-type nethsm }
When you generate a key/certificate
using
tmsh
, the system
creates a HSM private key. It also creates a local key, which points to the HSM key,
residing in the HSM.Creating a self-signed digital certificate
If you are configuring the BIG-IP system to manage client-side HTTP traffic, you perform this
task to create a self-signed certificate to authenticate and secure the client-side HTTP
traffic. If you are also configuring the system to manage server-side HTTP traffic, you
must repeat this task to create a second self-signed certificate to authenticate and
secure the server-side HTTP traffic.
- On the Main tab, click.The Traffic Certificate Management screen opens.
- ClickCreate.
- In theNamefield, type a unique name for the SSL certificate.
- From theIssuerlist, selectSelf.
- In theCommon Namefield, type a name.This is typically the name of a web site, such aswww.siterequest.com.
- In theDivisionfield, type your department name.
- In theOrganizationfield, type your company name.
- In theLocalityfield, type your city name.
- In the orState or Provincefield, type your state or province name.
- From theCountrylist, select the name of your country.
- In theE-mail Addressfield, type your email address.
- In theLifetimefield, type a number of days, or retain the default,365.
- In theSubject Alternative Namefield, type a name.This name is embedded in the certificate for X509 extension purposes.By assigning this name, you can protect multiple host names with a single SSL certificate.
- From theSecurity Typelist, selectNetHSM.
- From theKey Typelist,RSAis selected as the default key type.
- From theSizelist, select a size, in bits.
- ClickFinished.
Requesting a certificate from a certificate authority
You perform this task to generate a certificate signing request (CSR) that can then be submitted to a third-party trusted certificate authority (CA).
F5 Networks recommends that you consult the CA to determine the specific information required for each step in this task.
- On the Main tab, click.The Traffic Certificate Management screen opens.
- ClickCreate.
- In theNamefield, type a unique name for the SSL certificate.
- From theIssuerlist, selectCertificate Authority.
- In theCommon Namefield, type a name.This is typically the name of a web site, such aswww.siterequest.com.
- In theDivisionfield, type your department name.
- In theOrganizationfield, type your company name.
- In theLocalityfield, type your city name.
- In the orState or Provincefield, type your state or province name.
- From theCountrylist, select the name of your country.
- In theE-mail Addressfield, type your email address.
- In theLifetimefield, type a number of days, or retain the default,365.
- In theSubject Alternative Namefield, type a name.This name is embedded in the certificate for X509 extension purposes.By assigning this name, you can protect multiple host names with a single SSL certificate.
- In theChallenge Passwordfield, type a password.
- In theConfirm Passwordfield, re-type the password you typed in theChallenge Passwordfield.
- From theSecurity Typelist, selectNetHSM.
- From theKey Typelist,RSAis selected as the default key type.
- From theSizelist, select a size, in bits.
- ClickFinished.The Certificate Signing Request screen displays.
- Do one of the following to download the request into a file on your system.
- In theRequest Textfield, copy the certificate.
- ForRequest File, click the button.
- Follow the instructions on the relevant certificate authority web site for either pasting the copied request or attaching the generated request file.
- ClickFinished.The Certificate Signing Request screen displays.
The generated certificate signing request is submitted to a trusted certificate
authority for signature.
Deleting a key from the BIG-IP
You perform this task to delete an
existing key from the BIG-IP.
- On the Main tab, click.The Traffic Certificate Management screen opens.
- From theSSL Certificate List, select the check box next to the key you wish to delete.
- ClickDelete.
The key you selected is deleted from
BIG-IP.
The key stored in NetHSM is
not deleted.
Creating a client
SSL profile to use an external HSM key and certificate
After you have added the external HSM key and
certificate to the BIG-IP system configuration, you can use the key and certificate as
part of a client SSL profile. This task describes using the browser interface.
Alternatively, you can use the Traffic Management Shell (
tmsh
) command-line utility.- On the Main tab, click.The Client screen opens.
- ClickCreate.The New Client SSL Profile screen opens.
- In theNamefield, type a name for the profile.
- From theParent Profilelist, selectclientssl.
- From theConfigurationlist, selectAdvanced.This selection makes it possible for you to modify additional default settings.
- For the Configuration area, select theCustomcheck box.The settings in the Configuration area become available for modification.
- Using theCertificate Key Chainsetting, specify one or more certificate key chains:
- From theCertificatelist, select the name of a certificate that you imported.
- From theKeylist, select the name of the key that you imported.
- From theChainlist, select the chain that you want to include in the certificate key chain.
- ClickAdd.
- ClickFinished.
After you have created the client SSL profile, you
must assign the profile to a virtual server, so that the virtual server can process SSL
traffic according to the specified profile settings.
Importing a pre-existing NetHSM key to the BIG-IP
- On the Main tab, click.The SSL Certificate/Key Source page opens.
- WithinImport Type, selectKey.The key name should be the same as the NetHSM key label.
- WithinKey Name, selectOverwrite Existingand from the drop-down menu, select the key you would like to overwrite.
- Within Key Source, selectFrom NetHSM.For this option to be available, the system must have External HSM licensed, and either SafeNet/nShield External HSM configured.
- ClickImport.
You can also import an existing key by using tmsh commands
tmsh install sys
crypto key nethsm_key_label from-nethsm security-type
or tmsh
install sys crypto key nethsm_key_label from-nethsm
. Use the NetHSM key label as the key name. For example:root@(hostname)(Standalone)(Active)(/Common)(tmos)# install sys crypto key nethsm_key_label (tab) Options: from-editor from-nethsm Properties: from-local-file from-url root@(ssl8519)(cfg-sync Standalone)(Active)(/Common)(tmos)# install sys crypto key nethsm_key_label from-nethsm security-type nethsm