static Configuration mask(Configuration conf) {
    Configuration maskedConf = new Configuration(conf);
    for (Map.Entry<String, String> entry : maskedConf) {
      String key = entry.getKey();
      for (String maskProperty : MASK_PROPERTIES) {
        if (key.toLowerCase().contains(maskProperty)) {
          maskedConf.set(key, MASKED);
          break;
        }
      }
    }
    return maskedConf;
  }
Guts of the servlet - extracted for easy testing.
hbase-http/src/main/java/org/apache/hadoop/hbase/http/conf/ConfServlet.java