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
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate static final org.slf4j.Loggerstatic final StringFields 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 -
Method Summary
Modifier and TypeMethodDescription(package private) static booleancontainsUpperCase(Iterable<String> strings) protected voiddoFilter(javax.servlet.FilterChain filterChain, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) static StringgetDoasFromHeader(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.ConfigurationgetProxyuserConfiguration(javax.servlet.FilterConfig filterConfig) voidinit(javax.servlet.FilterConfig filterConfig) static javax.servlet.http.HttpServletRequesttoLowerCase(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:
initin interfacejavax.servlet.Filter- Overrides:
initin 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:
doFilterin classorg.apache.hadoop.security.authentication.server.AuthenticationFilter- Throws:
IOExceptionjavax.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)
-