@Override
  protected void channelRead0(ChannelHandlerContext ctx, ByteBuf msg) throws Exception {
    // read the ConnectionHeaderResponse from server
    int len = msg.readInt();
    byte[] buff = new byte[len];
    msg.readBytes(buff);

    RPCProtos.ConnectionHeaderResponse connectionHeaderResponse =
      RPCProtos.ConnectionHeaderResponse.parseFrom(buff);

    // Get the CryptoCipherMeta, update the HBaseSaslRpcClient for Crypto Cipher
    if (connectionHeaderResponse.hasCryptoCipherMeta()) {
      CryptoAES cryptoAES =
        EncryptionUtil.createCryptoAES(connectionHeaderResponse.getCryptoCipherMeta(), conf);
      // replace the Sasl handler with Crypto AES handler
      setupCryptoAESHandler(ctx.pipeline(), cryptoAES);
    }

    saslPromise.setSuccess(true);
  }
Implement logic to deal with the rpc connection header.
@since 2.0.0
hbase-client/src/main/java/org/apache/hadoop/hbase/security/NettyHBaseRpcConnectionHeaderHandler.java