[OAUTH-WG] ABNF in draft 11

"Manger, James H" <James.H.Manger@team.telstra.com> Thu, 25 November 2010 05:30 UTC

Return-Path: <James.H.Manger@team.telstra.com>
X-Original-To: oauth@core3.amsl.com
Delivered-To: oauth@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 724663A698D for <oauth@core3.amsl.com>; Wed, 24 Nov 2010 21:30:01 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.184
X-Spam-Level:
X-Spam-Status: No, score=-1.184 tagged_above=-999 required=5 tests=[AWL=-0.283, BAYES_00=-2.599, HELO_EQ_AU=0.377, HOST_EQ_AU=0.327, RELAY_IS_203=0.994]
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 nngQCBfBoCkM for <oauth@core3.amsl.com>; Wed, 24 Nov 2010 21:30:00 -0800 (PST)
Received: from ipxbvo.tcif.telstra.com.au (ipxbvo.tcif.telstra.com.au [203.35.135.204]) by core3.amsl.com (Postfix) with ESMTP id 026D03A693A for <oauth@ietf.org>; Wed, 24 Nov 2010 21:29:58 -0800 (PST)
X-IronPort-AV: E=Sophos;i="4.59,252,1288530000"; d="scan'208";a="18333468"
Received: from unknown (HELO ipccvi.tcif.telstra.com.au) ([10.97.217.208]) by ipobvi.tcif.telstra.com.au with ESMTP; 25 Nov 2010 16:30:57 +1100
X-IronPort-AV: E=McAfee;i="5400,1158,6177"; a="13928067"
Received: from wsmsg3753.srv.dir.telstra.com ([172.49.40.174]) by ipccvi.tcif.telstra.com.au with ESMTP; 25 Nov 2010 16:30:57 +1100
Received: from WSMSG3153V.srv.dir.telstra.com ([172.49.40.159]) by WSMSG3753.srv.dir.telstra.com ([172.49.40.174]) with mapi; Thu, 25 Nov 2010 16:30:57 +1100
From: "Manger, James H" <James.H.Manger@team.telstra.com>
To: Eran Hammer-Lahav <eran@hueniverse.com>, OAuth WG <oauth@ietf.org>
Date: Thu, 25 Nov 2010 16:30:55 +1100
Thread-Topic: ABNF in draft 11
Thread-Index: AcuLrE0WNL4CckMHSC6Rvg1Kh0kB/QArB9Zg
Message-ID: <255B9BB34FB7D647A506DC292726F6E112789E5CDD@WSMSG3153V.srv.dir.telstra.com>
References: <90C41DD21FB7C64BB94121FBBC2E72343D4AE3B191@P3PW5EX1MB01.EX1.SECURESERVER.NET>
In-Reply-To: <90C41DD21FB7C64BB94121FBBC2E72343D4AE3B191@P3PW5EX1MB01.EX1.SECURESERVER.NET>
Accept-Language: en-US, en-AU
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: en-US, en-AU
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: [OAUTH-WG] ABNF in draft 11
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: OAUTH WG <oauth.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/oauth>, <mailto:oauth-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/oauth>
List-Post: <mailto:oauth@ietf.org>
List-Help: <mailto:oauth-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/oauth>, <mailto:oauth-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 25 Nov 2010 05:30:01 -0000

Eran,

> I will be publishing -11 this week no matter what shape the draft is in
> as it now includes many normative changes collected over the past few months.

You are probably still editing this text (https://github.com/theRazorBlade/draft-ietf-oauth/blob/master/draft-ietf-oauth-v2.txt) but here are some comments on the ABNF (mainly in section 6.2 "The WWW-Authenticate Response Header Field"):

The "error", "error_description", "error_uri", "scope", and extra parameters in a "WWW-Authenticate: OAuth2 ..." header have to appear in this order according to the ABNF. I think it would be better if they could appear in any order.

The ABNF implies there will be a extra leading comma (now that the mandatory "realm" attribute has been dropped), eg WWW-Authenticate: OAuth2 ,error="xyz".

Defining the "error" value as a <token>, but in double quotes is weird. I believe the idea is that header parameter values are either <token>s (no quotes) or <quoted-string>s (in double quotes).

The <scope> rule is missing the parameter name: scope = "scope" "=" ...
Its value is also strange. One choice is a <quoted-value>, which doesn't involve any quoting!

I think it would be better to simply make all these parameter values <quoted-string>s.

I assume the <credentials> and <access-token> rules should be removed as they will appear in the other part after the spec split.

Any new parameter value (defined with the <param-value> rule in section 7.3) should match <token> | <quoted-string>, not the OAuth-specific <quoted-value> rule.

Using <quoted-value> as a parameter value is not really legal as RFC2617 (and draft-ietf-httpbis-p7-auth-12) require <token> | <quoted-string> for parameter values. <quoted-value> includes characters not in <token>.

I guess it is too late to use space-separated or semicolon-separated parameters, instead of comma-separated parameters, to avoid confusion when multiple WWW-Authenticate headers are combined as HTTP intermediaries are allowed to do (in which case their values are separated with commas). [Not too late for OAuth, but too late for HTTP auth in general]



What error is returned when a request has no authentication?
The status code should be a 401 so the closest error is "invalid_token", though it is not really appropriate.

It is such a shame a WWW-Authentication response header can give details about OAuth errors, but not providing the basic OAuth information such as a user authorization URI, a client credential swap URI, and a token refresh URI.

--
James Manger