Hi,
I am trying to authenticate activemq using ldap.But I am getting this
error.Does anyone have idea about this error?

Error:

INFO | Started SelectChannelConnector@0.0.0.0:8161
INFO | Searching for users with filter: '(&(objectClass={0})({1}={2}))' from
base dn: ou=User,ou=ActiveMQ,ou=system
INFO | Found user?: true
WARN |
avax.security.auth.login.LoginException: Login Failure: all modules ignored
       at
javax.security.auth.login.LoginContext.invoke(LoginContext.java:921)
       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.eclipse.jetty.plus.jaas.JAASLoginService.login(JAASLoginService.java:238)
       at
org.eclipse.jetty.security.authentication.BasicAuthenticator.validateRequest(BasicAuthenticator.java:88)
       at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:491)
       at
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
       at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
       at org.eclipse.jetty.server.Server.handle(Server.java:363)
       at
org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:483)
       at
org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:920)
       at
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:982)
       at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)
       at
org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
       at
org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
       at
org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:627)
       at
org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:51)
       at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
       at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
       at java.lang.Thread.run(Thread.java:662)

login.config:

jetty-ldap {
  org.eclipse.jetty.plus.jaas.spi.LdapLoginModule required
    debug="true"
    contextFactory="com.sun.jndi.ldap.LdapCtxFactory"
    hostname="localhost"
    port="10389"
    bindDn="uid=admin,ou=system"
    bindPassword="secret"
    authenticationMethod="simple"
    forceBindingLogin="false"
    userBaseDn="ou=User,ou=ActiveMQ,ou=system"
    userRdnAttribute="uid"
    userIdAttribute="uid"
    userPasswordAttribute="userPassword"
    userObjectClass="inetOrgPerson"
    roleBaseDn="ou=Group,ou=ActiveMQ,ou=system"
    roleNameAttribute="cn"
    roleMemberAttribute="member"
    roleObjectClass="groupOfNames"
    authenticated="true";
};

jetty.xml:


    
    
<beans xmlns="http://www.springframework.org/schema/beans";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
    xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd";>

    <bean id="securityLoginService"
class="org.eclipse.jetty.plus.jaas.JAASLoginService">
                <property name="name" value="ActiveMQLDAPRealm" />
                <property name="LoginModuleName" value="jetty-ldap"/>
                
                <property name="roleClassNames"
value="org.eclipse.jetty.plus.jaas.JAASRole" />
    </bean>
 <bean id="identityService"
class="org.eclipse.jetty.security.DefaultIdentityService"/>
    <bean id="securityConstraint"
class="org.eclipse.jetty.util.security.Constraint">
        <property name="name" value="BASIC" />
        <property name="roles" value="admins" />
        <property name="authenticate" value="true" />
    </bean>
    <bean id="securityConstraintMapping"
class="org.eclipse.jetty.security.ConstraintMapping">
        <property name="constraint" ref="securityConstraint" />
        <property name="pathSpec" value="/*" />
    </bean>
    <bean id="securityHandler"
class="org.eclipse.jetty.security.ConstraintSecurityHandler">
        <property name="loginService" ref="securityLoginService" />
                <property name="strict" value="false"/>
        <property name="identityService" ref="identityService"/>
        <property name="authenticator">
            <bean
class="org.eclipse.jetty.security.authentication.BasicAuthenticator" />
        </property>
        <property name="constraintMappings">
            <list>
                <ref bean="securityConstraintMapping" />
            </list>
        </property>
        <property name="handler">
            <bean id="sec"
class="org.eclipse.jetty.server.handler.HandlerCollection">
                <property name="handlers">
                    <list>
                        <bean
class="org.eclipse.jetty.webapp.WebAppContext">
                            <property name="contextPath" value="/admin" />
                            <property name="resourceBase"
value="${activemq.home}/webapps/admin" />
                            <property name="logUrlOnStart" value="true" />
                        </bean>
                        <bean
class="org.eclipse.jetty.webapp.WebAppContext">
                            <property name="contextPath" value="/demo" />
                            <property name="resourceBase"
value="${activemq.home}/webapps/demo" />
                            <property name="logUrlOnStart" value="true" />
                        </bean>
                        <bean
class="org.eclipse.jetty.webapp.WebAppContext">
                            <property name="contextPath" value="/fileserver"
/>
                            <property name="resourceBase"
value="${activemq.home}/webapps/fileserver" />
                            <property name="logUrlOnStart" value="true" />
                            <property name="parentLoaderPriority"
value="true" />
                        </bean>
                        <bean
class="org.eclipse.jetty.server.handler.ResourceHandler">
                            <property name="directoriesListed" value="false"
/>
                            <property name="welcomeFiles">
                                <list>
                                    <value>index.html</value>
                                </list>
                            </property>
                            <property name="resourceBase"
value="${activemq.home}/webapps/" />
                        </bean>
                        <bean id="defaultHandler"
class="org.eclipse.jetty.server.handler.DefaultHandler">
                            <property name="serveIcon" value="false" />
                        </bean>
                    </list>
                </property>
            </bean>
        </property>
    </bean>

    <bean id="contexts"
class="org.eclipse.jetty.server.handler.ContextHandlerCollection">
    </bean>

    <bean id="Server" class="org.eclipse.jetty.server.Server"
init-method="start"
        destroy-method="stop">

        <property name="connectors">
            <list>
                <bean id="Connector"
class="org.eclipse.jetty.server.nio.SelectChannelConnector">
                    <property name="port" value="8161" />
                </bean>
                
                
            </list>
        </property>

        <property name="handler">
            <bean id="handlers"
class="org.eclipse.jetty.server.handler.HandlerCollection">
                <property name="handlers">
                    <list>
                        <ref bean="contexts" />
                        <ref bean="securityHandler" />
                    </list>
                </property>
            </bean>
        </property>

    </bean>

</beans>




--
View this message in context: 
http://activemq.2283324.n4.nabble.com/ldap-authentication-failed-tp4665458.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to