Questo contenuto non è disponibile nella lingua selezionata.
6.13. Setting Up a New Master Key
This section will describe the procedures and configuration required to set up a new master key in the Token Key Service (TKS). See the Red Hat Certificate System Planning, Installation, and Deployment Guide for background information.
Procedure 6.1. Creating a New Master Key
- Obtain internal the PIN required to access the TKS security databases:
cat /var/lib/pki/pki-tomcat/tks/conf/password.conf internal=649713464822 internaldb=secret12 replicationdb=-752230707
# cat /var/lib/pki/pki-tomcat/tks/conf/password.conf internal=649713464822 internaldb=secret12 replicationdb=-752230707
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Open the
alias/
directory of the TKS instance:cd /var/lib/pki/pki-tomcat/alias
# cd /var/lib/pki/pki-tomcat/alias
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Generate a new master key using the
tkstool
utility. For example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Verify that the keys have been properly added to the database:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
6.13.1. Generating and Transporting Wrapped Master Keys (Key Ceremony) Copia collegamentoCollegamento copiato negli appunti!
Copia collegamentoCollegamento copiato negli appunti!
If a master key is going to be used on an external token or in multiple locations, then it must be wrapped so that it can be safely transported to the hardware tokens. The
tkstool
utility can be used to generate transport keys, which are then used to send the master key to the facility where the tokens are generated. The process of transferring wrapped master keys is commonly called a Key Ceremony.
Note
Transport keys can only be used with the master key they were generated with.
Procedure 6.2. Generating and Transporting Wrapped Master Keys
- Obtain the internal PIN required to access the Token Key Service security databases:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Open the TKS instance
alias/
directory:cd /var/lib/pki/pki-tomcat/alias
# cd /var/lib/pki/pki-tomcat/alias
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Create a transport key named
transport
:tkstool -T -d . -n transport
# tkstool -T -d . -n transport
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note
Thetkstool
utility prints out the key shares and KCV values for each of the three session keys generated. Save them to a file as they are necessary to regenerate the transport key in new databases later in this procedure, and to regenerate the key if lost. - When prompted, fill in the database password. Then, follow on-screen instructions to generate a random seed.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - The next prompt will generate a series of session keys. Follow on-screen instructions until the final message:
Successfully generated, stored, and named the transport key!
Successfully generated, stored, and named the transport key!
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Use the transport key to generate and wrap a master key and store it in a file named
file
:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Copy the wrapped master key over to the appropriate locations or facility.
- If necessary, generate new security databases on the HSM or at the facility:
tkstool -N -d <directory>
# tkstool -N -d <directory>tkstool -N -d <directory>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Alternatively, add the-I
option to produce a key identical to the one generated originally in a the new database. Regenerating the transport key in this way requires that you input the session key share and KCV for each of the session keys generated earlier in this procedure.tkstool -I -d <directory> -n verify_transport
# tkstool -I -d <directory> -n verify_transporttkstool -I -d <directory> -n verify_transporttkstool -I -d <directory> -n verify_transport
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Use the transport key to unwrap the master key stored in the file. Provide the security database PIN when prompted:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Verify that the keys have been added to the database properly:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow