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:
Noble Paul 2015-08-07 13:08:20 +00:00
parent 0b27204418
commit f612c08a27
2 changed files with 13 additions and 0 deletions

View File

@ -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();
}
}
}

View File

@ -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;