Re: [OAUTH-WG] OAuth & Protected feeds

Torsten Lodderstedt <torsten@lodderstedt.net> Tue, 03 August 2010 11:52 UTC

Return-Path: <torsten@lodderstedt.net>
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 DE2CA3A69F2 for <oauth@core3.amsl.com>; Tue, 3 Aug 2010 04:52:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.555
X-Spam-Level:
X-Spam-Status: No, score=-0.555 tagged_above=-999 required=5 tests=[AWL=-0.165, BAYES_20=-0.74, HELO_EQ_DE=0.35]
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 q9yjbBSH9zhk for <oauth@core3.amsl.com>; Tue, 3 Aug 2010 04:52:39 -0700 (PDT)
Received: from smtprelay03.ispgateway.de (smtprelay03.ispgateway.de [80.67.31.26]) by core3.amsl.com (Postfix) with ESMTP id 39B723A6A15 for <oauth@ietf.org>; Tue, 3 Aug 2010 04:52:38 -0700 (PDT)
Received: from tmo-098-40.customers.d1-online.com ([80.187.98.40] helo=[127.0.0.1]) by smtprelay03.ispgateway.de with esmtpa (Exim 4.68) (envelope-from <torsten@lodderstedt.net>) id 1OgG33-0003UN-EG; Tue, 03 Aug 2010 13:53:00 +0200
Message-ID: <4C5802F0.3030007@lodderstedt.net>
Date: Tue, 03 Aug 2010 13:52:16 +0200
From: Torsten Lodderstedt <torsten@lodderstedt.net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.9.1.11) Gecko/20100711 Thunderbird/3.0.6
MIME-Version: 1.0
To: "Manger, James H" <James.H.Manger@team.telstra.com>
References: <AANLkTimwyOzk6CS_L9Acj47EXtVH5qLL__3TLW7LL3Kr@mail.gmail.com> <255B9BB34FB7D647A506DC292726F6E11267E04D61@WSMSG3153V.srv.dir.telstra.com>
In-Reply-To: <255B9BB34FB7D647A506DC292726F6E11267E04D61@WSMSG3153V.srv.dir.telstra.com>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
X-Df-Sender: 141509
Cc: "oauth@ietf.org" <oauth@ietf.org>
Subject: Re: [OAUTH-WG] OAuth & Protected feeds
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, 03 Aug 2010 11:52:41 -0000

James,
> This example illustrates that OAuth2 discovery needs to let a service
> explicitly indicate whether a direct and/or user-delegation flow is required.
> For instance, a "WWW-Authenticate: OAuth2" response could define 2 parameters:
> 'user-uri' and 'token-uri'. If only one is present, only the corresponding mode
> is useful in this interaction.
>    

In my opinion, this decision is up to the authorization server and not 
the resource server.

egards,
Torsten.

>
> Another interesting facet of this example is what token the app uses
> at step 4. Is it the token the app got in the first OAuth2 flow (step 1),
> or the token from the second OAuth2 flow (step 3)?
>
> Presumably the second token overrides the first.
> In this example, however, it may be sufficient to keep using the first token.
> OAuth2 doesn’t need to make returning a token mandatory -- it is not
> always required in a user-delegation flow.
>
> --
> James Manger
>
>
>
> -----Original Message-----
> From: oauth-bounces@ietf.org [mailto:oauth-bounces@ietf.org] On Behalf Of Darren Bounds
> Sent: Thursday, 29 July 2010 6:29 AM
> To: oauth@ietf.org; pubsubhubbub@googlegroups.com; federated-social-web@googlegroups.com
> Subject: [OAUTH-WG] OAuth&  Protected feeds
>
> Please excuse the cross posting.
>
> Following the Federated Social Web Summit in Portland a couple weeks
> ago, there has been a lot of chatter around protected feeds and how
> they'll function to achieve SWAT0
> (http://federatedsocialweb.net/wiki/SWAT0)  Protected feed
> subscriptions are clearly an important component of DiSo and necessary
> for features like remote follow/friending.
>
> During the summit Brett Stlakin published and discussed a document
> (http://tinyurl.com/push-oauth) where he proposes one technique for
> how OAuth may be used with PuSH to achieve the requirements. The
> proposal details an OAuth 2 flow (in addition to OAuth 1x) for
> handling a usecase that involves ToS acknowledgement before a
> protected feed subscription may be granted. The flow is essentially
> the web server client profile combined with the assertion grant type.
> While the flow will work and achieve the goals it also has a
> fundamental need for a user-agent redirect, something that not all
> providers may desire or require.
>
> What I'd like to propose is a variant of the assertion grant type that
> would make the user-agent redirect optional. The goal here was to stay
> within the bounds of the current spec where ever possible. That said;
> it may be desirable to break this out into it's own client profile.
>
> The flow detailed below is using the OAuth 2 scenario described in
> Brett's document (http://tinyurl.com/push-oauth)
>
> 1) cliqset.com would like to request an access token from google.com.
> Sends a request with grant_type=assertion.
>
> Request:
> POST /token HTTP/1.1
> Host: google.com
> Content-Type: application/x-www-form-urlencoded
>
> grant_type=assertion&assertion_type=http://webfinger.org/&
> assertion=eyJ1cmkiOiAiYWNjdDpkYm91bmRzQGNsaXFzZXQuY29tIiwibWFnaWNfc2lnbmF0dXJlIjogImFzZGxra2xhZnNkamtsZHNmamxraj0ifQ==
>
> The assertion value in the request is a Base64 encoded JSON string
> with two properties, uri and magic_signature. Example:
>
> {
>   "uri": "acct:dbounds@cliqset.com",
>   "magic_signature": "asdlkklafsdjkldsfjlkj="
> }
>
> Response:
> HTTP/1.1 200 OK
> Content-Type: application/json
> Cache-Control: no-store
>
> {
>   "access_token":"supersecrettoken"
>   "precondition_uri","http://google.com/oauth/authorize?state=opaquevalue
>   "code","myrandomcode123"
> }
>
> The access token response introduces two new optional properties:
> precondition_uri and code
>
> The existence of a precondition_uri means the consumer will be
> required to redirect the user to this uri in order to complete the
> activation of the provided access token.
>
> The precondition_uri resource has the same characteristics of the
> OAuth 2.0 Web Server client profile with the ‘state’ property being
> used to maintain state between the assertion request and the user
> redirect. Successful acknowledgement of the precondition results in a
> 302 response with the code provided in the assertion response (see
> example below).
>
> The existence of a code is required upon the presence of a precondition_uri.
>
> If no precondition_uri is provided, the access token should be
> considered active and immediately usable barring any provider specific
> back-end authorization (e.g. user acceptance of remote follow).
>
> 2) access token received optional precondition_uri. Issuing user
> redirect to precondition_uri with redirect_uri.
>
> Request:
> GET /oauth/authorize?state=opaquevalue&response_type=token&client_id=acct:dbounds@cliqset.com&redirect_uri=http://cliqset.com/callback
> HTTP/1.1
> Host: google.com
>
> User acknowledges the precondition. This could be any number of
> activities, including authenticating.
>
>
> Response:
> HTTP/1.1 302 Found
> Location: http://cliqset.com/callback?code=myrandomcode123
>
> 3) Subscription has been authorized. ToS has been acknowledged. Compete.
>
> The consumer is able to activate the access_token by confirming the
> code provided in the redirect.
>
> This flow offers what we feel are several significant advantages over
> the hybrid approach.
>
> 1) Redirection becomes optional and is only required when the
> precondition_uri is defined by the provider in the access token
> response.
>
> 2) For providers who require TOS acknowledgement, it enables
> additional flexibility in how they go about it. For example, if a
> provider only requires TOS acknowledgement on the initial subscription
> request by a given user, subsequent requests will not provide a
> precondition_uri.
>
> 3) It is also worth exploring this flow as a suitable and more
> flexible alternative to the traditional Web Server flow.
>
>
> Questions? Comments? Suggestions?
>
>
> --
> darren bounds
> darren@cliqset.com
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth
>