Re: [OAUTH-WG] multiple access tokens from a single authorization flow?
"Keenan, Bill" <Bill_Keenan@intuit.com> Mon, 24 May 2010 17:05 UTC
Return-Path: <Bill_Keenan@intuit.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 5345C3A6D12 for <oauth@core3.amsl.com>; Mon, 24 May 2010 10:05:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.164
X-Spam-Level:
X-Spam-Status: No, score=-5.164 tagged_above=-999 required=5 tests=[AWL=-1.165, BAYES_50=0.001, RCVD_IN_DNSWL_MED=-4]
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 AY2YGsHOpWsj for <oauth@core3.amsl.com>; Mon, 24 May 2010 10:05:12 -0700 (PDT)
Received: from mail1.intuit.com (mail1.intuit.com [12.149.175.11]) by core3.amsl.com (Postfix) with ESMTP id 3B80C3A6E78 for <oauth@ietf.org>; Mon, 24 May 2010 10:04:49 -0700 (PDT)
DomainKey-Signature: s=default; d=intuit.com; c=nofws; q=dns; h=X-SBRS:X-IronPort-AV:Received:Received:MIME-Version: X-MimeOLE:Content-class:Content-Type: Content-Transfer-Encoding:Subject:Date:Message-ID: In-Reply-To:X-MS-Has-Attach:X-MS-TNEF-Correlator: Thread-Topic:Thread-Index:References:From:To:Return-Path: X-OriginalArrivalTime; b=ipDkF06imKlAvlLBTa6fEz+YMVjhALxkXB36o6IAijDdphPz8PMEKt4k fxQm/kYjfCdgm3+YSCYniBz4tZ5O7i5TImhzLVfnh71TmEPCne9ThWg9h HFlLdEyj4jDtTs3;
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intuit.com; i=Bill_Keenan@intuit.com; q=dns/txt; s=default; t=1274720681; x=1306256681; h=mime-version:content-transfer-encoding:subject:date: message-id:in-reply-to:references:from:to; z=MIME-Version:=201.0|Content-Transfer-Encoding:=20base64 |Subject:=20RE:=20[OAUTH-WG]=20multiple=20access=20tokens =20from=20a=20single=20authorization=20flow?|Date:=20Mon, =2024=20May=202010=2010:04:37=20-0700|Message-ID:=20<5DEB 74B3E9FA574EAA911DB8167C559E159752@SDGEXEVS12.corp.intuit .net>|In-Reply-To:=20<4BFAA6AB.8040809@lodderstedt.net> |References:=20<4BFAA6AB.8040809@lodderstedt.net>|From: =20"Keenan,=20Bill"=20<Bill_Keenan@intuit.com>|To:=20<oau th@ietf.org>; bh=P+iM/vl43TVphSAl9ZtDsuBIoC/H9R7F5bxRT2wj1JU=; b=aBMM+CagdCDdXuaVn6e3+J4ogub9Ulwk3xDj6Tu4A/8ApI/QqA2Kro1h RC6UD56QCitQkouhsX2gMHsEvmFe3REhtDfW0CDkI+vqixL788BB4ZW4F fromBdZeliGxMrj;
X-SBRS: None
X-IronPort-AV: E=Sophos;i="4.53,292,1272870000"; d="scan'208";a="224286396"
Received: from relay-ex.sd.intuit.com (HELO SDGEXBH03.corp.intuit.net) ([172.17.135.77]) by mail1.sdg.ie.intuit.com with ESMTP; 24 May 2010 10:04:39 -0700
Received: from SDGEXEVS12.corp.intuit.net ([172.17.135.111]) by SDGEXBH03.corp.intuit.net with Microsoft SMTPSVC(6.0.3790.4675); Mon, 24 May 2010 10:04:37 -0700
MIME-Version: 1.0
X-MimeOLE: Produced By Microsoft Exchange V6.5
Content-class: urn:content-classes:message
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
Date: Mon, 24 May 2010 10:04:37 -0700
Message-ID: <5DEB74B3E9FA574EAA911DB8167C559E159752@SDGEXEVS12.corp.intuit.net>
In-Reply-To: <4BFAA6AB.8040809@lodderstedt.net>
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
Thread-Topic: [OAUTH-WG] multiple access tokens from a single authorization flow?
Thread-Index: Acr7XKuVIikLhuSuSB20h2vFWcCcfwAAlCJg
References: <4BFAA6AB.8040809@lodderstedt.net>
From: "Keenan, Bill" <Bill_Keenan@intuit.com>
To: oauth@ietf.org
X-OriginalArrivalTime: 24 May 2010 17:04:37.0582 (UTC) FILETIME=[30FECEE0:01CAFB63]
Subject: Re: [OAUTH-WG] multiple access tokens from a single authorization flow?
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: Mon, 24 May 2010 17:05:14 -0000
Thanks Torsten for more of your good thinking and write-up... At Intuit, using 1.0a, we did an experiment with one of our mobile apps using multiple tokens. The programming model of having the client maintain a mapping of token to ROA endpoint, so they used the correct token turned out to be a headache. We bailed on this, and moved to a single token, and used a mechanism server-side to manage the principle of least-privilege. As all the resources the mobile app needed were hosted by Intuit, we had this option. As we get to apps doing mashups of entities from multiple data providers, apps will need to manage multiple tokens. At Intuit, we have been wrestling with scope for several months. With 100's going to 1000's of entities, which each have 4 - 15 verbs, expressing the set of endpoints, which a token should allow access to is complicated. I don't see an opportunity to normalize the complexity, so we are all interoperable on the cardinality of tokens to the protected resources an application needs from a specific provider. I'll push for single token in my world; others want multiple tokens (maybe). Experience pushes me towards providing the application developer a way to say everything they need, and getting a single token to use in accessing those endpoints. Much of our access control is built around an RBAC, so issuing a token with one or more roles would provide access to all the endpoints available to the role(s). The developer learns, from SDK documentation, the roles an API is available to. In our case, we don't want developers understanding how Intuit's datacenters are organized, so we would not want them getting multiple tokens because they thought they were crossing some boundary of our internal deployment. Right now, multiple tokens does not help me. I am sure it could help some. My caution to those going down the multi-token path is exposing more of your deployment than needed by having developers get tokens for specific areas. BillK -----Original Message----- From: oauth-bounces@ietf.org [mailto:oauth-bounces@ietf.org] On Behalf Of Torsten Lodderstedt Sent: Monday, May 24, 2010 9:18 AM To: OAuth WG (oauth@ietf.org) Subject: [OAUTH-WG] multiple access tokens from a single authorization flow? How many access tokens can be the result of a single OAuth authorization flow? A recent discussion about OpenID Connect on the OpenId mailing list raised that question and I would like to initiate a discussion on this list. Currently, every flow (and the refresh token request) results in a single access token and (optionally) a single refresh token. I think a single access token might not be enough when it comes to multiple scopes. Let's assume a client wants to access the calendar and contact list of an end-user. Since access to the corresponding resource servers is managed by the same authorization server, the resources are distinguished by different scopes, say "calendar" and "contacts". The client sends a request GET /authorize?type=web_server&client_id=s6BhdRkqt3&redirect_uri= https%3A%2F%2Fclient%2Eexample%2Ecom%2Fcb&scope=calendar%20contacts HTTP/1.1 Host: oauth.example.com and after the authorization flow has been conducted sucessfully, the client's access token request would be answered as follows. HTTP/1.1 200 OK Content-Type: application/json Cache-Control: no-store { "access_token":"SlAV32hkKG", "expires_in":3600, "refresh_token":"8xLOxBtZp8" } So the token "SlAV32hkKG" must be good for two different protected resources, "calendar" and "contacts". I think this works if: 1) the token is a handle that can be swoped for user identity and authorization data during service request or 2) it is a self-contained token AND both resources are provided by the same resource server. But what if the authorization server issues self-contained tokens and the resources are hosted on different, independent resource servers? Let's assume the authorization server issues self-contained, signed, and encrypted bearer tokens. Signature and encryption are based on shared secrets between authorization server and resource server. In such a scenario, operational security requires to issue different tokens with different signature values and to encrypt those tokens with different keys. Moreover, the resource servers might need different user attributes and permissions, so even the tokens payload might differ. I believe this scenario will become even more important with the advent of OpenID Connect. With OpenID connect, every client asking for an end-user's OpenID (+user data) and, additionally, authorization for another resource will need at least two tokens under the assumptions given above. In order to support such scenarios, I would propose to return an array of access tokens from every authorization flow and the refresh request. An authorization server should know which resources and scopes are handled by what resource servers and indicate this relation in the access tokens response structure. This structure could be as follows. HTTP/1.1 200 OK Content-Type: application/json Cache-Control: no-store { "access_tokens":[ { "token":"SlAV32hkKG", "scopes":["calendar"], "expires_in":3600}, { "token":"SlAV32hk34", "scopes":["contacts"], "expires_in":7200},], "refresh_token":"8xLOxBtZp8" } The scopes a particular access token is good for are indicated, so a client library is able to choose the right tokens for services requests. Alternatively it might suffice (or be better?) to indicate the sites a token is valid for (proposal of James Manger). It think there is no need for multiple refresh tokens because these tokens are handled by the authorization server only. In case all resources are handled by the same resource server, the result would look like HTTP/1.1 200 OK Content-Type: application/json Cache-Control: no-store { "access_tokens":[{ "token":"SlAV32hkKG", "expires_in":3600},], "refresh_token":"8xLOxBtZp8" } Thoughts? regards, Torsten. _______________________________________________ OAuth mailing list OAuth@ietf.org https://www.ietf.org/mailman/listinfo/oauth
- [OAUTH-WG] multiple access tokens from a single a… Torsten Lodderstedt
- Re: [OAUTH-WG] multiple access tokens from a sing… Keenan, Bill
- Re: [OAUTH-WG] multiple access tokens from a sing… Marius Scurtescu
- Re: [OAUTH-WG] multiple access tokens from a sing… Manger, James H
- Re: [OAUTH-WG] multiple access tokens from a sing… Marius Scurtescu
- Re: [OAUTH-WG] multiple access tokens from a sing… Manger, James H
- Re: [OAUTH-WG] multiple access tokens from a sing… Marius Scurtescu
- Re: [OAUTH-WG] multiple access tokens from a sing… Richer, Justin P.
- Re: [OAUTH-WG] multiple access tokens from a sing… Manger, James H
- Re: [OAUTH-WG] multiple access tokens from a sing… Luke Shepard
- Re: [OAUTH-WG] multiple access tokens from a sing… Torsten Lodderstedt
- Re: [OAUTH-WG] multiple access tokens from a sing… Marius Scurtescu
- Re: [OAUTH-WG] multiple access tokens from a sing… Torsten Lodderstedt
- Re: [OAUTH-WG] multiple access tokens from a sing… Marius Scurtescu
- [OAUTH-WG] Proposal: Redesigning the Refresh Toke… Thomas Hardjono
- Re: [OAUTH-WG] multiple access tokens from a sing… Lukas Rosenstock
- Re: [OAUTH-WG] multiple access tokens from a sing… Torsten Lodderstedt
- Re: [OAUTH-WG] multiple access tokens from a sing… Torsten Lodderstedt
- Re: [OAUTH-WG] multiple access tokens from a sing… Justin Richer
- Re: [OAUTH-WG] multiple access tokens from a sing… Torsten Lodderstedt
- [OAUTH-WG] proposal: multiple access tokens from … Torsten Lodderstedt
- Re: [OAUTH-WG] proposal: multiple access tokens f… Torsten Lodderstedt
- Re: [OAUTH-WG] proposal: multiple access tokens f… David Recordon
- Re: [OAUTH-WG] proposal: multiple access tokens f… Eran Hammer-Lahav
- Re: [OAUTH-WG] proposal: multiple access tokens f… Torsten Lodderstedt
- Re: [OAUTH-WG] proposal: multiple access tokens f… Eran Hammer-Lahav
- Re: [OAUTH-WG] proposal: multiple access tokens f… Breno
- Re: [OAUTH-WG] proposal: multiple access tokens f… Eran Hammer-Lahav
- Re: [OAUTH-WG] proposal: multiple access tokens f… Justin Richer
- Re: [OAUTH-WG] proposal: multiple access tokens f… Breno
- Re: [OAUTH-WG] proposal: multiple access tokens f… Manger, James H
- Re: [OAUTH-WG] proposal: multiple access tokens f… Eran Hammer-Lahav
- Re: [OAUTH-WG] proposal: multiple access tokens f… Torsten Lodderstedt
- [OAUTH-WG] I-D: multiple access tokens Torsten Lodderstedt
- Re: [OAUTH-WG] proposal: multiple access tokens f… Igor Faynberg
- Re: [OAUTH-WG] multiple access tokens from a sing… Thomas Hardjono
- Re: [OAUTH-WG] multiple access tokens from a sing… Torsten Lodderstedt
- Re: [OAUTH-WG] multiple access tokens from a sing… Thomas Hardjono
- Re: [OAUTH-WG] multiple access tokens from a sing… Richer, Justin P.
- Re: [OAUTH-WG] multiple access tokens from a sing… Thomas Hardjono
- Re: [OAUTH-WG] multiple access tokens from a sing… Dick Hardt
- Re: [OAUTH-WG] multiple access tokens from a sing… Torsten Lodderstedt