Apache HBase

Access Control Matrix

Permission sets required to perform operations in HBase.

The following matrix shows the permission set required to perform operations in HBase. Before using the table, read through the information about how to interpret it.

Interpreting the ACL Matrix Table

The following conventions are used in the ACL Matrix table:

Scopes

Permissions are evaluated starting at the widest scope and working to the narrowest scope.

A scope corresponds to a level of the data model. From broadest to narrowest, the scopes are as follows:

Scopes

  • Global
  • Namespace (NS)
  • Table
  • Column Family (CF)
  • Column Qualifier (CQ)
  • Cell

For instance, a permission granted at table level dominates any grants done at the Column Family, Column Qualifier, or cell level. The user can do what that grant implies at any location in the table. A permission granted at global scope dominates all: the user is always allowed to take that action everywhere.

Permissions

Possible permissions include the following:

Permissions

  • Superuser - a special user that belongs to group "supergroup" and has unlimited access
  • Admin (A)
  • Create (C)
  • Write (W)
  • Read (R)
  • Execute (X)

For the most part, permissions work in an expected way, with the following caveats:

Having Write permission does not imply Read permission.

It is possible and sometimes desirable for a user to be able to write data that same user cannot read. One such example is a log-writing process.

The hbase:meta table is readable by every user, regardless of the user's other grants or restrictions.

This is a requirement for HBase to function correctly.

CheckAndPut and CheckAndDelete operations will fail if the user does not have both Write and Read permission.

Increment and Append operations do not require Read access.

The superuser, as the name suggests has permissions to perform all possible operations.

And for the operations marked with *, the checks are done in post hook and only subset of results satisfying access checks are returned back to the user.

The following table is sorted by the interface that provides each operation. In case the table goes out of date, the unit tests which check for accuracy of permissions can be found in hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java, and the access controls themselves can be examined in hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java.

ACL Matrix

InterfaceOperationPermissions
MastercreateTablesuperuser|global(C)|NS(C)
modifyTablesuperuser|global(A)|global(C)|NS(A)|NS(C)|TableOwner|table(A)|table(C)
deleteTablesuperuser|global(A)|global(C)|NS(A)|NS(C)|TableOwner|table(A)|table(C)
truncateTablesuperuser|global(A)|global(C)|NS(A)|NS(C)|TableOwner|table(A)|table(C)
addColumnsuperuser|global(A)|global(C)|NS(A)|NS(C)|TableOwner|table(A)|table(C)
modifyColumnsuperuser|global(A)|global(C)|NS(A)|NS(C)|TableOwner|table(A)|table(C)|column(A)|column(C)
deleteColumnsuperuser|global(A)|global(C)|NS(A)|NS(C)|TableOwner|table(A)|table(C)|column(A)|column(C)
enableTablesuperuser|global(A)|global(C)|NS(A)|NS(C)|TableOwner|table(A)|table(C)
disableTablesuperuser|global(A)|global(C)|NS(A)|NS(C)|TableOwner|table(A)|table(C)
disableAclTableNot allowed
movesuperuser|global(A)|NS(A)|TableOwner|table(A)
assignsuperuser|global(A)|NS(A)|TableOwner|table(A)
unassignsuperuser|global(A)|NS(A)|TableOwner|table(A)
regionOfflinesuperuser|global(A)|NS(A)|TableOwner|table(A)
balancesuperuser|global(A)
balanceSwitchsuperuser|global(A)
shutdownsuperuser|global(A)
stopMastersuperuser|global(A)
snapshotsuperuser|global(A)|NS(A)|TableOwner|table(A)
listSnapshotsuperuser|global(A)|SnapshotOwner
cloneSnapshotsuperuser|global(A)|(SnapshotOwner & TableName matches)
restoreSnapshotsuperuser|global(A)|SnapshotOwner & (NS(A)|TableOwner|table(A))
deleteSnapshotsuperuser|global(A)|SnapshotOwner
createNamespacesuperuser|global(A)
deleteNamespacesuperuser|global(A)
modifyNamespacesuperuser|global(A)
getNamespaceDescriptorsuperuser|global(A)|NS(A)
listNamespaceDescriptors*superuser|global(A)|NS(A)
flushTablesuperuser|global(A)|global(C)|NS(A)|NS(C)|TableOwner|table(A)|table(C)
getTableDescriptors*superuser|global(A)|global(C)|NS(A)|NS(C)|TableOwner|table(A)|table(C)
getTableNames*superuser|TableOwner|Any global or table perm
setUserQuota(global level)superuser|global(A)
setUserQuota(namespace level)superuser|global(A)
setUserQuota(Table level)superuser|global(A)|NS(A)|TableOwner|table(A)
setTableQuotasuperuser|global(A)|NS(A)|TableOwner|table(A)
setNamespaceQuotasuperuser|global(A)
addReplicationPeersuperuser|global(A)
removeReplicationPeersuperuser|global(A)
enableReplicationPeersuperuser|global(A)
disableReplicationPeersuperuser|global(A)
getReplicationPeerConfigsuperuser|global(A)
updateReplicationPeerConfigsuperuser|global(A)
listReplicationPeerssuperuser|global(A)
getClusterStatusany user
RegionopenRegionsuperuser|global(A)
closeRegionsuperuser|global(A)
flushsuperuser|global(A)|global(C)|TableOwner|table(A)|table(C)
splitsuperuser|global(A)|TableOwner|TableOwner|table(A)
compactsuperuser|global(A)|global(C)|TableOwner|table(A)|table(C)
getClosestRowBeforesuperuser|global(R)|NS(R)|TableOwner|table(R)|CF(R)|CQ(R)
getOpsuperuser|global(R)|NS(R)|TableOwner|table(R)|CF(R)|CQ(R)
existssuperuser|global(R)|NS(R)|TableOwner|table(R)|CF(R)|CQ(R)
putsuperuser|global(W)|NS(W)|table(W)|TableOwner|CF(W)|CQ(W)
deletesuperuser|global(W)|NS(W)|table(W)|TableOwner|CF(W)|CQ(W)
batchMutatesuperuser|global(W)|NS(W)|TableOwner|table(W)|CF(W)|CQ(W)
checkAndPutsuperuser|global(RW)|NS(RW)|TableOwner|table(RW)|CF(RW)|CQ(RW)
checkAndPutAfterRowLocksuperuser|global(R)|NS(R)|TableOwner|Table(R)|CF(R)|CQ(R)
checkAndDeletesuperuser|global(RW)|NS(RW)|TableOwner|table(RW)|CF(RW)|CQ(RW)
checkAndDeleteAfterRowLocksuperuser|global(R)|NS(R)|TableOwner|table(R)|CF(R)|CQ(R)
incrementColumnValuesuperuser|global(W)|NS(W)|TableOwner|table(W)|CF(W)|CQ(W)
appendsuperuser|global(W)|NS(W)|TableOwner|table(W)|CF(W)|CQ(W)
appendAfterRowLocksuperuser|global(W)|NS(W)|TableOwner|table(W)|CF(W)|CQ(W)
incrementsuperuser|global(W)|NS(W)|TableOwner|table(W)|CF(W)|CQ(W)
incrementAfterRowLocksuperuser|global(W)|NS(W)|TableOwner|table(W)|CF(W)|CQ(W)
scannerOpensuperuser|global(R)|NS(R)|TableOwner|table(R)|CF(R)|CQ(R)
scannerNextsuperuser|global(R)|NS(R)|TableOwner|table(R)|CF(R)|CQ(R)
scannerClosesuperuser|global(R)|NS(R)|TableOwner|table(R)|CF(R)|CQ(R)
bulkLoadHFilesuperuser|global(C)|TableOwner|table(C)|CF(C)
prepareBulkLoadsuperuser|global(C)|TableOwner|table(C)|CF(C)
cleanupBulkLoadsuperuser|global(C)|TableOwner|table(C)|CF(C)
Endpointinvokesuperuser|global(X)|NS(X)|TableOwner|table(X)
AccessControllergrant(global level)global(A)
grant(namespace level)global(A)|NS(A)
grant(table level)global(A)|NS(A)|TableOwner|table(A)|CF(A)|CQ(A)
revoke(global level)global(A)
revoke(namespace level)global(A)|NS(A)
revoke(table level)global(A)|NS(A)|TableOwner|table(A)|CF(A)|CQ(A)
getUserPermissions(global level)global(A)
getUserPermissions(namespace level)global(A)|NS(A)
getUserPermissions(table level)global(A)|NS(A)|TableOwner|table(A)|CF(A)|CQ(A)
hasPermission(table level)global(A)|SelfUserCheck
RegionServerstopRegionServersuperuser|global(A)
mergeRegionssuperuser|global(A)
rollWALWriterRequestsuperuser|global(A)
replicateLogEntriessuperuser|global(W)
RSGroupaddRSGroupsuperuser|global(A)
balanceRSGroupsuperuser|global(A)
getRSGroupInfosuperuser|global(A)
getRSGroupInfoOfTablesuperuser|global(A)
getRSGroupOfServersuperuser|global(A)
listRSGroupssuperuser|global(A)
moveServerssuperuser|global(A)
moveServersAndTablessuperuser|global(A)
moveTablessuperuser|global(A)
removeRSGroupsuperuser|global(A)
removeServerssuperuser|global(A)
Edit on GitHub