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

George Fletcher <gffletch@aol.com> Tue, 20 November 2018 21:40 UTC

Return-Path: <gffletch@aol.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 6C761130DD6 for <oauth@ietfa.amsl.com>; Tue, 20 Nov 2018 13:40:44 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.998
X-Spam-Level:
X-Spam-Status: No, score=-1.998 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=aol.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 Vphmc7-KKtWZ for <oauth@ietfa.amsl.com>; Tue, 20 Nov 2018 13:40:41 -0800 (PST)
Received: from sonic303-4.consmr.mail.bf2.yahoo.com (sonic303-4.consmr.mail.bf2.yahoo.com [74.6.131.43]) (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 2236F12F1AB for <oauth@ietf.org>; Tue, 20 Nov 2018 13:40:40 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1542750039; bh=Rsvtzv6j8bRHXod3YLwgFL6ttGwJXlT5z5K/1NmjC9I=; h=Subject:To:References:From:Date:In-Reply-To:From:Subject; b=fSig4MdWdc7IS/GOOkP+Oixe7qV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.rSz4qUCLWbafZjC4CWfuEvVkqFBAtXgclneiHT3tEx95LeVKvxyjb6D9QagFbpxpEAPuk1HkE BlBFIOUeF6D3jCsGqfma3keUI3jeHsCAhkUqJnj9LKyN8T4XcG9YzRl.XmHFnEPe5qKK8wzDtp3B qCK.xJDvVkLzBAEImz09fslzLBljzy202pD7LjT.QWW6dGBfhh8TqIwabkscQgQWmZ8Q1ZpvJ1CV GX6jj9vcx_dNE5nvq108F5Pbu4._0ZLmggn8OkyGI0Oq7biLvbgKKJ716vAZVmvu7CzSyOboYVZs lslRvJruXOdE6_uI2J8e4bEPtELPnX0MrpX9QBqhiI5Al4lM-
Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.bf2.yahoo.com with HTTP; Tue, 20 Nov 2018 21:40:39 +0000
Received: from nat-vpn-users4.cfw-a-gci.net.buffalo.office.oath (EHLO [172.135.132.163]) ([184.165.8.99]) by smtp408.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 6be93cb21bc528b4a99271bbe5682c1f; Tue, 20 Nov 2018 21:40:35 +0000 (UTC)
To: Mike Jones <Michael.Jones=40microsoft.com@dmarc.ietf.org>, John Bradley <ve7jtb@ve7jtb.com>, "oauth@ietf.org" <oauth@ietf.org>
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> <DM5PR00MB02937F639067DC15DC9D80D4F5D90@DM5PR00MB0293.namprd00.prod.outlook.com>
From: George Fletcher <gffletch@aol.com>
Organization: AOL LLC
Message-ID: <3485431a-74fc-408e-5360-c87c4bafc1fa@aol.com>
Date: Tue, 20 Nov 2018 16:40:33 -0500
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1
MIME-Version: 1.0
In-Reply-To: <DM5PR00MB02937F639067DC15DC9D80D4F5D90@DM5PR00MB0293.namprd00.prod.outlook.com>
Content-Type: multipart/alternative; boundary="------------607C51A3C9400054CB1DB458"
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/UAVlY4KBjdg-pZEI9fTsucXpHPs>
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:40:44 -0000

Hi Mike,

The Form Post Response Mode keeps the access_token out of the URL, but 
it doesn't prevent the token from traversing through the browser. So a 
man-in-the-browser attack may be able to intercept the values. It should 
help with leakage in logs.

Thanks,
George

On 11/20/18 4:00 PM, Mike Jones wrote:
>
> 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
>
>
>
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth