Card 08/ 10
Mutual TLS: The Client Proves Itself Too
In mutual TLS the server asks for a certificate as well, so both ends know who the other is.
Mutual TLS (mTLS) is TLS in which the client also presents a certificate and proves it holds the matching private key, so the server knows which client is connecting as surely as the client knows which server. In ordinary TLS only the server is authenticated; the client is anonymous at the TLS level and identifies itself later, with a password or a token inside the encrypted connection.
The handshake grows by three messages. The server sends a CertificateRequest, naming the CAs it accepts. The client answers with its own Certificate chain and a CertificateVerify, a signature over the handshake made with its private key. The server checks the client's chain against its own trust store, exactly as the client checks the server's. If the client sends no certificate, or one the server does not trust, the server ends the handshake with an alert.
Mutual TLS is used where both ends are machines run by organisations that can issue certificates. Services inside one company use it so that each service can prove its identity to the next, often with a service mesh managing it. Banks and payment networks use it for partner connections, and some devices use it to identify themselves to a cloud service.
It is rare between browsers and public websites, because issuing certificates to every user is impractical, and users manage passwords and tokens far more easily than private keys.
The cost is the certificates. Every client needs one, with a private key kept safe, and each one expires. A system with hundreds of services needs automatic issuing and renewal, or certificates lapse and calls fail with errors that point at the client rather than the server.
So when a connection between two services fails during the handshake with a "certificate required" or "unknown CA" alert, look at the client's certificate, not the server's.
- Networking
- Security
← → move through sections and cards