Package org.apache.hadoop.hbase.http
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
Modifier and TypeFieldDescriptionprivate 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
-
Method Summary
Modifier and TypeMethodDescription(package private) static boolean
containsUpperCase
(Iterable<String> strings) 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 insensitivelyprotected 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
-
Field Details
-
LOG
-
DO_AS
- See Also:
-
PROXYUSER_PREFIX
- See Also:
-
-
Constructor Details
-
ProxyUserAuthenticationFilter
public ProxyUserAuthenticationFilter()
-
-
Method Details
-
init
- Specified by:
init
in interfacejavax.servlet.Filter
- Overrides:
init
in classorg.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 classorg.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
-
getDoasFromHeader
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)
-