NonStop Servlets for JavaServer Pages (5.0) System Administrator's Guide
Configuring NSJSP
NonStop Servlets for JavaServer Pages (NSJSP) System Administrator’s Guide—525644-002
3-32
JDBCRealm
°
Password, to be recognized by the NSJSP container when the user logs in.
This value can be in clear text or digested as described under Digested
Passwords on page 3-45.
•
A userRole table must exist, as referenced in Example 3-22, that contains one
row for every valid role that is assigned to a particular user. A user may have zero,
one, or more than one role. The userRole table must contain at least two
columns (more if your existing applications require more):
°
User name, to be recognized by the NSJSP container (the same value as is
specified in the users table).
°
Role name of a valid role associated with this user.
Two sample files, iTP_JDBCRealm.create.sample and
iTP_JDBCRealm.load.sample, exist in the $NSJSP_HOME/conf directory.
After replacing the =T1222DBDIR string with the Guardian location (of the form
$Volume.SubVolume) in a copy of these two sample files, you can pass these files
as input to the NonStop SQL Command Interpreter (SQLCI) through the OSS
command shown in Example 3-23.
Example 3-22. SQL Commands to Add Users and User Roles
create catalog ;
create table users (
user_name varchar(15) not null,
user_pass varchar(15) not null,
primary key user_name);
create table roles (
role_name varchar(15) not null,
primary key role_name);
create table userrole (
user_name varchar(15) not null,
role_name varchar(15) not null,
primary key(user_name, role_name));
insert into users values ("tomcat", "tomcat");
insert into users values ("user1", "role1");
insert into users values ("user2", "role2");
insert into roles values ("tomcat");
insert into roles values ("other");
insert into userrole values ("user1", "tomcat");
insert into userrole values ("user2", "other");
insert into userrole values ("tomcat", "other");
insert into userrole values ("tomcat", "tomcat");