Certificate Authority
Dogtag Certificate System

Install Dogtag Certificate System and deploy the subsystem

10min

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:

  1. Install the Dogtag packages.
    1. Create the directory server instance for the Dogtag Internal DB.
    2. Run the pkispawn script to create and configure a subsystem instance.
  2. View the keys and certificates that Dogtag created on the HSM.
  3. Import the CA Administrator PKCS #12 file into the browser.
    1. Access the new CA subsystem in the browser.

1 | Install the Dogtag packages

1

Install the Dogtag packages by using the following command:

Shell


Create the directory server instance for the Dogtag Internal DB

The Dogtag CA and KRA subsystems use a 389 Directory Server as an internal database. To configure one, perform the following steps:

1

Run the following command to log in as the root user:

Shell

2

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.

Shell

Text

3

Run the following command to update the hostname in /etc/hostname.

Shell

4

Create a directory for storing the 389 Directory Server configuration file:

Shell

5

Create a configuration file in the new directory with the [General] and [slapd] sections configured as follows:

Shell

Text

6

Run the directory server installation script, selecting the defaults or customizing as needed:

Shell


Run the pkispawn script to create and configure a subsystem instance

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.

Prepare an override configuration file with the required HSM parameters

1

Create the override configuration file for the CA subsystem.

Shell


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.

Text

2

After you finish, save the file.

Run the pkispawn utility

1

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.

Shell


If you see a warning about manually adding a module while p11-kit is enabled, disregard this warning and press [ Enter ] to continue.

2

If the deployment is successful, an installation summary similar to the following will be presented after the command completes:

Shell


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.

Shell


2 | View the keys and certificates that Dogtag created on the HSM

To view the keys and certificates that Dogtag created on the HSM, use the PKCS11Manager utility packaged with the PKCS #11 module.

1

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:

Shell


This displays the following main menu:

Text

2

Type 2 to log in, and select the Enter key.

3

Type 1, and select the Enter key.

4

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.

5

Type 5 to find objects, and select the Enter key.

6

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.

3 | Import the CA Administrator PKCS #12 file into the browser

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.

1

In Firefox, go to Preferences > Privacy & Security > Certificates and select View Certificates.

2

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 new CA subsystem in the browser

1

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.