Setting up persistence for the OAuth service (HA only)
Use this topic to create a database to persist OAuth tokens and clients for use by all the WebGUI nodes.
Procedure
- Create Db2® database Follow the instructions in this link: https://www.ibm.com/docs/en/SSAW57_8.5.5/com.ibm.websphere.nd.multiplatform.doc/ae/cwbs_oauthdb2.html.You can use the same Db2 instance that you use for your load-balancing database.When instructed to create a client in the Db2 database, use the following values:
WhereINSERT INTO OAuthDBSchema.OAUTH20CLIENTCONFIG ( COMPONENTID, CLIENTID, CLIENTSECRET, DISPLAYNAME, REDIRECTURI, ENABLED ) VALUES ( 'NetcoolOAuthProvider', 'client_id', 'client_secret', 'My Client', 'redirect_url', 1 )
- client_id is the value of client-id in custom-resource-was-oauth-cnea-secrets. For more information, see Configuring authentication.
- client_secret is the value of client-secret in custom-resource-was-oauth-cnea-secrets. For more information, see Configuring authentication.
- redirect_url is the value that you specified for Redirect URL when you installed the integration kit. For more information, see Installing the integration kit.
- Create a JDBC entry to enable connection to your Db2 instance from WebSphere®®. In DASH, click Console Settings > WebSphere Administrative console > WebSphere Administrative console, and then Resources > JDBC > JDBC providers and add an entry for Db2.
- Create a WebSphere datasource that has the
credentials to connect to the OAuth Db2 database:
In DASH, click Console Settings > WebSphere Administrative console > WebSphere Administrative console, and then Resources > JDBC > Data Sources and add an entry for the OAuth Db2 database that you created. This datasource must have a different name to the datasource created for the load-balancing feature.
jdbc/oauthProvider
is the suggested value. The value of JNDI name for the datasource must match the value of the oauthjdbc.JDBCProvider parameter in NetcoolOAuthProvider.xml.