2 Replies Latest reply on Sep 25, 2015 3:25 PM by Victor Cornejo

    JAAS/LDAP authentication from a Java Swing Client

    Unni N Newbie



      We are in the process of migrating a java swing/EJB JBoss 3.2 application on to Jboss 6.4 EAP.

      The user authentication was done through Jaas/ldap configuration. Somehow after the migration, the logincontext doesn't seems to authenticate the users.

      Here are my configurations.

      1. Standalone-full.xml


      <security-domain name="testdomain" cache-type="default">


             <login-module code="org.jboss.security.ClientLoginModule" flag="required"/>

             <login-module code="testpac.MyLoginModule" flag="required">

                  <module-option name="dsJndiName" value=""/>

                  <module-option name="rolesQuery"  value=""/>

                  <module-option name="LDAPProperties"  value="LDAPSearch.properties"/>





      PS : all Ldap conigs are being passed as properties onto the custom module.


      2. auth.conf (Residing in Server Web App)


      testdomain {

        org.jboss.security.ClientLoginModule required;



      2. Java Swing Code (remote call)


      Through a jnlp setting java.security.auth.login.config System property as the http url to auth.conf


      UsernamePasswordHandler handler = new UsernamePasswordHandler("testuser", "testuser");

      LoginContext lc = new LoginContext("testdomain", handler);



      No exception after running the code. But I don't see the request reaching the server. This was working fine in earlier version.


      Am I missing something here? Have a basic question here. Even though it was working in 3.2 version, I had a question. How the Logincontext knows the server details?


      Please throw some lights..