You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2003/07/10 18:09:37 UTC

DO NOT REPLY [Bug 21472] New: - JDBCRealm: Auth ok but Not Authorized

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

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21472

JDBCRealm: Auth ok but Not Authorized

           Summary: JDBCRealm: Auth ok but Not Authorized
           Product: Tomcat 3
           Version: 3.3.1 Final
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: Config
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: zorro.desbois@wanadoo.fr


Hello,

I want to use a JDBCRealm with the admin webapp : in the debug of JDBCRealm it 
says 'JDBCRealm: Auth ok, user=toto' but the window "Authentication required" 
doesn't want to let me enter ... (so I push "cancel" and I have the message "Not 
Authorized".

So this functionnality really works or it is a configuration problem ?

My apps-admin.xml :
<?xml version="1.0" encoding="ISO-8859-1"?>
<webapps>
  <Context path="/admin"
    docBase="webapps/admin"
    reloadable="true"
    trusted="true" >
    <JDBCRealm debug="99" driverName="org.gjt.mm.mysql.Driver"
                       connectionURL="jdbc:mysql://localhost/User"
                       connectionName="adminTomcat"
                       connectionPassword="adminTomcat"
                       userTable="user"
                       userNameCol="user_name"
                       userCredCol="user_pass"
                       userRoleTable="user_roles"
                       roleNameCol="role_name"
                       digest="No" />
  </Context>
</webapps>

My mysql User base :
mysql> select * from user;
+-----------+-----------+
| user_name | user_pass |
+-----------+-----------+
| toto      | passtoto  |
| titi      | passtiti  |
| tutu      | passtutu  |
+-----------+-----------+
3 rows in set (0.01 sec)

mysql> select * from role;
+--------------+
| role_name    |
+--------------+
| role1        |
| tomcat       |
| tomcat_admin |
+--------------+
3 rows in set (0.00 sec)

mysql> select * from user_roles;
+--------------+-----------+
| user_name    | role_name |
+--------------+-----------+
| role1        | tutu      |
| tomcat       | tutu      |
| tomcat_admin | titi      |
| tomcat_admin | toto      |
+--------------+-----------+
4 rows in set (0.00 sec)

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org