cancel
Showing results for 
Search instead for 
Did you mean: 

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.

0151T000003d9F2QAI.PNG

Besides a message, you can also choose to display a CSS Loader. For more information on these CSS Loaders see:

http://cfoucht.com/loadlab/

0151T000003d9F3QAI.PNG

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 {

Please wait while you are being redirected...

} 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 "@$static::saml_redirect_html
Comments

Nice one Niels!

 

Thanks Patrick 🙂

 

Good job Neil's!

 

Thanks Kevin 🙂

 

youssef_100679
Nimbostratus
Nimbostratus

Hi Niels,

 

Nice job!!!

 

Thanks Youssef 🙂

 

Darrell-F5_3033
Nimbostratus
Nimbostratus

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

 

Version history
Last update:
‎14-Sep-2018 07:12
Updated by:
Contributors