Forum Discussion
When is HTTP_RESPONSE not fired?
I have a very boring iRule.
when HTTP_RESPONSE { HTTP::header insert Strict-Transport-Security "max-age=31708800" }
It works exactly as expected except...
For a VS using multi-domain authentication, the header is not inserted into the responses for the F5 logon pages, similar pages on another VS do have the header. As such HSTS isn't enabled until they complete the authentication successfully, which is undesirable.
What am I missing? 11.5.1 HF 2 with engineering fix to make the multi-domain authentication work.
4 Replies
- Kevin_Stewart
Employee
The HTTP_RESPONSE is triggered for egress HTTP traffic through the box. The logon VIP in an APM multi-domain configuration doesn't trigger the HTTP_RESPONSE event because it handles all responses locally. Your best bet here, unfortunately, is to layer the APM logon VIP behind an LTM VIP that can see the HTTP response traffic from the APM VIP. You'd use a very simple iRule on the LTM VIP:
when HTTP_REQUEST { virtual [name of APM VIP] } when HTTP_RESPONSE { HTTP::header insert Strict-Transport-Security "max-age=31708800" } - Kevin_Stewart
Employee
I should probably also clarify a "layered" VIP. This is where you put one VIP in front of another. The "external" VIP would have your publicly routable IP:port, a SNAT profile, an HTTP profile, and a client SSL profile if this is HTTPS traffic. The virtual command would send the decrypted traffic to an internal unencrypted VIP (in this case your APM VIP) that uses an internal, no-routable destination IP:port.
- Simon_Waters_13
Cirrostratus
Thanks Kevin. I suspect that the added complexity in fixing it is not worth it, given this would largely affect users who've never succeeded in completing authentication. Just wanted to make sure it wasn't some other property of the configuration causing it to break.
Although wonder if it could be added to the config in the way the pages are served. Probably time for HSTS to be a checkbox, and ttl, that does the 'right thing' everywhere, rather than a manual bolt on using iRules.
- Kevin_Stewart
Employee
Sounds like a good idea for a feature request.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com