You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Chris Hofstaedter <ch...@nmwco.com> on 2006/11/01 19:48:03 UTC
RE: SimpleAuthenticationPlugIn problem
That worked for me - thanks.
However, I was trying to use the current official release of 4.0.1 and
it did not work there with the xml supplied or any other combination I
tried.
Apparently, the problem was spring - I needed the new spring jars
supplied with 4.1. In fact, I replaced the 4.0.1 spring jars with
spring-2.0-rc1.jar and xbean-spring-2.6-SNAPSHOT.jar that came with 4.1
and the supplied xml worked against 4.0.1 as well.
-----Original Message-----
From: Adrian Co [mailto:aco@exist.com]
Sent: Tuesday, October 31, 2006 4:00 PM
To: activemq-users@geronimo.apache.org
Subject: Re: SimpleAuthenticationPlugIn problem
This is the config I got working using the latest snapshot of ActiveMQ
4.1:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:util="http://www.springframework.org/schema/util">
<!-- Allows us to use system properties as variables in this
configuration file -->
<bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfi
gurer"/>
<broker persistent="false" brokerName="localhost" useJmx="true"
xmlns="http://activemq.org/config/1.0">
<plugins>
<simpleAuthenticationPlugin userGroups="#groups"
userPasswords="#users"/>
</plugins>
<!-- disabled the commandAgent first -->
<services>
</services>
.....
</broker>
<util:map id="users">
<entry key="user1" value="password1"/>
</util:map>
<util:map id="groups">
<entry key="user1">
<ref bean="group1"/>
</entry>
</util:map>
<util:set id="group1">
</util:set>
Wonder why ActiveMQ does not allow the SimpleAuthenticationPlugin to use
a null usersGroup....
Chris Hofstaedter wrote:
> Hi,
>
> I've taken a look on the user groups and some general searching, but
I'm
> not finding much in the way of examples on setting up a
> SimpleAuthenticationPlugIn. I'm sure my issue stems from bad
> configuration, but I'm having a heck of a time figuring it out.
>
> The symptom is that SimpleAuthenticationPlugIn.setUserGroups is being
> invoked with a map that has no entries in it.
>
> My xml file looks like this:
> <beans xmlns="http://activemq.org/config/1.0">
> <bean
>
class="org.springframework.beans.factory.config.PropertyPlaceholderConfi
> gurer"/>
> <broker name="localhost" useJmx="true">
> <managementContext>
> <managementContext connectorPort="1099"
> jmxDomainName="org.apache.activemq"/>
> </managementContext>
> <plugins>
> <simpleAuthenticationPlugin userGroups="#groups"
> userPasswords="#users"/>
> </plugins>
> <persistenceAdapter>
> <journaledJDBC journalLogFiles="5"
> dataDirectory="${activemq.home}/activemq-data"/>
> </persistenceAdapter>
> <transportConnectors>
> <transportConnector name="default"
> uri="tcp://localhost:61616"/>
> </transportConnectors>
> </broker>
> <bean id="users" class="java.util.HashMap">
> <map>
> <entry key="user1" value="user1"/>
> </map>
> </bean>
> <bean id="groups" class="java.util.HashMap">
> <map>
> <entry key="user1" value="password1"/>
> </map>
> </bean>
> </beans>
>
> Anyone see where my mistake is?
>
>