set

Set action for assigning values to context attributes

set

Unconditionally assigns a value to an attribute. If the attribute already has a value, it is replaced. This is an alternative syntax for modify with the = operator.

Syntax

set <attribute> <value>;

Example

aaa {
    policy "example" {
        handler "AUTHENTICATION" {
            @execute {
                set user.privilege "write";
                set vars.greeting "hello";
            }
        }
    }
}

The above is equivalent to using modify with the = operator:

modify {
    user.privilege = "write";
    vars.greeting = "hello";
}
  • modify - block syntax for multiple variable assignments
  • replace - alternative syntax using replace attribute value;
  • append - alternative syntax using append attribute value;