2 Replies Latest reply on Apr 18, 2002 3:40 AM by o_milton

    Unable to find LoginModule class for Custom LoginModule

    maryk

      I am using JBoss 2.4.4

      I have developed a custom login module for my application that does a lookup in my app database and authenticates the username and password supplied.

      I have a Stateless Session EJB that has a method that creates the LoginContext and invokes the login method. When I run, I get the following error:
      ***************
      The error:
      ***************
      javax.security.auth.login.LoginException: unable to find LoginModule class: com.doubleclick.dfe.AccessControl.DFELoginModule;

      ****************
      auth.conf file:
      ****************
      DFEApplication {
      com.doubleclick.dfe.AccessControl.DFELoginModule required;
      };

      It appears that it cannot locate the class file for DFELoginModule. I have tried locating it everywhere I can possibly think of and I get the same error every time.

      I found in the jboss\bin\run.bat a remark that says to put LoginModules in the JBOSS_CLASSPATH, but when I includ my jar file here, then the beans do not deploy properly due to dependent libraries.

      Can anyone tell me the proper place to specify my LoginModule jar file?

      Thanks for any help you can provide,
      Mary Kathryn

        • 1. Re: Unable to find LoginModule class for Custom LoginModule
          maryk

          I have now learned what my problem is, so for the benefit of anyone else who may have struggled with this here is the solution.
          (BTW, why isn't this simple configuration item in the docucumentation?? I searched the entire section on "Custom LoginModules" and there is NO mention. Thanks to another posting to the forum I found the answer.)

          Apparently JBoss uses the ProxyLoginModule to bootstrap a custom login module.

          For example, my auth.conf is now:

          DFEApplication {
          org.jboss.security.auth.spi.ProxyLoginModule required
          moduleName=com.dfe.AccessControl.DFELoginModule;
          };

          • 2. Re: Unable to find LoginModule class for Custom LoginModule
            o_milton

            Verify that the correct auth.conf is used. My installation (JBoss-2.4.4_Tomcat-3.2.3) does not use "$jboss_home/conf/default/auth.conf", it loads the "$jboss_home/conf/tomcat/auth.conf"