'TopicAuthorizationException with Kafka SASL/Plain authentication
I have created below jaas file and exported using KAFKA_OPTS.
KafkaServer {
org.apache.kafka.common.security.plain.PlainLoginModule required
username="admin"
password="1nJ8ZVpGaJ"
user_admin="1nJ8ZVpGaJ"
user_kafka="kafka123$"
user_kafdrop="kafdrop123$";
org.apache.kafka.common.security.scram.ScramLoginModule required
username="admin"
password="admin-secret";
};
Client {
org.apache.kafka.common.security.plain.PlainLoginModule required
username="zookeeperUser"
password="zookeeperPassword";
};
Here in my java code, I am using this user kafdrop for SASL/Plain mechanism. If I directly use this user getting TopicAuthorizationException. But If I add the same user as super user then it's working.
In case of SASL/SCRAM (SHA-512, SHA-256), we are using kafka-acl utilty to provide the access to the topics.
How to mange the topic level access in SASL/Plain to particular user. Do we need make every user as super user?
Advance in Thanks.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
