You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Graham Leggett <mi...@sharp.fm> on 2008/06/06 22:23:58 UTC
LDAP JAAS minefield
Hi all,
A quick Google search to find a straightforward explanation on how to
authenticate activemq against an LDAP server uncovered the following
message:
http://osdir.com/ml/java.activemq.user/2006-05/msg00556.html
Following the message resulted in no luck, the server refused to start,
with the following exception below.
Looking in source code for
http://svn.apache.org/repos/asf/activemq/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/LDAPLoginModule.java
for some clues in the source code comments was pointless: there are none
at all. Neither is there any kind of meaningful error checking.
Has anyone successfully authenticated activemq against LDAP?
Does documentation exist anywhere for this code?
Caused by: javax.security.auth.login.LoginException:
java.lang.NullPointerException
at java.lang.String.<init>(String.java:176)
at
org.apache.activemq.jaas.LDAPLoginModule.login(LDAPLoginModule.java:134)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)
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.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:88)
at
org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:662)
at
org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:86)
at
org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:125)
at
org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
at
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:180)
at
org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)
at
org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:143)
at
org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:206)
at
org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:84)
at
org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:196)
at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:183)
at java.lang.Thread.run(Thread.java:619)
Regards,
Graham
--
Re: LDAP JAAS minefield
Posted by Graham Leggett <mi...@sharp.fm>.
ttmdev wrote:
> This posting from Robin may help.
>
> http://www.nabble.com/Adding-users-on-the-fly-ACTIVEMQ-to16825211s2354.html#a16984528
What I am after is documentation explaining what all the options mean.
Some of them are obvious (connectionURL), others are entirely
meaningless (connectionProtocol), and others are unclear, like the
values for {0} and {1}.
Right now, all I am doing is lurching from NullPointerException to
NullPointerException, as the code assumes the configuration will never
contain an error.
Is any of this documented anywhere?
Regards,
Graham
--
Re: LDAP JAAS minefield
Posted by Graham Leggett <mi...@sharp.fm>.
ttmdev wrote:
> This posting from Robin may help.
>
> http://www.nabble.com/Adding-users-on-the-fly-ACTIVEMQ-to16825211s2354.html#a16984528
Having gone through the config suggested above, the config doesn't work
either, this time with the exception below.
The message does make a comment that the config won't work out of the
box without some unspecified patches, so it doesn't help unfortunately.
Using the login.config on its own also throws the same
NullPointerException as per the previous message in this thread.
Has anyone got JAAS authentication to work out of the box at all?
Caused by: org.springframework.beans.InvalidPropertyException: Invalid
property 'topicSearchMatching' of bean class
[org.apache.activemq.security.LDAPAuthorizationMap]: No property
'topicSearchMatching' found
at
org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:377)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1211)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1183)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:940)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:437)
... 48 more
Regards,
Graham
--
Re: LDAP JAAS minefield
Posted by ttmdev <jo...@ttmsolutions.com>.
This posting from Robin may help.
http://www.nabble.com/Adding-users-on-the-fly-ACTIVEMQ-to16825211s2354.html#a16984528
Joe
Graham Leggett wrote:
>
> Hi all,
>
> A quick Google search to find a straightforward explanation on how to
> authenticate activemq against an LDAP server uncovered the following
> message:
>
> http://osdir.com/ml/java.activemq.user/2006-05/msg00556.html
>
> Following the message resulted in no luck, the server refused to start,
> with the following exception below.
>
> Looking in source code for
> http://svn.apache.org/repos/asf/activemq/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/LDAPLoginModule.java
> for some clues in the source code comments was pointless: there are none
> at all. Neither is there any kind of meaningful error checking.
>
> Has anyone successfully authenticated activemq against LDAP?
>
> Does documentation exist anywhere for this code?
>
> Caused by: javax.security.auth.login.LoginException:
> java.lang.NullPointerException
> at java.lang.String.<init>(String.java:176)
> at
> org.apache.activemq.jaas.LDAPLoginModule.login(LDAPLoginModule.java:134)
> at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)
> 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.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:88)
> at
> org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:662)
> at
> org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:86)
> at
> org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:125)
> at
> org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
> at
> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:180)
> at
> org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)
> at
> org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:143)
> at
> org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:206)
> at
> org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:84)
> at
> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:196)
> at
> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:183)
> at java.lang.Thread.run(Thread.java:619)
>
> Regards,
> Graham
> --
>
>
>
--
View this message in context: http://www.nabble.com/LDAP-JAAS-minefield-tp17700475s2354p17700648.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.