Re: [hybi] WebSocket handshake (HTTP and SSO)

Greg Wilkins <gregw@webtide.com> Wed, 01 September 2010 23:29 UTC

Return-Path: <gregw@webtide.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 3713A3A6899 for <hybi@core3.amsl.com>; Wed, 1 Sep 2010 16:29:45 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.76
X-Spam-Level:
X-Spam-Status: No, score=-1.76 tagged_above=-999 required=5 tests=[AWL=0.217, 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 oZd69Q15nUs4 for <hybi@core3.amsl.com>; Wed, 1 Sep 2010 16:29:44 -0700 (PDT)
Received: from mail-fx0-f44.google.com (mail-fx0-f44.google.com [209.85.161.44]) by core3.amsl.com (Postfix) with ESMTP id 0C4933A6872 for <hybi@ietf.org>; Wed, 1 Sep 2010 16:29:43 -0700 (PDT)
Received: by fxm18 with SMTP id 18so5903526fxm.31 for <hybi@ietf.org>; Wed, 01 Sep 2010 16:30:13 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.239.136.72 with SMTP id g8mr383945hbg.191.1283383813704; Wed, 01 Sep 2010 16:30:13 -0700 (PDT)
Received: by 10.239.186.139 with HTTP; Wed, 1 Sep 2010 16:30:13 -0700 (PDT)
In-Reply-To: <AANLkTi=N_BTgPtFWRQd1i9EwSGB5vXT-poGexJ-cXOdQ@mail.gmail.com>
References: <4C7A269F.8020306@gmail.com> <AANLkTinqJ+K-pqm7p7S+aviWVY==S0mJ9RBvNfpnTa02@mail.gmail.com> <AANLkTikCVNoJnKXTOTJadYJWYR356u1wZdVNdBwEh6cg@mail.gmail.com> <AANLkTik3Jo4rG8cTcHerpwPumT_X77bn9y5rDkZ8ZD33@mail.gmail.com> <AANLkTimabr-0gVy1Jpr0=i-Wfv6u-AnD+ReNvb0eajYO@mail.gmail.com> <4C7BDA8F.4080107@caucho.com> <4C7BF060.7070501@isdg.net> <4C7C2A33.6010405@caucho.com> <4C7C746F.1040006@isdg.net> <4C7D2B74.8030702@caucho.com> <4C7D5B20.9030503@isdg.net> <4C7DAECB.7050905@caucho.com> <AANLkTikS7L_04HDAsL6t+FrHZKVXQN2Gx1gmjh4gYLcb@mail.gmail.com> <AANLkTik3joD9ZKk8gtt5Nwa9kX0FpyGd6ZGc-G6yUPOc@mail.gmail.com> <AANLkTi=N_BTgPtFWRQd1i9EwSGB5vXT-poGexJ-cXOdQ@mail.gmail.com>
Date: Thu, 02 Sep 2010 09:30:13 +1000
Message-ID: <AANLkTin4qBCJUjkgncV6okBPAJvTRfu+_uRUcnTsXArp@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: ifette <ifette@google.com>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Cc: hybi <hybi@ietf.org>, Brodie Thiesfield <brodie@jellycan.com>
Subject: Re: [hybi] WebSocket handshake (HTTP and SSO)
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 Sep 2010 23:29:45 -0000

2010/9/2 Ian Fette (イアンフェッティ) <ifette@google.com>:
> First, I'm not sure how important it is that the numbers are _strongly_
> random, so long as they come from a sufficiently large pool of options (e.g.
> from 0 to INT_MAX).

True, and I expect to see many implementation that just send 1234 5678


> I think the worry is that a hex number in the header could be potentially
> confused, and not offer the same protections.

How could the hex number be confused? How could it not offer the same
protection?
If we can't answer these questions, then we don't understand the
problem and thus we are unlikely to design a good solution.

> I think some of the confusion is that this handshake isn't really designed
> to provide a secure channel (e.g. choose keys that will be used to encrypt
> further data), rather the handshake is to protect against cross-protocol
> attacks, and so there are slightly different criteria.

True.   It is designed to protect against a server that can be tricked
into sending a valid 101 response and
then valuable data without authentication.   The chances of that are
already extremely remote, and if such
a server did exist it would be vulnerable to so many other exploits.
It does strike me as a lot of bother for a
vanishingly small vulnerability.


> While I might agree that it could perhaps be simpler and still work, there
> is also an argument for defense in depth, and frankly it is not difficult to
> implement (we and others have already done it), so I'm inclined not to want
> to revisit it just for the sake of "I would prefer something simpler".

At the time this "feature" was unilaterally added to the draft, I
argued strongly against it being adopted as the ietf-00 draft because
there had been no due diligence on the proposal (and there are real
intermediary problems as a result). Now using the "it's implemented so
accept it" argument is really not very acceptable considering the
history of this.

However, I do agree it is not a hugely important technical issue
(unlike the placement of the the random bytes).   So I'll just rest my
case by saying that when I implement the Jetty client,  I think I will
use the fixed string

Sec-WebSocket-Key1: the ietf process failed 12345678


cheers