Re: [OAUTH-WG] Flowchart for legs of OAuth

Phil Hunt <phil.hunt@oracle.com> Mon, 04 April 2011 18:00 UTC

Return-Path: <phil.hunt@oracle.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 273953A69C1 for <oauth@core3.amsl.com>; Mon, 4 Apr 2011 11:00:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.932
X-Spam-Level:
X-Spam-Status: No, score=-5.932 tagged_above=-999 required=5 tests=[AWL=-0.573, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4, SARE_LWSHORTT=1.24]
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 8BddN7iA1j1P for <oauth@core3.amsl.com>; Mon, 4 Apr 2011 11:00:54 -0700 (PDT)
Received: from rcsinet10.oracle.com (rcsinet10.oracle.com [148.87.113.121]) by core3.amsl.com (Postfix) with ESMTP id DF0E43A69BC for <oauth@ietf.org>; Mon, 4 Apr 2011 11:00:53 -0700 (PDT)
Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p34I2XOY004316 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 4 Apr 2011 18:02:35 GMT
Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id p34I2VI0011101 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 4 Apr 2011 18:02:32 GMT
Received: from abhmt001.oracle.com (abhmt001.oracle.com [141.146.116.10]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p34I2U85031865; Mon, 4 Apr 2011 13:02:30 -0500
Received: from [192.168.1.8] (/24.85.235.164) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 04 Apr 2011 11:02:30 -0700
Mime-Version: 1.0 (Apple Message framework v1084)
Content-Type: text/plain; charset="us-ascii"
From: Phil Hunt <phil.hunt@oracle.com>
In-Reply-To: <65E3F250-5111-4692-BFA7-F5B838E9B41D@gmail.com>
Date: Mon, 04 Apr 2011 11:02:28 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <9E68D140-ED3D-4C62-A6A1-5CE1CDB5C5D9@oracle.com>
References: <22FB565B-A701-4502-818F-15164D9E201A@oracle.com> <AANLkTimGjiCGk5dpA=YVzq5vDkLR2+caSz=pZ5WiZO9H@mail.gmail.com> <3C84AD7A-F00F-43EC-AAD3-AD2DCFB46B0E@oracle.com> <90C41DD21FB7C64BB94121FBBC2E7234464F432BB0@P3PW5EX1MB01.EX1.SECURESERVER.NET> <4D84F7E2.6090305@redhat.com> <16B9A882-6204-4CBD-B7E3-1D806AF5056C@oracle.com> <4D8A5054.4050006@lodderstedt.net> <BANLkTiniuuRXtkzLubgOjVursVtOGjFe6A@mail.gmail.com> <7616C235-2913-4EE0-A710-F47A4CC9E424@oracle.com> <BANLkTi=XyF25vB6qKX2q8iOpEaZ1yQx9Jw@mail.gmail.com> <65E3F250-5111-4692-BFA7-F5B838E9B41D@gmail.com>
To: Kris Selden <kris.selden@gmail.com>
X-Mailer: Apple Mail (2.1084)
X-Source-IP: acsmt357.oracle.com [141.146.40.157]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090204.4D9A07B8.00F1:SCFSTAT5015188,ss=1,fgs=0
Cc: oauth@ietf.org
Subject: Re: [OAUTH-WG] Flowchart for legs of OAuth
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, 04 Apr 2011 18:00:55 -0000

See below...

Phil
phil.hunt@oracle.com




On 2011-04-04, at 10:47 AM, Kris Selden wrote:

> A typical iPhone app cannot be shipped with a client secret and rightly or wrongly users expect to only have to enter their credentials once.

My understanding (and I'm not an iOS expert) is that each iOS application has a secure keystore where the client credential could be stored. I am told this is fairly straight forward. The client app would issue a call out to the external safari browser for the authorization with a redirect back to the app registered (local redirect) such as myapp://authorization_code

Note that in security considerations it is recommended against having an app collect user credentials directly. It is always preferred to use the external browser. This is so that the user can see the UI as being legit and that appropriate security measures are in place. It also protects the client app from problems that might occur from screen scraping a service provider UI that is subject to change.
> 
> What is the best profile to use for an app that can't have a client secret and needs a refresh token or a long lived access token?

You can use the typical client credential flow as per my comment above.  If no client credential you are forced to use "Implicit" which I don't believe was intended for these types of apps. Note that Implicit also is restricted to uid/password type user credential.
> 
> Why doesn't implicit_grant have a refresh_token? I would think a non-expiring access_token like FB offline_access would be worse option since it is transmitted to more end points.

The issuing of a token in Implicit flow depends solely on the authentication of the end-user. Without client credentials you can't authenticate the client to refresh the token. Thus you must repeat the implicit flow every time.

> 
> A lot of FB Connect sites request offline_access when you connect. Like Foursquare, Quora, Gowalla for example.
> 
> On Mar 31, 2011, at 6:00 PM, Marius Scurtescu wrote:
> 
>> On Thu, Mar 31, 2011 at 4:56 PM, Phil Hunt <phil.hunt@oracle.com> wrote:
>>> Done.
>>> 
>>> It isn't quite what the flow shows in the earlier diagram. I was originally avoiding client type and trying to focus on section 4 options.
>>> 
>>> But this should be a better diagram.
>>> 
>>> http://independentidentity.blogspot.com/2011/03/oauth-flows-extended.html
>> 
>> A native app with no client secret is still advised to use the
>> implicit grant, which is wrong IMO.
>> 
>> The right question I think is "does the client need long term offline access"?
>> 
>> JavaScript clients typically don't need offline access (only with the
>> user at the browser). Some native apps and web apps could be OK with a
>> short term offline access, one off import for example.
>> 
>> Marius
>> _______________________________________________
>> OAuth mailing list
>> OAuth@ietf.org
>> https://www.ietf.org/mailman/listinfo/oauth
>> 
>