AD.CLOUDSCHOOL.AI · PAGE 11 OF 14

PKI with Active Directory Certificate Services

CA hierarchies, enterprise and standalone CAs, templates, autoenrollment, CRLs and OCSP, smart cards, and AD CS security.

Why AD needs a PKI

Active Directory Certificate Services issues certificates that identify users, computers and services. AD consumes them in many places:

  • LDAPS and Kerberos PKINIT on domain controllers (Kerberos Authentication template).
  • Smart card and Windows Hello for Business key and certificate trust.
  • 802.1X EAP-TLS for Wi-Fi and wired networks, and VPN.
  • TLS for internal websites, RDP, WinRM over HTTPS and Exchange.
  • EFS, S/MIME, code signing of scripts.

CA hierarchy

DesignDescriptionUse
Two-tier (recommended)Offline standalone root CA, powered off and kept in a safe; one or more online enterprise issuing CAs.Most organizations.
Single tierOne enterprise root CA issues certificates directly.Labs and very small sites only. Compromise means rebuilding everything.
Three-tierRoot → policy CAs → issuing CAs.Very large or regulated environments.
  • Enterprise CA: AD-integrated, uses certificate templates and autoenrollment. Requires a domain-joined server.
  • Standalone CA: no templates, manual approval. Typical for the offline root.
  • Keep the CA private key in an HSM for production. Back up the key and database (Backup-CARoleService).
  • Plan validity: root 10 to 20 years, issuing CA about half of that, end-entity certificates 1 to 2 years.

Templates and autoenrollment

Templates (in CN=Certificate Templates,CN=Public Key Services,CN=Services,CN=Configuration) define who can enroll, the key size, EKUs and subject name. Duplicate a built-in template, never edit the originals.

  • Common templates: Computer, User, Domain Controller Authentication, Kerberos Authentication, Web Server, Smartcard Logon.
  • Autoenrollment: GPO setting Certificate Services Client - Auto-Enrollment plus Enroll and Autoenroll permissions on the template. Machines then request and renew certificates silently.
  • Publish the template on the CA (certtmpl.msc to design, certsrv.msc → Certificate Templates → New → Certificate Template to Issue).
certutil -template                         # list templates
certutil -catemplates                      # templates the CA issues
certreq -enroll -machine -q WebServer2026  # enroll from the command line
certutil -pulse                            # trigger autoenrollment now
Get-ChildItem Cert:\LocalMachine\My

Revocation: CRL, AIA and OCSP

  • CDP (CRL distribution point): where clients download the certificate revocation list. Publish to HTTP; LDAP paths fail for non-domain clients.
  • AIA (authority information access): where clients download the issuing CA's certificate and find the OCSP responder.
  • Online Responder (OCSP): answers "is this certificate revoked?" per certificate, faster than large CRLs.
  • The offline root still publishes a CRL: power it on before the CRL expires (for example every 6 months) and copy the new CRL to the HTTP location.
certutil -url C:\cert.cer                  # test CDP, AIA and OCSP of a certificate
certutil -verify -urlfetch C:\cert.cer
certutil -crl                              # publish a new CRL now
pkiview.msc                                # Enterprise PKI health view

AD CS security

A CA that can issue authentication certificates for any user is as powerful as a domain controller. Treat CA servers, their admins and template permissions as Tier 0.

  • Known misconfiguration classes (often called ESC1 to ESC15 in security research): templates that let the requester supply any subject name, overly broad enrollment rights, dangerous EKUs such as Any Purpose, weak CA ACLs, and NTLM relay to Web Enrollment.
  • Do not allow Supply in the request on authentication templates unless manager approval is required.
  • Remove unused templates, restrict Enroll permissions, turn on Extended Protection for Authentication on web enrollment or remove it.
  • Enforce strong certificate mapping on DCs (the SID security extension in certificates); full enforcement is the default after the 2025 updates.
  • Audit with certutil, pkiview.msc and Microsoft Defender for Identity sensors on CA servers.