Migrating trust association interceptors
You can manually migrate trust associations.
The followings sections provide information about migrating TAIs.
Changes to the custom trust association interceptors
The following changes apply to the WebSphereBaseTrustAssociationInterceptor
abstract class.
- Use of the public int init (String propsFile) method is deprecated
-
The
public int init (java.util.Properties props)method in thecom.ibm.websphere.security.WebSphereBaseTrustAssociationInterceptorclass replaces thepublic int init (String propsFile)method.The init(Properties) method accepts a
java.util.Propertiesobject, which contains the set of properties that is required to initialize the interceptor. All of the properties set for an interceptor are sent to this method. The interceptor can then use these properties to initialize itself. For example, in the product-provided implementation for the WebSEAL server, this method reads the hosts and ports so that an incoming request can be verified to come from trusted hosts and ports. A return value of zero implies that the interceptor initialization is successful. Any other value implies that the initialization is not successful and the interceptor is not used.Theinit(String)method still works if you want to use it instead of implementing the init(Properties) method. The only requirement is that you enter the file name that contains the custom trust association properties by using the Custom Properties link of the interceptor in the administrative console or by using scripts. You can enter the property by using either of the following methods. The first method is used for compatibility with previous versions of WebSphere Application Server.- Method 1
The same property names that are used in the previous release are used to obtain the file name. The file name is obtained by concatenating
.configto thecom.ibm.websphere.security.trustassociation.typesproperty value. If themyTAI.propertiesfile is located in theapp_server_root/propertiesdirectory, set the following properties:com.ibm.websphere.security.trustassociation.types = myTAItypecom.ibm.websphere.security.trustassociation.myTAItype.config = app_server_root/properties/myTAI.properties
- Method 2
- You can set the
com.ibm.websphere.security.trustassociation.initPropsFileproperty in the trust association custom properties to the location of the file.For example, set the following property.
com.ibm.websphere.security.trustassociation.initPropsFile= app_server_root/properties/myTAI.propertiesThe following example demonstrates how to set the property on IBM i systems.
com.ibm.websphere.security.trustassociation.initPropsFile= profile_root/properties/myTAI.propertiesThe previous line of code is split into two lines for illustrative purposes only. Type as one continuous line.
However, changing your implementation to implement the
init(Properties)method is a better practice than relying on theinit (String propsfile)method. - Init error status values are changed
-
If the custom interceptor extends the
com.ibm.websphere.security.WebSphereBaseTrustAssociationInterceptorclass, implement the newpublic int init (java.util.Properties props)method to initialize the interceptor as described previously.However, if a previous implementation of the trust association interceptor returns a different error status, you can either change your implementation to match the expectations or make one of the following changes:- Method 1
- Add the
com.ibm.websphere.security.trustassociation.initStatusproperty in the trust association interceptor custom properties. Set the property to the value that indicates the interceptor is successfully initialized. All of the other possible values imply failure. If a failure occurs, the corresponding trust association interceptor is not used. - Method 2
- Add the
com.ibm.websphere.security.trustassociation.ignoreInitStatusproperty in the trust association interceptor custom properties. Set the value of this property totrue, which tells WebSphere Application Server to ignore the status of this method. If you add this property to the custom properties, WebSphere Application Server does not check the return status, which is similar to previous versions of WebSphere Application Server.
Migrating custom trust association interceptors
The trust associations from previous versions of WebSphere Application Server are not automatically migrated to WebSphere Application Server Version 9.0. You can manually migrate these trust associations by using the following steps: