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

Fintan Bolton commented on AMQ-1781:
------------------------------------

Assuming that the source code in the file LDAPLoginModule.java has not changed 
in the meantime, it looks like this error (on line 134) is caused by a null 
password. That is, it looks like the client failed to send a password to the 
broker.

I managed to get LDAP authentication to work, using the instructions from the 
references you quoted (by the way, thanks for that! I would have been lost 
without those references). I plan to write this up for the FUSE documentation 
set in the near future (i.e. the Message Broker Security Guide).

One minor problem with the LDAP authentication plug-in is that it tends to 
throw a lot of NullPointerExceptions, mainly because it doesn't check all of 
the login properties for Nullness (nor does it provide default values). 
Consequently, you have to set some of the login properties to dummy values, 
even if you don't really need them.

> LDAP + JAAS = NullPointerException
> ----------------------------------
>
>                 Key: AMQ-1781
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1781
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.1.0
>            Reporter: Graham Leggett
>             Fix For: 5.3.0
>
>
> If an attempt is made to configure the LDAPLoginModule JAAS plugin, as per 
> the instructions inside either of these two messages, ActiveMQ refuses to 
> start with the NullPointerException reported below.
> http://osdir.com/ml/java.activemq.user/2006-05/msg00556.html
> http://www.nabble.com/Adding-users-on-the-fly-ACTIVEMQ-to16825211s2354.html#a16984528
> 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.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         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)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to