Repository navigation
Conversation
…ser permission in postGrant/PostRevoke
There was a problem hiding this comment.
🟡 Changes recommended
Global grants are mislabeled as table permissions, and incorrect HDFS group ACL names can break group-based snapshot access after direct-permission changes, with regression coverage also missing.
3 open issues
What changed in this PR
Updates HBase’s snapshot-scanning ACL synchronization to use the permission stored for the exact user or group, rather than permissions inherited through group membership.
Changes:
- Adds exact-principal permission lookups for global, namespace, and table scopes.
- Uses these lookups when synchronizing HDFS ACLs after grants and revokes.
- Separates permission-storage tests into a dedicated suite and adds lookup coverage.
| File | Description |
|---|---|
hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestTablePermissions.java |
Retains split-persistence, permission-equality, and cache tests after moving storage tests. |
hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestPermissionStorage.java |
Adds dedicated storage tests covering exact lookups, revocation, groups, and serialization. |
hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/SnapshotScannerHDFSAclController.java |
Replaces group-inclusive filtering in grant and revoke hooks. |
hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/PermissionStorage.java |
Adds direct getters for a principal’s stored permission at each scope. |
Review effort: Max (adaptive)
Comment on lines
+636
to
+637
| return getUserPermission(conn, toTableEntryName(tableName), user, | ||
| () -> Permission.newBuilder(tableName)); |
| switch (userPermission.getAccessScope()) { | ||
| case GLOBAL: | ||
| UserPermission perm = getUserGlobalPermission(conn, userName); | ||
| UserPermission perm = PermissionStorage.getUserGlobalPermission(conn, userName); |
Comment on lines
+433
to
+434
| UserPermission userTablePerm = | ||
| PermissionStorage.getUserTablePermission(conn, tableName, userName); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

…ser permission in postGrant/PostRevoke