Learn how to grant privileges to a Machine User for accessing and modifying Kafka
topics using the Ranger web UI. You must create a new policy, select the Machine User, and
add permissions for the Machine User.
You must have created a Machine User, granted environment
access to the Machine User, and created two Kafka topics.
Navigate to Management Console > Environments, and select the environment where your Kafka cluster is
running.
Click Ranger on the top pane to open the Ranger web
UI.
In the Ranger web UI, click Access Manager > Resource Based Policies.
Under the KAFKA group, select the policy of your Kafka
cluster.
To select it, click on the policy name, and not on the icon. You see the list
of pre-defined policies for your Kafka cluster.
Click Add New Policy to create a new policy and enter
the following details:
Policy Name: Machine Data topics
Topic: machine-data*
Description: All topics prefixed with machine-data
Below the Allow Conditions section, click the empty
Select Users box and select the Machine User you
created.
Click Add Permissions, select the
Publish, Consume, and
Describe permissions, and then click the tick mark.
Scroll to the bottom of the page and click Add to save
the policy.