Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MTLS ( mutual TLS) details

Tags:

ssl

I know that for MTLS , both parties , Client and server exchange certificates. These certificates should be signed by a CA that both parties can trust in order to validate the certificate.

My question is , does MTLS also means in addition to verifying the certificate (if CA is trusted, leaf certificate is trusted) , either side (Server or client) can also do some additional checks like Hostname check or Whether the client connecting to the server is in the list of approved trusted entities?

Can anyone point me to the mTLS specification and what are the overheads in mTLS?

like image 806
user839917 Avatar asked Oct 26 '13 00:10

user839917


People also ask

How does mTLS encryption work?

Mutual Transport Layer Security (mTLS) is a process that establishes an encrypted TLS connection in which both parties use X. 509 digital certificates to authenticate each other. MTLS can help mitigate the risk of moving services to the cloud and can help prevent malicious third parties from imitating genuine apps.

Is mTLS same as 2 way SSL?

In a TLS handshake, the server will have an SSL/TLS certificate, and a public/private key pair. The client does not have these components. In an mTLS handshake, both the server and the client have a certificate and public/private key pair.

Is mTLS more secure than TLS?

Conclusion. To summarize, mTLS is nothing more than an improved version of TLS (Transport Layer Security). It uses the very same protocols and technologies as TLS. The only difference is that it uses two-way verification rather than one.

What is an advantage of using mTLS rather than TLS?

The main thing that makes mTLS different (and arguably more secure) is that it requires both the server and client to verify each other: a handshake. This is particularly useful in a scenario where you are the server and not the client. Ultimately it's flexible and lightweight making it perfect for edge devices.


2 Answers

Besides what EJP has said about "MTLS" term, the TLS 1.2 specification doesn't have strict requirements regarding what information is to be checked and in which way.

It's up to the receiving party to decide if the presented certificate is to be trusted or not. This means that for example it's ok for the server to accept only certificates issued by the CA that belongs to the company that owns the server. This is how client-bank access systems often work - they accept only certificates issued by the bank and the common name of such certificate must correspond to the username provided in a web form.

Both parties are free to check any information in the certificate including direct comparison of public key hash (thus only particular keypairs will work no matter what is contained in other certificate properties).

like image 65
Eugene Mayevski 'Callback Avatar answered Sep 17 '22 14:09

Eugene Mayevski 'Callback


The most up todate RFC regarding this subject is:

https://datatracker.ietf.org/doc/draft-ietf-oauth-mtls/ this is an extension to OAuth 2.0

The purpose of this document is to define a mechanism how TLS certificate is used in a context of replacing Client ID and Secret (aka, Client Credentials)

The standard establishes two mechanisms how a TLS Certificate is used as a client credential, and the associated token flows, and attributes.

The general summary of this is:

(a) Authorization Server: checks the certificate either according to PKI (signed by a valid root) The RFC does not define the options, but they are pretty self-explanatory and depend on the use case. But it can be (1) certificate is signed by a trusted root and, is not revoked, (2) individually recognize each certificate based on some logic.

(b) Resource server checks the token and client certificate (client credential, or CC), and used in the underlying TLS session. Please note that there are no validation checks concerning the certificate or its origin at TLS layer, all checks are performed at an Application layer. The resource server should, therefore, configure the TLS stack in a way that it does not verify whether the certificate presented by the client during the handshake is signed by a trusted CA certificate.

This mechanism becomes particularly interesting in some GDPR context, as it makes it impossible to share tokens between client and the server.

Overall a great feature for privacy, and improved security.

like image 31
Zeev Glozman Avatar answered Sep 18 '22 14:09

Zeev Glozman