DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35745>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35745

           Summary: Realm JDBCRealm userTable & userRoleTable not real
                    parameters?
           Product: Tomcat 5
           Version: 5.0.28
          Platform: PC
        OS/Version: Windows 2000
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: [EMAIL PROTECTED]


When implementing container managed security in server.xml using JDBCRealm (and 
perhaps the JNDI JDBC based realm?) 
this works....
      <Realm  className="org.apache.catalina.realm.JDBCRealm" debug="99"
         connectionName="javauser" 
     connectionPassword="javadude" 
          connectionURL="jdbc:mysql://localhost:3306/trainingdb"
             driverName="com.mysql.jdbc.Driver"
              userTable="users" 
            userNameCol="user_name" 
            userCredCol="user_pass"
          userRoleTable="user_roles" 
            roleNameCol="role_name" />

But this does not....
      <Realm  className="org.apache.catalina.realm.JDBCRealm" debug="99"
         connectionName="javauser" 
     connectionPassword="javadude" 
          connectionURL="jdbc:mysql://localhost:3306/trainingdb"
             driverName="com.mysql.jdbc.Driver"
              userTable="MYTABLENAME" 
            userNameCol="user_name" 
            userCredCol="user_pass"
          userRoleTable="user_roles" 
            roleNameCol="role_name" />

The Tomcat log files were helpful in that they indicated my table name was not 
found in the database - but it was there.  On a hunch I renamed my existing 
legacy tables (in test) to match your examples and the container managed 
security worked.  It appears the Tomcat implementation has hard-coded these 
table-name and column-name values somewhere in the j_security_implementation.  
This of course defeats the whole point of providing these parameters to users 
in the first place.  Note that published authors, aside from your web-site, are 
touting the flexibility of the Tomcat implementation to reference existing 
client (legacy) USER and USER-ROLE table names already existing and used by 
other applications. 

I spent several days trying to get my existing table names to work without 
success and I'm not a 'newbie'.  I never saw any published examples in books 
where anyone actually used names aside from the default example, so perhaps 
this simply has not be tested.  It is the only explanation I have for it not 
working without digging into the Tomcat source code implementation of container 
managed security.

Great product, by the way, really.  
 
Tomcat is fantastic - and free!!!!

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to