Show message while SAML IDP redirects an user to the SP
Problem this snippet solves:
When an user gets redirected from a BIG-IP IDP to a SP the browser may display a white screen when the SP isn't responding right away. This happens when for example the SP needs some time to perform some user lookups or is just slow.
This code snippet will alter the blank page and put a message on it. See the example below.
Besides a message, you can also choose to display a CSS Loader. For more information on these CSS Loaders see:
How to use this snippet:
Create a new Virtual Server that will act as the IDP frontend. This Virtual Server will need a STREAM profile and the iRule below. This additional Virtual Server is needed to be able to modify the HTTP response of the Virtual Server that holds the Access Policy.
Code :
when RULE_INIT { # select one of the CSS Loaders # # These CSS Loaders are created by Camden Foucht # See: https://github.com/CamdenFoucht/LoadLab #set static::saml_redirect_html { } #set static::saml_redirect_html { } #set static::saml_redirect_html { } #set static::saml_redirect_html { } #set static::saml_redirect_html { } #set static::saml_redirect_html { } #set static::saml_redirect_html { } #set static::saml_redirect_html {} set static::saml_redirect_html { } #set static::saml_redirect_html {#} #set static::saml_redirect_html {###} #set static::saml_redirect_html { } #set static::saml_redirect_html {##} #set static::saml_redirect_html {#} #set static::saml_redirect_html { } #set static::saml_redirect_html {} # you can also display a message. #set static::saml_redirect_html {} set static::saml_redirect_css {} } when CLIENT_ACCEPTED { virtual vs_idp_example_com } when HTTP_REQUEST { set match 0 STREAM::disable HTTP::header remove "Accept-Encoding" if { [HTTP::uri] starts_with "/saml/idp/profile/redirectorpost/sso" } { set match 1 } } when HTTP_RESPONSE { if { $match } { STREAM::expression "@Please wait while you are being redirected...
$static::saml_redirect_html
Nice one Niels!
Thanks Patrick :-)
Good job Neil's!
Thanks Kevin :-)
- youssef_100679Nimbostratus
Hi Niels,
Nice job!!!
Thanks Youssef :-)
- Darrell-F5_3033Nimbostratus
Yes, indeed. I think that is exactly what I am looking for.
I did spend some time with it and looking at the options...way cool spinners! We did try to apply it directly to the VS, just to see if it might be as easy as that, as we did not have much time to devote to it at the time. That did not work, so I hope to revisit this again shortly and do it the way you suggested.
Thank-you for the help!
Darrell