Is there any way, in an iRule, to see if an APM session exists using the regular SID format?
Hi. Does anyone know any way to look up an APM session based on session ID? When I say session ID, I am talking about the session ID format found throughout the product's GUI, report pages, etc (and also the LastMRH_Session cookie). Here is an example of the SID format I mean: 0b75aaa4.
When I look in the iRule wiki, I see this code example given for seeing if a session exists:
when HTTP_REQUEST {
set apm_cookie [HTTP::cookie value MRHSession]
if { $apm_cookie != "" && ! [ACCESS::session exists $apm_cookie] } {
HTTP::respond 401 WWW-Authenticate "Basic realm=\"www.example.com\""
return
}
}
But the MRHSession cookie doesn't hold just the SID. It holds a value that looks something like this, where only the last few numbers represent the actual session ID: MRHSession=43158eb2be350a409739137c0b75aaa4.
I've tried putting a regular SID into the "ACCESS::session exists" command, but it always returns false. It only seems to work when using the longer MRHSession command format. Is there any command that exists that takes the regular format, or any way to make this command use the regular format?