Mutual TLS (mTLS) client authentication basics for owned or authorized systems: client cert trust, require-and-verify config, identity mapping, revocation, and common misconfigs. Use when designing or reviewing mTLS between services or APIs, debugging client-certificate failures, assessing optional vs required client auth, or hardening private-key and trust-store handling for client certs.
Mutual TLS (mTLS) client authentication basics for owned or authorized systems: client cert trust, require-and-verify config, identity mapping, revocation, and common misconfigs. Use when designing or reviewing mTLS between services or APIs, debugging client-certificate failures, assessing optional vs required client auth, or hardening private-key and trust-store handling for client certs.
mTLS Client Auth Basics
Mutual TLS: server authenticates the client with an X.509 certificate during the
TLS handshake (plus server-cert validation). Design, config review, authorized assessment,
and remediation — not unlicensed third-party attacks.
When To Use
Situation
Direction
Service/API requires client certificates or mesh/B2B mTLS design
This skill
Failures: certificate required, unknown ca, handshake alerts
HTTPS plaintext when mTLS blocks ordinary proxies (owned)
tls-plaintext-acquisition
Private keys / PKCS#12 / CA material in repo or images
secrets-management-hygiene
Cert loaders / auth middleware implementation
code-quality-standards
Scope And Authorization
In scope: org-owned services, labs, CTFs, or written engagement naming TLS
terminators, clients, and CAs you may exercise.
Out of scope: forging client certs on systems you do not own; mass Internet mTLS
probes; using stolen production client keys outside IR/authorized tests.
Prefer lab/staging CAs and synthetic client certs; follow org PKI for production.
Treat client private keys, PKCS#12 passphrases, and CA keys as high-tier secrets —
redact from tickets, logs, and examples.
Capture only traffic you may terminate or key-log. Do not disable production
require client auth without change window, rollback, and compensating controls.
Workflow
1. Map the trust model
Field
Capture
TLS terminator
LB, ingress, mesh sidecar, app
Client auth mode
off / optional / required
Trust anchors
CA bundle, SPIFFE trust domain, mesh CA
Checks
chain, expiry, SAN/CN, key usage / clientAuth EKU
Identity map
SAN URI/DNS/email → principal / SPIFFE ID / ACL
Revocation
CRL, OCSP, or short-lived certs + automation
Downstream
re-verify at app vs proxy-injected identity headers only
Client (+ cert/key) ⇄ TLS: server cert + client cert
Server verifies client chain against trust store (+ optional CRL/OCSP)
App maps verified identity → authorization
2. Baseline happy path (authorized)
Connect with a valid client cert from the trusted CA; confirm app success.
Log verified subject/SAN/fingerprint only — never the private key.
Note end-to-end mTLS vs edge terminate + re-encrypt or plaintext east-west.
Minimal in-scope probes; one clear reject per class is enough:
No cert when required → fail closed.
Wrong CA / self-signed client → reject.
Expired / not-yet-valid → reject.
Valid CA, wrong SAN (other env/service) → reject or least privilege.
Optional mode: unauthenticated must not perform privileged actions.
Header spoof: backend request with forged client-identity headers and no cert —
must not trust unless path is private and edge always overwrites.
Do not flood handshakes or brute-force serials against shared production.
5. Keys, debug, implement, remediate
Keys: no private keys in git/images; secret store or workload identity; separate
dev/stage/prod CAs or name constraints → secrets-management-hygiene.
Debug: server TLS logs and authorized key logging; if proxies stay empty, use
tls-plaintext-acquisition on owned clients. Check clock skew, chain send, SNI.
Code: fail closed if trust bundle missing; parse peer cert from TLS stack, not
untrusted headers; log fingerprint/subject only → code-quality-standards.