SECURITY / A CONCEPT NOTE

mTLS

mutual TLS — both sides prove their identity, not just the server

~85 sec read

Overview · mechanism
pitfall · examples

01 / THE SHORT VERSION

The idea in a few sentences.

In regular TLS, only the client verifies the server's certificate. In mutual TLS (mTLS), the server also verifies the client's certificate. Both sides present certificates signed by a trusted CA. This ensures that not only is the server who it claims to be, but every connecting client is authenticated with a cryptographic identity — not just a password or API key.

02 / FOLLOW THE MECHANISM

How an mutual handshake works

  1. Client

    initiates a connection and sends its ClientHello with supported ciphers.

  2. Server

    responds with its certificate and requests the client's certificate (CertificateRequest).

  3. Client

    sends its signed certificate and proves possession of the corresponding private key.

  4. Server

    validates the client certificate against its trusted CA pool and extracts the client identity.

  5. Encrypted channel

    both sides have mutually authenticated. Traffic is encrypted with the negotiated session keys.

04 / COMMAND NOTES

Read the command, then the result.

Inspect the flags and arguments before trying an example. Snippets can need local setup, replacement values, or resources in your own environment.

EXAMPLE 01 · REFERENCE

test an mTLS connection

openssl s_client -connect my-service:443 -cert client.crt -key client.key

EXAMPLE 02 · REFERENCE

check certificates mounted in a pod

kubectl exec deploy/my-app -- ls /etc/certs

Explore command anatomy in the CLI lab