public class SolrHadoopAuthenticationFilter
extends org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticationFilter
| Modifier and Type | Field and Description |
|---|---|
static String |
DO_AS_PARAM
Http param for requesting ProxyUser support.
|
static String |
SOLR_PREFIX |
static String |
SOLR_PROXYUSER_PREFIX |
static String |
TOKEN_KIND
Delegation token kind
|
static String |
USER_NAME
Request attribute constant for the user name.
|
| Constructor and Description |
|---|
SolrHadoopAuthenticationFilter() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Destroy the filter.
|
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain filterChain)
Enforces authentication using Hadoop-auth AuthenticationFilter.
|
protected Properties |
getConfiguration(String configPrefix,
javax.servlet.FilterConfig filterConfig)
Returns the System properties to be used by the authentication filter.
|
protected org.apache.hadoop.conf.Configuration |
getProxyuserConfiguration(javax.servlet.FilterConfig filterConfig)
Return the ProxyUser Configuration.
|
void |
init(javax.servlet.FilterConfig filterConfig)
Initialize the filter.
|
doFilter, setHandlerAuthMethodpublic static final String SOLR_PREFIX
public static final String SOLR_PROXYUSER_PREFIX
public static final String USER_NAME
public static final String DO_AS_PARAM
public static final String TOKEN_KIND
public void init(javax.servlet.FilterConfig filterConfig)
throws javax.servlet.ServletException
init in interface javax.servlet.Filterinit in class org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticationFilterfilterConfig - filter configuration.javax.servlet.ServletException - thrown if the filter could not be initialized.public void destroy()
destroy in interface javax.servlet.Filterdestroy in class org.apache.hadoop.security.authentication.server.AuthenticationFilterprotected org.apache.hadoop.conf.Configuration getProxyuserConfiguration(javax.servlet.FilterConfig filterConfig)
throws javax.servlet.ServletException
getProxyuserConfiguration in class org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticationFilterjavax.servlet.ServletExceptionprotected Properties getConfiguration(String configPrefix, javax.servlet.FilterConfig filterConfig)
SOLR_PREFIX will
be returned. The keys of the returned properties are trimmed from the SOLR_PREFIX
prefix, for example the property name 'solr.authentication.type' will
be just 'type'.getConfiguration in class org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticationFilterconfigPrefix - configuration prefix, this parameter is ignored by this implementation.filterConfig - filter configuration, this parameter is ignored by this implementation.SOLR_PREFIX, without the
prefix.public void doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain filterChain)
throws IOException,
javax.servlet.ServletException
doFilter in interface javax.servlet.FilterdoFilter in class org.apache.hadoop.security.authentication.server.AuthenticationFilterrequest - http request.response - http response.filterChain - filter chain.IOException - thrown if an IO error occurs.javax.servlet.ServletException - thrown if a servlet error occurs.Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.