Re: [OAUTH-WG] How do we deal with unrecognized elements in requests and responses?

Pelle Braendgaard <pelle@stakeventures.com> Thu, 01 July 2010 13:42 UTC

Return-Path: <pelleb@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 AA1683A68E3 for <oauth@core3.amsl.com>; Thu, 1 Jul 2010 06:42:45 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.233
X-Spam-Level:
X-Spam-Status: No, score=-1.233 tagged_above=-999 required=5 tests=[AWL=0.745, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622]
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 9atAC3TvpGvr for <oauth@core3.amsl.com>; Thu, 1 Jul 2010 06:42:44 -0700 (PDT)
Received: from mail-pv0-f172.google.com (mail-pv0-f172.google.com [74.125.83.172]) by core3.amsl.com (Postfix) with ESMTP id 2768C3A68A0 for <oauth@ietf.org>; Thu, 1 Jul 2010 06:42:43 -0700 (PDT)
Received: by pvd12 with SMTP id 12so1091307pvd.31 for <oauth@ietf.org>; Thu, 01 Jul 2010 06:42:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=uUM/vSS2T3oRrUBOOx0QYIlL6JdHJClJeBfO9wqQgLo=; b=ehlj71KHQe9Aj+bJa77wy07OSYWNCzJP1kyt+dlUeboUiZcNfGnDnxNSHAcNYYTgxP 7P7WbEn4owaS46h9nid9TQryN0+FnBCGYGDO5NsTIkgjHrzzUCBmOUP2A+/0blTXpoBq NvEw09ytVHAPq1dtj2WS30b9R6Ba7QOEPUhnw=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=IlyvJvu692EotBRiLm8CiiET8ySe9hUdI3vVlFFQM3mn6n+q5VLZnwwzGdPcK15DLZ 1VS0H9WTxugIXaYenhJmbgMP70na6yZx4H43skbmjsEmEI6jFDPGbkhaIVz27RbvFnhP aSegHRC9X9aMzgn0H74YSoGIWyp9Rq4YtvRl0=
MIME-Version: 1.0
Received: by 10.114.188.30 with SMTP id l30mr11973332waf.134.1277991769803; Thu, 01 Jul 2010 06:42:49 -0700 (PDT)
Sender: pelleb@gmail.com
Received: by 10.114.58.5 with HTTP; Thu, 1 Jul 2010 06:42:49 -0700 (PDT)
In-Reply-To: <1277989381.28743.160.camel@localhost.localdomain>
References: <7C01E631FF4B654FA1E783F1C0265F8C579D0F52@TK5EX14MBXC117.redmond.corp.microsoft.com> <90C41DD21FB7C64BB94121FBBC2E72343B3ED4BCB0@P3PW5EX1MB01.EX1.SECURESERVER.NET> <1277989381.28743.160.camel@localhost.localdomain>
Date: Thu, 01 Jul 2010 09:42:49 -0400
X-Google-Sender-Auth: bdLaIlgbmUZOo2E4Mni1rOCu6W0
Message-ID: <AANLkTimrcLGuVz7_WF7gPQyzkK52anCVr_0Kjhw40L6f@mail.gmail.com>
From: Pelle Braendgaard <pelle@stakeventures.com>
To: Justin Richer <jricher@mitre.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
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 13:42:46 -0000

#2 makes most sense to me

On Thu, Jul 1, 2010 at 9:03 AM, Justin Richer <jricher@mitre.org> wrote:
> #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 mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth
>



-- 
http://agree2.com - Reach Agreement!
http://stakeventures.com - My blog about startups and agile banking