Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-25543

When configuration "hadoop.security.authorization" is set to false, the system will still try to authorize an RPC and raise AccessDeniedException

    XMLWordPrintableJSON

Details

    • Reviewed

    Description

      In method processOneRpc(Bytebuffer buf) in RpcServer.java (branch-1), ServerRpcConnection.java (branch-2, master), if connectionHeadRead is set to false, the method authorizeConnection() will be invoked whatever the boolean authorize is true or false.

      if (!authorizeConnection()) {
        // Throw FatalConnectionException wrapping ACE so client does right thing and closes
        // down the connection instead of trying to read non-existent retun.
        throw new AccessDeniedException("Connection from " + this + " for service " +
          connectionHeader.getServiceName() + " is unauthorized for user: " + ugi);
      }
      

      In method authorizeConnection()

      if (ugi != null && ugi.getRealUser() != null
          && (authMethod != AuthMethod.DIGEST)) {
        ProxyUsers.authorize(ugi, this.getHostAddress(), conf);
      }

      ProxyUsers.authorize() will raise AuthorizationException.

      Attachments

        Activity

          People

            xytss123 Yutong Xiao
            xytss123 Yutong Xiao
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: