Safeguard
Security Guides•

When is mutual TLS worth it for an API?

Mutual TLS has the client prove identity with a certificate. It suits high value machine to machine APIs. What it adds, what it does not, and the overhead.

Safeguard Security Team
4 min read

Use mutual TLS when the clients are known machines or partners and the API is high value, so you can issue and revoke client certificates. OWASP says client certificates should be considered for high-value applications or APIs, and notes they are rarely used in public systems because of administrative overhead.

What mutual TLS adds

In ordinary TLS, only the server proves who it is. In mutual TLS, the client also presents a certificate during the handshake, and the server checks it. You get a cryptographic identity for the caller before any request is read.

OWASP notes that in TLS 1.3 this proof is bound to the handshake transcript, which prevents relaying the authentication to another connection.

What it does not do

OWASP also states that mutual TLS does not provide confidentiality against a server whose certificate the client accepts, so the client must still validate the server's identity and trust configuration independently. It also says nothing about what the caller is allowed to do. You still need authorization on every request.

Decision table

SituationMutual TLS fit
Service to service inside your own platformGood, if certificate issuance is automated
A small number of partners calling a sensitive APIGood
A public API with millions of unknown clientsPoor, use tokens
Mobile or browser clientsUsually poor, key handling is hard for users
You want to bind tokens to a clientA fit, as an extra layer

The real cost is operations

The cryptography is easy. The work is certificate lifecycle: issuing, distributing, renewing and revoking. If renewal is manual, an expired client certificate becomes an outage on a Friday night.

Questions to answer before you start:

  1. Who is the certificate authority for client certificates, and who guards its key?
  2. How is a certificate issued to a new client, and how fast?
  3. How are certificates renewed, automatically or by hand?
  4. How do you revoke one, and how quickly does the server notice?
  5. How do you map a certificate to an identity and to permissions?
  6. What do you log, and who reads it?

Rollout steps

  1. Start with one internal service pair and automate issuance.
  2. Enforce at the edge or a proxy first, so applications need no change.
  3. Run in an optional mode where the server logs missing certificates without rejecting them.
  4. Fix the logged gaps, then switch to required.
  5. Keep authorization checks in the application after the handshake.
  6. Practice a revocation drill.

Alternatives

Signed tokens, request signing with a shared secret and a MAC, and network level controls solve parts of the same problem with less certificate work. Mutual TLS works well together with them rather than replacing them.

Try it yourself

Open the API scan demo and see how authentication and authorization findings are reported for endpoints. Ask which of your findings a client certificate would address, and which it would not.

Click through it at your own pace, or open it full screen.

Safeguard can generate an SBOM and scan your dependencies, so outdated cryptography libraries with known advisories show up in one inventory, and policies can gate a build on them. A free scan is at gold.safeguard.sh/scan.

Quick check

Does mutual TLS replace API keys?

It can replace them for identifying a client, but you still decide what each client may do.

Is it safe to terminate mutual TLS at a proxy?

It can be, if the proxy passes the verified identity to the app over a trusted path that clients cannot spoof.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.