Radiator Server Documentation — v10.34.2

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

OperatorDescription
=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;
                    }
                }
            }
        }
    }
}
  • set - deprecated alternative syntax using set attribute value;
  • replace - deprecated alternative syntax using replace attribute value;
  • append - alternative syntax using append attribute value;