每个与数据库建立了两层连接的进程都通过一个PeopleSoft User或者operator ID识别自身。对登录过程进行处理的目的是为了安全的验证PeopleSoft operator(已通过密码验证)被允许访问PeopleSoft应用。
从 version 8开始,一个PeopleSoft数据库只需要三个Oracle数据库方案:
Owner ID:该schema包含大多数数据库对象。PeopleSoft进程以该数据库用户访问数据库。
Connect ID:登录数据库的过程中使用该低安全性数据库用户,直到密码被验证。
PS:该schema包含一张表,用于描述“哪些PeopleSoft数据库在Oracle数据库中”。
Owner ID (SYSADM)
一当登录过程完成之后,PeopleSoft进程(如一个两层的客户端进程或者一个应用服务器进程)通过管理schema(Owner ID,包含几乎所有PeopleSoft对象)连接到数据库。该schema可以访问PeopleSoft数据库中的任何表或视图。在PeopleSoft应用之中控制数据库中的对象访问,而不是通过数据库层进行控制。
Owner ID也被称作Access ID,因为所有的PeopleSoft进程使用该用户访问数据库。然而使用其他Access ID也是可能的。
按照惯例,管理schma通常叫作SYSADM,虽然使用一个不同的名字也是可以的。这个账户的密码非常重要,需要与Unix下的root账户、SYS账户和SYSTEM账户的密码同等重视。Owner ID具有某些通过一个叫作PSADMIN的角色赋予的权限。
Connect ID (PEOPLE)
从PeopleTools 8 开始,每个进程与数据库进行的第一次连接都是通过一个低安全性的用户账户即Connect ID(通常命名为PEOPLE)。它只具有一个通过PSUSER角色赋予的CREATE SESSION权限以及三个明确的SELECT权限:
以下内容从grant.sql中抽取:
-- This script grants select privileges to the PeopleSoft Connect ID.
-- An Oracle DBA is required to run this script logged in as the PSOFT
-- Schema Owner(ie ACCESSID).
--
-- Before running this script, modify the following parameters
--
--
-- Grant select on Psoft Security Tables to Connect ID
grantselectonPSSTATUSto;
grantselectonPSOPRDEFNto;
grantselectonPSACCESSPRFLto;
commit;
-- This script grants select privileges to the PeopleSoft Connect ID.
-- An Oracle DBA is required to run this script logged in as the PSOFT
-- Schema Owner(ie ACCESSID).
--
-- Before running this script, modify the following parameters
--
--
-- Grant select on Psoft Security Tables to Connect ID
grant select on PSSTATUS to ;
grant select on PSOPRDEFN to ;
grant select on PSACCESSPRFL to ;
commit;以下内容从
connect.sql中抽取:
REMARK-- This script sets up the PeopleSoft Connect ID.
REMARK -- An Oracle DBA is required to run this script prior
REMARK -- to loading a PSOFT database.
REMARK --
REMARK -- If you wish to use the default CONNECTID and PASSWORD,
REMARK -- then run this script as is.
REMARK -- If you wish to change the default CONNECTID and PASSWORD,
REMARK -- DELETE the default CREATE and GRANT statements below and
REMARK -- uncomment the template version modifying the following
REMARK -- parameters , ,
REMARK --
REMARK -- Create the PeopleSoft Administrator schema.
setechoon
spool connect.log
REMARK dropuserpeoplecascade;
createuserpeople identifiedbypeop1edefaulttablespace PSDEFAULT
temporarytablespace PSTEMP;
GRANTCREATESESSIONtopeople;
REMARK -- drop user cascade;
REMARK -- create user identified by default tablespace
REMARK -- temporary tablespace ;
REMARK -- GRANT CREATE SESSION to ;
spool off
REMARK -- This script sets up the PeopleSoft Connect ID.
REMARK -- An Oracle DBA is required to run this script prior
REMARK -- to loading a PSOFT database.
REMARK --
REMARK -- If you wish to use the default CONNECTID and PASSWORD,
REMARK -- then run this script as is.
REMARK -- If you wish to change the default CONNECTID and PASSWORD,
REMARK -- DELETE the default CREATE and GRANT statements below and
REMARK -- uncomment the template version modifying the following
REMARK -- parameters , ,
REMARK --
REMARK -- Create the PeopleSoft Administrator schema.
set echo on
spool connect.log
REMARK drop user people cascade;
create user people identified by peop1e default tablespace PSDEFAULT
temporary tablespace PSTEMP;
GRANT CREATE SESSION to people;
REMARK -- drop user cascade;
REMARK -- create user identified by default tablespace
REMARK -- temporary tablespace ;
REMARK -- GRANT CREATE SESSION to ;
spool off
Connect ID只提供了很少的PeopleTools表的访问权限,目的是允许登录过程的验证。在密码成功验证之后,进程就会以Access ID重新连接。
PeopleTools 7.x 及以前,每个PeopleSoft operator在数据库中都对应一个数据库用户。每次在应用中创建一个PeopleSoft operator之后,PSUSER角色就会被赋予给该PeopleSoft operator ID。PSUSER角色只包含CREATE SESSION权限,将这个该权限赋予给用户会隐式的创建数据库用户,如下所示:
在PeopleTools 7.5中创建了一个用户的Trace:
在PeopleTools 7.5中创建了一个用户的Trace:
5-312 0.961 Cur#1 RC=0 Dur=0.310 COM Stmt=GRANT PSUSER TO NEWOP
5-313 0.811 Cur#1 RC=0 Dur=0.811 COM Stmt=GRANT SELECT ON PSLOCK TO NEWOP
5-314 0.531 Cur#1 RC=0 Dur=0.531 COM Stmt=GRANT SELECT ON PSOPRDEFN TO NEWOP
5-312 0.961 Cur#1 RC=0 Dur=0.310 COM Stmt=GRANT PSUSER TO NEWOP
5-313 0.811 Cur#1 RC=0 Dur=0.811 COM Stmt=GRANT SELECT ON PSLOCK TO NEWOP
5-314 0.531 Cur#1 RC=0 Dur=0.531 COM Stmt=GRANT SELECT ON PSOPRDEFN TO NEWOP当一个PeopleSoft系统是从PeopleTools7升级过来的,通常会发现一些遗留下来的空schema,因为升级的过程没有移除这些schema。虽然这些schemas对安全不会造成多大影响,因为没人可以连接到这些schemas,但是建议删除掉这些schemas。
PS Schema
PS schema只包含一张表PSDBOWNER,该表将PeopleSoft数据库的名字映射到数据库的schema上。
PS.PSDBOWNER是PeopleSoft数据库中唯一一个在其他schema中的表(其他所有对象都在另一个schema(SYSADM)中)。在安装的过程中,通过如下脚本dbowner.sql创建PS schema 和PS.PSDBOWNER表。表被创建之后所有的权限会被撤销。
以SYSDBA身份执行如下脚本:
setechoon
spool dbowner.log
GRANTCONNECT, RESOURCE, DBATOPS IDENTIFIEDBYPS;
CONNECTPS/PS;
CREATETABLEPSDBOWNER (DBNAME VARCHAR2(8)NOTNULL, OWNERID VARCHAR2(8)NOTNULL) TABLESPACE PSDEFAULT;
CREATEUNIQUEINDEXPS_PSDBOWNERONPSDBOWNER (DBNAME) TABLESPACE PSDEFAULT;
CREATEPUBLICSYNONYM PSDBOWNERFORPSDBOWNER;
GRANTSELECTONPSDBOWNERTOPUBLIC;
CONNECTsystem/manager;
REVOKECONNECT, RESOURCE, DBAFROMPS;
ALTERUSERPS QUOTA UNLIMITEDONPSDEFAULT;
spool off
set echo on
spool dbowner.log
GRANT CONNECT, RESOURCE, DBA TO PS IDENTIFIED BY PS;
CONNECT PS/PS;
CREATE TABLE PSDBOWNER (DBNAME VARCHAR2(8) NOT NULL, OWNERID VARCHAR2(8) NOT NULL ) TABLESPACE PSDEFAULT;
CREATE UNIQUE INDEX PS_PSDBOWNER ON PSDBOWNER (DBNAME) TABLESPACE PSDEFAULT;
CREATE PUBLIC SYNONYM PSDBOWNER FOR PSDBOWNER;
GRANT SELECT ON PSDBOWNER TO PUBLIC;
CONNECT system/manager;
REVOKE CONNECT, RESOURCE, DBA FROM PS;
ALTER USER PS QUOTA UNLIMITED ON PSDEFAULT;
spool off该脚本中创建了一个公用的同义词(SYNONYM),因为在早期的PeopleTools版本中,登录过程不会明确的指定schema。同义词仍然允许在应用中引用表,但是该表也可以被任何连接到数据库的用户查询。在Owner ID schema 中创建一个用户同义词,然后只赋予SELECT权限给该用户会更加合适。
当创建了PeopleSoft数据库后,会产生一个Data Mover脚本,用于将PeopleSoft对象导入至Oracle数据库。该脚本也会向PS.PSDBOWNER表中插入一行描述PeopleSoft数据库的数据。
REM - FinalDatabasecleanup
REM -
REM - Based onyour inputstoDatabaseSetup, you will be using
REM - ConnectID's toconnecttoyour PeopleSoft Application
REM -
/
INSERTINTOPS.PSDBOWNERVALUES('HCM91','SYSADM');
UPDATEPSSTATUSSETOWNERID ='SYSADM';
REM - Final Database cleanup
REM -
REM - Based on your inputs to Database Setup, you will be using
REM - ConnectID's to connect to your PeopleSoft Application
REM -
/
INSERT INTO PS.PSDBOWNER VALUES('HCM91', 'SYSADM');
UPDATE PSSTATUS SET OWNERID = 'SYSADM';SYSADM之所以能够向PS.PSDBOWNER表插入数据,是因为SYSADM具有通过PSADMIN角色赋予的IMP_FULL_DATABASE权限,该权限包括 INSERT ANY TABLE 和 UPDATE ANY TABLE的权限。SYSADM没有权限删除这些行。安装之后,PS甚至没有CONNECT权限。
如果你想要通过执行完全的Oracle导入和导出操作来复制PeopleSoft数据库,在导入之前,目标数据库中必须存在PS.PSDBOWNER表。而且,导入过程是不能够创建这张表的,因为PS不再具有RESOURCE权限了。