paiPublicKey

paiPublicKey

This setting is used by Profound.js instances running on IBM i and serving as a Remote Connector instance for Profound AI instances running off-platform.

The setting is used for verification of authentication tokens generated by Profound UI/Gene and Profound.js Rich Display File (RDF) sessions. When Profound AI is using Remote Connector to access IBM i, it will submit authentication tokens to the Remote Connector instance for verification.

The key must be specified as a Node.js Buffer object containing an RSA public key in PEM 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:

"paiPublicKey": fs.readFileSync("/path/to/profound_ai.pub")

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 an environment variable named PAI_PUBLIC_KEY:

"paiPublicKey": Buffer.from(process.env.PAI_PUBLIC_KEY)

Click here for information on how to modify this setting.