Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id F0361200D18 for ; Wed, 11 Oct 2017 23:06:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id EEFB11609E5; Wed, 11 Oct 2017 21:06:08 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 435631609BB for ; Wed, 11 Oct 2017 23:06:08 +0200 (CEST) Received: (qmail 26367 invoked by uid 500); 11 Oct 2017 21:06:07 -0000 Mailing-List: contact dev-help@knox.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@knox.apache.org Delivered-To: mailing list dev@knox.apache.org Received: (qmail 26356 invoked by uid 99); 11 Oct 2017 21:06:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Oct 2017 21:06:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 74EA1D35D6 for ; Wed, 11 Oct 2017 21:06:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -97.2 X-Spam-Level: X-Spam-Status: No, score=-97.2 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_BADIPHTTP=2, NORMAL_HTTP_TO_IP=0.001, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100, WEIRD_PORT=0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id KJvqWLpzJYE6 for ; Wed, 11 Oct 2017 21:06:05 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 6EA1660DA8 for ; Wed, 11 Oct 2017 21:06:05 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id DEBC4E095A for ; Wed, 11 Oct 2017 21:06:03 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 6EFF725397 for ; Wed, 11 Oct 2017 21:06:02 +0000 (UTC) Date: Wed, 11 Oct 2017 21:06:02 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: dev@knox.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (KNOX-895) pass cookies to websocket backend MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 11 Oct 2017 21:06:09 -0000 [ https://issues.apache.org/jira/browse/KNOX-895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16200961#comment-16200961 ] ASF subversion and git services commented on KNOX-895: ------------------------------------------------------ Commit 2d236e78b70ef7fb312ebf0fa198657595e2f4ba in knox's branch refs/heads/master from [~moresandeep] [ https://git-wip-us.apache.org/repos/asf?p=knox.git;h=2d236e7 ] KNOX-895 - Pass Headers and Cookies to websocket backend > 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)