2 Replies Latest reply on Jun 25, 2007 5:01 AM by Matthias Boschen

    Getting started with LDAP

    Matthias Boschen Newbie

      Hi all,

      I'm an newby in AS development, so excuse my ignorance (and my joggled english).

      Actually I'm challenged with the implementation of the security layer of my application (called tms).
      My configuration:
      I put the client-application as jar-file with all further needed libraries into one war-file, next with the server ejb and further service archives into one (huge) ear-file. Deployment without any security works fine.

      I have to meet the requirement to verify the login against LDAP,
      so I set up my application policy in server/tms/conf/login.config.xml:

       <application-policy name = "tms">
       <login-module code="org.jboss.security.auth.spi.LdapLoginModule"
       <module-option name="java.naming.factory.initial">
       <module-option name="java.naming.provider.url">
       <module-option name="java.naming.security.authentication">
       <module-option name="password-stacking">useFirstPass</module-option>
       <login-module code="org.jboss.security.ClientLoginModule"
       <module-option name="password-stacking">useFirstPass</module-option>

      I configured my web-application in war/web-inf/web.xml:

      As result, when requesting my application from within a webbrowser (localhost:8080/tms) I see a standard web-login dialog, the login works fine, it even refuses wrong user/passwords ;).
      But the first try to request an EJB fails with
      [LdapLoginModule] Bad password for username=null

      So what's missing, how do I propagate the principal/credential from the initial login to the EJB-request ?

      One further challenge: I have to modify the Login dialog to insert a further 'mandatory' field, where can I configure and introduce my own dialog ?

      Thanks in advance,