Re: [hybi] WebSocket, TLS and intermediaries

Willy Tarreau <w@1wt.eu> Thu, 22 July 2010 00:10 UTC

Return-Path: <w@1wt.eu>
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 5670F3A6B2C for <hybi@core3.amsl.com>; Wed, 21 Jul 2010 17:10:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.408
X-Spam-Level:
X-Spam-Status: No, score=-3.408 tagged_above=-999 required=5 tests=[AWL=-1.365, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 4-XGA5Q5Opgi for <hybi@core3.amsl.com>; Wed, 21 Jul 2010 17:10:58 -0700 (PDT)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id EE97E3A6AF3 for <hybi@ietf.org>; Wed, 21 Jul 2010 17:10:57 -0700 (PDT)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id o6M0BCMh007519; Thu, 22 Jul 2010 02:11:12 +0200
Date: Thu, 22 Jul 2010 02:11:12 +0200
From: Willy Tarreau <w@1wt.eu>
To: Greg Wilkins <gregw@webtide.com>
Message-ID: <20100722001112.GC7174@1wt.eu>
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>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <AANLkTiko9e2_xKLpgPlUSVBvRVY37aPmUrAagmeQsY1Q@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
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: Thu, 22 Jul 2010 00:10:59 -0000

On Thu, Jul 22, 2010 at 09:55:50AM +1000, Greg Wilkins wrote:
> On 22 July 2010 09:42, Mike Belshe <mike@belshe.com> wrote:
> 
> > 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
> >
> 
> +1
> 
> there has been on opinion expressed that we can only ever have 1 websocket
> handshake.  Thus because we are starting with port 80, the handshake is
> currently some mutant child of HTTP that must be sent even if another port
> is used and no HTTP is involved.
> 
> This approach is  stuck trying to fixate on the exact syntax of the
> handshake, literally down to counting spaces!
> 
> 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 !

Regards,
Willy