Kafka Connector

Kafka Connector

Configuring SASL PLAIN authentication for a Kafka broker

Configuring SASL PLAIN authentication for a Kafka broker

In the Kafka connection, you can configure PLAIN security for the Kafka broker to connect to a Kafka broker. To read data from or write data to a Kafka broker with SASL PLAIN authentication, configure the Kafka connection properties. To override the properties defined in the Kafka connection, you can configure the advanced source or target properties.
You can configure SASL PLAIN authentication so that the Kafka broker can authenticate the Kafka producer and the Kafka consumer. Kafka uses the Java Authentication and Authorization Service (JAAS) for SASL PLAIN authentication. To enable SASL PLAIN authentication, you must specify the SASL mechanism as PLAIN. You must also provide the formatted JAAS configuration that the Kafka broker must use for authentication. The JAAS configuration defines the username, password, that the Kafka broker must use to authenticate the Kafka client.
Configure the following properties:
Kafka connection
Configure the
Additional Connection Properties
or
Additional Security Properties
property in the Kafka connection and specify the value in the following format:
security.protocol=SASL_SSL,sasl.mechanism=PLAIN,sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required username=<username> password=<password>
In the
Security Configuration Section
, select
One-Way
as the
SSL Mode
and specify the SSL TrustStore File Path and SSL TrustStore Password.
Sources
Configure the
Consumer Configuration Properties
property in the advanced source properties to override the value that you specified in the
Additional Connection Properties
property in the Kafka connection. Specify the value in the following format:
security.protocol=SASL_SSL,sasl.mechanism=PLAIN,sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required username=<username> password=<password>
Targets
Configure the
Producer Configuration Properties
property in the advanced target properties to override the value that you specified in the
Additional Connection Properties
property in the Kafka connection. Specify the value in the following format:
security.protocol=SASL_SSL,sasl.mechanism=PLAIN,sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required username=<username> password=<password>

Configuring SASL PLAIN authentication for an Azure Event Hub Kafka broker

In the Kafka connection, you can configure PLAIN security for the Kafka broker to connect to an Azure Event Hub Kafka broker. When you connect to an Azure Event Hub Kakfa broker, the password defines the endpoint URL that contains the fully qualified domain name (FQDN) of the Event Hub namespace, shared access key name, and shared access key required to connect to an Azure Event Hub Kafka broker.
To connect to an Azure Event Hub Kafka broker, configure any of the above properties and specify the value in the following format:
security.protocol=SASL_SSL,sasl.mechanism=PLAIN,sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required username="$ConnectionString" password="Endpoint=sb://<FQDN>/;SharedAccessKeyName=<key name>;SharedAccessKey=<shared access key>=";

0 COMMENTS

We’d like to hear from you!