Re: [OAUTH-WG] Token Chaining Use Case

Bill Mills <wmills_92105@yahoo.com> Thu, 26 March 2015 20:13 UTC

Return-Path: <wmills_92105@yahoo.com>
X-Original-To: oauth@ietfa.amsl.com
Delivered-To: oauth@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 98FD81B2E39 for <oauth@ietfa.amsl.com>; Thu, 26 Mar 2015 13:13:31 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.509
X-Spam-Level:
X-Spam-Status: No, score=-1.509 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, FREEMAIL_REPLYTO_END_DIGIT=0.25, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8_9fSewEPXjF for <oauth@ietfa.amsl.com>; Thu, 26 Mar 2015 13:13:28 -0700 (PDT)
Received: from nm32-vm4.bullet.mail.bf1.yahoo.com (nm32-vm4.bullet.mail.bf1.yahoo.com [72.30.239.140]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 74F4B1B2E36 for <oauth@ietf.org>; Thu, 26 Mar 2015 13:13:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1427400807; bh=zBfnBfxEaqrCxYgQV5h08cS0yoqwsFSW8saztNPRANo=; h=Date:From:Reply-To:To:In-Reply-To:References:Subject:From:Subject; b=FH112rIQEWcEViXDWxQwE+XKVC/ftb/OyILVrEcxzWecUZ9znfENMI1sred0wwqlf8nVMmRYL9aWBQutLE/mqN+S8I8mRs8gwKwrTwg8w1QeSLUB8gOndL/gVfVdtejREPYpKVaWg0++RGD5FeLSpXRZe9Igc50mtvHvhPAtnNB5kJHePyIt4BhDAOnEo7g0YaQg+VJmKeB8W2V8G7hAt/UUcMcxQYb8N3KClY9lGxQcnusw4528O+eBJXZxAPi38+oJ1E5k8KYaJ7SfAzTspvcARGWKi+fee26rz+BTIERg2xj9py7+J0jrWFgcEs0JhOmXA+MtW0YZ48vAWgNW8w==
Received: from [66.196.81.170] by nm32.bullet.mail.bf1.yahoo.com with NNFMP; 26 Mar 2015 20:13:27 -0000
Received: from [98.139.212.216] by tm16.bullet.mail.bf1.yahoo.com with NNFMP; 26 Mar 2015 20:13:27 -0000
Received: from [127.0.0.1] by omp1025.mail.bf1.yahoo.com with NNFMP; 26 Mar 2015 20:13:27 -0000
X-Yahoo-Newman-Property: ymail-3
X-Yahoo-Newman-Id: 613317.64682.bm@omp1025.mail.bf1.yahoo.com
X-YMail-OSG: ExkaIU8VM1lSKiKQRSPfCZ1Dvny0i.q2tfXerCeKGCIuzdpLne.ZLpXT1Ookukf EnaIsLC_RpcYiZGs7Rp6enM5WCYz6OhD305NhYAAkmI_SW_CqusviBWkVMZhbBqJ.E7htilreT8D wnqimsai5inccLi3AMtZWQpMl56irg50PH7TqL2N2aU6EPpW2n7ywCZmnzOEu_CkCiNq9M87ww7R oXT62gUvOdRpjOLaW2CcSRraHUn4m5BUX0Y.Q6iDsSjdPvleNFdFSTte5WUgb.S86S0i2dxdtd8v wDW9n3_a.d5iFyBC3zqPqJnRjZerbvzc78uEi0WeWSoJ.nSIcqIz3T1uC0i.JRotUnzEuOhLUcnM QIZJDYlkjJtjgQ7keEuypzeWt9PXCAAOLhNAcDeksxr3D5qCsIpTR.NJgVRb6GsFOCBN8qnm6Lvy v18z2zSaVSDEfbZomv614d.vqen.VEXsrAekCWxeyBetSY0k3j9JAGxRi6ebgnalpp8x2kWTd6f1 nMuw9Jyz5wPOZ1ZkFqsiW0CJ6TSiw9TIQSVMS_yfI
Received: by 76.13.26.159; Thu, 26 Mar 2015 20:13:27 +0000
Date: Thu, 26 Mar 2015 20:13:26 +0000
From: Bill Mills <wmills_92105@yahoo.com>
To: Justin Richer <jricher@mit.edu>, "<oauth@ietf.org>" <oauth@ietf.org>
Message-ID: <583669811.2960904.1427400806728.JavaMail.yahoo@mail.yahoo.com>
In-Reply-To: <9c1sdvnf558khwgomc9by3ys.1427398956170@email.android.com>
References: <9c1sdvnf558khwgomc9by3ys.1427398956170@email.android.com>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_Part_2960903_1937475469.1427400806723"
Archived-At: <http://mailarchive.ietf.org/arch/msg/oauth/5i31IUgFlKbkMvsTj09FZAMnAQc>
Subject: Re: [OAUTH-WG] Token Chaining Use Case
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: Bill Mills <wmills_92105@yahoo.com>
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, 26 Mar 2015 20:13:31 -0000

By definition an access token is becoming a form of refresh token.    The "because my implementation didn't do it that way" isn't convincing me. 


     On Thursday, March 26, 2015 12:44 PM, Justin Richer <jricher@mit.edu> wrote:
   

  Because many implementations (including mine which does support my old token chaining draft) treat access tokens and refresh tokens separately in terms of data store and structure. Additionally, the refresh token is tied to the client and presented by the client. But in this case it's someone downstream, an RS, presenting the token. So unlike a refresh token being presented by the one it was issued to, this token is being presented by someone it was presented to. 
The feeling is close, but not quite the same in either development or assumptions.
-- Justin
/ Sent from my phone /

-------- Original message --------
From: Bill Mills <wmills_92105@yahoo.com> 
Date: 03/26/2015 2:24 PM (GMT-06:00) 
To: Justin Richer <jricher@MIT.EDU>, "<oauth@ietf.org>" <oauth@ietf.org> 
Subject: Re: [OAUTH-WG] Token Chaining Use Case 

So why can't the access tokne simply be re-used as a refresh token?  Why would it need a new grant type at all?
 


     On Thursday, March 26, 2015 11:31 AM, Justin Richer <jricher@MIT.EDU> wrote:
   

 As requested after last night’s informal meeting, here is the token chaining use case that I want to see represented in the token swap draft.


[ Client ]  ->  [ A ] -> [ B ] -> [ C ]

An OAuth client gets an access token AT1, just like it always would, with scopes [A, B, C] in order to call service A, which requires all three scopes. Service A (an RS) accepts this token since it has its scope, and then needs to call service B in turn, which requires scopes [B, C]. It could just re-send the token it got in, AT1, but that would give the downstream RS the ability to call services with scope [ A ] and it should not be allowed to do that. To limit exposure, service A calls a token swap at the AS to create AT2 with scopes [ B, C ], effectively acting as an OAuth client requesting a downscoped token based on AT1. Service A then acts as an OAuth client to call service B, now acting as an RS to service A’s client, and can fulfill the request. And it’s turtles all the way down: Service B can also call service C, and now B acts as a client, requesting AT3 with scope [ C ] based on AT2, and sending AT3 to service C. This prevents C from being able to call B or A, both of which would have been available if AT1 had been passed around. Note that service A or the Client can also request a downscoped token with [ C ] to call service C directly as well, and C doesn’t have to care how it got there.


In other words, it lets the client software be very, very dumb. It doesn’t have to do any special processing, doesn’t have to know what’s in the token, it just follows the recipe of “I got a token, I get another token based on this to call someone else”. It’s also analogous to the refresh token flow, but with access tokens going in and out. I’ve deployed this setup several times in different service deployments. Even though there is a performance hit in the additional round trips (as Phil brought up in another thread), in these cases the desire to have the tokens hold least privilege access rights (smallest set of scopes per service) outweighed any performance hit (which was shown to be rather small in practice).

What I want is for the token swap draft to define or use a mechanism that allows us to do this. I think we can do that pretty easily by adjusting the token swap syntax and language, and explicitly calling out the semantic processing portion (the current core of the document) for what it is: a way for a token issuer to communicate to a token service specific actions. At a high level, the spec would be something like:



1. How to swap a token at an AS
  1. Send a request to the token endpoint with a new grant type, and a token (of any type/format/flavor) on the way in
  2. Get back a new token in a token response
2. Communicating act as / on behalf of semantics via a JWT assertion
  1. How to create (as an AS/RS/client/other issuer) a JWT with act-as semantics
  2. What to do (as an AS/RS) with a JWT with act-as semantics
  3. How to create a JWT with on-behalf-of semeantics
  4. What to do with a JWT with on-behalf-of-semantics
  5. How to possibly represent these semantics with something other than a JWT



Section 2 uses the syntax from section 1. Other applications, like the one I laid out above, can use the syntax from section 1 as well. This works for structured, unstructured, self-generated, cross-domain, within-domain, and other tokens.


 — Justin
_______________________________________________
OAuth mailing list
OAuth@ietf.org
https://www.ietf.org/mailman/listinfo/oauth