Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Using JDBCRealm for authentication

Avatar

Level 1
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?
0 Replies

Avatar

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