brusdev commented on code in PR #6050:
URL: https://github.com/apache/activemq-artemis/pull/6050#discussion_r2538216864


##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java:
##########
@@ -2436,7 +2436,7 @@ public synchronized RoutingStatus doSend(final 
Transaction tx,
          throw e;
       }
 
-      if (server.getConfiguration().isPopulateValidatedUser() && validatedUser 
!= null) {
+      if (server.getConfiguration().isPopulateValidatedUser() && validatedUser 
!= null && !validatedUser.equals(server.getConfiguration().getClusterUser())) {

Review Comment:
   I created a draft test to impersonate the `joker` user when 
PopulateValidatedUser is true to clarify what I mean, see 
https://github.com/brusdev/activemq-artemis/tree/ARTEMIS-4767_impersonate_joker
   
   My point is that when PopulateValidatedUser is true user should be able to 
trust the value of the property _AMQ_VALIDATED_USER / JMSXUserID



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to