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

Mike Jones <Michael.Jones@microsoft.com> Sat, 28 December 2019 17:46 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 56FD3120143 for <oauth@ietfa.amsl.com>; Sat, 28 Dec 2019 09:46:37 -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_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, HTTPS_HTTP_MISMATCH=0.1, 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 (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 gwdYNAuaEe1L for <oauth@ietfa.amsl.com>; Sat, 28 Dec 2019 09:46:34 -0800 (PST)
Received: from NAM06-BL2-obe.outbound.protection.outlook.com (mail-eopbgr650121.outbound.protection.outlook.com [40.107.65.121]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 3B33712013C for <oauth@ietf.org>; Sat, 28 Dec 2019 09:46:34 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XAWMXfkguabH6VmhhV8d25Kcsg6fVUXKCc4P2cbWZBbnj5K4FUynmbg7I3HpkwUsvAaw5I36mr3K1D/PtGzAlHNOFE0r27ZE03TV6ym0PQ7jgyMil25mE4oaDWz7nV5nCbIcwNz5YAjeaDiXTDm+lY6VDP1IwXHxUxKxe1MwlATz8/gaYNovvRRLEKO06o4Q7676m5MaJacrGDfzax0fShNrrhU6A8Ypv0NSHtJjUGW4R0WzksBgnsZLWM+nb2Wo22PCihKNR9WrZ3jzSf1DEyQk5vFicwGwffHVUcWpXDlCX3fy+5XeBcn3qanr/6L/DyJEtKUPdQnu0hdyfFPBfw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lTonBBF0Y92hCgr209S3LfbOaqCEtXKeu59Wwr++XSg=; b=JOqc1HUra2zbeYKscqmzmlpHkRyyRDYcHUBMt7TMTCYpeJo6JBtMqWseto8NqDPOJorqDAdFqHPqdvu+1T+mfu0I2D5fP4Sgmi/wb8SgejVxSRjT22rxK6j2626JJrhxQK+V6Mfh+e2NG6M9XI6RKLOgWZBbgq9HDHOsDKhBVoMQh2EQFWzdn7/tkyzc4iDGN45ISdTdi3lU8TAi7yCjKC13cT5mGOLkLu6uSG1mBQMLuDGtjOLCMarww2UGHVC+eTajKc1hDf6gfAEGp6CB4+fMVrRQ+ZauGoZ5xbmpZxtY2ZXlTtpfkMRJ31yiczpSr8NEsr2sZ3cN/FSFyh6jZw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lTonBBF0Y92hCgr209S3LfbOaqCEtXKeu59Wwr++XSg=; b=iGCjY5plcweC7UX5L0U994bXo8gvm5iJpJYnK37o/JZ94kh0mhaPKhSDsjhCTiJUasexn9HLmhP/dEz7NvGfw87AeyVSd4jc2zIioXPnR3vCqKXCoxtPtXX9J9DAg5RW6gdCcLAFGGn9BX1bPaPn7dsfly5okaZabce8kccD2Zo=
Received: from BL0PR00MB0836.namprd00.prod.outlook.com (52.135.44.19) by BL0PR00MB0801.namprd00.prod.outlook.com (52.135.45.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2629.0; Sat, 28 Dec 2019 17:46:13 +0000
Received: from BL0PR00MB0836.namprd00.prod.outlook.com ([fe80::a091:4d84:bc09:f09a]) by BL0PR00MB0836.namprd00.prod.outlook.com ([fe80::a091:4d84:bc09:f09a%9]) with mapi id 15.20.2629.000; Sat, 28 Dec 2019 17:46:13 +0000
From: Mike Jones <Michael.Jones@microsoft.com>
To: Brian Campbell <bcampbell@pingidentity.com>, Torsten Lodderstedt <torsten=40lodderstedt.net@dmarc.ietf.org>
CC: oauth <oauth@ietf.org>
Thread-Topic: [OAUTH-WG] [EXTERNAL] -security-topics-13 and OIDC response types + form_post response mode
Thread-Index: AQHVvPYQJWd52MbkQ0qzxtYUrLLBV6fOmTmAgAAQWoCAAONCAIAARnpR
Date: Sat, 28 Dec 2019 17:46:13 +0000
Message-ID: <BL0PR00MB0836155876E1356943AA669AF5250@BL0PR00MB0836.namprd00.prod.outlook.com>
References: <CA+k3eCTnzX7M1XgduH_Wa2y1pMVY7_AigNTrhBmL214by5z_Ew@mail.gmail.com> <ACFB6963-EBA4-4351-B3F4-D659513E6AA5@lodderstedt.net>, <CA+k3eCQwXuR0Wm43c4RY9z5MLHQLv+C8z8AX6APRqZu+SRXRXA@mail.gmail.com>
In-Reply-To: <CA+k3eCQwXuR0Wm43c4RY9z5MLHQLv+C8z8AX6APRqZu+SRXRXA@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2019-12-28T17:45:38.1618482Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Privileged
authentication-results: spf=none (sender IP is ) smtp.mailfrom=Michael.Jones@microsoft.com;
x-originating-ip: [107.77.205.135]
x-ms-publictraffictype: Email
x-ms-office365-filtering-ht: Tenant
x-ms-office365-filtering-correlation-id: a5a50f3b-1b60-4b61-b83c-08d78bbdd4db
x-ms-traffictypediagnostic: BL0PR00MB0801:
x-microsoft-antispam-prvs: <BL0PR00MB080156B691DDB318A3BC8274F5250@BL0PR00MB0801.namprd00.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:5797;
x-forefront-prvs: 02652BD10A
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(136003)(346002)(376002)(39860400002)(396003)(366004)(199004)(189003)(316002)(110136005)(5660300002)(8936002)(86362001)(186003)(8990500004)(26005)(7696005)(15650500001)(52536014)(71200400001)(6506007)(53546011)(81166006)(8676002)(81156014)(10290500003)(66946007)(966005)(33656002)(66556008)(9686003)(66476007)(64756008)(4326008)(55016002)(2906002)(66446008)(478600001)(91956017)(76116006); DIR:OUT; SFP:1102; SCL:1; SRVR:BL0PR00MB0801; H:BL0PR00MB0836.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-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: SLT3veULOjeOqeOcO7dAww+jual042gv7WnloeuH+9DphRSdw0V09jrSLzrYeyrieJ6zXxTZbAn31Lh7wmkifJvIZXvAdNJU6xphKVOPL+upkSvEI4GiSRSQ3mWcUoGHnQOp3tApDaUGHEkVHBfCUHf9qbxQhTB91vDCzu+XOfB/ZGtVAlXGE9DZHcIqXB/pc1Dw9+Tw4Z211G2irD1PH2jdjW/QWnx2EFGvw1qLWxbgu3bjYggPdB7NUjVtkeFGC5Pqf2xAvjdSX+oI1OrkIK20n7a/M84agdpVRjc5eSrGEP5YavXOo2OnbxCFDeIwVY2PXuPnPqDsvJxDh/X4oRk+RSplLWBRghXYlt0//p0QJWXkkWZRxHvJrl8ZLWpyI4yrDvlnBrVPpsprHZR8/WuiQQyTMQEim/CqIHYwqVr46Wsi12TRkjifKmbn3dHBPCRScbfWTQyiuCpGbMkp+i3+e3gmBVenAWe+/G2oLp82CdvG5RLTOONFgkRQ44Ovw9d+qPR24Fap1HkX419XXg==
x-ms-exchange-transport-forked: True
Content-Type: multipart/alternative; boundary="_000_BL0PR00MB0836155876E1356943AA669AF5250BL0PR00MB0836namp_"
MIME-Version: 1.0
X-OriginatorOrg: microsoft.com
X-MS-Exchange-CrossTenant-Network-Message-Id: a5a50f3b-1b60-4b61-b83c-08d78bbdd4db
X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Dec 2019 17:46:13.0810 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: j3639k2AjnPD4/hs9L00An0uqnKpvRHvZsafWZDUqdIcMKxkq3byGi9BU1ldLgyg92KR0Wk/bWGLhuah79qcIA==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR00MB0801
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/qInP8nmQMEeN_qKJ8QJzCKzjBjk>
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: Sat, 28 Dec 2019 17:46:37 -0000

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<mailto: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<mailto: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 than some suggested tweaks<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailarchive.ietf.org%2Farch%2Fmsg%2Foauth%2FRKujONej-92dT5lr9cLu6hHnw8I&data=02%7C01%7CMichael.Jones%40microsoft.com%7Cfc28d513b04f489b371d08d78b9a9488%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637131368342096923&sdata=3fCGjTOAD43xXLzFaw3d6VC1kY43QvBfzNwdNfDckE0%3D&reserved=0>, 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<mailto: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<mailto: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<mailto:oauth-bounces@ietf.org>> on behalf of Brian Campbell <bcampbell=40pingidentity.com@dmarc.ietf.org<mailto:40pingidentity.com@dmarc.ietf.org>>
Sent: Friday, December 27, 2019 11:03:30 AM
To: oauth <oauth@ietf.org<mailto: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<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftools.ietf.org%2Fhtml%2Fdraft-ietf-oauth-security-topics-13%23section-3...1..2&data=02%7C01%7CMichael.Jones%40microsoft.com%7Cfc28d513b04f489b371d08d78b9a9488%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637131368342096923&sdata=mfnQwsGUZgz0PgEZoqOl%2BsszPYxncmFbgBaJs4qex38%3D&reserved=0>, 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<mailto:OAuth@ietf.org>
https://www.ietf.org/mailman/listinfo/oauth<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ietf.org%2Fmailman%2Flistinfo%2Foauth&data=02%7C01%7CMichael.Jones%40microsoft.com%7Cfc28d513b04f489b371d08d78b9a9488%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637131368342106891&sdata=qO6%2BY%2FMoef0lyx4HwNLV8ID5DguAe3XjCQyxtvoFrPo%3D&reserved=0>

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.