public void processOneRpc(ByteBuff buf) throws IOException, InterruptedException {
    if (connectionHeaderRead) {
      processRequest(buf);
    } else {
      processConnectionHeader(buf);
      callCleanupIfNeeded();
      this.connectionHeaderRead = true;
      this.rpcServer.getRpcCoprocessorHost().preAuthorizeConnection(connectionHeader, addr);
      if (rpcServer.needAuthorization() && !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);
      }
      this.user = this.rpcServer.userProvider.create(this.ugi);
      this.rpcServer.getRpcCoprocessorHost().postAuthorizeConnection(
        this.user != null ? this.user.getName() : null, this.clientCertificateChain);
    }
  }
No protobuf encoding of raw sasl messages
hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/ServerRpcConnection.java