A AD://SECURITY
X.509 Certificate
CN = dc01.contoso.com
🔒
Issuer:  CN = Contoso Issuing CA
Serial:  4F:8A:21:0E:…
Valid:  2026-04-20 → 2028-04-20
Public Key: RSA 2048
EKU:  Server Authentication
CA
SEAL

Certificates in Active Directory, Visualized

From asymmetric keys to AD CS, CSRs, RAs, templates and auto-enrollment - built up step by step with motion and diagrams. Basics to advanced.

↓ Scroll to begin
Module 01 · Foundations

What is a digital certificate?

A digital certificate is a small, signed file that binds an identity (a person, computer, service) to a public key. It's a notarized "ID card" for the digital world — signed by an authority both sides trust.

👤

Identity

Who or what is this? The Subject — e.g. dc01.contoso.com, or Alice@contoso.com.

🔑

Public Key

The key the world can use to encrypt for you, or to verify your signatures.

Signature

A trusted authority's stamp — binding the identity and key together so it can't be forged.

// anatomy of an X.509 certificate
Version: v3
Serial Number: 4F:8A:21:0E:9C:…
Signature Algorithm: sha256WithRSAEncryption
Issuer: CN=Contoso Issuing CA, DC=contoso, DC=com
Validity: 2026-04-20  →  2028-04-20
Subject: CN=dc01.contoso.com
Subject Public Key Info: RSA 2048  // the public key
Extensions:
Key Usage: Digital Signature, Key Encipherment
Extended Key Usage (EKU): Server Authentication, Client Authentication
Subject Alternative Name (SAN): DNS=dc01.contoso.com
CRL Distribution Points: http://pki.contoso.com/crl/issuing.crl
Authority Information Access (AIA): http://pki.contoso.com/aia/issuing.crt
CA Signature: 8a 71 4c d3 … (sha256 over everything above)
Module 02 · The math underneath

Two keys, one trick

Certificates only make sense once you've internalized asymmetric cryptography. You have two keys that are mathematically linked. Anything one locks, only the other can unlock.

🔓 Public Key

Shared with the world. Inside the certificate.

-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0B...
...J0kVf5o4K7QIDAQAB
-----END PUBLIC KEY-----

🔒 Private Key

Stays on your machine, never shared. Often in TPM/HSM.

-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0...
...zT8wPVmM7rQIDAQAB
-----END PRIVATE KEY-----
// what each key does
CONFIDENTIALITY Sender encrypts with PUBLIC key encrypted blob Receiver decrypts with PRIVATE key AUTHENTICITY (SIGNATURE) Signer: PRIVATE key signs signed message Anyone: PUBLIC key verifies

Certificates use both: the CA signs the cert with its private key, and you use the CA's public key (which lives in your trust store) to verify the cert is authentic.

Module 03 · Cast of characters

The PKI players

A Public Key Infrastructure (PKI) is a small ecosystem of roles that together let strangers trust each other through certificates.

// how the players talk to each other (animated)
1. CSR + identity 2. validated request 3. signed certificate 4. CRL / OCSP check
💻

Subscriber

The user/computer/service that needs a certificate.
📝

Registration Authority (RA)

Verifies the request is legit before forwarding to the CA.
🏛

Certificate Authority (CA)

Issues and signs the certificate.
🌐

Relying Party

Anyone who validates & trusts the cert (browser, server, AD).
📂

Repository

Public store: published certs, CRLs, OCSP responses.
🛡

Validation Authority

Answers "is this cert still valid?" via CRL or OCSP.
Module 04 · The trust hierarchy

Trust flows downhill

CAs are arranged in a tree. The Root CA sits at the top, signs Intermediate (Issuing) CAs, which sign your everyday end-entity certificates. As long as your machine trusts the root, it trusts the whole chain.

👑

Root CA

Self-signed. Offline.
Trust anchor.

🏛

Issuing CA

Online. Day-to-day signing.
Domain-joined in AD.

🔒

End-entity Cert

User, computer,
web server, code-signing.

Why a 2-tier (or 3-tier) hierarchy?

If the root is offline and only signs the issuing CAs, an attacker who breaches the issuing CA can't compromise the root. You can revoke the issuing CA and re-issue, without burning the entire trust store on every machine.

How chain validation works

When a server hands you its certificate, your client walks upward: this cert is signed by Issuing CA → whose cert is signed by Root CA → which I already trust. If any link is missing, expired, or revoked, validation fails.

Module 05 · CSR — Certificate Signing Request

What exactly is a CSR?

A CSR (PKCS#10) is the message a subscriber sends to a CA saying "please issue me a cert, here's my public key and the identity I'm claiming." It's signed with the matching private key to prove the requester actually holds it.

1

Generate keypair

Subscriber generates a fresh private/public key pair locally. The private key never leaves the machine.

2

Build the CSR

The CSR contains: the desired Subject (CN, SAN, etc.), the public key, and a self-signature using the private key.

3

Send to CA

CA verifies the self-signature (proof of possession), checks identity (often via the RA), and issues the certificate.

⚙️ Try it: build a CSR

These fields are what tools like certreq, openssl, or AD's MMC snap-in collect.

📄 Resulting CSR (PKCS#10)

-----BEGIN CERTIFICATE REQUEST-----
Click "Generate CSR" to see the PEM output appear here...
-----END CERTIFICATE REQUEST-----
// CSR → certificate transformation
CSR (PKCS#10) Subject: CN=dc01... Public Key: RSA 2048 Self-signature Certificate Authority signs X.509 Certificate Subject: CN=dc01... Public Key: RSA 2048 CA Signature ✓

Key insight: the private key stays put

The CSR carries the public key. The CA never sees the private key. This means a compromise of the CA leaks no subscriber private keys — only the CA's own signing key matters for the entire trust hierarchy.

Module 06 · Registration Authority

What is a Registration Authority (RA)?

An RA is the "front desk" for the CA. It does the human and process work of verifying that a request really should be honored, before passing the request to the CA for issuance. The CA is the signer; the RA is the vetter.

Certificate Authority (CA) Registration Authority (RA)
Primary job Cryptographically sign & issue the certificate. Authenticate & authorize the request.
Holds private signing key? Yes — the most sensitive key in the PKI. No (but may have its own enrollment-agent key).
Touches end users? Usually not. Often offline / hardened. Yes — reviews requests, identity proofs.
In Microsoft AD CS Enterprise CA / Standalone CA role. Enrollment Agent, NDES, CES/CEP, manager approval.

How an RA validates a request

Depending on the certificate template's policy, the RA may:

  • Confirm the requester's AD identity & group membership.
  • Check that the requested Subject/SAN matches what the requester is allowed to ask for.
  • Require manual approval from a certificate manager.
  • Demand "proof of possession" (the CSR self-signature).
  • Re-key smartcard requests via an Enrollment Agent.

RA in action: smart card enrollment

Help-desk staff act as Enrollment Agents — an EA cert lets them sign smart-card requests on behalf of a user. The CA trusts the EA's signature because of the EA's certificate. That's classic RA behavior: the CA didn't meet the user, but the EA did.

// RA bridging subscriber and CA
Subscriber User / Computer RA Validates & approves CA Signs & issues CSR + identity proof approved CSR issued certificate is delivered back to subscriber
Module 07 · Active Directory Certificate Services

AD CS — Microsoft's PKI

When you install the Active Directory Certificate Services role on Windows Server, you get a full PKI integrated with AD. AD itself becomes the directory (LDAP) where root certificates and CRLs are published, so every domain-joined machine automatically trusts the enterprise CA.

Certification Authority

The signing service. Two flavors:

Enterprise CA — integrated with AD, supports templates, auto-enrollment.
Standalone CA — works without AD, manual approval only.

CA Web Enrollment

An IIS site (/certsrv) where users submit CSRs and download certs from a browser. Old-school but still around.

Certificate Enrollment Web Service (CES) & Policy Web Service (CEP)

Modern HTTPS-based enrollment for non-domain-joined or remote machines. CEP tells the client what templates exist; CES handles the actual issuance.

NDES (Network Device Enrollment Service)

Implements the SCEP protocol so network devices (routers, switches, mobile devices via MDM) can enroll without AD credentials.

Online Responder (OCSP)

Answers real-time "is this cert revoked?" queries with a small signed response, instead of forcing clients to download the whole CRL.

Certificate Templates

Stored in AD. Each template defines: who can enroll, what extensions/EKUs the cert gets, validity period, key length, whether auto-enrollment is allowed, and if a manager must approve.

Why AD makes PKI easy

Because every domain-joined client already authenticates to AD with Kerberos, the CA can trust the requester's identity automatically. Combined with Group Policy — which can push the root CA into every trust store and turn on auto-enrollment — you get a network-wide PKI that "just works" for users without any manual cert handling.

Module 08 · Step by step

The full enrollment flow, animated

Click each step to walk through what happens when an AD user or computer requests a certificate. This is the canonical flow for an Enterprise CA with auto-enrollment via Group Policy.

Client Domain-joined PC CryptoAPI / Cert MMC Group Policy Auto-enrollment policy / templates Active Directory LDAP: templates, root CA, CRLs, AIA Enterprise CA AD CS DCOM / RPC: ICertRequest Online Responder OCSP: revocation status Issued Cert Stored in user/computer cert store + private key 1 2 3 — CSR 4 5 6 — cert delivered to client 7 — later: client verifies via OCSP / CRL
Step 1 — Discover policy. The client's auto-enrollment task fires (every 8 hours, on logon, or on GP refresh). It reads the auto-enrollment GPO, then queries Active Directory for the list of certificate templates the user/computer is allowed to enroll for.
Module 09 · Cradle to grave

Certificate lifecycle

A certificate isn't a "set and forget" artifact. It's issued, used, renewed before expiry, and possibly revoked — with revocation status published so relying parties can check.

Lifecycle

Each step is governed by template settings & policy.

1. Request

CSR generated

2. Validate

RA / template policy

3. Issue

CA signs cert

4. Distribute

Install in cert store

5. Use

TLS, signing, auth

6. Renew

Before expiry

7. Revoke

Compromise or change

8. Publish CRL

Or OCSP response

CRL — Certificate Revocation List

A signed list of all revoked certificate serial numbers, published by the CA on a schedule (e.g., every 7 days). The CA publishes it to the location named in each cert's CRL Distribution Points extension — usually a URL on a web server and an LDAP path inside AD.

OCSP — Online Certificate Status Protocol

Instead of downloading a megabyte CRL, the client asks an Online Responder "is serial 4F8A21 still good?" and gets back a tiny signed answer. Faster, more current, easier to scale.

Module 10 · Where you'll see them

What AD certificates actually do

Once you have AD CS humming, certificates show up everywhere in a Windows estate. Here are the heavy hitters.

🔑 Smart Card Logon

Users insert a smart card / YubiKey containing a cert; Kerberos PKINIT validates it against AD. Strong, phishing-resistant auth.

📡 802.1X / Wi-Fi (EAP-TLS)

Computers and users authenticate to the network with their certs, no shared passwords needed.

🔔 Domain Controller Certs

DCs need certs for LDAPS, smart card logon, and modern authentication. Auto-enrolled via the Domain Controller Authentication template.

💾 EFS — Encrypting File System

NTFS file encryption uses a per-user EFS certificate; the private key encrypts file keys at rest.

✉️ S/MIME Email

Outlook can sign & encrypt mail using a user cert from your enterprise CA.

💻 Code Signing

Developers sign PowerShell scripts, MSI installers, and binaries so they're trusted (and not blocked) on managed endpoints.

🔐 Internal HTTPS

Web Server template issues TLS certificates for internal sites — SharePoint, intranet apps, RDS gateways.

📱 MDM / Mobile (SCEP)

Intune or another MDM uses NDES + SCEP to push device-auth and Wi-Fi certs to phones automatically.

🛡 IPsec / VPN

Always-On VPN and site-to-site IPsec tunnels authenticate the gateway and client with certificates.

Module 11 · Beyond the basics

Advanced topics

Two-tier vs. three-tier hierarchy

Most shops run two tiers: an offline Root CA + an online Enterprise Issuing CA. Larger orgs add a middle Policy CA tier between them, useful when different business units need different policies but should still chain to a single root.

Hardware Security Modules (HSMs)

The CA's private signing key is the crown jewel. Storing it in a FIPS 140-2 / 140-3 HSM means the key can't be exported — the CA software calls the HSM to perform the signature, but the key itself never leaves hardened hardware.

Key Archival & Recovery

For encryption certs (e.g., EFS, S/MIME), losing the private key means losing the data. AD CS can archive private keys at issuance time, encrypted to a Key Recovery Agent's cert. A KRA can later recover the key for the user.

Cross-certification & Bridge CAs

Two organizations can cross-certify each other's roots so their users trust each other's certs without merging trust stores. Federal Bridge CAs are the classic example.

Subject Alternative Name (SAN)

Modern TLS (and AD-issued web server certs) use SAN entries for hostnames, not the legacy CN field. A single cert can cover many hostnames via multiple DNS SANs.

Strong mapping & CVE-2022-34691

Microsoft now requires the certificate to strongly map to an AD account (via SID extension), to prevent attackers from impersonating users by manipulating templates. Modern AD CS hardening is a topic of its own.

Modern protocols: ACME & EST

The same paradigm that drives Let's Encrypt (ACME) is now appearing inside enterprise PKIs. Some shops front AD CS with ACME or EST endpoints to support Linux, Kubernetes, and IoT workloads.

Post-quantum on the horizon

RSA and ECDSA are vulnerable to future quantum computers. PKI vendors and Microsoft are starting to add hybrid & PQ algorithms (ML-DSA / Dilithium, ML-KEM / Kyber) to certificate stacks. Long-lived roots are the first to migrate.

Quick reference

Glossary

Terms you'll see in AD CS docs, KDC logs, and security audits.

X.509
The standard format for digital certificates, defined by the ITU-T.
PKCS#10
The standard format for a Certificate Signing Request.
PKCS#7
Format used to bundle certificates and signed data.
PKCS#12 (.pfx)
Container that bundles a certificate and its private key, password-protected.
PEM
Base64-encoded text format wrapping -----BEGIN…----- blocks.
DER
Binary encoding of a certificate; PEM is just DER + Base64.
EKU
Extended Key Usage — what the cert is allowed to be used for (server auth, client auth, code signing…).
SAN
Subject Alternative Name — extra identities (DNS, email, UPN) the cert covers.
UPN
User Principal Name (e.g. alice@contoso.com) — how AD identifies users.
SPN
Service Principal Name — how AD identifies services for Kerberos.
CRL
Certificate Revocation List — signed list of revoked serials.
OCSP
Online Certificate Status Protocol — real-time revocation check.
AIA
Authority Information Access — URL where a cert's issuer can be downloaded.
CDP
CRL Distribution Point — URL where the CA's CRL is published.
NDES
Network Device Enrollment Service — Microsoft's SCEP server.
SCEP
Simple Certificate Enrollment Protocol — lets devices enroll without AD creds.
EST
Enrollment over Secure Transport — modern HTTPS-based enrollment protocol.
ACME
Automated Certificate Management Environment — the protocol Let's Encrypt uses.
HSM
Hardware Security Module — tamper-resistant device that stores private keys.
TPM
Trusted Platform Module — chip on modern PCs that can store keys non-exportably.
PKINIT
Kerberos extension that lets a cert authenticate a user instead of a password.
KRA
Key Recovery Agent — can recover archived private keys.