paiPrivateKey
Description
This setting is used by Profound.js instances running on IBM i to generate authentication tokens for use with Profound AI.
When it is populated with a valid private key, authentication tokens are generated when users log in to Rich Display File (RDF) application sessions using their IBM i user profile and password. When an RDF-integrated Profound AI agent is loaded in the session, the authentication token is submitted to Profound AI and can be used to auto-login to Db2 connections as the RDF session user and with the library list of the RDF session.
The key must be specified as a Node.js Buffer object containing a 2048-bit RSA private key in DER format.
Example 1: Load the Key From a File
Add these lines to the top of your configuration file, if they are not already present:
const fs = require("fs");
const path = require("path");And then populate the setting:
"paiPrivateKey": fs.readFileSync("/path/to/profound_ai.key")Example 2: Load the Key From Another Source
The key can be loaded from anywhere using custom JavaScript in the configuration file. This reads it from a Base64-encoded environment variable named PAI_PRIVATE_KEY:
"paiPrivateKey": Buffer.from(process.env.PAI_PRIVATE_KEY, "base64")See also paiPublicKey.
For information on how to modify this setting, see Configuration File.