PingAuthorize

Enabling query settings

To use an attribute without explicitly providing its value in an open-ended decision request, you must enable query settings for that attribute.

About this task

To enable query settings:

Steps

  1. In the Trust Framework, navigate to the attribute for which you want to enable query settings.

  2. In the attribute’s hamburger menu, select Add Query Settings.

    Screen capture of an attribute hamburger menu with the Add Query Settings option selected

    Before enabling query settings, you must save the query attribute.

  3. In the Source list of the Query Settings section that you created, select a source attribute of the Collection type.

    This attribute defines the collection of possible query attribute values that the decision engine retrieves to test against the appropriate policy.

    Screen capture of the Value Settings section of a query attribute definition with Collection selected as the Type

    Using a source collection attribute with a significant number of values could strain the system and cause performance issues.

  4. Optional: In the Response Value list, select an attribute with which to filter the decision response.

    You cannot use the same value for Source and Response Value.

    Example:

    Screen capture of the Query Settings section of a query attribute with example attributes selected for the Source and Response Value fields

    In this example, UsersService is an attribute that resolves from an HTTP service call retrieving a collection of User objects. Given a JSON User object such as the following, the User.name sub-attribute resolves from the User attribute and is configured with a JSONPath value processor to extract the name field:

    {
      "name": "Joe Boggs",
      "id": "b5f963fa-111e-49ff-994b-b89a20a2c1d5",
      "age": 27
    }
    Screen capture of an example value processor on the User.name attribute extracting the $.name field from the JSON user object

    With the User.name attribute selected as the Response Value, requests that query the User attribute will only return the name of the relevant user, rather than the entire user object.

    "results": [
      {
        "attribute": "User",
        "value": "Joe Boggs",
        "decision": "PERMIT"
      }
    ]

    To return the entire value of the queried attribute, leave Response Value blank.

  5. Click Save.

Result

You can now include this attribute in the query array of a query decision request without assigning it any values.