Forum Discussion
Only enable access policy when server response is 401?
- Jan 31, 2014
TO add to Josh's suggestion.
If you see the 401 from the server in HTTP_RESPONSE, add some cookie or other marker and redirect client back to the VIP. If the cookie or other marker is seen, then do ACCESS::enable.
I do have another two questions on this... do I use an iRule Event in the Access Profile to tie into the iRules I am creating for this, or is there another way?
Essentially, I create a variable named 'needsAuth' and set it to 0. I then would have an iRule that checks the response of a request and if it returns 401, set the variable 'needsAuth' to 1. In another iRule, I think just evaluate that variable and if it is set to 1, include ACCESS::enable, otherwise do nothing and continue to have ACCESS::disable hang around.
Both checks need to occur on each request, right? Tying back to my first question... since the AP would be disabled until needed, I shouldn't need to make any changes to it, should I?
Again, thanks for your help!
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