I just set a compound primary key for the roles table.

Ted Zimmerman

-----Original Message-----
From: Zhang, Yuying [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 20, 2002 4:04 PM
To: JRun-Talk
Subject: RE: Using JRun JDBC login module


I set up auth.config in JMC. And I tried to change the table name, still wouldn't work.
It seemed that it is the role settings that causes the problem. Because when I log in, 
the browser return 403 error page instead of the page defined within 
<form-error-page></form-error-page> of web.xml.

As to the role table, do you have unique constraint on username or rolename column?

Thanks,
YZ

-----Original Message-----
From: Theodore Zimmerman [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 20, 2002 3:32 PM
To: JRun-Talk
Subject: RE: Using JRun JDBC login module


Did you set up your auth.config and users and roles using the JMC or did you manually 
edit the files?  I found it worked best using the JMC.  Also my first attempt caused 
problems when I tried using database reserved words such as user as one of my column 
names.  One thing I noticed is that the order of parameters in defaultUser are 
different in yours than mine.  Not sure if that should matter.  Here is my auth.config 
using a SQLServer datasource:

defaultUser
{
jrun.security.JDBCLoginModule requisite userNameColumn="username" tableName="jdbcuser" 
dataSourceJNDIName="SQLLOCAL" mode="USER" passwordColumn="password";
};

defaultRole
{
jrun.security.JDBCLoginModule requisite roleColumn="role" userNameColumn="username" 
tableName="jdbcrole" dataSourceJNDIName="SQLLOCAL" mode="ROLE";
};

HTH.

Ted Zimmerman

-----Original Message-----
From: Zhang, Yuying [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 20, 2002 2:55 PM
To: JRun-Talk
Subject: Using JRun JDBC login module


Hi,
 
Trying to use JRun JDBC login module to integrate JRun security with DB2 tables.
We have web.xml configured, using form login and there are two kinds of users - 
basicuser and admin. This works fine with JRun default XMLLogin Module. We also have a 
 Data Source - RXDS set up in JMC. However, the user I created through database table 
wouldn't be able to login to our application. 
 
- auth.config:
defaultUser
{
jrun.security.JDBCLoginModule requisite userNameColumn="login" 
dataSourceJNDIName="RXDS" tableName="users" mode="USER" passwordColumn="password";
};
defaultRole
{
jrun.security.JDBCLoginModule requisite roleColumn="rolename" userNameColumn="login" 
tableName="roles" dataSourceJNDIName="RXDS" mode="ROLE";
};

- uses.sql
CREATE TABLE users(
 -- login: Login id of the gui user
 login  char(8)   not null CONSTRAINT usersC_UCNT UNIQUE,
 -- name: Full name of the user
 name            char(128)               not null,
 -- password:
 password        char(8)                 not null,
) ;
 
-roles.sql
CREATE TABLE roles(
 -- login: Login id of the gui user
 login  char(8)                not null,
 -- rolename:
 rolename        char(12)               not null
) ;

 
I have a user called 'admin' in users table, and it's role is 'basicuser' and 'admin'. 
However when I log in as 'admin', the browser will bring me to 403 error page.
 
Thanks,
YZ




______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to