[jboss-user] [Security] - Error using DatabaseServerLoginModule

KeithHenn do-not-reply at jboss.com
Wed Oct 21 11:14:34 EDT 2009

Hello Here is a bit of the relevant code I'm using:


  |       <web-resource-name>constraint1</web-resource-name>
  |       <url-pattern>/index.jsp</url-pattern>
  |       <http-method>GET</http-method>
  |       <http-method>POST</http-method>
  |     </web-resource-collection>

  |     <auth-method>FORM</auth-method>
  |     <realm-name>myrealm</realm-name>
  |     <form-login-config>
  |       <form-login-page>/login.jsp</form-login-page>
  |       <form-error-page>/loginFailure.jsp</form-error-page>
  |     </form-login-config>
  |   </login-config>




<application-policy name = "marsPolicy">
  |        <authentication>
  |           <login-module code = "org.jboss.security.auth.spi.DatabaseServerLoginModule" flag = "required">
  |              <module-option name = "dsJndiName">java:/datasource/marquis-backup</module-option>
  |              <module-option name = "principalsQuery">SELECT password FROM [user] WHERE loginId = ?</module-option>
  |              <module-option name = "rolesQuery">select description, 'roles' from role r, userrole ur, [user] u where u.userId = ur.userId and ur.roleId = r.roleId and u.loginid = ?</module-option>
  |           </login-module>
  |        </authentication>
  |     </application-policy>

When I enter invalid credentials I'm properly forwarded to loginFailure.jsp, when I enter valid credentials I get the following error:

anonymous wrote : message: Invalid direct reference to form login page
  | description: The request sent by the client was syntactically incorrect (Invalid direct reference to form login page).

How can I correct this error?

Thank you.

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4261527#4261527

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4261527

More information about the jboss-user mailing list