gtully commented on a change in pull request #3849:
URL: https://github.com/apache/activemq-artemis/pull/3849#discussion_r751230489



##########
File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQPacketHandler.java
##########
@@ -175,6 +171,11 @@ private void handleCreateSession(final 
CreateSessionMessage request) {
             activeMQPrincipal = connection.getDefaultActiveMQPrincipal();
          }
 
+         if (connection.getTransportConnection().getRedirectTo() != null) {
+            server.validateUser(activeMQPrincipal == null ? 
request.getUsername() : activeMQPrincipal.getUserName(), activeMQPrincipal == 
null ? request.getPassword() : activeMQPrincipal.getPassword(), connection, 
protocolManager.getSecurityDomain());

Review comment:
       that makes sense, create session is called in a few places, but 
preceding those with validate user is probably fine.
   I think there is a body of work to deal with the sasl subject and probably 
replace a validatedUser string with a subject at some stage... but that is for 
another day.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to