Re: [OAUTH-WG] How do we deal with unrecognized elements in requests and responses?
Eran Hammer-Lahav <eran@hueniverse.com> Thu, 01 July 2010 16:37 UTC
Return-Path: <eran@hueniverse.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 297633A684A for <oauth@core3.amsl.com>; Thu, 1 Jul 2010 09:37:31 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.239
X-Spam-Level:
X-Spam-Status: No, score=-2.239 tagged_above=-999 required=5 tests=[AWL=0.360, BAYES_00=-2.599]
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 D1IcMQigoGbI for <oauth@core3.amsl.com>; Thu, 1 Jul 2010 09:37:30 -0700 (PDT)
Received: from p3plex1out02.prod.phx3.secureserver.net (p3plex1out02.prod.phx3.secureserver.net [72.167.180.18]) by core3.amsl.com (Postfix) with SMTP id E2EDD3A659A for <oauth@ietf.org>; Thu, 1 Jul 2010 09:37:29 -0700 (PDT)
Received: (qmail 6276 invoked from network); 1 Jul 2010 16:37:41 -0000
Received: from unknown (HELO smtp.ex1.secureserver.net) (72.167.180.19) by p3plex1out02.prod.phx3.secureserver.net with SMTP; 1 Jul 2010 16:37:41 -0000
Received: from P3PW5EX1MB01.EX1.SECURESERVER.NET ([10.6.135.20]) by P3PW5EX1HT001.EX1.SECURESERVER.NET ([72.167.180.19]) with mapi; Thu, 1 Jul 2010 09:37:37 -0700
From: Eran Hammer-Lahav <eran@hueniverse.com>
To: Justin Richer <jricher@mitre.org>
Date: Thu, 01 Jul 2010 09:37:49 -0700
Thread-Topic: [OAUTH-WG] How do we deal with unrecognized elements in requests and responses?
Thread-Index: AcsZHb51xCcmHhoHS/umV08hWVAYyAAHdm2A
Message-ID: <90C41DD21FB7C64BB94121FBBC2E72343B3ED4C3EA@P3PW5EX1MB01.EX1.SECURESERVER.NET>
References: <7C01E631FF4B654FA1E783F1C0265F8C579D0F52@TK5EX14MBXC117.redmond.corp.microsoft.com> <90C41DD21FB7C64BB94121FBBC2E72343B3ED4BCB0@P3PW5EX1MB01.EX1.SECURESERVER.NET> <1277989381.28743.160.camel@localhost.localdomain>
In-Reply-To: <1277989381.28743.160.camel@localhost.localdomain>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: en-US
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Cc: OAuth WG <oauth@ietf.org>
Subject: Re: [OAUTH-WG] How do we deal with unrecognized elements in requests and responses?
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: Thu, 01 Jul 2010 16:37:31 -0000
Ignore as in, pretend it wasn't sent (from either the client or server). EHL > -----Original Message----- > From: Justin Richer [mailto:jricher@mitre.org] > Sent: Thursday, July 01, 2010 6:03 AM > To: Eran Hammer-Lahav > Cc: Yaron Goland; OAuth WG > Subject: Re: [OAUTH-WG] How do we deal with unrecognized elements in > requests and responses? > > #2 is the best route forward. If a particular extension requires its parameters > to be present and handled, then it has a few different options. One is > breaking at the server side, either with an explicit error or throwing away > some other required bit, which has been mentioned. Another is looking for a > callback return parameter on the client side. If the server doesn't return it, > then the server didn't support that extension and the client should break the > flow at that point. > > I want to ask the list though: what exactly do we mean by ignoring > parameters? Is it that a server library will ignore unknown parameters coming > in when doing its processing? That I agree with completely. Same with > parameters coming back to the client from the server. If you don't know > about it, don't try to do anything with it. The one case that I don't think > libraries can *ignore* extra parameters is when using a client library to build a > request to a server. A particular server implementation may require extra > parameters on the request in order to function (such as MediaWiki's title > parameter), and a client needs to be able to pass such things through. These > parameters can effectively be thought of as part of the address of the server > URL, can be ignored by the OAuth part of the server process, but cannot be > dropped by the client building the request. So "ignore" in this case means > "quietly pass through" and not "drop". > > In most instances outside of the Big Web Companies, OAuth is going to be > the new kid being grafted onto an existing framework or application. As such, > it really needs to play nice. > > -- Justin > > > On Mon, 2010-06-28 at 20:59 -0400, Eran Hammer-Lahav wrote: > > There are 3 general ways to deal with this: > > > > > > > > 1. Break on unrecognized parameters – this tends to make the use of > > extensions hard, and at a minimum requires an error to include the bad > > parameter in a machine readable way (so a library can figure out an > > extension is not supported). > > > > > > > > 2. Ignore unrecognized parameters – this is the usual way of dealing > > with extensible protocols. It has security implications when extension > > parameters must not be ignored. However, the workaround is simply to > > break something else (i.e. replace the client_id with something else > > that will cause the normal flow to break). > > > > > > > > 3. Same as #2 but include a directive which means ‘must not ignore any > > parameter; return error if any parameter is unknown’. XRD used to > > include such a ‘must-support’ attribute for properties but was dropped > > due to lack of use cases. > > > > > > > > I think #2 offers a good enough balance here, but am happy to discuss > > #3 if people have actual use cases where ignoring an extension will > > cause security issues. Note that with the expectation of error codes, > > my upcoming extensibility proposal does not allow adding any new > > parameter values (only new parameters). > > > > > > > > EHL > > > > > > > > From: oauth-bounces@ietf.org [mailto:oauth-bounces@ietf.org] On Behalf > > Of Yaron Goland > > Sent: Monday, June 28, 2010 3:02 PM > > To: oauth@ietf.org > > Subject: [OAUTH-WG] How do we deal with unrecognized elements in > > requests and responses? > > > > > > > > > > In a private thread with Eran an issue came up regarding how to handle > > unrecognized arguments in OAuth requests and responses. > > > > > > > > For example, if a token endpoint receives an access token request that > > contains both a client_id and a client_foo_bar argument, what should > > it do? Should it reject the request since it doesn’t recognize > > client_foo_bar? Should it ignore client_foo_bar and just process the > > request based on client_id? > > > > > > > > Similarly imagine that a response to an access token request contains > > a JSON member with some unrecognized name. What’s the right behavior? > > Ignore the unrecognized value? Or treat the response as badly > > formatted and fail out? > > > > > > > > We need to define in the spec how to deal with unrecognized > > extensions. Typically the rule is ‘ignore what you don’t recognize’ > > but there is a countervailing rule which applies here which is > > “security is different”. Typically ignoring unrecognized elements in a > > security context can lead to security holes. > > > > > > > > Just looking at the history of OAuth I suspect we need to go with the > > ignore rule and then explore ad nauseam in the security considerations > > section all the ways that the ignore rule can go wrong if extensions > > aren’t handled carefully. > > > > > > > > Thoughts? > > > > > > > > Thanks, > > > > > > > > Yaron > > > > >
- [OAUTH-WG] How do we deal with unrecognized eleme… Yaron Goland
- Re: [OAUTH-WG] How do we deal with unrecognized e… Marius Scurtescu
- Re: [OAUTH-WG] How do we deal with unrecognized e… Ian McKellar
- Re: [OAUTH-WG] How do we deal with unrecognized e… Eran Hammer-Lahav
- Re: [OAUTH-WG] How do we deal with unrecognized e… David Recordon
- Re: [OAUTH-WG] How do we deal with unrecognized e… Eran Hammer-Lahav
- Re: [OAUTH-WG] How do we deal with unrecognized e… Igor Faynberg
- Re: [OAUTH-WG] How do we deal with unrecognized e… Zeltsan, Zachary (Zachary)
- Re: [OAUTH-WG] How do we deal with unrecognized e… Yaron Goland
- Re: [OAUTH-WG] How do we deal with unrecognized e… Robert Sayre
- Re: [OAUTH-WG] How do we deal with unrecognized e… Justin Richer
- Re: [OAUTH-WG] How do we deal with unrecognized e… Pelle Braendgaard
- Re: [OAUTH-WG] How do we deal with unrecognized e… Eran Hammer-Lahav
- Re: [OAUTH-WG] How do we deal with unrecognized e… Marius Scurtescu
- Re: [OAUTH-WG] How do we deal with unrecognized e… Justin Richer