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


##########
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:
   > The cluster user is the real validated user for the target broker.
   
   Technically that is correct. However, as I understand it, the use-case for 
adding validate-user to a message is to track who originally sent the message. 
The fact that the message moved from one broker to another over a cluster 
connection is really just an implementation detail, and I would argue that 
we're leaking this information into the message when we shouldn't. 
   
   Furthermore, tracking the cluster-user doesn't really add meaningful 
information because the cluster-user is extremely unlikely to change.



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