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

Sergey Beryozkin <sberyozkin@gmail.com> Wed, 10 February 2016 10:10 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 E03191A1A43 for <oauth@ietfa.amsl.com>; Wed, 10 Feb 2016 02:10: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 kGisHD_rdmGX for <oauth@ietfa.amsl.com>; Wed, 10 Feb 2016 02:10:05 -0800 (PST)
Received: from mail-wm0-x234.google.com (mail-wm0-x234.google.com [IPv6:2a00:1450:400c:c09::234]) (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 F00A81A1A45 for <oauth@ietf.org>; Wed, 10 Feb 2016 02:10:04 -0800 (PST)
Received: by mail-wm0-x234.google.com with SMTP id g62so19553331wme.0 for <oauth@ietf.org>; Wed, 10 Feb 2016 02:10: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=5VRyXFQ1Tx+nvp5Xwv9Ncvso0BpwbT1QF81pPxDqHOc=; b=HUld0pLGnR/TL3uF/nNV+fJEEYzHKcxHSZ0X9JiuxZKQuONUg7hYT5oXNR4zCOEJsK PYfPzk8mHi0mUzAD3fC4Ze8pOcu7NZjDlLye/ys4vSccnM1kcpGH44Wlh8QinmvxS1wJ wpFchMCSvEXdK3rhzhev79yqdvVzSWNqEEnzq7m5ncUpUGhtjEUgfKyONM+vHQPpLaEy 6/9+uX6THULG4YvVbTVs8h1sskPNsHnox/2J0YCwXxlvvDVHmIkMUC/99V0hv3OzBWvR 3+iDYpLyVFbe6+N+yfUWGn6XGIXE6OZ5IZ0rEWeRB29qUxqp/kniwjZZcc3Q9Vc9Y/de o9+Q==
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=5VRyXFQ1Tx+nvp5Xwv9Ncvso0BpwbT1QF81pPxDqHOc=; b=dIFJWwJysOahmNq+YVCBbmSIB399gLH7eMLis49XwQpbExYIrtcN8oIcPZSKpUaUI2 BZcLZtoj0nemv6cZ27MFagTmznfOkEWvyrKYcTarwW3G8+TUZ6R5SZA2wxYvz4N4JCWz 9VS3SLCFN7TaJcP4lg/QhWnZTMWocLQoNCS4ZrVXdXKb7H3fQPLhmTY8ScRBYql3dMRU 27vM/uGTdo8wuzOJY9YOo0mIZn36R337d8vreAP4nyNSyvHs0rO8rbr7I/Oj0FgU7Muq phZC1mxwoZAM2VcAxF57x+qtuM8Jlz6LKF9uWmrmh4N9+FWfKmvm4vKxNpxwbDO2+ILd eUQw==
X-Gm-Message-State: AG10YOT2mMDqHvGkAj2qUDKox/AK4oII4LUJZANY5f9uErLM4oSNTdlze2fXuZt/z3HJ1A==
X-Received: by 10.28.130.205 with SMTP id e196mr10413345wmd.34.1455099003590; Wed, 10 Feb 2016 02:10:03 -0800 (PST)
Received: from [10.36.226.98] ([80.169.137.63]) by smtp.googlemail.com with ESMTPSA id x66sm2659665wmb.20.2016.02.10.02.10.02 for <oauth@ietf.org> (version=TLSv1/SSLv3 cipher=OTHER); Wed, 10 Feb 2016 02:10: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> <56BA11ED.6080109@gmail.com> <56BAEDC7.4040806@connect2id.com>
From: Sergey Beryozkin <sberyozkin@gmail.com>
Message-ID: <56BB0C6C.1060507@gmail.com>
Date: Wed, 10 Feb 2016 10:09:48 +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: <56BAEDC7.4040806@connect2id.com>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
Archived-At: <http://mailarchive.ietf.org/arch/msg/oauth/7eisu0PHE69S8HryO2kOLrzVD0s>
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 10:10:07 -0000

Hi

I got it, thanks for clarifying the idea :-)

Thanks, Sergey
On 10/02/16 07:59, Vladimir Dzhuvinov wrote:
>
>
> 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
>>>
>>
>>
>
>
>
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth
>