Setting up persistence for the OAuth service with a Db2 database

High availability icon Use this topic to create a Db2® database to persist OAuth tokens and clients for use by all the WebGUI nodes in a high availability disaster recovery (HADR) hybrid deployment.

Before you begin

Note: There are two methods for the OAuth changes. The recommended method is to use the ObjectServer database to create and maintain the OAuth database tables. For more information, see Enabling the persistent OAuth 2.0 service in WebGUI in a high availability disaster recovery hybrid deployment.

Procedure

  1. Create Db2 database
    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:
    INSERT INTO OAuthDBSchema.OAUTH20CLIENTCONFIG
    (
      COMPONENTID,
      CLIENTID,
      CLIENTSECRET,
      DISPLAYNAME,
      REDIRECTURI,
      ENABLED
    )
    VALUES
    (
      'NetcoolOAuthProvider',
      'client_id',
      'client_secret',
      'My Client',
      'redirect_url',
      1
    )
    Where
    • 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.
  2. Create a JDBC entry to enable connection to your Db2 instance from WebSphere®®.
    In Dashboard Application Services Hub, click Console Settings > WebSphere Administrative console > WebSphere Administrative console, and then Resources > JDBC > JDBC providers and add an entry for Db2.
  3. Create a WebSphere datasource that has the credentials to connect to the OAuth Db2 database:
    In Dashboard Application Services Hub, 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 the NetcoolOAuthProvider.xml file.
  4. Restart the Dashboard Application Services Hub server.