public class HadoopAuthPlugin extends AuthenticationPlugin
SolrInfoBean.Category, SolrInfoBean.Group
Modifier and Type | Field and Description |
---|---|
protected CoreContainer |
coreContainer |
static String |
PROXY_USER_CONFIGS
A property which configures proxy users for the underlying Hadoop authentication mechanism.
|
AUTHENTICATION_PLUGIN_PROP, HTTP_HEADER_X_SOLR_AUTHDATA, numAuthenticated, numErrors, numMissingCredentials, numPassThrough, numWrongCredentials, requests, requestTimes, solrMetricsContext, totalTime
Constructor and Description |
---|
HadoopAuthPlugin(CoreContainer coreContainer) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Implementations should always call
SolrMetricProducer.super.close() to ensure that
metrics with the same life-cycle as this component are properly unregistered. |
boolean |
doAuthenticate(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain filterChain)
This method attempts to authenticate the request.
|
protected javax.servlet.FilterConfig |
getInitFilterConfig(Map<String,Object> pluginConfig) |
void |
init(Map<String,Object> pluginConfig)
This is called upon loading up of a plugin, used for setting it up.
|
authenticate, closeRequest, getCategory, getDescription, getMetricNames, getName, getSolrMetricsContext, initializeMetrics, interceptInternodeRequest, interceptInternodeRequest
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMetricRegistry, getMetricsSnapshot, registerMetricName
getUniqueMetricTag, initializeMetrics
public static final String PROXY_USER_CONFIGS
protected final CoreContainer coreContainer
public HadoopAuthPlugin(CoreContainer coreContainer)
public void init(Map<String,Object> pluginConfig)
AuthenticationPlugin
init
in class AuthenticationPlugin
pluginConfig
- Config parameters, possibly from a ZK sourceprotected javax.servlet.FilterConfig getInitFilterConfig(Map<String,Object> pluginConfig)
public boolean doAuthenticate(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain filterChain) throws Exception
AuthenticationPlugin
doAuthenticate
in class AuthenticationPlugin
request
- the http requestresponse
- the http responsefilterChain
- the servlet filter chainException
- any exception thrown during the authentication, e.g. PrivilegedActionExceptionpublic void close() throws IOException
SolrMetricProducer
SolrMetricProducer.super.close()
to ensure that
metrics with the same life-cycle as this component are properly unregistered. This prevents
obscure memory leaks.
from: https://docs.oracle.com/javase/8/docs/api/java/lang/AutoCloseable.html
While this interface method is declared to throw Exception, implementers are strongly encouraged
to declare concrete implementations of the close method to throw more specific exceptions, or to
throw no exception at all if the close operation cannot fail.IOException
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.