For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Bryce_Halkerst1's avatar
Bryce_Halkerst1
Icon for Nimbostratus rankNimbostratus
May 23, 2014

HTTP Domain Cookie not working on new 11.3 version

All, I upgraded our F5 LTM's from 9.x to 11.3. Had an existing irule to set cookie domain, but it doesn't seem to be working. Is my syntax correct for 11.3? I knew about changing the data groups by removing $:: Thanks, Bryce

 

when LB_SELECTED { get the pool name used for this request log local0. "my_pool is [LB::server pool]" set my_pool [LB::server pool] } when HTTP_RESPONSE {

 

Check if the persistence cookie exists in the response if {[HTTP::cookie exists "BIGipServer$my_pool"]} { set the domain attribute on the persistence cookie HTTP::cookie domain "BIGipServer$my_pool" ".foo.com" if {[HTTP::cookie exists "JSESSIONID"]} { HTTP::cookie domain "JSESSIONID" ".foo.com" } } }

 

2 Replies

  • Your iRule is good. On a v11 system with partitions, the [LB::server pool] command will return the partition and pool.

    /Common/local-pool
    

    You just need to make a minor change:

    when LB_SELECTED { 
         get the pool name used for this request   
        set my_pool [string map {"/Common/" ""} [LB::server pool]]
        log local0. "my_pool $my_pool" 
    } 
    when HTTP_RESPONSE {
         Check if the persistence cookie exists in the response 
        if { [HTTP::cookie exists "BIGipServer$my_pool"] } { 
             set the domain attribute on the persistence cookie
            HTTP::cookie domain "BIGipServer$my_pool" "foo.com" 
        }   
        if { [HTTP::cookie exists "JSESSIONID"] } {
            HTTP::cookie domain "JSESSIONID" "foo.com" 
        }    
    }