Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!
Labels (1)
avatar
Rising Star

It is known that in a secure Kafka environment, we need to explicitly authorize user/principal to either read/write to a Kafka topic as shown below

Grant Read/Write Access to a Topic

To add the following ACL:

"Principals user:bob and user:alice are allowed to perform Operation Read and Write on Topic Test-Topic from Host1 and Host2"

run the CLI with the following options:

bin/kafka-acls.sh --add --allow-principal <strong><em>User</em></strong>:bob --allow-principal User:alice --allow-host host1 --allow-host host2 --operation Read --operation Write --topic test-topic

Grant Full Access to Topic, Cluster, and Consumer Group

To add ACLs to a topic, specify --topic <topic-name> as the resource option. Similarly, to add ACLs to cluster, specify --cluster; to add ACLs to a consumer group, specify --consumer-group <group-name>.

The following examples grant full access for principal bob to topic test-topic and consumer group 10, across the cluster. Substitute your own values for principal name, topic name, and group name.

bin/kafka-acls.sh --topic test-topic --add --allow-principal <strong><em>user</em></strong>:bob --operation ALL --config /usr/hdp/current/kafka-broker/config/server.properties

Ref:https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.4.2/bk_secure-kafka-ambari/content/kafka-acl-examples.html

ISSUE:

We see that the keyword, "user" is inconsistent across the commands leading to improper authorizations getting effected.

RESOLUTION:

Usage of keyword, "User" is case sensitive and it is dependent on the version of Kafka that is being used,

Apache Kafka 0.8.2 makes it necessary to use the keyword "User" and

Apache Kafka 0.9 onwards, keyword "user" needs to be used for authorizations.

3,392 Views
Comments
avatar

Probably better remove link to Hortonwroks Jira?

avatar
Rising Star

Thank you, removed it.

Version history
Last update:
‎03-21-2017 05:28 PM
Updated by:
Contributors