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

Scott Ferguson <ferg@caucho.com> Mon, 30 August 2010 22:01 UTC

Return-Path: <ferg@caucho.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 5328E3A68D7 for <hybi@core3.amsl.com>; Mon, 30 Aug 2010 15:01:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.226
X-Spam-Level:
X-Spam-Status: No, score=-2.226 tagged_above=-999 required=5 tests=[AWL=-0.227, BAYES_00=-2.599, J_CHICKENPOX_14=0.6]
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 d6Zd3GaraNRV for <hybi@core3.amsl.com>; Mon, 30 Aug 2010 15:01:01 -0700 (PDT)
Received: from smtp112.biz.mail.re2.yahoo.com (smtp112.biz.mail.re2.yahoo.com [66.196.116.97]) by core3.amsl.com (Postfix) with SMTP id 6EBB83A686E for <hybi@ietf.org>; Mon, 30 Aug 2010 15:01:01 -0700 (PDT)
Received: (qmail 39847 invoked from network); 30 Aug 2010 22:01:29 -0000
Received: from [192.168.1.11] (ferg@66.92.8.203 with plain) by smtp112.biz.mail.re2.yahoo.com with SMTP; 30 Aug 2010 15:01:29 -0700 PDT
X-Yahoo-SMTP: L1_TBRiswBB5.MuzAo8Yf89wczFo0A2C
X-YMail-OSG: 27Tx7X0VM1lcdjUntFrzHtiUI1VsQP_ovhuMTjXCpKCJ4bD .EcZIXVLd422wz3wxie6QF69DCdakaOKX4kOgQcR.PKDIb3nkaMBoAFFtQon e2xDs_0KQksp1xguapKJAlRrzn8UOqtaY2DoOZ0JKoEhXt3WifOVEB22opN9 Zm2y809mcOUBIBbdmcwfY4R2yTWvefTkCDe1Lfx1YTqBm8nUpT1QdHw9VGdT vo4quOqIXNIZZe9E5unqzENlNqG76uF8YmGdpHNbuMcDEY_lKysKTE1V274n YPYDEnK65D9Z2mD_CYf_c93xqM2Ka6ToThwwmUUNdjSH4WuccFz8pplO8dQ3 2J1bXRvqB8Ug.y_9WTzCqukf0Ea1wz.DjIBmwhBqgC8RdmZjlPEBRply2Z3g 0xnhoBuwtlQda.2qnXg--
X-Yahoo-Newman-Property: ymail-3
Message-ID: <4C7C2A33.6010405@caucho.com>
Date: Mon, 30 Aug 2010 15:01:23 -0700
From: Scott Ferguson <ferg@caucho.com>
User-Agent: Thunderbird 2.0.0.24 (X11/20100411)
MIME-Version: 1.0
To: Hector Santos <hsantos@isdg.net>
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>
In-Reply-To: <4C7BF060.7070501@isdg.net>
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: Mon, 30 Aug 2010 22:01:02 -0000

Hector Santos wrote:
> Scott Ferguson wrote:
>
>> We do need to make one change in the handshake, because the first 
>> client data (the random bytes) is the logical place to put 
>> authentication credentials.
>
> When not just use the a HTTP.Authorization header?

That's not possible with DIGEST with the current handshake. It is 
possible with BASIC, but I'd like to allow/encourage DIGEST or better 
for non-browser clients (it would be invisible to the application 
developer).

The DIGEST operation looks something like (numbers are packets):

  1. client's GET/Upgrade - no authentication information

  2. s_nonce: server challenge (i.e. client needs to wait for a 
round-trip to start.)

  3. client auth: user, H(s_nonce, H(user, password))

In WebSockets, #1 and #2 are HTTP, but #3 is not, it's the packet with 
the random bytes, so you can't just use HTTP header because we're no 
longer in HTTP mode.

There's currently no place to put the Authorization credentials in the 
WebSockets handshake without forcing extra round trips.


>
>> If we just punt and make applications write their own authentication 
>> instead of piggybacking on the handshake, it would cost an extra 
>> round trip.
>
> But you also can't prevent this - when an non-authenticate request 
> comes in.

Nowhere do I suggest that digest or any specific authentication scheme 
become mandatory.  I have no idea what your comment is responding to.

I'm just proposing that when non-browser clients do want to use a 
standard authentication scheme and want save a handshake round trips, 
that we allow that capability, which is currently prevented by the 
current handshake design.

 From the experience of Hessian, there will be non-browser clients who 
would like to piggyback on standard authentication, and not be forced to 
write their own.

-- Scott