Uploaded image for project: 'ActiveMQ Artemis'
  1. ActiveMQ Artemis
  2. ARTEMIS-1629

Set clientID on STOMP connections before authentication

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.4.0
    • 2.5.0
    • STOMP
    • None
    • Artemis 2.5.0-SNAPSHOT

    Description

      We are using a custom security manager in our setup. Opposite to other protocols (e.g. AMQP), executing remotingConnection.getClientID() returns null for StompConnections when accessed from within ActiveMQSecurityManager3#validateUser(String, String, RemotingConnection).

      We however already need to know the client at this time as we perform certain validations/on-the-fly configurations based on the value.

      The issue would be solved if the statement connection.setClientID(clientID); from https://github.com/apache/activemq-artemis/blob/master/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/v10/StompFrameHandlerV10.java#L56 would be moved two lines up before if (connection.validateUser(login, passcode, connection)) {

       

      Attachments

        1. Artemis1629Test.java
          5 kB
          Johan Stenberg

        Issue Links

          Activity

            People

              jbertram Justin Bertram
              johan1 Johan Stenberg
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: