Multi-CA Design
Designing a Multi-CA Infrastructure¶
In enterprise environments, a single Certificate Authority (CA) often becomes a single point of failure, scalability bottleneck, or risk for mismanagement. A multi-CA infrastructure mitigates these risks by segmenting responsibilities, enforcing granular access controls, and aligning certificate lifecycle policies with organizational needs. This section outlines best practices for structuring a multi-CA PKI, including segmentation strategies, access control mechanisms, and certificate lifetime management.
Segmentation and CA Hierarchy Design¶
A multi-CA architecture should segment CAs based on trust boundaries, use cases, or organizational units (OUs). Common segmentation strategies include:
- Root CA Segmentation
- Maintain a Root CA for critical internal services (e.g., internal APIs, internal DNS) with strict access controls.
-
Example: A dedicated Root CA for internal PKI, never exposed to external networks.
-
Intermediate CA Hierarchy
- Use Intermediate CAs to issue certificates for specific domains or services. For example:
- Internal CA: Issues certificates for internal applications.
External CA: Issues certificates for public-facing services (e.g., HTTPS, SaaS integrations).
- Internal CA: Issues certificates for internal applications.
-
Example: A sub-CA for a specific department (e.g.,
finance-ca) to issue certificates for financial systems. -
Sub-CA for Delegation
- Delegate certificate issuance to sub-CAs for localized management. For instance, a sub-CA for a regional office can issue certificates for local resources without requiring access to the root CA.
Diagram:
graph TD
RootCA --> IntermediateCA1
RootCA --> IntermediateCA2
IntermediateCA1 --> SubCA1
IntermediateCA1 --> SubCA2
IntermediateCA2 --> SubCA3
SubCA1 --> {Certificates for internal apps}
SubCA2 --> {Certificates for public APIs}
SubCA3 --> {Certificates for regional systems}
Access Control and Policy Enforcement¶
A multi-CA infrastructure must enforce strict access control to prevent unauthorized certificate issuance or tampering. Key practices include:
- Role-Based Access Control (RBAC)
-
Restrict CA administrators to specific segments. For example:
internal-ca-admincan only issue certificates for internal services.external-ca-admincan only manage public-facing certificates.
-
Certificate Policy Enforcement
- Define policies for each CA, such as:
- Validity periods (e.g., 1 year for public-facing certs, 5 years for internal certs).
- Allowed key usages (e.g.,
digitalSignature,keyAgreement).
-
Use tools like Keycloak or HashiCorp Vault to enforce policy constraints during certificate issuance.
-
Audit and Monitoring
- Log all CA operations (e.g., certificate issuance, revocation) and monitor for anomalies.
- Example: Use ELK Stack or Prometheus/Grafana to visualize CA activity.
Example Command:
# Enforce a 1-year validity period for certificates issued by the external CA
openssl req -new -key private.key -out request.csr -config <(cat <<EOF
[req]
req_extensions = req_ext
distinguished_name = req_distinguished_name
[req_distinguished_name]
commonName = example.com
[req_ext]
keyUsage = digitalSignature, keyAgreement
extendedKeyUsage = serverAuth, clientAuth
notBefore = 20240101000000Z
notAfter = 20250101000000Z
EOF
)
Certificate Lifetime and Revocation Policies¶
A multi-CA infrastructure must align certificate validity periods and revocation mechanisms with risk profiles. Best practices include:
- Validity Periods
- Shorter lifetimes for high-risk certificates (e.g., 3–6 months for public-facing certs).
- Longer lifetimes for internal certificates (e.g., 1–5 years).
-
Example: Use OCSP stapling to reduce latency for revocation checks.
-
Revocation Mechanisms
- Implement CRLs (Certificate Revocation Lists) and OCSP (Online Certificate Status Protocol) for real-time revocation.
-
Example: Configure an OCSP responder for each CA:
-
Automated Renewal and Revocation
- Use tools like Certbot or ACME clients to automate certificate renewal.
- Integrate with HashiCorp Vault for automatic revocation of compromised certificates.
Key takeaways¶
- Segment CAs by trust boundaries (e.g., internal vs. external) to reduce attack surfaces.
- Enforce RBAC and policy constraints to prevent unauthorized certificate issuance.
- Align validity periods and revocation mechanisms with risk profiles and operational needs.
- Automate renewal and monitoring to ensure compliance and reduce manual overhead.
- Document and audit CA operations to maintain accountability and detect anomalies.