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

John Bradley <ve7jtb@ve7jtb.com> Tue, 21 May 2013 02:52 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 3894C21F8F83 for <oauth@ietfa.amsl.com>; Mon, 20 May 2013 19:52:41 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[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 rGbWTJFJMkpf for <oauth@ietfa.amsl.com>; Mon, 20 May 2013 19:52:40 -0700 (PDT)
Received: from mail-ia0-x22c.google.com (mail-ia0-x22c.google.com [IPv6:2607:f8b0:4001:c02::22c]) by ietfa.amsl.com (Postfix) with ESMTP id 1B43721F8F3E for <oauth@ietf.org>; Mon, 20 May 2013 19:52:39 -0700 (PDT)
Received: by mail-ia0-f172.google.com with SMTP id y26so164397iab.17 for <oauth@ietf.org>; Mon, 20 May 2013 19:52:39 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to:x-mailer:x-gm-message-state; bh=1X5YBfp3Iv5qRKjtVRIXCxy4KETAIqtSNOrpJBWTxKg=; b=l/ounnm9wEfQys4+MjQAzZ/Kq2kJ4B92KGfh3FZwHDW/UKwf7YrxaQHPded3Y6Olys IbWy3mtZmD0dQJCFRqqZJNVFBiZ41Fs0/OzU7FsVoL31AVayiaVgOC88bi9IeqTq7xU4 gFRw1OjR3R180ImmEl8/fGfvLj6VeewUmUAXkPc+4MbRmRGDD85slySvGhHKeuhRhdDo 48dwIuRNt+McyXD6PHkNEDFAFQo2srI0iYJeqBUmkn/NzfuHH+MJinwmLUUSYzLy0ewY qCibaLTst9MN4oO91BUTlzfDFqIWX0j/tgmLT6QLlH6veeuqsJ3xiHR8OKRN7lZdEidq trkQ==
X-Received: by 10.50.115.100 with SMTP id jn4mr196467igb.92.1369104759449; Mon, 20 May 2013 19:52:39 -0700 (PDT)
Received: from [192.168.1.42] (190-20-31-25.baf.movistar.cl. [190.20.31.25]) by mx.google.com with ESMTPSA id d7sm797313igx.5.2013.05.20.19.52.28 for <multiple recipients> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 20 May 2013 19:52:35 -0700 (PDT)
Content-Type: multipart/signed; boundary="Apple-Mail=_E51F90E1-7BDB-4F76-8CEA-8F79993DCE7A"; 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: <17A3EEC1-AA53-44F4-AC17-58DA46D8AF6D@oracle.com>
Date: Mon, 20 May 2013 22:50:57 -0400
Message-Id: <54CD1656-0DEE-4060-B68D-3FE5FB77098B@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> <519A4512.9080905@mitre.org> <17A3EEC1-AA53-44F4-AC17-58DA46D8AF6D@oracle.com>
To: Phil Hunt <phil.hunt@oracle.com>
X-Mailer: Apple Mail (2.1503)
X-Gm-Message-State: ALoCoQkWAxlV2WQXK4I0X2FMm/u5CV3sLC7EmJ4uH3+79f2+fwQ+UCMQi17RWwxR1UBYieN5Chk/
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: Tue, 21 May 2013 02:52:41 -0000

Dynamic registration provides:
1 A client_id 
2 (Optionally) a client secret that is used at the token endpoint per OAuth. to authenticate the associated client_id
3 a URI that can be used to update the client_id (this is a REST concept and may be thought of as a instance of client_id rather than the generic registration URI that takes a POST to create a client instance and assign it a resource identifier (registration_client_uri) , Name (client_id) , client_secret and registration_access_token(access the new resource) .  From the API point of view this is a new new resource that is a instance of client and NOT a new instance of a particular client.
4 a registration_access_token used by a developer or client to access the new resource via registration_client_uri.

So we are being more REST like than OAuth and that may be confusing some developers.   Mike and I had concerns about that, but I think creating a specific resource for each client_id is likely the correct thing in the long term.

One slightly slipper part of this is that in some cases it may be the client that is using this and in others it may be a developer.

Lets not forget one of the main current uses of OAuth in Phone apps.   These are not confidential clients even if they are using the code flow.

Typically a developer would use the dynamic registration API to create a client at the AS.  They would then take the client_id and bake that into there distributed code. (this is super common now)

They would not get  a client_secret and hold on to the registration_client_uri and registration_access_token to be able to update settings for the deployed client instances and to be able to revoke them possibly at some point in the future.   All client instances have the same client_id and client_secret (some people like to use it even if it is not a real secret), the AS has no way to differentiate between client instances.  Perhaps that is a bad thing but that is OAuth.   We are not going to change the fundamental logic of OAuth in registration.

One thing we did leave room for in the spec was building something on top of Dynamic registration using a bearer token provided out of band to the developer.
That token might constrain or provide defaults for clients registered with it.   This however needs to be defined as a part of another spec.  We discussed possibilities for dynamically creating client_id and secrets for native apps so that a code generated form phone A could not be intercepted by an attacker and used to get a access/refresh token. 

This is perhaps instance management from a high level but still conforming OAuth from the perspective of the AS and the flows.

Looking at the wording we may not be doing a good enough job describing that out of access token provisioned out of band for use at the dynamic client registration endpoint which is described as "OAuth 2.0 [RFC6749] access token" in Sec 3 as opposed to registration_access_token which is used in Sec 4.2, 4.3, and 4.4 to access the "Client Configuration Endpoint".


John B.




On 2013-05-20, at 12:36 PM, Phil Hunt <phil.hunt@oracle.com> wrote:

> 
> 
> Phil
> 
> On 2013-05-20, at 8:45, Justin Richer <jricher@mitre.org> wrote:
> 
>> 
>> On 05/17/2013 07:29 PM, Phil Hunt wrote:
>>> He's saying every client gets a registration token and a client token.
>> What's a "client token", exactly? There are three potential places for OAuth tokens in and around dynamic registration, and none of them are called "client token".
> 
> <ph> i meant client credential. Client token is obviously a type of client cred. 
>> 
>> 1) The registration access token, which binds a "client" (or "instance of a client", if you will) to a set of registration information at a specific authorization server. The client uses this to call its Client Information Endpoint to do updates, refreshes, and potentially delete itself. This token is *only* good at this Client Information Endpoint, and nowhere else. This token is specific to the registration it represents.
> 
> <ph> This is not apparent at all. No more than binding the registration to the client credential since the implication is one reg -> one client cred and one reg token. 
> 
> John Bradley has brought up seemingly other scenarios that would not bind but rather associates a dev or an admin to a reg. i may be wrong. I have not had time to consider his explanations yet. 
> 
> What seems clear is that there is confusion as to the purpose and role for this token and what the use cases are for registration. 
> 
> My plan is to review and suggest clarifying text and changes if necessary this week. 
>> 
>> 2) The (optional) initial token used to authenticate to the Client Registration Endpoint. This is *not* the registration access token, and it is *not* used to access the Client Information Endpoint. How the client or developer get this token is out of scope. How the registration server validates this token is out of scope. The structure and contents of this token are out of scope.
>> 
>> 3) The access/refresh tokens that a registered client eventually gets from the Token Endpoint and uses with protected resources. These tokens aren't used at the Client Registration Endpoint or at the Client Information Endpoint.
>> 
>> There are also a couple of related concepts that aren't tokens at all:
>> 
>> 4) The client_id, which is issued to a "client" (or "client instance") by the authorization server. This must be unique at the auth server for each client instance. The client uses this client_id at the Authorization Endpoint and the Token Endpoint in normal OAuth flows.
>> 
>> 5) The client_secret, which is issued to a "client" (or "client instance") by the auth server, for confidential clients (ie: clients that can protect their client_secret). This is used by the client to authenticate to the Token Endpoint and nowhere else.
>> 
>> 
>> Which of these do you mean by a "client token"?
>> 
>> -- Justin