Add additional organizations, roles, permissions, and other data to the user session

This additional information can be retrieved from an HTTP endpoint when a user logs in and assigned to the user session.

Configuration

The following configuration parameters are available for every backend connection of type identity_provider.

Setting (Key) Group Type Description

IdentityProvider_AdditionalInfoEnabled
(identityProvider.additionalInfoEnabledName)

AdditionalInfo

false

Enable/disable retrieval of additional information (Default: false)

IdentityProvider_AdditionalInfoURL
(identityProvider.additionalInfoUrl)

AdditionalInfo

https://server:port/endpoint

URL to the endpoint that provides the additional information

IdentityProvider_AdditionalInfoEntriesPrefix
(identityProvider.additionalInfoEntriesPrefix)

AdditionalInfo

x-

Prefix for the returned values (see "Result" below)

IdentityProvider_AdditionalInfoURLBasicAuthUsername
(identityProvider.additionalInfoURLBasicAuthUsername)

AdditionalInfo

text

Username, if the Additional Info endpoint is secured via Basic Auth

IdentityProvider_AdditionalInfoURLBasicAuthPassword
(identityProvider.additionalInfoURLBasicAuthPassword)

AdditionalInfo

password

Password if the Additional Info endpoint is secured via Basic Auth

Endpoint

The endpoint to be called must have the following properties:

  • It must be accessible from the BPC

  • It must be able to accept a JSON via an HTTP POST request

  • It must return status code 200 upon success

  • The response must be in JSON format and conform to the structure listed below

JSON Parameters

When the endpoint is called via HTTP POST, the name of the user —who has just logged in—is passed. Additional information must be returned for this user.

{
  "username": "bpcadmin"
}

JSON Response

The additional organizations must be returned in the "organizations" field, the additional roles in the "roles" field, and the additional permissions in the "rights" field. Additional user-defined information must be returned in the "customData" field.

{
  "organisations":["org_a","org_b","org_c"],
  "roles":["role_1","role_2","role_3"],
  "rights":["right_x","right_y","right_z"],
  "customData":{
    "info_1": 123,
    "info_2": "example_string",
    "info_3": ["list_item_1", "list_item_2"]
  }
}

Some attributes in "customData" may be set by the identity provider and, in this case, are not overwritten by the attributes from the "additionalInfo" endpoint. These include, for example: "locale," "oidcUserInfoJWT," and "picture" (using Keycloak as an example).

Result

The user is now assigned the additional organizations, roles, and permissions. To prevent misuse, the passed values are prefixed with “ x- ” (see configuration above). In the example above, the user account bpcadmin is thus additionally assigned the organizations x-org_a, x-org_b, and x-org_c. The same process is applied to roles and permissions. CustomData does not receive a prefix.


Keywords: