paiPrivateKey
This setting is used by Profound.js instances running on IBM i to generate authentication tokens for use with Profound AI.
When this setting is populated with a valid private key, authentication tokens will be generated when users log into 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 will be 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.
Examples
Load Key from a File
To load the key from a file, add these lines to the top of your configuration file, if not already present:
const fs = require("fs");
const path = require("path");And then populate the setting like this:
"paiPrivateKey": fs.readFileSync("/path/to/profound_ai.key")Load Key from Other Sources
The key can be loaded from other sources using custom JavaScript code in the configuration file. For example, code like this could be used to populate the key from a Base64-encoded environment variable named PAI_PRIVATE_KEY:
"paiPrivateKey": Buffer.from(process.env.PAI_PRIVATE_KEY, "base64")Click here for information on how to modify this setting.