Radiator Server Documentation — v10.34.2
DEPRECATED: Use standalone assignments, such as vars.foo = "bar";, instead
modify
Variable modification block
Table of Contents
modify
The modify action is deprecated. Write assignments directly in the pipeline
instead. Configurations that use modify still work, but Radiator Server logs a
deprecation warning.
Migration
Drop the modify prefix from a single assignment:
# Deprecated
modify vars.foo = "bar";
# Use instead
vars.foo = "bar";
Drop the modify { ... } wrapping from multiple assignments:
# Deprecated
modify {
aaa.identity = "alice";
vars.my_var ?= aaa.identity;
}
# Use instead
aaa.identity = "alice";
vars.my_var ?= aaa.identity;
Standalone assignments behave the same as modify. They update context values
and preserve the previous action result.
Assignment operators
| Operator | Description |
|---|---|
= | Assigns the value to the variable unconditionally. |
?= | Assigns the value only if the target variable is currently none. |
+= | Appends a new value to the variable. |
:= | Deprecated alias for = operator. |
Example
aaa {
policy "MANAGEMENT" {
conditions all {
aaa.protocol == protocol.MANAGEMENT;
}
handler "AUTHENTICATION" {
@execute {
http_management_authentication {
@resolve {
user.privilege = "write";
user.group = "admin";
}
@verify {
http_basic_auth;
}
}
}
}
}
}