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

Mike Jones <Michael.Jones@microsoft.com> Tue, 20 November 2018 21:00 UTC

Return-Path: <Michael.Jones@microsoft.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 1BF26124D68 for <oauth@ietfa.amsl.com>; Tue, 20 Nov 2018 13:00:40 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.469
X-Spam-Level:
X-Spam-Status: No, score=-2.469 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.47, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=microsoft.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 RTXfditM9Arv for <oauth@ietfa.amsl.com>; Tue, 20 Nov 2018 13:00:35 -0800 (PST)
Received: from NAM06-DM3-obe.outbound.protection.outlook.com (mail-dm3nam06on072a.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe56::72a]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 490E812785F for <oauth@ietf.org>; Tue, 20 Nov 2018 13:00:35 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cuALutSp9DdrEzxoV0aHM3PH/AZo06jk9p+KKmEmzyQ=; b=mqDPZJrYuOmAfgrH196ykOR27CyTtqs7jBv2oJIobbvDVH9zBZEChxjQswWnCW+L8be3cL5AbJc/3z6TSwrcnvpQfkfUk06BWGi9qKrJBcpmcQhwlZe2flVZJG4eHLiTNwCa3loaLtgrz3BLUlue+bkmHVRihQSZpCmHx+Dh2aM=
Received: from DM5PR00MB0293.namprd00.prod.outlook.com (52.132.128.34) by DM5PR00MB0326.namprd00.prod.outlook.com (52.132.128.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1396.0; Tue, 20 Nov 2018 21:00:33 +0000
Received: from DM5PR00MB0293.namprd00.prod.outlook.com ([fe80::957e:6cf1:bd05:6467]) by DM5PR00MB0293.namprd00.prod.outlook.com ([fe80::957e:6cf1:bd05:6467%3]) with mapi id 15.20.1399.000; Tue, 20 Nov 2018 21:00:33 +0000
From: Mike Jones <Michael.Jones@microsoft.com>
To: John Bradley <ve7jtb@ve7jtb.com>, "oauth@ietf.org" <oauth@ietf.org>
Thread-Topic: [OAUTH-WG] OAuth Security Topics -- Recommend authorization code instead of implicit
Thread-Index: AdR/8wsdlCSgLoNZTem+1MxrAorhbwAYRRbAABPdaIAAES+SAAAK3nrA
Date: Tue, 20 Nov 2018 21:00:32 +0000
Message-ID: <DM5PR00MB02937F639067DC15DC9D80D4F5D90@DM5PR00MB0293.namprd00.prod.outlook.com>
References: <VI1PR0801MB211266BA6F6E06FFB3081425FAD80@VI1PR0801MB2112.eurprd08.prod.outlook.com> <BL0PR00MB029244CACC634E2D2E923B77F5D80@BL0PR00MB0292.namprd00.prod.outlook.com> <61A6D327-D4EE-4954-B57F-4FF42BB22E7E@lodderstedt.net> <90e0cb05-5245-1a67-4eca-16996e7db2fc@ve7jtb.com>
In-Reply-To: <90e0cb05-5245-1a67-4eca-16996e7db2fc@ve7jtb.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [2001:4898:80e8:1:99c:fb4d:f44d:b4ba]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; DM5PR00MB0326; 6:2HC3vkZVEx+qtgfWdvJ5yZ3IVP6bMFVxCpUX6P4S22Ka+q1mZMCc3aHg1x/5ReHv0nh40fBtnw0NWw2nifWOIV/FdEjZcjUtkIJDuxQvq6ALU4RqDRlO8icRSvyiZpkhJvwSug4avLeRG2F9gMLIF63iZDFHaQY6YJR0WXSdu5XeZCGpgKlk9RQutR+mRGYBHbbvHcD2O9v2fECyY+cipy2TqghWyNe2yYSeuuKWqTvLatsUO3B4iYUQICJNJLDipBch3ip/ZXV3TpviWNqHTIQO6aX1Yv5V3/9EEOtosfrUK5mI4KKNkNL3Td4i6FD9YDBUqhWRRaKEK1xF/7ykQv6UTqol+GoQrQHG/oMxmUvWHZHHPINx7cehVVPjfgoKLy0s+sUkTLotuCeMuaGuhe93oyJKDD17Nf4efkw/B0D48Oogdv1aaV56A0BbbYBKcChKmKBWhBc/gga2HGOWug==; 5:FN74FGCPd+4yZJGmUd50gATMu7YTlnMioAfdbGRBu4rghidoK46gRpVuHVTV6s1cwArjJrtqlQn1YpnijRSbb1bgyjHNXkA9wobSOSj5lhg4+l38qE1HFUyGcKqGCyNoQ68Yv4syl4PPduu/mn5cNvgf/iAhtuesIvvO2BeEbSM=; 7:CsFsvoEFCH5pHRJ8H/t2ouZGSYPD6GmhKy6BiMTAW0BGBJJR/jul1vsAKeQDZmNsqkVIOzA/eVQFnKEHKM+OtNtaCfxGlBoPUTI6TEMI9VScbX8Ryb3bKomVWstFdsILq0aBt5ffcOKocZTTXqvVFA==
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-ms-office365-filtering-correlation-id: 655e8ffe-727b-4131-5411-08d64f2b3629
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7193020); SRVR:DM5PR00MB0326;
x-ms-traffictypediagnostic: DM5PR00MB0326:
x-ms-exchange-purlcount: 10
authentication-results: spf=none (sender IP is ) smtp.mailfrom=Michael.Jones@microsoft.com;
x-microsoft-antispam-prvs: <DM5PR00MB0326F7B544C73FD78C28695FF5D90@DM5PR00MB0326.namprd00.prod.outlook.com>
x-ms-exchange-senderadcheck: 1
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(2017102700009)(2017102701064)(6040522)(8220035)(2401047)(8121501046)(5005006)(2017102702064)(20171027021009)(20171027022009)(20171027023009)(20171027024009)(20171027025009)(20171027026009)(2017102703076)(93006095)(93001095)(3231442)(944501410)(2018427008)(10201501046)(3002001)(6055026)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123560045)(20161123564045)(20161123562045)(201708071742011)(7699051)(76991095); SRVR:DM5PR00MB0326; BCL:0; PCL:0; RULEID:; SRVR:DM5PR00MB0326;
x-forefront-prvs: 08626BE3A5
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(376002)(136003)(366004)(346002)(39860400002)(396003)(53754006)(199004)(189003)(40434004)(6306002)(6436002)(25786009)(110136005)(8936002)(966005)(8990500004)(33656002)(72206003)(22452003)(86362001)(14454004)(21615005)(478600001)(71190400001)(71200400001)(316002)(93886005)(86612001)(81166006)(81156014)(99286004)(105586002)(7110500001)(68736007)(10290500003)(8676002)(9686003)(10710500007)(476003)(5660300001)(2501003)(54896002)(6506007)(236005)(2420400007)(229853002)(15650500001)(53936002)(446003)(66574009)(53546011)(74316002)(186003)(11346002)(46003)(97736004)(6246003)(2906002)(2900100001)(606006)(14444005)(256004)(5024004)(106356001)(790700001)(6116002)(10090500001)(102836004)(486006)(7736002)(7696005)(76176011)(55016002); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR00MB0326; H:DM5PR00MB0293.namprd00.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts)
x-microsoft-antispam-message-info: lhyIe94z2sQlZlfHlKa7pcY0ubiOL7yh/2VLpPsEiq1J3SXMR0cCDzMrrxP2PQfnlbUb/wjtehN7vkMB+DwjaivmC8lrfitMBkDrTLoQ/wmrFf+AHiYCO0ayLUtaNGQPpxAyTh+To6UFR01qRie+BFcV+LcmKFZOvr1yGMIHi0u1oqs5npIxA2a16UlAJRzVc3A9L+rApJ09/0X9KNDRetDRGQ5gXuQ9DtGydwVe5qenNzpiRqg21z0LDI/pRfbQJPsor1u+L30Fp3IkUEVEUoVijjIUMXd3bichH4L+OlxAOv9ltJTkafzHzqUicnDbIJvmJCyiWKz4b60gzhzFMZ2iJ5nI28VZBeBwmMsqKYM=
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_DM5PR00MB02937F639067DC15DC9D80D4F5D90DM5PR00MB0293namp_"
MIME-Version: 1.0
X-OriginatorOrg: microsoft.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 655e8ffe-727b-4131-5411-08d64f2b3629
X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Nov 2018 21:00:32.8438 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR00MB0326
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/ABr_lil1rYlnhwoXlc0gCxJ6-Y8>
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: Tue, 20 Nov 2018 21:00:40 -0000

Next question – doesn’t using the Form Post Response Mode https://openid.net/specs/oauth-v2-form-post-response-mode-1_0.html mitigate the threats you’re describing below John?  If so, I believe the Security Topics draft should say this.

I believe we owe it to readers to present the complete picture, which is why I believe that describing profiles using ID Tokens and the Form Post Response Mode are in scope.

                                                       -- Mike

From: OAuth <oauth-bounces@ietf.org> On Behalf Of John Bradley
Sent: Tuesday, November 20, 2018 7:47 AM
To: oauth@ietf.org
Subject: Re: [OAUTH-WG] OAuth Security Topics -- Recommend authorization code instead of implicit


Yes the at_hash protects the client from accepting an injected AT.

Unfortunately it doesn't do anything to protect against leakage in logs or redirects.

So without the AT using some sort of POP mechanism it is hard to say sending it in a redirect is a good security practice.

John B.
On 11/20/2018 4:35 AM, Torsten Lodderstedt wrote:

Hi Mike,



I agree that OIDC hybrid flows offer additional security over the OAuth implicit grant and are used in the wild. On my slides and in the initial version of the new section, we had included the hybrid OIDC flows because of their known token injection countermeasures.



I nevertheless feel very uncomfortable to recommend those flows and any flow issuing access tokens in the front channel. In the course of the detailed review of the new text we realized two issues:



1) Since the access token is exposed in the URL, such flows possess a significantly higher risk to leak the access token (e.g. through browser history, open redirection and even referrer headers) than the code grant.

2) There is no viable way to sender constrain access tokens issued in the front channel. Given the WG decided to recommend use of sender constraint tokens (https://tools.ietf.org/html/draft-ietf-oauth-security-topics-09#section-2..2), it seems contradictory to recommend response types not supporting such an approach.



kind regards,

Torsten.



Am 19.11.2018 um 23:13 schrieb Mike Jones <Michael.Jones=40microsoft.com@dmarc.ietf.org><mailto:Michael.Jones=40microsoft.com@dmarc.ietf.org>:



This description of the situation is an oversimplification.  OpenID Connect secures the implicit flow against token injection attacks by including the at_hash (access token hash) in the ID Token, enabling the client to validate that the access token was created by the issuer in the ID Token (which is also the OAuth Issuer, as described in RFC 8414).  (Note that this mitigation was described in draft-ietf-oauth-mix-up-mitigation.)



Given the prevalence of this known-good solution for securing the implicit flow, I would request that the draft be updated to describe this mitigation.  At the same time, I’m fine with the draft recommending the code flow over the implicit flow when this mitigation is not used.



                                                                Thank you,

                                                                -- Mike



From: OAuth <oauth-bounces@ietf.org><mailto:oauth-bounces@ietf.org> On Behalf Of Hannes Tschofenig

Sent: Monday, November 19, 2018 2:34 AM

To: oauth <oauth@ietf.org><mailto:oauth@ietf.org>

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



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 (seehttps://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