lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From no...@apache.org
Subject lucene-solr:branch_6x: improved logging for debug errors such as these SOLR-9143
Date Tue, 24 May 2016 05:11:36 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/branch_6x b32a2e1b7 -> afe196481


improved logging for debug errors such as these SOLR-9143


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/afe19648
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/afe19648
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/afe19648

Branch: refs/heads/branch_6x
Commit: afe196481f4214acb4af5260bb2cbaa34ef90b86
Parents: b32a2e1
Author: Noble Paul <noble@apache.org>
Authored: Tue May 24 10:39:11 2016 +0530
Committer: Noble Paul <noble@apache.org>
Committed: Tue May 24 10:41:13 2016 +0530

----------------------------------------------------------------------
 .../apache/solr/security/PKIAuthenticationPlugin.java    | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/afe19648/solr/core/src/java/org/apache/solr/security/PKIAuthenticationPlugin.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/security/PKIAuthenticationPlugin.java b/solr/core/src/java/org/apache/solr/security/PKIAuthenticationPlugin.java
index 16101fc..dc668e1 100644
--- a/solr/core/src/java/org/apache/solr/security/PKIAuthenticationPlugin.java
+++ b/solr/core/src/java/org/apache/solr/security/PKIAuthenticationPlugin.java
@@ -64,14 +64,7 @@ public class PKIAuthenticationPlugin extends AuthenticationPlugin implements
Htt
   private final Map<String, PublicKey> keyCache = new ConcurrentHashMap<>();
   private final CryptoKeys.RSAKeyPair keyPair = new CryptoKeys.RSAKeyPair();
   private final CoreContainer cores;
-  private final int MAX_VALIDITY = getTTL();
-
-  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 int MAX_VALIDITY = Integer.parseInt(System.getProperty("pkiauth.ttl", "5000"));
   private final String myNodeName;
 
   private boolean interceptorRegistered = false;
@@ -129,7 +122,7 @@ public class PKIAuthenticationPlugin extends AuthenticationPlugin implements
Htt
       return;
     }
     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);
         return;
     }


Mime
View raw message