Re: JAAS problems

2006-08-24 Thread Sepand M

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 [EMAIL PROTECTED] 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?



Re: JAAS problems

2006-08-23 Thread James Strachan

Do you have the activemq-jaas.jar on your classpath?

On 8/23/06, Sepand M [EMAIL PROTECTED] wrote:

Hi,

I can't seem to get JAAS working.
I've defined the login.config as shown on the site, but I get the
following error once a connection comes in (the exception is thrown
when lc.login is called in JaasAuthenticationBroker.java):

javax.security.auth.login.LoginException: unable to find LoginModule
class: org.apache.activemq.jaas.GroupPrincipal
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:808)
at 
javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at 
javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
at 
org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:76)
at 
org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:80)
at 
org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:90)
at 
org.apache.activemq.broker.AbstractConnection.processAddConnection(AbstractConnection.java:559)
at 
org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:83)
at 
org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:120)
at 
org.apache.activemq.broker.AbstractConnection.service(AbstractConnection.java:228)
at 
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:63)
at 
org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:92)
at 
org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:67)
at 
org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:123)
at 
org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:123)
at 
org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:88)
at 
org.apache.activemq.transport.tcp.SslTransport.doConsume(SslTransport.java:128)
at 
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:127)
at java.lang.Thread.run(Thread.java:595)

As you may have noticed, the class missing is GroupPrincipal. This is
because I changed login.config to use that class. I did the same thing
using ActiveMQConnectionFactory and there were no problems (well, it
obviously couldn't use it as a LoginModule, but it had no problem
finding the class). It seems that it can't find classes within
org.apache.activemq.jaas.

Does anyone know what's going on?

Regards,
Sepand




--

James
---
http://radio.weblogs.com/0112098/


Re: JAAS problems

2006-08-23 Thread Sepand M

Hi James,

I don't, but I'm running off of an assembly build and I have
apache-activemq-4.1-incubator-SNAPSHOT.jar on the class path. I've
also confirmed that the classes not found (such as GroupPrincipal) are
in the mentioned jar.

- Sepand

On 8/23/06, James Strachan [EMAIL PROTECTED] wrote:

Do you have the activemq-jaas.jar on your classpath?

On 8/23/06, Sepand M [EMAIL PROTECTED] wrote:
 Hi,

 I can't seem to get JAAS working.
 I've defined the login.config as shown on the site, but I get the
 following error once a connection comes in (the exception is thrown
 when lc.login is called in JaasAuthenticationBroker.java):

 javax.security.auth.login.LoginException: unable to find LoginModule
 class: org.apache.activemq.jaas.GroupPrincipal
 at 
javax.security.auth.login.LoginContext.invoke(LoginContext.java:808)
 at 
javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
 at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
 at java.security.AccessController.doPrivileged(Native Method)
 at 
javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
 at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
 at 
org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:76)
 at 
org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:80)
 at 
org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:90)
 at 
org.apache.activemq.broker.AbstractConnection.processAddConnection(AbstractConnection.java:559)
 at 
org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:83)
 at 
org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:120)
 at 
org.apache.activemq.broker.AbstractConnection.service(AbstractConnection.java:228)
 at 
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:63)
 at 
org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:92)
 at 
org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:67)
 at 
org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:123)
 at 
org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:123)
 at 
org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:88)
 at 
org.apache.activemq.transport.tcp.SslTransport.doConsume(SslTransport.java:128)
 at 
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:127)
 at java.lang.Thread.run(Thread.java:595)

 As you may have noticed, the class missing is GroupPrincipal. This is
 because I changed login.config to use that class. I did the same thing
 using ActiveMQConnectionFactory and there were no problems (well, it
 obviously couldn't use it as a LoginModule, but it had no problem
 finding the class). It seems that it can't find classes within
 org.apache.activemq.jaas.

 Does anyone know what's going on?

 Regards,
 Sepand



--

James
---
http://radio.weblogs.com/0112098/



Re: JAAS problems

2006-08-23 Thread Sepand M

One other thing I should add:

I am currently running using the provided activemq script and the main
method provided in activemq.console.Main.
A few days ago, I ran the same code using my own main method and
without the activemq script and it ran perfectly.

Any thoughts?

On 8/23/06, Sepand M [EMAIL PROTECTED] wrote:

Hi James,

I don't, but I'm running off of an assembly build and I have
apache-activemq-4.1-incubator-SNAPSHOT.jar on the class path. I've
also confirmed that the classes not found (such as GroupPrincipal) are
in the mentioned jar.

- Sepand

On 8/23/06, James Strachan [EMAIL PROTECTED] wrote:
 Do you have the activemq-jaas.jar on your classpath?

 On 8/23/06, Sepand M [EMAIL PROTECTED] wrote:
  Hi,
 
  I can't seem to get JAAS working.
  I've defined the login.config as shown on the site, but I get the
  following error once a connection comes in (the exception is thrown
  when lc.login is called in JaasAuthenticationBroker.java):
 
  javax.security.auth.login.LoginException: unable to find LoginModule
  class: org.apache.activemq.jaas.GroupPrincipal
  at 
javax.security.auth.login.LoginContext.invoke(LoginContext.java:808)
  at 
javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
  at 
javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
  at java.security.AccessController.doPrivileged(Native Method)
  at 
javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
  at 
javax.security.auth.login.LoginContext.login(LoginContext.java:579)
  at 
org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:76)
  at 
org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:80)
  at 
org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:90)
  at 
org.apache.activemq.broker.AbstractConnection.processAddConnection(AbstractConnection.java:559)
  at 
org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:83)
  at 
org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:120)
  at 
org.apache.activemq.broker.AbstractConnection.service(AbstractConnection.java:228)
  at 
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:63)
  at 
org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:92)
  at 
org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:67)
  at 
org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:123)
  at 
org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:123)
  at 
org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:88)
  at 
org.apache.activemq.transport.tcp.SslTransport.doConsume(SslTransport.java:128)
  at 
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:127)
  at java.lang.Thread.run(Thread.java:595)
 
  As you may have noticed, the class missing is GroupPrincipal. This is
  because I changed login.config to use that class. I did the same thing
  using ActiveMQConnectionFactory and there were no problems (well, it
  obviously couldn't use it as a LoginModule, but it had no problem
  finding the class). It seems that it can't find classes within
  org.apache.activemq.jaas.
 
  Does anyone know what's going on?
 
  Regards,
  Sepand
 


 --

 James
 ---
 http://radio.weblogs.com/0112098/




Re: JAAS problems

2006-08-23 Thread Sepand M

Ok. Here's an update:
I have started with a clean build and found the least changes that
will cause problems.
I will give an outline of all of my steps:

Clean checkout: svn co https://svn.apache.org/repos/asf/incubator/activemq/trunk

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:

On 8/23/06, Sepand M [EMAIL PROTECTED] wrote:

One other thing I should add:

I am currently running using the provided activemq script and the main
method provided in activemq.console.Main.
A few days ago, I ran the same code using my own main method and
without the activemq script and it ran perfectly.

Any thoughts?

On 8/23/06, Sepand M [EMAIL PROTECTED] wrote:
 Hi James,

 I don't, but I'm running off of an assembly build and I have
 apache-activemq-4.1-incubator-SNAPSHOT.jar on the class path. I've
 also confirmed that the classes not found (such as GroupPrincipal) are
 in the mentioned jar.

 - Sepand

 On 8/23/06, James Strachan [EMAIL PROTECTED] wrote:
  Do you have the activemq-jaas.jar on your classpath?
 
  On 8/23/06, Sepand M [EMAIL PROTECTED] wrote:
   Hi,
  
   I can't seem to get JAAS working.
   I've defined the login.config as shown on the site, but I get the
   following error once a connection comes in (the exception is thrown
   when lc.login is called in JaasAuthenticationBroker.java):
  
   javax.security.auth.login.LoginException: unable to find LoginModule
   class: org.apache.activemq.jaas.GroupPrincipal
   at 
javax.security.auth.login.LoginContext.invoke(LoginContext.java:808)
   at 
javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
   at 
javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
   at java.security.AccessController.doPrivileged(Native Method)
   at 
javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
   at 
javax.security.auth.login.LoginContext.login(LoginContext.java:579)
   at 
org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:76)
   at 
org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:80)
   at 
org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:90)
   at 
org.apache.activemq.broker.AbstractConnection.processAddConnection(AbstractConnection.java:559)
   at 
org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:83)
   at 
org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:120)
   at 
org.apache.activemq.broker.AbstractConnection.service(AbstractConnection.java:228)
   at 
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:63)
   at 
org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:92)
   at 
org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:67)
   at 
org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:123)
   at 
org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:123)
   at 
org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:88)
   at 
org.apache.activemq.transport.tcp.SslTransport.doConsume(SslTransport.java:128)
   at 
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:127)
   at java.lang.Thread.run(Thread.java:595)
  
   As you may have noticed, the class missing is GroupPrincipal. This is
   because I changed login.config to use that class. I did the same thing
   using ActiveMQConnectionFactory and there were no problems (well, it
   obviously couldn't use it as a LoginModule, but it had no problem
   finding the class). It seems that it can't find classes within
   org.apache.activemq.jaas.
  
   Does anyone know what's going on?
  
   Regards,
   Sepand
  
 
 
  --
 
  James
  ---
  http://radio.weblogs.com/0112098/
 




Re: JAAS problems

2006-08-23 Thread Sepand M

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?


JAAS problems

2006-08-22 Thread Sepand M

Hi,

I can't seem to get JAAS working.
I've defined the login.config as shown on the site, but I get the
following error once a connection comes in (the exception is thrown
when lc.login is called in JaasAuthenticationBroker.java):

javax.security.auth.login.LoginException: unable to find LoginModule
class: org.apache.activemq.jaas.GroupPrincipal
   at javax.security.auth.login.LoginContext.invoke(LoginContext.java:808)
   at 
javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
   at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
   at java.security.AccessController.doPrivileged(Native Method)
   at 
javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
   at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
   at 
org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:76)
   at 
org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:80)
   at 
org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:90)
   at 
org.apache.activemq.broker.AbstractConnection.processAddConnection(AbstractConnection.java:559)
   at 
org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:83)
   at 
org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:120)
   at 
org.apache.activemq.broker.AbstractConnection.service(AbstractConnection.java:228)
   at 
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:63)
   at 
org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:92)
   at 
org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:67)
   at 
org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:123)
   at 
org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:123)
   at 
org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:88)
   at 
org.apache.activemq.transport.tcp.SslTransport.doConsume(SslTransport.java:128)
   at 
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:127)
   at java.lang.Thread.run(Thread.java:595)

As you may have noticed, the class missing is GroupPrincipal. This is
because I changed login.config to use that class. I did the same thing
using ActiveMQConnectionFactory and there were no problems (well, it
obviously couldn't use it as a LoginModule, but it had no problem
finding the class). It seems that it can't find classes within
org.apache.activemq.jaas.

Does anyone know what's going on?

Regards,
Sepand


Re: JAAS problems

2006-08-22 Thread Sepand M

Hi,

Sorry, but no =). You missed my point.
The reason I'm using GroupPrincipal as a dummy class to see if it can
find *ANY* of the activemq jaas classes. And it cannot.
As I mentioned in the last post, It can find other activemq classes
such as ActiveMQConnectionFactory, but it cannot find any jaas classes
(LoginModule derivatives or not).


On 8/22/06, Aaron Mulder [EMAIL PROTECTED] wrote:

GroupPrincipal is a Principal class, not a LoginModule class.
Generally, a LoginModule adds Principals to a Subject, so a
FooLoginModule might add a UserPrincipal and a couple GroupPrincipals
if the login succeeded.  So your login.config should list something
that implements LoginModule as the login module, and not list
Principal classes (the LoginModule will handle those).  Does that
help?

Thanks,
 Aaron

On 8/22/06, Sepand M [EMAIL PROTECTED] wrote:
 By the way, I have checked and the classes are in the proper place
 within the snapshot jar file.

 On 8/22/06, Sepand M [EMAIL PROTECTED] wrote:
  Hi,
 
  I can't seem to get JAAS working.
  I've defined the login.config as shown on the site, but I get the
  following error once a connection comes in (the exception is thrown
  when lc.login is called in JaasAuthenticationBroker.java):
 
  javax.security.auth.login.LoginException: unable to find LoginModule
  class: org.apache.activemq.jaas.GroupPrincipal
  at 
javax.security.auth.login.LoginContext.invoke(LoginContext.java:808)
  at 
javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
  at 
javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
  at java.security.AccessController.doPrivileged(Native Method)
  at 
javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
  at 
javax.security.auth.login.LoginContext.login(LoginContext.java:579)
  at 
org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:76)
  at 
org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:80)
  at 
org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:90)
  at 
org.apache.activemq.broker.AbstractConnection.processAddConnection(AbstractConnection.java:559)
  at 
org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:83)
  at 
org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:120)
  at 
org.apache.activemq.broker.AbstractConnection.service(AbstractConnection.java:228)
  at 
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:63)
  at 
org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:92)
  at 
org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:67)
  at 
org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:123)
  at 
org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:123)
  at 
org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:88)
  at 
org.apache.activemq.transport.tcp.SslTransport.doConsume(SslTransport.java:128)
  at 
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:127)
  at java.lang.Thread.run(Thread.java:595)
 
  As you may have noticed, the class missing is GroupPrincipal. This is
  because I changed login.config to use that class. I did the same thing
  using ActiveMQConnectionFactory and there were no problems (well, it
  obviously couldn't use it as a LoginModule, but it had no problem
  finding the class). It seems that it can't find classes within
  org.apache.activemq.jaas.
 
  Does anyone know what's going on?
 
  Regards,
  Sepand