Niles_245942
Mar 14, 2016Nimbostratus
irule to select ASM policy using policy rules
Hi Experts,
This case reflects 11.2.1 -> 11.6.0 HF6 upgrade test. While assessing 11.2.1 configuration, it was identified that 3 irules use HTTP_CLASS_SELECTED method, which create conflicts during upgrade to 11.6.0 HF6. So to avoid this respective HTTP_CLASS_SELECTED configuration has been commented out in irules before upgrade. With this step 11.2.1-> 11.6.0 HF 6 performed. Now I am trying to reconfigure irule to match newly created policy rules. Can you please go through below iRule and comment if you have any suggestions please?
when HTTP_CLASS_SELECTED {
ASM::enable
if { [HTTP::path] equals "/Results/StudyTemplate/Save" } {
ASM::disable
}
}
when HTTP_REQUEST {
if {[llength [POLICY::names matched]] > 0} {
switch -glob [POLICY::rules matched]{
policy rule name=labportal_HTTP_Class_policy_rule //asm policy name =/Common/labportal_HTTP_Class
"labportal_HTTP_Class_policy_rule"{
ASM::enable "/Common/labportal_HTTP_Class"
return
}
"BMT_HTTP_Class_policy_rule"{
policy rule name=BMT_HTTP_Class_policy_rule //asm policy name =/Common/BMT_HTTP_Class
ASM::enable "/Common/BMT_HTTP_Class"
return
}
"SciPortal_HTTP_Class_policy_rule"{
policy rule name=SciPortal_HTTP_Class_policy_rule //asm policy name =/Common/SciPortal_HTTP_Class
ASM::enable "/Common/BMT_HTTP_Class"
return
}
"Recruitment_HTTP_class_policy_rule"{
policy rule name=Recruitment_HTTP_class_policy_rule //asm policy name = /Common/Recruitment_HTTP_class
ASM::enable "/Common/Recruitment_HTTP_class"
return
}
if { [HTTP::path] equals "/Results/StudyTemplate/Save" } {
ASM::disable
}
}
Appreciate your suggestions to improve this iRule.
Cheers, Nisal