In an ordinary HTTPS connection, only one side proves who it is: the server. The client stays anonymous as far as TLS is concerned, and is identified afterwards by a password or an API key.
mTLS (mutual TLS) removes that asymmetry: the client presents a certificate too, and the server checks it before accepting the connection. It is the strongest protection for a flow between two organisations. It is also the one whose certificates are easiest to forget, because renewing them depends on a third party.
Plain TLS and mutual TLS: the difference
| Plain TLS | mTLS | |
|---|---|---|
| The server proves its identity | Yes, with its certificate | Yes, with its certificate |
| The client proves its identity | No, not at the TLS level | Yes, with its own certificate |
| A stranger can open a connection | Yes, and then try to authenticate | No, the connection is refused during the handshake |
| Certificates to manage per flow | One | At least two, plus the authorities each side trusts |
Here is what happens when an mTLS connection opens:
- 1. Opens the TLS connection
- 2. Server certificate
- Checks: accepted authority, name, dates
- 3. Requests a certificate from the client
- 4. Client certificate, and a signature made with its key
- Checks: accepted authority, dates, signature
- 5. Connection established between two identified ends: data moves
Three things to remember:
- Each side chooses the authorities it accepts. A valid certificate issued by another authority is refused.
- The private key never travels. The client sends its certificate, which is public, and a signature proving it holds the key.
- No application data moves until these checks are complete.
Why an API key or IP filtering is not enough
These are the two usual protections for a flow between organisations. Each has a weakness that mTLS does not.
| Protection | What it proves | Its limit |
|---|---|---|
| API key, password | “The caller knows the secret” | The secret travels in every request. It ends up in logs, configuration files and messages. Whoever copies it can use it from anywhere. |
| IP address filtering | “The call comes from this network” | An address is not an identity. Cloud provider addresses are shared and change. Everything leaving through the same gateway carries the same address. |
| mTLS | “The caller holds the private key of this certificate” | The key never leaves the caller’s machine: only a signature is sent. What remains is managing the certificates, which is the subject of this article. |
mTLS does not necessarily replace the other two: many providers combine it with an API key. But it is what guarantees that the API key, even stolen, is useless without the certificate.
Flows between your data centre and the Internet
As long as an exchange stays inside your network, you control the path. Once it leaves, you only control its two ends. That is the case for many everyday flows:
- your servers call the API of a bank, a payment provider, a carrier or a government service;
- a provider calls your API, or sends you notifications (webhooks);
- a managed service provider, a software vendor or a subsidiary connects to a service you expose.
In both directions the question is the same: who is really at the other end?
- When you call a provider, it must be sure it is you. A transfer order or a request for personal data sent by someone who obtained your API key is a serious incident, for the provider and for you.
- When a provider calls you, your service is exposed to the whole Internet. With mTLS, only holders of a certificate you have accepted get past the TLS handshake. Bots and intrusion attempts are turned away before they reach your application.
Some sectors already require it. The banking APIs opened by the PSD2 directive, for example, identify providers by certificate.
Flows from Internet to Internet
More and more flows no longer touch your data centre at all: your cloud-hosted application calls an online service, two of your suppliers exchange data on your behalf, an online service notifies your API, itself hosted by a third party.
Here the network proves nothing:
- There is no perimeter. Neither end sits behind your firewall.
- IP addresses mean nothing. They belong to the hosting provider, are shared between its customers and change with every redeployment.
- No private link is possible between two suppliers that only know each other through you.
The only stable thing is the identity carried by a certificate. This is “zero trust” applied to flows between services: you do not trust where the call comes from, you check who is calling, on every connection.
Who holds which key and which certificate
An mTLS flow involves six items, three on each side. Two are secret, the other four are public.
the client- Client private keysecretGenerated on your systems. Never leaves them, not even for the provider.
- Client certificatepublicYour public key and your name, signed by an authority. Presented to the provider on every connection.
- Certificate of the server’s authoritypublicStored in your accepted authorities. Used to verify the provider’s certificate. Often a public authority, already there.
the server- Server private keysecretGenerated on its systems. Never leaves them, not even for you.
- Server certificatepublicIts public key and its name, signed by an authority. Presented to your application on every connection.
- Certificate of your client certificate’s authoritypublicStored in its accepted authorities. Used to verify your client certificate.
Three rules follow from this diagram:
- Each side generates its own private key, and keeps it. The provider never needs yours, and you never need its.
- A certificate is shown, not handed over. It is a public key and a name, signed by an authority. Each side presents its own to the other, on every connection.
- To verify the other side’s certificate, you need the certificate of the authority that signed it, not the certificate itself. The other side can therefore renew its certificate without telling you, as long as it keeps the same authority. Some providers nevertheless register your exact certificate: they must then receive the new one at every renewal.
One question remains to ask the provider from the start: who signs your client certificate?
| Case | Who signs | What you send to the provider |
|---|---|---|
| Most common | The provider’s authority | A signing request (CSR) |
| You have a private authority | Your authority | Your authority’s certificate, or your client certificate |
Setting up an mTLS flow, step by step
Here is the most complete case: you have a private certificate authority, and it signs both the server’s certificate and the client’s. Three actors, six phases, 35 steps. In the diagrams, boxes are actions each side does on its own, solid arrows are things sent, dashed arrows are replies.
Phase 1: the server certificate
- 1. Generates its private key and public key
- 2. Generates the server CSR, with its DNS name
- 3. Sends its CSR
- 4. Submits the server CSR
- 5. Checks the request and signs (serverAuth)
- 6. Returns the signed server certificate
- 7. Sends the server certificate and the authority chain
- 8. Installs the certificate with its private key
- The provider generates its key pair. The private key stays on its server. The public key will go into the certificate.
- It prepares a signing request (CSR). It contains its public key and the DNS name of its API, in the SAN field. This is the name your application will check on every connection.
- It sends you its CSR. It contains nothing secret: a portal or an email is enough.
- You submit it to your authority.
- The authority checks the request and signs, with the
serverAuthusage: this certificate can only be used to authenticate a server. - It returns the signed server certificate to you.
- You send it to the provider, with your authority’s chain: the authority’s certificate and any intermediates.
- The provider installs the certificate next to its private key.
Phase 2: the client certificate
- 9. Generates its private key and public key
- 10. Generates the client CSR
- 11. Submits the client CSR
- 12. Checks the request and signs (clientAuth)
- 13. Returns the signed client certificate
- 14. Installs the certificate with its private key
- You generate your key pair, on the machine that will call the API: gateway, application server, key store.
- You prepare the client CSR, with the name that will identify your application.
- You submit it to your authority.
- The authority checks and signs, this time with the
clientAuthusage: this certificate can only be used to authenticate as a client. - It returns the signed client certificate.
- You install it next to its private key.
Phase 3: trust
- 15. Configures the server’s trusted authority
- 16. Sends the clients’ authority and the expected identity
- 17. Configures the client’s trusted authority
- 18. Makes the client certificate mandatory
- 19. Links the client identity to its permissions
- You declare the server’s trusted authority: your application will only accept a server certificate signed by it.
- You send the provider the certificate of the authority that signs your clients, and the expected identity: the name your client certificate carries.
- The provider declares that authority as trusted for clients.
- It makes the client certificate mandatory. Without this step, the server asks for a certificate but also accepts connections that present none: the flow is not protected.
- It links your identity to permissions: this certificate may call these API operations, and not the others.
Phase 4: the mTLS handshake (TLS 1.3)
- 20. ClientHello
- 21. ServerHello and TLS parameters
- 22. EncryptedExtensions
- 23. CertificateRequest
- 24. Certificate (server)
- 25. CertificateVerify and Finished
- 26. Checks the chain, the DNS name and the signature
- 27. Certificate (client)
- 28. CertificateVerify: proof of the private key
- 29. Finished
- 30. Checks the authority, the certificate and the client’s proof
- mTLS connection established
- ClientHello. Your application offers the versions and algorithms it accepts, and sends an ephemeral key.
- ServerHello. The server chooses, and sends its own ephemeral key. From here on, everything is encrypted.
- EncryptedExtensions. The additional parameters of the connection.
- CertificateRequest. This is the message that makes it mTLS: the server asks the client for a certificate.
- Certificate. The server presents its certificate.
- CertificateVerify and Finished. The server signs the exchange with its private key, which proves it holds it, then closes its part.
- Your application verifies: the chain leads to the trusted authority, the DNS name called is in the certificate, the dates are valid, the signature is correct.
- Certificate. Your application presents its client certificate.
- CertificateVerify. It signs the exchange with the client’s private key. Only the signature is sent, never the key.
- Finished. The client closes its part.
- The provider verifies: the authority is accepted, the certificate is valid and carries the client usage, the signature proves possession of the key.
If a single one of these checks fails, the connection stops, before any API data has moved.
Phase 5: API calls
- 31. HTTPS POST /api/v1/quotes
- 32. Checks application permissions
- 33. HTTPS 200 OK and response
- Your application calls the API, inside the encrypted and authenticated connection.
- The provider checks permissions. mTLS says who is calling; the application decides what that caller is allowed to do.
- It answers.
Two calls are enough to check the setup:
# With the client certificate: the call must succeed
curl --cert client.crt --key client.key --cacert authority.crt https://api.provider.example/api/v1/quotes
# Without a client certificate: the call must be refused
curl --cacert authority.crt https://api.provider.example/api/v1/quotes
The second matters as much as the first: if it succeeds, step 18 was forgotten.
Phase 6: the lifecycle
- 34. Monitors the client certificate’s expiry
- 35. Monitors the server certificate’s expiry
- Renewal before expiry
- You monitor the expiry of your client certificate.
- The provider monitors the expiry of its server certificate. You have every reason to track it too: when it comes, your calls are the ones that fail.
Renewing means replaying phase 1 or phase 2. As long as the authority does not change, phase 3 stays in place: that is the point of trusting an authority rather than one specific certificate.
Variants
- The provider already has a public server certificate. Phase 1 disappears, and step 15 comes down to checking that your application trusts public authorities.
- The provider’s authority signs your client certificate. In steps 11 to 13, you send your CSR to the provider, which returns the certificate. Step 16 is limited to the expected identity.
- The provider calls you (notifications, webhooks). The roles are reversed: you are the server, and you are the one making the client certificate mandatory.
In every case the order stays the same: the key first, where it will be used; the signing request next; the certificate last. A private key is never sent, not even to save time.
What mTLS adds to your inventory
An mTLS flow relies on several certificates, spread across two organisations (who holds what). Each has its own expiry date, and its own owner.
| Certificate | Issued by | Installed at | If nobody renews it |
|---|---|---|---|
| Your client certificate | The provider’s authority, or your private authority | You (the key), and sometimes registered with the provider | Your calls are refused |
| The provider’s server certificate | A public authority, most often | The provider | Your calls fail, unless you disable verification, which you should never do |
| The accepted authorities on each side | Each organisation for its own | Both | The renewed certificate is refused although it is valid |
| The provider’s client certificate, if it calls you | Your authority, or its own | The provider | Its calls to you are refused |
Why these certificates are the hardest to track
No scan sees them
A TLS scan reads the certificate a server presents. A client certificate is presented by no server: it sits in a gateway, a keystore or an application’s configuration, and is only used when that application calls the provider.
Certificate Transparency logs do not know it either. Public authorities are ceasing to issue certificates usable on the client side: the Chrome Root Program asks them to dedicate themselves to server authentication, and Let’s Encrypt removed that usage from its certificates in 2026. Client certificates therefore come from private authorities, yours or the provider’s, which publish nothing.
Their lifetime is not like the others
The 47-day rule only covers public server certificates. A client certificate issued by a private authority lasts as long as that authority decided: often one, two or three years.
That is long enough for the person who installed it to have moved on, and for the procedure to be forgotten.
Renewal takes two
Renewing a website certificate takes a few minutes, and the ACME protocol does it unattended. Renewing a client certificate with a provider looks more like this:
- 1. YouNew key and certificate signing request (CSR).
- 2. YouSent to the provider: portal, ticket or email.
- 3. ProviderSigns the request, or registers your new certificate.
- 4. YouCertificate installed.
- 5. TogetherSwitchover date, test, old one removed.
Every step depends on the other organisation’s lead time. Think in weeks, not minutes: an alert at 7 days comes too late.
The outage is abrupt and hard to read
An expired client certificate does not degrade the service: it cuts it. Every connection is refused at the same instant, often at night, during a batch job. The error message is limited to “handshake failure” or “bad certificate”, and the first lead followed is rarely the right one.
The provider’s certificate changes too
With server certificates renewed every 47 days from 2029, your provider’s will change eight times a year. If your application only accepts that exact certificate (“pinning”), it will break at every renewal. It is better to trust the authority that issues it, and to know when it changes.
What PkiZen brings for these certificates
PkiZen does not renew your certificates and holds no private key. Its role is to make sure these certificates, which nothing detects on its own, have a known expiry date, an owner, and an alert that goes out early enough.
Record the client certificate. You import its public part: a .pem, .crt or .cer file, or a ZIP archive for several certificates at once. The application reads the name, the issuer and the expiry date. The private key is never requested.
Write down what will be missing on the day. For each certificate:
- Installed on: the gateway, application or keystore where it lives, and the flow it serves (“outbound gateway, bank X transfers”);
- Notes: the contact at the provider, the address of its portal, its procedure, its usual lead time.
Warn ahead of time. The reminder is set certificate by certificate, up to a year before expiry. For a certificate that depends on a provider, 60 or 90 days leave time for the round trip.
Warn the right people. On top of the organisation’s recipients, each certificate can have its own: the team that manages the relationship with the provider, or even the provider itself.
Watch the other end. Add the provider’s public endpoint to a domain scan: you follow its server certificate, its expiry and its replacement, in the same inventory. The scan reads the certificate presented at the start of the handshake, without a client certificate. If the provider’s server drops the connection before that, import its certificate by hand.
Keep the record. Each renewal adds a version to the certificate’s history. That is the evidence expected in an audit, in particular for the register of certificates required by DORA.
If your client certificates are renewed by a script, it can send the new version through the API. The certificate is updated under the same name, and the alerts stop by themselves:
jq -n --rawfile pem client-bank-x.crt \
'{pem: $pem, name: "client-bank-x-prod",
installedOn: ["outbound gateway / bank X transfers"],
reminderDays: 60,
notes: "Renewed through the provider portal, 10 working days lead time."}' \
| curl -sS -X PUT "$CLM_API_URL/certificates" \
-H "Authorization: Bearer $CLM_TOKEN" -H "Content-Type: application/json" -d @-
The API address and the token are on the API import page of the application. Only the certificate file is sent, never the key.
Six rules for an mTLS flow that does not break
- One certificate per provider and per environment. A certificate shared between several flows cuts them all at once, and cannot be revoked for just one.
- Generate the key where it is used, and send the provider only the signing request. A private key received by email is a compromised key.
- Trust an authority, not one exact certificate, whenever the provider allows it.
- Ask for an overlap period: the provider accepts the old and the new certificate for a few days, and the switchover happens without an outage.
- Start the renewal 60 days before expiry, earlier if the provider imposes change windows.
- Write the procedure down while you follow it, where the next person will find it: in the certificate’s record.
In summary
- mTLS authenticates both ends of a flow, before any data is exchanged. It is the right protection as soon as a flow leaves your network, and the only one that holds when it never passes through it.
- It adds certificates that neither a scan nor Certificate Transparency can see, that last a long time and whose renewal depends on another organisation.
- These certificates have to be recorded by hand or through the API, with their location, the provider’s contact and a generous reminder.
- PkiZen keeps that inventory, alerts the right people and keeps the history. The renewal itself stays between you and your provider.