Articles

What Is mTLS? Mutual TLS Authentication Explained

mTLS is TLS where both client and server present certificates, so each side cryptographically proves its identity before any data is exchanged.

Chisato Chisato · · 4 min read
A padlock icon over streaks of light trails

mTLS, or mutual TLS, is a variant of the TLS protocol where both the client and the server present certificates and verify each other’s identity, instead of only the client verifying the server. Standard HTTPS uses TLS to let a browser confirm it’s talking to the real example.com — but the server has no cryptographic proof of who’s connecting to it. mTLS closes that gap by requiring the client to prove its identity too, before either side exchanges application data.

How a normal TLS handshake works, and what mTLS adds

In one-way TLS — the kind that secures ordinary web browsing — the server presents a certificate signed by a trusted certificate authority. The client verifies that certificate against a set of trusted root authorities, confirms the domain name matches, and proceeds. The server never asks the client to prove anything; anyone can open a connection to a public HTTPS endpoint.

mTLS adds a second leg to that handshake: after the server presents its certificate, it requests one from the client in return. The client presents its own certificate, and the server verifies it against certificates it trusts — usually a private, internal certificate authority rather than a public one, since mTLS is typically used between systems you control rather than with the general public. Only if both verifications succeed does the connection proceed. Neither side is trusting the other on the basis of a password, API key, or shared secret — both sides are proving identity with a private key they hold and never transmit.

Why services use it instead of API keys or tokens

API keys and bearer tokens are useful, but they share a weakness: they’re portable secrets. Anyone who obtains the key or token — through a leaked config file, a compromised log, or a misconfigured environment variable — can use it, and the receiving server has no way to distinguish the real caller from someone who stole its credential. A stolen key looks identical to a legitimate one on the wire.

mTLS certificates are harder to exfiltrate and use, because the private key backing the certificate never needs to leave the machine or service that holds it — the handshake proves possession of the key without transmitting it. This makes mTLS a common choice for service-to-service authentication inside infrastructure you control: internal APIs, microservice meshes, and anywhere the goal is verifying “is this really our payments service calling,” not just “does the caller have a valid-looking credential.”

Where mTLS shows up

Service meshes. A service mesh commonly uses mTLS by default for all service-to-service traffic inside a cluster, handling certificate issuance and rotation automatically so individual services don’t have to manage their own certificate lifecycle. This gives every internal call both encryption and mutual authentication without application code having to implement either.

Zero trust architectures. Zero trust security assumes no request should be trusted by default, regardless of which network it originates from — internal or external. mTLS is one of the standard building blocks for that model, because it lets every connection, even ones inside a private network, carry cryptographic proof of both endpoints’ identity rather than relying on network location as an implicit trust signal.

IoT and machine-to-machine authentication. Devices that need to authenticate to a backend without a human present to type a password are a natural fit for certificate-based authentication — the device holds a certificate provisioned at manufacture or setup time, and it authenticates every connection without any interactive login step.

Partner and B2B APIs. Organizations exchanging sensitive data over the internet sometimes require mTLS specifically because it puts the burden of key management on both parties symmetrically, and because certificate revocation offers a cleaner way to cut off compromised access than rotating a shared secret across every consumer of an API.

The operational cost

mTLS isn’t free to run. Every client needs a certificate, and every certificate needs to be issued, distributed, rotated before expiry, and revoked when a service is decommissioned or compromised. At small scale this is manageable by hand; at the scale of hundreds of internal services, it typically requires dedicated infrastructure — an internal certificate authority and automated issuance and rotation — which is exactly the problem service meshes and platform tooling are built to solve. Skipping that automation and managing mTLS certificates manually is a common way teams end up with outages caused by an expired certificate nobody was tracking.

mTLS vs one-way TLS vs API keys

One-way TLS (standard HTTPS)API keys / tokensmTLS
Server identity verifiedYesYes (via TLS)Yes
Client identity verifiedNoVia the key/token itselfYes, cryptographically
Credential can be stolen and reusedN/AYesMuch harder — private key never transmitted
Operational overheadLowLowHigher — certificate lifecycle management
Typical usePublic-facing websites and APIsSimple API authenticationService-to-service, zero trust, high-assurance B2B

The takeaway

mTLS extends the trust that ordinary TLS gives you about a server’s identity to the client as well, replacing a portable secret with proof of possessing a private key that never leaves the device holding it. It’s the standard default for service-to-service traffic inside a mesh and a core building block of zero trust designs, but it comes with real operational weight — certificate issuance, rotation, and revocation at scale — that’s worth automating rather than managing by hand.

Chisato Chisato · · 4 min read

What Is a Replay Attack?

A replay attack resends a captured, valid message to trick a system into repeating an action — and why timestamps, nonces, and signatures stop it.

#Security #Authentication #Networking
Chisato Chisato · · 4 min read

OCSP vs CRL: How Certificate Revocation Works

OCSP and CRL are the two mechanisms browsers use to check if a TLS certificate has been revoked before its expiry date. Here's how each works.

#Security #Cryptography #Networking