Forum Discussion
Asif_Thobhani_7
Nimbostratus
Jun 12, 2008How can I read the persistence profile settings using PROFILE::persist
Can someone please help with how to use the PROFILE::persist command?
From within my iRule, I want to find out what's the name of the cookie that's been used for persistence (cookie ins...
Asif_Thobhani_7
Nimbostratus
Jun 18, 2008I think I finally figured out how to use the PROFILE::persist commands (after some trial and error)...
Here is what I have along with the output
profile persist my_cookie_profile {
defaults from cookie
mode cookie
cookie mode insert
cookie name MY_PERSIST_COOKIE
cookie expiration 0d 00:10:00
}
when CLIENT_ACCEPTED {
if { [PROFILE::exists clientssl] == 1} {
log local0. "client SSL profile enabled on virtual server"
set cert [PROFILE::clientssl cert]
log local0. "clientssl certificate is: $cert"
set key [PROFILE::clientssl key]
log local0. "clientssl key is: $key"
}
if { [PROFILE::exists persist cookie] == 1} {
log local0. "persist cookie profile enabled on virtual server"
set cookie_profile_name [PROFILE::persist mode cookie name]
log local0. "persist cookie profile name is: $cookie_profile_name"
set persist_cookie_name [PROFILE::persist mode cookie cookie_name]
log local0. "Name of the cookie used for persistence is: $persist_cookie_name"
set cookie_expiration [PROFILE::persist mode cookie cookie_expiration]
log local0. "Cookie expiration is set for: $cookie_expiration"
}
}
***********output**************
Jun 18 00:30:34 tmm tmm[28049]: Rule read_PROFILE_Commands : client SSL profile enabled on virtual server
Jun 18 00:30:34 tmm tmm[28049]: Rule read_PROFILE_Commands : clientssl certificate is: dev-crm.crt
Jun 18 00:30:34 tmm tmm[28049]: Rule read_PROFILE_Commands : clientssl key is: dev-crm.key
Jun 18 00:30:34 tmm tmm[28049]: Rule read_PROFILE_Commands : persist cookie profile enabled on virtual server
Jun 18 00:30:34 tmm tmm[28049]: Rule read_PROFILE_Commands : persist cookie profile name is: my_cookie_profile
Jun 18 00:30:34 tmm tmm[28049]: Rule read_PROFILE_Commands : Name of the cookie used for persistence is: MY_PERSIST_COOKIE
Jun 18 00:30:34 tmm tmm[28049]: Rule read_PROFILE_Commands : Cookie expiration is set for: 600
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