Install and configure the Entrust nShield HSM
Prerequisites:
-
A Windows Server with Microsoft SQL server.
-
SQL Server Management Studio installed.
-
The database
TestDatabase
has been created and is available for the integration.
Install the Entrust nShield HSM
Install the nShield Connect HSM locally, remotely, or remotely via the serial console. Condensed instructions are available in the following Entrust nShield Support articles.
For detailed instructions see the nShield v13.6.8 Hardware Install and Setup. Guides.
Install the Security World software and create a Security World
-
Install the Security World software. For detailed instructions see the nShield Security World Software v13.6.8 Installation Guide.
-
Add the Security World utilities path to the system path. This path is typically
C:\Program Files\nCipher\nfast\bin
. -
Open the firewall port 9004 for the HSM connections.
-
If using remote administration, open firewall port 9005 for the Entrust nShield Trusted Verification Device (TVD).
-
Open a command window and run the following to confirm that the HSM is operational:
>enquiry Server: enquiry reply flags none enquiry reply level Six serial number 8FE1-B519-C5AA mode operational ... Module #1: enquiry reply flags UnprivOnly enquiry reply level Six serial number 8FE1-B519-C5AA mode operational ...
-
Create your Security World if one does not already exist or copy an existing one. Follow your organization’s security policy for this. For more information see Create a new Security World.
ACS cards cannot be duplicated after the Security World is created. You may want to create extras in case of a card failure or a lost card. -
Confirm that the Security World is "Usable*:
> nfkminfo World generation 2 state 0x37270008 Initialised Usable ... ... Module #1 generation 2 state 0x2 Usable ...
Install the nShield nDSOP
To install the nShield nDSOP:
-
Mount the
nDSOP_Windows-x.x.x.iso
file. -
Double-click the
setup
file and follow the instructions.
Select the protection method
The OCS or Softcard and associated passphrase will be used to authorize access to specific keys protected by the SQLEKM provider.
-
Operator Cards Set (OCS) are smartcards that are presented to the physical smartcard reader of an HSM. For more information on OCS use, properties, and K-of-N values, see Operator Card Sets (OCS).
-
Softcards are logical tokens (passphrases) that protect they key and authorize its use. For more information on Softcards use see Softcards.
Follow your organization’s security policy to select an authorization access method.
Create the Operator Card Set (OCS) or Softcard
Typically, an organization’s security policies dictate the use of one or the other.
Create the OCS
A SQL Server credential (as used for EKM) maps one protecting token to one stored passphrase. It can store information for only one token at a time. Therefore an OCS card set does need to have a quorum K of one.
Recovering from a power failure requires the OCS to be inserted in the HSM or the TVD.
-
Edit file
C:\ProgramData\nCipher\Key Management Data\config\cardlist
to add the serial number of the card(s) to be presented or the wildcard value. -
Open a command window as administrator.
-
Run the
createocs
utility as described below. Enter a passphrase or password at the prompt. Use the same passphrase for all the OCS cards in the set (one for each person with access privilege, plus the spares). In this example note that slot 2, remote via a TVD, is used to present the card.After an OCS card set has been created, the cards cannot be duplicated. You may want to create extras in case of a card failure or a lost card. Add the -p (persistent) option to the command below to be able to encrypt/decrypt the database after the OCS card has been removed for safe storage from either the HSM front panel slot or from the TVD. See the Preload Utility for more information. > createocs -m1 -s2 -N testOCS -Q 1/1 FIPS 140-2 level 3 auth obtained. Creating Cardset: Module 1: 0 cards of 1 written Module 1 slot 0: Admin Card #1 Module 1 slot 2: blank card Module 1 slot 3: empty Module 1 slot 2:- passphrase specified - writing card Card writing complete. cardset created; hkltu = edb3d45a28e5a6b22b033684ce589d9e198272c2
The authentication provided by the OCS as shown in the command line above is non-persistent and only available while the OCS card is inserted in the HSM front panel slot or the TVD. If the TVD loses connection to the Remote Administration client the database will be inaccessible.
-
Verify the OCS created:
> nfkminfo -c Cardset list - 1 cardsets: (P)ersistent/(N)ot, (R)emoteable/(L)ocal-only Operator logical token hash k/n timeout name edb3d45a28e5a6b22b033684ce589d9e198272c2 1/1 none-NL testOCS
Create the Softcard
A SQL Server credential (as used for EKM) maps one protecting token to one stored passphrase. Softcards are singular and do not have a quorum, so the SQL Server credential matches them quite well.
Unlike OCS protection, which requires a smart card and a passcode, a softcard does not require additional input for recovery after a power failure.
-
Ensure the
C:\Program Files\nCipher\nfast\cknfastrc
file exists with the following content. Otherwise, create it.> type "C:\Program Files\nCipher\nfast\cknfastrc" CKNFAST_LOADSHARING=1
-
Execute the following command. Enter a passphrase at the prompt.
> ppmk -n testSC Enter new pass phrase: Enter new pass phrase again: New softcard created: HKLTU 925f67e72ea3c354cae4e6797bde3753d24e7744
-
Verify the Softcard created:
> nfkminfo -s SoftCard summary - 1 softcards: Operator logical token hash name 925f67e72ea3c354cae4e6797bde3753d24e7744 testSC
The
rocs
utility shows the OCS and Softcard created:> rocs `rocs' key recovery tool Useful commands: `help', `help intro', `quit'. rocs> list cardset No. Name Keys (recov) Sharing 1 testOCS 0 (0) 1 of 5 2 testSC 0 (0) (softcard) rocs> quit