activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nanchang Yang (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (AMQ-6214) JAAS bug that causes user group membership not reloaded dynamically when reload is true
Date Wed, 16 Mar 2016 00:29:33 GMT

    [ https://issues.apache.org/jira/browse/AMQ-6214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15196539#comment-15196539
] 

Nanchang Yang edited comment on AMQ-6214 at 3/16/16 12:28 AM:
--------------------------------------------------------------

The fix is to clear the cache of groups reverted map, so that the mapping of group membership
will be reloaded.

One line of new code in ReloadableProperties class fixed the problem:

Line 53:    

invertedValueProps = null;


was (Author: nyang63@gmail.com):
The fix is to clear the cache of groups reverted map, so that the mapping of group membership
will be reloaded.

One line of new code fix the problem:

Line 53:    

invertedValueProps = null;

> JAAS bug that causes user group membership not reloaded dynamically when reload is true
> ---------------------------------------------------------------------------------------
>
>                 Key: AMQ-6214
>                 URL: https://issues.apache.org/jira/browse/AMQ-6214
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: jaas
>    Affects Versions: 5.13.0, 5.13.2
>         Environment: Linux, Mac
>            Reporter: Nanchang Yang
>            Priority: Minor
>              Labels: easyfix
>         Attachments: ReloadableProperties.java
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message