Setting up a CA hierarchy with intermediate CAs involves creating a root Certificate Authority and then one or more intermediate CAs that derive their authority from the root. Here's how to approach this:
Planning the CA Hierarchy
Start by designing your PKI structure. A typical setup has a root CA (kept offline for security) and one or more intermediate CAs that handle day-to-day certificate issuance. The root CA only signs intermediate CA certificates, while intermediate CAs sign end-entity certificates.
Root CA Setup
Create the root CA first, preferably on an air-gapped system. Generate a strong private key (at least 4096-bit RSA or equivalent ECC), create a self-signed root certificate with a long validity period (10-20 years), and establish the certificate policy and practices. Tools like OpenSSL, Microsoft Certificate Services, or specialized PKI software can handle this.
Configure the root CA with appropriate extensions including Basic Constraints (CA:TRUE), Key Usage (Certificate Sign, CRL Sign), and Subject Key Identifier. Set up a Certificate Revocation List (CRL) distribution point and consider OCSP responder locations.
Intermediate CA Configuration
For each intermediate CA, generate a certificate signing request (CSR) and have it signed by the root CA. The intermediate certificate should have Basic Constraints with CA:TRUE and a path length constraint if you want to limit further sub-CAs. Set shorter validity periods than the root (typically 5-10 years).
Install the intermediate CA on systems that will handle regular certificate operations. These can remain online and accessible to your certificate management infrastructure.
Implementation Considerations
Choose your platform based on your environment. Windows environments often use Active Directory Certificate Services, while Linux environments might use OpenSSL with custom scripts or solutions like EJBCA or FreeIPA. Cloud providers also offer managed PKI services.
Implement proper key management with hardware security modules (HSMs) for production environments. Establish robust backup and recovery procedures for both keys and certificate databases.
Operational Setup
Configure certificate templates or profiles defining what types of certificates each intermediate CA can issue. Set up automated certificate lifecycle management including renewal notifications and revocation processes.
Establish monitoring for certificate expiration, CRL publication, and OCSP responder availability. Document all procedures for certificate issuance, revocation, and emergency response.
The key is keeping your root CA secure and offline while making intermediate CAs accessible enough to serve your organization's certificate needs efficiently.