Re: [OAUTH-WG] [EXTERNAL] Re: Authorization code reuse and OAuth 2.1

Pieter Kasselman <pieter.kasselman@microsoft.com> Wed, 13 October 2021 21:16 UTC

Return-Path: <pieter.kasselman@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 A7EB83A0C5B for <oauth@ietfa.amsl.com>; Wed, 13 Oct 2021 14:16:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.452
X-Spam-Level:
X-Spam-Status: No, score=-2.452 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.452, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, HTTPS_HTTP_MISMATCH=0.1, RCVD_IN_MSPIKE_H2=-0.001, 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 D8wP7H-DMMTo for <oauth@ietfa.amsl.com>; Wed, 13 Oct 2021 14:15:57 -0700 (PDT)
Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150125.outbound.protection.outlook.com [40.107.15.125]) (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 C8E033A0C4E for <oauth@ietf.org>; Wed, 13 Oct 2021 14:15:56 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HqSYfVl+jhCgDKdDb8Wx0j6cv0rH9l8fVQv90AmaY1kcPIRR3lWBt/vzKReX2qxDANtV7wP0e3H9lGwIHqUbKsUU5JQlQUa1ODnVtYviTU6/2ZrVLG1Vq6Vd/HBEfnEY0QKqOXrU+2qUXxYc5x/2lo3s4icQZ2/9IVWRXtNIiCfgG7sZJzMILRnKWs72jAKnP4B7HlgKhCS/O5epxDbCzd+mkxCJ3sagSu6wnYZZz2fjPIWzfpPsj6sJpeRgKAPQGqdjKyiScVJzuTACsW0Gvw/wBQJpbLNnJ1ONp1tFPO/i0dv4lXQ4RVM1cimfJv4L6D356GBCLgV5QuN0tKKgAA==
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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RAPvIB5u4avpFMMMfBFvJ8wniiaYP9XEruMtdVfmxBk=; b=MVGBC7QfMK5zc1swXpDNZ0RyjaYcf7XPNl0Di92topinTBPDc8VvNoVa21FvucmkBgOQ1n7SmQaVpefvyApCjt1YN6/YcGIrH21DOiNxWS05mfWkU9Ee5/okLAe4SOTz1r98nZicXVjL0H+QKyZNglR8CkW9Spn0w1xGYBxTpvYFSV7ZtSvLkACN+LqmsOlF0yhlDomrWwA9pXOtTSeCHX7+kHdqk6Cq6dKhjaWLsoJpnh/E9z+H2wdchFiK6VIfR0tenc5bT5ahyxxI0i6DWHfw6BKUBo+2b1amnAvqDfz51VdtDnsZgTACniEAZKMtoDJbRpS1l3YPTfvE+EYClA==
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=RAPvIB5u4avpFMMMfBFvJ8wniiaYP9XEruMtdVfmxBk=; b=FcpB3t2NPn70sCaxGy2KFFiOGsqnKhHzAbXVjzs3nmEKmIvFXGCI7rYXel52S7t73PToBKl79mDFA1q/ErvKO0EXquHhvwYXpPnaueZV2fdDDpUndklfSMZ+PLP+9k4YRlQl9NEcblUnqwfnORj/lALUiZyVxbaGZURBtOjTOqM=
Received: from AM7PR83MB0452.EURPRD83.prod.outlook.com (2603:10a6:20b:1b6::10) by AS8PR83MB0485.EURPRD83.prod.outlook.com (2603:10a6:20b:297::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.5; Wed, 13 Oct 2021 21:15:43 +0000
Received: from AM7PR83MB0452.EURPRD83.prod.outlook.com ([fe80::e00b:f459:6dd3:4d24]) by AM7PR83MB0452.EURPRD83.prod.outlook.com ([fe80::e00b:f459:6dd3:4d24%3]) with mapi id 15.20.4628.009; Wed, 13 Oct 2021 21:15:43 +0000
From: Pieter Kasselman <pieter.kasselman@microsoft.com>
To: Sascha Preibisch <saschapreibisch@gmail.com>, Aaron Parecki <aaron@parecki.com>
CC: IETF oauth WG <oauth@ietf.org>
Thread-Topic: [OAUTH-WG] [EXTERNAL] Re: Authorization code reuse and OAuth 2.1
Thread-Index: AQHXwHP9h13QsTp2FU6wELe/QeAi06vRaKEAgAAC0ACAAACQAA==
Date: Wed, 13 Oct 2021 21:15:43 +0000
Message-ID: <AM7PR83MB04525DD2AE371CC6DE966CCB91B79@AM7PR83MB0452.EURPRD83.prod.outlook.com>
References: <SA2PR00MB100244DAAD267EBD2FF51678F5B79@SA2PR00MB1002.namprd00.prod.outlook.com> <CAJot-L1HNvud7-ehODK7Bouv5-KotMy8EtEgLCyCzOXoSZCVCg@mail.gmail.com> <CAGBSGjpJrM4uUTdVvsEzh5sT0H9ZpEJ0D3yfo-p_1S9w_tdF8g@mail.gmail.com> <AM7PR83MB0452A256F01A7DE8BE65C98C91B79@AM7PR83MB0452.EURPRD83.prod.outlook.com> <CAGBSGjoNoHybJNZaxdFs2Z9D+rUi+zORzt9v_f0cdhYZaj=KcA@mail.gmail.com> <CAJot-L30=scUs0yon4fx_Ti6Sq8gW4xy758j2qGLR_Cg2R-82Q@mail.gmail.com> <CAGBSGjoGhoz203+sXOGtDLr14DJLsRhjEd1uA==7SNLNRZdzpQ@mail.gmail.com> <CAP=vD9tOAxCAKumBcNkK077jMiWC+r7xBgu46oCFPgJPsu2EnQ@mail.gmail.com> <CAGBSGjpg63Rq2eEh3v3vAS=cuN3eNXAycbAOokaDg6v74saRHQ@mail.gmail.com> <CAP=vD9tKaSt2p_8_Ltcc7Ad5v5Yq6ST-tmf-VM6iKbXgZyP48A@mail.gmail.com>
In-Reply-To: <CAP=vD9tKaSt2p_8_Ltcc7Ad5v5Yq6ST-tmf-VM6iKbXgZyP48A@mail.gmail.com>
Accept-Language: en-IE, 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_SetDate=2021-10-13T21:15:40Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=b8029ce7-0fbb-4756-885b-3df441bac61b; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0
authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microsoft.com;
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: c7763fa5-d868-4c01-f27d-08d98e8e9e07
x-ms-traffictypediagnostic: AS8PR83MB0485:
x-microsoft-antispam-prvs: <AS8PR83MB048597B038AA8649888F125F91B79@AS8PR83MB0485.EURPRD83.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:9508;
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: 2ZB0ayFxQ+AHW7KGEuiiEFKbxpY4CoOOk9tG2gOOuKxs+ofRUXO5AWTu8SzXsrBCUDaxYrkCD6UgdMyjdpDk/tsdHElXpFcVzvNIk/8KL0f6Nwb5tPQUShGr+AB4CrkEdtDLp0sbfNd5+dvb71dyNrArXW1kvHqXxJoWK/D0cC3lSEZFvRMBeuU9m+b2nNdmvMjfbTMETpzapzt+4trdzP4ZBI9Sjm6wn0erkIhuwWA0Fd4zXnKDzm/3Q7k9pTHGoCnPV3gUfITqNmcvLF1DZMFh5gWjZ1wMqf9Q541ffZa9GMm4if7et4zfydYfH21FNziDwHYIGqLxRkFqU0QcclsXUkazAA3vDdBy6M7lkK7cZwN7TViorQmgfHdT0Oj5GiHg2KyFCckBMS9MCcSK0Nvna6+9hGt9bAU3dhoGEa/v8zGsnHHNHFSLte446ZpbLo076hVBZZrV05B4u1XD+u1R+KSPlfXQOHaTdbyvLA15Kju1V5/2nhLuk09XlF8SsaJVceE814NkZerMT9G7R3Ng/4ENnQTgyQfFl2MWHFuyZd+P01q9kafwJznb6egqSwu+gC6gkD7rSAyUKIANjmEVKnFZoKLDD4n6u/NpcV4Wmy2i2lmcPDelUqF9FERBzAu8+lDIweIgh2AkPzJFn7lJocLxuLFbFgDhQcDNhHRI3+a8VBmMreScfil0FScWgxCGruSq/LtLP/yvMUP16+a7pXhiIw6K5Exw0fZ2QDM3yAoCNy8BqdPiVtww87TgkMVMOokuEZ1+m7aNxq72EnQG9cuQjMSS7m8gzvB8Abg=
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR83MB0452.EURPRD83.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(9686003)(33656002)(5660300002)(76116006)(316002)(4326008)(110136005)(38070700005)(86362001)(8990500004)(26005)(44832011)(508600001)(186003)(55016002)(966005)(66476007)(166002)(66946007)(38100700002)(66556008)(64756008)(66446008)(82960400001)(2906002)(53546011)(82950400001)(6506007)(52536014)(83380400001)(8676002)(122000001)(10290500003)(7696005)(8936002)(71200400001); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: NNuq3afbAjmXSfYgaFSoWTBCi4NwgeVZjZqDrvk5xxoUVQDvOmcVAICvq/i/bS1KTFJXO2AhLKJbIFpEce7tkJb2VguLZBqMyT8Vrdb7kAFQJZMkN/OEIo9FOBePrEq1SdIlYJ6ipvKFHor7/kWEiI7Cw+rT4I8wMDfhqu0v9THRoNO2XCOUJc5iO6iO3rXLhXgbcH7h3Q3QQB6JVGH/TykD3r/KymyP1R+g5lBCJYHP0/EfnJ0JNNzM/7R9RWYb12+vAP+JNnQB+xnSJP1B6EuqwO2e63ZuWL7t6Oc8VOe3+2gjSFd+pnl2gHwEp/1xpx8T+3Lqc2W8/El5xx0fXYRV4dXl8lvbK+3aMElsvjvNPBwpDQfTK0MdL/mHgLoWgC1Uz8r9omayoWx8ilznY9JB1HuyKB8MI742Fh9H7yoFNCdnKlCN4PEREyBapGI9Qw9FCTjlpx5UsW5lGtIcW9zAH0dGeF8nRPSYV7X8q/LU8rGhyazV9K8txuomCN5UHtNLg1xncekZzefNsAQJQaqrfKN/qCWyKEpCxWSzrgXPXvzbL7GtpR4hjSetGVx0KLyFuCSYLYYLk1ks4vDtlPRkr5NkhQbL8i7CXU7MqJvPleupd+Otn7n0uLUpLqUGlxRN257iN259ehDsWLRIGZEBd4F4kR8C6ZuR5INFDQRE6f+OAIW9xmOTCJHdp5jEt+oBUJhy7EmsTLOD4cxbmJgCpswwtlHzJ+wm6XoAwi8aSqs6dMtqfNvrF+Lox1jxchhBM/eK4p3vGrCa17wc3CD7pwvc3UnKiRrop1xV1fBzjr0j45KZUhaHfOb6WDlcIKmZBwjvIt2kfcpRr/bWAjDEohgTof8zFkcXO9STJ3T8GgLQFWVob7GFDZNYhGdl8PhDczDNbI4Zvv7wMlcN0pLBp/fxT0yVTUJ9dzdtkQNQlr1gfkE4wm9aZSWFtpNrt/3jlqnWTEpA5XiPaUP6bMKYOOsgxD12uYTggxYkR0otR+rdwCyOEqdbnUifTVItih++euxNpWtNI62jxE4BqRqYHJHtkSD9TCgjY5dAiv7VjmXXfAg4T2G2DDsz8opJa+KDq4m4vlROfXEmfZF/dXgocMoNqWkpgMnTX83COANgEp/5eeN7k0a/HTmgS/57O56PmdsLui34/Q7hPQAcWHWbzIwwQl0TpjrvXirvikidqblHtuHxuylGxlUEW+JrjALk+my3NxdG0Iwqqv+JsHu7t5SY9Ae3C4lVu68Pwv2PS/SnD6n7STSxc1Hf/5bw07Sd90xif1PL0kRLyQtdkjCvbh23gbEBMN3S3KqwUxWwRTm8lz+zEf7ZS6J4URUj/OlIscBbbkMvpC2x95uUXj2jdeVrKUrUZSzbc6hXTYdfXAhnjcUyT0iBUBndz3NGIKOJIBbS+qCc+QvqfCJ2s2OI8ndLBkO44Bsx0uwAZ3/MiBRjszzERhSbDJMwlhffaFIQOQF4KdlD3sv1JPL2X3t/fZazNJAtO9slob8zcEcb58OBFF7o+AtS4GoOmboc6ZjaqklawrJ8OZnZFlic3ypl20Vv0yafU24mLIDVANxlxV2xc8tKdh5ElXPj6PP5m/j3v1Pku0ju4AKvB2Uliw==
Content-Type: multipart/alternative; boundary="_000_AM7PR83MB04525DD2AE371CC6DE966CCB91B79AM7PR83MB0452EURP_"
MIME-Version: 1.0
X-OriginatorOrg: microsoft.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: AM7PR83MB0452.EURPRD83.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: c7763fa5-d868-4c01-f27d-08d98e8e9e07
X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Oct 2021 21:15:43.5415 (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: IwycqEFphRTR/mNPkiDOt+OQKA9pkyYFIsgB02bW6Hbyyrrwrx67lB3jDybnx6RtLPzTWAE7thHtub1EtWZ0kl8wq6zjlQ/y0cQhOnxr+Q4=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR83MB0485
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/iXdPo5VHpJElbVzk_6fufAF0XdE>
Subject: Re: [OAUTH-WG] [EXTERNAL] Re: Authorization code reuse and OAuth 2.1
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, 13 Oct 2021 21:16:03 -0000

Log files can exist in lots of place (clients, servers, data lakes). The question is whether it is a valid assumption that an attacker cannot obtain an Authorization Code and a Code Verifier and present it a second time round. Limiting the validity period is one layer of defence, PKCE is another layer, one time use enforcement is another. Assuming breach and designing from a defence in depth perspective is a good practice, so why not give implementors options (and guidance) to add additional layers of defence to match their risk profiles?


From: OAuth <oauth-bounces@ietf.org> On Behalf Of Sascha Preibisch
Sent: Wednesday 13 October 2021 22:06
To: Aaron Parecki <aaron@parecki.com>
Cc: IETF oauth WG <oauth@ietf.org>
Subject: Re: [OAUTH-WG] [EXTERNAL] Re: Authorization code reuse and OAuth 2.1

Ok, if the goal is to avoid unnecessary requirements I am suggesting to point out why MUST was changed to SHOULD. Otherwise developers will start to mix and match OAuth 2.0 and OAuth 2.1 requirements as they see them fit their needs.
In regards to encrypted values in PKCE, Aaron, I can also not confirm that as the general implementation.

On Wed, 13 Oct 2021 at 13:56, Aaron Parecki <aaron@parecki.com<mailto:aaron@parecki.com>> wrote:
The PKCE spec actually says "Typically, the "code_challenge" and "code_challenge_method" values are stored in encrypted form in the "code" itself" which I feel like might be a stretch to say that's typical, but this scenario was clearly thought of ahead of time. Doing that would enable an AS to avoid storing server-side state.

On Wed, Oct 13, 2021 at 1:50 PM Sascha Preibisch <saschapreibisch@gmail.com<mailto:saschapreibisch@gmail.com>> wrote:
If the challenge is based on distributed authorization server configurations, how would they handle PKCE? I imagine that managing the state for PKCE is not less challenging than managing authorization codes on the server side, preventing reuse of them.
With that in mind I am not sure if I follow the given argument. I would prefer to keep MUST as it is today.


On Wed, 13 Oct 2021 at 13:37, Aaron Parecki <aaron@parecki.com<mailto:aaron@parecki.com>> wrote:
HTTPS, because if that's broken then the rest of OAuth falls apart too.

On Wed, Oct 13, 2021 at 1:36 PM Warren Parad <wparad@rhosys.ch<mailto:wparad@rhosys.ch>> wrote:
I feel like I'm missing something, what stops just plain old network sniffing and replying the whole encrypted payload to the AS and getting back a valid token?


[https://lh6.googleusercontent.com/DNiDx1QGIrSqMPKDN1oKevxYuyVRXsqhXdfZOsW56Rf2A74mUKbAPtrJSNw4qynkSjoltWkPYdBhaZJg1BO45YOc1xs6r9KJ1fYsNHogY-nh6hjuIm9GCeBRRzrSc8kWcUSNtuA]

Warren Parad

Founder, CTO
Secure your user data with IAM authorization as a service. Implement Authress<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fauthress.io%2F&data=04%7C01%7Cpieter.kasselman%40microsoft.com%7C93c20c9c80354c77c10708d98e8d6776%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637697560293904430%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=vwcfj%2FVB8a84yDoAmqkXraWyqjOfWGrV08XdtZLWMXw%3D&reserved=0>.


On Wed, Oct 13, 2021 at 10:33 PM Aaron Parecki <aaron@parecki.com<mailto:aaron@parecki.com>> wrote:
Aside from the "plain" method, the PKCE code verifier never leaves the client until it's sent along with the authorization code in the POST request to the token endpoint. The only place it can leak at that point is if the authorization server itself leaks it. If you have things leaking from the authorization server log, you likely have much bigger problems than authorization code replays.

Keep in mind that even with the proposed change to drop the requirement of authorization codes being one time use, authorization servers are free to enforce this still if they want. Authorization code lifetimes are still expected to be short lived as well.

Aaron


On Wed, Oct 13, 2021 at 1:25 PM Pieter Kasselman <pieter.kasselman@microsoft.com<mailto:pieter.kasselman@microsoft.com>> wrote:
Aaron, I was curious what prevents an attacker from presenting an Authorization Code and a PKCE Code Verifier for a second time if the one time use requirement is removed. Is there another countermeasure in  PKCE that would prevent it? For example, an attacker may obtain the Authorization Code and the Code Verifier from a log and replay it.

Cheers

Pieter

From: OAuth <oauth-bounces@ietf.org<mailto:oauth-bounces@ietf.org>> On Behalf Of Aaron Parecki
Sent: Wednesday 13 October 2021 18:40
To: Warren Parad <wparad=40rhosys.ch@dmarc.ietf.org<mailto:40rhosys.ch@dmarc.ietf.org>>
Cc: Mike Jones <Michael.Jones=40microsoft.com@dmarc.ietf.org<mailto:40microsoft.com@dmarc.ietf.org>>; oauth@ietf.org<mailto:oauth@ietf.org>
Subject: [EXTERNAL] Re: [OAUTH-WG] Authorization code reuse and OAuth 2.1

Warren, I didn't see you on the interim call, so you might be missing some context.

The issue that was discussed is that using PKCE already provides all the security benefit that is gained by enforcing single-use authorization codes. Therefore, requiring that they are single-use isn't necessary as it doesn't provide any additional benefit.

If anyone can think of a possible attack by allowing authorization codes to be reused *even with a valid PKCE code verifier* then that would warrant keeping this requirement.

---
Aaron Parecki


On Wed, Oct 13, 2021 at 10:27 AM Warren Parad <wparad=40rhosys.ch@dmarc.ietf.org<mailto:40rhosys.ch@dmarc.ietf.org>> wrote:
Isn't it better for it to be worded as we want it to be, with the implication being that of course it might be difficult to do that, but that AS devs will think long and hard about sometimes not denying the request? Even with MUST, some AS will still allow reuse of auth codes. Isn't that better than flat out saying: sure, there's a valid reason

In other words, how do we think about RFCs? Do they exist to be followed to the letter or not at all? Or do they exist to stipulate this is the way, but acknowledge that not everyone will build a solution that holds them as law.

Let's look at SHOULD
This word, or the adjective "RECOMMENDED", mean that there may exist valid reasons in particular circumstances to ignore a particular item, but the full implications must be understood and carefully weighed before choosing a different course.

I think recommended here is not sufficient nor are there valid reasons. "It's too hard" isn't really a valid reason. Isn't it better in this case for an AS to not be compliant with the RFC, than it is to relax this to SHOULD and have lots of AS thinking reusing auth codes is a viable solution, "because they are a special snowflake where SHOULD should apply".

Are we setting the standard or instead attempting to sustain a number of "AS that are in compliance with the RFC"?


[https://lh6.googleusercontent.com/DNiDx1QGIrSqMPKDN1oKevxYuyVRXsqhXdfZOsW56Rf2A74mUKbAPtrJSNw4qynkSjoltWkPYdBhaZJg1BO45YOc1xs6r9KJ1fYsNHogY-nh6hjuIm9GCeBRRzrSc8kWcUSNtuA]

Warren Parad

Founder, CTO
Secure your user data with IAM authorization as a service. Implement Authress<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fauthress.io%2F&data=04%7C01%7Cpieter.kasselman%40microsoft.com%7C93c20c9c80354c77c10708d98e8d6776%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637697560293914390%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=9LtSUyb7WjZQqY%2FBnFy47HxchMNGZG6Qx82hj%2Bd9X04%3D&reserved=0>.


On Wed, Oct 13, 2021 at 7:17 PM Mike Jones <Michael.Jones=40microsoft.com@dmarc.ietf.org<mailto:40microsoft.com@dmarc.ietf.org>> wrote:
During today's call, it was asked whether we should drop the OAuth 2.0 language that:
         The client MUST NOT use the authorization code
         more than once.  If an authorization code is used more than
         once, the authorization server MUST deny the request and SHOULD
         revoke (when possible) all tokens previously issued based on
         that authorization code."

The rationale given was that enforcing one-time use is impractical in distributed authorization server deployments.

Thinking about this some more, at most, we should relax this to:
         The client MUST NOT use the authorization code
         more than once.  If an authorization code is used more than
         once, the authorization server SHOULD deny the request and SHOULD
         revoke (when possible) all tokens previously issued based on
         that authorization code."

In short, it should remain illegal for the client to try to reuse the authorization code.  We can relax the MUST to SHOULD in the server requirements in recognition of the difficulty of enforcing the MUST.

Code reuse is part of some attack scenarios.  We must not sanction it.

                                                          -- Mike

_______________________________________________
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=04%7C01%7Cpieter.kasselman%40microsoft.com%7C93c20c9c80354c77c10708d98e8d6776%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637697560293914390%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=gWX04yAEt3IP7lWFDS0zBzyJN8nvNfEf6Eq7i6qU7fM%3D&reserved=0>
_______________________________________________
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=04%7C01%7Cpieter.kasselman%40microsoft.com%7C93c20c9c80354c77c10708d98e8d6776%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637697560293924344%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=yk%2FjfwfllrczSKVwzH4Bt7GTr9TV8fSda2oZhV0ejyA%3D&reserved=0>
_______________________________________________
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=04%7C01%7Cpieter.kasselman%40microsoft.com%7C93c20c9c80354c77c10708d98e8d6776%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637697560293924344%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=yk%2FjfwfllrczSKVwzH4Bt7GTr9TV8fSda2oZhV0ejyA%3D&reserved=0>