List ACLs

You can also list all the ACLs applied on following resources:

  1. For example, if you want to see all ACLs applied in the topic Packt, you can do it using the following command:
kafka-acls.sh --authorizer kafka.security.auth.SimpleAclAuthorizer --authorizer-properties zookeeper.connect=localhost:2181 --list --topic Packt
  1. Producer and consumer ACL: Adding a user as the producer or consumer is a very common ACL used in Kafka. If you want to add user Chanchal as a producer for topic Packt, it can be done using the following simple command:
kafka-acls --authorizer-properties zookeeper.connect=localhost:2181\
   --add --allow-principal User:Chanchal \
   --producer --topic Packt
  1. To add a consumer ACL where Manish will act as the consumer ...

Get Building Data Streaming Applications with Apache Kafka now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.