Granting Permissions to a User
To grant all permissions to a user -- for all resources -- add the user to the list of super users:
Add the user to the list of users specified in the
super.users
property.Restart the cluster.
Restart all brokers.
Alternately, to grant full access to a specific topic, cluster, and consumer group, run the following commands. (This approach does not require you to restart the cluster.)
In the following example, substitute your own values for <topic-name>
and
<user-name>
:
/usr/hdp/current/kafka-broker/bin/kafka-acls.sh --topic <topic-name> --add
--allowprincipals user:<user-name> --operations ALL --config
/usr/hdp/current/kafka-broker/config/server.properties
/usr/hdp/current/kafka-broker/bin/kafka-acls.sh --cluster --add --allowprincipals
user:<user-name> --config /usr/hdp/current/kafka-broker/config/server.properties
--operations ALL
/usr/hdp/current/kafka-broker/bin/kafka-acls.sh --consumer-group 10 --add
--allowprincipals user:<user-name> --operations ALL --config
/usr/hdp/current/kafka-broker/config/server.properties