Oracle BPM 安全认证

 

1.       简介

bb

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

 

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

 

2.       Oracle BPM架构及场景描述

16184648_200809280957551.jpg

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

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

 

16184648_200809280957552.jpg

3.       设置J2EE服务器信任的用户数据源

3.1.    Tomcat为样例:

通过配置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及数据库。上面的样例中使用的LDAPMicrosoft 的活动目录,对于其他的目录服务器,我们可以通过了解LDAPSchema来做相关的设置,比如:对于Sun One Ldap,参考设置如下:

 

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

 

16184648_200809280957553.jpg

 

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

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

3.2.    Websphere为样例:

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

16184648_200809281001391.jpg

设置LDAP

16184648_200809281001392.jpg

 

4.       将应用服务器的安全认证关联到Oracle BPM的认证容器设置

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

我们需要编辑Work Portalweb.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的时候设置的数据库用户名。

 

5.       测试

ALBPM Workspace中使用LDAP里面的用户名登录,在这里我们在测试之前,需要手工的通过process administratorBPM 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

本文仅代表作者本人观点,如有转载,请与作者联系:http://space.itpub.net/16184648/

 

fj.pngimage002.jpg

fj.pngimage004.jpg

fj.pngimage006.jpg

fj.pngimage008.jpg

fj.pngimage009.jpg

fj.pngimage011.jpg

fj.pngimage013.jpg

fj.pngimage015.jpg

fj.pngimage017.jpg

fj.pngimage019.jpg

fj.pngsecurity.jpg

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/16184648/viewspace-465988/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/16184648/viewspace-465988/

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值