2 Replies Latest reply on Apr 1, 2004 5:06 PM by vbeffa

    porting j_security_check from JRun

    vbeffa Newbie

      I am trying to port our application from JRun to JBoss. We are using form-based authentication via a login page.

      In JRun, j_security_check is mapped (in web.xml) to a JRun servlet (called FileServlet), which invokes custom login modules such as one we are using. In JBoss, it is apparently implemented by Tomcat. Since we have a custom login module but not a servlet to invoke it, how can I configure JBoss to invoke our custom login module for authentication purposes? The module is written, web.xml contains the <login-config> element, and I added our login module to login-config.xml.

      Thanks,
      Vlad

        • 1. Re: porting j_security_check from JRun
          Scott Stark Master

          Read the JAAS howto for info on the use of login module by JBoss. Its the first topic in this forum.

          • 2. Re: porting j_security_check from JRun
            vbeffa Newbie

            I have read the JAAS how to.

            I wrote and compiled a subclass of UsernamePasswordLoginModule. It retrieves passwords and roles from the database.

            I am still unclear as to how to integrate with JBoss. The tutorial refers to a file auth.conf and states that it is "in the JBoss server configuration directory." The path listed is jboss/conf/jaas_howto/auth.conf. This path doesn't match any path I see in JBoss. When I built the example, I did not see auth.conf in <jboss-home>/server/jaas_howto/conf. I did, however, see auth.conf in <jboss-home>/client. I tried modifying this file, as well as creating a new one in <jboss-home>/server/<server-name>/conf.

            I'm also unclear about how to get my LoginModule code invoked. The web app I am working on has a login page that submits to j_security_check, which doesn't work. Do I need to write code that instantiates a LoginContext and calls LoginContext.login()?

            I'm still somewhat confused, but I will keep looking.