Install Red Hat Certificate System and deploy the subsystem
Step-by-step guide for installing RHCS, configuring SELinux, deploying a CA subsystem, and importing certificates.
This tutorial walks system administrators through installing Red Hat Certificate System (RHCS), configuring SELinux for HSM integration, preparing a pkispawn override file, deploying a CA subsystem, and importing the administrator certificate. It also includes browser configuration for access.
Perform the following steps to install Red Hat Certificate System and prerequisites:
1
RHCS requires Red Hat Directory Server (RHDS), which serves as an internal repository for certificate requests, certificates, and so on. Enable the RHCS and RHDS repositories with the following command:
The pkispawn command line tool installs and configures a new PKI instance. It eliminates the need for separate installation and configuration steps, and you can run it 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.
The Red Hat recommended procedure for spawning a subsystem that uses an HSM is to create 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 RHCS subsystems (CA, KRA, OCSP, TKS, TPS) to use the HSM, but this integration guide focuses on the Certificate Authority (CA) for brevity.
Create an override configuration file to specify HSM parameters for the CA subsystem:
1
Create the override file:
sudo vi default\_futurex.txt
Populate the file with the following template. Set the pki_instance_name, pki_token_password, and pki_security_domain_name values to your specific values. Keep all other values unchanged.
You must define the password of the identity you created on the Vectera Plus in the pkitokenpassword parameter.
Text
[DEFAULT]pki_instance_name=<instance_name>pki_http_port=8080pki_https_port=8443# Admin & client credentialspki_admin_email=caadmin@example.compki_admin_name=caadmin# Security Domain (first CA or joining an existing one)pki_security_domain_name=<security_domain_name>pki_security_domain_https_port=8443# 389-DSpki_ds_url=ldap://127.0.0.1:389pki_ds_database=userrootpki_ds_bind_dn=cn=Directory Manager# --- HSM (PKCS#11) ---pki_hsm_enable=Truepki_hsm_libfile=/usr/lib64/fxpkcs11/libfxpkcs11.sopki_hsm_modulename=FxPKCS11pki_token_name=Futurexpki_token_password=<hsm_user_pin>[CA]pki_audit_signing_token=Futurexpki_ca_signing_token=Futurexpki_ocsp_signing_token=Futurexpki_sslserver_token=Futurexpki_subsystem_token=Futurex
Perform the following steps to run the pkispawn utility:
1
Deploy the CA subsystem with the Vectera Plus using your override configuration:
sudo pkispawn -s CA -f default\_futurex.txt --debug
If the deployment succeeds, an installation summary similar to the following displays 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\://localhost.localdomain:8443/ca PKI instances will be enabled upon system boot \=============================================================
When submitting Certificate Signing Requests (CSRs) in RHCS, the Common Name and UID fields are both required. If you submit a request with only the Common Name field, the request fails, and you receive an error stating that the Subject Name does not match.