How Mutual TLS Uses a Client Certificate

See what the client and server each verify in mutual TLS, and distinguish a failed handshake from an authenticated request that lacks permission.

FBFenwei BianAuthorNov 24, 2026
  • tls
  • mtls
  • certificates
  • guide

Mutual TLS (mTLS) uses a TLS handshake to authenticate both endpoints. The client verifies the server certificate. The server requests a client certificate and checks the client's proof that it holds the corresponding private key. A service can then use that client identity when it decides which requests to allow.

Give each side a trust decision

Imagine an internal report worker calling a billing API. The worker needs to trust the issuer of the API's server certificate and check the API's hostname. The API's TLS endpoint needs to trust the issuer of the worker's client certificate and check that the certificate meets its client identity and usage rules. The two trust configurations can use different authorities.

In TLS 1.3, the CertificateRequest message asks for the client certificate. A CertificateVerify signature proves possession of the corresponding private key. Giving two workers the same key removes a useful distinction between identities, so issue and rotate credentials per workload where practical.

Identify which check failed

Observation in this exampleWhat to examine first
Worker refuses to connect and reports an untrusted server issuerThe API's served chain and the worker's trust store
API's TLS endpoint says a client certificate is requiredWhether the worker configured a client certificate and key for this endpoint
API's TLS endpoint rejects a supplied client certificateClient certificate expiry, chain, accepted issuer, usage and identity rules
Worker completes TLS and gets an application denialWhich identity the API received and which actions its policy grants

When a gateway terminates TLS, use that gateway's handshake logs for certificate checks. Then verify how it passes the authenticated identity to the application. The application needs a trusted path for that identity so it does not treat an arbitrary request header as proof of a client certificate.

Give rotation an acceptance test

Install a replacement client certificate and key on one staging instance. Use a test report and an isolated test record to confirm that the allowed read succeeds and that the forbidden write is blocked. If the issuing CA is also changing, test the intended old and new trust paths during the transition and remove the old trust after the migration completes. Monitor the expiry of the CA and the leaf certificates separately.

Client certificate authentication can coexist with additional authorization rules. One example, OAuth mutual TLS in RFC 8705, treats client authentication and certificate-bound access tokens as distinct mechanisms. In the billing example, the certificate identifies the worker. The API policy still decides which reports the worker can read.

Sources and further reading

About the author(s)

Software Developer & Writer • Namefi
FBAuthor

Fenwei Bian is a software developer in her thirties who spends her working hours in pull requests and her weekends with her hands in soil or sawdust. Years of open source on GitHub taught her that names are interfaces: a good one is clear, honest about what it does, and kind to whoever has to use it next.

She gardens because it rewards patience and punishes wishful thinking, and she does woodwork because a joint either fits or it doesn't. Both habits show up in how she writes about naming — measure twice, check the source, and don't sand over a rough spot and hope no one notices.

For Namefi she writes about how domain markets actually move, the practical trade-offs of tokenizing and flipping names, and picking a domain you'll still be glad you own in twenty years.

Related guides

Discuss this post

View the discussion on Namefi Discuss