@SuppressWarnings("unchecked")
  @Override
  public Map<String, String> getHadoopSaslProperties(Configuration conf) {
    if (SASL_PROPS_FIELD != null) {
      // hadoop 2.4 and earlier way of finding the sasl property settings
      // Initialize the SaslRpcServer to ensure QOP parameters are read from
      // conf
      SaslRpcServer.init(conf);
      try {
        return (Map<String, String>) SASL_PROPS_FIELD.get(null);
      } catch (Exception e) {
        throw new IllegalStateException("Error finding hadoop SASL properties", e);
      }
    }
    // 2.5 and later way of finding sasl property
    try {
      Configurable saslPropertiesResolver = (Configurable) RES_GET_INSTANCE_METHOD.invoke(null,
          conf);
      saslPropertiesResolver.setConf(conf);
      return (Map<String, String>) GET_DEFAULT_PROP_METHOD.invoke(saslPropertiesResolver);
    } catch (Exception e) {
      throw new IllegalStateException("Error finding hadoop SASL properties", e);
    }
  }
Read and return Hadoop SASL configuration which can be configured using
"hadoop.rpc.protection"

@param conf
@return Hadoop SASL configuration
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/security/HadoopThriftAuthBridge23.java