[ https://issues.apache.org/jira/browse/KNOX-895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sandeep More resolved KNOX-895. ------------------------------- Resolution: Fixed > pass cookies to websocket backend > --------------------------------- > > Key: KNOX-895 > URL: https://issues.apache.org/jira/browse/KNOX-895 > Project: Apache Knox > Issue Type: Improvement > Components: Server > Affects Versions: 0.11.0 > Reporter: Zhou Li > Assignee: Sandeep More > Fix For: 0.14.0 > > Attachments: KNOX-895.001.patch, KNOX-895.002.patch, > KNOX-895.003.patch > > > As a websocket user, I have a webapp which using both websocket and rest api, > I want to keep the authentication across websocket and rest api by using > session cookies. > I noticed in my browser, when I connect to websocket, the request does > include cookies, see the request information as below: > Request > URL:wss://9.30.109.105:8443/gateway/default/message-service/messages/topic?name=sqlEditor > Request Method:GET > Status Code:101 Switching Protocols > Response Headers > view source > Connection:Upgrade > Date:Mon, 27 Feb 2017 02:11:29 GMT > Sec-WebSocket-Accept:KPpUPgOW3IZT9M9KlxRAn7JVBYQ= > Upgrade:WebSocket > Request Headers > view source > Accept-Encoding:gzip, deflate, sdch, br > Accept-Language:zh-CN,zh;q=0.8 > Authorization:Basic YWRtaW46YWRtaW4tcGFzc3dvcmQ= > Cache-Control:no-cache > Connection:Upgrade > Cookie:JSESSIONID=1balehb45f8z91drorxev1om1d > Host:9.30.109.105:8443 > Origin:https://9.30.109.105:8443 > Pragma:no-cache > Sec-WebSocket-Extensions:permessage-deflate; client_max_window_bits > Sec-WebSocket-Key:gUYyWYAMCa6JbnJ4jNiVhA== > Sec-WebSocket-Version:13 > Upgrade:websocket > User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, > like Gecko) Chrome/55.0.2883.87 Safari/537.36 > But after knox connect to my backend, I didn't see the cookies from browser, > here is my log: > Handshake headers=====================>Map(Cache-Control -> [no-cache], > Connection -> [Upgrade], Host -> [localhost:11080], Pragma -> [no-cache], > Sec-WebSocket-Key -> [kFoKOoeX09xaIUqOL+xykA==], Sec-WebSocket-Version -> > [13], Upgrade -> [websocket]) > Could knox add support for passing cookies or maybe some headers to backend > webscocket upgrade request? -- This message was sent by Atlassian JIRA (v6.4.14#64029)