Variable modification block
modify
The modify block is used to set or update variables and attributes within AAA
policy handlers. It allows you to assign values to user attributes, system
variables, or other configuration parameters based on authentication,
authorization, or accounting logic.
Syntax and operators
modify {
# Always assing a variable
aaa.identity = "alice";
# Assign if the target attribute is `none`
var.my_var ?= aaa.identity;
}
Example
aaa {
policy "MANAGEMENT" {
handler "AUTHENTICATION" {
authentication {
modify {
user.privilege = "write";
}
http-management-authentication;
}
}
}
}