1 Reply Latest reply on Dec 21, 2006 12:03 PM by Peter Johnson

    auth-method FORM ? realm-name ? JBoss-4.0.5GA, what i missed

    Paul Babyak Newbie

      HELP PLS!
      I don't know where to search for the decision of my problem.
      There is some application that use FORM authentication method.
      These are fragments of config-files.

      login-config.xml:

      <policy>
       ...
       <application-policy name="MyDomain">
       <authentication>
       <login-module code = "org.jboss.security.auth.spi.DatabaseServerLoginModule" flag = "required">
       <module-option name = "unauthenticatedIdentity">guest</module-option>
       <module-option name = "dsJndiName">java:/PostgreDS</module-option>
       <module-option name = "principalsQuery">SELECT PASSWD FROM SYS_USERS WHERE USERID=?</module-option>
       <module-option name = "rolesQuery">SELECT ROLEID, 'Roles' FROM SYS_ROLES WHERE USERID=?</module-option>
       </login-module>
       </authentication>
       </application-policy>
      </policy>
      

      web.xml:
       ...
       <login-config>
       <auth-method>FORM</auth-method>
       <realm-name>MyDomain<realm-name>
       <form-login-config>
       <form-login-page>/LoginForm.jsp</form-login-page>
       <form-error-page>/LoginForm.jsp</form-error-page>
       </form-login-config>
       </login-config>
       ...
      

      jboss-web.xml:
      <jboss-web>
       <security-domain>java:/jaas/MyDomain</security-domain>
      </jboss-web>
      

      but when i try open application in browser, in log file appears this message:
      ...
      00:00:27,890 ERROR [UsersRolesLoginModule] Failed to load users/passwords/role files
      java.io.IOException: No properties file: users.properties or defaults: defaultUsers.properties found
       at org.jboss.security.auth.spi.Util.loadProperties(Util.java:315)
       at org.jboss.security.auth.spi.UsersRolesLoginModule.loadUsers(UsersRolesLoginModule.java:186)
       at org.jboss.security.auth.spi.UsersRolesLoginModule.createUsers(UsersRolesLoginModule.java:200)
       at org.jboss.security.auth.spi.UsersRolesLoginModule.initialize(UsersRolesLoginModule.java:127)
      ...
      00:00:27,890 ERROR [AuthenticationManager] Couldn't log in.
      Message=Missing users.properties file.
      

      And i can'nt perform login in my application.
      Whence has appeared UsersRolesLoginModule, if I specified DatabaseServerLoginModule?
      What i missed?