mirror of https://github.com/apache/lucene.git
SOLR-7849: avoid re-regisetring pkiAuthentication plugin http interceptor
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1694681 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0b27204418
commit
f612c08a27
|
@ -306,8 +306,11 @@ public class CoreContainer {
|
|||
getUpdateShardHandler().reconfigureHttpClient(configurer);
|
||||
} else {
|
||||
if (pkiAuthenticationPlugin != null) {
|
||||
//this happened due to an authc plugin reload. no need to register the pkiAuthc plugin again
|
||||
if(pkiAuthenticationPlugin.isInterceptorRegistered()) return;
|
||||
log.info("PKIAuthenticationPlugin is managing internode requests");
|
||||
addHttpConfigurer(pkiAuthenticationPlugin);
|
||||
pkiAuthenticationPlugin.setInterceptorRegistered();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,6 +66,16 @@ public class PKIAuthenticationPlugin extends AuthenticationPlugin implements Htt
|
|||
private int maxValidity = 5000;
|
||||
private final String myNodeName;
|
||||
|
||||
private boolean interceptorRegistered = false;
|
||||
|
||||
public void setInterceptorRegistered(){
|
||||
this.interceptorRegistered = true;
|
||||
}
|
||||
|
||||
public boolean isInterceptorRegistered(){
|
||||
return interceptorRegistered;
|
||||
}
|
||||
|
||||
public PKIAuthenticationPlugin(CoreContainer cores, String nodeName) {
|
||||
this.cores = cores;
|
||||
myNodeName = nodeName;
|
||||
|
|
Loading…
Reference in New Issue