Pinned topic How to do Cookie translation and Cookie persistence feature in DataPower?
Re: How to do Cookie translation and Cookie persistence feature in DataPower?2013-04-22T15:04:33Z in response to Rubita
DataPower is used as Reverse Proxy in our architecture. The cookie which is generated at the backend server is based on domain my.test.ibm should be translated to the cookie expected by the mobile application (which is in domain my.CommB.test.com). Can this be solved by AO (Application Optimization) feature which has the ILD feature to support session affinity. It monitors the backend server cookie and inserts a cookie based on a domain and path.
Would like to know can this be done programmatically as we don't have the AO license. Any thought on this?
Rubita SwainUpdated on 2013-04-22T15:04:49Z at 2013-04-22T15:04:49Z by Rubita
kenhygh 120000PD1B1427 PostsACCEPTED ANSWER
Re: How to do Cookie translation and Cookie persistence feature in DataPower?2013-04-22T15:29:49Z in response to Rubita
The backend generates a cookie and you want to change it? A cookie is just a header, you can do whatever you want to it with the extension elements & functions.
Re: How to do Cookie translation and Cookie persistence feature in DataPower?2013-04-23T05:20:49Z in response to kenhygh
I am aware of the DP extension function to set cookie and also append cookie value. But not sure how to generate a cookie based on a given domain name & path. Is there any DP extension function to do that. Since AO feature supports this, it can be do able but may be the DP extension function is not exposed.
Any help on this will be highly appreciated.
Rubita SwainUpdated on 2013-04-23T05:21:03Z at 2013-04-23T05:21:03Z by Rubita
tjsmith 110000KXYF5 PostsACCEPTED ANSWER
Re: How to do Cookie translation and Cookie persistence feature in DataPower?2013-04-23T12:10:58Z in response to Rubita
The AO feature supports 'active' and 'active-conditional' session affinity support. For 'active-conditional', DataPower monitors the "Set-Cookie" on the response from the back end. It compares the Set-Cookie to a list of monitored cookies. If it finds a match, then it inserts its own Set-Cookie with the configured cookie name, domain and path. Note that it does not look at all at the existing domain and path associated with the cookie from the back end. It only looks at the cookie name for comparison to find a match.
There is no programming interface to access the session-affinity capabilities whether or not you have the AO features installed.
If you do need to translate the cookie based on domain and path, I think Ken's suggestion is correct. You would need to pull the header and overwrite it.
Re: How to do Cookie translation and Cookie persistence feature in DataPower?2013-04-29T10:08:20Z in response to tjsmith
Thanks for all your response. We are able to do Cookie translation using dp extension functions and setting it in HTTP Set-Cookie header. We are not persisting the cookie in DP, just appending both backend and DP generated cookie in the HTTP response message.