Re: [OAUTH-WG] Partially standardized format for access tokens?

Brian Eaton <beaton@google.com> Tue, 08 June 2010 15:35 UTC

Return-Path: <beaton@google.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 25D183A69C3 for <oauth@core3.amsl.com>; Tue, 8 Jun 2010 08:35:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -100.677
X-Spam-Level:
X-Spam-Status: No, score=-100.677 tagged_above=-999 required=5 tests=[AWL=-1.300, BAYES_50=0.001, FM_FORGED_GMAIL=0.622, USER_IN_WHITELIST=-100]
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 cG43ncF-S-NF for <oauth@core3.amsl.com>; Tue, 8 Jun 2010 08:35:50 -0700 (PDT)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.35]) by core3.amsl.com (Postfix) with ESMTP id BF9363A697D for <oauth@ietf.org>; Tue, 8 Jun 2010 08:35:49 -0700 (PDT)
Received: from hpaq11.eem.corp.google.com (hpaq11.eem.corp.google.com [172.25.149.11]) by smtp-out.google.com with ESMTP id o58FZl0M016888 for <oauth@ietf.org>; Tue, 8 Jun 2010 08:35:47 -0700
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1276011348; bh=RlG7e3uPEDIqvQy8x4cg9atsEOY=; h=MIME-Version:In-Reply-To:References:Date:Message-ID:Subject:From: To:Cc:Content-Type:Content-Transfer-Encoding; b=B449DlC40HKnwrP2+XMCbO3EJiWEWmQHstV/q2i9o5pifufLpdRfUkRgyYIdnqN4a tb1pPGSMipxW+0vsmx43Q==
DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=mime-version:in-reply-to:references:date:message-id:subject:from:to: cc:content-type:content-transfer-encoding; b=slI/pLv8oOm8K5nzYdJlS5xvH1I0tg5RYAjcqwFnNM1T9k7vSUe6nW9VBSkScRrcV ZlNcISdGRZGPckfU/b/5g==
Received: from pwj10 (pwj10.prod.google.com [10.241.219.74]) by hpaq11.eem.corp.google.com with ESMTP id o58FZkH1015004 for <oauth@ietf.org>; Tue, 8 Jun 2010 08:35:46 -0700
Received: by pwj10 with SMTP id 10so310123pwj.24 for <oauth@ietf.org>; Tue, 08 Jun 2010 08:35:45 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.142.5.29 with SMTP id 29mr877205wfe.102.1276011345598; Tue, 08 Jun 2010 08:35:45 -0700 (PDT)
Received: by 10.142.207.21 with HTTP; Tue, 8 Jun 2010 08:35:45 -0700 (PDT)
In-Reply-To: <255B9BB34FB7D647A506DC292726F6E11263E5DA7C@WSMSG3153V.srv.dir.telstra.com>
References: <AANLkTinQTV9JJPiftquRbvdqAOHxUXk7QQKCMrmQ4LLK@mail.gmail.com> <B549E6C4-A24D-4032-8A26-89ED58EBAA34@facebook.com> <4C090B6C.9030707@aol.com> <B6D1E6FF-D65F-4FD6-B148-C17550421FC9@facebook.com> <AANLkTilj0xG6SjHrzkd9Ca-N67J7IlsTNAOkyFdjQ62I@mail.gmail.com> <ED86A2AA-56D5-4DC6-B896-48A850EED3B2@facebook.com> <4C0930B2.80802@aol.com> <AANLkTimupEDpBUjg4iwwhPQ41ZKcryMcpVjJumXNIjP0@mail.gmail.com> <255B9BB34FB7D647A506DC292726F6E11263E5DA7C@WSMSG3153V.srv.dir.telstra.com>
Date: Tue, 08 Jun 2010 08:35:45 -0700
Message-ID: <AANLkTinXiBNBkiPbhELtoIUSGF08S9t3WSDH4OQfP8EW@mail.gmail.com>
From: Brian Eaton <beaton@google.com>
To: "Manger, James H" <James.H.Manger@team.telstra.com>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
Cc: "OAuth WG (oauth@ietf.org)" <oauth@ietf.org>
Subject: Re: [OAUTH-WG] Partially standardized format for access tokens?
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: Tue, 08 Jun 2010 15:35:51 -0000

On Sun, Jun 6, 2010 at 8:14 PM, Manger, James H > Defining an optional
prefix for access_token values to indicate the format would work well.
> I suggest a plain text label separated by, say, a "." from the rest of the value. For example:
>  access_token=saml.fhHFhgf6575fhgFGrytr
> There can be an IANA registry for prefixes if that is helpful.
> A service currently supporting a single token format can start its access_token values with "." so at least they will not accidentally clash with any future values that do specify a format.
>  access_token=.6786345_JGJSgfjhsgfhj-ss_s
> A service that will never need token format interop doesn't need to using any prefix (empty or otherwise), and can use dots however it wants.

Slick!

Andrew brought up a good point about interop between multiple token
issuers.  But that can be solved by data *inside* the access token.
If a server really needs to crack open tokens from multiple issuers,
it would work like this:

parse the format off the front
decode the rest of the token according to the format
crack open the token to find a pointer to the issuer
use that information to verify the token

I don't think the prefix needs any kind of URI or namespacing.  New
token formats should be extremely rare.

Cheers,
Brian