Class ProxyUserAuthenticationFilter

java.lang.Object
org.apache.hadoop.security.authentication.server.AuthenticationFilter
org.apache.hadoop.hbase.http.ProxyUserAuthenticationFilter
All Implemented Interfaces:
javax.servlet.Filter

@Private @Evolving public class ProxyUserAuthenticationFilter extends org.apache.hadoop.security.authentication.server.AuthenticationFilter
This file has been copied directly (changing only the package name and and the ASF license text format, and adding the Yetus annotations) from Hadoop, as the Hadoop version that HBase depends on doesn't have it yet (as of 2020 Apr 24, there is no Hadoop release that has it either). Hadoop version: unreleased, master branch commit 4ea6c2f457496461afc63f38ef4cef3ab0efce49 Haddop path: hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/authentication/ server/ProxyUserAuthenticationFilter.java AuthenticationFilter which adds support to perform operations using end user instead of proxy user. Fetches the end user from doAs Query Parameter.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final String
     
    private static final org.slf4j.Logger
     
    static final String
     

    Fields inherited from class org.apache.hadoop.security.authentication.server.AuthenticationFilter

    AUTH_TOKEN_MAX_INACTIVE_INTERVAL, AUTH_TOKEN_VALIDITY, AUTH_TYPE, CONFIG_PREFIX, COOKIE_DOMAIN, COOKIE_PATH, COOKIE_PERSISTENT, SIGNATURE_SECRET, SIGNATURE_SECRET_FILE, SIGNER_SECRET_PROVIDER, SIGNER_SECRET_PROVIDER_ATTRIBUTE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) static boolean
     
    protected void
    doFilter(javax.servlet.FilterChain filterChain, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
     
    static String
    getDoasFromHeader(javax.servlet.http.HttpServletRequest request)
    The purpose of this function is to get the doAs parameter of a http request case insensitively
    protected org.apache.hadoop.conf.Configuration
    getProxyuserConfiguration(javax.servlet.FilterConfig filterConfig)
     
    void
    init(javax.servlet.FilterConfig filterConfig)
     
    static javax.servlet.http.HttpServletRequest
    toLowerCase(javax.servlet.http.HttpServletRequest request)
     

    Methods inherited from class org.apache.hadoop.security.authentication.server.AuthenticationFilter

    constructSecretProvider, createAuthCookie, destroy, doFilter, getAuthenticationHandler, getConfiguration, getConfiguration, getCookieDomain, getCookiePath, getMaxInactiveInterval, getRequestURL, getToken, getValidity, initializeAuthHandler, initializeSecretProvider, isCookiePersistent, isCustomSignerSecretProvider, isRandomSecret, verifyTokenType

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • init

      public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException
      Specified by:
      init in interface javax.servlet.Filter
      Overrides:
      init in class org.apache.hadoop.security.authentication.server.AuthenticationFilter
      Throws:
      javax.servlet.ServletException
    • doFilter

      protected void doFilter(javax.servlet.FilterChain filterChain, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, javax.servlet.ServletException
      Overrides:
      doFilter in class org.apache.hadoop.security.authentication.server.AuthenticationFilter
      Throws:
      IOException
      javax.servlet.ServletException
    • getProxyuserConfiguration

      protected org.apache.hadoop.conf.Configuration getProxyuserConfiguration(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException
      Throws:
      javax.servlet.ServletException
    • containsUpperCase

      static boolean containsUpperCase(Iterable<String> strings)
    • getDoasFromHeader

      public static String getDoasFromHeader(javax.servlet.http.HttpServletRequest request)
      The purpose of this function is to get the doAs parameter of a http request case insensitively
      Returns:
      doAs parameter if exists or null otherwise
    • toLowerCase

      public static javax.servlet.http.HttpServletRequest toLowerCase(javax.servlet.http.HttpServletRequest request)