0 Replies Latest reply on Aug 19, 2002 3:55 PM by Brian

    form based login & oracle9i

    Brian Newbie

      Hi,
      I am using FORM based login with JBoss 3.0.0_Tomcat-4.0.3
      my login page calls j_security_check with j_username and j_password. my web.xml looks like this:
      <login-config>
      <auth-method>FORM</auth-method>
      <realm-name>JBIDomain</realm-name>
      <form-login-config>
      <form-login-page>/logon.jsp</form-login-page>
      <form-error-page>/loginFailed.html</form-error-page>
      </form-login-config>
      </login-config>

      and my jboss.xml is this:

      <security-domain>java:/jaas/JBIDomain</security-domain>
      <enterprise-beans>

      <ejb-name>jaasSession</ejb-name>
      <jndi-name>JBIDomain/jaasSession</jndi-name>



      my login-config.xml is:
      <application-policy name="JBIDomain">

      <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag="required">
      <module-option name="dsJndiName">java:/jaasDS</module-option>
      <module-option name="principalsQuery">SELECT Password FROM Principals WHERE PrincipalID=?</module-option>
      <module-option name="rolesQuery">SELECT Role, RoleGroup FROM Roles WHERE PrincipalID=?</module-option>
      <module-option name="hashAlgorithm">MD5</module-option>
      <module-option name="managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=jaasDS</module-option>
      </login-module>

      </application-policy>

      which i think matches the oracle-service.xml i made:


      <application-policy name = "JBIDomain">

      <login-module code = "org.jboss.security.auth.spi.DatabaseServerLoginModule" flag = "required">
      <module-option name = "dsJnidiName">java:/jaasDS</module-option>
      <module-option name = "principalsQuery">SELECT Password FROM Prncipals WHERE PrincipalID=?</module-option>
      <module-option name = "rolesQuery">SELECT Role, RoleGroup FROM Roles WHERE PrincipalID=?</module-option>
      <module-option name = "hashAlgorithm">MD5</module-option>
      <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=jaasDS</module-option>
      </login-module>

      </application-policy>

      JBIDomain

      <depends optional-attribute-name="ManagedConnectionFactoryName">
      <!--embedded mbean-->


      jaasDS



      <config-property name="ConnectionURL" type="java.lang.String">jdbc:oracle:thin:@192.5.148.81:1521:jbix0</config-property>
      <config-property name="DriverClass" type="java.lang.String">oracle.jdbc.driver.OracleDriver</config-property>
      <!--set these only if you want only default logins, not through JAAS -->
      <config-property name="UserName" type="java.lang.String">jbi_auth</config-property>
      <config-property name="Password" type="java.lang.String">jbi_auth</config-property>




      <!--Below here are advanced properties -->
      <!--hack-->
      <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper



      <depends optional-attribute-name="ManagedConnectionPool">
      <!--embedded mbean-->


      0
      50
      5000
      15
      ByContainer



      <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager

      <depends optional-attribute-name="JaasSecurityManagerService">jboss.security:name=JaasSecurityManager

      java:/TransactionManager

      <!--make the rar deploy! hack till better deployment-->
      jboss.jca:service=RARDeployer



      But when I deploy the app and attempt to login using the login page, i always get forwarded to the loginError page. Nothing is printed out on the JBoss server at all, I just get forwarded to the loginError page.
      Any thoughts or ideas would be really helpful.

      Thanks,
      brian