Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 
Custom Alert Banner

More details on F5 APM getsid and getkey

sk_330490
Nimbostratus
Nimbostratus

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
1 REPLY 1

Lee_Sutcliffe
Nacreous
Nacreous

These are related to the outputs from the

sessiondump
command line utility. (or GUI equivalent)

https://devcentral.f5.com/wiki/iRules.ACCESS__user.ashx

https://support.f5.com/kb/en-us/products/big-ip_apm/manuals/product/apm-visual-policy-editor-12-0-0/...

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