Registering an OAuth application with a provider
Register OAuth - In order for Actitivites Plus to authenticate with your Connections environment, you must define a new OAuth widget.
Procedure
-
SSH to the HCL Connections Deployment Manager (substitute the alias):
ssh root@[DEPLOY_MANAGER_ALIAS]
- On the WebSphere® deployment manager machine, start the wsadmin client, substituting your credentials. For more information, see Starting the wsadmin client.
-
Register the new application definition:
execfile('oauthAdmin.py') OAuthApplicationRegistrationService.addApplication('kudosboards', 'Kudos Boards', 'https://[BOARDS_URL]/boards/auth/connections/callback')
where [BOARDS_URL] is your Connections URL for Activities Plus, for example, connections.example.com/boards.
-
Use this command to view and record the definition of the unique clientSecret:
OAuthApplicationRegistrationService.getApplicationById('kudosboards')
The clientSecret will be used later as follows:
CONNECTIONS_URL=https://connections.example.com CONNECTIONS_CLIENT_ID=kudosboards CONNECTIONS_CLIENT_SEC
-
Enable auto-authorization for this application by specifying the provider to make it a
privileged client.
Note: This step is optional but recommended and can be done at any time.
-
Add a line for this provider in connectionsProvider.xml, which is used to
configure the provider to add the appId previously used to the trusted auto-auth client list. The
file is located in [PATH_TO_CONFIG_FILE]/oauth20/) where
[PATH_TO_CONFIG_FILE] is
WAS_HOME/profiles/<dmgr_profile_name>/config/[cellname].
Note: When adding the following, if
<parameter name="oauth20.autoauthorize.clients" type="ws" customizable="true">
is already present in the file, add only<value>kudosboards</value>
for that parameter. Two parameters of the same name are invalid and could cause problems.<parameter name="oauth20.autoauthorize.clients" type="ws" customizable="true"> <value>kudosboards</value> </parameter>
Note: Keep any existing provider values. -
Recreate the provider using this wsadmin command, substituting the appropriate path for
connectionsProvider.xml and updating the wasadmin credentials to those shown here:
./wsadmin.sh -lang jython -conntype SOAP -c "print AdminTask.createOAuthProvider('[-providerName connectionsProvider -fileName [PATH_TO_CONFIG_FILE]/oath20/connectionsProvider.xml]')" -user connectionsadmin -password passw0rd
-
Add a line for this provider in connectionsProvider.xml, which is used to
configure the provider to add the appId previously used to the trusted auto-auth client list. The
file is located in [PATH_TO_CONFIG_FILE]/oauth20/) where
[PATH_TO_CONFIG_FILE] is
WAS_HOME/profiles/<dmgr_profile_name>/config/[cellname].