Forum Discussion

JD_02_146678's avatar
JD_02_146678
Icon for Nimbostratus rankNimbostratus
Jul 22, 2014

APM - Session Expired/Timeout: Start a new session link

Hello,

 

I am trying to modify the URL that the 'Start a new session' link points to when an APM session has expired. The current behavior just points the browser back to the APM login page and I would like to point the browser to another URL that is not being hosted on the F5.

 

I am not very savvy with iRules and have been looking in the customization area of APM to accomplish this but without success.

 

Any ideas where this URL value is stored and options for modifying the URL?

 

Thanks!

 

4 Replies

  • Absolute worst case, given that this is a static value in the HTML of the logout page, you could layer an LTM VIP over the APM VIP and use an iRule and STREAM profile to do the replacement.

     

  • Okay then, this is probably even messier than the last set of options, but it appears the disconnect URL is statically defined in the sesstimeout.js JavaScript file. To get to that, I'll put a layered LTM VIP in front of my APM VIP, apply a generic STREAM profile and an iRule like this:

    when HTTP_REQUEST { 
        STREAM::disable
    
        virtual simple-1-vs
    
        if { [HTTP::uri] equals "/vdesk/sesstimeout.js" } {
             Don't allow data to be chunked
            if { [HTTP::version] eq "1.1" } {
                if { [HTTP::header is_keepalive] } {
                    HTTP::header replace "Connection" "Keep-Alive"
                }
                HTTP::version "1.0"
            }
    
            HTTP::header remove Accept-Encoding
            set rewrite 1
        }
    }
    when HTTP_RESPONSE {
        if { [info exists rewrite] } {
            unset rewrite
            STREAM::expression {@'/vdesk/hangup.php3'@'http://yahoo.com'@}
            STREAM::enable
        }
    }
    
  • Using what Kevin provided above as a starting point, I was able to get this working to support our requirements. Thanks Kevin!

    In our case an external SAML SP is redirecting to the BigIP as an IdP for one of any number of URLs so we need to be able to redirect the browser to the originating URL in the event of a page timeout etc...

    In case others have similar requirements, this was accomplished by creating the iRule below and referencing in the custom variable in the various page "a href" tags (e.g. "click here" link shown above).

    when ACCESS_SESSION_STARTED {
        need to set a custom variable using the orig referer URL so we can_
        modify any links i.e. modal dialogue & point them back to the SP._
        This will be used by referencing the custom var as follows._
        within the html tags for "a href" put "%{session.custom.myvar}"
    
       ACCESS::session data set session.custom.myvar [HTTP::header value Referer]
    }
    
    • dradiant_306130's avatar
      dradiant_306130
      Icon for Nimbostratus rankNimbostratus

      Hey JD 02!

       

      We are running into the same issue with the "Start a new session" link sending users back to our APM portal (instead of the original SP website users originally went to).

       

      Just trying to understand what your final workaround was... Was it the iRule you stated above along with the "a href" listed in the logout.inc advanced customization page?

       

      Any further info would be awesome.

       

      Thanks