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

Vladimir Dzhuvinov <vladimir@connect2id.com> Wed, 10 February 2016 07:59 UTC

Return-Path: <vladimir@connect2id.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 EF14B1A000A for <oauth@ietfa.amsl.com>; Tue, 9 Feb 2016 23:59:07 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001] 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 IsKYdZvHmXoH for <oauth@ietfa.amsl.com>; Tue, 9 Feb 2016 23:59:06 -0800 (PST)
Received: from p3plsmtpa08-10.prod.phx3.secureserver.net (p3plsmtpa08-10.prod.phx3.secureserver.net [173.201.193.111]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 7E87D1A0013 for <oauth@ietf.org>; Tue, 9 Feb 2016 23:59:06 -0800 (PST)
Received: from [192.168.0.104] ([77.77.164.50]) by p3plsmtpa08-10.prod.phx3.secureserver.net with id GXz41s00315ZTut01Xz5eo; Wed, 10 Feb 2016 00:59:06 -0700
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> <56BA11ED.6080109@gmail.com>
From: Vladimir Dzhuvinov <vladimir@connect2id.com>
Organization: Connect2id Ltd.
Message-ID: <56BAEDC7.4040806@connect2id.com>
Date: Wed, 10 Feb 2016 09:59:03 +0200
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: <56BA11ED.6080109@gmail.com>
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg="sha-256"; boundary="------------ms000405040604090803010204"
Archived-At: <http://mailarchive.ietf.org/arch/msg/oauth/mh3QfvKYM9NJICsg6DUA5Yuhmy8>
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: Wed, 10 Feb 2016 07:59:08 -0000


On 09/02/16 18:21, Sergey Beryozkin wrote:
> 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...

If you set both the query and the fragment you'll take care of both flows :)
>
> 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
>>
>
>

-- 
Vladimir Dzhuvinov :: vladimir@connect2id.com