Forum Discussion

sk_330490's avatar
sk_330490
Icon for Nimbostratus rankNimbostratus
Nov 15, 2017

More details on F5 APM getsid and getkey

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

  • 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/6.html

    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