Re: [OAUTH-WG] expired_token error code

Eran Hammer-Lahav <eran@hueniverse.com> Tue, 13 July 2010 14:20 UTC

Return-Path: <eran@hueniverse.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 8F3483A676A for <oauth@core3.amsl.com>; Tue, 13 Jul 2010 07:20:37 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.441
X-Spam-Level:
X-Spam-Status: No, score=-2.441 tagged_above=-999 required=5 tests=[AWL=0.157, BAYES_00=-2.599, HTML_MESSAGE=0.001]
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 v6i+TNllmVrn for <oauth@core3.amsl.com>; Tue, 13 Jul 2010 07:20:34 -0700 (PDT)
Received: from p3plex1out02.prod.phx3.secureserver.net (p3plex1out02.prod.phx3.secureserver.net [72.167.180.18]) by core3.amsl.com (Postfix) with SMTP id 38B1E3A67AC for <oauth@ietf.org>; Tue, 13 Jul 2010 07:20:34 -0700 (PDT)
Received: (qmail 18878 invoked from network); 13 Jul 2010 14:20:43 -0000
Received: from unknown (HELO smtp.ex1.secureserver.net) (72.167.180.21) by p3plex1out02.prod.phx3.secureserver.net with SMTP; 13 Jul 2010 14:20:42 -0000
Received: from P3PW5EX1MB01.EX1.SECURESERVER.NET ([10.6.135.20]) by P3PW5EX1HT003.EX1.SECURESERVER.NET ([72.167.180.21]) with mapi; Tue, 13 Jul 2010 07:20:43 -0700
From: Eran Hammer-Lahav <eran@hueniverse.com>
To: Brian Eaton <beaton@google.com>, OAuth WG <oauth@ietf.org>, "b@google.com" <b@google.com>
Date: Tue, 13 Jul 2010 07:20:39 -0700
Thread-Topic: [OAUTH-WG] expired_token error code
Thread-Index: AcsiUMwJ2a6PtfxDTWCpfid8P4tomAARcVeq
Message-ID: <C861C447.3714A%eran@hueniverse.com>
In-Reply-To: <AANLkTiltWYhnXTDfhF8EekZjekM1gETJZNuJKYx1bJom@mail.gmail.com>
Accept-Language: en-US
Content-Language: en
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: en-US
Content-Type: multipart/alternative; boundary="_000_C861C4473714Aeranhueniversecom_"
MIME-Version: 1.0
Subject: Re: [OAUTH-WG] expired_token error code
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: Tue, 13 Jul 2010 14:20:37 -0000

I'm fine with this. Any objections?

EHL


On 7/12/10 11:01 PM, "Brian Eaton" <beaton@google.com> wrote:

http://tools.ietf.org/html/draft-ietf-oauth-v2-10#section-5.2.1

The "expired_token" error code doesn't scale well and won't be
implemented reliably.  It should be merged with "invalid_token".

Suggested language:

invalid_token
         The access token provided is invalid.  Resource servers
SHOULD use this error code when receiving a token which is expired,
revoked, malformed, or invalid for other reasons.  The resource server
MUST respond with the HTTP 401 (Unauthorized) status code.  The client
MAY request a new access token and retry the protected resource
request.


"expired_token" can't be implemented reliably for a few reasons.

1) If you're using server-side storage of tokens (which you need to do
if you want to keep your tokens very short...) you have to throw away
tokens after they expire.  Just because you can't validate the token
doesn't mean the client can't refresh the token.

2) If you're using cryptographic access tokens, you need to throw away
your old token signing keys at some point.  Again, just because you
can't validate a token doesn't mean the client can't refresh the
token.

3) One common deployment model will have limited communication between
authorization servers and protected resource servers.  The protected
resource server might not be able to contact the authorization server
to figure out whether refresh tokens are available or not.

4) The access token may not have enough information in it to look-up
the corresponding refresh token and see if it's still valid.
Remembering that information requires extra space in the access token
for cryptographic token implementations.  Space is tight.

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