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

Role Based Authorisation for JMX not working as expected

    XMLWordPrintableJSON

Details

    Description

      Hello,

      I tried to specify role based authorisation in management.xml for different addresses/queues (as instructed here):

      In Artemis profile config I gave hawtio role to the corresponding users:

      -Dhawtio.role=amq,auser,buser,cuser,duser

      The problem is that the authorisation is not working as expected, and only the FIRST "match domain" configuration is working fine.

      In my case, I tested with 4 sections as those in the screenshot above:

       <match domain="org.apache.activemq.artemis" key="address=a*">...

       <match domain="org.apache.activemq.artemis" key="address=b*">...

       <match domain="org.apache.activemq.artemis" key="address=c*">...

       <match domain="org.apache.activemq.artemis" key="address=d*">...

      When I login using "auser" in the web console, I can invoke operations on addresses/queues starting with "a*", and not on the others, as I'd expect.

      But when I login using some of the other users, for example, buser, I can still invoke operations on queues starting with "a", but not on the queues starting with "b*", as I'd expect (all operations are disabled, as in the screenshot below):

       

       

      It is interesting that, if I change the order of the sections in management.xml, for example as follows (so address "d*" is first):

      <match domain="org.apache.activemq.artemis" key="address=d*">...

       <match domain="org.apache.activemq.artemis" key="address=a*">...

       <match domain="org.apache.activemq.artemis" key="address=b*">...

       <match domain="org.apache.activemq.artemis" key="address=c*">...

      Then for "duser" that is authorized to work with "d*" queues it works as expected, but when I login with auser, buser or cuser instead, again the same problem happens that all those users can invoke operations on "d*" queues, and not on the queues that they are expected to be autorized for.

      I attach all relevant configuration files for a reference.

       

      Regards,

      Ivan

       

       

       

      Attachments

        1. image-2021-06-09-23-22-51-886.png
          38 kB
          Ivan Trpkov
        2. image-2021-06-09-23-29-49-670.png
          38 kB
          Ivan Trpkov
        3. security-settings.xml
          4 kB
          Ivan Trpkov
        4. artemis-roles.properties
          0.1 kB
          Ivan Trpkov
        5. artemis-users.properties
          1 kB
          Ivan Trpkov
        6. broker.xml
          7 kB
          Ivan Trpkov
        7. address-settings.xml
          2 kB
          Ivan Trpkov
        8. artemis.profile.cmd
          3 kB
          Ivan Trpkov
        9. addresses.xml
          2 kB
          Ivan Trpkov
        10. management.xml
          3 kB
          Ivan Trpkov

        Issue Links

          Activity

            People

              brusdev Domenico Francesco Bruscino
              ivantr5 Ivan Trpkov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m