Re: [OAUTH-WG] [Openid-specs-ab] OAuth Security Topics -- Recommend authorization code instead of implicit

John Bradley <ve7jtb@ve7jtb.com> Tue, 27 November 2018 20:37 UTC

Return-Path: <ve7jtb@ve7jtb.com>
X-Original-To: oauth@ietfa.amsl.com
Delivered-To: oauth@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 03BBA124D68 for <oauth@ietfa.amsl.com>; Tue, 27 Nov 2018 12:37:07 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.36
X-Spam-Level:
X-Spam-Status: No, score=-3.36 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-1.459, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=ve7jtb-com.20150623.gappssmtp.com
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 Fmule8oodc0W for <oauth@ietfa.amsl.com>; Tue, 27 Nov 2018 12:37:04 -0800 (PST)
Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) (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 3DA66126F72 for <oauth@ietf.org>; Tue, 27 Nov 2018 12:37:04 -0800 (PST)
Received: by mail-qk1-x742.google.com with SMTP id o89so15519571qko.0 for <oauth@ietf.org>; Tue, 27 Nov 2018 12:37:04 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ve7jtb-com.20150623.gappssmtp.com; s=20150623; h=from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=PNxguyTuEv8zrULfS/wQcW85RUcMdotWPbe9Mm/uFMA=; b=IHmGZI5tsex51lkn3GAoePLr2rLh+RvUcpRpAksnxtYcrQOVukUYiiiEksbSnhdFzs q1CZakPDsQxwGXSO7+3l0LYxcrbF5dGwxhOetiSFtMiIr+X3yf1O0huZsq2UN8V+GVVJ SRbqLAxnIzD53626ukvjpB8UzRptfc/lolKfollAwNUu/iJ1mD1r8KuzOp6qhAXtZU8m Wo6Av1xwHX2+2OvtzpmHFHm9ig2xT9crlPYvczYXKjhE2zFSght8YQx9kzZRIfOAeE4u GqECRp43m6IwFnfnrVUO0miCzBFyT2WlWQt4GtocT5a1GyLpRPceuY0Us9KBARyy4hPI L4FA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=PNxguyTuEv8zrULfS/wQcW85RUcMdotWPbe9Mm/uFMA=; b=LnNxUxUrC90U5IhbyRgSbTfx9hlsBKeTNJDv2tUFWqDraTagplu24KeYtE9PkXqnzH JgLgP4wruURJtNMuPDrGmIzMs3iQyAz1SfiIq9pbLIsB/yQfGeFIjN2TztobNxBabiy4 eft2/M80kwmUpNY3uOZnIHf6qwJHMVDn8JHJVfvMk5mznrsy2r5dQp0X+Vdn8BzZOMCU Bpudz7AzNmdmzonTvZFrM0UdYpGdYbBzN2DAREsxbgX3xkhwphEBxeSc8rxIifXmSiOE WR6JBGAiY/eygXuASddZim9CsPFjJrsVxXy8MAMoyd15hjlSWuM+1D8+34ZoaUhYg95A x+pA==
X-Gm-Message-State: AA+aEWZZJ+ltFRqZj9il7QHGJjCLEhNVQF1coHLgFoOBF8KA3BW3D2eG l2cjLNs1zjMyUdetV8YEE1ehTg==
X-Google-Smtp-Source: AFSGD/X1ON3nJ3zBMw3AvT8+AjeWdTMugRKr1wEBTFycOgD91yGz995IYLgDP0TqsqTSEeQ5foW7WA==
X-Received: by 2002:a37:ad0:: with SMTP id 199mr31331184qkk.345.1543351022730; Tue, 27 Nov 2018 12:37:02 -0800 (PST)
Received: from [192.168.8.103] ([191.125.134.153]) by smtp.gmail.com with ESMTPSA id o27sm3187000qkh.35.2018.11.27.12.37.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Nov 2018 12:37:01 -0800 (PST)
From: John Bradley <ve7jtb@ve7jtb.com>
X-Google-Original-From: John Bradley <VE7JTB@ve7jtb.com>
To: Torsten Lodderstedt <torsten@lodderstedt.net>
Cc: "openid-specs-ab@lists.openid.net Ab" <openid-specs-ab@lists.openid.net>, Nat Sakimura <sakimura@gmail.com>, oauth <oauth@ietf.org>, Jim Manico <jim@manicode.com>
References: <VI1PR0801MB211266BA6F6E06FFB3081425FAD80@VI1PR0801MB2112.eurprd08.prod.outlook.com> <5494f764-2d14-089a-8fe8-132a65e32d5e@manicode.com> <8935ff0f-aeab-c773-5e2d-6fedcc29119d@connect2id.com> <CABzCy2D0JAr-C1-jTcodpBdoUNx1We3JDg-PMcsOBL1Ga_m-Hw@mail.gmail.com> <2297d085-28f2-15dd-6dba-937dce9f2122@manicode.com> <CABzCy2AW0dvmEqfHgd=-ULdYSxnUXwrz6jiCBpKw7MQSu-YFbA@mail.gmail.com> <327B68FD-9449-4809-A3B8-BC79C5B1D42C@lodderstedt.net> <CAANoGhK9cYS8NFrpwczVsifz7pdraqOZpBoDHFZkg_qKdj4Vqg@mail.gmail.com> <E7BA53F0-B925-4C47-9C41-CFBC0EB36D18@lodderstedt.net>
Message-ID: <99e3a87e-1904-b756-d3c2-936ea5bb5b6e@ve7jtb.com>
Date: Tue, 27 Nov 2018 17:36:58 -0300
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:64.0) Gecko/20100101 Thunderbird/64.0
MIME-Version: 1.0
In-Reply-To: <E7BA53F0-B925-4C47-9C41-CFBC0EB36D18@lodderstedt.net>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/F6DiGF3DSYVJhgPaja61eSH3ss8>
Subject: Re: [OAUTH-WG] [Openid-specs-ab] OAuth Security Topics -- Recommend authorization code instead of implicit
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.29
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, 27 Nov 2018 20:37:07 -0000

I understand that, but hat is Nat's concern as I understand it.

When we say no implicit people, have a problem because implicit is 
imprecise.

We are saying no AT returned in the response from the authorization 
endpoint.

Nat points out that id_token may contain AT for the self issued client.

So unless we say that is OK if the AT are sender constrained we wind up 
implying that a OpenID profile of OAuth is in violation of the BCP.

I am just trying to make sure everyone is on the same page with why Nat 
was -1.

It really has nothing to do with the SPA use case.

John B.

On 11/27/2018 5:28 PM, Torsten Lodderstedt wrote:
> Hi John,
>
> as you said, self issued IDPs (https://openid.net/specs/openid-connect-core-1_0.html#SelfIssued) are supposed to provide the response type „id_token“ only. I don’t think the proposal being discussed here is related to this OIDC mode.
>
> best regards,
> Torsten.
>
>> Am 27.11.2018 um 20:54 schrieb John Bradley <ve7jtb@ve7jtb.com>:
>>
>> I talked to Nat about this a bit today.
>>
>> The thing he is concerned about is mostly around the self issued IDP that doesn't have a token endpoint(atleast not easaly).
>>
>> The main use case for that is the id_token response type where claims are retuned in the id_token.
>>
>> Because it is fragment encoded some people call that implicit.   That is not what we are trying to stop.
>>
>> In some cases in that flow there may be distributed claims returned with access Token inside the id_token.    I think most people would agree that those should be pop or sender constrained tokens.
>>
>> In the case of self issued the RP would be a server and could do sender constrained via some mechinisim that is yet to be defined.
>>
>> So if someone wanted to return a access token in a id_token to do distributed claims I don't think we have a problem with that as long as the token is protected by being sender constrained in some reasonable way.
>>
>> This is a touch hypothetical from the basic OAuth perspective, so I don't know how deep we want to go into it.
>>
>> I think the point is not to accidently prohibit something that could be done in future.
>>
>> I also think we should not conflate confidential clients that can authenticate to the token endpoint with sender constrained/PoP clients that can deal with bound tokens.   Yes both have keys but it is better to describe them separately.
>>
>> John B.
>>
>> On Tue, Nov 27, 2018, 4:30 PM Torsten Lodderstedt via Openid-specs-ab <openid-specs-ab@lists.openid.net wrote:
>> Hi Nat,
>>
>> I understand you are saying your draft could provide clients with an application level mechanism to sender constrain access tokens. That’s great!
>>
>> But I don’t see a binding to response type „token id_token“. Why do you want to expose the tokens via the URL to attackers?
>>
>> You could easily use your mechanism with code. That would also give you the chance to really authenticate the confidential client before you issue the token.
>>
>> kind regards,
>> Torsten.
>>
>>> Am 27.11.2018 um 16:57 schrieb Nat Sakimura <sakimura@gmail.com>:
>>>
>>> I am not talking about SPA.
>>> The client is a regular confidential client that is running on a server.
>>>
>>> Best,
>>>
>>> Nat Sakimura
>>>
>>>
>>> 2018年11月27日(火) 16:55 Jim Manico <jim@manicode.com>:
>>> Nat,
>>>
>>> How is proof of possession established in a modern web browser in the implicit flow?
>>>
>>> My understanding is that token binding was removed from Chrome recently effectively killing browser-based PoP tokens.
>>>
>>> https://identiverse.com/2018/10/31/chrome-puts-token-binding-in-a-bind/
>>>
>>> Am I missing something?
>>>
>>> Aloha, Jim
>>>
>>>
>>>
>>> On 11/27/18 9:00 PM, Nat Sakimura wrote:
>>>> I am actually -1.
>>>>
>>>> +1 for public client and the tokens that are not sender/key constrained.
>>>>
>>>> Just not being used right now does not mean that it is not useful.. In fact, I see it coming.
>>>> Implicit (well, Hybrid “token id_token” really) is very useful in certain cases.
>>>> Specifically, when the client is confidential (based on public key pair), and uses sender constrained (key-constrained) token such as the one explained in https://tools.ietf.org/html/draft-sakimura-oauth-jpop-04#section-5, it is very useful.
>>>> (Key-constrained token is the remaining portion of this draft that did not get incorporated in the MTLS draft. )
>>>> In fact it is the only viable method for Self-Issued OpenID Provider.
>>>>
>>>> So, the text is generally good but it needs to be constrained like “Unless the client is confidential and the access token issued is key constrained, ... “
>>>>
>>>> Best,
>>>>
>>>> Nat Sakimura
>>>>
>>>>
>>>> 2018年11月27日(火) 16:01 Vladimir Dzhuvinov <vladimir@connect2id.com>:
>>>> +1 to recommend the deprecation of implicit.
>>>>
>>>> I don't see a compelling reason to keep implicit when there is an
>>>> established alternative that is more secure.
>>>>
>>>> Our duty as WG is to give developers the best and most sensible practice.
>>>>
>>>> CORS adoption is currently at 94% according to
>>>> https://caniuse.com/#feat=cors
>>>>
>>>> Vladimir
>>>>
>>>>
>>>> _______________________________________________
>>>> OAuth mailing list
>>>> OAuth@ietf.org
>>>> https://www.ietf.org/mailman/listinfo/oauth
>>>> -- 
>>>> Nat Sakimura (=nat)
>>>> Chairman, OpenID Foundation
>>>> http://nat..sakimura.org/
>>>> @_nat_en
>>>>
>>>>
>>>> _______________________________________________
>>>> OAuth mailing list
>>>>
>>>> OAuth@ietf.org
>>>> https://www.ietf.org/mailman/listinfo/oauth
>>> -- 
>>> Jim Manico
>>> Manicode Security
>>>
>>> https://www.manicode.com
>>> -- 
>>> Nat Sakimura (=nat)
>>> Chairman, OpenID Foundation
>>> http://nat.sakimura.org/
>>> @_nat_en
>>> _______________________________________________
>>> OAuth mailing list
>>> OAuth@ietf.org
>>> https://www.ietf.org/mailman/listinfo/oauth
>> _______________________________________________
>> Openid-specs-ab mailing list
>> Openid-specs-ab@lists.openid.net
>> http://lists.openid.net/mailman/listinfo/openid-specs-ab