Setting up persistence for the OAuth service (HA only)

High availability icon Use this topic to create a database to persist OAuth tokens and clients for use by all the WebGUI nodes.

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 DASH, 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 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.