keith-turner commented on code in PR #6203:
URL: https://github.com/apache/accumulo/pull/6203#discussion_r2908544978


##########
test/src/main/java/org/apache/accumulo/test/functional/PermissionsIT.java:
##########
@@ -703,8 +710,16 @@ public void tablePermissionTest() throws Exception {
         loginAs(rootUser);
         verifyHasOnlyTheseTablePermissions(c, c.whoami(), 
SystemTables.METADATA.tableName(),
             TablePermission.READ, TablePermission.ALTER_TABLE);
-        String tableName = getUniqueNames(1)[0] + "__TABLE_PERMISSION_TEST__";
 
+        // check test user permissions on FATE and SCAN_REF tables
+        loginAs(testUser);
+        verifyHasOnlyTheseTablePermissions(c, test_user_client.whoami(),
+            SystemTables.FATE.tableName());
+        verifyHasOnlyTheseTablePermissions(c, test_user_client.whoami(),
+            SystemTables.SCAN_REF.tableName());
+

Review Comment:
   If the test scans the fate table here it will probably succeed because the 
namespace grants permission 
[here](https://github.com/apache/accumulo/blob/db1e6525168ba3951daa5e0e7346e1e741a0f6d7/server/base/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java#L387).
  Would be good to also add a scan attempt here.
   
   Seems like we need to remove this namespace code because there is [table 
code](https://github.com/apache/accumulo/blob/db1e6525168ba3951daa5e0e7346e1e741a0f6d7/server/base/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java#L358)
 that already grants anyone access to read metadata and root.   Was not sure if 
removing that would impact the system user, but it does not seem it will 
because SecurityOperation has an explicit check that gives the system user all 
permissions.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to