Re: [hybi] WebSocket, TLS and intermediaries

Patrick McManus <mcmanus@ducksong.com> Sat, 31 July 2010 16:07 UTC

Return-Path: <mcmanus@ducksong.com>
X-Original-To: hybi@core3.amsl.com
Delivered-To: hybi@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id E50E23A69EE for <hybi@core3.amsl.com>; Sat, 31 Jul 2010 09:07:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.351
X-Spam-Level:
X-Spam-Status: No, score=-2.351 tagged_above=-999 required=5 tests=[AWL=0.248, BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pNXOj0uV-CSj for <hybi@core3.amsl.com>; Sat, 31 Jul 2010 09:07:12 -0700 (PDT)
Received: from linode.ducksong.com (linode.ducksong.com [64.22.125.164]) by core3.amsl.com (Postfix) with ESMTP id D0EB33A69DF for <hybi@ietf.org>; Sat, 31 Jul 2010 09:07:12 -0700 (PDT)
Received: by linode.ducksong.com (Postfix, from userid 1000) id 8A386102A5; Sat, 31 Jul 2010 12:07:38 -0400 (EDT)
Received: from [192.168.16.214] (cpe-67-253-92-25.maine.res.rr.com [67.253.92.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by linode.ducksong.com (Postfix) with ESMTPSA id 662C51014F for <hybi@ietf.org>; Sat, 31 Jul 2010 12:07:36 -0400 (EDT)
From: Patrick McManus <mcmanus@ducksong.com>
To: Hybi <hybi@ietf.org>
In-Reply-To: <AANLkTinWTqRD9na7EgkSqOzp6S7XEWSjy6JaK3oq35=S@mail.gmail.com>
References: <4BC860FD.8080007@webtide.com> <Pine.LNX.4.64.1004161952530.751@ps20323.dreamhostps.com> <35EFEA5E-9017-48A1-BB66-A0AF947E159F@d2dx.com> <AANLkTinihlL2sn3Kiwtcl7QYKhFlvmj9lvmH4_z02xF7@mail.gmail.com> <FC1F510E-6D48-4D75-A356-F455C9FD5BD8@apple.com> <4C468EAE.4050507@gmx.de> <02BB0E0C-133B-4733-B053-A9D6E870F199@apple.com> <Pine.LNX.4.64.1007212245020.7242@ps20323.dreamhostps.com> <AANLkTinB_6BSY5wil2JRCweETIrG0iwH67i6-4_xR2d9@mail.gmail.com> <AANLkTiko9e2_xKLpgPlUSVBvRVY37aPmUrAagmeQsY1Q@mail.gmail.com> <20100722001112.GC7174@1wt.eu> <AANLkTinWTqRD9na7EgkSqOzp6S7XEWSjy6JaK3oq35=S@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"
Date: Sat, 31 Jul 2010 12:08:26 -0400
Message-ID: <1280592506.24989.1497.camel@tng>
Mime-Version: 1.0
X-Mailer: Evolution 2.28.3
Content-Transfer-Encoding: 7bit
Subject: Re: [hybi] WebSocket, TLS and intermediaries
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/hybi>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 31 Jul 2010 16:07:14 -0000

On Wed, 2010-07-21 at 22:09 -0700, Roberto Peon wrote:
>  +1

> On Wed, Jul 21, 2010 at 5:11 PM, Willy Tarreau <w@1wt.eu> wrote

>         > Instead we need to establish the semantic context in which a
>         websocket
>         > connection can be established, and then allow multiple ways
>         to establish
>         > that context.   HTTP upgrade is one such way, TLS/NPN is
>         another.

>         +1 !


+1 for me as well.

More specifically, I think the web sockets specification should define
the unique web socket protocol (shocking!). That protocol should NOT
bear a sometimes-it-is-convenient-to-look-like-http-without-being-http
look. Not being HTTP, that is just asking for confusion. It should of
course do the security checking that the list has been discussing.

If clients and servers would like to use that protocol directly - that
would be terrific and I doubt anyone here would be upset about that.

If clients and servers need to tunnel over HTTP in order to use
websockets, then use one of the established mechanisms for doing that
(e.g. Upgrade). It is fine to include a section in the websocket
specification on "upgrading to websockets over http" with implementation
advice, but that should be its scope. 

The notion of the WG endorsing a specification that sends
non-compliant-HTTP to HTTP ports is non sensical for the IETF. My
personal interpretation of the mailing list archive says that their is
consensus on that. I would hope that browser vendors would choose not to
ship such a scheme in anything except an experimental fashion.

It does cost 1 RTT to do an HTTP upgrade safely before allowing any
websocket or user supplied data to hit the wire. That is not a property
of websockets - that is a property of HTTP. Consider it the cost of
doing business if you would like to piggyback on http's port. honestly,
for the value of getting access to port 80 real estate - its a pretty
cheap price! If you use a different port then it can be avoided - the
cost and benefit are clearly defined.

personally, I'm not all that concerned about the 1st event latency for
websocket use cases. If they are no-wait instantaneous
events/status-dumps then they are well suited to http instead of
websockets. The latency of each additional event while the page is in
operation is much more important and is the websocket sweet spot. I
think this point of view is even more defensible if we include
multiplexing from day 1 - that will severely reduce the number of
handshakes.