oracle bpm 表单,Oracle BPM 安全认证

3f6cee6f5974ac738602efb91fac67e0.png

Oracle BPM可以运行在主流的J2EE的应用平台(weblogic, websphere,jboss等),在企业的应用环境中通常我们会基于J2EE平台,开发各种企业应用系统,基于ALBPM开发企业的业务流程管理系统。很多情况下我们需要实现这些应用之间的SSO(单点登录)。

在本文中,我将讲述Oracle BPM的安全认证,如何绑定J2EE容器的安全认证,并传递到Oracle BPM WorkSpace,如果我们的应用统一的基于J2EE容器的全局安全性,那么这些应用之间就可以方便的实现SSO。

架构及场景描述

16184648_200809280957551.jpg

如上图所示:ALBPM的BPM Server引擎与ALBPM WorkSpace是完全分离的架构,ALBPM WorkSpace为一个标准的J2EE EAR或WAR包应用程序,WorkSpace可以发布到各种J2EE服务器。在上图中BPM Server使用ALBPM Directory(可以为数据库或LDAP)来存储用户的身份信息及用户的策略信息等。

在下面的例子中,我们将WorkSpace发布到Tomcat或Weblogic或Websphere服务器。之后我们配置这些服务器启动全局安全性,来统一的负责应用程序的用户身份认证,J2EE服务器通过JNDI Realm来设置认证的数据源(可以为数据库或LDAP)。之后认证信息传递到ALBPM WorkSpace,并可以同步外部认证数据源数据到ALBPM Server使用的ALBPM Directory,这样的复制可以方便之后我们在ALBPM Directory中设置用户的策略信息。具体架构如下图所示:

16184648_200809280957552.jpg

服务器信任的用户数据源

为样例:

通过配置JNDI-Realm

在Server.xml文件中,对JNDIRealm设置如下:

connectionURL="ldap://192.168.1.140/DC=scc,DC=labs,DC=fuegotech,DC=com"

connectionName="Administrator@scc.labs.fuegotech.com"

connectionPassword="password"

referrals="follow"

userBase=""

userSearch="(sAMAccountName={0})"

userRoleName="memberOf"

userSubtree="true"

roleBase=""

roleName="cn"

roleSearch="(memberOf={0})"

roleSubtree="true"

/>

JNDIRealm支持LDAP及数据库。上面的样例中使用的LDAP是Microsoft的活动目录,对于其他的目录服务器,我们可以通过了解LDAP的Schema来做相关的设置,比如:对于Sun One Ldap,参考设置如下:

其中重要的设置为userPattern,roleBase,roleSearch。通过Ldapsearch工具我们就可以查看应该如何成功设置userPattern,roleBase,roleSearch。在Ldapsearch显示的界面中,我们就可以看到为什么roleSearch设置成uniqueMember。

16184648_200809280957553.jpg

测试:启动Tomcat,在log日志中我们就可以看到Tomcat与ldap的连接信息:

16184648_200809280957554.jpg

2007-10-30 23:29:32 JNDIRealm[Catalina]: Closing directory context

2007-10-30 23:30:44 JNDIRealm[Catalina]: Connecting to URL ldap://localhost:389

2007-10-30 23:31:08 JNDIRealm[Catalina]: lookupUser(liuxuzhong)

2007-10-30 23:31:08 JNDIRealm[Catalina]:   dn=uid=liuxuzhong,ou=groups,dc=liuxuzhong,dc=com

2007-10-30 23:31:08 JNDIRealm[Catalina]:   validating credentials by binding as the user

2007-10-30 23:31:08 JNDIRealm[Catalina]:   binding as uid=liuxuzhong,ou=groups,dc=liuxuzhong,dc=com

2007-10-30 23:31:08 JNDIRealm[Catalina]: Username liuxuzhong successfully authenticated

2007-10-30 23:31:08 JNDIRealm[Catalina]:   getRoles(uid=liuxuzhong,ou=people,dc=liuxuzhong,dc=com)

2007-10-30 23:31:08 JNDIRealm[Catalina]:   Searching role base 'ou=groups,dc=liuxuzhong,dc=com' for attribute 'cn'

2007-10-30 23:31:08 JNDIRealm[Catalina]:   With filter expression '(uniqueMember=uid=liuxuzhong,ou=people,dc=liuxuzhong,dc=com)'

2007-10-30 23:31:08 JNDIRealm[Catalina]:   retrieving values for attribute cn

2007-10-30 23:31:08 JNDIRealm[Catalina]:   Returning 1 roles

2007-10-30 23:31:08 JNDIRealm[Catalina]:   Found role fuegos

为样例:

进入websphere控制台,启用全局安全性,配置相关的LDAP设置:

16184648_200809281001391.jpg

设置LDAP:

16184648_200809281001392.jpg

的认证容器设置

本章讲述了如何集成Oracle BPM Enterprise Work Portal的认证到应用服务器连接到后台LDAP平台的JNDI认证。

我们需要编辑Work Portal的web.xml文件,文件位于($FUEGO_ENT/webapps/portal/WEB-INF/web.xml)。在web.xml文件中添加如下的tag标签。

16184648_200809281001393.jpg

对于以上的XML我们添加的TAG的解析:

·我们使用了Form的方式进行认证。我们将可以自定义一个认证的表单样式来实现认证。在LDAP中通过认证的用户将传递到BPM的目录服务。对于认证表单使用J_security方式。这里我们使用了BPM自带的/jsp/loginContainer.jsp。实际上我们可以执行编写任何符合J_security规范的表单。

·我们需要在ldap服务器中定义一个角色,然后在所有需要使用BPM平台的用户赋予相应的角色。

设置Work portal使用容器认证:

16184648_200809281001394.jpg

设置ALBPM的Directory Service信任LDAP认证过的用户

在ALBPM Directory Service的数据库表“FUEGO_PARTTRUST”中,增加两条记录:

16184648_200809281001395.jpg

其中的SQLFDI51为我们在配置Directory Service的时候设置的数据库用户名。

在ALBPM Workspace中使用LDAP里面的用户名登录,在这里我们在测试之前,需要手工的通过process administrator在BPM directory中增加需要登录的用户名。

当然我们也支持LDAP自动复制到BPM Directory的方式。

将之前的web.xml相应区域修成为以下的配置,同时增加userauthentication.properties文件。就实现了自动复制。

16184648_200809281001396.jpg

# User Replication Debug

fuego.portal.containerAuthentication.userReplication.debug=true

# Fuego Directory Service Bindings to create new user.

fuego.portal.containerAuthentication.userReplication.dirServiceUser=root

fuego.portal.containerAuthentication.userReplication.dirServicePassword=password

# Fuego default roles to assign to new user. These roles must exist in Fuego's Directory

Service.

fuego.portal.containerAuthentication.userReplication.roles=R1;Run

# LDAP Bindings

fuego.portal.containerAuthentication.userReplication.additionalInfoFromLDAP=true

某些情况下,我们不仅仅需要复制用户的ID,可以通过以下的参数配置实现:

fuego.portal.containerAuthentication.userReplication.userRetrievalDataClass=fuego.portal.

servlet.deploy.UserPrincipalLoginUserJNDIRetrievalData

fuego.portal.containerAuthentication.userReplication.ldapConnectionFactory=com.sun.jndi.

ldap.LdapCtxFactory

fuego.portal.containerAuthentication.userReplication.ldapURL=ldap://192.168.0.135:389/dc

=victorysupport,dc=com

fuego.portal.containerAuthentication.userReplication.ldapConnectionUser=pvictory@victor

ysupport.com

fuego.portal.containerAuthentication.userReplication.ldapConnectionPassword=pvictory

fuego.portal.containerAuthentication.userReplication.ldapAuthentication=simple

fuego.portal.containerAuthentication.userReplication.ldapReferrals=ignore

# LDAP Implementation User Attributes Names to retrieve

fuego.portal.containerAuthentication.userReplication.userIdentifierAttribute=sAMAccount

Name

fuego.portal.containerAuthentication.userReplication.firstNameIdentifierAttribute=givenNa

me

fuego.portal.containerAuthentication.userReplication.lastNameIdentifierAttribute=sn

fuego.portal.containerAuthentication.userReplication.emailIdentifierAttribute=userPrincipalName

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值