Package org.apache.solr.security
Class CertAuthPlugin
java.lang.Object
org.apache.solr.security.AuthenticationPlugin
org.apache.solr.security.CertAuthPlugin
- All Implemented Interfaces:
AutoCloseable,SolrInfoBean,SolrMetricProducer
An authentication plugin that sets principal based on the certificate subject
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.solr.core.SolrInfoBean
SolrInfoBean.Category, SolrInfoBean.Group -
Field Summary
FieldsFields inherited from class org.apache.solr.security.AuthenticationPlugin
AUTHENTICATION_PLUGIN_PROP, HTTP_HEADER_X_SOLR_AUTHDATA, numAuthenticated, numErrors, numMissingCredentials, numPassThrough, numWrongCredentials, requests, requestTimes, solrMetricsContextFields inherited from interface org.apache.solr.metrics.SolrMetricProducer
CATEGORY_ATTR, HANDLER_ATTR, NAME_ATTR, OPERATION_ATTR, PLUGIN_NAME_ATTR, RESULT_ATTR, TYPE_ATTR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleandoAuthenticate(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.FilterChain filterChain) This method attempts to authenticate the request.voidThis is called upon loading up of a plugin, used for setting it up.Methods inherited from class org.apache.solr.security.AuthenticationPlugin
authenticate, closeRequest, getCategory, getDescription, getName, getSolrMetricsContext, initializeMetrics, interceptInternodeRequest, wrapWithPrincipal, wrapWithPrincipalMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.solr.metrics.SolrMetricProducer
close
-
Field Details
-
coreContainer
-
-
Constructor Details
-
CertAuthPlugin
public CertAuthPlugin() -
CertAuthPlugin
-
-
Method Details
-
init
Description copied from class:AuthenticationPluginThis is called upon loading up of a plugin, used for setting it up.- Specified by:
initin classAuthenticationPlugin- Parameters:
pluginConfig- Config parameters, possibly from a ZK source
-
doAuthenticate
public boolean doAuthenticate(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.FilterChain filterChain) throws Exception Description copied from class:AuthenticationPluginThis method attempts to authenticate the request. Upon a successful authentication, this must call the next filter in the filter chain and set the user principal of the request, or else, upon an error or an authentication failure, throw an exception.- Specified by:
doAuthenticatein classAuthenticationPlugin- Parameters:
request- the http requestresponse- the http responsefilterChain- the servlet filter chain- Returns:
- false if the request not be processed by Solr (not continue), i.e. the response and status code have already been sent.
- Throws:
Exception- any exception thrown during the authentication, e.g. PrivilegedActionException
-