本文将介绍如果使用OAM实现PeopleSoft(PS) 单点登录,PeopleSoft系统以下简称PS,在OHS和Webgete配置完成的前提下,步骤如下:
1、配置OAM 资源保护
第一步、登录http://xxx.port/oamconsole配置资源保护
第二步、.在上面的Webgate Agent当中添加如下保护资源:
/psc/**
/cs/ps/**
/ps/**
/cgi-bin/printenv/**
/psp/**
2、OAM 标头配置
名称:以管理员用户登录OAM控制台,这里是weblogic,打开应用程序域==>WebGate==>授权策略==>Protected Resource Policy===>响应,新建一个响应。
OAM_REMOTE_USER
REMOTE_USER
PS_SSO_UID
类型:标头
值:$user.attr.uid
3、OHS配置
在OHS服务上找到mod_wl_ohs.conf配置文件,对其进行编辑添加对Peoplesoft资源的监听。
第一步、cd 到/oracle/ohshome/Middleware/Oracle_WT1/instances/instance1/config/OHS/ohs1目录下
第二步、执行vim mod_wl_ohs.conf命令,在mod_wl_ohs.conf中添加如下配置
<Location/psp>
SetHandler weblogic-handler
WebLogicHost xx.xx.xx.xx
WebLogicPort 80
</Location>
<Location/ps>
SetHandler weblogic-handler
WebLogicHost xx.xx.xx.xx
WebLogicPort 80
</Location>
<Location/psc>
SetHandler weblogic-handler
WebLogicHost xx.xx.xx.xx
WebLogicPort 80
</Location>
<Location/cs/ps>
SetHandler weblogic-handler
WebLogicHost xx.xx.xx.xx
WebLogicPort 80
</Location>
保存配置,重启OHS实例
4、响应配置
第一步、cd /oracle/ohshome/Middleware/Oracle_WT1/instances/instance1/config/OHS/ohs1/htdocs
第二步、ln -s ../cgi-bin cgi-bin
第三步、chmod 755 cgi-bin/printenv
第四步、cd cgi-bin
第五步、vim printenv ,修改perl 路径为#!/usr/bin/perl第六步、重启ohs实例
5、响应测试
6、建立对Peoplesoft进行公共访问的用户
使用管理员用户登录Peoplesoft,打开主菜单PeopleTools安全性用户概要,新建一个LOGIN用户概要,密码123456
7、开放用户的公共访问权限
开发环境中使用的webprofile为TEST,打开主菜单==>PeopleTools==>web概要==>web概要配置,选择TEST,生产环境是PROD,对其进行编辑。
8、修改Peoplesoft登录认证逻辑
使用Peoplesoft Application Designer连接Peoplesoft,打开FUNCLIB_LDAP Record.然后编辑LDAPAUTH的Peoplesoft code。找到函数getWWWAuthConfig,修改默认登录用户为新创建的用户,此处为TESTLOGIN
添加验证代码
/*----peoplesoft sso-----*/ Function Oracle_Access_Manager_Authentication() /* Note: Following file will written to the default path.*/ /* Usually appserv/<instance name>/files */ &logfile = GetFile("oamaccess.log", "A"); If &logfile.Isopen Then &logfile.Writeline("INFO: Netpoint_Authentication_Profile started"); &logfile.Writeline(String(%Datetime)); &logfile.Writeline("authMethod: "); End-If; If %PSAuthResult = True And &authMethod <> "LDAP" And &authMethod <> "COREID" And &authMethod <> "SSO" Then If &logfile.Isopen Then &logfile.Writeline("INFO: AuthResult and AuthMethod ok."); End-If; getWWWAuthConfig(); If &logfile.Isopen Then &logfile.Writeline("INFO: After get wwwauthconfig."); &logfile.Writeline(&defaultUserId); End-If; If %SignonUserId = &defaultUserId Then If &logfile.Isopen Then &logfile.Writeline("INFO: %SignonUserId = &defaultUserId "); End-If; &userID = %Request.GetHeader("PS_SSO_UID"); If &logfile.Isopen Then &logfile.Writeline("INFO: After getting HTTPheader"); &logfile.Writeline(&userID); End-If; If &userID <> "" Then If &bConfigRead = False Then getLDAPConfig(); If &logfile.Isopen Then &logfile.Writeline("INFO: After getLDAPConfig()"); &logfile.Writeline(&userID); End-If;
&GlobalUserID = &userID; If &logfile.Isopen Then &logfile.Writeline("INFO: After DNTold"); &logfile.Writeline(&GlobalUserID); End-If; If &GlobalUserID <> "" Then SetAuthenticationResult( True, &GlobalUserID, "", False); &authMethod = "WWW"; If &logfile.Isopen Then &logfile.Writeline("INFO: Userid is valid"); &logfile.Writeline(&GlobalUserID); End-If; End-If; End-If; Else If &logfile.Isopen Then &logfile.Writeline("Warning: %SignonUserId not = &defaultUserId"); &logfile.Writeline(%SignonUserId); &logfile.Writeline(&defaultUserId); End-If; End-If; Else If &logfile.Isopen Then /*Note: Next line sometimes wraps due to length – fix if necessary */ &logfile.Writeline("ERROR: %PSAuthResult = True And"); &logfile.Writeline("&authMethod <> ""LDAP"" And "); &logfile.Writeline("&authMethod <> ""SSO"""); &logfile.Writeline(%PSAuthResult); &logfile.Writeline(&defaultUserId); &logfile.Writeline(%Request.GetHeader("PS_SSO_UID")); End-If; End-If; If &logfile.Isopen Then &logfile.Writeline("INFO: Oracle_Access_Manager_Authentication_Profile exit"); &logfile.close(); End-If; End-If; End-Function;
/*----peoplesoft sso-----*/ |
9、添加对OAM令牌的认证
10、Weblogic用户需要禁止基本认证
例如:
11、用户名大小写问题
OAM传送OBSSOcookies给PS中用户名都为大小。而PS系统中本身用户为小写,而且PS系统用户名大小写敏感,导致用户名小写用户名无法登陆,解决方法很简单:
12、配置目录
13、高速缓存目录模式
14、身份验证映射
15、用户概要映射
16、PS服务器重启
重启PS服务器和进程
17、同步用户
1.开发定时任务接口,每天凌晨将人员表中的数据同步到PS临时PS_OPRDEFN_SSO_TMP_TBL中
2.再将PS_OPRDEFN_SSO_TMP_TBL写到到PSOPRDEFN人员概要表、psroleuser权限表、psopralias人员类型表
至此OAM实现PeopleSoft 单点登录就完成了,通过原有的门户就可以直接链接到PS人力资源系统
有兴趣的发送邮箱到[email protected],提供在线技术支持