Re: [OAUTH-WG] First draft of OAuth 2.0

David Recordon <recordond@gmail.com> Tue, 23 March 2010 19:01 UTC

Return-Path: <recordond@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 A33E63A6D1B for <oauth@core3.amsl.com>; Tue, 23 Mar 2010 12:01:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 1.131
X-Spam-Level: *
X-Spam-Status: No, score=1.131 tagged_above=-999 required=5 tests=[BAYES_50=0.001, DNS_FROM_OPENWHOIS=1.13]
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 I1bEIBqYtPbl for <oauth@core3.amsl.com>; Tue, 23 Mar 2010 12:01:20 -0700 (PDT)
Received: from mail-pz0-f204.google.com (mail-pz0-f204.google.com [209.85.222.204]) by core3.amsl.com (Postfix) with ESMTP id D515D3A6B42 for <oauth@ietf.org>; Tue, 23 Mar 2010 12:00:57 -0700 (PDT)
Received: by pzk42 with SMTP id 42so436346pzk.32 for <oauth@ietf.org>; Tue, 23 Mar 2010 12:01:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=W3MM62Gb61jRszaqrcg64giDKeqkEJgsGs0psmXBijc=; b=LaUChcdcqcxYcMZE0c9+khk8fNSXhcfWiJB1s2F12l/QQ75qlkDF60H8GesuVFvDfa L1L7g3cDjTmmmkowYj5ImDMOHOpiU9gcKnJDNoRfwPN7mxkxFNsbqAGq7ASeZDwc6sT+ N4sX62a0QRlG3s+vbmN6s9gHrsuVUURctiUbU=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Mi6gUi6t8BVmVv2MBN1UFYrR7KKGOHefV9mJme6SuSebbb8ZVcBCl8VfDMk7gAttzD ILF/3LpcXKUFL1SIJRD6O3fpINTe+mZOoXgXb2jsOe60LNhOMlcb94ClR4ryQ7iy2nld t9/7X/DSshfwfjhNP/y0ALPRvmE0UfeYEnh5s=
MIME-Version: 1.0
Received: by 10.142.195.11 with SMTP id s11mr1436393wff.349.1269370874896; Tue, 23 Mar 2010 12:01:14 -0700 (PDT)
In-Reply-To: <4BA904F6.7000208@lodderstedt.net>
References: <526C3C44-18CF-4A94-A4C6-72702F73AC83@facebook.com> <4BA904F6.7000208@lodderstedt.net>
Date: Tue, 23 Mar 2010 12:01:14 -0700
Message-ID: <fd6741651003231201l4be70ccew1ea2c20e20c7dd01@mail.gmail.com>
From: David Recordon <recordond@gmail.com>
To: Torsten Lodderstedt <torsten@lodderstedt.net>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
Cc: OAuth WG <oauth@ietf.org>
Subject: Re: [OAUTH-WG] First draft of OAuth 2.0
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, 23 Mar 2010 19:01:22 -0000

Inline and thanks for the feedback!

On Tue, Mar 23, 2010 at 11:14 AM, Torsten Lodderstedt
<torsten@lodderstedt.net> wrote:
> Hi David,
>
> I have a couple of questions/comments:
>
> §2 - The flows use shared secrets for client authentication only. What about
> adding support for public-key-based signatures for that purpose as an
> alternative? That's one of the use cases on
> http://trac.tools.ietf.org/wg/oauth/trac/wiki/SignaturesWhy

I think it's reasonable to design a flow which uses public-keys to
authenticate the client for an access token. You'd probably do
something like this for the device flow if you actually want to
authenticate the device as TPM is becoming more prevalent.  Including
the secret over SSL keeps the protocol simpler for developers.


> §2.4 - Looks like a POST-Request in combination with a password-based user
> authentication. What about using a standard BASIC Authorization Header
> instead of oauth_username and oauth_password? In that way, existing code for
> BASIC-Authentication can easily be ported to OAUTH.

You're the first to mention that AFAIK. I'd be interested in if it
would be useful to service providers like Twitter who already use
basic and digest auth.  My guess is that just including the username
and password as parameters is actually simpler given that you'll be
building this in an authorization flow.  Most sites which use
basic/digest for API authentication are doing so to actually make API
requests so they'll need to write new code to support OAuth in the
first place.


> §3
> - Why is the parameter oauth_client_secret required for refreshing access
> tokens? Use cases 2.2 and 2.3 do not require the client to use (possess) a
> secret. Does this imply such client are not entitled to refresh tokens? I
> would suggest to simply remove this parameter.

It shouldn't be required.  Fixed!
http://github.com/daveman692/OAuth-2.0/commit/a30843724f241f3ea1052c83dcfec0127a11fe00


> - Why is the refresh method the only way to obtain token secrets? This
> forces every client needing a token secret to perform two calls (and get a
> useless access token in the first call). I would suggest to add the
> parameter oauth_want_secret to all flows in §2.

Protocol simplicity. Signatures are meant to be used in advanced cases
and should not distract 95% of developers who will never touch them.
The main use cases for signatures is based around performance in
extremely high volume API interactions. Thus one extra HTTP request at
the start should pale in comparison to the number of API requests
which will actually be made using that secret.


> - "If an access token secret is included in the response, the protected
> resource MUST NOT allow the use of the corresponding access token without
> its secret .... " Why is that neccessary?

When acting as a bearer token the access token is all powerful and
must be kept secret between the client and servers. In the signature
flow (if you're not also using SSL) then the access token is sent over
the wire. Thus a MITM could get the access token and make SSL requests
without this requirement.


> - response value oauth_signature_methods: Why is it the obligation of an
> autorization server to know the signature methods a protected resource
> supports? IMHO this is a question of the protocol between client and
> protected resource and the client should pass in to the request the desired
> signature method. In that way the authorization server is able to create
> adequate secret.

hmm. I guess the protected resource(s) always knows about the
authorization server though it's conceivable that the authorization
server doesn't know about every protected resource. This seems far
simpler than the client needing to negotiate the signature mechanism
with each protected resource. Is there someone developing a deployment
where the drafted model (from 1.0a) doesn't work?


> §4.1 Why do you want to enforce such a strong coupling between bearer tokens
> and TLS per spec? I would recommend to split protocol definition and
> security considerations as in RFC2617. There, BASIC authentication is
> defined without any references to transport security mechanisms and the
> relevant considerations/recommandations are discussed in the security
> consideration section. IMHO this would simplify the specification because
> bearer token requests and requests w/ access tokens + signature would just
> be variant of the same protocol definition.

I think this comes out of making the spec really easy to implement.
The style of the spec is very much designed for implementors writing
code as they're reading.


> §4.2.2 The WWW-Authenticate header does not give the client any hint what
> signature methods to use. How shall the client that information obtain?

Right now it's obtained via the signature methods parameter. Is there
an easy way to add it in this 401 response?

Thanks!
--David

> regards,
> Torsten.
>
>
>
>
>
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth
>