Uploaded image for project: 'ActiveMQ'
  1. ActiveMQ
  2. AMQ-6214

JAAS bug that causes user group membership not reloaded dynamically when reload is true

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.13.0, 5.13.2
    • Fix Version/s: 5.13.3, 5.14.0
    • Component/s: jaas
    • Labels:
    • Environment:

      Linux, Mac

    • Patch Info:
      Patch Available
    • Flags:
      Patch, Important

      Description

      There is a bug in JAAS that caused users group membership not dynamically loading at runtime. Specifically, when I used the org.apache.activemq.jaas.PropertiesLoginModule with reload=true, changes in user name and password were reflected in connections after the changes, but changes in group membership was not reloaded/picked up by new connections.

      The configuration of my broker xml and users.properties, groups.properties, as well as the login.config files are attached.

      The problem was repeatable always.

      The cause of the problem was identified as the groups membership was cached and the cache was not cleared (reloaded) after the groups.properties file change.

      The fix is to add one line of code in the org.apache.activemq.jaas.ReloadableProperties.java class.

      The src code with the fix for org.apache.activemq.jaas.ReloadableProperties.java is attached in the ticket as well.

      Please verify the fix and merge this one line of code change in org.apache.activemq.jaas.ReloadableProperties.java class in src branches for 5.13.0 as I tested the problem with 5.13.0 only. The fix should be carried forward and retroactively merged into previous versions as well.

      There is no negative impact on software or any noticeable impact on server performance.

        Attachments

        1. activemq.xml
          7 kB
          Nanchang Yang
        2. groups.properties
          1.0 kB
          Nanchang Yang
        3. login.config
          1 kB
          Nanchang Yang
        4. ReloadableProperties.java
          4 kB
          Nanchang Yang
        5. users.properties
          1 kB
          Nanchang Yang

          Issue Links

            Activity

              People

              • Assignee:
                cshannon Christopher L. Shannon
                Reporter:
                nyang63@gmail.com Nanchang Yang
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: