Forum Discussion

boneyard's avatar
Dec 10, 2013

APM different new session URL

one of these things which has bothered me for a while now. im using different landing URI for different routes through the access policy. but once the user logs off they all end up in the same screen which always shows a link to start a new session on https://hostname.domain.com/, so without a landing URI. then once someone clicks the link they can't add the correct URI as you then get the existing session error: Access policy evaluation is already in progress for your current session (with another URL which i cant seem to set).

 

anyone found a way around this?

 

7 Replies

  • unfortunately, got that from F5.. couple of weeks ago (v11.4 HF-4). "The behaviour is by design and it is not possible for BIGIP to remember the landing URI, or dynamically generate the URI.". Haven't placed a RFE.

     

  • well for that ending page i was able to just put a bunch on links on there, not that great, be workable.

     

    still fighting with the "Access policy evaluation is already in progress for your current session" page. i seem unable to get it to link me to another location, only / appears to work.

     

  • How are you setting the landing URI? Just a thought here, but if you set the session.server.landinguri session variable as part of the policy evaluation, the user should always return to that URI when starting a new session.

     

  • that is correct kevin, i found that out. my situation is more like this

     

    user goes to / but realizes he made a mistake and needs to go to /uri1, that isn't possible within the same session. as the landing.uri is / then it also isn't possible to go to /uri1 to start a new session from the error page i believe. as posted in another question i solved this with an iRule which removes the session if there is an active one and /uri1 is called.

     

  • Hi, I'm new with the BigIp product and I faced the same problem. Once you log out, you cannot use the new session url. I just created an iRule for this which uses a cookie to remember the URI you visited. So when you click the new session link you end up in the root of the website. The iRule reads the URI in the cookie and redirects you to your previous URI. Is this what you are looking for? It has a minor flaw. The first time you visit the page and there's no cookie present, you have to reload the page.

     

  • Here's my solution. Be gentle. I'm new here ;-) Any sugegstions for improvement are welcome. Setting the cookie via an irule event in the apm policy would be nice, as well as setting the expiration to a long time.

    when HTTP_REQUEST {
        set static::orig_uri [HTTP::uri]
        set static::cookie_name "LandingURI"
        set req [HTTP::request]
        set reload_page {
            
            
            Cookie set for future use.
            
            
            
        }
    
        switch [HTTP::path] {
            "/" {
                if { [HTTP::cookie exists $static::cookie_name] } {
                    log local0. "No URI given, Found cookie. Send Redirect."
                    set cookie_value [HTTP::cookie value $static::cookie_name]
                    HTTP::redirect "http://$cookie_value"
                }
                else {
                    log local0. "No URI given, no cookie found."
                 }
            }
            "/Specific" {
                if {!( [HTTP::cookie exists $static::cookie_name] )} {
                    log local0. "URI /Specific given, Set cookie."
                    set cookie [format "%s=%s; path=/; domain=%s" $static::cookie_name $static::orig_uri "."]
                    HTTP::respond 200 content $reload_page "Set-Cookie" $cookie
                }
            }
            default {
                if { [HTTP::cookie exists $static::cookie_name] } {
                    log local0. "Non-existing URI given, found cookie. Send Redirect."
                    set cookie_value [HTTP::cookie value $static::cookie_name]
                    HTTP::redirect "http://$cookie_value"
                }
                else {
                    log local0. "Non-existing URI given, no cookie found."
                 }
            }
        }
    }
    
  • I have opened an RFE on this topic:

     

    PD is using RFE ID439965 to investigate handling session creation from multiple browser tabs.

     

    Unfortunately implementing this enhancement will require a major change in the APM code, so it will likely be awhile before they can implement the feature. If you have any further questions regarding this Enhancement, please contact your F5 Account Manager and reference the RFE ID. They can then also contact PD regarding this feature, and increase the visibility and the urgency of implementation.