Relying party advanced configuration

We can use advanced configuration to customize requests that are made by the Relying Party.

Advanced configuration consists of a JavaScript mapping rule, which we can configure on a per partner or per federation basis. The JavaScript mapping rule is invoked at the following points during the Relying Party (RP) single sign-on flow.

The goal of the mapping rule is to add, augment, or remove parameters from the request that is about to be made. This request is achieved through a 302 redirect sent to the user agent.

Potential uses of the advanced mapping rule before the redirect from the OpenID Connect Provider (OP):

The RP uses the STSUniversalUser (STSUU) to represent the authentication request or response in its processing. The STSUU is passed into advanced mapping. HTTP parameters are included in the context attributes. JWT claims and the response from /userinfo are included in the attribute list, as they pertain to a users identity.

The processing flow before and after invocation of the rule is as follows:

  1. An incoming single sign-on request is received, either as part of a single sign-on kickoff, or as a redirect from the OpenID Connect Provider (OP).
  2. The request is unpacked into an STSUU structure.
  3. The mapping rule adds, to the STSUU, any values configured in the RP that need to be sent as part of this authorize request. For example, scope, client_id, and response_types.
  4. The advanced configuration rule is invoked, and changes are made to the STSUU.
  5. When the rule is successfully run, the STSUU is converted into an HTTP request.

Supported scenarios:

Since the same rule runs at both points, authors of rules must include logic to extract the current request type, and run the logic only where appropriate. This requirement is similar to the OAuth concept request_type. Because of this requirement, the operation parameter in the STSUU can be used.

In your mapping rule, use the attribute operation, of type urn:ibm:SAM:oidc:rp:operation to execute the mapping rule code for the STSUU operation for the intended entry point. We can then specify attributes of the necessary attribute type, based on the operation value.

For information, see:

Example rule

The Security Verify Access distribution includes an example advanced configuration mapping rule for Relying Party. This example demonstrates a simple way to include an example claims parameter. To view it:

  1. Log in to the local management interface.
  2. Select Federation > Global Settings > Mapping Rules.
  3. Select OIDCRP_ADV Category OIDC, and use the Edit function to view the contents.


Parent topic: Authentication with OpenID Connect Relying Party