Re: [OAUTH-WG] refresh tokens and client instances

John Bradley <ve7jtb@ve7jtb.com> Fri, 27 June 2014 18:19 UTC

Return-Path: <ve7jtb@ve7jtb.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 A8DBE1B28C7 for <oauth@ietfa.amsl.com>; Fri, 27 Jun 2014 11:19:46 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.6
X-Spam-Level:
X-Spam-Status: No, score=-2.6 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham
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 pTbPmHeWtJth for <oauth@ietfa.amsl.com>; Fri, 27 Jun 2014 11:19:42 -0700 (PDT)
Received: from mail-qa0-f53.google.com (mail-qa0-f53.google.com [209.85.216.53]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 408F61B28AC for <oauth@ietf.org>; Fri, 27 Jun 2014 11:19:41 -0700 (PDT)
Received: by mail-qa0-f53.google.com with SMTP id j15so4300270qaq.40 for <oauth@ietf.org>; Fri, 27 Jun 2014 11:19:41 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to; bh=J9X9WgYHApffwbE96PXgBE3ymAvrcIbGarRMqfDcFHU=; b=Qd8l0wATPcXatIiSVP3+4tWHqIn+NEW1FWH4KrHR+2W8vhx29C3sA0J+b/WgxDO7nY jflXElQo396w6eJ1LS9lniwBr4ZGbIw8GHNoBoOT25PjugC4unpsGoT/76MHrXYecSck ge4tIjeEFPJIYPbaLx1X7mvrDbuuv960PWqDL856FF8/PZ859DVRNxwPGX1hdWi1CjmA 55mN84NiMd5w2yCtnfOSYhyUnDa3Jx1vdc+MUanilod+z8+Jb1h1crSjcrpFx2jA7LPc lMUwuK3Lrm871Fvxxqb/UmqsoQFrFycH5l8NEUZcKH0V3KvIOxbec7HoSccOzmODACWU GdGA==
X-Gm-Message-State: ALoCoQkafnMhuNersAmSUGkRX3/k4Thfv+/UiZ3K1EPKViYD0aQL3qI4ZTKKRuZoN2a4f6Jkj0Mv
X-Received: by 10.140.94.225 with SMTP id g88mr33073176qge.101.1403893181065; Fri, 27 Jun 2014 11:19:41 -0700 (PDT)
Received: from [192.168.0.200] ([201.188.25.163]) by mx.google.com with ESMTPSA id t3sm17564175qai.28.2014.06.27.11.19.37 for <multiple recipients> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 27 Jun 2014 11:19:40 -0700 (PDT)
Content-Type: multipart/alternative; boundary="Apple-Mail=_59FD00FE-D0D5-458C-9915-253A77D9162E"
Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\))
From: John Bradley <ve7jtb@ve7jtb.com>
In-Reply-To: <002201cf922c$9ec65c90$dc5315b0$%nakhjiri@samsung.com>
Date: Fri, 27 Jun 2014 14:21:35 -0400
Message-Id: <EF0302C0-8077-408D-B82B-35FEAFD3C263@ve7jtb.com>
References: <007a01cf90d2$7bdda950$7398fbf0$%nakhjiri@samsung.com> <0BA8278C-6856-4C9F-96C7-C5752F3F1E09@ve7jtb.com> <002201cf922c$9ec65c90$dc5315b0$%nakhjiri@samsung.com>
To: Madjid Nakhjiri <m.nakhjiri@samsung.com>
X-Mailer: Apple Mail (2.1878.2)
Archived-At: http://mailarchive.ietf.org/arch/msg/oauth/WR9RsGbGpA5rrP4BEzRgTgkrvA8
Cc: oauth@ietf.org
Subject: Re: [OAUTH-WG] refresh tokens and client instances
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.15
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: Fri, 27 Jun 2014 18:19:46 -0000

Inline

On Jun 27, 2014, at 1:24 PM, Madjid Nakhjiri <m.nakhjiri@samsung.com> wrote:

> Hi John,
>  
> Thank you for your reply. Would appreciate if you consider my inline comments below and respond again!
>  
> R,
> Madjid
>  
> From: John Bradley [mailto:ve7jtb@ve7jtb.com] 
> Sent: Wednesday, June 25, 2014 5:56 PM
> To: Madjid Nakhjiri
> Cc: oauth@ietf.org
> Subject: Re: [OAUTH-WG] refresh tokens and client instances
>  
> In 3.3 It is saying that the refresh token is a secret that the Authorization server has bound to the client_id, that the Authorization server effectively uses to differentiate between instances of that client_id.
>  
> Madjid>>If I have 10,000s of devices, each with an instance of the OAUTH client, but they are all using the same client ID, how would the server know which token to use for what client? unless when I am creating a token, I also include something that uniquely identifies each instance? Don’t I have to use SOMETHING that is unique to that instance (user grant/ID?)?
>  
When the grant is issued you create and store a refresh token which is effectively the identifier for that instance/grant combination. 
When it comes back on a request to the token endpoint you look up the grants associated with it.   You also hack that the client_id sent in the request matches to detect errors mostly)

> When the refresh token is generated, it can be stored in a table with the client_id and the information about the grant.   You could also do it statelesly by creating a signed object as the refresh token. 
> Madjid>>agreed, but for the signed object to be self-sustained, again would I not need something beyond a “population” client_ID? Are we prescriptive what “information about the grant” is?
>  
You would be creating a bearer token as long as the AS signs it you can put whatever grant grant info you like in it, that is implementation specific.  It  could be a list of the scopes granted and the subject.
> The spec is silent on the exact programming method that the Authorization server uses.
>  
> Madjid>>Are there any other specs in IETF or elsewhere (OASIS, etc?) that prescribe token calculation (e.g. hash function, parameters, etc)?

You can look at JOSE and JWT for a way to create tokens http://tools.ietf.org/html/draft-ietf-oauth-json-web-token
>  
> In 3.7 Deployment independent describes using the same client_id across multiple instances of a native client, or multiple instances of a Java Script client running in a browsers with the same callback uri.
>  
> Since the publishing of this RFC we have also developed a spec for dynamic client registration so it is possible to give every native client it's own client_id and secret making them confidential clients.
>  
> Madjid>>I would need to look at those specs, however, I thought that the “confidential client” designation has to do with the client ability to hold secrets and perform a-by-server-acceptable authentication. Does dynamic client registration affect client’s ability in that aspect?

Yes it doesn't require the secret to be in the downloaded instance of the native app.  It can be populated at first run, changing it from public to confidential.
Confidential is not just for web servers any more.
>  
> There is also a middle ground some people take by doing a proof of possession for code in native applications to prevent the interception of responses to the client by malicious applications on the device.
> https://datatracker.ietf.org/doc/draft-sakimura-oauth-tcse/
>  
> John B.
>  
> On Jun 25, 2014, at 8:06 PM, Madjid Nakhjiri <m.nakhjiri@samsung.com> wrote:
> 
> 
> Hi all,
>  
> I am new to OAUTH list and OAUTH, so apologies if this is very off-topic.
>  
> I am evaluating an OAUTH 2.0 implementation that is done based on bare bone base OAUTH2.0 RFC. From what I understand, many (or some) client implementations use a “global ID/secret” pair for all instances of the client.  Looking at RFC 6819 and there seem to be a whole page on this topic, if I understand it correctly. So questions:
>  
> 1)      Section 3.7 talks about deployment-independent versus deployment specific client IDs. I am guessing “deployment-independent” refers to what I called “global”, meaning if I have the same client with the same client ID installed in many end devices, that is a deployment independent case, correct?
> 2)      Section 3.3 on refresh token mentions that the token is secret bound to the client ID and client instance. Could somebody please point me to where the token generation and binding is described? Also how is the client instance is identified?   
>  
> Thanks a lot in advance,
> Madjid Nakhjiri
>  
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth