Re: [OAUTH-WG] [EXTERNAL] -security-topics-13 and OIDC response types + form_post response mode

Daniel Fett <fett@danielfett.de> Mon, 06 January 2020 14:47 UTC

Return-Path: <fett@danielfett.de>
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 0DA0C12082A for <oauth@ietfa.amsl.com>; Mon, 6 Jan 2020 06:47:27 -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, HTML_MESSAGE=0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=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=danielfett.de
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 XMCOgdyFBg49 for <oauth@ietfa.amsl.com>; Mon, 6 Jan 2020 06:47:24 -0800 (PST)
Received: from d3f.me (redstone.d3f.me [5.9.29.41]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1B7B8120823 for <oauth@ietf.org>; Mon, 6 Jan 2020 06:47:24 -0800 (PST)
Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by d3f.me (Postfix) with ESMTPA id 1B36312EA5 for <oauth@ietf.org>; Mon, 6 Jan 2020 14:47:22 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=danielfett.de; s=dkim; t=1578322042; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=I1rnJEs83Kcytb7wy4R0fxVrz5IdVsvCVk/B63Nwjd8=; b=oIlsFfFRG0/bkf1IfKBAU0Fw1/23wuB0frllZCithz9vguNA/eh82/dAdYr9fFvHEFBacp tnuHPqh39qgnRdl1A1xm6+eA4muZDpLuQ6FiMQkp2K7NpMvdlRsJgn9aQZSkxcThPS2u3a SdsIvvoQz2knQnRiNZyfJ1OY164W5CA=
To: oauth@ietf.org
References: <CA+k3eCTnzX7M1XgduH_Wa2y1pMVY7_AigNTrhBmL214by5z_Ew@mail.gmail.com> <ACFB6963-EBA4-4351-B3F4-D659513E6AA5@lodderstedt.net> <CA+k3eCQwXuR0Wm43c4RY9z5MLHQLv+C8z8AX6APRqZu+SRXRXA@mail.gmail.com> <BL0PR00MB0836155876E1356943AA669AF5250@BL0PR00MB0836.namprd00.prod.outlook.com> <CC357459-1DEA-4EBB-B603-A399457DAB90@amazon.com> <E3C877CD-068F-40EE-852C-17946295E17A@lodderstedt.net>
From: Daniel Fett <fett@danielfett.de>
Message-ID: <7cc6f870-eeb1-f3c6-2afb-698b1ff8d422@danielfett.de>
Date: Mon, 06 Jan 2020 15:47:21 +0100
MIME-Version: 1.0
In-Reply-To: <E3C877CD-068F-40EE-852C-17946295E17A@lodderstedt.net>
Content-Type: multipart/alternative; boundary="------------72355B2201B776239C0C94AF"
Content-Language: de-DE
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=danielfett.de; s=dkim; t=1578322042; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=I1rnJEs83Kcytb7wy4R0fxVrz5IdVsvCVk/B63Nwjd8=; b=rRJKMgaNC4Ff2sp/m2aSbefgD+NbclccPBRXfSZqD0E/5n/ELP8pnS8aCVfFYretd4T01z 0etgqLM1+NZoZpVapcpp9u4lLuZwj5Z20x60SxySFmyv8Nw6UcYST7ScXnYKUvKjPhNYzN /jFAE7xEZ4YM40Hzy2C28wx50kZ/Dt0=
ARC-Seal: i=1; s=dkim; d=danielfett.de; t=1578322042; a=rsa-sha256; cv=none; b=B8OIMKvzauVIPEyh+tx+8oFChIXGkruRK8EVtCHRisxF/6lG+1phUEldd6Vn5TCexbtqSnMcjxKGB5IbJXIs9DMjrkmtZxSQlQy8yYQDLMuF9xL++Jz+LafV5L5qdVNvUzRpzt6ncvtLK9kzYxKyeAQdwAzv99zzZijPKgSDMrM=
ARC-Authentication-Results: i=1; d3f.me; auth=pass smtp.auth=fett@danielfett.de smtp.mailfrom=fett@danielfett.de
Authentication-Results: d3f.me; auth=pass smtp.auth=fett@danielfett.de smtp.mailfrom=fett@danielfett.de
X-Spamd-Bar: /
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/HcnZ3h15qRqCJai7Z-EtuPUuoCk>
Subject: Re: [OAUTH-WG] [EXTERNAL] -security-topics-13 and OIDC response types + form_post response mode
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: Mon, 06 Jan 2020 14:47:27 -0000

Am 03.01.20 um 11:33 schrieb Torsten Lodderstedt:
> Hi Brian, 
>
> I’m on the fence regarding your proposal. 
>
> What I like is it moves the focus onto leakage prevention and prevention of injection in the authorization response, which are the direct threats to the front channel flow. Especially token leakage prevention somehow got lost in the process. 
Indeed, we should check again if leakage prevention is sufficiently
emphasized in the BCP.
>
> Beside this, your proposal does not change the meaning of the spec since sender constrained access tokens are still recommended through 3.2. 
>
> I’m not sure it is worth the change now taking into account how much energy it has cost to come up with a consensus for this piece of text. I would encourage more WG members to share their thoughts. 

I'm with Annabelle on this: These kinds of exceptions are exactly what
the SHOULD NOT is for.

-Daniel


>
> best regards,
> Torsten. 
>
>> On 2. Jan 2020, at 22:53, Richard Backman, Annabelle <richanna=40amazon.com@dmarc.ietf.org> wrote:
>>
>> Brian and others with similar use cases (Filip?):
>>  
>> The current text does not prohibit your approach, provided you’ve done the due diligence required by BCP 14 to go against a SHOULD NOT. Could you provide more detail on the scenarios where you have opted to use these implicit-based solutions? Is it impractical or infeasible to use an authorization code-based approach in these scenarios? If this is a particularly niche use case, then it may not be worth including in the BCP (that’s basically what SHOULD NOT is for). But if it’s more broadly applicable, then it may be worth tweaking the “unless…” clause of that paragraph.
>>  
>> – 
>> Annabelle Richard Backman
>> AWS Identity
>>  
>>  
>> From: OAuth <oauth-bounces@ietf.org> on behalf of Mike Jones <Michael.Jones=40microsoft.com@dmarc.ietf.org>
>> Date: Saturday, December 28, 2019 at 9:47 AM
>> To: Brian Campbell <bcampbell@pingidentity.com>, Torsten Lodderstedt <torsten=40lodderstedt.net@dmarc.ietf.org>
>> Cc: oauth <oauth@ietf.org>
>> Subject: Re: [OAUTH-WG] [EXTERNAL] -security-topics-13 and OIDC response types + form_post response mode
>>  
>> I agree with Brian's suggested text changes.
>>
>> -- Mike
>> From: Brian Campbell <bcampbell@pingidentity.com>
>> Sent: Saturday, December 28, 2019 5:33:24 AM
>> To: Torsten Lodderstedt <torsten=40lodderstedt.net@dmarc.ietf.org>
>> Cc: Mike Jones <Michael.Jones@microsoft.com>; oauth <oauth@ietf.org>
>> Subject: Re: [OAUTH-WG] [EXTERNAL] -security-topics-13 and OIDC response types + form_post response mode
>>  
>> The requirement for replay/injection prevention at resource servers is still there in section 3.2. This change only drops it as a specific qualification on that SHOULD NOT for flows that send access tokens in the authorization response. And instead focuses that qualification on the additional risks that come with sending access tokens in the authorization response. To me, this feels more consistent. 
>>  
>> Looking again at section 3, I'd suggest also moving the fourth paragraph of section 3.1.2 into section 3.2 so that the description of sender-constrained is in the subsection that is about sender-constraining. 
>>  
>>
>> On Fri, Dec 27, 2019, 5:00 PM Torsten Lodderstedt <torsten=40lodderstedt.net@dmarc.ietf.org> wrote:
>>> Your proposal sounds reasonable on first sight. But thinking again, it would mean to keep token injection prevention in authorization responses a requirement while dropping the requirement for replay/injection prevention at resource servers. To me this feels inconsistent.
>>>
>>>
>>>> Am 28..12.2019 um 00:02 schrieb Brian Campbell <bcampbell=40pingidentity.com@dmarc.ietf.org>:
>>>>
>>>> I'm not suggesting that it should be a recommended flow. But recommending against it, as the text does now, seems overreaching and unnecessary. I know *consensus* was previously found on the text in -13 but best I can recall that discussion was mostly around Nat advocating to allow room for some future self-issued IDP type case and the conversation kind of got hung up on that.
>>>>  
>>>> Here's some proposed text, which I think still largely captures the intent of the BCP while not explicitly recommending against legitimate cases like the one I brought here or Nat's or something like JARM.
>>>>  
>>>>    In order to avoid these issues, clients SHOULD NOT use the implicit
>>>>    grant (response type "token") or other response types issuing
>>>>    access tokens in the authorization response, unless access token injection
>>>>    in the authorization response is prevented and the aforementioned token leakage
>>>>    vectors are mitigated. 
>>>>  
>>>> The draft already recommends sender-constrained access tokens elsewhere in the document. It doesn't need to be repeated as a qualifying condition around this SHOULD NOT.
>>>>  
>>>> I am a proponent of PoP/HoK/sender-constrained access tokens (as hopefully is evident from several attempts at bringing/doing related work here) but I do worry that the recommendation in the draft is sufficiently unachievable to the vast majority that it might undermine the credibility of the document. But I get the aspirational aspect of it and, other thansome suggested tweaks, am resigned to see it stay in the document. But let's let that recommendation stand on its own in the document and not also tie it to other considerations. 
>>>>  
>>>>  
>>>> On Fri, Dec 27, 2019 at 1:41 PM Torsten Lodderstedt <torsten=40lodderstedt.net@dmarc.ietf.org> wrote:
>>>>> As Brian said, we have discussed this several times and this text found consensus.
>>>>>  
>>>>> Using post reduces the attack surface but does not allow to bind the access token to the legitimate client. We are recommending sender constrained access tokens in the BCP. So recommending a flow that does not support sender constrained access tokens is a contradiction.
>>>>>  
>>>>> What do other WG members think?
>>>>>
>>>>>
>>>>>> Am 27.12.2019 um 21:28 schrieb Mike Jones <Michael.Jones=40microsoft.com@dmarc.ietf.org>:
>>>>>>
>>>>>> I agree with Brian. Please update the text to describe this already safe usage.
>>>>>>
>>>>>> -- Mike
>>>>>>
>>>>>> From: OAuth <oauth-bounces@ietf.org> on behalf of Brian Campbell <bcampbell=40pingidentity.com@dmarc.ietf.org>
>>>>>> Sent: Friday, December 27, 2019 11:03:30 AM
>>>>>> To: oauth <oauth@ietf.org>
>>>>>> Subject: [EXTERNAL] [OAUTH-WG] -security-topics-13 and OIDC response types + form_post response mode
>>>>>>  
>>>>>> We have a-sometimes used scenario where a client makes an authorization/authentication request with a "token id_token" response type and "form_post" response mode (nonce is also sent and exact redirect URI matching is done at the AS). The access token is never exposed in any URLs and access token injection is prevented by the at_hash claim in the id token.
>>>>>>  
>>>>>> That seems to me like a legitimate and reasonable usage scenario. However, it would fall on the wrong side of the SHOULD NOT in Section 3.1.2 of the Security BCP-to-be, which has:
>>>>>>  
>>>>>>    In order to avoid these issues, clients SHOULD 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.
>>>>>>  
>>>>>> I know this particular text has been discussed over and over again so I hate to revisit it. But based on the aforementioned scenario I think maybe it still doesn't quite hit the mark. Access token injection is prevented. The token leakage scenarios mentioned in that section are all avoided. And while I know sender-constrained is recommended elsewhere in the draft, it's not really a realistic option for the majority of deployments.
>>>>>>
>>>>>> CONFIDENTIALITY NOTICE: This email may contain confidential and privileged material for the sole use of the intended recipient(s). Any review, use, distribution or disclosure by others is strictly prohibited..  If you have received this communication in error, please notify the sender immediately by e-mail and delete the message and any file attachments from your computer. Thank you.
>>>>>> _______________________________________________
>>>>>> OAuth mailing list
>>>>>> OAuth@ietf.org
>>>>>> https://www.ietf.org/mailman/listinfo/oauth
>>>> CONFIDENTIALITY NOTICE: This email may contain confidential and privileged material for the sole use of the intended recipient(s). Any review, use, distribution or disclosure by others is strictly prohibited..  If you have received this communication in error, please notify the sender immediately by e-mail and delete the message and any file attachments from your computer. Thank you.
>> CONFIDENTIALITY NOTICE: This email may contain confidential and privileged material for the sole use of the intended recipient(s). Any review, use, distribution or disclosure by others is strictly prohibited.  If you have received this communication in error, please notify the sender immediately by e-mail and delete the message and any file attachments from your computer. Thank you.
>
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth