The Ranger administrator can use Ranger to configure the read, write, and management permissions of the Kafka topic and the management permission of the cluster for the Kafka user. This section describes how to add the production permission of the test topic for the test user.
Parameter |
Description |
---|---|
Policy Type |
Access type. |
Policy Conditions |
IP address filtering policy, which can be customized. You can enter one or more IP addresses or IP address segments. The IP address can contain the wildcard character (*), for example, 192.168.1.10,192.168.1.20, or 192.168.1.*. |
Policy Name |
Policy name, which can be customized and must be unique in the service. |
Policy Label |
A label specified for the current policy. You can search for reports and filter policies based on labels. |
topic |
Name of the topic applicable to the current policy. You can enter multiple values. The value can contain wildcards, such as test, test*, and *. The Include policy applies to the current input object, and the Exclude policy applies to objects other than the current input object. |
Description |
Policy description. |
Audit Logging |
Whether to audit the policy. |
Allow Conditions |
Permission and exception conditions allowed by a policy. The priority of an exception condition is higher than that of a normal condition. In the Select Role, Select Group, and Select User columns, select the role, user group, or user to which you want to assign permissions. Click Add Conditions, add the IP address range to which the policy applies, and click Add Permissions to add corresponding permissions.
To add multiple permission control rules, click If users or user groups in the current condition need to manage this policy, select Delegate Admin. These users will become the agent administrators. The agent administrators can update and delete this policy and create sub-policies based on the original policy. |
Deny Conditions |
Policy rejection condition, which is used to configure the permissions and exceptions to be denied in the policy. The configuration method is the same as that of Allow Conditions. The priority of the rejection condition is higher than that of the allowed conditions configured in Allow Conditions. |
For example, to add the production permission for the test topic of user testuser, configure the following information:
Scenario |
Role Authorization |
---|---|
Setting the Kafka administrator permissions |
|
Setting the permission for a user to create a topic |
NOTE:
Currently, the Kafka kernel supports the --zookeeper and --bootstrap-server methods to create topics. The --zookeeper method will be deleted from the community in later versions. Therefore, you are advised to use the --bootstrap-server method to create topics. Note: Currently, Kafka supports only the authentication of topic creation in --bootstrap-server mode and does not support that in --zookeeper mode. |
Setting the permission for a user to delete a topic |
NOTE:
Currently, the Kafka kernel supports the --zookeeper and --bootstrap-server methods to delete topics. The --zookeeper method will be deleted from the community in later versions. Therefore, you are advised to use the --bootstrap-server method to delete topics. Note: Currently, Kafka supports only the authentication of topic deletion in --bootstrap-server mode and does not support that in --zookeeper mode. |
Setting the permission for a user to query a topic |
NOTE:
Currently, the Kafka kernel supports the --zookeeper and --bootstrap-server methods to query topics. The --zookeeper method will be deleted from the community in later versions. Therefore, you are advised to use the --bootstrap-server method to query topics. Note: Currently, Kafka supports only the authentication of topic query in --bootstrap-server mode and does not support that in --zookeeper mode. |
Setting the production permission of a user on a topic |
|
Setting the consumption permission of a user on a topic |
NOTE:
During topic consumption, offset management is involved. Therefore, the Consume permission of ConsumerGroup must be enabled at the same time. For details, see Setting a User's Permission to Submit ConsumerGroup Offsets. |
Setting the permission for a user to expand a topic (by adding partitions) |
|
Setting the permission for a user to modify the topic configuration |
Currently, the Kafka kernel does not support to modify topic parameters based on --bootstrap-server. Therefore, Ranger does not support authentication for this behavior. |
Setting all the management permissions of a user on a cluster |
|
Setting the permission for a user to create a cluster |
NOTE:
The authentication of the Create operation of a cluster involves the following two scenarios:
|
Setting the permission for a user to modify the cluster configuration |
NOTE:
The configuration modification permission allows you to modify the Broker and Broker Logger configurations. After the configuration modification permission is granted to a user, the user can query configuration details even if the user does not have the query permission. (The configuration modification permission includes the configuration query permission.) |
Setting the permission for a user to query the cluster configuration |
NOTE:
You can only query Broker and Broker Logger information in the cluster, excluding topics. |
Setting the Idempotent Write permission in a cluster for a user |
NOTE:
This permission authenticates the Idempotent Produce behavior of the user's client. |
Setting the permission to migrate partitions in a cluster for a user |
NOTE:
The Alter permission of a cluster can be used to control permissions in the following scenarios:
Operations in scenarios 1 and 2 are between a controller and broker and between brokers in the cluster. When a cluster is created, this permission is granted to the built-in Kafka user by default. It is meaningless for a common user to be granted with this permission. Scenario 3 involves the ACL management. ACLs are designed for authentication. Currently, Kafka authentication is hosted to Ranger. Therefore, this scenario is not involved (the configuration does not take effect). |
Setting the Cluster Action permission in a cluster for a user |
NOTE:
This permission controls the synchronization between the leader and follower replicas in the cluster and the communication between nodes. It has been granted to the built-in Kakfa user during cluster creation. It is meaningless for a common user to grant this permission. |
Setting the TransactionalId permission for a user |
NOTE:
The Publish permission is used to authenticate client requests for which the transaction feature is enabled, for example, starting and ending a transaction, submitting an offset, and generating transactional data. The Describe permission is used to authenticate the requests from the client and coordinator that have enabled the transaction feature. If the transaction feature is enabled, you are advised to grant both the Publish and Describe permissions to users. |
Setting the DelegationToken permission for a user |
NOTE:
Currently, Ranger only controls the query permission of DelegationToken, but does not control its create, renew, and expire permissions. |
Setting the permission for a user to query ConsumerGroup Offsets |
|
Set the user's submission permission on ConsumerGroup Offsets. |
NOTE:
After a user is granted with the Consume permission of ConsumerGroup, the user is also granted with the Describe permission. |
Setting the permission for a user to delete ConsumerGroup Offsets |
NOTE:
When a user is granted with the Delete permission of ConsumerGroup, the user is also granted with the Describe permission. |
To disable a policy, click to edit the policy and set the policy to Disabled.
If a policy is no longer used, click to delete it.