Re: [hybi] Extensibility mechanisms?

Adam Barth <ietf@adambarth.com> Mon, 26 July 2010 22:39 UTC

Return-Path: <ietf@adambarth.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 9EDD83A67F9 for <hybi@core3.amsl.com>; Mon, 26 Jul 2010 15:39:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.712
X-Spam-Level:
X-Spam-Status: No, score=-1.712 tagged_above=-999 required=5 tests=[AWL=0.265, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622]
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 IAk-SQGwGSql for <hybi@core3.amsl.com>; Mon, 26 Jul 2010 15:39:20 -0700 (PDT)
Received: from mail-qy0-f179.google.com (mail-qy0-f179.google.com [209.85.216.179]) by core3.amsl.com (Postfix) with ESMTP id 759A03A677C for <hybi@ietf.org>; Mon, 26 Jul 2010 15:39:20 -0700 (PDT)
Received: by qyk8 with SMTP id 8so2275879qyk.10 for <hybi@ietf.org>; Mon, 26 Jul 2010 15:39:41 -0700 (PDT)
Received: by 10.224.90.212 with SMTP id j20mr6741321qam.121.1280183981531; Mon, 26 Jul 2010 15:39:41 -0700 (PDT)
Received: from mail-iw0-f172.google.com (mail-iw0-f172.google.com [209.85.214.172]) by mx.google.com with ESMTPS id e32sm4675890qcg.34.2010.07.26.15.39.40 (version=SSLv3 cipher=RC4-MD5); Mon, 26 Jul 2010 15:39:41 -0700 (PDT)
Received: by iwn38 with SMTP id 38so3296746iwn.31 for <hybi@ietf.org>; Mon, 26 Jul 2010 15:39:40 -0700 (PDT)
Received: by 10.231.170.208 with SMTP id e16mr9471764ibz.44.1280183980227; Mon, 26 Jul 2010 15:39:40 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.231.79.85 with HTTP; Mon, 26 Jul 2010 15:39:20 -0700 (PDT)
In-Reply-To: <20100726223247.GE23142@shareable.org>
References: <Pine.LNX.4.64.1007212153110.7242@ps20323.dreamhostps.com> <AANLkTiku76oSucTNDFdwgsFBNFa_cCpC-YktTnMfX47-@mail.gmail.com> <4C479130.4020500@caucho.com> <AANLkTikLDjBP-Xs5t6TxmJuq4nG8jwThQ=n34B4cEmup@mail.gmail.com> <4C479CE4.6070805@caucho.com> <AANLkTims1er0Rbv0ysP4gRs1Kd0He8hapHeJ3nON=JQa@mail.gmail.com> <4C47C5B0.3030006@caucho.com> <AANLkTi=ND-FOH8OoD=TCbiyeSZ-h0LhxQBXN5w-2hfvj@mail.gmail.com> <20100722055452.GL7174@1wt.eu> <F412C956-038F-400D-A431-C42B4C7B829C@apple.com> <20100726223247.GE23142@shareable.org>
From: Adam Barth <ietf@adambarth.com>
Date: Tue, 27 Jul 2010 00:39:20 +0200
Message-ID: <AANLkTiniBDrC+TNE+ZUBR_JnxzaTLD1KMgA+6iOzu2LE@mail.gmail.com>
To: Jamie Lokier <jamie@shareable.org>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Extensibility mechanisms?
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: Mon, 26 Jul 2010 22:39:21 -0000

On Tue, Jul 27, 2010 at 12:32 AM, Jamie Lokier <jamie@shareable.org> wrote:
> Maciej Stachowiak wrote:
>> I believe the TLS-based handshake (as proposed by Adam) is more
>> robust than solutions involving nonces and challenge/response built
>> into an HTTP-like handshake. The reason for this is that it's hard
>> for the attacker to control the bytes sent, other than to cause the
>> initiation of a TLS handshake, which is something that all network
>> services are already exposed to by browsers. The attacker cannot get
>> to the next-level protocol running over TLS unless the server
>> explicitly opts in. With HTTP-based schemes, it takes much more care
>> to avoid sending information as the "wrong" protocol.
>
> Isn't the TLS handshake rather fragile and vulnerable, by virtue of
> lots of services sitting behind TLS and using it only to get an
> encrypted channel?  If you can open a connection and start TLS, say on
> the ftps/imaps or even https port then it's basically unprotected
> bytes again after the TLS stage, wrapped *inside* TLS, giving a false
> sense of security.
>
> Or is there some extra magic sent in the TLS setup which will be
> consistently rejected by non-WebSocket TLS servers?

Indeed.  That's the problem that the using the "next protocol" TLS
extension solves.  During the TLS handshake, the client and server
negotiate that they'd both like to start talking WebSockets after
they're done with the handshake.

Adam