[ 
https://issues.apache.org/jira/browse/ARTEMIS-4767?focusedWorklogId=992232&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-992232
 ]

ASF GitHub Bot logged work on ARTEMIS-4767:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 18/Nov/25 13:22
            Start Date: 18/Nov/25 13:22
    Worklog Time Spent: 10m 
      Work Description: 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





Issue Time Tracking
-------------------

    Worklog Id:     (was: 992232)
    Time Spent: 1h 40m  (was: 1.5h)

> Original JMSXUserID is lost on message redistribution
> -----------------------------------------------------
>
>                 Key: ARTEMIS-4767
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-4767
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Clustering
>    Affects Versions: 2.33.0
>            Reporter: Michael Desmedt
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> when {{populate-validated-user}} is set to true, in a clustered configuration:
> if both the producer and the consumer are on the same broker, when a message 
> is sent with user1, consumed message contains property {{JMSXUserID:user1}}
> if the producer and the consumer are on different brokers in the same 
> cluster, when a message is sent with user1, the consumed message contains 
> property {{JMSXUserID:<value of <cluster-user>>}}
>  
> initial validated-user value is lost.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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