Mutual TLS, or mTLS, adds client certificate authentication to the usual server certificate check. In a typical HTTPS connection, the client validates the server's certificate. With mTLS, the server also requests a certificate from the client and decides whether to accept that certificate under its trust policy. This lets a service verify the certificate identity of another service, device, or managed user computer before granting access to the application.

Using mTLS requires a way to issue, distribute, renew, and withdraw client certificates. Requiring certificates is less practical for an open public website with unknown visitors. The server can verify an identity assigned to the client certificate, but the application still needs to decide what that client may do.

Authenticate the Server and the Client

During a certificate-based TLS handshake, the server presents a certificate that the client validates against the intended hostname and a trusted issuer. For mTLS, the server sends a CertificateRequest and the client presents a certificate and proves possession of its matching private key. In a deployment that trusts certificate authorities, the server validates the client certificate chain and applies its configured acceptance policy. A successful signature check demonstrates that the client holds the private key without sending that key over the network.

This two-way check can reject callers that lack an enrolled certificate before application data is accepted. It does not remove the need to validate the server certificate; a client should still confirm it connected to the intended endpoint. Nor does it make every certificate issued by a trusted CA appropriate for every API. The server needs explicit rules for which client issuers, identities, and certificate purposes it accepts.

When mTLS Fits

mTLS is commonly used between services, in business-to-business APIs, and for managed devices. For example, an organization can enroll its own monitoring agents or a partner's API clients before allowing them to connect. Those clients can receive certificates through an agreed process, and their access can be withdrawn when the service or partnership ends. For a general consumer site, distributing client certificates to every visitor and supporting every browser or device is usually impractical.

Plan a Private CA and Enrollment Process

Many deployments use a private certificate authority to issue client certificates to known workloads or devices. A controlled enrollment process associates a certificate identity with a specific service, device, or operator. The server is configured with the trusted CA certificates needed to validate client certificate chains. Depending on the product, intermediate CA certificates may also need to be supplied in the trust configuration or by the client. Each client keeps its private key protected and sends its certificate during authentication.

Choose identity fields and lifetimes that support the intended mapping. A certificate shared by several services makes it difficult to distinguish callers or withdraw access for one service without affecting the others. Separate certificates let you replace or revoke one client's credentials independently, but each certificate must be tracked and renewed. Protect CA signing keys and restrict who can issue new client certificates. A valid chain establishes trust through an accepted CA, which may be above the direct issuer in the chain. The service must still check whether the identity in that certificate is permitted to connect.

Product behavior varies. NGINX provides client certificate verification controls, while managed API gateways have their own trust store and validation rules. Check the settings of the server or proxy that actually handles TLS. Test with an authorized client, an unknown client, an expired certificate, and no certificate to confirm which connections are accepted.

Verify Client Identity at a Proxy

A CDN, load balancer, or reverse proxy may terminate the public TLS connection. When that intermediary performs mTLS, the backend application does not directly participate in the client's original TLS handshake. The proxy forwards the request over a separate connection to the backend. That connection may be reused for multiple requests.

The proxy must enforce client certificate verification at its own boundary and pass identity information to the application only through a protected, authenticated channel. The proxy must remove or overwrite any client-supplied header that claims to carry verified certificate identity, and the backend must accept that information only from the trusted proxy.

Treat the client-to-proxy, proxy-to-backend, and service-to-service connections separately. Each can have its own mTLS policy and trust store. Enabling client authentication on one connection does not automatically enable it on another. If the backend can also be reached without passing through the verifying proxy, restrict that access or require equivalent authentication there.

Renew, Revoke, and Monitor Certificates

Replace client certificates before they expire so authorized clients can continue to connect. Automate issuance and rotation where possible, and monitor certificates actually presented by active clients. Plan how to withdraw access if a device is lost or a private key is compromised, without waiting for the certificate to expire. Revocation mechanisms and checks are product-specific: a trust store containing an issuer does not prove that a gateway checks each leaf certificate for revocation. For REST APIs, AWS API Gateway does not perform client certificate revocation checks itself; a Lambda authorizer can perform an additional revocation check.

Document how each server receives revocation information or updated access rules, how quickly updates arrive, and what happens if the required status service is unavailable. Shorter certificate lifetimes reduce the time a stolen credential can remain valid, but renewal must be reliable. Record certificate identifiers and validation errors needed for diagnosis, and keep private keys out of logs.

Keep Application Authorization Separate

Successful mTLS authentication proves that the connecting client holds the private key associated with an accepted certificate identity. It does not answer whether that client may read an account, change billing settings, or call an administrative endpoint. The application or gateway must map the certificate identity to a current account or service identity and enforce permissions for each action.

For example, a monitoring agent with an accepted certificate might be allowed to submit health reports but not change service settings. Removing the agent's permission to submit reports should prevent new submissions even if its certificate remains valid. Test the certificate check and the application permission check separately so that accepting a certificate does not accidentally grant unrestricted access.