Learn how to configure Kafka clients for LDAP authentication.
You can enable Kafka to use LDAP credentials for client to broker authentication.
Client configuration is done by adding the required properties to the client's
client.properties file.
Set the SASL mechanism to PLAIN.
Add the following property to the
client.properties file.
sasl.mechanism=PLAIN
Configure the security protocol.
You can either use
SASL_SSL or SASL_PLAINTEXT. Which security protocol
you use will depend on whether or not SSL encryption is enabled on the broker. Add one of
the following properties to the client.properties file.
If encryption is enabled, use
SASL_SSL:
security.protocol=SASL_SSL
If encryption is not enabled, use
SASL_PLAINTEXT:
security.protocol=SASL_PLAINTEXT
Configure the JAAS.
You have two options when configuring the
JAAS:
Embed the required properties in the client.properties file
with the sasl.jaas.config property.