Re: [hybi] WebSocket, TLS and intermediaries

Mike Belshe <mike@belshe.com> Wed, 21 July 2010 23:42 UTC

Return-Path: <mike@belshe.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 D98383A687C for <hybi@core3.amsl.com>; Wed, 21 Jul 2010 16:42:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.976
X-Spam-Level:
X-Spam-Status: No, score=-1.976 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001]
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 GLrhoxH71BTc for <hybi@core3.amsl.com>; Wed, 21 Jul 2010 16:42:33 -0700 (PDT)
Received: from mail-px0-f172.google.com (mail-px0-f172.google.com [209.85.212.172]) by core3.amsl.com (Postfix) with ESMTP id B5DB93A685B for <hybi@ietf.org>; Wed, 21 Jul 2010 16:42:31 -0700 (PDT)
Received: by pxi20 with SMTP id 20so4196747pxi.31 for <hybi@ietf.org>; Wed, 21 Jul 2010 16:42:48 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.142.211.5 with SMTP id j5mr1168718wfg.155.1279755768043; Wed, 21 Jul 2010 16:42:48 -0700 (PDT)
Received: by 10.142.75.9 with HTTP; Wed, 21 Jul 2010 16:42:47 -0700 (PDT)
In-Reply-To: <Pine.LNX.4.64.1007212245020.7242@ps20323.dreamhostps.com>
References: <h2w5c902b9e1004152345j992b815bz5f8d38f06a19181a@mail.gmail.com> <Pine.LNX.4.64.1004160701250.751@ps20323.dreamhostps.com> <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>
Date: Wed, 21 Jul 2010 16:42:47 -0700
Message-ID: <AANLkTinB_6BSY5wil2JRCweETIrG0iwH67i6-4_xR2d9@mail.gmail.com>
From: Mike Belshe <mike@belshe.com>
To: Ian Hickson <ian@hixie.ch>
Content-Type: multipart/alternative; boundary="000e0cd22e2af4197b048bee5b97"
Cc: Hybi <hybi@ietf.org>
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: Wed, 21 Jul 2010 23:42:35 -0000

On the TLS issue, we're going in circles.  Both sides are correct on the
facts about the pros and cons of TLS (more or less).  I don't think the spec
should require TLS.  But, would it be possible to define alternate
handshakes based on whether TLS is used?

If we use the currently defined handshake, TLS will be at a performance
disadvantage to insecure WebSockets, because TLS will require more
round-trips.

Could we define, as part of the WebSocket protocol, that when WebSocket is
negotiated over TLS it uses the TLS/NPN extension to effectively fold the
WebSocket Upgrade handshake into the TLS handshake?  This removes a round
trip from the WebSocket startup time.  The next-protocol-negotiation
extension is defined here:
http://tools.ietf.org/html/draft-agl-tls-nextprotoneg-00

If we don't do this, websites in the future will be discouraged from using
secure websockets because secure websockets will be slower than insecure
ones.  By contrast, with the improvements in TLS (if they come to fruition),
if WebSockets defines a mechanism for hanshaking over TLS/NPN, WebSockets
over TLS will negotiate with fewer round trips than WebSockets over HTTP.
 Hopefully this will encourage more use of the secure facility, without
making it a requirement for those that really don't want it.
<http://tools.ietf.org/html/draft-agl-tls-nextprotoneg-00>
Mike

On Wed, Jul 21, 2010 at 3:47 PM, Ian Hickson <ian@hixie.ch> wrote:

> On Wed, 21 Jul 2010, Maciej Stachowiak wrote:
> >
> > In my opinion, to the extent we support intermediaries, the design
> > should require at least one of the client or server to be explicitly
> > aware of the intermediary.
>
> Agreed. I think we should add this to the requirements.
>
>
> > We should not support magical transparent intermediaries where neither
> > the client nor server has an obvious way to detect its existence; in
> > fact we should design the protocol to prevent such intermediaries from
> > being created.
>
> The only way I can see to do this would be to require TLS (or some
> equivalent asymmetric encryption scheme), which I think is too high a
> cost. Otherwise, in principle, I agree with this too.
>
> --
> Ian Hickson               U+1047E                )\._.,--....,'``.    fL
> http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
> Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>