Forum Discussion
ehergott_345008
Apr 23, 2018Nimbostratus
iRule not being called during Access Policy
I require an iRule to pass headers during an access Policy. Within the policy I added an iRule event with the ID APM-REDIR-2. That should call the following iRule:
when ACCESS_POLICY_AGENT_EVENT...
Smithy
Apr 26, 2018Cirrostratus
The iRule doesn't parse. Also a number of spelling mistakes: APM-REDIR-2 != AMP-REDIR-2
Try this:
when ACCESS_POLICY_AGENT_EVENT {
if { [ACCESS::policy agent_id] eq "APM-REDIR-2" } {
set CACUPN [ACCESS::session data get "session.logon.last.upn"]
set CACCN [ACCESS::session data get "session.ssl.cert.subject"]
HTTP::header insert "CACUPN" $CACUPN
HTTP::header insert "CACCN" $CACCN
log local0. "LOG INFO: $CACUPN" log local0. "LOG INFO: $CACCN"
}
}
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