Re: [OAUTH-WG] draft-ietf-oauth-v2-bearer-08.txt WGLC comments

Julian Reschke <julian.reschke@gmx.de> Thu, 13 October 2011 07:13 UTC

Return-Path: <julian.reschke@gmx.de>
X-Original-To: oauth@ietfa.amsl.com
Delivered-To: oauth@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 433E021F8AED for <oauth@ietfa.amsl.com>; Thu, 13 Oct 2011 00:13:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.099
X-Spam-Level:
X-Spam-Status: No, score=-104.099 tagged_above=-999 required=5 tests=[AWL=-1.500, BAYES_00=-2.599, 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 ufTO1VAx1Np7 for <oauth@ietfa.amsl.com>; Thu, 13 Oct 2011 00:13:25 -0700 (PDT)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by ietfa.amsl.com (Postfix) with SMTP id 0F70721F8AE6 for <oauth@ietf.org>; Thu, 13 Oct 2011 00:13:24 -0700 (PDT)
Received: (qmail invoked by alias); 13 Oct 2011 07:13:16 -0000
Received: from p5DCC9E25.dip.t-dialin.net (EHLO [192.168.178.36]) [93.204.158.37] by mail.gmx.net (mp036) with SMTP; 13 Oct 2011 09:13:16 +0200
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX18+PPIB23U+4ChL3rCkITVEJ7pnOo+1iMn7f0Afow PV1jW12+fTNqbi
Message-ID: <4E968F88.3090303@gmx.de>
Date: Thu, 13 Oct 2011 09:13:12 +0200
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1
MIME-Version: 1.0
To: "Manger, James H" <James.H.Manger@team.telstra.com>
References: <20110727131700.23436.11568.idtracker@ietfa.amsl.com> <255B9BB34FB7D647A506DC292726F6E11289635128@WSMSG3153V.srv.dir.telstra.com> <1314767698.36186.YahooMailNeo@web31808.mail.mud.yahoo.com> <255B9BB34FB7D647A506DC292726F6E1128DB1DE6E@WSMSG3153V.srv.dir.telstra.com> <1318350042.89721.YahooMailNeo@web31810.mail.mud.yahoo.com> <255B9BB34FB7D647A506DC292726F6E1129072392A@WSMSG3153V.srv.dir.telstra.com> <4E955C01.40603@gmx.de> <4E1F6AAD24975D4BA5B16804296739435C238C90@TK5EX14MBXC284.redmond.corp.microsoft.com> <4E95A987.1000203@gmx.de> <4E1F6AAD24975D4BA5B16804296739435C239299@TK5EX14MBXC284.redmond.corp.microsoft.com> <4E95DB3B.2040802@gmx.de> <4E1F6AAD24975D4BA5B16804296739435C23936C@TK5EX14MBXC284.redmond.corp.microsoft.com> <4E95DDE6.3080502@gmx.de> <4E1F6AAD24975D4BA5B16804296739435C239402@TK5EX14MBXC284.redmond.corp.microsoft.com> <255B9BB34FB7D647A506DC292726F6E112907A695F@WSMSG3153V.srv.dir.telstra.com>
In-Reply-To: <255B9BB34FB7D647A506DC292726F6E112907A695F@WSMSG3153V.srv.dir.telstra.com>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
Cc: "oauth@ietf.org" <oauth@ietf.org>
Subject: Re: [OAUTH-WG] draft-ietf-oauth-v2-bearer-08.txt WGLC comments
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: OAUTH WG <oauth.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/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, 13 Oct 2011 07:13:26 -0000

On 2011-10-13 02:38, Manger, James H wrote:
>> One possible syntax is:
>>
>> Bearer access_token=xyz_-123,more_info=pdq
>>
>> Ultimately though, the format of the bearer token is outside of the scope of the spec, and up to the participants to determine, including whether to use b64token syntax or params syntax.
>
>
> It is great to see an example explaining the intention of the "b64token / #auth-param" part of the draft. These details need to be in the spec. Draft 9 makes no mention of an "access_token" parameter for the HTTP header -- in sharp contrast to mentioning such a parameter for the URI query string and POST body mechanisms. Can the "access_token" value be a<token>  (as in the above example)? Can it be a<quoted-string>? Can it use RFC5987 (eg access_token*=UTF-8''...)?
>
> Can a client choose the b64token or auth-param option, implying servers MUST support both? Or is it the other way around: servers only have to support b64token so existing servers are compliant without requiring any changes?
>
> I thought the consensus was that bearer tokens were so simple that "Bearer<b64token>" was sufficient. In the unlikely event that more parameters were required in future, a new scheme (eg Bearer2) could be defined. If this is no longer the consensus then lets:
>
> 1. Define a single syntax that servers MUST support.
>    Authorization: Bearer a="<access_token>"
>
> 2. Use a short parameter name, such as "a", saving 10-bytes per request over "access_token". The long name is needed in a URI query string or POST body so the parameter is unambiguous amongst any number of other application-specific parameters. In a Bearer HTTP header there is no such possibility of confusion.
>
> 3. Don't allow the value to be either a<token>  or<quoted-string>  -- just pick one (I suggest<quoted-string>). It doesn't help developers or interop to offer a pointless choice.
>
> 4. Allow future comma-separated parameters, and state that unrecognized parameters MUST be ignored.
>
> 5. Add an informative note that some servers might also accept a header of the form "Bearer<access_token>", but clients using this form are not compliant to this spec.
>
> 6. Explicitly state that when the type is "bearer" in an OAuth2 token response, the "access_token" MUST only consist of characters that can be represented in a<quoted-string>, ie %x20-7E (assuming<quoted-string>  was picked at #3).
>
> 7. Recommend that a base64url encoding without padding (of binary data or of UTF-8 encoded text) is a good choice for an "access_token" value (or a few base64url encoded segments separated by dots) as it avoids the need to escape characters in most situations.


+1

Except for:

 > 3. Don't allow the value to be either a<token>  or<quoted-string>  -- 
just pick one (I suggest<quoted-string>). It doesn't help developers or 
interop to offer a pointless choice.


...allow both, because otherwise you'll need custom parsers to process 
the header field.

Best regards, Julian