Forum Discussion
Ronny_Heymans_2
Nimbostratus
Oct 14, 2016APM Irule to make SSO cookie persistent
Hello,
I'm implementing an access policy containing a login form with a choice for a private of public computer.
When the user selects private I want to make the SSO cookie persistent with an ir...
Stanislas_Piro2
Cumulonimbus
Oct 24, 2016Hi,
this one may work...
when CLIENT_ACCEPTED {
set apmprivate 0
}
when ACCESS_ACL_ALLOWED {
if {!($apmprivate)} {
save computer status in tcl variable. the expected format is 0 or 1
set apmprivate [ACCESS::session data get session.logon.last.private]
set sessionid [HTTP::cookie value "MRHSession"]
}
}
when HTTP_RESPONSE_RELEASE {
if { [info exists apmprivate] && $apmprivate && ![PROFILE::access persistent_cookie] } {
if {[HTTP::cookie exists MRHSession]} {
HTTP::cookie expires "MRHSession" [PROFILE::access inactivity_timeout] relative
} else {
HTTP::cookie insert name MRHSession value $sessionid path "/"
HTTP::cookie expires "MRHSession" [PROFILE::access inactivity_timeout] relative
}
}
}
the previous irule was changing cookie expiration date even if the cookie was not sent by the server... this irule check if the server send the cookie and add it with right expiration date if not.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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