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

Hector Santos <hsantos@isdg.net> Tue, 31 August 2010 19:42 UTC

Return-Path: <hsantos@isdg.net>
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 8C0C63A6A96 for <hybi@core3.amsl.com>; Tue, 31 Aug 2010 12:42:45 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.229
X-Spam-Level:
X-Spam-Status: No, score=-4.229 tagged_above=-999 required=5 tests=[AWL=-1.630, BAYES_00=-2.599]
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 J9XJFI2IjHh1 for <hybi@core3.amsl.com>; Tue, 31 Aug 2010 12:42:44 -0700 (PDT)
Received: from mail.winserver.com (ntbbs.santronics.com [208.247.131.9]) by core3.amsl.com (Postfix) with ESMTP id 340FC3A684B for <hybi@ietf.org>; Tue, 31 Aug 2010 12:42:43 -0700 (PDT)
Received: by winserver.com (Wildcat! SMTP Router v6.3.453.4) for hybi@ietf.org; Tue, 31 Aug 2010 15:43:25 -0400
Received: from opensite.winserver.com ([208.247.131.23]) by winserver.com (Wildcat! SMTP v6.3.453.4) with ESMTP id 2901832687; Tue, 31 Aug 2010 15:43:23 -0400
Received: by beta.winserver.com (Wildcat! SMTP Router v6.3.453.2) for hybi@ietf.org; Tue, 31 Aug 2010 15:41:20 -0400
Received: from [192.168.1.101] ([99.3.147.93]) by beta.winserver.com (Wildcat! SMTP v6.3.453.2) with ESMTP id 3489925329; Tue, 31 Aug 2010 15:41:19 -0400
Message-ID: <4C7D5B20.9030503@isdg.net>
Date: Tue, 31 Aug 2010 15:42:24 -0400
From: Hector Santos <hsantos@isdg.net>
Organization: Santronics Software, Inc.
User-Agent: Thunderbird 2.0.0.24 (Windows/20100228)
MIME-Version: 1.0
To: Scott Ferguson <ferg@caucho.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>
In-Reply-To: <4C7D2B74.8030702@caucho.com>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 7bit
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: Tue, 31 Aug 2010 19:42:45 -0000

Scott Ferguson wrote:
> Hector Santos wrote:
>> If we are on the same wave length, I don't follow the HTTP AUTH 
>> protocol difference.
> 
> DIGEST is a challenge/response style authentication, which means it uses 
> a challenge from the server before sending its credentials. BASIC just 
> sends the user and credentials in clear text.

Sorry, missed this (not so) subtle point. BASIC does not require an 
initial server challenge hence it can work unsolicited.

> The point I'm making is that the above authorization-required handshake 
> is the exact same as our current non-authorization handshake, i.e. we 
> can piggy-back the authorization without any extra round trips.

Ok, I trust your engineering here to see this.

>> Also probably related, I see no security benefit in this handshake. 
>> The bad guy client can always validate a server handshake response 
>> whether it was correct or not.
> 
> I don't understand. A bad client can't generate the correct 
> authentication credentials. That's the whole point of authentication.

I was referring to the websocket client random data and the websocket 
server "reassembly" and response.

Using the specs to model in my recent "proof of concept" work, I had a 
devil of a time getting it right causing the browser (chrome) to 
continue returning an INVALID_STATE_ERR and never firing OnOpen. It 
never set the websocket.readyState to 1 (open).

Well, bad guys will most like implement websocket clients which ignore 
the server response (always accept it) and simply move the ready state 
to open, and fire the onOpen.  I didn't see how this challenge helps 
except maybe to mitigate MITM threats.

-- 
Hector Santos, CTO
http://www.santronics.com
http://santronics.blogspot.com