单点登录--使用带信任用户的TAI配置Access Manager

来源:互联网 发布:json在线解析器代码 编辑:程序博客网 时间:2024/06/11 19:39
导读:

  IBM WebSphere 开发者技术期刊: 利用 Tivoli Access Manager 和 WebSphere Portal 配置单点登录

  的文档。)

  8. 检查您能否访问 snoop: https://rhaalab1.raleigh.ibm.com/snoop。

  9. 要添加一个 MIME Type,选择 Environment => Virtual Hosts => default_host => MIME Types => New。输入如下值:

  m Mime Type: application/java-archive

  m Extensions: jar

  10. 单击 OK,然后将您的修改保存到主配置。

  您已经完成了添加虚拟主机和 MIME 类型的操作。现在,为 SSL 配置 WebSphere Portal。

  1. 如下所示,编辑 /shared/app/config/services/ConfigService.properties 文件:(443 是 HTTP 服务器的 SSL 端口)

  redirect.logout.ssl = true

  redirect.login.ssl = true

  redirect.logout.url = https://:/pkmslogout

  host.port.https = 443

  2. 保存并关闭该文件。

  步骤 6.在 Access Manager 中创建信任用户帐号

  在该场景中,这个用户的专有名称为: uid=taiuser,cn=trustedusers,dc=ibm,dc=com 。这是 WebSEAL 用来向 Application Server 表明它自身所使用的用户

  ID 和密码。为防止潜在的攻击,不要使用 sec_master 或者 用户作为信任用户帐号。信任用户帐号应该只提供给 TAI。这个 taiuser 的专有名称必须位

  于 Application Server 能够在上面检索的 Directory Information Tree 中。例如, dc=ibm,dc=com 。

  1. 从 下载文件中导入 portalusers.ldif 文件,在 LDAP 中创建 taiuser。您可以使用 LDAP 配置实用工具,或者您也可以使用 ldapadd 或 ldapmodify 来

  添加用户。

  ldapadd -D cn=root -w ldap -f

  2. 确保已经在 Directory Server 中创建了taiuser。

  http://www-128.ibm.com/developer ... ngh/0406_singh.html(第 31/48 页)2006-9-4 16:10:35

  IBM WebSphere 开发者技术期刊: 利用 Tivoli Access Manager 和 WebSphere Portal 配置单点登录

  3. 接下来,登录到 pdadmin ,执行如下的命令,将 taiuser 导入到 Access Manager 中:

  pdadmin sec_master> user import taiuser uid=taiuser,cn=trustedusers,

  dc=ibm,dc=com

  pdadmin sec_master> user modify taiuser account-valid yes

  pdadmin sec_master> user modify taiuser password-valid yes

  pdadmin sec_master> user list * 10

  最后一行应该在它的输出信息中提供 taiuser。现在 TAM 已经能够识别 taiuser 了。

  您已经创建了 taiuser 并将其导入到 Access Manager 中。

  步骤 7.配置到 HTTP 服务器的 WebSEAL 连接

  接下来,配置一个从 WebSEAL 服务器到 Web 服务器的 WebSEAL 连接。在 WebSEAL 所在的机器上进行配置(在该场景中,WebSEAL 所在的机器指的是

  RHAALAB2 )。

  1. 在 WebSEAL 所在的机器上,使用 pdadmin 命令行创建一个 WebSEAL 连接。输入如下命令(同时参阅图 26 ):

  pdadmin -a sec_master

  

  server list

  server task create -t ssl -h

  -p -j -w -b supply -c ivuser,

  iv-groups -f /ssl1

  server task list

  服务器列表命令为您提供了一个 WebSEAL 实例列表。 是您的 Web 服务器的端口号,在本实例中为 443 。

  图 26.创建 WebSEAL 连接

  http://www-128.ibm.com/developer ... ngh/0406_singh.html(第 32/48 页)2006-9-4 16:10:35

  IBM WebSphere 开发者技术期刊: 利用 Tivoli Access Manager 和 WebSphere Portal 配置单点登录

  2. 继续下一步前先检查下面的 URL:

  m WebSEAL 主页: https://rhaalab2.raleigh.ibm.com:444

  m HTTP 服务器主页: https://rhaalab1.raleigh.ibm.com/

  m 通过 WebSEAL 连接的 HTTP 服务器(应该显示 HTTP 服务器主页): https://rhaalab2.raleigh.ibm.com:444/ssl1

  3. 要启用 Junction to Request Mapping Table (JMT) 功能,定义一个 ASCII 文本文件,命明为 jmt.conf 。在 jmt.conf 文件中数据条目的格式由连接

  名称、一个空格和资源定位模式组成。您可以使用通配符来表示资源定位模式。在配置文件的 [junction] 这一节中指定该文件的存放位置:

  /PDWeb/etc/webseald-default.conf

  例如:

  jmt-map = lib/jmt.conf

  这段语句表示 jmt.conf 位于: /PDweb/www-default/lib/ 这个目录下。在 jmt.conf 文件中输入如下内容: /

  ssl1 /wps/* :

  4. 将数据添加到文件中后,使用 jmt load 命令来 "加载" 数据,这样 WebSEAL 就能够识别新的信息。

  图 27.创建 WebSEAL 连接

  http://www-128.ibm.com/developer ... ngh/0406_singh.html(第 33/48 页)2006-9-4 16:10:35

  IBM WebSphere 开发者技术期刊: 利用 Tivoli Access Manager 和 WebSphere Portal 配置单点登录

  您已经完成了连接的创建并创建和装载了一个 jmt。

  步骤 8.编辑 webseald.conf 文件

  在这一步中,您将编辑 WebSEAL 配置文件来配置一些超时和虚假密码问题,这些假密码可能在 HTTP 消息头中传输。

  1. 打开文件: /PDWeb/etc/webseald-default.conf .

  2. 在 [junction] 这一节中,将 basic-auth-dummy-password 改为 taiuser 的用户密码:

  basicauth-dummy-passwd = taiuser1

  在同一节中,修改下面语句:

  m http-timeout = 300

  m https-timeout = 300

  3. 在 [forms] 这一节中,利用这个格式来启用 WebSEAL 认证: forms-auth = https

  4. 在 [script-filtering] 这一节中,设置: script-filter = yes

  5. 因为您使用的是基于窗体的认证,而不是基本认证,所以将 ba-auth 从 https 改为 none :

  ba-auth = none

  http://www-128.ibm.com/developer ... ngh/0406_singh.html(第 34/48 页)2006-9-4 16:10:35

  IBM WebSphere 开发者技术期刊: 利用 Tivoli Access Manager 和 WebSphere Portal 配置单点登录

  6. 停止 WebSEAL 服务器,再启动它。

  步骤 9.将 WebSphere Portal 用户和组导入到 WebSEAL 中

  在这一步中,您将使用 pdadmin 实用工具将 WebSphere Portal 用户和组导入到 WebSEAL 中。

  用 sec_master 登录到 pdadmin。使用下面这些命令导入 wpsadmin 和 wpsbind 用户:

  pdadmin sec_master> user import wpsadmin uid=wpsadmin,cn=users,dc=ibm,dc=com

  pdadmin sec_master> user modify wpsadmin account-valid yes

  pdadmin sec_master> user modify wpsadmin password-valid yes

  pdadmin sec_master> user import wpsbind uid=wpsbind,cn=users,dc=ibm,dc=com

  pdadmin sec_master> user modify wpsbind password-valid yes

  pdadmin sec_master> user modify wpsbind account-valid yes

  pdadmin sec_master>

  图 28.将用户和组导入到 WebSEAL 中

  步骤 10.在 Application Server 中配置 TAI

  现在,为了用 Application Server 启用 SSO,在 Application Server 中配置 WebSEAL TAI:

  1. 登录到 Application Server 管理控制台。例如,在 Web 浏览器中打开: https://rhaalab1.raleigh.ibm.com:9090/admin。

  2. 导航到 Security => Authentication mechanism => LTPA => Trust Association,然后单击 Enable。

  3. 在附加属性下单击 Interceptors。拦截器的类名称为: com.ibm.ws.security.web.WebSealTrustAssociationInterceptor 。

  http://www-128.ibm.com/developer ... ngh/0406_singh.html(第 35/48 页)2006-9-4 16:10:35

  IBM WebSphere 开发者技术期刊: 利用 Tivoli Access Manager 和 WebSphere Portal 配置单点登录

  4. 单击 Custom properties,然后添加表 2 中列出的属性。象该表中列出的那样正确复制属性名称。注意那些值和用 { } 围起来的说明,看那些值是否适

  合您的环境。

  表 2.自定义属性

  名称 值

  com.ibm.websphere.security.trustassociation.

  types

  webseal

  com.ibm.websphere.security.webseal.hostnames RHAALAB2

  {在完全相同的实例中,这里需要输入"主机名"命令的输出。该字

  段对大小写敏感。它不是全限定主机名。您可以输入逗号将主机名

  列表分开。}

  com.ibm.websphere.security.webseal.id iv-user

  {这是 WebSEAL 在请求 Application Server 时发送的消息头字

  段。它告诉 TAI 将哪个字段用于终端用户身份。}

  com.ibm.websphere.security.webseal.loginId taiuser

  {这个 id 的密码存于 WebSEALd.conf 文件的 basicauthdummy-

  passwd 属性中。}

  com.ibm.websphere.security.webseal.ports 444

  {这是 WebSEAL 主机的端口号,也是在请求消息头中所期望的。

  包括任何代理端口。如果 com.ibm.websphere.security.

  WebSEAL.ignoreProxy 的值被设为 true,那么从 WebSEAL 主

  机名中添加端口号,但是忽略任何代理端口。}

  http://www-128.ibm.com/developer ... ngh/0406_singh.html(第 36/48 页)2006-9-4 16:10:35

  IBM WebSphere 开发者技术期刊: 利用 Tivoli Access Manager 和 WebSphere Portal 配置单点登录

  com.ibm.websphere.security.WebSEAL.mutualSSL 可选

  {默认情况下,该值被设为 false。如果您使用带客户证书的 SSL

  创建连接来将 WebSEAL 服务器识别到 TAI,该值应该设为

  true。否则,该值应该设为 false。如果该值为 true,TAI 不用

  进行进一步验证。结果,由于 TAI 是由相互认证的 SSL 连接建立

  的,它只信任 WebSEAL 所在的机器的身份。}

  com.ibm.websphere.security.WebSEAL.ignoreProxy 可选

  {当包含代理时,设置该值为 true。当把该值设为 true 或 yes,

  它会告诉 Access Manager 让其忽略代理信息(主机名和端

  口)。默认情况下,该属性被设为 false。如果不包含代理,这个

  选项设为什么都没有关系。}

  5. 将您的设置与下面图 29 中所示的设置对比。重要提示:主机名对大小写敏感,为了与我们用于测试的名称相匹配,在这个场景中,主机名 RHAALAB2 全部

  是大写字母。您可以混合使用或用小写字母作为您实际的主机名。

  6. 保存配置

  图 29.自定义属性

  http://www-128.ibm.com/developer ... ngh/0406_singh.html(第 37/48 页)2006-9-4 16:10:35

  IBM WebSphere 开发者技术期刊: 利用 Tivoli Access Manager 和 WebSphere Portal 配置单点登录

  7. 保存配置,退出 Application Server 管理控制台。删除下面这个目录下预编译的 JSP 文件: /temp//

  WebSphere_Portal

  8. 删除预编译的类后重新启动 WebSphere Portal。检查 /log/SystemOut.log 文件中的下列消息。这些消息表示 TAI 加载成

  功:

  TrustAssociat A SECJ0121I: Trust Association Init class

  com.ibm.ws.security.web.WebSealTrustAssociationInterceptor loaded

  successfully

  [6/2/04 14:28:09:685 EDT] 4de6fe46 WebSealTrustA W SECJ0225W: PD

  Authentication disabled.



本文转自

http://soa.5d6d.com/redirect.php?fid=4&tid=58&goto=nextnewset