The Kafka administrator exam frequently tests listener design, mutual authentication (mTLS), certificate handling, and verification/operations procedures. This article sticks to stable concepts from the official documentation so the material works for both the exam and production.
As a baseline, Kafka can protect both broker↔client and broker↔broker traffic with TLS. The underlying principles are the same whether you use ZooKeeper or KRaft mode: certificate validity, SAN values, and listener consistency are what matter.
Kafka can apply TLS to both client traffic and inter-broker replication. The two points that tend to trip people up on the exam and in practice are which listener carries which path, and how certificate trust is wired up.
At minimum, configure the client-facing listener as SSL or SASL_SSL and also encrypt the internal replication listener referenced by inter.broker.listener.name. Each broker gets its own key and SAN entries, all signed by a single trusted CA.
A high-level view of Kafka TLS placement
Per-broker certificate requirements at a glance
# A unique key and certificate per broker
# Include the FQDN (broker1.example.com, for example) in the SAN, plus IPs if needed
# All signed by the same trusted CA
# Put the intermediate CA in the truststore so the chain is completeKafka can expose multiple listeners. Separate client-facing and broker-to-broker listeners, and reference the latter via inter.broker.listener.name. Which protocol each listener uses is defined in listener.security.protocol.map.
advertised.listeners is the public address clients use when connecting. The hard rule is that it must match the certificate's SAN, otherwise hostname verification fails.
Representative server.properties (client and internal listeners separated)
listeners=INTERNAL://0.0.0.0:9092,EXTERNAL://0.0.0.0:9093
advertised.listeners=INTERNAL://broker1.example.com:9092,EXTERNAL://broker1.example.com:9093
listener.security.protocol.map=INTERNAL:SSL,EXTERNAL:SSL
inter.broker.listener.name=INTERNAL
# Common TLS settings (JKS or PKCS12; PEM is supported these days, but JKS/PKCS12 is safer for the exam)
ssl.keystore.location=/var/private/ssl/kafka.broker1.p12
ssl.keystore.password=${FILE:/etc/kafka/keystore.pass}
ssl.keystore.type=PKCS12
ssl.truststore.location=/var/private/ssl/kafka.truststore.p12
ssl.truststore.password=${FILE:/etc/kafka/truststore.pass}
ssl.truststore.type=PKCS12
# When the client-facing listener requires mutual authentication
ssl.client.auth=requiredChoose the mode based on the use case: one-way TLS that encrypts with server certificates only, mTLS that also requires client certificates, or SASL (PLAIN/SCRAM/OAUTHBEARER) layered on top of TLS.
The administrator exam tests whether you can identify, for each mode, what is being proven, which stores are needed, and which settings are critical.
| Mode | Who is authenticated | Required stores/certs | Typical use cases / caveats |
|---|---|---|---|
| SSL (one-way) | Server only | Client: truststore / Server: keystore+cert | Encryption is required, but client identity is managed by other means. |
| SSL (mTLS) | Mutual (server + client) | Client: truststore+keystore / Server: truststore+keystore | Best for strict network perimeters; distributing and rotating client certificates is the main operational cost. |
| SASL_SSL (SCRAM) | SASL username/password | Client: truststore / Server: keystore+cert (SASL managed separately) | Users can be managed inside Kafka, and certificate distribution is lighter than with mTLS. |
| PLAINTEXT (reference) | None | None | Not recommended for the exam or for production. Limit to PoCs or isolated networks. |
Minimal additional broker-side settings for SASL_SSL (SCRAM)
# Example: SSL on INTERNAL, SASL_SSL on EXTERNAL
listener.security.protocol.map=INTERNAL:SSL,EXTERNAL:SASL_SSL
listeners=INTERNAL://0.0.0.0:9092,EXTERNAL://0.0.0.0:9094
advertised.listeners=INTERNAL://broker1.example.com:9092,EXTERNAL://broker1.example.com:9094
inter.broker.listener.name=INTERNAL
# SASL-related
sasl.enabled.mechanisms=SCRAM-SHA-512
listener.name.external.scram-sha-512.sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required;
# Note: create the actual users with kafka-configs.sh --alter --add-config 'SCRAM-SHA-512=[password=...]'Each broker carries its own private key and certificate signed by a trusted CA. Always include the FQDN in the SAN and keep it consistent with advertised.listeners. Crucially, store the full chain — including intermediate CAs — in the truststore.
Rotate in a rolling fashion: first add the new CA to the truststore → distribute the new certificates → restart nodes one by one. Manage passwords and file permissions with least privilege.
Representative steps with keytool/openssl
# 1) Create the keystore and generate the key and CSR (PKCS12)
keytool -genkeypair -alias broker1 -keyalg RSA -keystore kafka.broker1.p12 -storetype PKCS12 -storepass changeit -keypass changeit -dname "CN=broker1.example.com, OU=Kafka, O=Example, L=Tokyo, C=JP" -ext SAN=DNS:broker1.example.com,IP:10.0.0.11
keytool -certreq -alias broker1 -keystore kafka.broker1.p12 -storepass changeit -file broker1.csr -ext SAN=DNS:broker1.example.com,IP:10.0.0.11
# 2) Sign with the CA and import it together with the root/intermediate
keytool -importcert -alias CARoot -file ca-root.crt -keystore kafka.broker1.p12 -storepass changeit -noprompt
keytool -importcert -alias CAInt -file ca-int.crt -keystore kafka.broker1.p12 -storepass changeit -noprompt
keytool -importcert -alias broker1 -file broker1.signed.crt -keystore kafka.broker1.p12 -storepass changeit
# 3) Create the truststore (holding the CA chain)
keytool -importcert -alias CARoot -file ca-root.crt -keystore kafka.truststore.p12 -storetype PKCS12 -storepass changeit -noprompt
keytool -importcert -alias CAInt -file ca-int.crt -keystore kafka.truststore.p12 -storetype PKCS12 -storepass changeit -noprompt
# 4) Verify
keytool -list -v -keystore kafka.broker1.p12 -storepass changeit | grep -E "Alias name|Owner|Issuer|SubjectAlternativeName"The minimum client configuration is security.protocol plus a truststore. When connecting to a broker that requires mTLS, the client also needs a keystore. Hostname verification is on by default (ssl.endpoint.identification.algorithm=HTTPS), so the certificate's SAN must match the connection hostname.
openssl s_client is the go-to tool for first-pass connectivity triage. It immediately surfaces certificate chain and hostname verification failures.
client.properties example and connection verification
# client.properties (one-way TLS)
bootstrap.servers=broker1.example.com:9093,broker2.example.com:9093
security.protocol=SSL
ssl.truststore.location=/etc/client/kafka.truststore.p12
ssl.truststore.password=${FILE:/etc/client/trust.pass}
ssl.truststore.type=PKCS12
ssl.endpoint.identification.algorithm=HTTPS
# Extra settings for mTLS
ssl.keystore.location=/etc/client/client.p12
ssl.keystore.password=${FILE:/etc/client/key.pass}
ssl.keystore.type=PKCS12
# Verify with openssl first (use the FQDN, for SNI and hostname verification)
openssl s_client -connect broker1.example.com:9093 -servername broker1.example.com -showcertsThe most common failures are SAN/hostname mismatches, incomplete chains, inconsistent inter.broker.listener.name settings, expired certificates, and password mismatches. Look in the logs for javax.net.ssl.SSLHandshakeException, certificate_unknown, and handshake_failure.
Mapping ACLs to certificate principal names is another exam favorite. When you need to shorten the DN authenticated by mTLS into a principal name, use ssl.principal.mapping.rules.
Commonly used verification commands and settings
# Pull the broker's SSL handshake errors out of the log
grep -E "SSLHandshakeException|handshake_failure|certificate_unknown" /var/log/kafka/server.log
# Check the certificate SAN
keytool -list -v -keystore /var/private/ssl/kafka.broker1.p12 -storepass changeit | grep -A2 "SubjectAlternativeName"
# Example mapping that extracts the principal from the DN under mTLS (CN becomes the user)
ssl.principal.mapping.rules=RULE:^CN=(.*?),.*$/$1/,DEFAULTCCAAK
Question 1
In a production cluster, you want clients to use mTLS and inter-broker traffic to use SSL (mutual authentication). Which combination of settings is correct?
Correct answer: A
Requiring mTLS means ssl.client.auth=required and a keystore on the client side. Inter-broker traffic must run over the listener referenced by inter.broker.listener.name, and that listener must be SSL. B leaves traffic unencrypted, C makes inter-broker traffic PLAINTEXT, and D leaves the client side PLAINTEXT — all incorrect.
Should I use PEM or JKS/PKCS12?
Recent Kafka versions support PEM, but the admin exam and most enterprise standards assume JKS/PKCS12. Match whichever format your operations team has standardized on, and for exam prep make sure you can confidently walk through the JKS/PKCS12 workflow (keytool, truststore/keystore).
Why is advertised.listeners so important?
It is the connection address clients receive back from a broker, and TLS hostname verification compares this value against the certificate's SAN. A mismatch produces an SSLHandshakeException. Always set a FQDN that resolves from the client side.
Should I choose mTLS or SASL_SSL?
mTLS works well for zero-trust or strict network-perimeter environments. If you want to keep client distribution and rotation overhead low, SASL_SSL (e.g. SCRAM) is the more common choice. When you need both, separate them onto different listeners.
Practice with certification-focused question sets
Try free questionsNicheeLab Editorial Team
NicheeLab editorial team focused on data engineering and cloud certification learning. Content is structured around practical study needs and official exam domains.
Kafka Topics & Partitions: Distribution Fundamentals (2026)
How Kafka topics and partitions enable scale — ordering guar...
CCDAK Exam Guide: Confluent Certified Developer (2026)
Complete prep for the CCDAK exam — Producer/Consumer API, St...
CCAAK Exam Guide: Confluent Certified Administrator (2026)
Pass the CCAAK exam — cluster management, partitions, securi...
Kafka Replicas & ISR: Fault Tolerance Explained (2026)
Replica placement, in-sync replicas (ISR), leader election. ...
Kafka Offsets: Commit Modes & Consumer Position (2026)
Offset semantics — auto vs. manual commit, __consumer_offset...