public class PKIAuthenticationPlugin extends AuthenticationPlugin implements HttpClientBuilderPlugin
| Modifier and Type | Class and Description |
|---|---|
static class |
PKIAuthenticationPlugin.PKIHeaderData |
SolrInfoBean.Category, SolrInfoBean.Group| Modifier and Type | Field and Description |
|---|---|
static String |
HEADER |
static String |
NODE_IS_USER |
AUTHENTICATION_PLUGIN_PROP, HTTP_HEADER_X_SOLR_AUTHDATA, numAuthenticated, numErrors, numMissingCredentials, numPassThrough, numWrongCredentials, requests, requestTimes, solrMetricsContext, totalTime| Constructor and Description |
|---|
PKIAuthenticationPlugin(CoreContainer cores,
String nodeName,
PublicKeyHandler publicKeyHandler) |
| 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.
|
SolrHttpClientBuilder |
getHttpClientBuilder(SolrHttpClientBuilder builder) |
String |
getPublicKey() |
void |
init(Map<String,Object> pluginConfig)
This is called upon loading up of a plugin, used for setting it up.
|
boolean |
isInterceptorRegistered() |
boolean |
needsAuthorization(javax.servlet.http.HttpServletRequest req) |
void |
setup(Http2SolrClient client) |
authenticate, closeRequest, getCategory, getDescription, getMetricNames, getName, getSolrMetricsContext, initializeMetrics, interceptInternodeRequest, interceptInternodeRequestclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetMetricRegistry, getMetricsSnapshot, registerMetricNamegetUniqueMetricTag, initializeMetricspublic static final String HEADER
public static final String NODE_IS_USER
public PKIAuthenticationPlugin(CoreContainer cores, String nodeName, PublicKeyHandler publicKeyHandler)
public boolean isInterceptorRegistered()
public void init(Map<String,Object> pluginConfig)
AuthenticationPlugininit in class AuthenticationPluginpluginConfig - Config parameters, possibly from a ZK sourcepublic boolean doAuthenticate(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain filterChain)
throws Exception
AuthenticationPlugindoAuthenticate in class AuthenticationPluginrequest - the http requestresponse - the http responsefilterChain - the servlet filter chainException - any exception thrown during the authentication, e.g. PrivilegedActionExceptionpublic void setup(Http2SolrClient client)
setup in interface HttpClientBuilderPluginpublic SolrHttpClientBuilder getHttpClientBuilder(SolrHttpClientBuilder builder)
getHttpClientBuilder in interface HttpClientBuilderPluginpublic boolean needsAuthorization(javax.servlet.http.HttpServletRequest req)
public void close()
throws IOException
SolrMetricProducerSolrMetricProducer.super.close() to ensure that
metrics with the same life-cycle as this component are properly unregistered. This prevents
obscure memory leaks.close in interface AutoCloseableclose in interface SolrMetricProducerIOExceptionpublic String getPublicKey()
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.