In this article:

Step 1. Save Technological Account to Connect to DBMS

Step 2. Set Up External Service Parameters

Step 3. Set Up Repository Connection

Step 4. Prepare External Service and Open Web Application

JWT Token

When logging in to repository using JWT token, after the user is authenticated in the external service, BI server queries should be added with headers containing JWT token with user information. When the repository connection opens, the user information is obtained from the JWT token.

NOTE. Interaction between the external authentication service and the proxy server, which adds headers to queries, is not described in this help and can be implemented at administrator's discretion. The trust between the BI server and the proxy server, which adds headers to queries, is provided by checking with JWT token signature.

If the external service's user account is contained in the security manager, the repository connection is established and the object navigator opens using this user account.

If the external service's user account is not contained in the security manager, a temporary user is created and added to groups from the list specified in the corresponding attribute of the JWT token. If the attribute containing the list of groups is not set, the temporary user is added to the USERS built-in group.

NOTE. The temporary user cannot be included in the ADMINISTRATORS built-in group.

DBMS connection is executed using technological account.

The interaction scheme is given in the Foresight Analytics Platform Authentication section.

Step 1. Save Technological Account to Connect to DBMS

To connect to the repository under the specific user authorized on the external server, determine the settings described in this step for each user and for each repository. Repeat this step on all work cluster nodes.

To set up repository connection:

  1. Start the PP.Util utility located in the folder with installed Foresight Analytics Platform, using command line as an administrator. Below are commands for setting up repository connection. Use PP.Util_start.sh to execute the command in Linux OS, and PP.Util.exe to execute the command in Windows OS instead of PP.Util.

NOTE. When saving the encrypted password of technological account in Linux OS, the AnalyticsPlatform feature is requested. Study the methods for specifying the LSFORCEHOST or LSHOST system variable before executing PP.Util_start.sh.

  1. Save the encrypted password of the technological account to connect to DBMS:

PP.Util /save_creds <repository identifier> /DC <repository user (technological account) name> <user password>
		

The example of saving data of a common technological account for all users of the external service:

PP.Util /save_creds REPOSITORY_ID /DC TECHNO_ACCOUNT TECHNO_PASSWORD
PP.Util /save_creds <repository identifier> <repository user (technological account) name> <repository user (technological account) password> <repository user (external service) name>
		

The example of saving data of different technological accounts:

PP.Util /save_creds REPOSITORY_ID TECHNO_NAME1 TECHNO_PASSWORD1 USER1
PP.Util /save_creds REPOSITORY_ID TECHNO_NAME2 TECHNO_PASSWORD2 USER2
PP.Util /save_creds REPOSITORY_ID TECHNO_NAME2 TECHNO_PASSWORD2 USER3

The TECHNO_NAME1, TECHNO_NAME2 users, whose credentials are used as technological accounts, must be added in the security manager. The USER1, USER2, USER3 external service users can be added in the security manager and can be temporary users.

NOTE. The user used as a technological account should have the privileges, which include privileges of corresponding external service users, for which it was saved.

When connecting to repository the system searches for the saved technological account to connect to DBMS:

After executing the operations the repository connection is set up.

Step 2. Set Up External Service Parameters

For the external service add a section with service name in the registry key [HKLM\SOFTWARE\Foresight\Foresight Analytics Platform\10.0\PP\BIS\System\ExtService\<service name>] or in the corresponding section of the settings.xml file. Determine the following settings:

IMPORTANT. The list of groups of users must not contain the ADMINISTRATORS built-in group. If this group is in the list, an exception is thrown during the connection.

To set session values of global variables, after the repository connection is successfully established, one can create the AdditionalAttributes section in external service settings description. Name of each child element of this subsection should match the attribute name in JWT token, which value will be set in global variable. The child element can contain the IdVariable parameter, in which one specifies identifier of repository global variable. If the IdVariable parameter is not specified, the system searches for the global variable with the identifier equal to attribute name in upper case.

The example of filling in parameters is given in the System section for the settings.xml file.

Step 3. Set Up Repository Connection

To set up repository connection, use the Metabases.xml file, add the Authentication attribute with the 8 value and fill in the ExtService section with the Provider attribute. As an attribute value, specify name of the subsection created for the external service at Step 2.

The example of the Metabases.xml file:

<PP>
    <Metabases>
        <REPOSITORY_JWT Name="REPOSITORY_JWT" Authentication="8" Driver="POSTGRES" Package="STANDARDSECURITYPACKAGE">
            <ExtService Provider="JWT_PROVIDER"/>
        </REPOSITORY_JWT>
    </Metabases>
</PP>

An alternative method of repository connection setup is adding identical parameters to the registry section:

After making all changes restart the BI server.

Step 4. Prepare External Service and Open Web Application

The web application should work via the HTTPS protocol. The external service after user authentication should be able to open the web application page by the following URL:

https://<web application URL>/fp10.x/r/#/app/navigator?repo=<repository identifier>

One can open the object navigator or open a repository object via the URL. The URL should contain the repo parameter including repository identifier.

The web application redirects queries to the proxy server. Queries are appended with headers containing JWT token with user information on the proxy server.

The appended query is sent to the BI server.  The BI server checks token signature, obtains user information, and opens a repository connection. After the repository connection is opened, the web application page is displayed, to which the user was redirected.

See also:

Foresight Analytics Platform Authentication | Setting Up Authentication via External Services