Re: [OAUTH-WG] Clarification: authorization server matching of redirect URI

Marius Scurtescu <mscurtescu@google.com> Mon, 19 April 2010 17:49 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 805233A6AFB for <oauth@core3.amsl.com>; Mon, 19 Apr 2010 10:49:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -105.877
X-Spam-Level:
X-Spam-Status: No, score=-105.877 tagged_above=-999 required=5 tests=[AWL=0.100, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_MED=-4, 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 DcxbzNUfEqYI for <oauth@core3.amsl.com>; Mon, 19 Apr 2010 10:49:11 -0700 (PDT)
Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by core3.amsl.com (Postfix) with ESMTP id 1C43D3A6AB0 for <oauth@ietf.org>; Mon, 19 Apr 2010 10:46:08 -0700 (PDT)
Received: from hpaq5.eem.corp.google.com (hpaq5.eem.corp.google.com [10.3.21.5]) by smtp-out.google.com with ESMTP id o3JHjtFQ009300 for <oauth@ietf.org>; Mon, 19 Apr 2010 10:45:55 -0700
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1271699156; bh=0WdItCX7f/mhG9nwt9YQU7DRXFo=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type:Content-Transfer-Encoding; b=DtEhAKlrSn6LkQcIPSncCoF3UNCyt3ZnAa3QrcgcIz7t/YgrRie7UymAFb6Vi1NJv TIECIAoSKomLs9/F5VnZw==
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:x-system-of-record; b=EUhzDFxIVVqu/pyjdZqXX/0XSGZNI2SZHLvKJnHJAZ/g+LFkEgodDM++wLYYZN17I K2C73fbaM1DuvqGbEXe3Q==
Received: from pzk12 (pzk12.prod.google.com [10.243.19.140]) by hpaq5.eem.corp.google.com with ESMTP id o3JHjrH1025717 for <oauth@ietf.org>; Mon, 19 Apr 2010 19:45:54 +0200
Received: by pzk12 with SMTP id 12so3633437pzk.32 for <oauth@ietf.org>; Mon, 19 Apr 2010 10:45:53 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.141.107.2 with HTTP; Mon, 19 Apr 2010 10:45:33 -0700 (PDT)
In-Reply-To: <90C41DD21FB7C64BB94121FBBC2E723438E5C7F059@P3PW5EX1MB01.EX1.SECURESERVER.NET>
References: <2997F829-4755-44A8-ADD5-643BCE25AA61@gmail.com> <90C41DD21FB7C64BB94121FBBC2E723438E30A379C@P3PW5EX1MB01.EX1.SECURESERVER.NET> <65D588CD-A374-4F6B-8749-199C5DF83300@gmail.com> <x2kdaf5b9571004190836l2595e181obdb977045e11c49e@mail.gmail.com> <90C41DD21FB7C64BB94121FBBC2E723438E5C7F059@P3PW5EX1MB01.EX1.SECURESERVER.NET>
From: Marius Scurtescu <mscurtescu@google.com>
Date: Mon, 19 Apr 2010 10:45:33 -0700
Received: by 10.141.101.17 with SMTP id d17mr3280564rvm.265.1271699153125; Mon, 19 Apr 2010 10:45:53 -0700 (PDT)
Message-ID: <i2w74caaad21004191045v4c55ddc7p61d8f250210afc3b@mail.gmail.com>
To: Eran Hammer-Lahav <eran@hueniverse.com>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
X-System-Of-Record: true
Cc: OAuth WG <oauth@ietf.org>
Subject: Re: [OAUTH-WG] Clarification: authorization server matching of 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, 19 Apr 2010 17:49:12 -0000

On Mon, Apr 19, 2010 at 8:39 AM, Eran Hammer-Lahav <eran@hueniverse.com> wrote:
>
>
>> -----Original Message-----
>> From: Brian Eaton [mailto:beaton@google.com]
>> Sent: Monday, April 19, 2010 8:37 AM
>> To: Dick Hardt
>> Cc: Eran Hammer-Lahav; OAuth WG
>> Subject: Re: [OAUTH-WG] Clarification: authorization server matching of
>> redirect URI
>>
>> On Sun, Apr 18, 2010 at 10:35 PM, Dick Hardt <dick.hardt@gmail.com> wrote:
>> > The spec should describe how the redirect URI is verified to what is
>> registered. I can enumerate the options for discussion adding in the state
>> parameter as an option.
>>
>> Note that there are two spots where the AS does some URI matching.
>>
>> The first is before redirecting the user to the callback URI.  This seems
>> doomed to being service provider specific, unfortunately.
>
> I agree. If someone wants to suggest some security consideration text that would be good.

If this is authz server specific I can see the following problem:
- authz server 1 allows regular expressions in registered callback URLs
- client integrates with authz server 1 and designs its own
implementation based on these callback URLs, uses load balancing on
different hosts and passes state through query parameters
- authz server 2 comes along and it requires strict matching on callbacks
- client wants to integrate with authz server 2 as well, but will have
to rewrite everything because the load balancing and state
infrastructure will not work

In order to support interop I think it would be useful to specify how
callbacks are matched.

Proposal:
- path and query string are strictly matched (the spec has a state parameter)
- host names can contain a wild card (to allow for load balancing)
- port and scheme strictly matched

For example:
- registered callback: https://*.example.com/client?controller=oauth2
- matching callbacks:
  https://example.com/client?controller=oauth2
  https://sv1.example.com/client?controller=oauth2
  https://sv2.n1.example.com/client?controller=oauth2
- not matching:
  https://example.net/client?controller=oauth2
  https://example.com/client?controller=oauth2&user=x
  http://example.com/client?controller=oauth2
  https://example.com:8080/client?controller=oauth2


Marius