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 {{vectera}} 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 1 | install the dogtag packages install the dogtag packages by using the following command sudo dnf install pki ca pki kra 389 ds base 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 run the following command to log in as the root user sudo su 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 vim /etc/hosts127 0 0 1 pki example com \ 1 pki example com run the following command to update the hostname in /etc/hostname hostnamectl set hostname pki example com create a directory for storing the 389 directory server configuration file mkdir p /etc/389 ds create a configuration file in the new directory with the \[general] and \[slapd] sections configured as follows vim /etc/389 ds/setup inf\[general] fullmachinename= pki example com suitespotuserid= nobody suitespotgroup= nobody \[slapd] serverport= 389 serveridentifier= pki tomcat suffix= dc=example,dc=com rootdn= cn=directory manager rootdnpwd= password run the directory server installation script, selecting the defaults or customizing as needed setup ds pl silent file=/etc/389 ds/setup inf 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 create the override configuration file for the ca subsystem sudo vim ca cfg 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 \[default] \########################## \# provide hsm parameters # \########################## pki hsm enable=true pki hsm libfile=\<path to fxpkcs11 libfile> pki hsm modulename=fxpkcs11 pki token name=futurex pki token password=\<hsm identity password> \######################################## \# provide pki specific hsm token names # \######################################## pki audit signing token=futurex pki ssl server token=futurex pki subsystem token=futurex \################################## \# provide pki specific passwords # \################################## pki admin password=\<pki admin password> pki client pkcs12 password=\<pki client pkcs12 password> pki ds password=\<pki ds password> \##################################### \# provide non ca specific passwords # \##################################### pki client database password=\<pki client database password> \[ca] \####################################### \# provide ca specific hsm token names # \####################################### pki ca signing token=futurex pki ocsp signing token=futurex after you finish, save the file run the pkispawn utility in a terminal, run the following command to deploy a ca subsystem by using the {{vectera}} 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 sudo pkispawn f ca cfg s ca vvv 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 ========================================================================== installation summary \========================================================================== administrator's username caadmin administrator's pkcs #12 file /root/ dogtag/pki tomcat/ca admin cert p12 to check the status of the subsystem systemctl status pki tomcatd\@pki tomcat service to restart the subsystem systemctl restart pki tomcatd\@pki tomcat service the url for the subsystem is https //pki example com 8443/ca pki instances will be enabled upon system boot \========================================================================== 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 sudo pkidestroy s ca i pki tomcat 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 {{futurex}} 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 /pkcs11manager this displays the following main menu main menu 1\ print library/token info 2\ login 3\ logout 4\ generate key 5\ find objects 6\ modify objects 7\ delete objects 8\ generate random data 9\ sign data 10\ verify data 11\ wrap key 12\ unwrap key 13\ import public key 0\ exit 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 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 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 new ca subsystem in the browser 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 {{futurex}} {{vectera}} hsm an application partition on the {{vectera}} secures all ca subsystem keys and makes them available to dogtag certificate system as needed