Applies To:

Show Versions Show Versions

Manual Chapter: Setting Up the SafeNet Luna HSM with BIG-IP Systems
Manual Chapter
Table of Contents   |   << Previous Chapter   |   Next Chapter >>

Overview: Setting up the SafeNet Luna SA HSM with BIG-IP systems, using a script

The 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.

Note: The BIG-IP system does not support the SafeNet Luna SA HSM in Appliance mode.

Only RSA-based 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.

Note: This implementation describes the steps for using an installation script. If the installation script does not support your network configuration, refer to the procedure for manual setup.

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 SafeNet Technical Support (http://www.safenet-inc.com/technical-support/).

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 (Version 5.1 or 5.2). For VIPRION® system support or configuring multiple HSMs as an HA group, you must use Version 5.2.
  • The Luna SA Customer Documentation
Note: 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.

Task summary

The implementation process involves preparation of the SafeNet device and the BIG-IP® system, followed by key/certificate management and creation of a client SSL profile to use the key and certificate. You can generate SafeNet HSM protected keys and corresponding CSR and certificate using either tmsh (recommended) or the fipskey.nethsm utility.

Task list

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 SafeNet Luna SA client license.

To use the Luna SA HSM, you need to obtain the software tarball from SafeNet, and install the Luna SA client software onto the BIG-IP system.
  1. Log in to the SafeNet Support portal.
    https://serviceportal.safenet-inc.com
  2. Download the appropriate document, using the download password F5Clientdownload!.
    • LunaSA Client v5.1 for F5, Document Id:DOW3519
    • LunaSA Client v5.2.1-6 for F5, Document Id:DOW3520
    Note: For supporting the VIPRION® system or configuring multiple HSMs in an HA group, you must use version 5.2.x with this release.
  3. Log in to the command-line interface of the BIG-IP system using an account with administrator privileges.
  4. Create a directory under /shared named safenet_install.
    mkdir /shared/safenet_install
  5. 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.
  1. Log in to the command-line interface of the system using administrator privileges.
  2. If you are installing the Luna SA client on a VIPRION system, and you are using the management network to connect to the HSM, disable ip check on 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 disable
    service restart ntls
    This step allows the same certificate to be used from multiple IP addresses, identifying multiple blades.
  3. 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 5.2 client where the Luna SA device has an IP address of 172.27.13.59:

      nethsm-safenet-install.sh --hsm_ip_addr=172.27.13.59 --image=Luna_5.2_Client_Software.tar
      Note: 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 5.2 client for an HA group named luna_ha_test where the Luna SA devices in the group have IP addresses of 10.10.10.100 and 10.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_5.2_Client_Software.tar
    Install all components when prompted. During the installation, you register your client IP address with the SafeNet device and assign the Luna SA client to one previously-defined HSM partition. The BIG-IP system supports using keys only within the first HSM partition/slot assigned to the Luna SA client. Note that HSM partitions are not the same as BIG-IP partitions.
    Note: 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 the pkcs11d service: tmsh sys crypto fips external-hsm num-threads <integer>. Changing the number of threads affects performance.

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.
  1. Log in to the command-line interface of the system using an account with administrator privileges.
  2. Run this script on any new or re-activated secondary blade:
    safenet-sync.sh -p <HSM partition password>
  3. 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.
  1. Log in to the command-line interface of the system using an account with administrator privileges.
  2. Open the Traffic Management Shell (tmsh).
    tmsh
  3. Generate the key.
    create sys crypto key <key_name> gen-certificate common-name <cert_name> security-type nethsm

    This example generates an external HSM key named test_key and a certificate named test_safenet.com with the security type of nethsm:

    create sys crypto key test_key gen-certificate common-name test_safenet.com security-type nethsm
  4. Verify that the key was created.
    list sys crypto key siterequest.key
    Information about the key displays:
                                  
    sys crypto key siterequest.key {
    key-size 2048
    key-type rsa-private
    security-type nethsm
    }
                               
    
When you generate a key/certificate using tmsh, the system also creates a local key, which points to the HSM key, residing in the HSM.

Generating a key/certificate using the fipskey.nethsm utility

Before you generate a key/certificate, make sure that the SafeNet Luna SA client is running on the BIG-IP® system.
You can use the fipskey.nethsm utility to generate private keys and self-signed certificates on the BIG-IP system.
  1. Display the available options.
    fipskey.nethsm --help
  2. Generate the key, using any options you need.
    fipskey.nethsm --genkey -o <output_file>
    This example generates the three files that follow:
    fipskey.nethsm --genkey -o siterequest
    • /config/ssl/ssl.key/siterequest.key
    • /config/ssl/ssl.csr/siterequest.csr
    • /config/ssl/ssl.crt/siterequest.crt
    The key is saved in /config/ssl/ssl.key/<output_file>.key. The certificate request is saved in /config/ssl/ssl.csr/<output_file>.csr. The self-signed certificate is saved in /config/ssl/ssl.crt/<output_file>.crt.
After you generate keys and certificates, you need to add the local key to the BIG-IP configuration using tmsh. The local key points to the HSM key, which resides in the HSM.

Adding the SafeNet local key to the BIG-IP system configuration

You can use the Traffic Management Shell (tmsh) to add the SafeNet local key, which was created on the BIG-IP® system when you generated a key/certificate using the fipskey.nethsm utility. The local key points to the HSM key.
  1. Log in to the command-line interface of the system using an account with administrator privileges.
  2. Open the Traffic Management Shell (tmsh).
    tmsh
  3. Add the key.
    install sys crypto key key_object_name>< from-local-file <keyname>
    This example adds a local key named my_key.key from a local key file stored in the /config/ssl/ssl.key/ directory: install sys crypto key my_key.key from-local-file /config/ssl/ssl.key/my_key.key

Adding certificates using tmsh

You can use the Traffic Management Shell (tmsh) to add existing certificates to the BIG-IP® system configuration.
  1. Log in to the command-line interface of the system using an account with administrator privileges.
  2. Open the Traffic Management Shell (tmsh).
    tmsh
  3. Add the certificate.
    install sys crypto cert <cert_object_name> from-local-file <path_to_cert_file>

    This example loads the certificate named my_key.crt from a local certificate file stored in the /config/ssl/ssl.crt/ directory:

    install sys crypto cert my_key.crt from-local-file /config/ssl/ssl.crt/my_key.crt

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.
  1. On the Main tab, click Local Traffic > Profiles > SSL > Client .
    The Client screen opens.
  2. Click Create.
    The New Client SSL Profile screen opens.
  3. In the Name field, type a name for the profile.
  4. From the Parent Profile list, select clientssl.
  5. From the Configuration list, select Advanced.
    This selection makes it possible for you to modify additional default settings.
  6. For the Configuration area, select the Custom check box.
    The settings in the Configuration area become available for modification.
  7. Using the Certificate Key Chain setting, specify one or more certificate key chains:
    1. From the Certificate list, select the name of a certificate that you imported.
    2. From the Key list, select the name of the key that you imported.
    3. From the Chain list, select the chain that you want to include in the certificate key chain.
    4. Click Add.
  8. Click Finished.
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.
Table of Contents   |   << Previous Chapter   |   Next Chapter >>

Was this resource helpful in solving your issue?




NOTE: Please do not provide personal information.



Incorrect answer. Please try again: Please enter the words to the right: Please enter the numbers you hear:

Additional Comments (optional)