15-Nov-2017
04:38
- last edited on
02-Jun-2023
10:27
by
JimmyPackets
I have tried searching for more info on getsid and getkey for ACCESS::user function.
What does these do and what are the differences? I can see only a one liner on F5 page. Can anyone help pls.
Irule example which i was going through has below entries, what do they do?
set user_key {}
append user_key $http_user "." $user_hash MD5 hash / hex encoded userpassword+IP+URL
set apm_cookie_list [ACCESS::user getsid $user_key]
set apm_cookie [ACCESS::user getkey [lindex $apm_cookie_list 0]]
HTTP::cookie insert name MRHSession value $apm_cookie
15-Nov-2017
04:45
- last edited on
05-Jun-2023
13:29
by
JimmyPackets
These are related to the outputs from the
sessiondump
command line utility. (or GUI equivalent)
https://devcentral.f5.com/wiki/iRules.ACCESS__user.ashx
set user_key {}
sets a variable 'user_key' as an empty list
append user_key $http_user "." $user_hash MD5 hash / hex encoded userpassword+IP+URL
appends the list with other information based on other variables (defined elsewhere)
set apm_cookie_list [ACCESS::user getsid $user_key]
returns the list of created external SIDs which is associated wit the specified key and stores in variable 'apm_cookie'
set apm_cookie [ACCESS::user getkey [lindex $apm_cookie_list 0]]
Returns the original SID for specified hash of SID (uses list to return the key)
HTTP::cookie insert name MRHSession value $apm_cookie
inserts a cookie based on the returned session values