Join our Newsletter — 33% off our NHI Course
Home› Guides› Securing the internal PKI and certificate authority itself:…
Guide Non-Human Identity (NHI)

Securing the internal PKI and certificate authority itself: Trusted Roles, CA Keys, Enrolment Accounts, Logs and Lifecycle

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 13 November 2026 15 min read
On this page

An internal certificate authority decides which machines, workloads, users and code the organisation trusts, so whoever controls its signing keys, templates or enrolment accounts can mint credentials that every system will accept. Certificates now authenticate service meshes, VPN clients, Wi-Fi, smart card and passwordless logons, devices and signed internal software. A compromised CA does not leak one secret, it lets an attacker create new ones on demand, and the clean-up means reissuing everything the CA ever signed. This guide covers the inside view of the CA as a system to protect: trusted roles, CA private keys and HSMs, the service accounts and registration authorities that request certificates, templates and policy, logging, network isolation and the CA lifecycle. It is vendor-neutral and applies to directory-integrated CAs, open source CAs, cloud private CA services and managed PKI. For hierarchy design see the Enterprise PKI Design and CA Hierarchy Guide; this page assumes the hierarchy exists and focuses on running it securely.

Key takeaways

  • The CA is tier 0. An issuing CA trusted for logon or mTLS is as powerful as a domain controller or identity provider, so administer it from privileged access workstations with dedicated accounts.
  • CA keys live in hardware, under multi-person control. Root and issuing CA private keys belong in a validated HSM, with key ceremonies and quorum activation so no single person can use or export them.
  • Enrolment paths are the usual way in. Over-permissive templates, enrolment agents and automation accounts that can request any certificate are easier to abuse than the CA key itself.
  • Logs must show every issuance. Without a complete, tamper-resistant record of what was issued to whom, you cannot scope a compromise or prove one did not happen.
  • Plan for the worst day. A tested procedure to revoke, re-key and redistribute trust decides whether a CA compromise takes days or months to recover from.

The internal CA attack surface

Whatever the product, an internal PKI has the parts below. Each one carries privileged identities that need an owner.

ComponentWhat it doesIdentities and secrets involvedPrimary hardening
Offline root CASigns subordinate CA certificates and the root CRLRoot key in HSM, key custodians, ceremony officersPowered off and disconnected, multi-person physical access, ceremony records
Issuing or subordinate CAsSign end-entity certificatesCA key in HSM, CA service account, CA administratorsTier 0 hosts, HSM-held keys, restricted network paths
Templates, profiles and policyDefine what can be requested, by whom, with which subject and usageTemplate or profile administratorsChange control, least privilege enrolment permissions, no requester-supplied subjects for authentication certificates
Registration authorities and enrolment endpointsApprove or proxy requests (web enrolment, ACME, EST, SCEP, APIs)RA operators, enrolment agents, ACME account keys, SCEP challenge secrets, API clientsStrong client authentication, scoped issuance rights, rate limits
Certificate lifecycle and automation toolsRequest, renew and deploy certificates at scaleAutomation service accounts with broad enrolment rightsScope per environment and profile, monitored issuance
Revocation and publicationCRL distribution points, OCSP responders, AIA locationsOCSP signing keys, publishing accountsSeparate signing keys, integrity of published files, availability monitoring
Database, backups and logsRecord of all requests and issued certificates, CA key backupsBackup operators, database administratorsEncryption, separate custody of key backups, export of logs off the CA

The relevant ATT&CK techniques include T1649 Steal or Forge Authentication Certificates (abusing templates or stolen CA keys to obtain logon certificates), T1553.004 Install Root Certificate (adding an attacker root to trust stores), T1557 Adversary-in-the-Middle (made possible by a rogue trusted certificate) and T1098 Account Manipulation (mapping a certificate to a privileged account). See Signing keys and certificates in breaches for how these have played out.

Trusted roles and separation of duties

RFC 3647 asks a certificate policy and practice statement to define trusted roles, the number of people required per task and the identification of each role. The CA/Browser Forum Network and Certificate System Security Requirements (version 2.0.5, July 2025), written for publicly trusted CAs, are a useful benchmark for internal ones: they require defined trusted roles with least privilege and separation of duties, unique attributable credentials, removal of access within 24 hours of a person leaving, and a review of accounts with CA access at least every three months.

RoleCan doShould not be able to do
CA administratorConfigure the CA, its extensions, publication points and rolesApprove certificate requests, change audit settings unobserved
Certificate manager or RA officerApprove, issue and revoke certificatesChange CA configuration or templates
Template or profile administratorCreate and change templates and enrolment permissionsApprove requests made under its own changes
AuditorRead audit logs, issued certificate database and ceremony recordsChange anything
Key custodianHold an HSM card, PIN share or quorum credentialActivate or back up a CA key alone
Backup operatorRun and restore CA backupsHold the key material needed to use a restored key alone
  • Dedicated admin accounts and devices: CA roles are held by separate admin identities with phishing-resistant MFA (IA-2(1)) used only from privileged access workstations. The CA/Browser Forum requirements also expect MFA for access to CA infrastructure and a CA-owned workstation for remote privileged access. See the Privileged Access Workstations Guide.
  • Directory dependency: where CA roles are granted through directory groups, anyone who controls those groups controls the CA. Treat the groups as tier 0 and alert on membership changes. See the Tiered Administration and Enterprise Access Model Guide.
  • Role enforcement in the product: many CA products can enforce role separation so one account cannot hold two roles. Turn it on where available, and record the exceptions small teams need.

CA private keys and HSMs

NIST SP 800-57 Part 1 Rev 5 treats private signature keys as the most sensitive key type for integrity and authentication. For a CA, the signing key is the trust anchor for everything below it.

  • Keys generated and held in an HSM: generate root and issuing CA keys inside a hardware security module validated under the NIST Cryptographic Module Validation Program, marked non-exportable, and never store a software copy (SC-12, SC-13). See the HSM Deployment and Operations Guide.
  • Quorum activation: configure the HSM so key activation, backup and restore need M of N custodians, for example 2 of 3 or 3 of 5 operator cards or credentials, held by people outside a single team.
  • Key ceremonies: generate, sign subordinate CAs and back up the root key only in a scripted ceremony with named roles, a witness, video or written evidence and signed records. Use the Cryptographic Key Ceremony Template.
  • Offline root: keep the root CA powered off and disconnected between ceremonies. The CA/Browser Forum requirements place root CA systems on physically separate networks and require multi-party control for physical access to them; an internal PKI can apply the same rule.
  • Key backups: HSM key backups are encrypted, held in at least two separate secure locations, and restorable only with the quorum. Test a restore to a spare HSM before you need it.
  • Cloud private CA services: the provider holds the key in its HSMs, so your controls shift to the cloud roles that can issue, revoke, export or delete the CA. Restrict those permissions to named roles, require MFA and log every call. See Securing the cloud key management service (KMS) itself.

Templates, profiles and enrolment accounts

Attackers rarely need the CA key: a template or enrolment path that issues an authentication certificate for any name they choose is enough. These settings deserve the same review as admin roles.

Setting or pathRisk when misconfiguredSafer configuration
Requester-supplied subject or SAN on logon-capable templatesAnyone allowed to enrol can request a certificate for an administratorBuild the subject from the directory, or require manager approval
Broad enrolment permissions (all users, all computers)Every compromised account can enrolGrant enrolment to specific groups per template
Any-purpose or over-broad extended key usageCertificate usable for logon, code signing and TLS at onceSingle purpose EKU per template
Enrolment agent or RA certificatesCan request certificates on behalf of othersRestrict to named agents and named target templates, monitor use
Automation service accounts (ACME, EST, SCEP, API)Broad issuance rights reused across environmentsOne account per environment and profile, allowed names limited by policy, rate limits
SCEP shared challenge passwordsStatic secret lets any device enrolDynamic, single use challenges issued by the device manager
Long validity periodsStolen certificates stay useful for yearsShort lifetimes with automated renewal

Network placement and host hardening

  • Segment the PKI: the CA/Browser Forum requirements segment CA infrastructure into separate networks behind boundary controls. Allow issuing CAs to receive requests only from enrolment front ends and named automation hosts, and admin traffic only from privileged access workstations (SC-7).
  • Publish separately: CRLs and OCSP responses are served from hosts outside the CA tier, so the CA itself never needs inbound access from general networks.
  • Hardened, minimal hosts: run the CA on dedicated hosts with no other roles, a hardened baseline, endpoint detection reporting to the SOC and no general internet access (CM-6, CM-7).
  • Patching and testing: apply security updates to CA hosts as tier 0 changes (SI-2). The CA/Browser Forum requirements expect security advisories to be monitored and penetration tests at least annually and after significant changes; that is a reasonable floor for an internal PKI too.

Logging and monitoring

NIST SP 800-53 AU-12 and AU-6 apply, and the CA/Browser Forum requirements add automated alerting through more than one channel and an initial response within 24 hours of an alert. Turn on CA auditing for every category the product offers, forward logs to a SIEM run by another team (AU-9) and keep the issued certificate database backed up.

EventWhy it mattersSuggested response
Change to CA role membership or admin groupsFastest path to full controlAlert immediately, confirm with a second person
New or changed template or profile, or enrolment permission changeOpens a path to forged credentialsAlert, match to change ticket
Change to CA audit settings or extensionsClassic step before misuseCritical alert
Authentication certificate issued with a subject that differs from the requesterMatches template abuseAlert, revoke if unexplained
Issuance volume per requester above baselineCompromised automation accountAlert per account
CA key backup, export or HSM administrative actionPossible key theftAlert, verify against ceremony record
CRL or OCSP stale or unreachableRevocation stops workingAlert before next update is due

Also monitor trust stores: a new root certificate appearing on endpoints outside your managed deployment process is a strong signal of T1553.004. See Certificate trust stores and root CA management.

Lifecycle, recovery and compromise readiness

  1. Build: document the CP and CPS, generate keys in a recorded ceremony, set validity periods for each tier, and record every service account, template and enrolment endpoint with an owner. See the ISO/IEC 27099 PKI Practices and Policy Framework Guide.
  2. Operate: review CA role holders, enrolment agents and automation accounts at least every three months, templates every six months, and remove anything without an owner (AC-2).
  3. Renew: renew CA certificates well before expiry, and plan root renewal years ahead because new roots must reach every trust store first. See the Certificate Expiry Outages and 47-Day TLS Certificates Guide.
  4. Back up and restore: back up the CA database and configuration daily and test a full restore, including HSM key restore under quorum, at least yearly (CP-9, CP-10).
  5. Prepare for compromise: keep an inventory of where each CA's certificates are trusted and used, so you can revoke the CA, stand up a replacement and reissue in priority order. See the CA Compromise and Mass Certificate Replacement Playbook.
  6. Retire: when a CA is decommissioned, publish a final CRL with a long validity, remove its certificate from trust stores once nothing depends on it, and destroy its keys under a recorded procedure (MP-6). See the Internal PKI and certificate authority migration playbook.

Hardening an existing CA: a phased approach

  1. Days 1 to 30, visibility: list CA role holders, templates and their permissions, enrolment agents, automation accounts and where CA keys and backups are held; turn on full CA auditing and log forwarding. Rollback: not needed, this phase only reads and alerts.
  2. Days 31 to 90, enrolment paths: fix templates that allow requester-supplied subjects for authentication, narrow enrolment permissions and scope automation accounts. Change one template at a time, duplicating it first so the old version can be reinstated, and watch failed enrolment logs for a week.
  3. Days 91 to 180, roles and keys: enforce role separation, move admins to dedicated accounts on privileged access workstations, and move any software-held CA key to an HSM. Moving a key usually means a new CA key and certificate; plan it as a renewal and test it in a lab PKI first.
  4. Ongoing: quarterly access reviews, an annual restore and compromise exercise, and the Internal PKI and certificate authority health check as the annual review.

These timings are NHI Mgmt Group's recommendation; scale them to the size of your estate.

Decision guidance

  • Self-run CA, cloud private CA or managed PKI: running your own gives full control and full responsibility for HSMs, hosts and ceremonies. A cloud private CA removes key and host operations but makes cloud IAM permissions the critical control. Managed PKI moves operations to a supplier, so assess its trusted role controls and audit evidence. See the PKI and Managed PKI Buyer's Guide.
  • Two tier or three tier: most organisations need an offline root and online issuing CAs; a policy tier adds separation for very large or regulated estates at the cost of more ceremonies.
  • Separate CAs by purpose: use different issuing CAs for user and machine logon, server TLS, code signing and devices, so a problem with one use does not force reissuing all of them.
  • Small organisations: full role separation and multi-site HSM backups may be impractical. Use a cloud private CA or managed PKI, keep certificate lifetimes short, and send CA audit alerts to someone outside the PKI team.

Detection and measurement

  • Role footprint: number of identities holding CA administrator, certificate manager or template rights, and date of the last access review (target within three months).
  • Risky templates: count of enabled templates allowing requester-supplied subjects for authentication, broad enrolment or any-purpose usage (target zero).
  • Key protection: percentage of CA keys held in a validated HSM with quorum activation (target 100 percent).
  • Issuance visibility: percentage of CAs forwarding audit and issuance logs to the SIEM, with alerts tested in the last quarter.
  • Recovery readiness: date and duration of the last CA restore and compromise exercise.

Framework mapping

Control areaNIST SP 800-53 Rev 5NIST CSF 2.0
Trusted roles and separationAC-2(7), AC-5, AC-6(5), IA-2(1)PR.AA-05, PR.AA-03
Enrolment and automation accountsIA-5, IA-9PR.AA-01
CA keys and certificatesSC-12, SC-13, SC-17PR.DS-01
Network and host hardeningSC-7, CM-6, CM-7, SI-2PR.IR-01, PR.PS-01
Logging and reviewAU-6, AU-9, AU-12, AC-6(9)PR.PS-04, DE.CM-03
Backup, recovery and responseCP-9, CP-10, IR-4PR.DS-11, RC.RP-01

Common failure patterns

  • Online root: the root CA runs as an always-on server joined to the directory, so a domain compromise reaches the trust anchor.
  • Software CA keys: the issuing CA key sits on disk, protected only by the host, and copies of it are in ordinary backups.
  • Templates nobody owns: old templates with broad enrolment and requester-supplied subjects stay enabled long after their project ended.
  • Automation with unlimited issuance: one service account can request any certificate for any name in every environment.
  • Auditing off: CA auditing was never fully enabled, so nobody can say which certificates were issued during a suspected compromise.
  • No exit plan: there is no inventory of where the CA is trusted, so replacing a compromised CA becomes a months-long discovery exercise.

Practitioner checklist

  • Classify every CA, RA and enrolment front end as tier 0 and administer them only from privileged access workstations.
  • Define trusted roles in the CPS, enforce separation in the product and review role holders every three months.
  • Hold root and issuing CA keys in validated HSMs with quorum activation and recorded ceremonies.
  • Keep the root CA offline and test HSM key restore under quorum.
  • Remove requester-supplied subjects and broad enrolment from authentication templates.
  • Give each automation account one environment and profile, an owner and issuance limits.
  • Turn on full CA auditing, forward logs to a SIEM run by another team and alert on role, template and audit changes.
  • Publish CRLs and OCSP from hosts outside the CA tier and monitor their freshness.
  • Keep an inventory of where each CA is trusted and rehearse a CA compromise and replacement.

Standards and references

Related NHI Mgmt Group resources: Machine Identity, PKI and Certificate Lifecycle Guide · Top 10 PKI and Certificate Management Mistakes · PKI and Certificate Lifecycle Maturity Model · Internal PKI and certificate authority health check

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.