activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sepand M" <sepa...@gmail.com>
Subject Re: JAAS problems
Date Thu, 24 Aug 2006 16:59:11 GMT
Hello all,

The problem has been solved.
In case anyone is wondering, I did not realize that activemq used the
jar files within the lib directory. I thought it was using the
snapshot jar (which it wasn't).
Copying the snapshot jar to the lib folder solved everything.

My new question is this:
How do I control which jaas jars are loaded by the activemq script?


On 8/23/06, Sepand M <sepandm@gmail.com> wrote:
> Sorry, GMail shortcut messed me up, redoing:
>
> in the trunk DIR: mvn -Dmaven.test.skip=true install
> in the trunk/assembly/target DIR: tar -xvf
> apache-activemq-4.1-incubator-SNAPSHOT.tar.gz
> in the trunk/assembly/target/apache-activemq-4.1-incubator-SNAPSHOT DIR:
>   * changed conf/activemq.xml, added:
>      <plugins>
>       <!--  use JAAS to authenticate using the login.config file on
> the classpath to configure JAAS -->
>       <jaasAuthenticationPlugin configuration="activemq-domain" />
>
>     </plugins>
>
> right before the </broker> tag.
>
>   * changed bin/activemq, added:
>   ACTIVEMQ_OPTS="$ACTIVEMQ_OPTS \
>         -Djava.security.auth.login.config=login.config"
>
> right before [#ACTIVEMQ_TASK="start"]
>
>   * created the file login.config containing:
>
> activemq-domain {
>     org.apache.activemq.jaas.PropertiesLoginModule required
>         debug=true
>         org.apache.activemq.jaas.properties.user="org/apache/activemq/security/users.properties"
>         org.apache.activemq.jaas.properties.group="org/apache/activemq/security/groups.properties";
> };
>
> run ./bin/activemq
>
> -------------------------
>
> Results:
> -----------
> The broker runs fine.
> When a consumer connects, I get:
> Caught: javax.jms.JMSException: User name or password is invalid.
>      [java] javax.jms.JMSException: User name or password is invalid.
>      [java]     at
> org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:46)
>      [java]     at
> org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1154)
>      [java]     at
> org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1236)
>      [java]     at
> org.apache.activemq.ActiveMQConnection.start(ActiveMQConnection.java:439)
>      [java]     at ToolSupport.createConnection(Unknown Source)
>      [java]     at ConsumerTool.run(Unknown Source)
>      [java]     at ConsumerTool.main(Unknown Source)
>      [java] Caused by: java.lang.SecurityException: User name or
> password is invalid.
>      [java]     at
> org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:82)
>      [java]     at
> org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:90)
>      [java]     at
> org.apache.activemq.broker.AbstractConnection.processAddConnection(AbstractConnection.java:559)
>      [java]     at
> org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:83)
>      [java]     at
> org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:120)
>      [java]     at
> org.apache.activemq.broker.AbstractConnection.service(AbstractConnection.java:228)
>      [java]     at
> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:63)
>      [java]     at
> org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:92)
>      [java]     at
> org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:67)
>      [java]     at
> org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:123)
>      [java]     at
> org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:123)
>      [java]     at
> org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:88)
>      [java]     at
> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:128)
>      [java]     at java.lang.Thread.run(Thread.java:595)
>      [java] Caused by: javax.security.auth.login.LoginException:
> unable to find LoginModule class:
> org.apache.activemq.jaas.PropertiesLoginModule
>      [java]     at
> javax.security.auth.login.LoginContext.invoke(LoginContext.java:808)
>      [java]     at
> javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
>      [java]     at
> javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
>      [java]     at java.security.AccessController.doPrivileged(Native Method)
>      [java]     at
> javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
>      [java]     at
> javax.security.auth.login.LoginContext.login(LoginContext.java:579)
>      [java]     at
> org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:75)
>      [java]     ... 13 more
>
>
> Any thoughts?
>

Mime
View raw message