public static Map<String, String> initSaslProperties(String rpcProtection) {
    String saslQop;
    if (rpcProtection.isEmpty()) {
      saslQop = QualityOfProtection.AUTHENTICATION.getSaslQop();
    } else {
      StringBuilder saslQopBuilder = new StringBuilder();
      for (String s : Splitter.on(',').split(rpcProtection)) {
        QualityOfProtection qop = getQop(s);
        saslQopBuilder.append(",").append(qop.getSaslQop());
      }
      saslQop = saslQopBuilder.substring(1); // remove first ','
    }
    Map<String, String> saslProps = new TreeMap<>();
    saslProps.put(Sasl.QOP, saslQop);
    saslProps.put(Sasl.SERVER_AUTH, "true");
    return saslProps;
  }
Initialize SASL properties for a given RPC protection level.
@param rpcProtection Value of 'hbase.rpc.protection' configuration.
@return Map with values for SASL properties.
hbase-client/src/main/java/org/apache/hadoop/hbase/security/SaslUtil.java