NonStop Servlets for JavaServer Pages (NSJSP) 6.1 System Administrator's Guide
Security Considerations
NonStop Servlets for JavaServer Pages (NSJSP) 6.1 System Administrator’s Guide—596210-006
8-18
Realms
Example 8-2 shows a Realm definition for querying user information from an SQL/MX
database using a JDBC Type 2 driver and the database schema listed in Example 8-1
.
Example 8-1. Creating SQL/MX Tables for use in a JDBCRealm
create catalog mycatalog;
set catalog mycatalog;
create schema myschema;
set schema myschema;
create table users (
user_name char(15) not null,
user_pass varchar(45) not null,
primary key (user_name));
create table roles (
role_name char(20) not null,
role_desc varchar(250),
primary key (role_name));
create table userrole (
user_name char(15) not null,
role_name char(20) not null,
primary key(user_name, role_name));
insert into users values ('tomcat', 'tomcatpassword');
insert into users values ('user1', 'user1password');
insert into users values ('user2', 'user2password');
insert into roles values ('admin','The System Administrator');
insert into roles values ('manager','NSJSP Applications Manager');
insert into roles values ('role2','Another role');
insert into userrole values ('tomcat','admin');
insert into userrole values ('tomcat','manager');
insert into userrole value ('user1','manager');










