title: Configuring Activemq web console to use LDAP for authorization and authentication
body: <p>I'm getting the following error when configuring activemq web console to use ldap for authentication and authorization. I'm using a free online test ldap for this <a href="http://www.forumsys.com/en/tutorials/integration-how-to/ldap/online-ldap-test-server/" rel="nofollow">http://www.forumsys.com/en/tutorials/integration-how-to/ldap/online-ldap-test-server/</a> and get the following error:</p>
  
  <pre><code>java.lang.AbstractMethodError: org.eclipse.jetty.jaas.JAASLoginService.login(Ljava/lang/String;Ljava/lang/Object;)Lorg/eclipse/jetty/server/UserIdentity; 
          at org.eclipse.jetty.security.authentication.LoginAuthenticator.login(LoginAuthenticator.java:61)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730] 
          at org.eclipse.jetty.security.authentication.BasicAuthenticator.validateRequest(BasicAuthenticator.java:92)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730] 
          at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:512)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730] 
          at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730] 
          at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730] 
          at org.eclipse.jetty.server.Server.handle(Server.java:499)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730] 
          at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730] 
          at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730] 
          at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730] 
          at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730] 
          at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730] 
          at java.lang.Thread.run(Thread.java:745)[:1.8.0_101] 
  </code></pre>
  
  <p>Please see my jetty.xml and login.conf configuration sections and advise. </p>
  
  <p>login conf </p>
  
  <pre><code>LDAPLogin { 
    org.apache.activemq.jaas.LDAPLoginModule required 
      debug=true 
      initialContextFactory=com.sun.jndi.ldap.LdapCtxFactory 
      connectionURL="ldap://ldap.forumsys.com:389" 
      connectionUsername="cn=read-only-admin,dc=example,dc=com" 
      connectionPassword=password 
      connectionProtocol="" 
      authentication=simple 
      userBase="dc=example,dc=com" 
      userSearchMatching="(uid={0})" 
      userSearchSubtree=false 
      roleBase="dc=example,dc=com" 
      roleName=ou 
      roleSearchMatching="(ou=scientists)" 
      roleSearchSubtree=false 
      ; 
  }; 
  </code></pre>
  
  <p>jetty.xml </p>
  
  <pre><code>&lt;bean id="ldapLoginService" class="org.eclipse.jetty.jaas.JAASLoginService"&gt;
          &lt;property name="name" value="LdapRealm" /&gt;
          &lt;property name="loginModuleName" value="LDAPLogin" /&gt;
          &lt;property name="roleClassNames" value="org.eclipse.jetty.jaas.JAASRole" /&gt;
          &lt;property name="identityService" ref="identityService" /&gt;
      &lt;/bean&gt;
  
  &lt;bean id="securityConstraint" class="org.eclipse.jetty.util.security.Constraint"&gt;
          &lt;property name="name" value="BASIC" /&gt;
          &lt;property name="roles" value="scientists" /&gt;
  
          &lt;property name="authenticate" value="true" /&gt;
      &lt;/bean&gt;
  
  &lt;bean id="securityHandler" class="org.eclipse.jetty.security.ConstraintSecurityHandler"&gt;
          &lt;property name="loginService" ref="ldapLoginService" /&gt;
          &lt;property name="identityService" ref="identityService" /&gt;
          &lt;property name="realmName" value="LdapRealm" /&gt;
          &lt;property name="authenticator"&gt;
              &lt;bean class="org.eclipse.jetty.security.authentication.BasicAuthenticator" /&gt;
          &lt;/property&gt;
          &lt;property name="constraintMappings"&gt;
              &lt;list&gt;
                  &lt;ref bean="adminSecurityConstraintMapping" /&gt;
                  &lt;ref bean="securityConstraintMapping" /&gt;
              &lt;/list&gt;
          &lt;/property&gt;
          &lt;property name="handler" ref="secHandlerCollection" /&gt;
      &lt;/bean&gt;
  </code></pre>