Conditional execution
if
The if clause allows conditional execution of blocks within authentication,
authorization, and accounting pipelines. It evaluates a specified condition and
executes the enclosed blocks only if the condition is met.
Example
aaa {
policy "MANAGEMENT" {
handler "AUTHENTICATION" {
authentication {
# Add write privilege for users found from the internal file backend
if all {
user.backend == "USERS_INTERNAL_FILE";
} then {
modify {
user.privilege = "write";
}
}
http-management-authentication;
}
}
}
}