Re: [OAUTH-WG] Comments on draft-ietf-oauth-v2-03.txt

Dick Hardt <dick.hardt@gmail.com> Mon, 10 May 2010 00:52 UTC

Return-Path: <dick.hardt@gmail.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 4B9D53A6AC3 for <oauth@core3.amsl.com>; Sun, 9 May 2010 17:52:31 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.001
X-Spam-Level:
X-Spam-Status: No, score=0.001 tagged_above=-999 required=5 tests=[BAYES_50=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 ILsCXlTFHe-h for <oauth@core3.amsl.com>; Sun, 9 May 2010 17:52:30 -0700 (PDT)
Received: from mail-pw0-f44.google.com (mail-pw0-f44.google.com [209.85.160.44]) by core3.amsl.com (Postfix) with ESMTP id 0EE433A6AC0 for <oauth@ietf.org>; Sun, 9 May 2010 17:52:30 -0700 (PDT)
Received: by pwj2 with SMTP id 2so1525066pwj.31 for <oauth@ietf.org>; Sun, 09 May 2010 17:52:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=6HrSpc5gPFiSNYj0FLIrRe5xFdMO0KphTOlHTkt6kX8=; b=fpHCuRfdRqe5AlcqYK2+fNLcFX8t81oIsLwq1qZ34iCulN47NjkZaDaynqjCB7QW6a 98Q3Lv/i5ii3tUM91ETAI9d8Y0IgbYX+DjPduNb2BzIvUayepn1aNycKrIVqgzFeNBej 4OyOs/z2zd1rv6dZTm9qi4oOwCHFL232G9xYg=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=Xp4H+q82mpFMpiUMWpYi9khJ74E3zTF3R0ZOj/GXgACRqF9HUFBX2g+5WuAyGu3jLG cvG3G1lNVWgR0igHC9DQtcGKN7qYx0rcAzin/oqrYH2MhGuKz9yD9yr+2WtGjR4MiG3c imUYNVVafwVws9IWty9gF/Mt3ot82cUkg6SF0=
Received: by 10.142.122.24 with SMTP id u24mr1914337wfc.264.1273452735140; Sun, 09 May 2010 17:52:15 -0700 (PDT)
Received: from [192.168.1.102] (64-46-1-217.dyn.novuscom.net [64.46.1.217]) by mx.google.com with ESMTPS id f11sm22869677wai.23.2010.05.09.17.52.14 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 09 May 2010 17:52:14 -0700 (PDT)
Mime-Version: 1.0 (Apple Message framework v1078)
Content-Type: text/plain; charset="us-ascii"
From: Dick Hardt <dick.hardt@gmail.com>
In-Reply-To: <90C41DD21FB7C64BB94121FBBC2E72343B3AB46E24@P3PW5EX1MB01.EX1.SECURESERVER.NET>
Date: Sun, 09 May 2010 17:52:13 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <918F548B-2501-4630-977E-0A7D4484D067@gmail.com>
References: <4BE730CC.1090607@lodderstedt.net> <90C41DD21FB7C64BB94121FBBC2E72343B3AB46E24@P3PW5EX1MB01.EX1.SECURESERVER.NET>
To: Eran Hammer-Lahav <eran@hueniverse.com>
X-Mailer: Apple Mail (2.1078)
Cc: "OAuth WG (oauth@ietf.org)" <oauth@ietf.org>
Subject: Re: [OAUTH-WG] Comments on draft-ietf-oauth-v2-03.txt
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: Mon, 10 May 2010 00:52:31 -0000

On 2010-05-09, at 3:25 PM, Eran Hammer-Lahav wrote:
> 
>> 3.2.1.1.  Access Token Response
>>    expires_in
>>          OPTIONAL.  The duration in seconds of the access token
>>          lifetime.
>> 
>>    refresh_token
>>          OPTIONAL.  The refresh token used to obtain new access tokens
>>          using the same end-user access grant as described in Section 6.
>> 
>> What is the exact meaning/idea of OPTIONAL response parameters?
>> Who actually decides to use them? The client or the authorization server or
>> both?
>> Is it optional to implement this feature or is it envisioned the server
>> dynamically decides to use those parameters based on its policy?
> 
> Optional means the server gets to decide to include them or not. I think it is pretty clear that optional is decided by the entity constructing the message.
> 
>> expires_in
>> 
>> Why is there information passed back about the access tokens duration but
>> not about the refresh tokens duration?
> 
> No one asked for that. Is there interest in specifying the authorization duration in addition to the token duration?

I have not heard of a scenario where it would be useful to the client to know the refresh token duration.

Unlike the access token where the AS usually sets as expiry time. Authorization could be cancelled at any time for a wide variety of reasons, so there is little knowledge or certainty when it will expire.

> 
>> 3.5.  User-Agent Flow
>> 
>> These clients
>>    cannot keep client secrets confidential and the authentication of the
>>    client is based on the user-agent's same-origin policy.
>> 
>> Does this still hold in the context of "HTTP Origin Headers"
>> (http://www.petefreitag.com/item/702.cfm)?
>> 
>> BTW: Will Brian's security considerations document be updated to be in sync
>> with the draft?
> 
> Brian's document was written for WRAP. We need to write a full security review for 2.0 that is structure similarly to OAuth 1.0.

Besides changing some terminology, I would think Brian's doc would be mainly reusable. Perhaps you could insert a version with changes you understand, then people can suggest changes that need to be made.

> 
>> 3.5.1.  Client Requests Authorization
>> 
>> If the client has previously registered a redirection URI with the
>>    authorization server, the authorization server MUST verify that the
>>    redirection URI received matches the registered URI associated with
>>    the client identifier.
>> 
>> Does this mean equality? Or just the same base string?
> 
> Right now it depends on the server.

The spec should clarify that. Suggested wording:


If the client has previously registered a redirection URI with the authorization server, the authorization server MUST verify that the redirection URI received matches the registered URI associated with the client identifier. The components of the redirection URI that must match the registered URI is authorization server dependant.

> 
>> 7.  Refreshing an Access Token
>> 
>> I would suggest to add an optional "scope" parameter to this request.
>> This could be used to downgrade the scope associated with a token.
> 
> That would be the wrong way to do it given that people will expect to also be able to upgrade scope.

Would you elaborate? Would not providing a scope parameter enable any potential change in scope to the access token? The change may be neither an upgrade or downgrade, just different.

> 
>> 8.1.  The Authorization Request Header
>> 
>> I consider the name "Token" of the authentication schema much to generic.
>> That was also the feedback of all colleagues I talked to about the upcoming
>> standard. Why not call it "OAuth2"?
> 
> It is meant to be generic. I consider OAuth to be the part of the protocol dealing with getting a token. There will be many new ways to get a token in the future.

I also find the use of Token here.

> 
>> 8.2.2.  Form-Encoded Body Parameter
>> 
>> I would suggest to drop this section/feature.
>> 
>> General note: Would it make sense to add explicit format handling to the
>> OAuth API? If we envision authorization servers supporting more than one
>> token format (e.g. SAML, SWT, ...), the client should given the option to
>> request a certain format and responses returning access tokens should
>> indicate the format of this token. The OAuth authorization header could also
>> have an optional format attribute for the same purpose.
> 
> You mean token format? OAuth defined the token as opaque so that would be counter-productive.

Not only can the AS support multiple formats, but a PR could support multiple formats. While the token is opaque to the client, the PR is going to need to detect what kind of token was presented in some way. We can make this easier by something in the spec, or defer this to the PR to detect tokens by examining the token. The scope parameter could be used by the AS to determine the token type to be generated.

-- Dick