(WAS v8.5.0.1)
Enable the system to use the OAuth 2.0 feature
This task assumes that you are familiar with the OAuth 2.0 feature.
Before we can use the OAuth 2.0 feature, install the OAuth 2.0 service provider application and enable the OAuth 2.0 Trust Association Interceptor (TAI).
- Install the OAuth 2.0 service provider application.
- Navigate to the app_server_root/bin directory.
- Run the installOAuth2Service.py script for each profile we want OAuth 2.0 enabled. For example:
wsadmin -f installOAuth2Service.py install <nodeName> <serverName> -profileName <profileName>
or
wsadmin -f installOAuth2Service.py install <clusterName>
where
nodeName is the node name of the target application server.
serverName is the server name of the target application server.
profileName is the name of the profile where the OAuth service provider is installed.
clusterName is the name of the cluster where the OAuth service provider is installed.
- Enable OAuth TAI. We can enable OAuth 2.0 TAI by using either wsadmin utility or the console.
- Enable OAuth TAI using wsadmin utility.
- Start the WAS.
- Start wsadmin utility from the app_server_root/bin directory by entering the command: wsadmin -lang jython.
- At the wsadmin prompt, enter the following command: AdminTask.enableOAuthTAI().
- Save the configuration: AdminConfig.save().
- Exit wsadmin utility by entering the following command: quit.
- Restart the WAS.
- Enable OAuth TAI using the console.
- Log on to the WAS console.
- Click Security | Global security
- Expand Web and SIP security and click Trust association.
- Under the General Properties heading, select the Enable trust association check box and click Interceptors.
- Click New and enter com.ibm.ws.security.oauth20.tai.OAuthTAI in the Interceptor class name field.
- Click OK.
- Click Global Security.
- Under Custom properties, provide the following custom property information: Name: com.ibm.websphere.security.InvokeTAIbeforeSSO and Value: com.ibm.ws.security.oauth20.tai.OAuthTAI.
Avoid trouble: If this custom property exists, edit its value to add com.ibm.ws.security.oauth20.tai.OAuthTAI.gotcha
- Click OK.
- Restart WebSphere Application Server.
Results
The OAuth 2.0 TAI is now enabled for WebSphere Application Server.
What to do next
After enabling the OAuth 2.0 feature, configure WebSphere Application Server as an OAuth service provider by creating one or more OAuth providers.