Configure ACLs for the kafka theme

I have an insecure kafka instance with two brokers, everything works fine until I decided to configure the ACL for those, after setting up the ACL, my users stopped polling data from Kafka and I continue to receive a warning Error while extracting metadata with correlation ID , my broker properties look as follows: -

listeners=PLAINTEXT://localhost:9092 advertised.listeners=PLAINTEXT://localhost:9092 authorizer.class.name=kafka.security.auth.SimpleAclAuthorizer allow.everyone.if.no.acl.found=true 

And my client configuration is as follows: -

 bootstrap.servers=localhost:9092 topic.name=topic-name group.id=topic-group 

I used the command below to configure the ACL

 bin\windows\kafka-acls.bat --authorizer-properties zookeeper.connect=localhost:2181 --add --allow-principal User:* Read --allow-host localhost --consumer --topic topic-name --group topic-group 

After I turned on all of the above configuration, I stopped receiving messages. Can someone point out where I'm wrong. Thanks in advance.

+7
java apache-kafka kafka-consumer-api
source share
1 answer

We successfully use ACLs, but not with the PLAINTEXT protocol. IMHO you must use the SSL protocol, and instead of localhost - the name of the real computer.

0
source share

All Articles