cancel
Showing results for 
Search instead for 
Did you mean: 
Login & Join the DevCentral Connects Group to watch the Recorded LiveStream (May 12) on Basic iControl Security - show notes included.

Present Message to User during ACCESS_POLICY_AGENT_EVENT iRule

JustCooLpOOLe
Cirrocumulus
Cirrocumulus

Hi,

 

I'm trying to write an iRule that is triggered during an APM policy (iRule Event) that will check the platform OS and version. If it's lower than a certain value, I want to reject the user but present a message to them indicating that they contact their System Administrator. I have the logic to reject or drop the connection but I'm unable to replace a reject/drop with an iFile or HTTP Redirect. I'm just trying different options. Any ideas?

 

when ACCESS_POLICY_AGENT_EVENT {     # iRule Event is called "test_me"     if { [ACCESS::policy agent_id] == "test_me"} {         # Variable Section         set min_ios_ver "15.1"         set min_android_ver "12"         set user_platform [ACCESS::session data get "session.client.platform"]         set user_version [ACCESS::session data get "session.client.platform_version"]         # Checks to see if the platform is iOS and version is allowed         if { $user_platform == "iOS" and $user_version < $min_ios_ver } {             reject                             if { $static::irule_debug == 1} { log local0. "Does not meet minimum version requirement" }         }         # Checks to see if the platform is iOS and version is allowed         if {$user_platform == "Android" and $user_version < $min_android_ver } {             drop             if { $static::irule_debug == 1} { log local0. "Does not meet minimum version requirement" }         }     } }
2 REPLIES 2

JustCooLpOOLe
Cirrocumulus
Cirrocumulus

Bump so it doesn't drown from too many questions on "Can we run curl in tmsh mode".

JustCooLpOOLe
Cirrocumulus
Cirrocumulus

Bump...new user experience and all.