Class HadoopAuthPlugin
- java.lang.Object
-
- org.apache.solr.security.AuthenticationPlugin
-
- org.apache.solr.security.hadoop.HadoopAuthPlugin
-
- All Implemented Interfaces:
AutoCloseable
,SolrInfoBean
,SolrMetricProducer
- Direct Known Subclasses:
ConfigurableInternodeAuthHadoopPlugin
public class HadoopAuthPlugin extends AuthenticationPlugin
This class implements a generic plugin which can use authentication schemes exposed by the Hadoop framework. This plugin supports following features - integration with authentication mechanisms (e.g. kerberos) - Delegation token support - Proxy users (or secure impersonation) supportThis plugin enables defining configuration parameters required by the underlying Hadoop authentication mechanism. These configuration parameters can either be specified as a Java system property or the default value can be specified as part of the plugin configuration.
The proxy users are configured by specifying relevant Hadoop configuration parameters. Please note that the delegation token support must be enabled for using the proxy users support.
Note - this class does not support configuring authentication mechanism for Solr internal communication. For this purpose ConfigurableInternodeAuthHadoopPlugin should be used. If this plugin is used in the SolrCloud mode, it will use PKI based authentication mechanism for Solr internal communication.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.solr.core.SolrInfoBean
SolrInfoBean.Category, SolrInfoBean.Group
-
-
Field Summary
Fields Modifier and Type Field Description protected CoreContainer
coreContainer
static String
PROXY_USER_CONFIGS
A property which configures proxy users for the underlying Hadoop authentication mechanism.-
Fields inherited from class org.apache.solr.security.AuthenticationPlugin
AUTHENTICATION_PLUGIN_PROP, HTTP_HEADER_X_SOLR_AUTHDATA, numAuthenticated, numErrors, numMissingCredentials, numPassThrough, numWrongCredentials, requests, requestTimes, solrMetricsContext, totalTime
-
-
Constructor Summary
Constructors Constructor Description HadoopAuthPlugin(CoreContainer coreContainer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
boolean
doAuthenticate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain filterChain)
protected javax.servlet.FilterConfig
getInitFilterConfig(Map<String,Object> pluginConfig)
void
init(Map<String,Object> pluginConfig)
-
Methods inherited from class org.apache.solr.security.AuthenticationPlugin
authenticate, closeRequest, getCategory, getDescription, getName, getSolrMetricsContext, initializeMetrics, interceptInternodeRequest, interceptInternodeRequest, wrapWithPrincipal, wrapWithPrincipal
-
-
-
-
Field Detail
-
PROXY_USER_CONFIGS
public static final String PROXY_USER_CONFIGS
A property which configures proxy users for the underlying Hadoop authentication mechanism. This configuration is expressed as a collection of key-value pairs (i.e. property-name : value).- See Also:
- Constant Field Values
-
coreContainer
protected final CoreContainer coreContainer
-
-
Constructor Detail
-
HadoopAuthPlugin
public HadoopAuthPlugin(CoreContainer coreContainer)
-
-
Method Detail
-
init
public void init(Map<String,Object> pluginConfig)
- Specified by:
init
in classAuthenticationPlugin
-
getInitFilterConfig
protected javax.servlet.FilterConfig getInitFilterConfig(Map<String,Object> pluginConfig)
-
doAuthenticate
public boolean doAuthenticate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain filterChain) throws Exception
- Specified by:
doAuthenticate
in classAuthenticationPlugin
- Throws:
Exception
-
close
public void close() throws IOException
- Throws:
IOException
-
-