Forum Discussion
ossart_377099
Jan 08, 2019Nimbostratus
validation Irule F5 APM
Hello, I’m not an expert on the rule, so does anyone have a tool or could I validate this rule please?
In the Access Profile :
Irule_Allpriv_Api :
when ACCESS_POLICY_AGENT_EVENT {
log local0...
Andy_McGrath
Jan 08, 2019Cumulonimbus
Just a quick visual review. Which got two minor points:
- Don't use static variables unless you really need too
- You can ACCESS::policy agent_id instead of [ACCESS::session data get session.custom_event.id]
when ACCESS_POLICY_AGENT_EVENT {
log local0. "avant test id valeur a 5"
set valeur 5
set info "infos irule avant traitement"
set result "appel api allpiv avant traitement"
if {[ACCESS::policy agent_id] eq "irule_allpriv_api"} {
log local0. "irule_allpriv_api alimentation des variables"
set clientID "[ACCESS::session data get session.ldap.last.attr.cn]"
set valeur 0
set result "irule api traitement ok"
ACCESS::session data set session.logon.user.id 0
ACCESS::session data set session.custom.clientID $clientID
ACCESS::session data set session.api.allpriv.id $result
log local0. "variables alimentees"
set s2 [call /common/HSSR::http_req -uri "https://m.allpriv.com/techzone.sh?id"; \ –virt /common/vs-HSSR-helper -method POST –redir 0 –rbody info]
if {$s2 == 200} {
log local0. "retour du serveur ok info= ${info}"
} else {
log local0. "retour du serveur Ko info= ${info}"
}
if { $clientID != "" } {
ACCESS::session data set session.logon.user.id 1
}
}
}
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects