Re: [hybi] Proposal for extensible authentication framework

Hannes Tschofenig <hannes.tschofenig@gmx.net> Sat, 13 August 2011 14:59 UTC

Return-Path: <hannes.tschofenig@gmx.net>
X-Original-To: hybi@ietfa.amsl.com
Delivered-To: hybi@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9408721F8713 for <hybi@ietfa.amsl.com>; Sat, 13 Aug 2011 07:59:45 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.129
X-Spam-Level:
X-Spam-Status: No, score=-102.129 tagged_above=-999 required=5 tests=[AWL=-0.430, BAYES_00=-2.599, J_CHICKENPOX_45=0.6, MIME_8BIT_HEADER=0.3, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id G2kuZIQn+NpN for <hybi@ietfa.amsl.com>; Sat, 13 Aug 2011 07:59:44 -0700 (PDT)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.23]) by ietfa.amsl.com (Postfix) with SMTP id 6257621F86F6 for <hybi@ietf.org>; Sat, 13 Aug 2011 07:59:44 -0700 (PDT)
Received: (qmail invoked by alias); 13 Aug 2011 15:00:22 -0000
Received: from letku214.adsl.netsonic.fi (EHLO [10.0.0.6]) [194.29.195.214] by mail.gmx.net (mp027) with SMTP; 13 Aug 2011 17:00:22 +0200
X-Authenticated: #29516787
X-Provags-ID: V01U2FsdGVkX181kGQAnXM14LKdLIb8IuT8tB8zhYb41ibV7ncuQp VFMPNO1WdnpF1w
Mime-Version: 1.0 (Apple Message framework v1084)
Content-Type: text/plain; charset="iso-8859-1"
From: Hannes Tschofenig <hannes.tschofenig@gmx.net>
In-Reply-To: <CALiegfkX6=Mfr7rp64ZPTxfZmtK+JmnUNZZyRfJkHhRQNFGFsQ@mail.gmail.com>
Date: Sat, 13 Aug 2011 18:00:20 +0300
Content-Transfer-Encoding: quoted-printable
Message-Id: <E9F76422-B0DA-49F4-B2B8-8FCA023EBA51@gmx.net>
References: <CALiegfkX6=Mfr7rp64ZPTxfZmtK+JmnUNZZyRfJkHhRQNFGFsQ@mail.gmail.com>
To: Iñaki Baz Castillo <ibc@aliax.net>
X-Mailer: Apple Mail (2.1084)
X-Y-GMX-Trusted: 0
Cc: hybi@ietf.org
Subject: Re: [hybi] Proposal for extensible authentication framework
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/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: Sat, 13 Aug 2011 14:59:45 -0000

Take a look at 
http://tools.ietf.org/html/draft-williams-rest-gss-00
and see whether this fits your needs of an extensible authentication framework.

Ciao
Hannes

PS: OAuth is btw not protocol that authenticates the end user. Instead the handshake allows the end user to authorize the subsequent exchange of data. 

On Aug 13, 2011, at 3:06 PM, Iñaki Baz Castillo wrote:

> Hi, I copy&paste this text I've replied in other thread as it could
> become a different concept (it not just about OAUTH authentication,
> but about anyone).
> 
> It is a proposal (for sure it must be improved/corrected) for
> including a *standard* extensible authentication mechanism in
> WebSocket protocol. I explain it with an example:
> 
> 
> 1.: Client connects to server using subprotocol "foo". Client does NOT
> know which authentication the server requires (neither if the server
> does require authentication or not). Please don't assume that a
> specific WS subprotocol always requires the same authentication
> mechanism. It's the server who must decide it at any time.
> 
> 2.: Client and server perform successful WS handshake. The server
> requires (in this case) Digest authentication so the 101 response
> contains a *standard* header defined in WS core draft (or in other
> separate draft):
> 
>  Sec-WebSocket-Authenticate: Digest realm="domain.org",
>    nonce="4e45a9e60000856cac2a6dd2e4edeba1a83e2ceb7137c3d0",
>    qop="auth"
> 
> 3.: Client supports Digest authentication so it takes the
> username/passwd from somewhere (WS-API stuff), computes the Digest
> response and starts speaking
> "auth+digest" WS subprotocol (which should be defined in some RFC).
> 
> 4.: So client sends a WS message containing the computed Digest credentials.
> 
> 5.: Server confirms that authorization was successful in a WS reply.
> 
> 6.: Client and server exchange messages as specified by subprotocol "foo".
> 
> 
> 
> Now replace Digest with OAUTH or whatever. Of course, all those
> authentication mechanism should be standarized by different RFC's to
> be used in WS. Each one would involve a defined WS subprotocol
> ("auth+digest", "auth+oauth").
> 
> A WS server could reply more than one Sec-WebSocket-Authenticate
> header (i.e: one with "Digest" and another one with "OAUTH") in case it
> supports both, so the client could choose which one to use.
> 
> The point here is that, even if during the WebSocket handshake the WS
> subprotocol "foo" is negotiated, the presence of a
> Sec-WebSocket-Authenticate header in the 101 response
> implies that before speaking "foo", the client must authenticate using
> the mechanism in such received header (or one of them if there are N
> headers). This is, before speaking "foo" subprotocol, the client MUST
> speak "auth+digest" or "auth+oauth" or whatever.
> 
> A doubt coming to my mind is: if there are two
> Sec-WebSocket-Authenticate headers (offering Digest and OAUTH) and the
> client chooses OAUTH (so starts speaking "auth+oauth"), how would the
> server realize that the first WS message is "auth+digest" or
> "auth+oauth"? AFAIK such information is not carried within WS messages
> (but just during handshake).
> 
> A proposal for this last subject: the "auth" protocol could be
> standard, and the chosen mechanism would be indicated in a WS message
> within "auth" protocol (along with the rest of fields required for
> each authentication mechanism). "auth" WS messages could be, for
> example, a JSON object like:
> 
>  "auth": {
>    "mechanism":  "Digest",
>    "data": {
>       "username": "alice",
>       "nonce": "aksdhakjdshakjs";
>       "response":  "aksdh89akjhsdke",
>       "qop": 1
>    }
>  }
> 
> This is, "data" object structure would depend on the chosen "mechanism".
> 
> Opinions?
> 
> 
> -- 
> Iñaki Baz Castillo
> <ibc@aliax.net>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi