lujiefsi edited a comment on pull request #2809:
URL: https://github.com/apache/hbase/pull/2809#issuecomment-750342006


   @virajjasani 
   I will add a test case,  ther still a problem  for unit test, i will figure 
it out.
   
   _public void testUnauthorizedSetTableStateInMeta() throws Exception {
       AccessTestAction action = new AccessTestAction() {
         @Override public Object run() throws Exception {
           Hbck hbck = TEST_UTIL.getHbck();
           hbck.setTableStateInMeta(new TableState(TEST_TABLE, 
TableState.State.DISABLED));
           return null;
         }
       };
       verifyDenied(action, USER_CREATE, USER_OWNER, USER_RW, USER_RO, 
USER_NONE, USER_GROUP_READ,
           USER_GROUP_WRITE, USER_GROUP_CREATE);
     }_
   
   Above code is the test code, but i found that RPCServe still use admin user 
   
   _protected void requirePermission(String request, Permission.Action perm) 
throws IOException {
       if (accessChecker != null) {
         
accessChecker.requirePermission(RpcServer.getRequestUser().orElse(null), 
request, null, perm);
       }
     }_
   RpcServer.getRequestUser().orElse(null) returns admin user, not non-admin 
user, this would not happen in real clauster.
   If someone could point the root cause, plese leave a comment.


----------------------------------------------------------------
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.

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


Reply via email to