Re: [OAUTH-WG] User-agent flow and pre-registered redirect_uri

Marius Scurtescu <mscurtescu@google.com> Mon, 07 June 2010 23:38 UTC

Return-Path: <mscurtescu@google.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 AC1973A68BE for <oauth@core3.amsl.com>; Mon, 7 Jun 2010 16:38:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -99.747
X-Spam-Level:
X-Spam-Status: No, score=-99.747 tagged_above=-999 required=5 tests=[AWL=0.370, BAYES_20=-0.74, FM_FORGED_GMAIL=0.622, USER_IN_WHITELIST=-100]
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 MZ9jPQD8OM1C for <oauth@core3.amsl.com>; Mon, 7 Jun 2010 16:38:13 -0700 (PDT)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.35]) by core3.amsl.com (Postfix) with ESMTP id 540C03A68B1 for <oauth@ietf.org>; Mon, 7 Jun 2010 16:36:52 -0700 (PDT)
Received: from kpbe11.cbf.corp.google.com (kpbe11.cbf.corp.google.com [172.25.105.75]) by smtp-out.google.com with ESMTP id o57Naokc001804 for <oauth@ietf.org>; Mon, 7 Jun 2010 16:36:50 -0700
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1275953811; bh=RdOO2kt1GVrroZwboZMLxOWaEug=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type:Content-Transfer-Encoding; b=g8K5SAK398YXzEoDX+2dfwSjVGK8A6JmJUMf0z2hsbfp8Jy+1TNhEbSPPJHq+2Cgd 8qU9t/NjXlj3WTV98RHQg==
DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=mime-version:in-reply-to:references:from:date:message-id: subject:to:cc:content-type:content-transfer-encoding; b=u9WRVZYyCPe1rcO+6N7jBMomUNjjmDFkkljn+ymMQJ3Jwfba6FpcwZyrLQ1u/Ipi5 6TUO+9XrweaZXRMJXRdvQ==
Received: from pzk33 (pzk33.prod.google.com [10.243.19.161]) by kpbe11.cbf.corp.google.com with ESMTP id o57Nanxl019636 for <oauth@ietf.org>; Mon, 7 Jun 2010 16:36:49 -0700
Received: by pzk33 with SMTP id 33so4710674pzk.17 for <oauth@ietf.org>; Mon, 07 Jun 2010 16:36:49 -0700 (PDT)
Received: by 10.140.55.12 with SMTP id d12mr12448426rva.164.1275953809102; Mon, 07 Jun 2010 16:36:49 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.141.124.13 with HTTP; Mon, 7 Jun 2010 16:36:29 -0700 (PDT)
In-Reply-To: <AANLkTikF2JB2wgCgsKEnUA4Jxz9Dj-lFd6dbnBLlWI_5@mail.gmail.com>
References: <AANLkTikF2JB2wgCgsKEnUA4Jxz9Dj-lFd6dbnBLlWI_5@mail.gmail.com>
From: Marius Scurtescu <mscurtescu@google.com>
Date: Mon, 07 Jun 2010 16:36:29 -0700
Message-ID: <AANLkTil-xDEwMVbV-J7MC1ivoH9w-egOwo5Q2ata94Cc@mail.gmail.com>
To: Andrew Arnott <andrewarnott@gmail.com>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
Cc: "OAuth WG (oauth@ietf.org)" <oauth@ietf.org>
Subject: Re: [OAUTH-WG] User-agent flow and pre-registered redirect_uri
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, 07 Jun 2010 23:38:15 -0000

On Fri, Jun 4, 2010 at 9:49 PM, Andrew Arnott <andrewarnott@gmail.com> wrote:
> The user agent flow indicates that the redirect_uri SHOULD be preregistered
> with the auth server for a given client.  I would like to suggest that the
> SHOULD here be changed to MUST.  Unless I'm missing something, without a
> preregistered redirect_uri any arbitrary client can obtain an access token
> under the pretense of being another client, and thereby perhaps altogether
> skip a user authorization prompt.
>
> As there will likely be a few popular client_id's in use, it will actually
> make it trivially easy to obtain elevated access to private user data as a
> rogue application.  This danger is unique to the user-agent flow because in
> this flow the client_secret is not required to obtain the access token,
> whereas it is for other flows.
>
> Thoughts?

Not sure registration buys you too much.

An arbitrary client cannot pretend being another client, client in
this case is the redirect_uri. It is up to the end user to trust this
redirect_uri.

For example, bad.example.com/back cannot pretend it is
good.example.com/back because the redirect with the access token will
go to good.example.com/back and not to bad.example.com/back.

What can happen is that exmple.com/back can pretend to be
example.com/back, but registration does not help in this case.

The only case where registration really helps is if example.com allows
people to create their own pages and as a result someone could create
a JavaScript client at example.com/pages/bad. Since you can have
several clients under the same domain, the user will be confused. In
this case if example.com registers its own redirect_uri no one else
under the same domain could potentially use one. But this is a
particular case, and up to example.com to enforce. Also, if
example.com wants to allow clients installed at different paths, then
again, registration does not help.

Marius


> --
> Andrew Arnott
> "I [may] not agree with what you have to say, but I'll defend to the death
> your right to say it." - S. G. Tallentyre
>
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth
>
>