Re: [OAUTH-WG] Strict equality matching of redirect_uri

Raffi Krikorian <raffi@twitter.com> Wed, 12 May 2010 06:40 UTC

Return-Path: <raffi@twitter.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 BD0DF3A6C94 for <oauth@core3.amsl.com>; Tue, 11 May 2010 23:40:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.624
X-Spam-Level:
X-Spam-Status: No, score=0.624 tagged_above=-999 required=5 tests=[BAYES_50=0.001, FM_FORGED_GMAIL=0.622, 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 2TtF83o2TJ1q for <oauth@core3.amsl.com>; Tue, 11 May 2010 23:40:12 -0700 (PDT)
Received: from mail-px0-f172.google.com (mail-px0-f172.google.com [209.85.212.172]) by core3.amsl.com (Postfix) with ESMTP id 972EC3A6C9A for <oauth@ietf.org>; Tue, 11 May 2010 23:40:05 -0700 (PDT)
Received: by pxi19 with SMTP id 19so3100513pxi.31 for <oauth@ietf.org>; Tue, 11 May 2010 23:39:52 -0700 (PDT)
Received: by 10.140.255.14 with SMTP id c14mr4641691rvi.270.1273646392172; Tue, 11 May 2010 23:39:52 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.140.144.9 with HTTP; Tue, 11 May 2010 23:39:31 -0700 (PDT)
In-Reply-To: <DEBACE14-0DC8-44F9-92EF-AA3F8F522041@facebook.com>
References: <4BE730CC.1090607@lodderstedt.net> <90C41DD21FB7C64BB94121FBBC2E72343B3AB46E24@P3PW5EX1MB01.EX1.SECURESERVER.NET> <918F548B-2501-4630-977E-0A7D4484D067@gmail.com> <90C41DD21FB7C64BB94121FBBC2E72343B3AB46E37@P3PW5EX1MB01.EX1.SECURESERVER.NET> <AANLkTimfTF05EWxOdyJrUU3K3IN7kJ7RdDk3mBXN2f41@mail.gmail.com> <AANLkTilCID4z-NjAJLMQ2GHcWHm-21fWKPzXs-6y4tyZ@mail.gmail.com> <AANLkTil8-AEe0Jjid2aKuI4IADCZ_vamNng5USnMKz8E@mail.gmail.com> <DEBACE14-0DC8-44F9-92EF-AA3F8F522041@facebook.com>
From: Raffi Krikorian <raffi@twitter.com>
Date: Wed, 12 May 2010 07:39:31 +0100
Message-ID: <AANLkTilX2YV5NS4jWJSxQJJqAknPzF9vccJt7qCvEQTt@mail.gmail.com>
To: Luke Shepard <lshepard@facebook.com>
Content-Type: multipart/alternative; boundary="000e0cd108dcc6895604865fe878"
Cc: "OAuth WG (oauth@ietf.org)" <oauth@ietf.org>
Subject: Re: [OAUTH-WG] Strict equality 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: Wed, 12 May 2010 06:40:13 -0000

twitter is working on a version where we will actually allow the
specification of an explicit array of registered URIs, and we do strict
matching against the elements of that array to see if any match.  we thought
of allowing just subdomain globbing and wildcards, but that seemed
problematic for GAE like situations....

On Wed, May 12, 2010 at 7:31 AM, Luke Shepard <lshepard@facebook.com> wrote:

> FWIW, Facebook does not do strict equality matching on redirect_uri. We
> accept any redirect_uri that has either:
>
> - its prefix is the registered url
> - or it is a special facebook.com/xd_proxy.php url, with an origin
> parameter that has a prefix on the registered url
>
> I think that the spec should leave the matching up to the server.
>
> On May 11, 2010, at 3:13 PM, Marius Scurtescu wrote:
>
> > On Tue, May 11, 2010 at 3:04 PM, Evan Gilbert <uidude@google.com> wrote:
> >>
> >> On Mon, May 10, 2010 at 1:16 PM, Marius Scurtescu <
> mscurtescu@google.com>
> >> wrote:
> >>>
> >>> On Sun, May 9, 2010 at 10:09 PM, Eran Hammer-Lahav <
> eran@hueniverse.com>
> >>> wrote:
> >>>>
> >>>>> -----Original Message-----
> >>>>> From: Dick Hardt [mailto:dick.hardt@gmail.com]
> >>>>> Sent: Sunday, May 09, 2010 5:52 PM
> >>>>
> >>>>>>> 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.
> >>>>
> >>>> I don't see how that helps... I also don't see why we can't just
> profile
> >>>> this and decide on how the matching should be done. We have the state
> >>>> parameter to help too.
> >>>
> >>> I also think the spec should specify how the matching should be done.
> >>>
> >>> If left up to the authz server then a client that designs its OAuth 2
> >>> implementation will have to assume that all authz servers will do
> >>> strict equality matching, otherwise it may not be able to interact
> >>> with some servers.
> >>>
> >>> For example, if the client assumes that it can use load balancing by
> >>> varying the first part of the host name, and this may work with the
> >>> fist authz server it integrate with, later this client will not be
> >>> able to interact with an authz server which does strict matching on
> >>> host name. And changing the load balancing architecture once deployed
> >>> could be very hard.
> >>>
> >>> Since there is a state parameter maybe it is enough to allow wild
> >>> cards only in the domain name of the callback URI.
> >>
> >> I think this we should leave this matching undefined for now - since you
> >> have to preregister with every site, you will have provider-specific
> logic
> >> anyway. This will be much more important when we have a discovery
> mechanism
> >> for callback URLs.
> >
> > If we leave undefined then that is the same as enforcing strict
> > equality matching. Then let's make that explicit. Are we OK with that?
> >
> > A client that eventually wants to interact with several authz servers
> > will have to assume the "greatest common divisor", which is strict
> > matching.
> >
> > Marius
> > _______________________________________________
> > OAuth mailing list
> > OAuth@ietf.org
> > https://www.ietf.org/mailman/listinfo/oauth
>
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth
>



-- 
Raffi Krikorian
Twitter Platform Team
http://twitter.com/raffi