I'm trying to enable SASL/PLAIN for my Kafka system. It works actually, I've tested it for Schema Registry and a Java producer. The problem is Kafka Connect can not establish a connection when SASL is enabled (at least that's what I thought first). I gave the necessary configuration but looks like it doesn't affect at all. I've edited my connect-avro-distributed.properties
file as:
sasl.mechanism=PLAIN
security.protocol=SASL_PLAINTEXT
sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required \
username="admin" \
password="secret";
producer.sasl.mechanism=PLAIN
producer.security.protocol=SASL_PLAINTEXT
producer.sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required \
username="admin" \
password="secret";
consumer.sasl.mechanism=PLAIN
consumer.security.protocol=SASL_PLAINTEXT
consumer.sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required \
username="admin" \
password="secret";
But in the log it says:
[2022-01-07 12:21:28,645] INFO ProducerConfig values:
sasl.mechanism = GSSAPI
security.protocol = PLAINTEXT
Which should be like:
[2022-01-07 12:21:28,645] INFO ProducerConfig values:
sasl.mechanism = PLAIN
security.protocol = SASL_PLAINTEXT
Same for the consumer config. What do I need to do? Why it goes with default values? I've restarted the service many times. Thanks in advance.
Edit: There is another connector which runs without any problems and it has correct configuration for SASL.
Edit2: Looks like Debezium connectors need some more configuration in connector side.