HBase Security Commands - grant, revoke, user_permission
Security tools
In HBase, permissions can be granted to and revoked from users. There are three commands for security purposes.
- grant
- revoke
- user_permission
grant - granting permissions
The grant command grants users specific permissions such as read, write, execute, and admin permissions for tables. The syntax of the grant command is as follows.
grant '<user>' '<permissions>' ['<table>' ['<column family>' ['<column; qualifier>']]
RWXCA can be used to grant permissions to users.
- R: READ permission
- W: WRITE permission
- X: EXEC permission
- C: CREATE permission
- A: ADMIN permission
grant 'devkuma', 'RWXCA'
grant 'devkuma', 'RW' 't1', 'cf1', 'qualifier1'
revoke - deleting permissions
Deletes a user’s access permissions.
revoke <user> <permissions> [<table> [<column family> [<column; qualifier>]]
revoke 'devkuma', 't1', 'cf1', 'qualifier1'
user_permission - querying permissions for a specific table
The user_permission command is used to query all permissions for a specific table. The syntax is as follows.
user_permission '<table name>'
Shows all permissions that exist for a specific table.
user_permission 't1'