Re: [hybi] Moving to a CONNECT-based handshake

Adam Barth <ietf@adambarth.com> Wed, 01 December 2010 20:41 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 085503A6D2D for <hybi@core3.amsl.com>; Wed, 1 Dec 2010 12:41:15 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.098
X-Spam-Level:
X-Spam-Status: No, score=-4.098 tagged_above=-999 required=5 tests=[AWL=-1.721, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, J_CHICKENPOX_44=0.6, RCVD_IN_DNSWL_LOW=-1]
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 U8i4ky6KRL59 for <hybi@core3.amsl.com>; Wed, 1 Dec 2010 12:41:13 -0800 (PST)
Received: from mail-vw0-f44.google.com (mail-vw0-f44.google.com [209.85.212.44]) by core3.amsl.com (Postfix) with ESMTP id 4E3353A6D26 for <hybi@ietf.org>; Wed, 1 Dec 2010 12:41:13 -0800 (PST)
Received: by vws7 with SMTP id 7so2882980vws.31 for <hybi@ietf.org>; Wed, 01 Dec 2010 12:42:11 -0800 (PST)
Received: by 10.220.179.9 with SMTP id bo9mr2300427vcb.188.1291236131381; Wed, 01 Dec 2010 12:42:11 -0800 (PST)
Received: from mail-gw0-f44.google.com (mail-gw0-f44.google.com [74.125.83.44]) by mx.google.com with ESMTPS id fs21sm173512vbb.10.2010.12.01.12.42.09 (version=SSLv3 cipher=RC4-MD5); Wed, 01 Dec 2010 12:42:10 -0800 (PST)
Received: by gwj17 with SMTP id 17so4134120gwj.31 for <hybi@ietf.org>; Wed, 01 Dec 2010 12:42:08 -0800 (PST)
Received: by 10.231.157.145 with SMTP id b17mr9492910ibx.78.1291236128679; Wed, 01 Dec 2010 12:42:08 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.12.77 with HTTP; Wed, 1 Dec 2010 12:41:38 -0800 (PST)
In-Reply-To: <780F99F1-00F7-4E4A-A29F-9C94F66ADD13@gbiv.com>
References: <op.vmzqkhszidj3kv@simon-pieterss-macbook.local> <4CF52558.9010100@gmx.de> <4CF529FF.9080708@opera.com> <BB31C4AB95A70042A256109D4619912605790150@XCH117CNC.rim.net> <AANLkTimzTvtho0m9HZSe6exgSwZxbCnxtmeJd2-G0aSK@mail.gmail.com> <BB31C4AB95A70042A256109D4619912605790178@XCH117CNC.rim.net> <BB31C4AB95A70042A256109D4619912605790190@XCH117CNC.rim.net> <AANLkTimQJz22RtoVnB16C8Mi4C8=QKB946wSR9BRsP85@mail.gmail.com> <AANLkTi=BPFKVfj1CQQ4pk9-M_-9=ftQQPerfAFZtV8K7@mail.gmail.com> <AANLkTimPj6Xpqfm2k_VLeF=7M7s57yhsq67o4frKrK7L@mail.gmail.com> <780F99F1-00F7-4E4A-A29F-9C94F66ADD13@gbiv.com>
From: Adam Barth <ietf@adambarth.com>
Date: Wed, 01 Dec 2010 12:41:38 -0800
Message-ID: <AANLkTin+HYi+p-53y7bB-qvSMzN9oRQdTcQEusyxdRX_@mail.gmail.com>
To: "Roy T. Fielding" <fielding@gbiv.com>
Content-Type: text/plain; charset="ISO-2022-JP"
Content-Transfer-Encoding: 7bit
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Moving to a CONNECT-based handshake
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, 01 Dec 2010 20:41:15 -0000

On Wed, Dec 1, 2010 at 12:21 PM, Roy T. Fielding <fielding@gbiv.com> wrote:
> On Dec 1, 2010, at 8:45 AM, Ian Fette (イアンフェッティ) wrote:
>> We all know that WS over port 80 faces obstacles. That's been known for a long time, nothing has changed, and yet there remains a group that wishes to try to use it. As long as the problems are known, I see no reason to try to forbid it.
>>
>> As for strong objectors, it seems like many people who are implementing have voiced strong support for adams proposal, modulo some tweaks here and there. I would like to see how far we can get.
>
> We will get nowhere.  Adam's proposal is to use CONNECT, a method specifically
> designed for telling a normal (non-intercept, non-reverse) proxy to create a
> TCP tunnel to some other host:port, and he suggest using it to do something
> contrary to its method definition and the HTTP architecture in general.
> That would violate both CONNECT semantics and the HTTP syntax for non-proxy
> requests (not to mention our hybi charter).  Please understand that such an
> abomination will not be allowed in an Internet proposed standard even if the
> browsers deployed it, and thus should be rejected out of hand.

You're assuming that the server in a WebSocket connection is an HTTP
server.  It seems entirely reasonable to regard it as a proxy instead.
 In that case, the semantics work out fine.

> Listen to the input you have received already.  The vulnerability described
> in Adam's paper has nothing to do with the Upgrade handshake -- they
> specifically did not test the actual handshake.  What they did is test the
> post-handshake non-encrypted connection for intercept proxies that might
> (in 8 out of 47,338 cases) mistakenly interpret the unencrypted channel
> after the handshake is completed (or ignored).  Thus, it represents
> an attack on any non-opaqued channel that is being scanned by caching
> intercept proxies (an architecture that is not condoned by HTTP but does
> occur in some limited practice by idiots) when a browser is allowed to
> send arbitrary bytes over that channel.

Correct.

> One question, therefore, is whether it is important to protect the 0.0169%
> of users behind networks that are deliberately using an insecure and invalid
> form of HTTP proxy from yet another attack based on that invalid usage.
> YMMV.

For better or worse, browser vendors feel responsible to protect
"idiots" (as you call them) from themselves.  You might or might not
agree with that decision, but that's unlikely to change.

[...]

> A more sensible test would have been to use a new method, like WEBSOCKET,
> since then at least the initial handshake could remain HTTP-compliant.

Unfortunately, using a new method doesn't solve any of the problems
we're currently worried about.  CONNECT, specially, is useful because
many intermediaries already have the behavior we desire when
processing CONNECT messages.

> BTW2, "transparent proxy" != "intercept proxy".  A proxy is called transparent
> when it doesn't transform the messages exchanged, unlike intercepts (which
> aren't even true proxies since they are unknown to the client).  Please use
> the correct terminology.

For what its worth, we researched this issue when writing the paper.
These terms appear to be used interchangeably by most folks, including
Wikipedia.

Adam