Re: [OAUTH-WG] Client Credential Expiry and new Registration Access Token - draft-ietf-oauth-dyn-reg-10

John Bradley <ve7jtb@ve7jtb.com> Sat, 18 May 2013 07:07 UTC

Return-Path: <ve7jtb@ve7jtb.com>
X-Original-To: oauth@ietfa.amsl.com
Delivered-To: oauth@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 62D2221F93EB for <oauth@ietfa.amsl.com>; Sat, 18 May 2013 00:07:46 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.235
X-Spam-Level:
X-Spam-Status: No, score=-2.235 tagged_above=-999 required=5 tests=[AWL=0.364, BAYES_00=-2.599]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1-YxkyMBFOoz for <oauth@ietfa.amsl.com>; Sat, 18 May 2013 00:07:45 -0700 (PDT)
Received: from mail-wg0-x236.google.com (mail-wg0-x236.google.com [IPv6:2a00:1450:400c:c00::236]) by ietfa.amsl.com (Postfix) with ESMTP id A9CBB21F93B1 for <oauth@ietf.org>; Sat, 18 May 2013 00:07:44 -0700 (PDT)
Received: by mail-wg0-f54.google.com with SMTP id x12so4022915wgg.9 for <oauth@ietf.org>; Sat, 18 May 2013 00:07:43 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:content-type:mime-version:subject:from:in-reply-to:date :cc:message-id:references:to:x-mailer:x-gm-message-state; bh=HSvOXGxvKoF1SVjOYCKdYWCHrdz/7dKfvTngljdWXJ4=; b=EYZsPg7TG0RxDZ7yWKRUwJqShTgWO9Ter7y+FhInZBMDGgXknqk7DlP9+acHVH40OF k7HPDvCy1TNZewqRgeQbhLbEoo1xVD91Uwua7VZtfJ/dzbcxNUjAvKyn40RtWvTqodIW WgM1lJrP/3TZ5pBbRbPY1hTmnU08pXxUqNCcb5VXXt8zo2w530KQ16gOUKhAql+2MuI7 GfdsfRQsC/yY7Hj3ZAsik8ByTOIgx5mZiZ2XWuLcrY2IPLBLCWSWCDlgh6SNPoLXBM8a Wkjb7DlKFy/WF5tHtZdegdjgNDOov1Cj7lTxYo9xqEEiRf975Gh5OOZkXaQ7/PAx5ZVY xjLw==
X-Received: by 10.194.86.37 with SMTP id m5mr4157614wjz.37.1368860863566; Sat, 18 May 2013 00:07:43 -0700 (PDT)
Received: from [10.121.233.103] ([195.50.165.102]) by mx.google.com with ESMTPSA id h8sm935308wiz.9.2013.05.18.00.06.55 for <multiple recipients> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 18 May 2013 00:07:42 -0700 (PDT)
Content-Type: multipart/signed; boundary="Apple-Mail=_002B8E34-42AF-4FA2-90C7-669C6F77B53F"; protocol="application/pkcs7-signature"; micalg="sha1"
Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\))
From: John Bradley <ve7jtb@ve7jtb.com>
In-Reply-To: <99D23FB9-19C3-40DF-9989-30F6686091DA@oracle.com>
Date: Sat, 18 May 2013 09:06:50 +0200
Message-Id: <B1A4EC82-283F-4A65-B821-E26F3FF76AC2@ve7jtb.com>
References: <C0CE9538-4B72-4882-9462-B08A2D386720@oracle.com> <51965446.2070404@mitre.org> <84E4E4E6-EA02-4141-BA6D-77A0B3F76E7A@oracle.com> <3701BFCE-3D0F-45A3-955E-7486904B98B3@ve7jtb.com> <99D23FB9-19C3-40DF-9989-30F6686091DA@oracle.com>
To: Phil Hunt <phil.hunt@oracle.com>
X-Mailer: Apple Mail (2.1503)
X-Gm-Message-State: ALoCoQknjq7K7uFW8b52sj8kIOVLrssXmQrkSED3E6wN/4Pqx3hSZZ/yt3k3x+itoFTaQTukXxHw
Cc: "oauth@ietf.org WG" <oauth@ietf.org>
Subject: Re: [OAUTH-WG] Client Credential Expiry and new Registration Access Token - draft-ietf-oauth-dyn-reg-10
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
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: Sat, 18 May 2013 07:07:46 -0000

From what I have seen deployed, there are four common flows for registration.

1 2 developer uses a tool to register a client ID and place that in the client code for deployment of a native App that is distributed via an app store for a 3rd party API.   The developer may later need to make changes to the registration as they develop the client and add functionality without changing the client_id which would effectively invalidate all user consent as consent is by client_id.

2 A client such as a web server (Think SAML SP) has a user turn up and identify themselves via a email address that be de-refrenced by say web finger to find a service for the API the client knows about and wants permission to access. The client learns the registration endpoint and registers itself for a client_id at the endpoint and can then do OAuth 2 autherization with the AS for the user.

3 A client such as a web server wants to connect to a new AS.  They try 2 but get an error for dynamic registration indicating they need a credential to register.  A admin is notified and goes to some AS portal for developers and register an account perhaps validating a email and phone number for contact as well as agreeing to the AS's terms of service.  They then receive an access token for the registration endpoint that they cut and paste into there app to do the actual registration.  

4 A client such as a web server wants to connect to a new AS.  They try 2 but get an error for dynamic registration indicating they need a credential to register.  A admin is notified and goes to some AS portal for developers and register an account perhaps validating a email and phone number for contact as well as agreeing to the AS's terms of service.  The developer must then enter all there redirect URI keys and other configuration info manually into a form. Then gets another form or email with a key and client_id that they use to configure the app.  If the client secret expires they must use there developer account to login and get a new client secret.   This is what we are trying to automate with dynamic client registration.

Uncommon but needed: In a version of 3 the developer may be registering a client class with certain constraints that override the dynamic registration of the class.  They then get back the "Registration Access Token" and put that in a native app to be distributed.  The native app may then create its own keypair unique to that instance and proceed to register itself and get a per instance client_id (but bound to the class at the AS) this would allow a native app to be confidential( Some might see that as a good thing).   The native app then uses the new "Registration Access Token" it is granted to manage its settings.
The original API developer based on there developer credentials that generated the original or class "Registration Access Token" could manage the class including revoking it.   This higher level class management design is allowed by the current spec but needs another spec to flesh it out.  This is perhaps part of the 5% you are looking for.

The "Registration Access Token" is for a different resource than what ever the actual API  is.  It is also not a client secret password and may have much higher entropy as it is a token and not subject to limitations of http basic implementations.     The initial "Registration Access Token" manages a class (might only be one entity in the class) it is an access token so can have scopes.  A possibility for 5 would be something like crate, update and read.  In 5 the token would only have create.  The second "Registration Access Token" that is instance specific would have more rights but only for its instance client_id.    In the design there are two "Registration Access Token"  that are separate form client credentials at the token endpoint because they are possibly used by different entities for operations on different subjects in the registration API.    It is possible that in an extension we could allow for the developer portal to provide access tokens with perhaps a delete scope for the class rather than the instance if that is perhaps one of the things you are looking for.   

I think the higher level management of classes of clients deserves it's own profile.   We need to ensure we are not blocking it with what we are doing in dynamic registration.

John B.
On 2013-05-18, at 1:29 AM, Phil Hunt <phil.hunt@oracle.com> wrote:

> John,
> 
> Thanks for jumping in.
> 
> 1.  I do buy the implied argument that some client credential types do expire (eg. bearer assertions). Therefore the expiry issue has to be dealt with.  I would prefer to handle this by allowing an exception whereby expired assertions could be used to re-register (only). This shouldn't be a big security issue since we're talking about an expired client refreshing with its issuer rather then a third party trusting an expired token. 
> 
> I just don't think adding another token, the registration access token, that in turn (by your argument) should expire, actually helps.  It just adds another layer to the problem and increases complexity.  It solves nothing.
> 
> 2. You seem to be describing a different usage than Justin is.  The way he explains the draft, there is no developer cycle at all.  He's saying every client gets a registration token and a client token.
> 
> Phil
> 
> @independentid
> www.independentid.com
> phil.hunt@oracle.com
> 
> 
> 
> 
> 
> On 2013-05-17, at 10:40 AM, John Bradley wrote:
> 
>> 1 No reasonable security profile is going to let you use the same symmetric password over long time periods.  It will be brute forced given enough time.   
>> The rotation time will depend on entropy and the rate an attacker can submit attempts.    I would expect profiles to look at SP-800-63 for guidance as essentially a password for the client.
>> 
>> 2 the registration interface is likely used by a developer who probably doesn't want the client instances (say native clients) to be able to update the configuration directly.  using the client secret credential for updates would break the separation.   Registration my be done by the client itself or by a developer as a separate process.
>> 
>> John B.
>> 
>> On 2013-05-17, at 7:27 PM, Phil Hunt <phil.hunt@oracle.com> wrote:
>> 
>>> Justin,
>>> 
>>> Your reason was you copied connect. Ok. I was looking for a technical reason.  A security reason.
>>> 
>>> BTW.  Mike Jones says expiry wasn't the reason.  
>>> 
>>> Phil
>>> 
>>> @independentid
>>> www.independentid.com
>>> phil.hunt@oracle.com
>>> 
>>> 
>>> 
>>> 
>>> 
>>> On 2013-05-17, at 9:01 AM, Justin Richer wrote:
>>> 
>>>> The separation between these two is necessary: Not all clients have client_secret, and you want the lifecycle/management of the registration to be protected. This is what the registration access token was made for. In older versions of Connect's registration, the client_secret was forced on all clients in order to provide this, but then you had public clients with a client_secret that they couldn't use to get tokens, and it was a bad disconnect.
>>>> 
>>>> The requirement for client secrets to expire or otherwise be rotated by the server came from several implementors in the Connect WG. There's an easy way to indicate that they don't expire, and a fairly straightforward way for them to be rotated (client does a GET on its client configuration endpoint url, with its registration access token as auth).
>>>> 
>>>> -- Justin
>>>> 
>>>> On 05/16/2013 05:35 PM, Phil Hunt wrote:
>>>>> All,
>>>>> 
>>>>> In the dynamic registration draft, a new token type is defined called the "registration access token". Its use is intended to facilitate clients being able to update their registration and obtain new client credentials over time.  The client credential is issued on completion of the initial registration request by a particular client instance.
>>>>> 
>>>>> It appears the need for the registration access token arises from the implied assertion that client credentials should expire.
>>>>> --> Is anyone expiring client credentials?
>>>>> 
>>>>> To date, we haven't had much discussion about client credential expiry. It leads me to the following questions:
>>>>> 
>>>>> 1.  Is there technical value with client credential/token expiry?  Keep in mind that client credential is only used with the token endpoint over TLS connection. It is NOT used to access resources directly.
>>>>> 
>>>>> 2.  If yes, on what basis should client credential/token expire?
>>>>> a.  Time?
>>>>> b.  A change to the client software (e.g. version update)?
>>>>> c.  Some other reason?
>>>>> 
>>>>> 3. Is it worth the complication to create a new token type (registration access token) just to allow clients to obtain new client tokens?  Keep in mind that client tokens are only usable with the AS token endpoint.  Why not instead use a client token for dyn reg and token endpoint with the rule that once a client token has expired (if they expire), an expired token may still be used at the registration end-point.
>>>>> 
>>>>> 4. Are there other reasons for the registration token?
>>>>> 
>>>>> Thanks,
>>>>> 
>>>>> Phil
>>>>> 
>>>>> @independentid
>>>>> www.independentid.com
>>>>> phil.hunt@oracle.com
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> _______________________________________________
>>>>> OAuth mailing list
>>>>> OAuth@ietf.org
>>>>> https://www.ietf.org/mailman/listinfo/oauth
>>>> 
>>> 
>>> _______________________________________________
>>> OAuth mailing list
>>> OAuth@ietf.org
>>> https://www.ietf.org/mailman/listinfo/oauth
>> 
>