@Override
  protected Properties getConfiguration(String configPrefix, FilterConfig filterConfig)
    throws ServletException {
    Properties props = super.getConfiguration(configPrefix, filterConfig);
    // setting the cookie path to root '/' so it is used for all resources.
    props.setProperty(AuthenticationFilter.COOKIE_PATH, "/");

    Configuration conf = null;
    // Dirty hack to get at the RESTServer's configuration. These should be pulled out
    // of the FilterConfig.
    if (RESTServer.conf != null) {
      conf = RESTServer.conf;
    } else {
      conf = HBaseConfiguration.create();
    }
    for (Map.Entry<String, String> entry : conf) {
      String name = entry.getKey();
      if (name.startsWith(REST_PREFIX)) {
        String value = entry.getValue();
        if (name.equals(REST_AUTHENTICATION_PRINCIPAL)) {
          try {
            String machineName = Strings.domainNamePointerToHostName(DNS.getDefaultHost(
              conf.get(REST_DNS_INTERFACE, "default"), conf.get(REST_DNS_NAMESERVER, "default")));
            value = SecurityUtil.getServerPrincipal(value, machineName);
          } catch (IOException ie) {
            throw new ServletException("Failed to retrieve server principal", ie);
          }
        }
        if (LOG.isTraceEnabled()) {
          LOG.trace("Setting property " + name + "=" + value);
        }
        name = name.substring(REST_PREFIX_LEN);
        props.setProperty(name, value);
      }
    }
    return props;
  }
Returns the configuration to be used by the authentication filter to initialize the
authentication handler. This filter retrieves all HBase configurations and passes those started
with REST_PREFIX to the authentication handler. It is useful to support plugging different
authentication handlers.
hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/filter/AuthFilter.java