apache / openwhisk

Apache OpenWhisk is an open source serverless cloud platform
https://openwhisk.apache.org/
Apache License 2.0
6.54k stars 1.17k forks source link

OpenWhisk API - Cookie Domain Wrong? #1422

Closed jthomas closed 8 years ago

jthomas commented 8 years ago

Environment details:

OpenWhisk on IBM Bluemix (US-South).

Steps to reproduce the issue:

Using the Apache HTTP Client to talk to the platform API, I noticed this line in the logs....

[WARN ][org.apache.http.client.protocol.ResponseProcessCookies] Cookie rejected [DPJSESSIONID="PBC5YS:1376290542", version:0, domain:whisk.ng.bluemix.net, path:/, expiry:null] Illegal 'domain' attribute "whisk.ng.bluemix.net". Domain of origin: "openwhisk.ng.bluemix.net"

Looking at the HTTP response headers to a sample request, the cookie returned has a domain that does not match the request domain.

$ http get "https://openwhisk.ng.bluemix.net/api/v1/namespaces/james.thomas@uk.ibm.com_dev/actions?limit=30&skip=0" --auth="xxx:yyy"
HTTP/1.1 200 OK
Access-Control-Allow-Headers: Authorization, Content-Type
Access-Control-Allow-Origin: *
Connection: Keep-Alive
Content-Type: application/json; charset=UTF-8
Date: Fri, 21 Oct 2016 09:10:09 GMT
Server: nginx/1.11.1
Set-Cookie: DPJSESSIONID=PBC5YS:1376290542; Path=/; Domain=.whisk.ng.bluemix.net
Transfer-Encoding: chunked
X-Backside-Transport: OK OK
X-Global-Transaction-ID: 3486006201

...

*The Domain attribute matches .whisk.ng.bluemix. We sent the request to openwhisk.ng.bluemix.net**

Is this a bug?

markusthoemmes commented 8 years ago

Closing as not open-source related.

retinaburn commented 6 years ago

@jthomas did you find a solution to this?

Sorry to bother you, I found the issue by reviewing the response content. I had missed part of the URL. The logging of the bad cookie was also seen, but was unrelated.