以下矩阵显示了在 HBase 中执行操作所需的权限集。在使用该表之前,请阅读有关如何解释它的信息。
解释 ACL 矩阵表
ACL Matrix 表中使用以下约定:
从最广泛的范围开始评估权限,并在最窄的范围内进行评估。
范围对应于数据模型的级别。从最广泛到最窄,范围如下:
领域
全球
命名空间(NS)
表
柱族(CF)
列限定符(CQ)
细胞
例如,在表级别授予的权限支配在列族,列限定符或单元级别完成的任何授权。用户可以在表中的任何位置执行授权所暗示的内容。在全局范围内授予的权限支配所有权限:始终允许用户在任何地方执行该操作。
可能的权限包括以下内容:
权限
超级用户 - 属于“超级组”组的特殊用户,具有无限制访问权限
管理员(A)
创建(C)
写(W)
阅读(R)
执行(X)
在大多数情况下,权限以预期的方式工作,具有以下警告:
拥有写入权限并不意味着具有读取权限。
用户能够并且有时希望能够写入相同用户无法读取的数据。一个这样的例子是日志写入过程。
无论用户的其他授权或限制如何,每个用户都可以读取 hbase:meta 表。
这是 HBase 正常运行的要求。
如果用户没有写入和读取权限,则CheckAndPut和CheckAndDelete操作将失败。
Increment和Append操作不需要读访问权限。
顾名思义,superuser具有执行所有可能操作的权限。
对于标有*的操作,检查在后挂钩中完成,只有满足访问检查的结果子集才会返回给用户。
下表按提供每个操作的接口排序。如果表格过时,可以在 hbase-server / src / test / java / org / apache / hadoop / hbase / security / access / TestAccessController.java 中找到检查权限准确性的单元。 ,访问控制本身可以在 hbase-server / src / main / java / org / apache / hadoop / hbase / security / access / AccessController.java 中查看。
| 接口 | 手术 | 权限 |
|---|---|---|
| 主 | CREATETABLE | 超级用户|全球(C)| NS(C) |
| modifyTable | 超级用户|全球(A)|全球(C)| NS(A)| NS(C)|表所有者|表(A)|表(C) | |
| deleteTable | superuser|global(A)|global(C)|NS(A)|NS(C)|TableOwner|table(A)|table(C) | |
| truncateTable | superuser|global(A)|global(C)|NS(A)|NS(C)|TableOwner|table(A)|table(C) | |
| addColumn | superuser|global(A)|global(C)|NS(A)|NS(C)|TableOwner|table(A)|table(C) | |
| modifyColumn | 超级用户|全球(A)|全球(C)| NS(A)| NS(C)|表所有者|表(A)|表(C)|柱(A)|柱(C) | |
| deleteColumn | superuser|global(A)|global(C)|NS(A)|NS(C)|TableOwner|table(A)|table(C)|column(A)|column(C) | |
| enableTable | superuser|global(A)|global(C)|NS(A)|NS(C)|TableOwner|table(A)|table(C) | |
| disableTable | superuser|global(A)|global(C)|NS(A)|NS(C)|TableOwner|table(A)|table(C) | |
| disableAclTable | 不允许 | |
| 移动 | 超级用户|全球(A)| NS(A)|表所有者|表(A) | |
| 分配 | superuser|global(A)|NS(A)|TableOwner|table(A) | |
| 取消分配 | superuser|global(A)|NS(A)|TableOwner|table(A) | |
| regionOffline | superuser|global(A)|NS(A)|TableOwner|table(A) | |
| 平衡 | 超级用户|全球(A) | |
| balanceSwitch | superuser|global(A) | |
| 关掉 | superuser|global(A) | |
| stopMaster | superuser|global(A) | |
| 快照 | superuser|global(A)|NS(A)|TableOwner|table(A) | |
| listSnapshot | 超级用户|全球(A)| SnapshotOwner | |
| cloneSnapshot | 超级用户|全局(A)|(SnapshotOwner& TableName 匹配) | |
| restoreSnapshot | 超级用户|全球(A)| SnapshotOwner& (NS(A)|表所有者|表(A)) | |
| deleteSnapshot | superuser|global(A)|SnapshotOwner | |
| createNamespace | superuser|global(A) | |
| deleteNamespace | superuser|global(A) | |
| modifyNamespace | superuser|global(A) | |
| getNamespaceDescriptor | 超级用户|全球(A)| NS(A) | |
| listNamespaceDescriptors * | superuser|global(A)|NS(A) | |
| flushTable | superuser|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 * | 超级用户| TableOwner |任何全局或表 perm | |
| setUserQuota(全局级别) | superuser|global(A) | |
| setUserQuota(名称空间级别) | superuser|global(A) | |
| setUserQuota(表级) | superuser|global(A)|NS(A)|TableOwner|table(A) | |
| setTableQuota | superuser|global(A)|NS(A)|TableOwner|table(A) | |
| setNamespaceQuota | superuser|global(A) | |
| addReplicationPeer | superuser|global(A) | |
| removeReplicationPeer | superuser|global(A) | |
| enableReplicationPeer | superuser|global(A) | |
| disableReplicationPeer | superuser|global(A) | |
| getReplicationPeerConfig | superuser|global(A) | |
| updateReplicationPeerConfig | superuser|global(A) | |
| listReplicationPeers | superuser|global(A) | |
| getClusterStatus | 任何用户 | |
| 区域 | openRegion | superuser|global(A) |
| closeRegion | superuser|global(A) | |
| 红晕 | 超级用户|全球(A)|全球(C)|表所有者|表(A)|表(C) | |
| 分裂 | 超级用户|全球(A)|表所有者|表所有者|表(A) | |
| 紧凑 | superuser|global(A)|global(C)|TableOwner|table(A)|table(C) | |
| getClosestRowBefore | 超级用户|全球(R)| NS(R)|表所有者|表(R)| CF(R)| CQ(R) | |
| getOp | superuser|global(R)|NS(R)|TableOwner|table(R)|CF(R)|CQ(R) | |
| 存在 | superuser|global(R)|NS(R)|TableOwner|table(R)|CF(R)|CQ(R) | |
| 放 | 超级用户|全球(W)| NS(W)|表(W)|表所有者| CF(W)| CQ(W) | |
| 删除 | superuser|global(W)|NS(W)|table(W)|TableOwner|CF(W)|CQ(W) | |
| batchMutate | 超级用户|全球(W)| NS(W)|表所有者|表(W)| CF(W)| CQ(W) | |
| checkAndPut | 超级用户|全球(RW)| NS(RW)|表所有者|表(RW)| CF(RW)| CQ(RW) | |
| checkAndPutAfterRowLock | 超级用户|全球(R)| NS(R)|表所有者|表(R)| CF(R)| CQ(R) | |
| checkAndDelete | superuser|global(RW)|NS(RW)|TableOwner|table(RW)|CF(RW)|CQ(RW) | |
| checkAndDeleteAfterRowLock | superuser|global(R)|NS(R)|TableOwner|table(R)|CF(R)|CQ(R) | |
| incrementColumnValue | superuser|global(W)|NS(W)|TableOwner|table(W)|CF(W)|CQ(W) | |
| 附加 | superuser|global(W)|NS(W)|TableOwner|table(W)|CF(W)|CQ(W) | |
| appendAfterRowLock | superuser|global(W)|NS(W)|TableOwner|table(W)|CF(W)|CQ(W) | |
| 增量 | superuser|global(W)|NS(W)|TableOwner|table(W)|CF(W)|CQ(W) | |
| incrementAfterRowLock | superuser|global(W)|NS(W)|TableOwner|table(W)|CF(W)|CQ(W) | |
| scannerOpen | superuser|global(R)|NS(R)|TableOwner|table(R)|CF(R)|CQ(R) | |
| scannerNext | superuser|global(R)|NS(R)|TableOwner|table(R)|CF(R)|CQ(R) | |
| scannerClose | superuser|global(R)|NS(R)|TableOwner|table(R)|CF(R)|CQ(R) | |
| bulkLoadHFile | 超级用户|全球(C)|表所有者|表(C)| CF(C) | |
| prepareBulkLoad | superuser|global(C)|TableOwner|table(C)|CF(C) | |
| cleanupBulkLoad | superuser|global(C)|TableOwner|table(C)|CF(C) | |
| 端点 | 调用 | 超级用户|全球(X)| NS(X)|表所有者|表(X) |
| AccessController 的 | 补助金(全球一级) | 全球(A) |
| grant(名称空间级别) | 全球(A)| NS(A) | |
| 授权(表级) | 全球(A)| NS(A)|表所有者|表(A)| CF(A)| CQ(A) | |
| 撤销(全球一级) | global(A) | |
| revoke(名称空间级别) | global(A)|NS(A) | |
| 撤销(表级) | global(A)|NS(A)|TableOwner|table(A)|CF(A)|CQ(A) | |
| getUserPermissions(全局级别) | global(A) | |
| getUserPermissions(名称空间级别) | global(A)|NS(A) | |
| getUserPermissions(表级) | global(A)|NS(A)|TableOwner|table(A)|CF(A)|CQ(A) | |
| hasPermission(表级) | 全球(A)| SelfUserCheck | |
| RegionServer 的 | stopRegionServer | superuser|global(A) |
| mergeRegions | superuser|global(A) | |
| rollWALWriterRequest | superuser|global(A) | |
| replicateLogEntries | 超级用户|全球(W) | |
| RSGroup | addRSGroup | superuser|global(A) |
| balanceRSGroup | superuser|global(A) | |
| getRSGroupInfo | superuser|global(A) | |
| getRSGroupInfoOfTable | superuser|global(A) | |
| getRSGroupOfServer | superuser|global(A) | |
| listRSGroups | superuser|global(A) | |
| moveServers | superuser|global(A) | |
| moveServersAndTables | superuser|global(A) | |
| moveTables | superuser|global(A) | |
| removeRSGroup | superuser|global(A) |
removeServers |超级用户|全球(A)