You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by "jbertram (via GitHub)" <gi...@apache.org> on 2023/08/23 19:45:30 UTC

[GitHub] [activemq-artemis] jbertram opened a new pull request, #4589: ARTEMIS-4399 fix disabled authn/z cache

jbertram opened a new pull request, #4589:
URL: https://github.com/apache/activemq-artemis/pull/4589

   (no comment)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [activemq-artemis] gemmellr merged pull request #4589: ARTEMIS-4399 fix disabled authn/z cache

Posted by "gemmellr (via GitHub)" <gi...@apache.org>.
gemmellr merged PR #4589:
URL: https://github.com/apache/activemq-artemis/pull/4589


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [activemq-artemis] tabish121 commented on a diff in pull request #4589: ARTEMIS-4399 fix disabled authn/z cache

Posted by "tabish121 (via GitHub)" <gi...@apache.org>.
tabish121 commented on code in PR #4589:
URL: https://github.com/apache/activemq-artemis/pull/4589#discussion_r1303478094


##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/security/impl/SecurityStoreImpl.java:
##########
@@ -424,26 +432,71 @@ private void handleNoCacheLoginException(NoCacheLoginException e) {
       logger.debug("Skipping authentication cache due to exception: {}", e.getMessage());
    }
 
+   private void putAuthenticationCacheEntry(String user,
+                                            String password,
+                                            RemotingConnection connection,
+                                            Subject subject) {
+      if (authenticationCache != null) {
+         authenticationCache.put(createAuthenticationCacheKey(user, password, connection), new Pair<>(subject != null, subject));
+      }
+   }
+
+   private Pair<Boolean, Subject> getAuthenticationCacheEntry(String user,
+                                                              String password,
+                                                              RemotingConnection connection) {
+      if (authenticationCache == null) {
+         return null;
+      } else {
+         return authenticationCache.getIfPresent(createAuthenticationCacheKey(user, password, connection));
+      }
+   }
+
+   private void getAuthorizationCacheEntry(ConcurrentHashSet<SimpleString> set, String key) {

Review Comment:
   Think this should be putAuthorizationCacheEntry



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [activemq-artemis] jbertram commented on a diff in pull request #4589: ARTEMIS-4399 fix disabled authn/z cache

Posted by "jbertram (via GitHub)" <gi...@apache.org>.
jbertram commented on code in PR #4589:
URL: https://github.com/apache/activemq-artemis/pull/4589#discussion_r1303481917


##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/security/impl/SecurityStoreImpl.java:
##########
@@ -424,26 +432,71 @@ private void handleNoCacheLoginException(NoCacheLoginException e) {
       logger.debug("Skipping authentication cache due to exception: {}", e.getMessage());
    }
 
+   private void putAuthenticationCacheEntry(String user,
+                                            String password,
+                                            RemotingConnection connection,
+                                            Subject subject) {
+      if (authenticationCache != null) {
+         authenticationCache.put(createAuthenticationCacheKey(user, password, connection), new Pair<>(subject != null, subject));
+      }
+   }
+
+   private Pair<Boolean, Subject> getAuthenticationCacheEntry(String user,
+                                                              String password,
+                                                              RemotingConnection connection) {
+      if (authenticationCache == null) {
+         return null;
+      } else {
+         return authenticationCache.getIfPresent(createAuthenticationCacheKey(user, password, connection));
+      }
+   }
+
+   private void getAuthorizationCacheEntry(ConcurrentHashSet<SimpleString> set, String key) {

Review Comment:
   Indeed!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org