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

Scott Ferguson <ferg@caucho.com> Mon, 30 August 2010 16:21 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 622293A6826 for <hybi@core3.amsl.com>; Mon, 30 Aug 2010 09:21:37 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.523
X-Spam-Level:
X-Spam-Status: No, score=-2.523 tagged_above=-999 required=5 tests=[AWL=0.076, 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 UlY+khD63jC3 for <hybi@core3.amsl.com>; Mon, 30 Aug 2010 09:21:33 -0700 (PDT)
Received: from smtp115.biz.mail.mud.yahoo.com (smtp115.biz.mail.mud.yahoo.com [209.191.68.75]) by core3.amsl.com (Postfix) with SMTP id 46FB23A67F7 for <hybi@ietf.org>; Mon, 30 Aug 2010 09:21:30 -0700 (PDT)
Received: (qmail 62615 invoked from network); 30 Aug 2010 16:21:52 -0000
Received: from [192.168.1.11] (ferg@66.92.8.203 with plain) by smtp115.biz.mail.mud.yahoo.com with SMTP; 30 Aug 2010 09:21:52 -0700 PDT
X-Yahoo-SMTP: L1_TBRiswBB5.MuzAo8Yf89wczFo0A2C
X-YMail-OSG: 3tz.I10VM1kuaQRk4UCATcoEGxzppArfyJ4RZWZbaowYb68 lw18kf9u8Kx4eM14FLHyV0HixQ1KUn_RYwiPD.pZVfRkZhfYFvnMRfGJ302p _2EukHY3LzBo.PlgPOAzCT.XQQQgd.Qou8tvPolhaA7QnLAEEUGOpGlh4a27 gLTK21QQNNaU3bUa9db9W9.ijga4ixIOkYMH8rNpqu37681u4iTcOkbMWI7J 0WWAH8NaRBCF9kM.dAsuARGeEj5Irgv4A9TaBWYhipVyp40_Z1NO3q.GqsdT Z.anM4hS5u7zxsPpz_JWyS6.ADJsrAJlidVkR.Rbu6RbkeT5u7ULNgqQ-
X-Yahoo-Newman-Property: ymail-3
Message-ID: <4C7BDA8F.4080107@caucho.com>
Date: Mon, 30 Aug 2010 09:21:35 -0700
From: Scott Ferguson <ferg@caucho.com>
User-Agent: Thunderbird 2.0.0.24 (X11/20100411)
MIME-Version: 1.0
To: John Tamplin <jat@google.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>
In-Reply-To: <AANLkTimabr-0gVy1Jpr0=i-Wfv6u-AnD+ReNvb0eajYO@mail.gmail.com>
Content-Type: text/plain; charset="ISO-8859-1"; 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 16:21:40 -0000

John Tamplin wrote:
> On Sun, Aug 29, 2010 at 11:01 PM, Greg Wilkins <gregw@webtide.com> wrote:
>   
>> From the point of view of a combined HTTP/websocket server, it would
>> be simplest if we can just use existing mechanisms for things like
>> BASIC, DIGEST, OAUTH, OpenID, acegi, NTML etc. etc.
>> So while there may be better security mechanism that could be applied
>> to websocket only client and servers, it would be unproductive to
>> prohibit the use of existing security mechanism if a way can be found
>> to use them.
>>     
>
> How many websites actually use HTTP Auth to protect the data?  

Non-browser clients do. With Hessian (binary RPC over HTTP), HTTP auth 
is very typical.

I'd prefer to build in WebSocket support to allow for a piggy-backed 
DIGEST-style authentication, allowing the server response to send its 
challenge and replace the clients first random bytes with an 
authentication/hello frame, which would be the DIGEST credentials.


> Since I would expect virtually all WebSocket client apps to have been loaded from a normal
> web server, they already have their own authentication for RPC/etc
> requests back to that server for protected resources.  

Non-browser clients exist and are important. You can't assume all 
interactions are from a browser.

> Anyway, this strikes me as something to go over in detail when we are
> further down the road from where we are.  I think we need to finish up
> the framing and get basic agreement on how the handshake should look,
> and then we can take up how to get credentials to a WebSocket server

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.

If we just punt and make applications write their own authentication 
instead of piggybacking on the handshake, it would cost an extra round trip.

-- Scott