@Override
    public String[] getMechanismNames(Map<String, ?> props) {
      return (props == null) || "false".equals(props.get(Sasl.POLICY_NOPLAINTEXT))
        ? new String[] { "PLAIN" }
        : new String[0];
    }
This class was copied from Hadoop Common (3.1.2) and subsequently modified.
hbase-examples/src/main/java/org/apache/hadoop/hbase/security/provider/example/SaslPlainServer.java