...
Code Block |
---|
$ kafka-sentry usage: kafka-sentry -arg,--add_role_group Add role to group -conf,--sentry_conf <arg> sentry-site file path -cr,--create_role Create role -dr,--drop_role Drop role -drg,--delete_role_group Delete role from group -g,--groupname <arg> Group name -gpr,--grant_privilege_role Grant privilege to role -h,--help Shell usage -lp,--list_privilege List privilege -lr,--list_role List role -p,--privilege <arg> Privilege string -r,--rolename <arg> Role name -rpr,--revoke_privilege_role Revoke privilege from role |
Creating a role
Here we create a role test
.
Code Block |
---|
$ kafka-sentry -cr -r test
$ kafka-sentry -lr
test |
Assigning a role to a group
Here we assign the created role test
to a group test-group
. All users in this group, will get any privilege we grant to the role test
.
Code Block |
---|
$ kafka-sentry -arg -r test -g test-group |
Granting privileges to a role
Here we grant some privileges to the role test.
...
Code Block |
---|
$ kafka-sentry -gpr -r test -p "Host=127.0.0.1->Topic=testTopic->action=ALL" |