Forum Discussion
mr_skater99_640
Nimbostratus
Mar 03, 2010Stripping Cookies
We have an off the shelf product that sets to many cookies and cookies on all domains configured in the product (these aren't needed). We're trying to tidy some of this up and we've got some of it wo...
mr_skater99_640
Nimbostratus
Mar 24, 2010Hey Hoolio,
Thanks very much for your reply - i had to wait until we got a Virtual BigIp up before i could do any real testing...
This is the rule i put in:
when HTTP_RESPONSE {
if { [HTTP::header "server"] equals "daui" } {
foreach aCookie [HTTP::cookie names] {
if {[string tolower $aCookie] equals "amlbcookie"} {
HTTP::cookie remove $aCookie
} elseif {[HTTP::cookie domain $aCookie] contains ".exttest.lab"} {
HTTP::cookie remove $aCookie
} elseif {[HTTP::cookie domain $aCookie] contains ".xint.xcorp.xsun"} {
HTTP::cookie remove $aCookie
}
}
}
}
Here's what the logs show:
Wed Mar 24 13:43:59 EST 2010 local/tmm info tmm[2595] Rule aimtest-uri_Irule : Checking cookies: JSESSIONID amlbcookie amlbcookie amlbcookie amlbcookie AMDistAuthCookie AMDistAuthCookie AMDistAuthCookie AMDistAuthCookie amlbcookie amlbcookie amlbcookie amlbcookie BIGipServerpool-amdaui
Wed Mar 24 13:43:59 EST 2010 local/tmm info tmm[2595] Rule aimtest-uri_Irule : Checking cookie: JSESSIONID, with domain:
Wed Mar 24 13:43:59 EST 2010 local/tmm info tmm[2595] Rule aimtest-uri_Irule : Checking cookie: amlbcookie, with domain: .gio.com.au
Wed Mar 24 13:43:59 EST 2010 local/tmm info tmm[2595] Rule aimtest-uri_Irule : Removing cookie: amlbcookie in name check
Wed Mar 24 13:43:59 EST 2010 local/tmm info tmm[2595] Rule aimtest-uri_Irule : Checking cookie: amlbcookie, with domain: .exttest.lab
Wed Mar 24 13:43:59 EST 2010 local/tmm info tmm[2595] Rule aimtest-uri_Irule : Removing cookie: amlbcookie in name check
Wed Mar 24 13:43:59 EST 2010 local/tmm info tmm[2595] Rule aimtest-uri_Irule : Checking cookie: amlbcookie, with domain: .vero.apps.anznb.co.nz
Wed Mar 24 13:43:59 EST 2010 local/tmm info tmm[2595] Rule aimtest-uri_Irule : Removing cookie: amlbcookie in name check
Wed Mar 24 13:43:59 EST 2010 local/tmm info tmm[2595] Rule aimtest-uri_Irule : Checking cookie: amlbcookie, with domain: .xint.xcorp.xsun
Wed Mar 24 13:43:59 EST 2010 local/tmm info tmm[2595] Rule aimtest-uri_Irule : Removing cookie: amlbcookie in name check
Wed Mar 24 13:43:59 EST 2010 local/tmm info tmm[2595] Rule aimtest-uri_Irule : Checking cookie: AMDistAuthCookie, with domain: .gio.com.au
Wed Mar 24 13:43:59 EST 2010 local/tmm info tmm[2595] Rule aimtest-uri_Irule : Checking cookie: AMDistAuthCookie, with domain: .gio.com.au
Wed Mar 24 13:43:59 EST 2010 local/tmm info tmm[2595] Rule aimtest-uri_Irule : Checking cookie: AMDistAuthCookie, with domain: .gio.com.au
Wed Mar 24 13:43:59 EST 2010 local/tmm info tmm[2595] Rule aimtest-uri_Irule : Checking cookie: AMDistAuthCookie, with domain: .gio.com.au
Wed Mar 24 13:43:59 EST 2010 local/tmm info tmm[2595] Rule aimtest-uri_Irule : Checking cookie: amlbcookie, with domain: .gio.com.au
Wed Mar 24 13:43:59 EST 2010 local/tmm info tmm[2595] Rule aimtest-uri_Irule : Removing cookie: amlbcookie in name check
Wed Mar 24 13:43:59 EST 2010 local/tmm info tmm[2595] Rule aimtest-uri_Irule : Checking cookie: amlbcookie, with domain: .exttest.lab
Wed Mar 24 13:43:59 EST 2010 local/tmm info tmm[2595] Rule aimtest-uri_Irule : Removing cookie: amlbcookie in name check
Wed Mar 24 13:43:59 EST 2010 local/tmm info tmm[2595] Rule aimtest-uri_Irule : Checking cookie: amlbcookie, with domain: .vero.apps.anznb.co.nz
Wed Mar 24 13:43:59 EST 2010 local/tmm info tmm[2595] Rule aimtest-uri_Irule : Removing cookie: amlbcookie in name check
Wed Mar 24 13:43:59 EST 2010 local/tmm info tmm[2595] Rule aimtest-uri_Irule : Checking cookie: amlbcookie, with domain: .xint.xcorp.xsun
Wed Mar 24 13:43:59 EST 2010 local/tmm info tmm[2595] Rule aimtest-uri_Irule : Removing cookie: amlbcookie in name check
Wed Mar 24 13:43:59 EST 2010 local/tmm info tmm[2595] Rule aimtest-uri_Irule : Checking cookie: BIGipServerpool-amdaui, with domain:
Wed Mar 24 13:43:59 EST 2010 local/tmm info tmm[2595] Rule aimtest-uri_Irule : Checking cookies:
Wed Mar 24 13:44:01 EST 2010 local/tmm info tmm[2595] Rule aimtest-uri_Irule : Checking cookies:
So the amlbcookie dissappears no worries - the problem is this;
The F5 shows 4 AMDistAuthCookie's with the domain as .gio.com.au and so doesn;t drop them, yet in the browser i see:
Set-CookieAMDistAuthCookie=http://samru3.exttest.lab:80/distAuth/UI/Login; Domain=.gio.com.au; Path=/
Set-CookieAMDistAuthCookie=http://samru3.exttest.lab:80/distAuth/UI/Login; Domain=.exttest.lab; Path=/
Set-CookieAMDistAuthCookie=http://samru3.exttest.lab:80/distAuth/UI/Login; Domain=.vero.apps.anznb.co.nz; Path=/
Set-CookieAMDistAuthCookie=http://samru3.exttest.lab:80/distAuth/UI/Login; Domain=.xint.xcorp.xsun; Path=/
Any ideas????
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects