I have a custom iRule and have found I am unable to access session variables - I have found tons of examples on DevCentral that appears to let you set/get them so what in the world is the deal? This syntax is literally cut and pasted from other iRules.
when HTTP_RESPONSE {
ACCESS::session data set “session.secureauthCert” “exists”
set certChecked [ACCESS::session data get “session.secureauthCert”]
log local0. “CERTCHECKED: $certChecked”
}
Silly question, but do you have APM licensed and an access policy applied to the virtual server?
Yes, APM is licensed and an access policy is applied to the server. I have found examples of using these commands from the HTTP_RESPONSE event - but can you really?
I just tested it with an 11.2 box, and yes it does work there. Can you say what the specific error is?
That’s what is odd - I don’t seem to get an error, but when I read it back and log it - I get no value. I am at a loss.
BIG-IP 11.1.0 Build 2185.0 Hotfix HF4
FYI, I’m having the same problem. I’m trying to pass variables between event blocks in an iRule, but ACCESS::session is not working in HTTP_REQUEST. When I do ACCESS::session data set followed immediately by ACCESS::session data get on the same key, I get an empty string as a result.
I did find that the docs for HTTP_REQUEST event (DevCentral - An F5 Technical Community) does not list ACCESS::session as an available command. However, I still have not found a good way to pass a user-specific variable between event blocks.