迁移信任关联拦截器
使用本主题来手动迁移信任关联。
开始之前
对产品提供的信任关联拦截器的更改
HTTP/1.1 Fred (Proxy), 1.1 Sam (Apache/1.1),
HTTP/1.1 webseal1:7002, 1.1 webseal2:7001
并且 com.ibm.websphere.security.webseal.ignoreProxy 属性设置为 true 或 yes,那么匹配主机名时不使用主机名 Fred。缺省情况下,未设置此属性,这暗示 VIA 头中期望的任何代理主机名和端口都会在要满足 isTargetInterceptor 方法的主机名和端口属性中列出。
以上 VIA 头信息分割为两行仅为了便于说明。
有关 com.ibm.websphere.security.webseal.ignoreProxy 属性的更多信息,请参阅使用信任关联拦截器配置单点登录。
迁移产品提供的信任关联拦截器
未从 WebSphere® Application Server 的先前版本中迁移 webseal.properties 和 trustedserver.properties 文件中的属性。必须使用管理控制台中的信任关联面板将相应的属性迁移到 WebSphere Application Server V6.0.x。有关更多信息,请参阅配置信任关联拦截器。
对定制信任关联拦截器的更改
如果定制拦截器扩展 com.ibm.websphere.security.WebSphereBaseTrustAssociationInterceptor 属性,请实现以下新方法以初始化拦截器:
public int init (java.util.Properties props);
WebSphere Application Server 在使用信任关联实现前检查返回状态。零 (0) 是缺省值,表明成功初始化拦截器。
- 方法 1:
- 将 com.ibm.websphere.security.trustassociation.initStatus 属性添加到信任关联拦截器定制属性中。将属性设置为表明拦截器成功初始化的值。所有其他可能的值都暗示失败。万一失败,那么不使用相应的信任关联拦截器。
- 方法 2:
- 将 com.ibm.websphere.security.trustassociation.ignoreInitStatus 属性添加到信任关联拦截器定制属性中。将此属性的值设为 true,指示 WebSphere Application Server 忽略此方法的状态。如果将此属性添加到定制属性,那么 WebSphere Application Server 不检查返回状态,这与先前版本的 WebSphere Application Server 类似。
public int init (java.util.Properties props) 方法替换 public int init (String propsFile) 方法。
init(Properties) 方法接受 java.util.Properties 对象,该对象包含初始化拦截器所必需的属性集。拦截器的所有属性集将发送到此方法。然后拦截器可以使用这些属性初始化它本身。例如,在产品提供的 WebSEAL 服务器实现中,此方法读主机和端口,这样就可以验证进入请求是否来自可信的主机和端口。为零(0)的返回值暗示拦截器初始化成功。任何其他值都暗示初始化失败并且不会使用该拦截器。
方法 1:
使用前发行版中用过的相同属性名获取文件名。 通过将 .config 与 com.ibm.websphere.security.trustassociation.types 属性值连接来获取文件名。如果 myTAI.properties 文件位于 app_server_root/properties 目录中,那么设置以下属性:
- com.ibm.websphere.security.trustassociation.types = myTAItype
- com.ibm.websphere.security.trustassociation.myTAItype.config = app_server_root/properties/myTAI.properties
方法 1:
使用前发行版中用过的相同属性名获取文件名。 通过将 .config 与 com.ibm.websphere.security.trustassociation.types 属性值连接来获取文件名。如果 myTAI.properties 文件位于 profile_root/properties 目录中,那么设置以下属性:
- com.ibm.websphere.security.trustassociation.types = myTAItype
- com.ibm.websphere.security.trustassociation.myTAItype.config = profile_root/properties/myTAI.properties
方法 2:
可以将信任关联定制属性中的 com.ibm.websphere.security.trustassociation.initPropsFile 属性设置为文件的位置。例如,设置以下属性:
com.ibm.websphere.security.trustassociation.initPropsFile= app_server_root/properties/myTAI.properties
以上代码行分割为两行仅为了便于说明。作为连续的一行输入代码。
方法 2:
可以将信任关联定制属性中的 com.ibm.websphere.security.trustassociation.initPropsFile 属性设置为文件的位置。例如,设置以下属性:
com.ibm.websphere.security.trustassociation.initPropsFile= profile_root/properties/myTAI.properties
以上代码行分割为两行仅为了便于说明。作为连续的一行输入代码。
在 WebSphere Application Server Network Deployment 安装中,对于不同的节点,文件名的位置可能不同,请使用变量 install_root 来表示 WebSphere Application Server 安装目录。
但是,强烈建议将您的实现更改为实现 init(Properties) 方法而不是依赖 init (String propsfile) 方法。
迁移定制信任关联拦截器
来自先前版本的 WebSphere Application Server 的信任关联不会自动迁移至 WebSphere Application Server V9.0。可通过执行以下步骤来手动迁移这些信任关联: