Package org.apache.solr.security.hadoop
Class KerberosPlugin
- java.lang.Object
-
- org.apache.solr.security.AuthenticationPlugin
-
- org.apache.solr.security.hadoop.KerberosPlugin
-
- All Implemented Interfaces:
AutoCloseable
,SolrInfoBean
,SolrMetricProducer
,HttpClientBuilderPlugin
public class KerberosPlugin extends AuthenticationPlugin implements HttpClientBuilderPlugin
-
-
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 static String
COOKIE_DOMAIN_PARAM
static String
COOKIE_PATH_PARAM
static String
COOKIE_PORT_AWARE_PARAM
static String
DELEGATION_TOKEN_ENABLED
static String
DELEGATION_TOKEN_KIND
static String
DELEGATION_TOKEN_SECRET_MANAGER_ZNODE_WORKING_PATH
static String
DELEGATION_TOKEN_SECRET_PROVIDER
static String
DELEGATION_TOKEN_SECRET_PROVIDER_ZK_PATH
static String
DELEGATION_TOKEN_TYPE_DEFAULT
static String
DELEGATION_TOKEN_VALIDITY
static String
IMPERSONATOR_DO_AS_HTTP_PARAM
static String
IMPERSONATOR_PREFIX
static String
IMPERSONATOR_USER_NAME
static String
KEYTAB_PARAM
static String
NAME_RULES_MECHANISM_PARAM
static String
NAME_RULES_PARAM
static String
ORIGINAL_USER_PRINCIPAL_HEADER
static String
PRINCIPAL_PARAM
static String
TOKEN_VALID_PARAM
-
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 KerberosPlugin(CoreContainer coreContainer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
boolean
doAuthenticate(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse rsp, javax.servlet.FilterChain chain)
org.apache.solr.client.solrj.impl.SolrHttpClientBuilder
getHttpClientBuilder(org.apache.solr.client.solrj.impl.SolrHttpClientBuilder builder)
protected javax.servlet.FilterConfig
getInitFilterConfig(Map<String,Object> pluginConfig, boolean skipKerberosChecking)
protected javax.servlet.Filter
getKerberosFilter()
void
init(Map<String,Object> pluginConfig)
boolean
interceptInternodeRequest(org.apache.http.HttpRequest httpRequest, org.apache.http.protocol.HttpContext httpContext)
protected boolean
interceptInternodeRequest(org.eclipse.jetty.client.api.Request request)
protected void
setKerberosFilter(javax.servlet.Filter kerberosFilter)
void
setup(org.apache.solr.client.solrj.impl.Http2SolrClient client)
-
Methods inherited from class org.apache.solr.security.AuthenticationPlugin
authenticate, closeRequest, getCategory, getDescription, getName, getSolrMetricsContext, initializeMetrics, wrapWithPrincipal, wrapWithPrincipal
-
-
-
-
Field Detail
-
NAME_RULES_PARAM
public static final String NAME_RULES_PARAM
- See Also:
- Constant Field Values
-
NAME_RULES_MECHANISM_PARAM
public static final String NAME_RULES_MECHANISM_PARAM
- See Also:
- Constant Field Values
-
COOKIE_DOMAIN_PARAM
public static final String COOKIE_DOMAIN_PARAM
- See Also:
- Constant Field Values
-
COOKIE_PATH_PARAM
public static final String COOKIE_PATH_PARAM
- See Also:
- Constant Field Values
-
PRINCIPAL_PARAM
public static final String PRINCIPAL_PARAM
- See Also:
- Constant Field Values
-
KEYTAB_PARAM
public static final String KEYTAB_PARAM
- See Also:
- Constant Field Values
-
TOKEN_VALID_PARAM
public static final String TOKEN_VALID_PARAM
- See Also:
- Constant Field Values
-
COOKIE_PORT_AWARE_PARAM
public static final String COOKIE_PORT_AWARE_PARAM
- See Also:
- Constant Field Values
-
IMPERSONATOR_PREFIX
public static final String IMPERSONATOR_PREFIX
- See Also:
- Constant Field Values
-
DELEGATION_TOKEN_ENABLED
public static final String DELEGATION_TOKEN_ENABLED
- See Also:
- Constant Field Values
-
DELEGATION_TOKEN_KIND
public static final String DELEGATION_TOKEN_KIND
- See Also:
- Constant Field Values
-
DELEGATION_TOKEN_VALIDITY
public static final String DELEGATION_TOKEN_VALIDITY
- See Also:
- Constant Field Values
-
DELEGATION_TOKEN_SECRET_PROVIDER
public static final String DELEGATION_TOKEN_SECRET_PROVIDER
- See Also:
- Constant Field Values
-
DELEGATION_TOKEN_SECRET_PROVIDER_ZK_PATH
public static final String DELEGATION_TOKEN_SECRET_PROVIDER_ZK_PATH
- See Also:
- Constant Field Values
-
DELEGATION_TOKEN_SECRET_MANAGER_ZNODE_WORKING_PATH
public static final String DELEGATION_TOKEN_SECRET_MANAGER_ZNODE_WORKING_PATH
- See Also:
- Constant Field Values
-
DELEGATION_TOKEN_TYPE_DEFAULT
public static final String DELEGATION_TOKEN_TYPE_DEFAULT
- See Also:
- Constant Field Values
-
IMPERSONATOR_DO_AS_HTTP_PARAM
public static final String IMPERSONATOR_DO_AS_HTTP_PARAM
- See Also:
- Constant Field Values
-
IMPERSONATOR_USER_NAME
public static final String IMPERSONATOR_USER_NAME
- See Also:
- Constant Field Values
-
ORIGINAL_USER_PRINCIPAL_HEADER
public static final String ORIGINAL_USER_PRINCIPAL_HEADER
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
KerberosPlugin
public KerberosPlugin(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, boolean skipKerberosChecking)
-
doAuthenticate
public boolean doAuthenticate(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse rsp, javax.servlet.FilterChain chain) throws Exception
- Specified by:
doAuthenticate
in classAuthenticationPlugin
- Throws:
Exception
-
interceptInternodeRequest
public boolean interceptInternodeRequest(org.apache.http.HttpRequest httpRequest, org.apache.http.protocol.HttpContext httpContext)
- Overrides:
interceptInternodeRequest
in classAuthenticationPlugin
-
interceptInternodeRequest
protected boolean interceptInternodeRequest(org.eclipse.jetty.client.api.Request request)
- Overrides:
interceptInternodeRequest
in classAuthenticationPlugin
-
getHttpClientBuilder
public org.apache.solr.client.solrj.impl.SolrHttpClientBuilder getHttpClientBuilder(org.apache.solr.client.solrj.impl.SolrHttpClientBuilder builder)
- Specified by:
getHttpClientBuilder
in interfaceHttpClientBuilderPlugin
-
setup
public void setup(org.apache.solr.client.solrj.impl.Http2SolrClient client)
- Specified by:
setup
in interfaceHttpClientBuilderPlugin
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceSolrMetricProducer
-
getKerberosFilter
protected javax.servlet.Filter getKerberosFilter()
-
setKerberosFilter
protected void setKerberosFilter(javax.servlet.Filter kerberosFilter)
-
-