Skip to content

Fortified IDDocs

Items to included (item_include_expr)

Decide which items to include in a valve

With item_include_expr you can control if an item should be included in iteration ("item filtering").

Supported scopes are export, request, session and item.

  • If the user has the single-valued attribute carLicense set to test, the user shall be assigned to the role role_admin.

    {
    "name": "ItemPropertyAdd",
    "config": {
    "item_include_expr": "str.isEqual(item.carLicese, 'test')",
    "name": "roles",
    "value": "role_admin"
    }
    }
  • If the user has the multi-valued attribute memberOf and is a member of group_1, the user shall be assigned to the role role_admin.

{
"name": "ItemPropertyAdd",
"config": {
"item_include_expr": "mv.containsAny(item.memberOf, 'CN=group_1,OU=Groups,DC=test,DC=local')",
"name": "roles",
"value": "role_admin"
}
}