Re: [OAUTH-WG] Lifetime of refresh token

Bill Mills <wmills_92105@yahoo.com> Fri, 28 August 2015 15:15 UTC

Return-Path: <wmills_92105@yahoo.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 49F761B2E2B for <oauth@ietfa.amsl.com>; Fri, 28 Aug 2015 08:15:00 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.209
X-Spam-Level:
X-Spam-Status: No, score=-2.209 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, FREEMAIL_REPLYTO_END_DIGIT=0.25, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] 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 hkRuj15kv8LD for <oauth@ietfa.amsl.com>; Fri, 28 Aug 2015 08:14:57 -0700 (PDT)
Received: from nm42-vm10.bullet.mail.bf1.yahoo.com (nm42-vm10.bullet.mail.bf1.yahoo.com [216.109.114.155]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 346261B2DDE for <oauth@ietf.org>; Fri, 28 Aug 2015 08:14:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1440774895; bh=A2Fh1XwuBuAZxg+uDtCSQvvcLzNGGjLpMc5oGIFsJjA=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:From:Subject; b=EXg6L7mhpCo/bXoNHncjyIpDQU9AYIqvqfn3jXysDpZRfvEAlg4UqRpVN+ER+phfSy9OQ69AtO3eZZEd+FKnoyt3qlNrzl6Fck7MaSy9W/pHFVqE1TH8HSeIWdwt8C4Q/XPqwUDrcGiAVZbQKPV53srcDMnnoji0Dtnsqa3oqmCv6pZpdZzF/gjBfkqQM8PC2MqiYX9K0U0HG8z0RB43rT0QNhQ3UmXhyubnKYmAAGu/7ZXhMWbA5SvH4kyYFWR05i+oVDceDLL3BR4QCoyWqI7Wad9a1OJtqbuvraiI8QVN4xB0hY66jeXW/rWabnliDLwIUZumCbavsmqwy2HFDQ==
Received: from [98.139.215.141] by nm42.bullet.mail.bf1.yahoo.com with NNFMP; 28 Aug 2015 15:14:55 -0000
Received: from [98.139.215.250] by tm12.bullet.mail.bf1.yahoo.com with NNFMP; 28 Aug 2015 15:14:55 -0000
Received: from [127.0.0.1] by omp1063.mail.bf1.yahoo.com with NNFMP; 28 Aug 2015 15:14:55 -0000
X-Yahoo-Newman-Property: ymail-3
X-Yahoo-Newman-Id: 364386.96587.bm@omp1063.mail.bf1.yahoo.com
X-YMail-OSG: 069qdoUVM1ldjslLFCVoeDshBpzkz6iK_s.6gdZ_RT2_jN5BZ12AJcuY_lzvtVf z4hioc7teyNrqGF_impl.o.RNz0Zi5vpbqUxunvm5ViK4rSGhjigj8NpjHzU3XQ1NHY9Ymg44M.Q qxWFGpDZ76kcfgavA7kVbPVr0PDbBNIy4iOQgMiO3LfWGy0PcPJXLgQsuS_Z3r.CIo_hkznjw8Yb 0qeXmJJGh5JAVNVXhoQ02XSKSB5MIn4yNBX81MC0PoJjkA0QLQwFDdWUfSRhNi_wYVSMK6iGPmyy iJUL.fWx1XM2IDnbY13KwJkGpYPYQyUsFFyFNIGw_mQdSIjC88xEfzpACEqpVZjkdfn7T6kDVE0s QAkXPEps74IYvUFwTF2yy0QzMc9hbM8HaEeUFLQmcgOtLrnXM6YVyZ5ln4cfo1z8KzBBpVtbqfi6 w2yoXBCTuQNyZrOrLtQtWK5ztZcxqfYc3wX3sGy16n6f87Yd15xWoJqm0NKEgbrGq3L17l.kG97u sBcIub9Ik_EiNjDU1VciDsNlTCpZPDgsoyBXSn0WVnjLJcUQ-
Received: by 66.196.81.107; Fri, 28 Aug 2015 15:14:54 +0000
Date: Fri, 28 Aug 2015 15:14:54 +0000
From: Bill Mills <wmills_92105@yahoo.com>
To: Donghwan Kim <flowersinthesand@gmail.com>, Torsten Lodderstedt <torsten@lodderstedt.net>
Message-ID: <311612966.2262095.1440774894499.JavaMail.yahoo@mail.yahoo.com>
In-Reply-To: <CAMbDefsu0XAQvCR2+ako4PbsoKeezLwgizJ4dVsKMAY_DXM_wA@mail.gmail.com>
References: <CAMbDefsu0XAQvCR2+ako4PbsoKeezLwgizJ4dVsKMAY_DXM_wA@mail.gmail.com>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_Part_2262094_1742360394.1440774894485"
Archived-At: <http://mailarchive.ietf.org/arch/msg/oauth/i4n-f6wgwoF1MPVsBEBVEd0ZulA>
Cc: "oauth@ietf.org" <oauth@ietf.org>
Subject: Re: [OAUTH-WG] Lifetime of refresh token
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: Bill Mills <wmills_92105@yahoo.com>
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: <https://mailarchive.ietf.org/arch/browse/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, 28 Aug 2015 15:15:00 -0000

You don't need to put an expiration on the refresh token.  You get to see that refresh token every 5 minutes anyway.  If you ever want to force the client to re-auth just use policy on the AS.  Nothing will be broken with what you are doing though. 


     On Friday, August 28, 2015 7:21 AM, Donghwan Kim <flowersinthesand@gmail.com> wrote:
   

 I'm sorry to introduce a common topic.
As John has suggested, I'm going to design that 
* An access token should be short lived e.g. 5 minutes (not to hit the AS to verify the token or 1 hour (to hit the AS to verify the token). I'm inclined to 5 minutes for stateless architecture of RSs.* A refresh token should have 1 month of expiration time by default. If it turns out that some access token expired, its refresh token should refresh the token. Then, so called persistent login can be implemented regardless of the form of authentication. Only if it fails for some reason e.g. token revocation or inactivity for 1 month, a user is logged out automatically and should log in again.* A refresh token should be able to be revoked somehow. With 5 minutes approach, it will invalidate only the refresh token (Yes the attacker can have 5 minutes at most), and with 1 hour approach, it will invalidate the refresh token as well as the corresponding access token.

Thanks,

-- Donghwan
On Fri, Aug 28, 2015 at 5:43 PM, Torsten Lodderstedt <torsten@lodderstedt.net> wrote:

Refresh tokens are also used by public clients, e.g. native apps. OIDC allows to acquire a new id token from a refresh token as well. Note: this does not mean a fresh authentication but a refreshed id token containing the data of the original authentication transaction. 

Am 24. August 2015 17:08:21 MESZ, schrieb John Bradley <ve7jtb@ve7jtb.com>:
I think Nat’s diagram about the problems of doing pseudo authentication with OAuth is being taken out of context.
The refresh token dosen’t expire, it is revoked by the user or system.  In some cases refresh tokens are automatically revoked if the users session to the AS ends.  I think AOL typically revokes refresh tokens when sessions terminate.
OpenID Connect provides a separate id_token with a independent lifetime from the refresh token.  A client may keep a refresh token for a much longer time than the user has a login session with the AS.
Refresh tokens are typically used by confidential clients that are using a client secret in combination with the refresh token for getting a new access token.
By design access tokens should be short lived as the AS isexpected to have a way of revoking refresh tokens but not access tokens.A access token that dosen't expire , and can’t be revoked is not a good idea.
John B.


On Aug 24, 2015, at 2:41 AM, Donghwan Kim <flowersinthesand@gmail.com> wrote:
Hi,

According to Figure 2 from http://tools.ietf.org/html/rfc6749#section-1.5, refresh token can be used to refresh an expired access token without requesting resource owner to sign in again (uncomfortable experience). However, if it's true,isn't it that refresh token might be used to request a new access token even years later? and then isn't refresh token the same with access token which never expires?
I intended to use refresh token to implement persistent login by sending a refresh request before issued access token expires (expires_in runs out). But if refresh token works even if access token expired already, sending a refresh request on application start up would be enough.
So I'm not sure what I'm missing about refresh token as well as how to implement persistent login using it (you can regard authentication here pseudo-authentication illustrated in https://upload.wikimedia.org/wikipedia/commons/3/32/OpenIDvs.Pseudo-AuthenticationusingOAuth.svg). What is the lifetime of refreshtoken?
Thanks,
-- Donghwan_______________________________________________
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




_______________________________________________
OAuth mailing list
OAuth@ietf.org
https://www.ietf.org/mailman/listinfo/oauth