Forum Discussion
variable from HTTP_REQUEST to ACCESS_POLICY_AGENT_EVENT
Hi,
I am trying grab username which is part of URI::Query(when HTTP_REQUEST) and trying to assign it to session.logon.last.username (when ACCESS_POLICY_AGENT_EVENT)
Is it possible to take a variable from event HTTP_REQUEST and assign it to a variable when ACCESS_POLICY_AGENT_EVENT ?
I am doing this as a part of Office 365 implementation.
Any help would be much appreciated.
- K4keyur_155272
Nimbostratus
Current iRulewhen HTTP_REQUEST { if { [HTTP::uri] contains "username="} { set uri [URI::decode [URI::query [HTTP::uri]]] set urisplit [split $uri "&"] set uname [lindex $urisplit 2] log local0. $uname }
}
when ACCESS_POLICY_AGENT_EVENT { if { [ACCESS::policy agent_id] eq "getusername" } { ACCESS::session data set session.temp.username $uname } }
I am assigning session.temp.username to session.logon.last.username using variable assignment
The bit that is not working is assignment of $uname to ACCESS::session data set session.temp.username
- Anesh
Cirrostratus
try
ACCESS::session data set session.custom.username $uname
- Stanislas_Piro2
Cumulonimbus
Hi,
you can use
instead ofACCESS_SESSION_STARTED
andACCESS_POLICY_AGENT_EVENT
HTTP_REQUEST
when ACCESS_SESSION_STARTED { if { [HTTP::uri] contains "username="} { set uri [URI::decode [URI::query [HTTP::uri]]] set urisplit [split $uri "&"] set uname [lindex $urisplit 2] log local0. $uname ACCESS::session data set session.temp.username $uname } }
Recent Discussions
Related Content
* 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