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

John Bradley <ve7jtb@ve7jtb.com> Tue, 20 November 2018 15:47 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 BAAC0129C6A for <oauth@ietfa.amsl.com>; Tue, 20 Nov 2018 07:47:34 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, 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=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 14jQoM1R9Ope for <oauth@ietfa.amsl.com>; Tue, 20 Nov 2018 07:47:32 -0800 (PST)
Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) (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 16A45123FFD for <oauth@ietf.org>; Tue, 20 Nov 2018 07:47:32 -0800 (PST)
Received: by mail-qt1-x831.google.com with SMTP id e5so469592qtr.12 for <oauth@ietf.org>; Tue, 20 Nov 2018 07:47:32 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ve7jtb-com.20150623.gappssmtp.com; s=20150623; h=from:subject:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=Hi/VvKJnpGMFSvhKsK/171zRDV9+bfLPlbqxTjzq/MM=; b=TKlcjL03NN9VqAonqstN4zRXbZIxbj495X8ONU0ZvM02M7L0ok56yWD43QahUUzhMO FB/zYBtrs9ZNPkjqsHpPY8Hs/z3WoknACXtqNR1nvIDIo/89hIWlZSHJgJ21m52AJsNs 0FssNIEGGT11FU6VS6aDAF9jZcAPG6Iw4+3PBDrqBGT/bdyKkUp1DcOTWh6B3bWdq8vn 04t3r34ESZhDTy2mCjPm2qycUhSJpbIaVXhTWIAjtfJgVl61pU7QAsP/aKaNo2D8D5Jd 4CVNfes19dS8vSr6XCR7iX1aaHvPkHtc61X9NMGdWB5wZLrHnOWGtbQeyJgfXG1iEW3u vDXA==
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:references:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=Hi/VvKJnpGMFSvhKsK/171zRDV9+bfLPlbqxTjzq/MM=; b=kZdJMjnUfuf4+Rl71EZtzmgJjhlHv+dmP4GvIjcOx59IUKCDEcx46t5yp4Wp6zoN82 Cs7zOvnDWTQWUH/E8wmwnIK/yA8IeL7W0QOclqtkq7dDE808XllwKH2x4r8PsWQTZrIP tqvms2pLxeur07jg+lSfZ76yAJ8Xt8oHL+1C0mYqwDZYQB32XSkzGyjxMW+eGQkdKQ9f eaaYD248Ci4ZTUSRtJnK/nP0ZzR40NNif+nFaBI9esH44sl8XvG9hj/W5/d0TquSXi6U l2nz7FR53tIaBOKdipS6xRdvXS4Q7qpwdwWy7h99kzlzt18R2w/kHjHD4fIFVqJTw45M 1HpQ==
X-Gm-Message-State: AA+aEWbmBdB5m5zq9gPLtMO8ySWNG4PmlyacZRmL6zN+raftA9tjT3c9 GIjgOCUh9zqVLnWaIMFfZMQYmFZAi4i7rxCc
X-Google-Smtp-Source: AFSGD/XKcEoblglUlturmOBNa+1yQhHT0snc/Nsi+dvz11EgSODW3ghjKj4LBIQOl7sTOhapcwzIWQ==
X-Received: by 2002:a0c:88a8:: with SMTP id 37mr2277925qvn.63.1542728850215; Tue, 20 Nov 2018 07:47:30 -0800 (PST)
Received: from [192.168.86.49] ([191.115.150.242]) by smtp.gmail.com with ESMTPSA id 5sm20222641qkv.93.2018.11.20.07.47.26 for <oauth@ietf.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Nov 2018 07:47:29 -0800 (PST)
From: John Bradley <ve7jtb@ve7jtb.com>
X-Google-Original-From: John Bradley <VE7JTB@ve7jtb.com>
To: oauth@ietf.org
References: <VI1PR0801MB211266BA6F6E06FFB3081425FAD80@VI1PR0801MB2112.eurprd08.prod.outlook.com> <BL0PR00MB029244CACC634E2D2E923B77F5D80@BL0PR00MB0292.namprd00.prod.outlook.com> <61A6D327-D4EE-4954-B57F-4FF42BB22E7E@lodderstedt.net>
Message-ID: <90e0cb05-5245-1a67-4eca-16996e7db2fc@ve7jtb.com>
Date: Tue, 20 Nov 2018 12:47:22 -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: <61A6D327-D4EE-4954-B57F-4FF42BB22E7E@lodderstedt.net>
Content-Type: multipart/alternative; boundary="------------B63AEA4C87295795DF5DE00A"
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/b4ROu9A_fRE1Htbp5NPxFWN3qqI>
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 15:47:35 -0000

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