WebSphere OAuth Config¶
+OAuth must be configured in IBM WebSphere for Boards to authenticate with HCL DX.
+Tip
+Remember to replace <username>
& <password>
with valid credentials
Connect to the core server, e.g on Kubernetes:
+kubectl exec -it hcl-dx-dev1-core-0 core -n hcl-dx-dev1 -- sh
+
Setup Provider¶
+-
+
-
+
Create the OAuth provider by using the wsadmin utility
++cd /opt/HCL/AppServer/bin +./wsadmin.sh -lang jython -username <username> -password <password> +AdminTask.createOAuthProvider('[-providerName OAuthConfig -fileName /opt/HCL/AppServer/properties/OAuthConfigSample.xml]') +AdminConfig.save() +quit +
+ -
+
Enable Auto Authorize
+Edit the OAuthConfig.xml file which was just created
+
+vi /opt/HCL/wp_profile/config/cells/dockerCell/oauth20/OAuthConfig.xml
+<parameter name="oauth20.autoauthorize.param" type="ws" customizable="false"> + <value>autoauthz</value> +</parameter> +<parameter name="oauth20.autoauthorize.clients" type="ws" customizable="true"> + <value>huddoboards</value> +</parameter> +
+ -
+
Restart the WebSphere Application Server
++cd /opt/HCL/AppServer/bin +./stopServer.sh WebSphere_Portal -profileName wp_profile -username wpsadmin -password wpsadmin +./startServer.sh WebSphere_Portal -profileName wp_profile +
+ -
+
Check TAI Interceptor properties set
+Global security > Trust association > Interceptors > com.ibm.ws.security.oauth20.tai.OAuthTAI
++provider_1.name=OAuthConfig +provider_1.filter=Authorization%=Bearer +
+
Register OAuth Clients¶
+-
+
-
+
copy default client definitions
++cp /opt/HCL/AppServer/properties/base.clients.xml /opt/HCL/wp_profile/config/cells/dockerCell/oauth20/ +
+ -
+
edit file to include Huddo Boards client
+
+vi /opt/HCL/wp_profile/config/cells/dockerCell/oauth20/base.clients.xml
+<client id="huddoboards" component="<OAUTH_PROVIDER_NAME>" secret="<OAUTH_SECRET>" displayname="Huddo Boards" redirect="https://<BOARDS_URL>/auth/dx/<BASE_64_ENCODED_DX_HOSTNAME>/callback" enabled="true"> +</client> +
Where:
+-
+
<OAUTH_PROVIDER_NAME>
is the name of the Provider specified above, typicallyOAuthConfig
+<OAUTH_SECRET>
is a complex, random secret, e.g. a UUID. This will be required later.
+<BOARDS_URL>
is the URL of the Boards deployment, e.g.company.example.com/boards
orboards.company.com
+<BASE_64_ENCODED_DX_HOSTNAME>
is a base64(dx-hostname) encoded string
+
For example:
++<client id="huddoboards" component="OAuthConfig" secret="a2e3d8c3-7875-4512-a0da-8b5fd61f2245" displayname="Huddo Boards" redirect="https://boards.huddo.com/auth/dx/ZHhkZXYxLmlzd2xhYi5uZXQ=/callback" enabled="true"> +</client> +
+
Install the OAuth 2.0 service provider application¶
+cd /opt/HCL/AppServer/bin
+./wsadmin.sh -f ./installOAuth2Service.py install dockerNode WebSphere_Portal -profileName wp_profile -username <username> -password <password>
+
Enable TAI¶
+-
+
-
+
Enable OAuth 2.0 TAI
++cd /opt/HCL/AppServer/bin +./wsadmin.sh -lang jython -username <username> -password <password> +AdminTask.enableOAuthTAI() +AdminConfig.save() +quit +
+ -
+
Restart the WebSphere Application Server
++cd /opt/HCL/AppServer/bin +./stopServer.sh WebSphere_Portal -profileName wp_profile -username <username> -password <password> +./startServer.sh WebSphere_Portal -profileName wp_profile +
+
Troubleshooting¶
+Issue: SSL Error
+ServletWrapper service CWSRV0014E: Uncaught service() exception root cause OAuth20EndpointServlet: javax.net.ssl.SSLHandshakeException: com.ibm.jsse2.util.j: PKIX path building failed: com.ibm.security.cert.IBMCertPathBuilderException: unable to find valid certification path to requested target
+
Resolution: Import the self-signed certificate into the WebSphere ISC
+ + + + + + + + + + + + + + + + + + + + +