AM 7.3.0

Configuration Provider node

Creates a dynamic node configuration, based on the current node state.

This node references a script that builds up a configuration map object with custom values and provides this configuration map to the specified node type.

The node has all the outcomes of the specified node and an additional outcome, Configuration failure. Use the Configuration failure outcome to specify what should happen when the node is unable to build the configuration map, the configuration map is missing required values, or the configuration map is invalid.

Before you use this node, create a script of type Config Provider that provides the functionality for the node. The map that you build in the script must be named config and must be populated with the required configuration.

To obtain the list of required attributes that your script must set for a specific node type, refer to the API Explorer, and the endpoint /realm-config/authentication/authenticationtrees/nodes/NodeType#_action_template.

The following request returns the required attributes for the Message node:

For example:

$ curl \
--request POST \
--header "<cookie>: <token>" \
"https://openam.example.com:8443/openam/json/realm-config/authentication/authenticationtrees/nodes/MessageNode?_action=template"
{
  "messageYes": {},
  "message": {},
  "messageNo": {}
}

This example creates a configuration map that pulls in the username from the node shared state to display a custom message, requesting the user to confirm that they are over 18:

config = {
    "message": {"en-GB": "Hi " + nodeState.get("username") + ". Please confirm that you are over 18."},
    "messageYes": {"en-GB": "Confirm"},
    "messageNo": {"en-GB": "Deny"},
};

Refer to the sample script for a reference to the bindings available to this script.

Example

Configuration provider node in a login flow

Outcomes

Configurable.

Properties

Property Usage

Script

Select the Config Provider type script that you created for this node.

Node Type (required)

Select the type of node for which you are generating a configuration.

This node cannot provide configuration for all node types. The node type must have a fixed set of outcomes that cannot be changed by the node’s configuration. (If the node’s OutcomeProvider implements StaticOutcomeProvider, it will have an entry in the node Type dropdown list.)

Copyright © 2010-2023 ForgeRock, all rights reserved.