Forum Discussion

eric_156978's avatar
Jul 27, 2017
Solved

F5 APM redirect back to app on end of session

Hi F5 wizards,

 

I have an F5 version 12 with APM handling access to applications based on the uri:

 

For example:

 

  • -> myapp1 server
  • -> myapp2 server
  • -> nothing useful

When a user's APM expires or ends in the middle of a user's session, the APM session will restart but kick them back to the "/" level instead of the "/myappX" they were working in. This obviously causes confusion and isn't a seamless experience.

 

Order of operations:

 

  1. User connects to
  2. APM session starts, user uses the awesome application
  3. User walks away for lunch, comes back, clicks a link, and the APM is expired
  4. They are redirected to the F5 "your session has ended, click here to start a new one"
  5. They go through the APM process again, this time, it takes them to
  6. They call me and complain about why they are not taken back to where they were or where they started :)

A few things i've considered/learned:

 

  • I know I could but a generic "Sorry you're in the wrong spot" page on , but we have so many apps this doesn't flow well.
  • The end of session APM irule events won't let me redirect anywhere (i assume its because its asynchronous), so I can't really reach back to the landing uri variable
  • I could tear apart the F5 APM steps and try to inject cookies and all that to capture the "first page", but i've found that to be cumbersome and step all over the APM flow.

Has anyone dealt with this or come up with a nice way to send users back to where they were on the end of an APM session?

 

As always, I appreciate the conversation!

 

  • What you call the "first page" is called the landing uri and it is stored in a session variable called session.server.landinguri. So all you need to do is customize the session timeout page so that the link points to this session variable instead of the generic '/' base page.

     

4 Replies

  • Josiah_39459's avatar
    Josiah_39459
    Historic F5 Account

    What you call the "first page" is called the landing uri and it is stored in a session variable called session.server.landinguri. So all you need to do is customize the session timeout page so that the link points to this session variable instead of the generic '/' base page.

     

    • eric_156978's avatar
      eric_156978
      Icon for Cirrus rankCirrus

      Well that was easy. Good to go and seems to be flowing nicely, ty!

       

    • srir's avatar
      srir
      Icon for Nimbostratus rankNimbostratus

      Experts,

      Need help with OIDC F5 setup 

      apm inactivity timeout = 15min. Once inactivity is reached redirecting to F5 'vdesk/hangup' page.

      Expectation - Once inactivity is reached must redirect to idp login page.

      Any iRule snippet you can include, would be great to achieve above expectation.

      Any inputs, appreciated.