1 Reply Latest reply on Feb 20, 2008 3:30 AM by zzygis

    Using JDBCRealm for authentication

    zzygis
      Flex data services authenticate against tomcats default realm with users in tomcat-users.xml, but when i switch to JDBCRealm authentication stops working. I do see that Tomcat itself is authenticating correctly that is it passes login dialog, but no data is returned from the data services.

      Authentication type in use is BASIC

      context.xml
      <Context path="/aaa">
      <Transaction factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60"/>
      <Realm
      className="org.apache.catalina.realm.JDBCRealm"
      driverName="oracle.jdbc.driver.OracleDriver"
      ...>
      <Valve className="flex.messaging.security.TomcatValve"/>
      </Context>

      If Realm part is removed from Context everything goes fine, except that I want my users in DB not in tomcat-users.xml

      Any ideas?
        • 1. Re: Using JDBCRealm for authentication
          zzygis Level 1
          Timcat log shows the following message:

          org.apache.catalina.valves.RequestDumperValve invoke
          INFO: authType=BASIC
          Feb 20, 2008 11:25:39 AM org.apache.catalina.valves.RequestDumperValve invoke
          INFO: contentLength=-1
          Feb 20, 2008 11:25:39 AM org.apache.catalina.valves.RequestDumperValve invoke
          INFO: contentType=text/html;charset=utf-8
          Feb 20, 2008 11:25:39 AM org.apache.catalina.valves.RequestDumperValve invoke
          INFO: message=Access to the requested resource has been denied
          Feb 20, 2008 11:25:39 AM org.apache.catalina.valves.RequestDumperValve invoke
          INFO: remoteUser=TEST
          Feb 20, 2008 11:25:39 AM org.apache.catalina.valves.RequestDumperValve invoke
          INFO: status=403

          When default realm is used login is successful status is 200 but another interesting difference is that for JDBCRealm contentLength is -1 while for default it is something around 1000