Terje_Gravvold
Mar 29, 2012Nimbostratus
HTTP::cookie - How can I handle cookies with duplicate names but diffrent domain value?
I'm trying to set HttpOnly value for a given cookie name/domain combination (BigIP v9.4). The backend servers (OpenSSO) creates a authentication cookie that does not have this value set.
My problem is that OpenSSO sends out one cookie for each configured domain with the same cookie name but diffrent domain value. I've created an iRule to set the HttpOnly value for a given cookie name, but it does not work with duplicate cookie names. With duplicate cookie names the command seem to give back only the first match.
It seems like the HTTP::cookie value command is missing a domain parameter... Any logic leeding to setting the HttpOnly value for all cookies with name iPlanetDirectoryPro or a specific iPlanetDirectoryPro cookie would be acceptable.
iRule:
when HTTP_RESPONSE {
set OPENSSO_COOKIE [HTTP::cookie value iPlanetDirectoryPro]
if { $OPENSSO_COOKIE ne "" } {
log local0. "Detected OpenSSO iPlanetDirectoryPro cookie with value $OPENSSO_
COOKIE"
log local0. "Secure parameter for OpenSSO iPlanetDirectoryPro cookie is [HTTP
::cookie secure iPlanetDirectoryPro]"
HTTP::cookie value iPlanetDirectoryPro "$OPENSSO_COOKIE; HttpOnly"
log local0. "Setting new value for OpenSSO iPlanetDirectoryPro cookie, new va
lue is [HTTP::cookie value iPlanetDirectoryPro]"
}
}
I'm thankfull for any help regarding this issue.
Best regards
Terje Gravvold