Need help in understand the irule - APM
Hi Team ,
Can you please help me understand the irule configured under the VIP in APM ( remote access VPN).
What exactly this irule will check ?
when ACCESS_PER_REQUEST_AGENT_EVENT {
if { [ACCESS::perflow get {perflow.irule_agent_id}] eq "VPN_CATEGORY2ROLE_LOOKUP" } {
# in v13+: replace with ACCESS::perflow set {perflow.scratchpad} and replace the Per-Request-Policy VPE variable with {perflow.scratchpad}
# ACCESS::session data set {session.custom.cg_allow_access_to_url} "0"
ACCESS::perflow set {perflow.scratchpad} "0"
set user_roles [ACCESS::session data get {session.cg.user.roles}]
foreach category [CATEGORY::lookup [ACCESS::perflow get {perflow.category_lookup.result.url}] -display custom]
{
# loop through matched categories
if {$user_roles contains "|$category|"}
{
# users roles contain the allowed role
# ACCESS::session data set {session.custom.cg_allow_access_to_url} "1"
ACCESS::perflow set {perflow.scratchpad} "1"
break
}
}
}
}