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

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

                Author: ASF GitHub Bot
            Created on: 16/Nov/21 14:23
            Start Date: 16/Nov/21 14:23
    Worklog Time Spent: 10m 
      Work Description: brusdev commented on a change in pull request #3849:
URL: https://github.com/apache/activemq-artemis/pull/3849#discussion_r750300024



##########
File path: 
artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java
##########
@@ -1126,10 +1127,12 @@ public AMQConnectionContext getContext() {
       @Override
       public Response processAddConnection(ConnectionInfo info) throws 
Exception {
          try {
-            if (transportConnection.getRedirectTo() != null && 
protocolManager.getRedirectHandler()
-               .redirect(OpenWireConnection.this, info)) {
-               shutdown(true);
-               return null;
+            if (transportConnection.getRedirectTo() != null) {
+               protocolManager.validateUser(OpenWireConnection.this, info);

Review comment:
       I don't see others calling addConnection. Why not anticipating 
`protocolManager.validateUser` at the beginning of processAddConnection and 
removing it from addConnection to avoid the double execution?

##########
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:
       Why not anticipating server.validateUser and passing the validatedUser 
parameter to createSession to avoid the double execution?

##########
File path: pom.xml
##########
@@ -206,7 +206,7 @@
 
       
<activemq-surefire-argline>-Dorg.apache.commons.logging.Log=org.apache.activemq.artemis.logs.JBossLoggingApacheLoggerBridge
 -Dorg.apache.activemq.artemis.utils.RetryRule.retry=${retryTests} 
-Dbrokerconfig.maxDiskUsage=100 
-Dorg.apache.activemq.artemis.core.remoting.impl.netty.TransportConstants.DEFAULT_QUIET_PERIOD=0
 
-Dorg.apache.activemq.artemis.core.remoting.impl.netty.TransportConstants.DEFAULT_SHUTDOWN_TIMEOUT=0
 -Djava.util.logging.manager=org.jboss.logmanager.LogManager
          
-Dlogging.configuration="file:${activemq.basedir}/tests/config/${logging.config}"
-         
-Djava.library.path="${activemq.basedir}/target/bin/lib/linux-x86_64:${activemq.basedir}/target/bin/lib/linux-i686"
 -Djgroups.bind_addr=localhost 
-Dorg.apache.activemq.artemis.api.core.UDPBroadcastEndpointFactory.localBindAddress=localhost
+         
-Djava.library.path="${activemq.basedir}/target/bin/lib/linux-x86_64:${activemq.basedir}/target/bin/lib/linux-i686"
 -Djgroups.bind_addr=localhost 
-Dorg.apache.activemq.artemis.api.core.UDPBroadcastEndpointFactory.localBindAddress=0.0.0.0

Review comment:
       why do you need this 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]


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

    Worklog Id:     (was: 682029)
    Time Spent: 20m  (was: 10m)

> Broker balancer based on authenticated user role assignment
> -----------------------------------------------------------
>
>                 Key: ARTEMIS-3569
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-3569
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>          Components: balancer
>    Affects Versions: 2.19.0
>            Reporter: Gary Tully
>            Assignee: Gary Tully
>            Priority: Major
>             Fix For: 2.20.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> following up on ARTEMIS-3365 for the local target path.
> add support for ROLE_NAME as a targetKey.
> Matching one of the Roles of an authenticated principal associated with a 
> connection, accept or reject the connection based on some partition policy 
> based on the role.
> Using the existing regular expression based filter, it is possible to ensure 
> a sub set of roles are associated with a given broker.
> The symmeteric-simple-example that uses the client id key type can be 
> extended to support partitioning on role assignment, the configuration, to 
> use role names that begin with "PARTITION_"  and match "PARTITION_FOO" to 
> this broker, would be of the form:
> {code:java}
> <broker-balancer name="symmetric-simple-role">
>       <target-key>ROLE_NAME</target-key>
>       <target-key-filter>^PARTITION_*</target-key-filter>
>       <local-target-filter>^PARTITION_FOO.*</local-target-filter>
> </broker-balancer> {code}
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to