1. The foreach loop is actually looping twice. The first time the cookie name is JSESSIONID. The second time the cookie name is HttpOnly. Has anyone found any issues with the iRule not parsing cookie’s correctly that contain the HttpOnly attribute ?
2. We have ASM which inserts a TS??? cookie, but this cookie doesn’t appear during the loop. I assume it isn’t inserted until after the HTTP_RESPONSE event ? Does anyone know a way to enable secure on the ASM cookie ?
It seems like a bug if you’re setting the secure option on a cookie and then finding a cookie named HttpOnly. I’d suggest opening a case with F5 Support to have them confirm and document this issue.
HTTP_RESPONSE fires before the request is sent to ASM. So you’ll need to use a “creative workaround” if you want to use an iRule to inspect and/or modify the response after ASM handles it. The workaround is described in SOL9388:
SOL9388: Using an iRule to parse post-ASM responses
I’ve had several customers balk at doing this because of the added complexity of the configuration. I’d suggest opening a case with F5 Support and ask them to add this functionality to the product without resorting to creating a second VS. If you do so and get a Change Request number, could you reply back with it so others can reference it?
I’ll chat to support about better support for post-ASM iRule events. I agree - VS sandwich’s are painful to scale, especially across the number of sites I need to handle this on.