From 5bd332121fc753749129e8cbf35b76eb2cff5ee2 Mon Sep 17 00:00:00 2001 From: "markrmiller@gmail.com" Date: Mon, 13 Jul 2020 21:13:49 -0500 Subject: [PATCH] #131 - Make thread safe. --- .../org/apache/solr/security/JWTVerificationkeyResolver.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/solr/core/src/java/org/apache/solr/security/JWTVerificationkeyResolver.java b/solr/core/src/java/org/apache/solr/security/JWTVerificationkeyResolver.java index 3aca77cd3a99..90fea3eceece 100644 --- a/solr/core/src/java/org/apache/solr/security/JWTVerificationkeyResolver.java +++ b/solr/core/src/java/org/apache/solr/security/JWTVerificationkeyResolver.java @@ -26,6 +26,7 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; import org.apache.solr.common.SolrException; import org.jose4j.jwk.HttpsJwks; @@ -56,9 +57,9 @@ public class JWTVerificationkeyResolver implements VerificationKeyResolver { private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); - private VerificationJwkSelector verificationJwkSelector = new VerificationJwkSelector(); + private final VerificationJwkSelector verificationJwkSelector = new VerificationJwkSelector(); - private Map issuerConfigs = new HashMap<>(); + private Map issuerConfigs = new ConcurrentHashMap<>(); private final boolean requireIssuer; /**