mirror of https://github.com/apache/lucene.git
improved logging for debug errors such as these SOLR-9143
This commit is contained in:
parent
eae605b532
commit
5a18599892
|
@ -64,14 +64,7 @@ public class PKIAuthenticationPlugin extends AuthenticationPlugin implements Htt
|
||||||
private final Map<String, PublicKey> keyCache = new ConcurrentHashMap<>();
|
private final Map<String, PublicKey> keyCache = new ConcurrentHashMap<>();
|
||||||
private final CryptoKeys.RSAKeyPair keyPair = new CryptoKeys.RSAKeyPair();
|
private final CryptoKeys.RSAKeyPair keyPair = new CryptoKeys.RSAKeyPair();
|
||||||
private final CoreContainer cores;
|
private final CoreContainer cores;
|
||||||
private final int MAX_VALIDITY = getTTL();
|
private final int MAX_VALIDITY = Integer.parseInt(System.getProperty("pkiauth.ttl", "5000"));
|
||||||
|
|
||||||
private int getTTL() {
|
|
||||||
String ttl = System.getProperty("pkiauth.ttl");
|
|
||||||
if (ttl != null) log.info("TTL is set to {}ms", ttl);
|
|
||||||
return Integer.parseInt(System.getProperty("pkiauth.ttl", "5000"));
|
|
||||||
}
|
|
||||||
|
|
||||||
private final String myNodeName;
|
private final String myNodeName;
|
||||||
private final HttpHeaderClientInterceptor interceptor = new HttpHeaderClientInterceptor();
|
private final HttpHeaderClientInterceptor interceptor = new HttpHeaderClientInterceptor();
|
||||||
private boolean interceptorRegistered = false;
|
private boolean interceptorRegistered = false;
|
||||||
|
@ -129,7 +122,7 @@ public class PKIAuthenticationPlugin extends AuthenticationPlugin implements Htt
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ((receivedTime - decipher.timestamp) > MAX_VALIDITY) {
|
if ((receivedTime - decipher.timestamp) > MAX_VALIDITY) {
|
||||||
log.error("Invalid key request timestamp {} : received timestamp {}", decipher.timestamp, receivedTime);
|
log.error("Invalid key request timestamp: {} , received timestamp: {} , TTL: {}", decipher.timestamp, receivedTime, MAX_VALIDITY);
|
||||||
filterChain.doFilter(request, response);
|
filterChain.doFilter(request, response);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue