Forum Discussion

InnO's avatar
InnO
Icon for Nimbostratus rankNimbostratus
Dec 03, 2015

APM - Reuse existing current session

Hi,

 

I have a VIP configured with an APM policy for authentication with an initial login form. There are multiple host names to access this VIP, all with the same domain name. Whenever I am accessing the VIP with a different hostname, a new APM session is created and the policy runs from the start again.

 

I want to reuse the existing current session whenever I access it with https://myhost01.mycompany.com or https://myhost02.mycompany.com

 

I am certainly missing something in the config but cannot put my finger on it.

 

Any help would be much appreciated :)

 

I am running 11.6 HF4.

 

Thanks,

 

Pascal.

 

2 Replies

  • Hi,

    you have multiple solutions:

    • In the Access Profile SSO Domain tab, define the cookie domain with company.com (it will send the domain=company.com property in the session cookie. the browser will send the cookie for every websites in the domain company.com)
    • In the Access Profile SSO Domain tab, Select Multiple domain cookie and define every hosts which may share the same cookie.
    • If you can define a value defining the user (cookie inserted by the server, ip address, hash of the user-agent and IP...) you can change the session uuid variable to this value and search it in every following request..

    the following irule is an example from active sync irule provided by F5.

    when HTTP_REQUEST {
        set user_key "something found in the request"
        set apm_cookie_list [ ACCESS::user getsid $user_key ]
        if { [ llength $apm_cookie_list ] != 0 } {
        set apm_cookie [ ACCESS::user getkey [ lindex $apm_cookie_list 0 ] ]
        if { $apm_cookie != "" } {
                HTTP::cookie insert name MRHSession value $apm_cookie
            }
        }
     }
    
    when ACCESS_SESSION_STARTED {
        set user_key "something found in the request"
        if { [ info exists user_key ] } { ACCESS::session data set "session.user.uuid" $user_key }
    }
    
  • InnO's avatar
    InnO
    Icon for Nimbostratus rankNimbostratus

    Thanks Stanislas,

     

    Configuring the domain cookie was the missing option, and it was right in front of me :)

     

    You did my day,

     

    Have a good one, Pascal.