public FilterHolder makeAuthFilter() throws IOException {
    FilterHolder authFilter = new FilterHolder(AuthFilter.class);
    UserNameHandler.allowAnonymous(authFilter);
  
    String confPrefix = "dfs.web.authentication";
    String prefix = confPrefix + ".";
    authFilter.setInitParameter(AuthenticationFilter.CONFIG_PREFIX, confPrefix);
    authFilter.setInitParameter(prefix + AuthenticationFilter.COOKIE_PATH, "/");
    
    if (UserGroupInformation.isSecurityEnabled()) {
      authFilter.setInitParameter(prefix + AuthenticationFilter.AUTH_TYPE, KerberosAuthenticationHandler.TYPE);
      
      String serverPrincipal = SecurityUtil.getServerPrincipal(conf.kerberosPrincipal(), "0.0.0.0");
      authFilter.setInitParameter(prefix + KerberosAuthenticationHandler.PRINCIPAL, serverPrincipal);
      authFilter.setInitParameter(prefix + KerberosAuthenticationHandler.KEYTAB, conf.kerberosKeytab());
      authFilter.setInitParameter(prefix + AuthenticationFilter.SIGNATURE_SECRET, conf.kerberosSecret());
    } else {
      authFilter.setInitParameter(prefix + AuthenticationFilter.AUTH_TYPE, PseudoAuthenticationHandler.TYPE);
    }
    
    return authFilter;
  }
Create a channel connector for "http/https" requests.
hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/Main.java