Certificates and PKI
PKI Infrastructure
Read aloud is unavailable in this browser.
The Complete Picture
We've explored X.509 certificates, Certificate Authorities, chains of trust, and revocation mechanisms. Now it's time to see how these pieces combine into Public Key Infrastructure (PKI)—complete systems that enable secure digital communications at scale.
PKI isn't just about individual certificates. It's an ecosystem encompassing:
- Policies that define what certificates can be issued and for what purposes
- Procedures for identity verification, key management, and incident response
- Technology including CAs, directory services, OCSP responders, and key management systems
- Trust relationships between organizations, users, and automated systems
- Governance structures that ensure accountability and compliance
From the web PKI securing billions of HTTPS connections to enterprise PKIs protecting corporate networks to specialized systems in healthcare, finance, and government—PKI implementations vary dramatically based on requirements. This page examines how PKI is deployed across these contexts, providing the complete picture of PKI infrastructure.
By the end of this page, you will understand the complete PKI ecosystem: web PKI architecture and its governance, enterprise PKI design patterns, trust store management, specialized PKI applications, and best practices for deploying and managing PKI in various contexts.
The Web PKI Ecosystem
Web PKI is the PKI that secures HTTPS, the encrypted web. It's the most visible PKI system, used by billions of people daily—typically without awareness of its existence.
Components of Web PKI:
- •Certificate Authorities — Organizations that issue TLS certificates (DigiCert, Let's Encrypt, Sectigo, etc.)
- •Root Programs — Browser/OS vendors that decide which CAs to trust (Mozilla, Microsoft, Apple, Google)
- •CA/Browser Forum — Industry body that sets standards (Baseline Requirements)
- •Certificate Transparency — Public logs of all issued certificates for auditing
- •OCSP Responders — Services providing real-time certificate status
- •Domain Registrars — Issue domain control for validation
- •Trust Stores — Collections of root certificates bundled with browsers/OSes
The Governance Structure:
Web PKI has evolved a complex governance structure:
CA/Browser Forum:
- Industry consortium of CAs and browser vendors
- Creates binding requirements (Baseline Requirements, EV Guidelines)
- Voting members include major CAs and all major browser vendors
- Consensus-driven but browser vendors have ultimate power
Root Programs:
Each major browser/OS maintains its own root program:
- Mozilla Root Store Policy — Open, community-driven, influential despite Firefox's market share
- Microsoft Root Certificate Program — Windows and Edge; significant enterprise influence
- Apple Root Certificate Program — macOS, iOS, Safari; aligned with Mozilla
- Google Chrome Root Program — New, transitioning from OS trust stores
Root programs can and do remove CAs for violations. Symantec's removal from Chrome (2017-2018) affected a third of all TLS certificates—demonstrating the power these programs hold.
Browser vendors have ultimate authority. CAs need browser trust to remain viable businesses. This asymmetry has enabled browsers to push security improvements that CAs might otherwise resist—shorter certificate lifespans, Certificate Transparency requirements, deprecated algorithms—knowing CAs must comply or be distrusted.
Certificate Transparency: Auditing the PKI
Certificate Transparency (CT) is a revolutionary addition to PKI that makes all certificate issuance publicly auditable. Proposed by Google engineers and standardized in RFC 6962, CT fundamentally changes the PKI trust model.
The Problem CT Solves:
Before CT, certificate mis-issuance was essentially invisible:
- CA issues fraudulent certificate for google.com
- Unless Google happened to intercept the certificate in use, they'd never know
- Attacker could use the certificate for targeted MITM attacks
- No audit trail, no accountability
How CT Works:
- •Logging — CA submits certificate (or pre-certificate) to CT logs before or shortly after issuance
- •SCT Issuance — Log returns a Signed Certificate Timestamp (SCT), a cryptographic promise that the certificate is logged
- •Embedding — SCT is embedded in certificate, delivered via TLS extension, or OCSP stapling
- •Verification — Browser verifies SCTs are present and valid; rejects certificates without them
- •Monitoring — Domain owners monitor logs for unauthorized certificates bearing their domains
- •Auditing — Anyone can audit logs for consistency and completeness
123456789101112131415161718192021222324
# Example SCT embedded in a certificateX509v3 extensions: CT Precertificate SCTs: Signed Certificate Timestamp: Version : v1 (0x0) Log ID : E8:3E:D0:DA:...(Google 'Argon2024' log) Timestamp : Jan 15 00:00:01.234 2024 UTC Extensions: none Signature : ecdsa-with-SHA256 30:45:02:20:... Signed Certificate Timestamp: Version : v1 (0x0) Log ID : 48:B0:E3:6B:...(DigiCert Yeti2024 log) Timestamp : Jan 15 00:00:02.567 2024 UTC Extensions: none Signature : ecdsa-with-SHA256 30:46:02:21:... # Chrome requires SCTs from at least two different log operators# This prevents a single compromised log from enabling undetected mis-issuance # View SCTs from a live serverecho | openssl s_client -connect example.com:443 2>/dev/null | \ openssl x509 -noout -ext "ct_precert_scts"CT Log Requirements:
Chrome's CT policy requires:
- SCTs from at least two different log operators
- Logs must be from Google's approved log list
- Log operator diversity (not all SCTs from same company)
Monitoring for Domain Owners:
Domain owners should monitor CT logs for unauthorized certificates:
- crt.sh (Sectigo) — Web search for certificates by domain
- Google Transparency Report — Certificate search
- Facebook Certificate Transparency Monitoring — Alerts for your domains
- Custom monitors — Parse CT logs for matching domains
Companies like Meta, Google, and financial institutions actively monitor logs and have caught mis-issuance within hours of occurrence.
Certificate Transparency has fundamentally improved PKI accountability. Mis-issuance that would have been invisible is now publicly discoverable. CAs know that every certificate they issue is logged and auditable. This has driven significant improvements in CA practices and enabled faster incident detection and response.
Trust Store Management
A trust store is the collection of root certificates that a system trusts. Understanding trust store management is crucial for both security and troubleshooting.
Trust Store Locations by Platform:
| Platform | Location | Management Tool |
|---|---|---|
| Windows | Certificate Store (certmgr.mmc) | certmgr.msc, PowerShell |
| macOS | Keychain Access (/System/Library/Keychains/) | security command, Keychain Access.app |
| Linux (Debian/Ubuntu) | /etc/ssl/certs/, /usr/share/ca-certificates/ | update-ca-certificates |
| Linux (RHEL/CentOS) | /etc/pki/tls/certs/, /etc/pki/ca-trust/ | update-ca-trust |
| Java | $JAVA_HOME/lib/security/cacerts | keytool |
| Firefox | NSS database (uses own trust store) | certutil, about:preferences#privacy |
| Chrome (Windows) | Windows Certificate Store | (uses OS store) |
| Chrome (Linux) | NSS database or OS store | certutil |
1234567891011121314151617181920212223242526272829303132
# Linux (Debian/Ubuntu): Add a custom CA certificatesudo cp custom-ca.crt /usr/local/share/ca-certificates/sudo update-ca-certificates # Linux (RHEL/CentOS): Add a custom CA certificatesudo cp custom-ca.pem /etc/pki/ca-trust/source/anchors/sudo update-ca-trust extract # macOS: Add a trusted certificatesudo security add-trusted-cert -d -r trustRoot \ -k /Library/Keychains/System.keychain custom-ca.pem # Java: Add certificate to cacertskeytool -importcert -alias custom-ca \ -keystore $JAVA_HOME/lib/security/cacerts \ -file custom-ca.pem \ -storepass changeit # View certificates in Java trust storekeytool -list -keystore $JAVA_HOME/lib/security/cacerts \ -storepass changeit | head -50 # Firefox: Add certificate to NSS databasecertutil -A -n "Custom CA" -t "TC,C,T" \ -i custom-ca.pem -d sql:$HOME/.pki/nssdb # Windows PowerShell: Add certificate to machine storeImport-Certificate -FilePath custom-ca.cer \ -CertStoreLocation Cert:\LocalMachine\Root # List Windows root certificatesGet-ChildItem -Path Cert:\LocalMachine\RootEnterprise Trust Store Management:
Enterprise environments need centralized trust store management:
Group Policy (Windows):
- Distribute root certificates via GPO
- Certificates pushed to all domain-joined machines
- Enables enterprise CA trust without manual installation
Configuration Management:
- Ansible, Puppet, Chef can deploy certificates to Linux systems
- Ensures consistent trust across fleet
- Version control for trust store changes
MDM (Mobile Device Management):
- Deploy certificates to iOS/Android devices
- Required for enterprise apps and internal sites
- Can enforce certificate policies
Security Considerations:
Adding a root certificate grants complete trust for any certificate that CA issues. Before adding any root, verify: Who operates this CA? What domains might it issue for? Is it Name Constrained? Malicious root installation is a common attack vector for TLS interception and malware.
Enterprise PKI Design
Many organizations run private PKI for internal use, providing certificates without depending on public CAs.
Use Cases for Enterprise PKI:
- •Internal TLS — Secure internal websites, APIs, microservices without paying for public certificates
- •Client Authentication — Mutual TLS (mTLS) for service-to-service authentication
- •Smart Card/PIV Authentication — Physical security credentials for building access and login
- •Code Signing — Sign internal applications and scripts
- •Email Encryption — S/MIME certificates for encrypted internal email
- •Document Signing — Digital signatures on internal documents
- •VPN Authentication — Certificate-based VPN client authentication
- •WiFi/802.1X — EAP-TLS authentication for network access
Typical Enterprise PKI Architecture:
┌─────────────────┐
│ Offline Root │
│ CA │
│ (Air-gapped) │
└────────┬────────┘
│
┌────────────────┼────────────────┐
│ │ │
┌───────┴───────┐ ┌──────┴──────┐ ┌───────┴───────┐
│ Issuing CA #1 │ │ Issuing CA │ │ Issuing CA #3 │
│ (TLS Certs) │ │ #2 (Users) │ │ (Code Sign) │
└───────┬───────┘ └──────┬──────┘ └───────┬───────┘
│ │ │
Servers Smart Cards Dev Machines
Design Principles:
- Offline Root CA — Root private key never touches a network; stored in HSM in secure facility
- Purpose-Specific Issuing CAs — Separate CAs for different certificate types; limits blast radius of compromise
- Automated Issuance — Self-service portals, ACME servers, or integration with Active Directory Certificate Services (ADCS)
- Name Constraints — If root is added to devices, constrain to company domains
- Short Validity for Automated Certs — Internal certificates can have short lifetimes with automated renewal
1234567891011121314151617181920212223242526272829303132333435363738394041
# OpenSSL configuration for enterprise root CA [ ca ]default_ca = enterprise_root_ca [ enterprise_root_ca ]dir = /ca/rootdatabase = $dir/index.txtserial = $dir/serialcertificate = $dir/ca.crtprivate_key = $dir/ca.keydefault_days = 3650 # 10 years for rootdefault_md = sha256policy = policy_strict [ policy_strict ]countryName = matchorganizationName = matchcommonName = supplied [ v3_issuing_ca ]subjectKeyIdentifier = hashauthorityKeyIdentifier = keyid:always,issuerbasicConstraints = critical, CA:true, pathlen:0keyUsage = critical, digitalSignature, cRLSign, keyCertSignnameConstraints = critical, @name_constraints [ name_constraints ]permitted;DNS.0 = .internal.example.compermitted;DNS.1 = .corp.example.compermitted;email.0 = .example.compermitted;IP.0 = 10.0.0.0/255.0.0.0permitted;IP.1 = 192.168.0.0/255.255.0.0excluded;IP.0 = 0.0.0.0/0.0.0.0 # No public IPs [ v3_end_entity ]subjectKeyIdentifier = hashauthorityKeyIdentifier = keyid,issuerbasicConstraints = critical, CA:falsekeyUsage = critical, digitalSignature, keyEnciphermentextendedKeyUsage = serverAuth, clientAuthConsider solutions like HashiCorp Vault, step-ca, or cloud-based private CAs (AWS Private CA, Google Cloud CA Service) for modern enterprise PKI. These provide APIs, automation, and integration that manual OpenSSL/ADCS setups lack.
Modern PKI Tooling
The PKI landscape has evolved beyond manual OpenSSL commands and ADCS. Modern tools provide automation, APIs, and integration with contemporary infrastructure.
Certificate Management Solutions:
| Tool | Type | Best For | Key Features |
|---|---|---|---|
| Let's Encrypt / certbot | Public CA + Client | Web server TLS | Free, automated, ACME protocol |
| HashiCorp Vault PKI | Private CA | Microservices, Kubernetes | API-driven, short-lived certs, secrets management |
| step-ca / Smallstep | Private CA | Modern enterprises | ACME support, JWK provisioning, OAuth integration |
| CFSSL | Private CA | Container environments | JSON-based, Kubernetes integration |
| AWS Private CA | Cloud-managed | AWS-heavy environments | Managed HSM, IAM integration |
| Google Cloud CA Service | Cloud-managed | GCP environments | Tiered CA hierarchy, Kubernetes integration |
| cert-manager | Certificate controller | Kubernetes | Automates certificate lifecycle in K8s |
| Venafi | Enterprise management | Large enterprises | Visibility, policy enforcement, compliance |
1234567891011121314151617181920212223242526272829303132333435363738394041424344
# cert-manager Certificate resource for KubernetesapiVersion: cert-manager.io/v1kind: Certificatemetadata: name: api-tls-cert namespace: productionspec: secretName: api-tls-secret duration: 2160h # 90 days renewBefore: 360h # Renew 15 days before expiry issuerRef: name: letsencrypt-prod kind: ClusterIssuer commonName: api.example.com dnsNames: - api.example.com - api-internal.example.com ---# HashiCorp Vault PKI role configurationvault write pki/roles/server-cert \ allowed_domains="internal.example.com" \ allow_subdomains=true \ max_ttl="72h" \ generate_lease=true \ key_type="ec" \ key_bits=256 # Request a certificate from Vaultvault write pki/issue/server-cert \ common_name="api.internal.example.com" \ ttl="24h" ---# step-ca provisioner for ACMEstep ca provisioner add acme --type ACME \ --require-eab=false \ --challenge="tls-alpn-01,http-01,dns-01" # Client requesting cert via step CLIstep ca certificate api.internal.example.com \ cert.pem key.pem \ --ca-url https://ca.internal.example.com \ --provisioner acmeThe ACME Revolution:
The ACME protocol (RFC 8555), pioneered by Let's Encrypt, has transformed certificate management:
- Standardized automation — Any ACME client works with any ACME server
- Short-lived certificates — Automatic renewal makes 90-day or shorter lifetimes practical
- Domain validation automation — HTTP, DNS, and TLS-ALPN challenges
- Wide adoption — Now used by private CAs, not just Let's Encrypt
Organizations can run internal ACME servers (step-ca, Boulder) providing Let's Encrypt-style automation for internal certificates.
Manual certificate management—generating CSRs, emailing CAs, copying certificates to servers, setting calendar reminders for renewal—is becoming obsolete. Modern infrastructure expects automated certificate lifecycle management. If you're still doing it manually, modernization should be a priority.
Specialized PKI Applications
Beyond web and enterprise PKI, numerous specialized PKI deployments serve specific industries and use cases.
Government PKI:
- •U.S. Federal PKI (FPKI) — Interconnected PKI for federal agencies; enables cross-agency authentication
- •Common Access Card (CAC) — DoD smart card with PKI credentials for personnel
- •Personal Identity Verification (PIV) — Civilian federal employee smart card standard (FIPS 201)
- •eIDAS (EU) — European framework for electronic identification and trust services
- •Estonia e-Residency — National PKI enabling digital identity for citizens and e-residents
Healthcare PKI:
- DEA EPCS — Electronic Prescribing for Controlled Substances requires PKI-based authentication
- DirectTrust — PKI for secure health information exchange
- Certificate policies aligned with HIPAA — Specific assurance levels for protected health information
Financial Services:
- PCI DSS requirements — TLS for cardholder data; certificate management controls
- SWIFT PKI — Certificates for financial messaging authentication
- Qualified Electronic Signatures — Legal equivalence to handwritten signatures in many jurisdictions
IoT and Device PKI:
| Challenge | Solution Approach |
|---|---|
| Massive scale (billions of devices) | Automated provisioning, device identity services |
| Resource constraints | Elliptic curve cryptography, lightweight protocols |
| Long device lifetimes | Certificate rotation, long-lived roots with short certificates |
| Limited connectivity | Batch updates, local validation caching |
| Manufacturing integration | Factory provisioning, secure element injection |
| Supply chain security | Hardware security modules in devices, attestation |
Code Signing PKI:
Code signing has its own PKI ecosystem:
- Extended Validation Code Signing — Requires hardware key storage (HSM or USB token)
- Timestamping — Proves code was signed while certificate was valid (signature remains valid after expiry)
- Platform-Specific Requirements:
- Windows: Authenticode, kernel-mode signing requires WHQL/WHCP
- Apple: Developer ID, notarization requirement
- Android: APK signing, Play App Signing
- Linux packages: GPG-based, but PKI emerging
SPIFFE (Secure Production Identity Framework For Everyone) is an emerging standard for service identity in distributed systems. SPIRE is its reference implementation. It provides automatically rotating X.509 certificates to workloads without requiring traditional CA infrastructure—particularly relevant for Kubernetes and microservices.
PKI Deployment Best Practices
Drawing from industry experience, CA audits, and security incidents, here are the essential best practices for PKI deployment:
Key Management:
- •Use HSMs for CA keys — Hardware Security Modules prevent key extraction; required for public trust
- •Offline root CAs — Root CA systems should never connect to networks; bring certificates out on removable media
- •Key ceremony documentation — Document all root key operations with video, witnesses, and detailed logs
- •Key escrow (where appropriate) — Enterprise encryption keys may need escrow for business continuity; never escrow signing keys
- •Regular key rotation — Plan for CA key rollover before expiration; overlap validity periods
Certificate Lifecycle:
- •Automate everything — Manual certificate management is error-prone and doesn't scale; use ACME or equivalent
- •Monitor expiration — Alert well before certificates expire; 30 days minimum, 60+ for critical systems
- •Short validity periods — Shorter is better for security; 90 days is increasingly standard
- •Inventory all certificates — You can't manage what you don't know about; scan networks, monitor CT logs
- •Renewal before expiration — Renew when 1/3 of validity remains; handles transient failures
Security Operations:
- •Monitor Certificate Transparency — Set up alerts for your domains; detect mis-issuance quickly
- •Use CAA records — Specify which CAs can issue for your domains; prevents unauthorized issuance
- •Enable OCSP stapling — Improves performance and privacy; reduces load on CAs
- •Incident response plans — Know how to revoke and replace certificates quickly; practice the process
- •Separate duties — Different people for key generation, certificate issuance, and audit
123456789101112131415161718
# DNS CAA Records - Specify which CAs can issue for your domain # Only Let's Encrypt can issue certificates for example.comexample.com. IN CAA 0 issue "letsencrypt.org" # Only DigiCert can issue wildcard certificatesexample.com. IN CAA 0 issuewild "digicert.com" # Report policy violations to security teamexample.com. IN CAA 0 iodef "mailto:security@example.com" # Prohibit all issuance (for domains you don't use for web)unused.example.com. IN CAA 0 issue ";" # Multiple CAs allowedexample.com. IN CAA 0 issue "letsencrypt.org"example.com. IN CAA 0 issue "sectigo.com"example.com. IN CAA 0 issue "digicert.com"The single most common PKI failure is certificate expiration causing outages. Major providers (Microsoft, Equifax, LinkedIn, Spotify, and many others) have all suffered public outages due to expired certificates. Automation and monitoring are not optional.
KEEP LEARNING
There’s more to understand.
You’re reading the introduction. Create a free account to read the complete lesson, save notes and keep track of your progress.