tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexandros Kotsiras" <kotsi...@mediaondemand.com>
Subject RE: JDBCRealm question
Date Fri, 21 Jul 2000 15:31:45 GMT

Hello Ignacio,
i pasted all the info that you need.
If you have time have a look and let me know ......
Thanks,
Alex,

ORACLE8i tables  :

SQLWKS> desc tomcat_users
Column Name                    Null?    Type
------------------------------ -------- ----
USER_NAME                      NOT NULL VARCHAR2(20)
USER_PASS                               VARCHAR2(20)

SQLWKS> desc tomcat_user_roles
Column Name                    Null?    Type
------------------------------ -------- ----
USER_NAME                      NOT NULL VARCHAR2(20)
ROLE_NAME                      NOT NULL VARCHAR2(20)

SQLWKS> desc tomcat_roles
Column Name                    Null?    Type
------------------------------ -------- ----
ROLE_NAME                               VARCHAR2(20)

Here;s the data inside the tables :


SQLWKS> select * from tomcat_users
     2>
USER_NAME            USER_PASS
-------------------- --------------------
tomcat               tomcat
user1                tomcat
user2                tomcat
user3                tomcat
alexk                alexk


SQLWKS> select * from tomcat_user_roles
     2>
USER_NAME            ROLE_NAME
-------------------- --------------------
user1                tomcatRole
user2                otherRole
tomcat               tomcatRole
tomcat               otherRole
alexk                adminRole
alexk                tomcatRole
alexk                otherRole


This is my server.xml :

<RequestInterceptor
         className="org.apache.tomcat.request.JDBCRealm"
         debug="99"
	   driverName="oracle.jdbc.driver.OracleDriver"
	   connectionURL="jdbc:oracle:thin:@hostname:1521:DEV"
         connectionName="ALEXK"
         connectionPassword="password"
	   userTable="tomcat_users"
         userNameCol="user_name"
         userCredCol="user_pass"
	   userRoleTable="tomcat_user_roles"
         roleNameCol="role_name"
        />

//The simpleRealm is commented out.

And finally this is the tomcat.log after my unsuccesfull attempt to log in
as alexk/alexk

2000-07-21 11:17:58 - ContextManager: JDBCRealm: JDBCRealm.authenticate:
SELECT user_pass FROM tomcat_users WHERE user_name =  ?
2000-07-21 11:17:58 - ContextManager: JDBCRealm: Authentication unsuccessful
for user null
2000-07-21 11:17:58 - Ctx( /sales ): 401 R( /sales + / + /jsp/protected/)
null
2000-07-21 11:18:03 - ContextManager: JDBCRealm: Authentication successful
for user alexk
2000-07-21 11:18:03 - ContextManager: JDBCRealm: Auth ok, user=alexk
2000-07-21 11:18:03 - ContextManager: JDBCRealm: Controled access for alexk
R( /sales + / + /jsp/protected/) Ct ( )
2000-07-21 11:18:03 - ContextManager: JDBCRealm: JDBCRealm.roles: SELECT
role_name FROM tomcat_user_roles WHERE user_name = ?
2000-07-21 11:18:03 - ContextManager: JDBCRealm: Auth ok, first
role=adminRole
2000-07-21 11:18:03 - ContextManager: JDBCRealm: UnAuthorized tomcat
2000-07-21 11:18:03 - Ctx( /sales ): 401 R( /sales + / + /jsp/protected/)
null


Maybe it's something silly i am missing.....

-----Original Message-----
From: Nacho [mailto:nacho@siapi.es]
Sent: Friday, July 21, 2000 7:39 AM
To: 'tomcat-user@jakarta.apache.org'
Subject: RE: JDBCRealm question


Hola Alexandros:

Can you send and excertp of your schema and server.xml config ???

This working here without problems with the same config, Oracle and
JDBCRealm..

Saludos ,
Ignacio J. Ortega



> -----Mensaje original-----
> De: Alexandros Kotsiras [mailto:kotsiras@mediaondemand.com]
> Enviado el: jueves 20 de julio de 2000 19:05
> Para: tomcat-user@jakarta.apache.org
> Asunto: JDBCRealm question
>
>
>
>
>     I can't make JDBCRealm work. I created the tables in
> Oracle allathe
> connectivity is OK , but tomcat won't let me get into the protected
> directory.
>     The strange thing is that on the DOS console it says :
>       Authentication succesfull for use user1
>      Authentication OK user=user1
>
>      And then when i retry to log in it outputs on the console :
>
>     UnAuthorized tomcat
>
>      I don't know what's going on.
>
>
> ±~~~°
>
>


Mime
View raw message