liveBook · Manning

Mutual TLS

As explained in Kafka for Architects

Mutual TLS is a TLS authentication mechanism in which both communicating parties verify each other's identities with certificates.

Mutual TLS (mTLS) authenticates both sides of a connection: each participant presents a certificate, and each verifies the other's identity through trusted certificate authorities. In Kafka, the authenticated principal is typically derived from the certificate's distinguished name, with mapping rules available for fields such as the common name. section 9.3.2 section 9.3.3

A Kafka mTLS deployment requires coordinated identity and trust configuration:

  • Generate a private key and keystore for each server and client, obtain a certificate from a certificate authority, and import it into the keystore. section 9.3.2
  • Populate truststores with the certificate authority and any intermediate certificates needed to validate trusted participants. section 9.3.2
  • Require client authentication with ssl.client.auth and configure keystore and truststore properties on both brokers and clients. section 9.3.2
  • Treat certificate lifecycle and secret storage as operational concerns; environment variables, restricted files, or secret-management vaults can replace passwords embedded in configuration. section 9.3.2

Customer 360 client traffic

A Customer 360 deployment uses mTLS between producers, consumers, Kafka Connect, Schema Registry, and brokers on exposed client traffic. Producers write to topics, consumers read from them, and platform services access their Kafka topics over the same authenticated and encrypted channel. Internal broker replication and controller traffic use SASL_PLAINTEXT on a tightly segmented network, trading lower overhead for accepted internal-network risk. section 9.3.6

Figure 9.11 Generating keys and receiving a certificate. The Party (client or server) is the entity that generates the key pair and requests a signed certificate from the certificate authority.
A diagram of a sign

AI-generated content may be incorrect.

Use the key-generation flow to trace how either a client or server creates a key pair and receives a certificate signed by a certificate authority. section 9.3.2

How Kafka for Architects covers it

How deep it goes
Explains certificate issuance, keystore and truststore setup, client-authentication settings, and principal mapping, but not certificate lifecycle automation.
Examples
Uses key-generation diagrams, broker and client TLS properties, and a Customer 360 communication matrix.
What it assumes
Assumes familiarity with Kafka clients and brokers while defining certificates, certificate authorities, keystores, truststores, and principals.
What you can do after
Operate Kafka client authentication by issuing certificates, configuring trust, requiring client certificates, and relating identities to authorization.
How it connects
Connects TLS encryption with certificates, keystores, truststores, principals, ACLs, Schema Registry, Kafka Connect, and SASL.

Also explained in

Compare how 8 books explain mutual TLS →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kafka for Architects. The section links point to the parts of the book it draws on.