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

George Fletcher <gffletch@aol.com> Wed, 21 November 2018 13:24 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 6819B12F1A6 for <oauth@ietfa.amsl.com>; Wed, 21 Nov 2018 05:24:12 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 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] 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 9UKrWbZxnvQC for <oauth@ietfa.amsl.com>; Wed, 21 Nov 2018 05:24:10 -0800 (PST)
Received: from sonic312-20.consmr.mail.bf2.yahoo.com (sonic312-20.consmr.mail.bf2.yahoo.com [74.6.128.82]) (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 D4BC01292AD for <oauth@ietf.org>; Wed, 21 Nov 2018 05:24:09 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1542806648; bh=YLM2E64zcEDK3PiAKd2bvQsajEYPZXIIfJ7UDoWfjfo=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=KY3ouQB5Rgo7reBaavptbdH1YEDABGgETbWwr/FRN17is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ivRRov0zJ0cP9G.bLU6BVCOi1Dpb2GSDZQH47.gtnQedRjxVWlPotejP Ylxiddm9vGitMjjXFL6a104DnKrTfIiH0BARNPzWeD5glywL68rZQ_Gv07N3ofCi.rTf2KzAQgAx LrurP3fCB8eXf_c8aku06Ra3nVnTcT8cev0GPEzV.R1NTVQNdJt7nKDhUQD7Ql5QyG1KvUZvndCK MOIy6VQTbV_SDgT0O5cG70F6HKQFpZMLL_X1OXiF6QtiK._dgNDq2oyiT6o18TTCPI7FQINx.Dd0 GDBN5RTSV_tJ9yoK7eJPMvIbnp2LnaunQS.2RlXb23jp9ZjzGbLDSRWz7DvHzuILgjJt.pg--
Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.bf2.yahoo.com with HTTP; Wed, 21 Nov 2018 13:24:08 +0000
Received: from 208.72.78.175 (EHLO [192.168.50.169]) ([208.72.78.175]) by smtp425.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 59f8432fd83de41aea80b99aa3179896; Wed, 21 Nov 2018 13:24:06 +0000 (UTC)
To: Torsten Lodderstedt <torsten@lodderstedt.net>, John Bradley <ve7jtb@ve7jtb.com>
Cc: Mike Jones <Michael.Jones=40microsoft.com@dmarc.ietf.org>, "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> <3485431a-74fc-408e-5360-c87c4bafc1fa@aol.com> <CAANoGhKNnQ-o-bBT+kL71d=pjAC_C6qS-2a5TCgE8CnzL1f6cA@mail.gmail.com> <ADF0AB95-6B6A-4535-B22D-29E69B216CE7@lodderstedt.net>
From: George Fletcher <gffletch@aol.com>
Organization: AOL LLC
Message-ID: <21a00a22-0524-07de-ac0e-77d597e5a9a1@aol.com>
Date: Wed, 21 Nov 2018 08:24:01 -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: <ADF0AB95-6B6A-4535-B22D-29E69B216CE7@lodderstedt.net>
Content-Type: multipart/alternative; boundary="------------054D1221D1184DDF2F91EBF2"
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/F4wZCi9ywxZ1xLXd5GZg09G9yLQ>
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: Wed, 21 Nov 2018 13:24:12 -0000

An SPA has a backend because it has to be loaded from somewhere :)

On 11/21/18 3:47 AM, Torsten Lodderstedt wrote:
> We had a discussion about this topic on Twitter https://twitter.com/Apl3b/status/1064854507606208513
>
> Outcome is POST requires a backend to receive the request so it’s not a viable solution for SPAs.
>
>> Am 20.11.2018 um 23:29 schrieb John Bradley <ve7jtb@ve7jtb.com>:
>>
>> Post response works OK for server based clients.  I don't think POST works for single page applications.
>>
>> Basically that would be something more like postmessage between two JS apps.
>>
>> Postmessage also has security issues passing a access token and leaking.
>>
>> Perhaps someone more familiar with SPA can comment on POST.
>>
>> John B.
>>
>>
>>
>> On Tue, Nov 20, 2018, 6:40 PM George Fletcher <gffletch@aol.com wrote:
>> 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>:
>>>   
>>> 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> On Behalf Of Hannes Tschofenig
>>> Sent: Monday, November 19, 2018 2:34 AM
>>> To: oauth <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
>>> 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
>> _______________________________________________
>> OAuth mailing list
>> OAuth@ietf.org
>> https://www.ietf.org/mailman/listinfo/oauth