Re: [OAUTH-WG] question about the b64token syntax in draft-ietf-oauth-v2-bearer

Brian Campbell <> Tue, 06 March 2012 16:23 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 2F86721F8964 for <>; Tue, 6 Mar 2012 08:23:57 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -5.768
X-Spam-Status: No, score=-5.768 tagged_above=-999 required=5 tests=[AWL=0.209, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_MED=-4]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id Q7mp5RPZci-x for <>; Tue, 6 Mar 2012 08:23:56 -0800 (PST)
Received: from ( []) by (Postfix) with ESMTP id 9A02A21F8970 for <>; Tue, 6 Mar 2012 08:23:55 -0800 (PST)
Received: from ([]) (using TLSv1) by ([]) with SMTP ID; Tue, 06 Mar 2012 08:23:55 PST
Received: by with SMTP id fl13so5052235vcb.20 for <>; Tue, 06 Mar 2012 08:23:54 -0800 (PST)
Received-SPF: pass ( domain of designates as permitted sender) client-ip=;
Authentication-Results:; spf=pass ( domain of designates as permitted sender)
Received: from ([]) by with SMTP id l5mr3423655vch.6.1331051034871 (num_hops = 1); Tue, 06 Mar 2012 08:23:54 -0800 (PST)
Received: by with SMTP id l5mr2943000vch.6.1331051034235; Tue, 06 Mar 2012 08:23:54 -0800 (PST)
MIME-Version: 1.0
Received: by with HTTP; Tue, 6 Mar 2012 08:23:23 -0800 (PST)
In-Reply-To: <>
References: <> <> <>
From: Brian Campbell <>
Date: Tue, 6 Mar 2012 08:23:24 -0800
Message-ID: <>
To: Mike Jones <>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Gm-Message-State: ALoCoQlie52G6OQkbvhpeEP5VJNKzQ0teWwY9ADJPJRv3pHSGW6CZy7nL+7Hr7884RlJwuhtWYhR
Cc: oauth <>
Subject: Re: [OAUTH-WG] question about the b64token syntax in draft-ietf-oauth-v2-bearer
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: OAUTH WG <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Tue, 06 Mar 2012 16:23:57 -0000

Thanks Mike, I think changing the example would be helpful.

However I think that including some text along the lines of what James
suggested would also be very valuable. I agree that the connection
between OAuth and Bearer could and should be made more explicit. And
that the implications of the b64token syntax, particularly on what AS
can use to construct ATs, could/should be made more clear.

I can propose some specific text (building on James') if others in the WG agree?

On Mon, Mar 5, 2012 at 5:32 PM, Mike Jones <> wrote:
> I'm fine with changing the example to make it clearer that b64token allows a wider range of characters than just those legal for base64 and base64url encodings of data values.
> I'll add it to my to-do list for any additional edits for the Bearer spec.
>                                -- Mike
> -----Original Message-----
> From: [] On Behalf Of Manger, James H
> Sent: Monday, March 05, 2012 3:33 PM
> To: Brian Campbell; oauth
> Subject: Re: [OAUTH-WG] question about the b64token syntax in draft-ietf-oauth-v2-bearer
> Brian,
>> On casual reading of "The OAuth 2.0 Authorization Protocol: Bearer
>> Tokens"* I've encountered several people (including myself) who have
>> made the assumption that the name b64token implies that some kind of
>> base64 encoding/decoding on the access token is taking place between
>> the client and RS.
>> Digging a bit deeper in to "HTTP/1.1, part 7: Authentication"**,
>> however, I see that b64token is just an ABNF syntax definition
>> allowing for characters typically used in base64, base64url, etc.. So
>> the b64token doesn't define any encoding or decoding but rather just
>> defines what characters can be used in the part of the Authorization
>> header that will contain the access token.
>> Do I read this correctly?
> Yes.
>> If so, I feel like some additional clarifying text in the Bearer
>> Tokens draft might help avoid what is (based on my small sample) a
>> common point of misunderstanding.
> Changing the example bearer token should be a simple way to avoid some confusion by showing that it does not have to be base64 encoding. How about changing:
>  Authorization: Bearer vF9dft4qmT
> to
>  Authorization: Bearer vF9.dft4.qmT
> The Bearer spec has lots of (unnecessary) text about OAuth, but doesn't quite manage to be precise about how OAuth and Bearer connect. It could explicitly state that the string value of the "access_token" member of an access token response is the bearer token. The "access_token" string value (after unescaping any JSON-escapes) MUST match the b64token ABNF so it can be used with the Bearer HTTP scheme. Such text could be put in §5.1.1 where the "Bearer" OAuth access token type is defined.
>> Also, does the use of b64token implicitly limit the allowed characters
>> that an AS can use to construct a bearer access token?
> Yes.
>> *
>> **
> --
> James Manger
> _______________________________________________
> OAuth mailing list