2 Replies Latest reply on Oct 12, 2005 6:39 AM by sirivasu

    How to Configure the OpenLdap with Jboss 4.0

      Hi All
      I want to use OpenLDAP with JBoss 4.0. Can any one help me out in configuring the OpenLDAP with JBoss.

      Thanks & Regards

        • 1. Re: How to Configure the OpenLdap with Jboss 4.0
          schachi

          clientside: auth.conf

          defaultAuth {
           org.jboss.security.ClientLoginModule required;
           org.jboss.security.auth.spi.LdapLoginModule required
           java.naming.factory.initial="com.sun.jndi.ldap.LdapCtxFactory"
           java.naming.provider.url="ldap://localhost:389/"
           rolesCtxDN="ou=Roles,dc=eactAG,dc=ch"
           matchOnUserDN="true"
           principalDNSuffix=",ou=People,dc=eactAG,dc=ch"
           principalDNPrefix="uid="
           uidAttributeID="userid"
           roleAttributeID="roleName"
           roleAttributeIsDN="false"
           java.naming.security.authentication="simple";
          };
          

          serverside: login-config.xml:
          <application-policy name="defaultAuth">
           <authentication>
           <login-module code="org.jboss.security.auth.spi.LdapLoginModule" flag="required">
           <module-option name="java.naming.provider.url">ldap://localhost:389/</module-option>
           <module-option name="rolesCtxDN">ou=Roles,dc=eactAG,dc=ch</module-option>
           <module-option name="matchOnUserDN">true</module-option>
           <module-option name="principalDNSuffix">,ou=People,dc=eactAG,dc=ch</module-option>
           <module-option name="principalDNPrefix">uid=</module-option>
           <module-option name="uidAttributeID">member</module-option>
           <module-option name="roleAttributeID">cn</module-option>
           <module-option name="roleAttributeIsDN">false</module-option>
           <module-option name="unauthenticatedIdentity">guest</module-option>
           </login-module>
           </authentication>
          </application-policy>
          


          programm:
           AppCallbackHandler handler = new AppCallbackHandler(userid, password.toCharArray());
           LoginContext lc = new LoginContext("defaultAuth", handler);
          


          regards
          marc

          • 2. Re: How to Configure the OpenLdap with Jboss 4.0

            Thanks Marc

            I have done the changes in login.xml, web.xml and login-config.xml aand in my login.jsp I am giving the action as J_Security_check, But this is giving the error as requested resource not found. How can I know whether the configuration changes done by me are working or not.

            Regards
            Shri