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

Hannes Tschofenig <Hannes.Tschofenig@arm.com> Sat, 01 December 2018 09:06 UTC

Return-Path: <Hannes.Tschofenig@arm.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 75BE3126C7E for <oauth@ietfa.amsl.com>; Sat, 1 Dec 2018 01:06:33 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.359
X-Spam-Level:
X-Spam-Status: No, score=-3.359 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-1.459, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=armh.onmicrosoft.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 M7IrqW_W2cXD for <oauth@ietfa.amsl.com>; Sat, 1 Dec 2018 01:06:29 -0800 (PST)
Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20065.outbound.protection.outlook.com [40.107.2.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C7C8312426E for <oauth@ietf.org>; Sat, 1 Dec 2018 01:06:28 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=V3x5DILb6rObP5mxRIPhiRqvCFo8Pgpfj6v4mf+XWe4=; b=UC6500VxcNp6lDF7zgiIg92ZKbUNZfAXFuhmPte9Z6gib3gt/nq2HpZRiLEDb8qWDFhKQbmCEtoEofzUoQiW4Xz8fO5cysKFCo5PCq/B82FyR56MvoazdDjWAT7pvHFHAwvLu8ebpzuHB1vWknIcOjrGsH3JFHOEW8lkK8Yhc7Y=
Received: from VI1PR0801MB2112.eurprd08.prod.outlook.com (10.173.75.16) by VI1PR0801MB1357.eurprd08.prod.outlook.com (10.167.198.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1361.19; Sat, 1 Dec 2018 09:06:24 +0000
Received: from VI1PR0801MB2112.eurprd08.prod.outlook.com ([fe80::2056:1db1:e01:4670]) by VI1PR0801MB2112.eurprd08.prod.outlook.com ([fe80::2056:1db1:e01:4670%3]) with mapi id 15.20.1361.022; Sat, 1 Dec 2018 09:06:24 +0000
From: Hannes Tschofenig <Hannes.Tschofenig@arm.com>
To: Aaron Parecki <aaron@parecki.com>, Torsten Lodderstedt <torsten@lodderstedt.net>
CC: Daniel Fett <fett@danielfett.de>, IETF oauth WG <oauth@ietf.org>
Thread-Topic: [OAUTH-WG] OAuth Security Topics -- Recommend authorization code instead of implicit
Thread-Index: AdR/8wsdlCSgLoNZTem+1MxrAorhbwHYZjwAAABEwfcABVOygAAAbOyYAAB2LIAAH9tBAAAIC/AAAEN4+4AADeWWQA==
Date: Sat, 01 Dec 2018 09:06:24 +0000
Message-ID: <VI1PR0801MB21120AA6CC9437E237F481A2FAAC0@VI1PR0801MB2112.eurprd08.prod.outlook.com>
References: <VI1PR0801MB211266BA6F6E06FFB3081425FAD80@VI1PR0801MB2112.eurprd08.prod.outlook.com> <CAD9ie-v3onmKc498cg_-a0AD58ZV=aZANtz=UV+Q0f=9N3nSzQ@mail.gmail.com> <OSBPR01MB2869E83F37046C7FCD4463DDF9D10@OSBPR01MB2869.jpnprd01.prod.outlook.com> <9FF3F589-0423-4CBC-B323-481F771D097C@lodderstedt.net> <OSBPR01MB28690F77DFFB2A85BDB83FBAF9D10@OSBPR01MB2869.jpnprd01.prod.outlook.com> <D6C66E6A-687B-4997-B830-980BE25994C2@lodderstedt.net> <CAANoGhL9aD75AV9QQRdeGE1=4ynjTnULNVr0PXXvt20ipsb4Rw@mail.gmail.com> <FE51CE20-7A49-4A13-A180-6A7C481F3965@lodderstedt.net> <CAGBSGjrzeeR5QQ=nA=gTj0q7sRvRVc0DDacbxB+ED87ymHSOuA@mail.gmail.com>
In-Reply-To: <CAGBSGjrzeeR5QQ=nA=gTj0q7sRvRVc0DDacbxB+ED87ymHSOuA@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=Hannes.Tschofenig@arm.com;
x-originating-ip: [80.92.115.19]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; VI1PR0801MB1357; 6:OhOyx8ebqvmPiorKJS8eQcSIMTpZ4Fz07tLZPkewmf7LTiShtAvX0mn1aaWXnBeitYf4wLo2q6oibIEX7Fj99OiJDbbbaGvVdutG5hCOzUltiPgnty0p12Qai/vO38f3+iWQ/TuMvob6roocrggXjlWhFtVxkrZGH1UL+qXMj9N3mApQFnIr99edrkwq4EKcQfgslq2dqzeFpNVORt/eFlsa7G0wTJo4nYPtuGxhpEBK6k9PpUnrqBXXsbaH92zLaDeJJMWtW7ToZwwsERgVo1zI6+5Pidb/UqlSRhQ8X78JLRoNql7sO1AKTZAb7FDBG+1+JGyf/FlSZ1LkwY/+Odh3jtZx3gSqZqMsEuPdtPnmgHvYIFaWSv6NfgnFH84bKKMX5+5l3SL1NFO7kPWzcuRM4zXlk3oFY3GS3uWecF7bW13lNDQulEzUUsyuc3UKSaAEEYbU7zEWgayncOoRnA==; 5:blcBfOtsLuyYNA6jg2gYnLBFw6bOwxdnfsOS36ca98qT6eyZ6O9gIqsBUtKXNBldtayrX4UFhNgAo2fSypzPEEMYMCtbfQg876xU5W0abGTa/lCDmIGkxrBgxwByKY4zq8WGZoChvCiEI2IFCUFSVkLUDq9aQRGB1okUrmTAhM4=; 7:b4j7jW672G6mBiaPn1OYPnH0hgQTIfjLmn7wmUvseU6fIWXQ0P1ywacBxB3zIbnX6RpLLYW7m9+0jhdXPqJ5v3T7QtgbjZgVT5DRFJOi1CqPGx+GeiChfrUowIlxYyZ7Xx0cVBV9sL2PT8LYTW+mlg==
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-ms-office365-filtering-correlation-id: fdfe9307-68a0-4054-6746-08d6576c4528
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:VI1PR0801MB1357;
x-ms-traffictypediagnostic: VI1PR0801MB1357:
x-microsoft-antispam-prvs: <VI1PR0801MB13578574AE0CE57E66A49E2BFAAC0@VI1PR0801MB1357.eurprd08.prod.outlook.com>
x-ms-exchange-senderadcheck: 1
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231454)(999002)(944501474)(52105112)(10201501046)(93006095)(93001095)(3002001)(6055026)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(201708071742011)(7699051)(76991095); SRVR:VI1PR0801MB1357; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0801MB1357;
x-forefront-prvs: 087396016C
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(396003)(366004)(346002)(376002)(39860400002)(40434004)(189003)(199004)(365934003)(53754006)(5024004)(3846002)(790700001)(6436002)(66066001)(81166006)(6116002)(8936002)(8676002)(81156014)(53936002)(186003)(102836004)(53546011)(55016002)(6506007)(236005)(14454004)(54896002)(6306002)(9686003)(14444005)(26005)(66574009)(7110500001)(86362001)(15650500001)(97736004)(33656002)(561944003)(256004)(606006)(71200400001)(71190400001)(2420400007)(68736007)(106356001)(105586002)(110136005)(316002)(25786009)(5660300001)(54906003)(4326008)(11346002)(76176011)(99286004)(446003)(476003)(486006)(229853002)(7736002)(93886005)(6246003)(2906002)(53386004)(53376002)(7696005)(74316002)(966005)(72206003)(45080400002)(478600001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0801MB1357; H:VI1PR0801MB2112.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts)
x-microsoft-antispam-message-info: E7I5WzVJv79YDBn+jrlN1fgVUNVzvGyNEud89b06cs28l3AXDeAaemVPiPErmAuz1HnayI4Uc1ClzWHtQ8ducOxcZmq4jM4QTHlVJXh46nwMBFnmgjurb+NOtcKHJpiYdIdmmH3D5FpGKY0FTYLhpmcnMlNOY/8H5MaWbC7XSd5d0miB/TCtxeEXmEzfNEn87oLmrWlxPZwTRrkITIqNGIbU6WR2LaWwNcWFdeizdK4JaeZPOazsxdIFm+8li0fLjESBOLUDd/v4je8jO6whLX53piQ+I4ywxMinkhrT02IPsfjaJSXBaJwJt4kVwHtbgfB5bd2oj+noIyawzHZvVjYTy2YtkZfeFObmTM4R5Mc=
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_VI1PR0801MB21120AA6CC9437E237F481A2FAAC0VI1PR0801MB2112_"
MIME-Version: 1.0
X-OriginatorOrg: arm.com
X-MS-Exchange-CrossTenant-Network-Message-Id: fdfe9307-68a0-4054-6746-08d6576c4528
X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Dec 2018 09:06:24.6082 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB1357
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/YAO6Vosk0WQ1p_Ao8w8jgK9aoow>
Subject: Re: [OAUTH-WG] 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: Sat, 01 Dec 2018 09:06:33 -0000

I agree with Aaron here and I think Section 3.8.1.2<https://tools.ietf.org/html/draft-ietf-oauth-security-topics-10#section-3.8.1.2> of draft-ietf-oauth-security-topics-10  already does a pretty good job.
I was, however, wondering about the subtle implication of the requirement for sender constrained tokens. My understanding of the token binding discussion, which is one of the ways to provide sender-constrained tokens, is that we don’t have good faith in seeing deployment anytime soon. Hence, we are essentially (reading in between the lines of Section 3.8.1.2) saying that you cannot use implicit grant in a practical setup for the web*.

Am I misunderstanding it?

Ciao
Hannes

PS: The IoT case is likely different.

From: OAuth <oauth-bounces@ietf.org> On Behalf Of Aaron Parecki
Sent: Saturday, December 1, 2018 3:18 AM
To: Torsten Lodderstedt <torsten@lodderstedt.net>
Cc: Daniel Fett <fett@danielfett.de>; IETF oauth WG <oauth@ietf.org>
Subject: Re: [OAUTH-WG] OAuth Security Topics -- Recommend authorization code instead of implicit

+1

I would also like to ensure there is a clear definition of "sender constrained" tokens in this BCP.

Aaron


On Thu, Nov 29, 2018 at 10:06 AM Torsten Lodderstedt <torsten@lodderstedt.net<mailto:torsten@lodderstedt.net>> wrote:
Hi all,

based on your feedback on the list and off list, Daniel and I polished the text. That’s our proposal:

—
In order to avoid these issues, clients MUST NOT use the implicit
grant (response type "token") or any other response type issuing access
tokens in the authorization response, such as "token id_token" and "code token id_token“,
unless the issued access tokens are sender-constrained and access token injection in
the authorization response is prevented.
—

Explantation:
- we wanted to have the right balance between a generic definition of the response types we do not recommend/allow to be used and a concrete/actionable list of the affected response types.
- we changed from SHOULD NOT to MUST NOT as suggested by Nat and supported by William

We look forward to seeing your feedback.

kind regards,
Torsten.

> Am 29.11.2018 um 15:15 schrieb John Bradley <ve7jtb@ve7jtb.com<mailto:ve7jtb@ve7jtb.com>>:
>
> I am ok with that.
>
> On Wed, Nov 28, 2018, 8:03 PM Torsten Lodderstedt <torsten@lodderstedt.net<mailto:torsten@lodderstedt.net> wrote:
>
> > Am 28.11.2018 um 23:50 schrieb n-sakimura <n-sakimura@nri.co.jp<mailto:n-sakimura@nri.co.jp>>:
> >
> > That works.
>
> Good!
>
> I just realized this text has an issue with „token“ (only). It would allow „token“ to be used if the token would sender constrained. This completely ignores the fact implicit also shall be abandoned because of its vulnerability for access token injection.
>
> I therefore propose a modified text:
>
>    In order to avoid these issues, Clients SHOULD NOT use the implicit
>    grant. Furthermore, clients SHOULD only use other response types causing the authorization server to
>    issue an access token in the authorization response, if the particular response type detects access token
>    injection and the issued access tokens are sender-constrained.
>
> Or we just state:
>
>   In order to avoid these issues, Clients SHOULD NOT use the response type „token". The response types
> „token id_token“ and „code token id_token“ SOULD NOT be used, if the issued access tokens are not
> sender-constrained.
>
> >
> > In fact, I would further go and say MUST NOT but that probably is too much for a security consideration.
> >
>
> Mike suggested to go with a SHOULD NOT to get the message out but give implementors time to move/change.
>
> > Best,
> >
> > Nat
> >
> > Nat Sakimura / n-sakimura@nri.co.jp<mailto:n-sakimura@nri.co.jp> / +81-90-6013-6276
> >
> > このメールには、本来の宛先の方のみに限定された機密情報が含まれている場合がございます。お心あたりのない場合は、誠に申し訳ございませんが、送信者までお知らせ頂き、また受信されたメールは削除してくださいますようお願い申し上げます。
> >
> > PLEASE READ :This e-mail is confidential and intended for the named recipient only.
> > If you are not an intended recipient, please notify the sender and delete this e-mail.
> >
> > 差出人: Torsten Lodderstedt <torsten@lodderstedt.net<mailto:torsten@lodderstedt.net>>
> > 送信日時: 水曜日, 11月 28, 2018 11:38 午後
> > 宛先: n-sakimura
> > Cc: Dick Hardt; Hannes Tschofenig; oauth@ietf.org<mailto:oauth@ietf.org>
> > 件名: Re: [OAUTH-WG] OAuth Security Topics -- Recommend authorization code instead of implicit
> >
> > Hi Nat,
> >
> >> Am 28.11.2018 um 21:10 schrieb n-sakimura <n-sakimura@nri.co.jp<mailto:n-sakimura@nri.co.jp>>:
> >>
> >> I would support
> >>
> >> 1) clearly defining Implicit as the flow that returns access token from the authorization endpoint ( some people confuses implicit as the flow that returns ID Token in the front channel)
> >
> > That’s the current text:
> >
> > In order to avoid these issues, Clients SHOULD NOT use the implicit
> >    grant or any other response type causing the authorization server to
> >    issue an access token in the authorization response.
> >
> > What would you like to modify?
> >
> >>
> >> 2) Banning the returning of the access token that are not sender constrained from the authorization endpoint
> >
> > In order to avoid these issues, Clients SHOULD NOT use the implicit
> >    grant or any other response type causing the authorization server to
> >    issue an access token in the authorization response, if this access tokens is not sender-constraint.
> >
> > What about this?
> >
> > kind regards,
> > Torsten.
> >
> >>
> >> Best,
> >>
> >> Nat
> >>
> >>
> >> Outlook for iOS を入手
> >>
> >> 差出人: OAuth <oauth-bounces@ietf.org<mailto:oauth-bounces@ietf.org>> (Dick Hardt <dick.hardt@gmail.com<mailto:dick.hardt@gmail.com>> の代理)
> >> 送信日時: 水曜日, 11月 28, 2018 8:58 午後
> >> 宛先: Hannes Tschofenig
> >> Cc: oauth@ietf.org<mailto:oauth@ietf.org>
> >> 件名: Re: [OAUTH-WG] OAuth Security Topics -- Recommend authorization code instead of implicit
> >>
> >> +1
> >>
> >> While there are various mechanisms to alleviate some of the issues of implicit, I don't think we can recommend specifics, and there may be future ones in the future. I think we all agree that implicit without any mitigation is problematic.
> >>
> >> How about we recommend against using implicit alone?
> >>
> >>
> >> On Mon, Nov 19, 2018 at 2:34 AM Hannes Tschofenig <Hannes.Tschofenig@arm.com<mailto:Hannes.Tschofenig@arm.com>> wrote:
> >> Hi all,
> >>
> >> The authors of the OAuth Security Topics draft came to the conclusion that it is not possible to adequately secure the implicit flow against token injection since potential solutions like token binding or JARM are in an early stage of adoption. For this reason, and since CORS allows browser-based apps to send requests to the token endpoint, Torsten suggested to use the authorization code instead of the implicit grant in call cases in his presentation (see https://datatracker.ietf.org/meeting/103/materials/slides-103-oauth-sessb-draft-ietf-oauth-security-topics-01).
> >>
> >> A hum in the room at IETF#103 concluded strong support for his recommendations. We would like to confirm the discussion on the list.
> >>
> >> Please provide a response by December 3rd.
> >>
> >> Ciao
> >>
> >> Hannes & Rifaat
> >>
> >>
> >>
> >> IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
> >> _______________________________________________
> >> OAuth mailing list
> >> OAuth@ietf.org<mailto:OAuth@ietf.org>
> >> https://www.ietf.org/mailman/listinfo/oauth
> >> _______________________________________________
> >> OAuth mailing list
> >> OAuth@ietf.org<mailto:OAuth@ietf.org>
> >> https://www.ietf.org/mailman/listinfo/oauth
> >
>
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org<mailto:OAuth@ietf.org>
> https://www.ietf.org/mailman/listinfo/oauth

_______________________________________________
OAuth mailing list
OAuth@ietf.org<mailto:OAuth@ietf.org>
https://www.ietf.org/mailman/listinfo/oauth
--
----
Aaron Parecki
aaronparecki.com<http://aaronparecki.com>
@aaronpk<http://twitter.com/aaronpk>

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.