azn-decision-info

Use the azn-decision-info stanza entry to add extra information from the HTTP request, such as the method, to the authorization decision information.

To use azn-decision-info, we must first add the following to the WebSEAL configuration file, under the local-apps stanza.

We define any extra information that is available to the authorization framework when it makes authorization decisions. This extra information can be obtained from the following elements of the HTTP request:

If the requested element is not in the HTTP request, no corresponding attribute is added to the authorization decision information.

For more information, see: WebSEAL AZN Decision viewer


azn-decision-info options

<attr-name>

The name of the attribute containing the HTTP information.

<http-info>

The source of the information. It can be one of the following values:


JSON usage notes


Example 1: Standard HTTP elements

If these example configuration entries are set in the [azn-decision-info] stanza, WebSEAL adds the following attributes to the authorization decision information:


Example 2: JSON POST data

For this example, consider the following JSON form data:

{ "userid": "jdoe", 
  "transactionValue": "146.67", 
  "accountBalances": 
  {
        "chequing": "4345.45",
        "savings": "12432.23",
        "creditLine": "19999.12" 
  }
}

The following configuration entries in the [azn-decision-info] stanza extract information from this JSON form data.

The first entry prompts WebSEAL to search for the JSON node called "userid". In this example, the value associated with the "userid" node is jdoe. WebSEAL adds this value to the HTTP request in an attribute called USERID.

When WebSEAL processes the second entry, it searches for a top-level JSON node called "accountBalances". Under the "accountBalances" hierarchy, WebSEAL locates the "savings" JSON node. In the example data, the value associated with this node is 12432.23. WebSEAL adds this value to the HTTP request in an attribute called SAVINGS. WebSEAL adds the following attributes to the authorization decision information:


Example 3: JSON POST data with a JSON array value

For this example, consider the following JSON form data:

{ "userid": "jdoe", "transactionValue": "146.67", "accounts": [ {"name": "chequing", "balance": "4350.45"}, {"name": "savings", "balance": "4350.46"} ] }

The following configuration entry is included in the [azn-decision-info] stanza:

WebSEAL processes this entry as follows:

  1. Searches for a top-level node in the JSON data called "accounts".
  2. Locates the element in position 1 of the JSON array (base 0).
  3. Searches for the "balance" name-value pair in this array element.
  4. Adds the associated value to the authorization decision information.

In this example, WebSEAL adds the following attribute to the authorization decision information:


Example 4: Query string

For this example, consider the following entry in the [azn-decision-info] stanza:

If a user attempts to access the EAS protected resource:

WebSEAL sends the following value to the EAS for use in the decision-making process:

Parent topic: [azn-decision-info] stanza