Install Dogtag Certificate System and deploy the subsystem
This section describes the installation of Dogtag Certificate System on Fedora Linux 28. It demonstrates installing a CA subsystem by using a self-signed CA signing certificate, with the certificates and their corresponding keys securely stored on the HSM.
The following sections cover these tasks:
- Install the Dogtag packages.
- Create the directory server instance for the Dogtag Internal DB.
- Run the pkispawn script to create and configure a subsystem instance.
- View the keys and certificates that Dogtag created on the HSM.
- Import the CA Administrator PKCS #12 file into the browser.
- Access the new CA subsystem in the browser.
Install the Dogtag packages by using the following command:
The Dogtag CA and KRA subsystems use a 389 Directory Server as an internal database. To configure one, perform the following steps:
Run the following command to log in as the root user:
Set a fully qualified domain name (FQDN) as the hostname for your Fedora 28 system. First, edit the /etc/hosts file as follows:
You can set any valid FQDN. It does not need to be set to pki.example.com.
Run the following command to update the hostname in /etc/hostname.
Create a directory for storing the 389 Directory Server configuration file:
Create a configuration file in the new directory with the [General] and [slapd] sections configured as follows:
Run the directory server installation script, selecting the defaults or customizing as needed:
You can use the pkispawn command line tool to install and configure a new PKI instance. It eliminates the need for separate installation and configuration steps, and you can run it either interactively, as a batch process, or as a combination of both (batch process with prompts for passwords). Refer to the pkispawn man page for detailed information about all supported options by running man pkispawn.
The pkispawn command reads in its default installation and configuration values from a plain text configuration file (/etc/pki/default.cfg). This file consists of name=value pairs divided into [DEFAULT], [Tomcat], [CA], [KRA], [OCSP], [TKS], and [TPS] sections.
We strongly recommend that you read the full documentation to understand the purpose of every parameter in the /etc/pki/default.cfg file. This enables you to customize your PKI environment to your specific needs.
Dogtag recommends spawning a subsystem that uses an HSM by creating an override configuration file that contains only the parameters necessary for using the HSM as its token. Any parameter settings in this file override the parameter settings in the default.cfg file.
You can spawn any of the various Dogtag PKI subsystems (CA, KRA, OCSP, TKS, TPS) to use the HSM, but this integration guide focuses solely on the Certificate Authority (CA) for brevity.
Create the override configuration file for the CA subsystem.
You can use the following example override file for spawning a CA subsystem with the HSM:
You should set all values within angle brackets to specific values for your system. Set all other values exactly as shown.
The pki_ds_password value must match the password set for the directory manager when you installed 389 Directory Server.
After you finish, save the file.
In a terminal, run the following command to deploy a CA subsystem by using the HSM:
You need the full path to the ca.cfg file if you are not running the command from the directory where you saved the ca.cfg.
If you see a warning about manually adding a module while p11-kit is enabled, disregard this warning and press [ Enter ] to continue.
If the deployment is successful, an installation summary similar to the following will be presented after the command completes:
If the pkispawn command fails, run the following command to delete the subsystem instance that was only partially created before re-attempting to run pkispawn.
To view the keys and certificates that Dogtag created on the HSM, use the PKCS11Manager utility packaged with the PKCS #11 module.
In a terminal, go to the directory where the FXPKCS11 module is installed (such as /usr/local/bin/fxpkcs11) and run PKCS11Manager by using the following command:
This displays the following main menu:
Type 2 to log in, and select the Enter key.
Type 1, and select the Enter key.
Type the password of the identity defined in the FXPKCS11 configuration file, and select the Enter key.
If successful, you receive confirmation that you are logged in.
Type 5 to find objects, and select the Enter key.
Type 1 to find all objects, and select the Enter key.
Information displays for all keys and certificates that the connecting identity can access.
Dogtag PKI creates 15 objects on the HSM for a CA subsystem deployment.
The following example assumes you use a Firefox web browser. There might be some differences in the steps when using a different browser, but the overall process is the same.
In Firefox, go to Preferences > Privacy & Security > Certificates and select View Certificates.
Under the Your Certificates tab, select Import to import the CA Administrator PKCS #12 file (ca_ admin_cert.p12). When it prompts for a password, enter the value that you configured for the pki_client_pkcs12_password define in the ca.cfg file in the Prepare an override configuration file with required HSM parameters section of this guide.
You can find the location of the ca_admin_cert.p12 file in the installation summary for the CA subsystem deployment.
Access the Dogtag Certificate System subsystem console by going to the following URL:
https://<fully qualified domain name>:8443/pki/ui/
When submitting Certificate Signing Requests (CSRs) in Dogtag Certificate System, you must specify both the Common Name and UID fields. If you submit a request with only the Common Name field completed, the request fails, and you get an error stating that the Subject Name does not match.
This completes the Dogtag Certificate System integration with the HSM. An application partition on the secures all CA subsystem keys and makes them available to Dogtag Certificate System as needed.