- ·上一篇教程:Lotus Instant Messaging
- ·下一篇教程:比较基于服务器的邮件和本地副本邮件
Web 客户端集成到 WebSphere Portal
|
级别: 中级 |
6 月 2005 年
使用门户的主要目的之一是为用户提供单点联接,Process Choreographer Web 客户端与 WebSphere Portal 集成在一起,将会对使用 WebSphere Portal 及通过 WebSphere Business Integration Server Foundation Web 客户端与业务流程交互的用户有帮助。
启用和共享公共安全性使门户网站与 WEB 客户端之间实现单点访问,也就是说,门户的认证用户访问 Process Choreographer WEB 客户端时就不需要重新认证和再次登录。
本文探讨了 WebSphere Portal Server 和 WebSphere Business Integration Server Foundation 的安装场景,Process Choreographer Web 客户端在 WebSphere Business Integration Server Foundation 中使用 Web 页面 portlet 与 WebSphere Portal 集成。本文还描述了如何使用 WebSphere Portal 和 Process Choreographer Web 客户端来启用单点登录安全性。
引言
Process Choreographer 是一种业务流程运行时引擎,它能编排 WebSphere® Application Server 中的服务。流程可以是全自动的或是需要人机交互的。因为流程需要人机交互,Process Choreographer 提供 WEB 应用程序以显示分配给特定用户的任务。用户和组信息一般由 LDAP 服务器提供。
从 5.1 版本开始, WebSphere Portal Server 通过报警和 My task portlet 提供流程整合,这样可以让用户看到分配给他们的任务。在早期的版本中,WebSphere Portal Server 也提供了集成现有 WEB 应用程序的可能性。为了个性化和用户信息, WebSphere Portal 也使用 LDAP 服务器。
本文从介绍如何将作为 WebSphere Business Integration Server Foundation 的一部分的业务编排 WEB 客户端集成到 WebSphere Portal Server 中开始。然后您会学到如何将业务编排 WEB 客户端集成为 WebSphere Portal 服务器的 portlet(本文假设这个集成提供的不只是 My task 功能),以及如何对这两个系统启用单点登录 (SSO) 。
安装场景
本文讨论了两个安装场景。在场景 1 中,WebSphere Portal 和 Process Choreographer 在同一个 WebSphere Application Server 安装中运行。 这个场景需要您安装 WebSphere Portal Version 5.0.2 Cumulative Fix 2 (5.0.2.2)。 要了解更多的安装信息,请参阅参考资料。
提示:在 5.1 版本中, 前面提到的 WebSphere Application Server Enterprise 更名为 WebSphere Business Integration Server Foundation。 WebSphere Portal Server 5.0.2.2 可以在 WebSphere Application Server 5.0.2 或 WebSphere Business Integration Server Foundation 5.1 上运行。
图 1. 安装场景 1
在安装场景 2 中, WebSphere Portal 和 Process Choreographer 运行在两个不同的 WebSphere Application Server 安装中。 在这一场景中,您可以使用 WebSphere Portal 5.0 或以上的版本。场景 2 里,WebSphere Portal 和 WebSphere Business Integration Server Foundation 可以在两台不同的机器上运行。
图 2. 安装场景 2
您可以使用 WebSphere Portal 和 Process Choreographer 支持的任一种 LDAP 服务器。本文描述了配置 Tivoli Directory Server 和 Lotus Domino Server 的步骤。
配置 WebSphere Portal 的安全性
安装了 WebSphere Portal 之后,它会使用关系数据库来存储用户信息,例如权限和版面定制。在生产环境中,经常使用 LDAP 服务器提供用户和组的注册。在这一场景中,WebSphere Portal 和 WebSphere Business Integration Server Foundation 必须使用相同的用户注册信息。
为了在 WEB 应用程序中使用 SSO,WebSphere Application Server 提供了轻量级第三方认证(LTPA)的认证机制。LTPA 定义了存储在客户端上的令牌格式。假如运行在不同机器上的第二个 WEB 应用程序也使用 LTPA,服务器会检查用户是否已经通过认证。如果通过了,用户就不必再次提供证书。在我们的例子中,WebSphere Portal 创建 LTPA 令牌,由于令牌已经存在,Process Choreographer Web 客户端就不用再显示认证页面了。
要在 WebSphere Portal 中启用安全性并切换到 LDAP:
- 配置 LDAP 服务器。这一步是门户安装流程中的重要部分,依赖于您所使用的 LDAP 服务器。
- 对于 Tivoli Directory Server 或任何其它支持的 LDAP 服务器,定制和导入 PortalUsers LDIF 文件。您可以在 WebSphere Portal 的安装 CD 上找到这个文件。
- 对于 Lotus Domino,启用可以被匿名用户读取的 LDAP 属性。然后,更新 Domino Directory 的访问控制列表:
安装在 doc 目录中的 WebSphere Portal 信息中心给出了安装部分的详细信息。
- 配置 WebSphere Portal 以使用 LDAP。您可以用 WebSphere Portal 提供的 WPSConfig 命令行工具配置 WebSphere Portal。您需要传递属性文件作为此工具的输入。所有主 LDAP 服务器的属性文件范例都在 $PORTAL_INSTALL_DIR/config/helpers 目录中提供。这些文件也提供了如何使用 WPSConfig 的指令。
- 对于 Tivoli Directory,使用 security_ibm_dir_server.properties 文件。
- 对于 Lotus Domino Directory, 使用 domino.properties 文件。
- 导出 LDAP 令牌 (仅用于场景 2)。只有在您打算配置场景 2 时才用到这一步,两个应用程序服务器都必须使用相同的 LTPA 令牌。
- 登录到运行 WebSphere Portal 的服务器的 WebSphere Application 管理控制台。
- 选择 Security => Authentication Mechanism => LTPA,把 LTPA 令牌导出到您的文件系统中的文件里。
在 WebSphere Business Integration Server Foundation 上启用安全性 (仅用于场景 2)
为确保 Process Choreographer Web 客户端的安全,您必须配置用户注册表且在 WebSphere Business Integration Server Foundation 中启用安全性。只有在场景 2 中配置两个不同的 WebSphere Application Server 安装时,才必须做这一步。对于用户注册表,使用与 WebSphere Portal 相同的 LDAP 服务器。在 Portal Server 安全设置中使用的 LTPA 令牌可以重复使用。
在 WebSphere Business Integration Server Foundation 中进行安全性配置有以下几步:
- 将 LDAP 配置为用户注册中心。进入 WebSphere Business Integration Server Foundation 的管理控制台,选择 Security => User Registries => LDAP。LDAP 用户注册中心提供的设置与 WebSphere Portal Server 安装中的 LDAP 设置相同。
- 导入 LDAP 标志。然后,选择 Security => Authentication Mechanisms => LTPA。
- 对于 Key File Name 域,输入在上节导出的密钥文件路径。
- 对于 Password 域,输入令牌的密码,然后导入 LTPA 令牌。
- 启用安全性。在 Global Security 部分,选择 LTPA 作为 Active Authentication Mechanism,并选择 LDAP 作为用户注册中心来启用安全性。接下来,重启服务器使新的设置生效。
图 3. 在 WebSphere Business Integration Server Foundation 管理控制台中启用安全性。 
将用户注册中心配置为 WebSphere Business Integration Server Foundation 人员注册中心。
Process Choreographer 使用人员插件来决定谁可以启动流程或声明活动。业务流程也可以包含人员活动,这些活动需要来自特定用户和组的用户输入。这一类的活动也使用人员插件。用户插件连接到用户注册中心,比如像 Tivoli Directory Server 或 Lotus Domino 这样的 LDAP 服务器。 请参阅 参考资料清单以获取更多关于人员解决方案架构的信息。
需要配置 WebSphere Business Integration Server Foundation 人员插件来使用与 WebSphere Business Integration Server Foundation(以及 WebSphere Portal)相同的用户注册表(在前面的步骤中配置)。该操作将允许用户和用户组与业务流程交互,从而得到授权以访问 Process Choreographer Web 客户端。
首先,如果需要 LDAP 绑定的认证,J2C 认证别名必须在 WebSphere Business Integration Server Foundation 中定义。如果允许匿名绑定,这步操作就不是强制性的。人员插件配置使用别名来根据用户注册中心进行验证。
要创建认证别名,请按照以下步骤进行:
- 登录到管理控制台。
- 选择 Security => JAAS Configuration => J2C Authentication Data Entries。
- 在 LDAP 服务器上用管理员帐户创建一个新的条目。
因为 LDAP 是作为用户注册中心使用的,您就要配置现有的 LDAP 人员插件提供者,创建一个新的 人员插件配置,或用适当的值更新现有的范例。您需要配置一些域,比如前面定义的认证别名、基本 DN、主机名和您的 LDAP 服务器的端口。
图 4. LDAP 插件配置范例
更新 Process Choreographer Web 客户端
这一步的目的是更新 WebSphere Business Integration Server Foundation Web 客户端以便更好地集成到 WebSphere Portal。
Web 客户端不能直接作为 portlet 使用,所以不能像 portlet 一样在门户中安装。 有一个好办法就是使用提供 iFrame 的 portlet,比如 Web Page portlet。本文中,我们会使用并配置它,使其包含 Process Choreographer Web 客户端。
安装、配置 Web Page portlet 之前,首先要对客户端进行定制,从而使得当它被包含在 Web Page portlet 中时,能得到期望的正确行为。
首先, Web 客户端包含整个浏览器窗口的 HTML 引用。例如,当您点击 Web 客户端 左侧面板导航区中任意链接时,每个链接都被配置为将相关内容在整个浏览器窗口中显示出来。当然,这个行为并不是我们要在门户中保留的,相反,您希望将 Web 客户端配置为使用整个 iFrame 窗口。
要实现这一变更,您需要对 Web 客户端的代码稍作修改:用对整个 iFrame 窗口 (target="Web Page") 的引用来替换对整个浏览器窗口 (target="_top") 的引用。
- 在目录 $WBISF_HOME/installedApps/WBE/process.war 中检索包含内容 target="_top" 的所有 JSP 文件。
- 下一步,更新所有的 JSP 文件,将 target="_top" 替换为 target="Web Page".
在第二次更新 Process Choreographer Web 客户端的时候,您需要将显示在导航条中的用户 ID 和 "logout" 链接删除。
要想从导航条删除用户 ID 和 logout 链接:
- 打开目录 $WBISF_HOME/installedApps/WBE/process.war 中的页面 Header.jsp。
- 将 cellpadding 的值改为 "1" 在表格的最后两个单元格加入 HTML 注释。这两个单元格就是用来显示用户 ID 和 logout 链接的:
|
要点:WebSphere Portal 提供门户和 Web 客户端之间的单点登录机制,但是不提供任何单点退出机制。这意味着如果您从门户退出,门户的 HTTP 会话就失效了,但是 WebSphere Business Integration Server Foundation 的 HTTP 会话仍然保留,直到最后超时才会失效。
对 Web 客户端的更新到现在就完成了。注意 Web 客户端是作为一个单独的应用程序,就是说,在门户之外就会发生错误。
将 Process Choreographer Web 客户端添加到 WebSphere Portal
要在 WebSphere Portal 中最终完成 WebSphere Business Integration Server Foundation Web 客户端的集成,您需要在 WebSphere Portal 上安装 Web Page portlet。这个 portlet 并不是缺省安装的,而是在所有已安装的系统中作为 WEB 模块来使用的。以管理员身份登录到门户,点击 Administration 链接并安装 portlet,选择 $WPS_HOME/installableApps/webpage.war 作为包含 portlet 的 Web 模块。
这步完成后,您可以将 Web Page portlet 添加到一个门户页面。要配置这个 portlet 以显示正确的内容:
- 点击 Edit 图标。
- 配置 Web Page portlet,将其指向 Process Choreographer Web 客户端。
- 指定 Web 客户端的 URL。
- 确认您所做的修改。
图 5. 在 WebSphere Portal 中集成 Process choreographer Web 客户端 
结束语
本文探讨了 WebSphere Portal Server 和 WebSphere Business Integration Server Foundation 的安装场景,Process Choreographer Web 客户端在 WebSphere Business Integration Server Foundation 中使用 Web 页面 portlet 与 WebSphere Portal 集成。本文还描述了如何使用 WebSphere Portal 和 Process Choreographer Web 客户端来启用单点登录安全性。





