2 Replies Latest reply on Oct 1, 2001 11:00 PM by mmills

    Two questions?

    mmills

      1. In my auth.conf file, I tell Jboss to use the DatabaseServerLoginModule for authentication. When I run my app however it uses the UserRolesLoginModule instead. My auth.conf file is at the end of this message.

      2. How do I get Form based login to work? In my web.xml file I have everything I should have for it to work, however whenever it needs to login, a login window popups instead of being redirected to the login page. Also, if I go to the login page and try to submit the form, I get a "(404) <app context>/j_security_check" not found error.

      Please help....
      Thanks,


      /conf/default/auth.conf
      -------
      // Put login modules providing authentication and realm mappings
      // for security domains.

      staffapp {
      /* A JDBC based LoginModule
      LoginModule options:
      dsJndiName: The name of the DataSource of the database containing the Principals, Roles tables
      principalsQuery: The prepared statement query equivalent to:
      "select Password from Principals where PrincipalID=?"
      rolesQuery: The prepared statement query equivalent to:
      "select Role, RoleGroup from Roles where PrincipalID=?"
      */
      org.jboss.security.auth.spi.DatabaseServerLoginModule required
      dsJndiName="java:/Staff"
      principalsQuery="select password from systemusers where userid=?"
      rolesQuery="select r.id, r.description from role r, userroles ur where ur.userid=? and ur.roleid = r.id"
      unauthenticatedIdentity=nobody
      ;
      };


      simple {
      // Very simple login module:
      // any user name is accepted.
      // password should either coincide with user name or be null,
      // all users have role "guest",
      // users with non-null password also have role "user"
      org.jboss.security.auth.spi.SimpleServerLoginModule required;
      };

      // Used by clients within the application server VM such as
      // mbeans and servlets that access EJBs.
      client-login {
      org.jboss.security.ClientLoginModule required;
      };


        • 1. Re: Two questions?
          deepshet

          in reply to 1.
          are you using jboss with tomcat embedded(run_with_Tomcat)? in which case the auth.conf file is
          in $jbosshome/jboss/conf/tomcat/auth.conf (and not default/auth.conf)
          does your jboss.xml define the security-domain as staffapp?

          • 2. Re: Two questions?
            mmills

            No. After two days of searching for the problem it finally hit me.

            Thanks,