Forum Discussion

_XRoss_99580's avatar
_XRoss_99580
Icon for Nimbostratus rankNimbostratus
Mar 07, 2011

PeopleSoft test and dev domains

I am trying to solve a PeopleSoft problem with an iRule within the F5. I have two domains behind the load balancer. test.domain.com and dev.domain.com at the PeopleSoft application they are defined as domain.com

 

 

The problem is that the cookies from test are valid for development. What I would like to do is have an iRule that checks the browser for a cookie that I have added, and if both test and prod are there remove the login cookies so the user has to login again.

 

 

So far I have been able to add the cookie, and detect when a user has been to both domains, however the http:cookie remove function does not seem to work as I expected. I have some logging to check that the rule is working as I expected. I just do not understand why the iRule does not remove the cookies?

 

 

Cookie Remove Rule

 

when HTTP_REQUEST {

 

set dual_domain 0

 

log local0. "Request "

 

log local0. "client_addr [IP::client_addr]"

 

log local0. "Cookie $dual_domain"

 

Check if cookie exists

 

if { [HTTP::cookie exists "test.domain.com"] && [HTTP::cookie exists "dev.domain.com"]}{

 

set dual_domain 1

 

log local0. "Cookie $dual_domain"

 

} }

 

 

when HTTP_RESPONSE {

 

if { $dual_domain == 1 }{

 

Remove the cookies :)

 

log local0. "Response "

 

log local0. "Cookie $dual_domain"

 

HTTP::cookie remove "PS_TOKEN"

 

HTTP::cookie remove "PS_TOKENEXPIRE"

 

HTTP::cookie remove "PS_LOGINLIST"

 

log local0. "Cookies gone :)"

 

} }

2 Replies

  • If you're using the remove command from the response event, it'll only keep cookies sent by the pool members from getting to the client. If the client already has the cookie, using the remove command won't do anything.

     

  • Posted By Chris Miller on 03/06/2011 09:22 PM

     

    If you're using the remove command from the response event, it'll only keep cookies sent by the pool members from getting to the client. If the client already has the cookie, using the remove command won't do anything.

     

     

     

    I had a suspicion this maybe the problem. Can I expire the session cookies?