How to authorize every Group on a topic in the ACL

Viewed 44

How can authorize any consumer group to access a topic from a user that has permission in the ACL? I am publishing data into topic test-1. And I authorized user-1 to have READ access to the Kafka ACL. But when I try to consume from the topic, I am getting a GROUP AUTHORIZATION EXCEPTION. Is there a way to authorize any group on a topic for a particular user?

1 Answers

Yes you can authorize using wildcards so something like:

kafka-acls --bootstrap-server $host:$port --command-config adminclient-configs.conf --add --allow-principal \
User:$your_user --operation All --topic '$topic_name' --group '*'

You could use wildcard on topic also but not recommended and you can also adjust the operations more specifically(recommended), i.e - READ instead of using 'All' as in the example above.

Related