How to use kafka acls?

My version of kafka is 0.9.0.1, and I have two brokers: 192.168.1.100, 192.168.1.101, which use ssl for authentication and encryption.

I had a topic called test09, and the ip client was 192.168.1.102

When I add acl with command line interface as follows:

bin/kafka-acls.sh --authorizer-properties zookeeper.connect=localhost:2181 --add --deny-principal User:* --deny-host 192.168.1.102 --operation Read --topic test09 

a consumer with 192.168.1.102 can still receive data.

Can someone tell me how to use ACL in kafka?

+6
source share
1 answer

I believe that you missed out to add the property below in Server.properties

 authorizer.class.name=kafka.security.auth.SimpleAclAuthorizer 

- Adding this line will allow the ACL to work through SimpleAclAuthorizer. - Kafka comes with kafka.security.auth.SimpleAclAuthorizer by default, defined by authorizer.class.name .

You can try the settings below, which can give a complete idea.

https://github.com/Symantec/kafka-security-0.9

+10
source

All Articles