Setting up a Connection to a Remote IBM i Instance



When running Profound.js on a non-IBM-i platform, the instance can be configured to communicate with an instance hosted on IBM i. This allows Connector APIs (such as record file I/O, program calls, etc) to run with a generic user profile. To get started, you'll first need to store the IBM i credentials in a secure form. To do that, run the "store_credentials" command-line utility as shown below. The utility will prompt for the IBM i user, password and output file location.



The example below shows how to use the connectorCredentials configuration setting. Starting in Profound.js / Profound API version 7, configuration settings connectorUser and connectorPassword are also available as an alternative.



The file produced by the utility contains the credentials in encrypted form. Please note that the utility does not validate IBM i credentials.

Then, edit the "config.js" file and set the connectorURL to the desired URL, and connectorCredentials to the path of the file produced by the "store_credentials" utility. For example:

After making these changes, the instance will need to be restarted. Any errors (i.e. can't connect to IBM instance, invalid credentials, etc.) will be reported during the server start up process and the instance will not start.

Configuring the IBM i Instance to Allow Remote Connections

Instances running on IBM i accept remote connections by default. The enableConnector configuration option can be used to refuse remote connections.

Starting in Profound.js version 4.9.0, access to Connector APIs by remote hosts is restricted for security purposes. See connectorIPFilter for instructions on configuring the IBM i instance to allow access to the Connector from remote hosts.

Starting in Profound.js version 5.2.0, access to Connector APIs by remote hosts requires the connectorCredentials be set on the IBM i instance. See connectorCredentials for instructions on configuring the IBM i instance connectorCredentials property.