Re: [OAUTH-WG] Missing response_type with implicit and code flows on the same path

Sergey Beryozkin <sberyozkin@gmail.com> Tue, 09 February 2016 16:21 UTC

Return-Path: <sberyozkin@gmail.com>
X-Original-To: oauth@ietfa.amsl.com
Delivered-To: oauth@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 5CC3F1AC416 for <oauth@ietfa.amsl.com>; Tue, 9 Feb 2016 08:21:06 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, SPF_PASS=-0.001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fmZqbsfc3VfZ for <oauth@ietfa.amsl.com>; Tue, 9 Feb 2016 08:21:04 -0800 (PST)
Received: from mail-wm0-x232.google.com (mail-wm0-x232.google.com [IPv6:2a00:1450:400c:c09::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 879711AC418 for <oauth@ietf.org>; Tue, 9 Feb 2016 08:21:04 -0800 (PST)
Received: by mail-wm0-x232.google.com with SMTP id g62so181315980wme.0 for <oauth@ietf.org>; Tue, 09 Feb 2016 08:21:04 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=beBwIcwZBKx9OYGR4YruVNLfHVDXOdbwMnJ7LhhWZUU=; b=WxhMmhUx23/jtQBdskoXHa+0L8+HZeb3BLD4qzfc0tNJvS5QCBV5YA0pXsgjctnGJN aXH1W9zUdVsmF5EqbEJFmISbOQoxszlN7o+0IylPOxWJNov2diRVNKXmfujWM8zKSsuM fmMymVqQmF9auLADYfxM0UHDP0Lb6oMS1JSg9zD5SKP9vu+QECKPolEyWJ0wz2AdO6cE +C0X1LisG4hlIPo9FPl8bL0BumQSbLSvubqYgix0irZnS7PkkpjnPILp5mSgeBYqBTb6 r61XMmdHlko0eywCfJ6Qn2o9QBuvDqm0VPFFVTCw9LSriboJs+IOpV6NKs3+xFJfAqjj 3E9g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=beBwIcwZBKx9OYGR4YruVNLfHVDXOdbwMnJ7LhhWZUU=; b=DsHpRIgCjwzPfvmNI9rgvAC/32251a+GT8Hl0fSo21iKbWFfnxIN9a39xRm41ueYJJ iP8x/nYJ/lzArCkCiHnA+57N08jXz/EzjVC2vzwENyZi1GB4FlaMfubNSMWCjA4yT7uh DnDU35p9oJICysjvF4YwI31AeRRFyrUbGkP7LjDO46cvunN98ulL5FGUNRL2LUS0TUaF xu+UwM19HdNvO1Ery6u3IuONI0UvSmw/R7oCyv5HyzLuMLaW334IJqT+sBATx55Ujoij n5lJXkVAICX4fLPG6swE8lvF5xWvh8DriR3M+M3N/fq4jy3i8TqgxlYRBix4Z+137LM3 SThw==
X-Gm-Message-State: AG10YOSb2586f85049KtwyNfkjmH8OrO9NFJXxKPRFsgLeZanj1OlwpiBL7sooRt7yuBPg==
X-Received: by 10.194.103.198 with SMTP id fy6mr40746479wjb.48.1455034863147; Tue, 09 Feb 2016 08:21:03 -0800 (PST)
Received: from [10.36.226.98] ([80.169.137.63]) by smtp.googlemail.com with ESMTPSA id e198sm18431363wmd.0.2016.02.09.08.21.01 for <oauth@ietf.org> (version=TLSv1/SSLv3 cipher=OTHER); Tue, 09 Feb 2016 08:21:02 -0800 (PST)
To: oauth@ietf.org
References: <56B3A400.2080606@gmx.net> <62D1E1DB-17A4-4ABD-81F3-8659F40D7E88@mit.edu> <CAOahYUxSMopc0hoXG8ocMk+p1b__NqapuztuHiWchpYRQqvP2w@mail.gmail.com> <9DC45CB4-07D8-4F17-8311-02AD60521379@ve7jtb.com> <CAAP42hBnZMV51vcL2GQD6kbCS7aDC0pz0KP-nMsoT0j+EgkiGg@mail.gmail.com> <56B9FA20.60509@gmail.com> <56BA0F42.5070702@connect2id.com>
From: Sergey Beryozkin <sberyozkin@gmail.com>
Message-ID: <56BA11ED.6080109@gmail.com>
Date: Tue, 09 Feb 2016 16:21:01 +0000
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1
MIME-Version: 1.0
In-Reply-To: <56BA0F42.5070702@connect2id.com>
Content-Type: text/plain; charset="windows-1252"; format="flowed"
Content-Transfer-Encoding: 7bit
Archived-At: <http://mailarchive.ietf.org/arch/msg/oauth/_XzQSAPXrOmcoDV8PhuG6GqtcKY>
Subject: Re: [OAUTH-WG] Missing response_type with implicit and code flows on the same path
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: OAUTH WG <oauth.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/oauth>, <mailto:oauth-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/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: Tue, 09 Feb 2016 16:21:06 -0000

Hi Vladimir

Thanks for the response,
On 09/02/16 16:09, Vladimir Dzhuvinov wrote:
> Hi Sergey,
>
> Yes, HTTP 400 is one way to handle a missing response_type with a
> "universal" authz endpoint.
>
Indeed, looks like it makes sense
> Or, you could encode the error in the query string as well as the
> fragment, and redirect back to the client.
>
I'm not sure if that can be done in a 'universal' endpoint case because 
it is not known if a client is running in the implicit context or code 
flow context. Though I guess it a client is restricted at the 
registration time to run only in the code or implicit flows then it will 
provide a hint...

Cheers, Sergey

> Vladimir
>
>
> On 09/02/16 16:39, Sergey Beryozkin wrote:
>> Hi
>>
>> OAuth2 spec recommends how to deal with a missing response_type, set
>> an error as a query or fragment parameter, depending on whether it is
>> the authorization code or implicit flow and redirect.
>>
>> This implies that authorization code and implicit handlers listen on
>> different paths, for example,
>>
>> code: /code
>> implicit: /implicit
>>
>> so if a response type is missing the handler will know how to set the
>> error on the redirect uri, as a query or a fragment.....
>>
>> However, I'd like to have a single handler, example (from the OIDC core):
>>
>> "https://server.example.com/authorize"
>>
>> which will support both the code and implicit flows.
>>
>> Here, 'response_type' is an obvious hint on what kind of flow is in
>> process, however, if it is missing, how will a server know how to
>> report a missing response_type error if it uses a shared "/authorize"
>> path.
>>
>> I think in such cases reporting 400 is reasonable. Do you agree ?
>>
>> Thanks, Sergey
>>
>> _______________________________________________
>> 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
>


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/