mTLS (mutual TLS) is a TLS mode in which both endpoints prove their identity with X.509 certificates: the server presents its certificate as usual, then requests one from the client and verifies it against a trusted certificate authority before any application data flows. In TLS 1.3, mTLS authentication fits inside the normal one-round-trip handshake, so it adds no extra network round trip.
Under TLS 1.3 (RFC 8446, published 2018), mutual TLS works through three handshake messages: the server sends CertificateRequest, and the client answers with Certificate and CertificateVerify, a signature over the handshake transcript. A client that cannot produce a valid certificate fails the handshake before a single HTTP byte is exchanged. This makes mTLS a transport-layer identity check that leaked bearer tokens cannot bypass.
mTLS authentication extends the standard handshake with a server-initiated certificate request and a client-side proof of private key possession. Both sides validate a chain, check validity windows, and then map the authenticated identity to authorization rules. The full exchange still completes in one round trip on TLS 1.3, with the client's certificate encrypted.
Two timing details matter at scale. On TLS 1.2 the client certificate travels in cleartext, exposing client identity to passive observers; TLS 1.3 encrypts it. Session resumption through pre-shared keys carries the authenticated identity forward, so a resumed connection skips the client signature entirely. TLS 1.3 also defines post-handshake authentication, but HTTP/2 forbids it (RFC 8740), so per-path client certificate prompts do not work over HTTP/2.
Mutual TLS authenticates whatever terminates the TLS session, not the application behind it. If a load balancer terminates TLS, the backend only learns the client identity from a forwarded header, so the proxy must strip any inbound copy of that header and set its own; Envoy's x-forwarded-client-cert header is the common pattern.
Typical deployments fall into four groups: service meshes such as Istio and Linkerd, where workload certificates rotate automatically with lifetimes commonly between 1 and 24 hours; business-to-business APIs in finance and payments; device fleets and IoT gateways; and CDN-to-origin connections.
On the origin leg, the edge acts as the TLS client and presents a certificate the origin requires. This closes the classic bypass where an attacker who discovers the origin address skips the edge and its controls. IP allowlisting cannot close it reliably, because shared edge IP ranges serve every customer of that provider.
The detail most glossaries miss: a client certificate shared by the whole provider only proves "this request came from that CDN", not "this request came from my zone". Any other tenant on the same provider can point a zone at your origin and present the same certificate. Insist on a certificate you issue, or one unique per zone, and pin authorization to its subject.
mTLS vs. one-way TLS: one-way TLS authenticates only the server; the client stays anonymous at the transport layer and identifies itself later, if at all, with credentials inside HTTP. Mutual TLS moves client identity into the handshake, so unauthenticated clients never reach the application.
mTLS vs. API keys and bearer tokens: a token is a replayable secret; anyone holding it is the caller. An mTLS identity requires a signature from a private key that never leaves the client, ideally a hardware module. Many APIs combine both: mTLS for workload identity, OAuth tokens bound to the certificate (RFC 8705) for user-level scope.
mTLS vs. IP allowlisting: allowlists authorize a network location, which breaks under NAT, shared egress ranges and cloud address churn. Certificates authorize a cryptographic identity that survives address changes and can be revoked individually.
On an nginx origin, four directives in the TLS server block cover the core configuration:
For nginx acting as the client toward an upstream, the matching directives are proxy_ssl_certificate and proxy_ssl_certificate_key, with proxy_ssl_verify enabled so the upstream is authenticated too. To test, open a connection with the OpenSSL s_client tool once with the client certificate and key and once without; on TLS 1.3 the second attempt should end with the certificate_required alert (alert code 116).
Rolling out mTLS safely means observing before enforcing: deploy verification in optional mode, log which clients present valid certificates, migrate the stragglers, then enforce. The phased matrix below gives each stage an exit criterion so the cutover is a measured decision rather than a guess.
| Phase | Server setting | What to watch | Exit criterion |
|---|---|---|---|
| 1. PKI | Offline root, online issuing intermediate | Issuance automation, certificate lifetime | Every client can obtain and renew a certificate unattended |
| 2. Observe | Verification optional | Share of requests with a verified client certificate | Verified share holds at 100 for 7 days |
| 3. Enforce | Verification on | Handshake failures by alert type | No unexplained failures for one full rotation cycle |
| 4. Rotate | Trust bundle holds old and new CA | Days to expiry of the soonest certificate | Old CA removed only after its last leaf expires |
The phase that prevents outages is the overlapping trust bundle, because most mTLS incidents are expired or rotated certificates, not attacks.
Two operational rules follow. Alert on days to expiry for every certificate, with a threshold at one third of its lifetime. And keep certificate lifetimes short enough that renewal runs weekly or more often; automation that runs once a year is automation nobody trusts.
mTLS is TLS where both sides show a certificate. In normal HTTPS only the server proves its identity; with mutual TLS the server also asks the client for a certificate signed by a CA it trusts, and refuses the connection if the client cannot prove it holds the matching private key. It is widely used for service-to-service and origin traffic.
mTLS adds no extra round trip on TLS 1.3, because the certificate request and response travel inside the existing handshake flights. The added cost is a few kilobytes of certificate chain and one signature plus one verification. Resumed sessions using pre-shared keys skip the client signature, so steady-state latency impact is usually negligible.
mTLS is stronger than API keys for workload identity, because a key can be copied and replayed while an mTLS identity requires a private key that never leaves the client. API keys are simpler for third-party developers. Many production APIs use both: mutual TLS for the connection, plus certificate-bound tokens for per-user scope.
mTLS protects an origin by rejecting any TLS connection that does not present a client certificate the origin trusts, so attackers who find the origin address cannot bypass the edge. The protection is only meaningful if the certificate is unique to your account or zone; a certificate shared across all tenants of a provider proves very little.
Run one check against every origin this week: open a TLS session without a client certificate from a host outside your edge provider and record whether the origin serves content. Then list which identity your origin actually authorizes (a zone-specific subject or merely a provider-wide one), how many days remain until the soonest client certificate expires, and whether your proxy strips inbound client certificate headers. Those four answers tell you whether your mTLS deployment blocks bypass or only looks like it does.
For the cache layer in front of that origin, the BlazingCDN features for origin protection and delivery page lists what every plan includes, from origin shield and request coalescing to signed URLs, tokens and IP lists, along with the 14-day testing period on real production traffic.