Re: [OAUTH-WG] Shepherd Review of draft-ietf-oauth-security-topics-23

Justin Richer <jricher@mit.edu> Wed, 03 January 2024 18:53 UTC

Return-Path: <jricher@mit.edu>
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 D0A12C14F713 for <oauth@ietfa.amsl.com>; Wed, 3 Jan 2024 10:53:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.108
X-Spam-Level:
X-Spam-Status: No, score=-2.108 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=mit.edu
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gTUoy3nyuAho for <oauth@ietfa.amsl.com>; Wed, 3 Jan 2024 10:53:49 -0800 (PST)
Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2124.outbound.protection.outlook.com [40.107.223.124]) (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 5994EC14F6E9 for <oauth@ietf.org>; Wed, 3 Jan 2024 10:53:49 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j+KxhJdSrkUCu4Sa72E+IGj1lOfCbJS2yqRuxNUtWWiHR5nkegnK9J5khsSfsDR2+bJNa2eKHwYhMG/MfQtqbyGQw5Wr6bqlH+kkpvayZMZI8uJrrUi5Zl64BGY8vwVBnEwplCf3d26ZInQ/Yjjvz2MSStLNl5bCh7HUKsAn9VlysJAeU3YYi//PhkyDgsarJjbOqVp6A4QJ4pl0QsSI+cyhez+CeycUGpQwyFlysixbs8wQVkAF46P5SmnZavH7MRxIzSN/czXox/yfirn/fIj8FFwR6bxDC8MIvgOebIxUiGjdrabvSqc+HiJYkl2GujEVX/TXLJNRypeQvJwf0w==
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=VamRC/Q+ihnbvYUAmaoYT9uZJbkR++r3YRyMF4yR/HQ=; b=afqFvZEqXJ5uUGksX3K6xxslIuSbpXOZfw/+eQ37kxFdasgqYR5ngmGC0vv745JctvKIALPjQSHd1hSlY2arT+gJFeS0S7Ljgc/nNVDwDgZwzZ15yfsGcYgG25XxRts5Dwu2TJldiXjp6x+5GTveCCmEKEFrO5Zfyw7xSUBzKk/Sse1PREADogFRvwvuEzq5RH6kmwfbOGh6+E96Osj5QF8CiA9YBNd5lb6GqyBqZb2K6zzfoMo9/de9/4xgG0z4aIl8T5DFUpSAFZU30Dhv4FGa5x3tv5YZ8lCq+4TSEFxukW/SNSGmQnJaMtaeCPzEYL6QRIEOq0HQGMwqfjxF5w==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mit.edu; dmarc=pass action=none header.from=mit.edu; dkim=pass header.d=mit.edu; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mit.edu; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VamRC/Q+ihnbvYUAmaoYT9uZJbkR++r3YRyMF4yR/HQ=; b=mrM7Lm0/hu07EOvG0U6VxRRqDzfbJEm7aEqs7UyC0iROyPLSpS0zdH0QMaAj0UPXSAJA6LAGkDHlGi1heuFC27mTunA6bN6b/IyKTnxqji5jZIUkIe8shylSXnK128OI1MOJOaJ2uLqaexjh0zrtMQlVCUSvWM+JD0jwgYm7za4=
Received: from LV8PR01MB8677.prod.exchangelabs.com (2603:10b6:408:1e8::20) by MW6PR01MB8414.prod.exchangelabs.com (2603:10b6:303:23d::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.24; Wed, 3 Jan 2024 18:53:45 +0000
Received: from LV8PR01MB8677.prod.exchangelabs.com ([fe80::c5bd:292f:c37:64dc]) by LV8PR01MB8677.prod.exchangelabs.com ([fe80::c5bd:292f:c37:64dc%3]) with mapi id 15.20.7159.013; Wed, 3 Jan 2024 18:53:45 +0000
From: Justin Richer <jricher@mit.edu>
To: "Axel.Nennker@telekom.de" <Axel.Nennker@telekom.de>
CC: "mail=40danielfett.de@dmarc.ietf.org" <mail=40danielfett.de@dmarc.ietf.org>, "oauth@ietf.org" <oauth@ietf.org>
Thread-Topic: [OAUTH-WG] Shepherd Review of draft-ietf-oauth-security-topics-23
Thread-Index: Adn2yEff+T1F71CiTvyT1q4np/SeaRCysr4AAPLb0QAAOZadAAAHpgMAAABLswAAAXs8gAAC5aEA
Date: Wed, 03 Jan 2024 18:53:45 +0000
Message-ID: <CDD28A99-05F0-4534-98EE-B086BF786E58@mit.edu>
References: <AS8PR10MB74277A2DAC89D987531F7F74EECBA@AS8PR10MB7427.EURPRD10.PROD.OUTLOOK.COM> <6bdfa6d8-594c-40b2-a5ed-4a8ca9943929@danielfett.de> <BE1P281MB20977CD398EB9C1C4A18150EED61A@BE1P281MB2097.DEUP281.PROD.OUTLOOK.COM> <60861607-c450-4b62-8155-f9012a6565f2@danielfett.de> <BE1P281MB2097707E4E61A1DCF7A03500ED602@BE1P281MB2097.DEUP281.PROD.OUTLOOK.COM> <e6ea482f-2984-4aca-92c7-479836064dd3@danielfett.de> <BE1P281MB20971C3BF0ECBF6F46BEB220ED602@BE1P281MB2097.DEUP281.PROD.OUTLOOK.COM>
In-Reply-To: <BE1P281MB20971C3BF0ECBF6F46BEB220ED602@BE1P281MB2097.DEUP281.PROD.OUTLOOK.COM>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=mit.edu;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: LV8PR01MB8677:EE_|MW6PR01MB8414:EE_
x-ms-office365-filtering-correlation-id: b6980474-0a0d-483a-4ef6-08dc0c8d5013
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: 7iKzwG6QtmMwEVXU4/RkaX1iBEBkOqT8L8LdIQDGWTr1T+3+DpSOshmhrvh/QCB4XtUS1zNflc9SFOIMgpm6F4NJXTfC2Od/WtOjbMGwRmhrJmdlnjvuHZ0vERI96SFCD9fEqlBIj84kVTLTYlWO9iBLsMoKPfmaqQZHM6mADBYz7GpQP4q+Aowewk6QDF5c/JfQu3LXM/IboRiTrcoTlJIru/ZCFzdiuCkBfbLVNe+nsfWOjzDbY7y5WXVcO9OP2bMkYFL7nGJ/J1gm6vrAz4j3WNBBJNIEJWnDokPv83KKc2Yr71T2lra5d4FBB2fM7iPOP9hlEAoWNyy0+FRFmZRouudtmopQ0XpfsY6N8NYJgNAG0nYt8jZNaXEg07JorGMoag2p6isxmwIL+alDCuONfYV2x9jlBlai/sQLq5+oGuoj4JWOHQqNuagHgxc/W+x/hiHTVr3y+hOlt0d1grsmvs1GQSIk+t7tCK/lfPhZBqojI+hfocJOPDRYKZPvrzf4f9Kt9IYOd6Xn25rsYyX9DvOrnzDMBq388KJkI8xi+LzP9bCD/nIR1jTMIp+ScfaOzDPEBL2XLWSiswup2Dxrk+GdtgT8xCdylrybJeA=
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:LV8PR01MB8677.prod.exchangelabs.com; PTR:; CAT:NONE; SFS:(13230031)(136003)(366004)(39860400002)(376002)(346002)(396003)(230922051799003)(1800799012)(186009)(64100799003)(451199024)(966005)(6486002)(38100700002)(478600001)(122000001)(33656002)(41300700001)(66556008)(91956017)(64756008)(6916009)(66476007)(21615005)(166002)(36756003)(4326008)(66446008)(86362001)(786003)(76116006)(54906003)(316002)(6506007)(71200400001)(26005)(83380400001)(6512007)(53546011)(66574015)(8676002)(2616005)(66946007)(8936002)(2906002)(5660300002)(30864003)(15650500001)(38070700009)(75432002)(579004)(559001); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: 3pZgsNHrr1kVn2F2YziMSqZ17vwi69xYD840rmzSBmiLnIhYMwACF2Gi96vY3RmrGfenF+wb7YRdCqJ/d6NlrQTnLiBxjVJiWTCjsojK1K0qc+e5aTHWW6nuLfqLxWN9st9GK68+wCdRfQJRb874+qoliW8YgS4yyj3k6+reMRSBVaQ7bjIe0rimI9XnA6SgQsf9oFTYnCa12FmAoNH/gLbu++uKCh2OZDOcCyFfst1Wut12a8wxkOTyFwXwb2z7Fg5zpLlZBU7NDnrPPSVkyFvJES5PxTSe2udK4YSc8UWOKiSkJnu5TjzRw+dKh+6ibTSoZunIp+oqEpczBep1LEzlYaoHE/NqANSnP8Hik0ZkgpBHeeHyQZ8/J9VSMie9bXtk6IC89BNdNkj3Pp8EscFyfeUSyKoR1FzDFsafNComasVlbHv8EeXCqC4SiqgZoUsfUFyClVN+JizRZH8jzOS9ESjyr0UZ066j3mrs8gHY08hr9bUWl+EwTjcLf4BJ/KCWqVhpA8bditgt1r32QoSd0Xc1nSvnOBrYm3L3BqishS7Z0qtTPRT0XMQzi8CpJW7ByV17pUBYe0Tr3UaSRw0uJSqBgh9aAAH3h6RbEJm5oBmnMvQNPLBwjE5IuFq0+SBHWNzfrfsdKJxoGIJGO0knuAAc30ec7Zp2p201IU3+BkxGFN1mrw/XGS7KkW8F8GLhPHzxdveoABpmillZnJI+R1yc2p8WZ5BAU5xdWKH+fSjWN3CEiqPgjsMwU3stpuo8UBPe20zNrdBeu1s4iSaQEpA3AzPH43U46tNnR46JoVNXuffBabunc1EkPELRTvGO2Yjr9nWWZFnvNDRms/jVuSa7YOGNzY4v1hycvzOg6GCpulp0iHZnZYe2tyibcFzfDl1vaohFJWoY8VsqmX+FXwJxNUcxfsJtQP1dc2u382TwQSL4tEp7RlUoenpTvhifLRocCWcPP//6cK8vFWCr1GQVx35AkPrGmc+Z3zh5a7DhbCQuFQEbxftZiZmxsS/OaYxOaY6zNzH7FJX94KzU1I2FBon/SmtXTB1hqFZGFClJa3N8Qh1biGn07eVg89Bv5l+EaWRCPd6SmyzU69/pjJOQhqeXPQFYhX5jEw1fQIIiC4xHxEk+loksDzrUEGYseQptD5hws5kF+pA5PNMh0DMDtyJvfkrEfQF/9XDpq7jLbrPGHKT131TwKOl/31xW7k8pBmxzwv9cTlPPj0kUbnvHc1VBt03I5B9Twv9FyMupB99u5XZNr7ky26lyas0cZJ8DCZqQci4USeomLl6pd3PDz5IXCchlk9ON3IY9yY34asLVpoKQq/1/lecv1A9BwLg3ipPX4XGFoiMAGDqF9whkqPGrb+13WTW5HX93BhDAyh8xobcLhu5UAaDc/qVBqrn1cUmY7cVqalyITtQFye0EoDNV7gQP3fcctrYZrEF+2WbU7nywrG0z9piw5p7Rb/iCrWel/8z6WrBY5IFih4COlG6cqRwDSFjsIbNeGONC11udcn+44K0SFqfHht8uRoMNbDR7CpvSJwGbVkxCBdXSqTXBw9tdmg7eomK3/NC6RGa7kwsWBtPUgfAb
Content-Type: multipart/alternative; boundary="_000_CDD28A9905F0453498EEB086BF786E58mitedu_"
MIME-Version: 1.0
X-OriginatorOrg: mit.edu
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: LV8PR01MB8677.prod.exchangelabs.com
X-MS-Exchange-CrossTenant-Network-Message-Id: b6980474-0a0d-483a-4ef6-08dc0c8d5013
X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Jan 2024 18:53:45.2792 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 64afd9ba-0ecf-4acf-bc36-935f6235ba8b
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: KA0/ERs97zKPYpWD+SCU6wSPiFQKHcmfjW9iXqiH6gO2C8vasyzJePnKPMFfaVNe
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW6PR01MB8414
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/bcJgYlzHfRvEY5aC8-qhCWAbGjM>
Subject: Re: [OAUTH-WG] Shepherd Review of draft-ietf-oauth-security-topics-23
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.39
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, 03 Jan 2024 18:53:53 -0000

On Jan 3, 2024, at 12:30 PM, Axel.Nennker@telekom.de wrote:

The email discussion triggered me jumping into the discussion.
Also, I am looking into this from a Camara PoV.
https://github.com/camaraproject/IdentityAndConsentManagement
Camara is about to define what is a MUST for authorization servers etc and we are taking FAPI and the OAuth2 security best practices as input.

So, when we write our own security profile in Camara, we are probably going to copy the language "Authorization servers MUST support PKCE [RFC7636<https://oauthstuff.github.io/draft-ietf-oauth-security-topics/draft-ietf-oauth-security-topics.html#RFC7636>]."
We then have no problem requiring clients to use PKCE.

Coming back to draft-ietf-oauth-security-topics-23. That document's language feels like it would really, really likes to require PKCE support, but then it does not go there.
"Public clients MUST use PKCE"
"For confidential clients, the use of PKCE [RFC7636<https://oauthstuff.github.io/draft-ietf-oauth-security-topics/draft-ietf-oauth-security-topics.html#RFC7636>] is RECOMMENDED"
"Authorization servers MUST support PKCE [RFC7636<https://oauthstuff.github.io/draft-ietf-oauth-security-topics/draft-ietf-oauth-security-topics.html#RFC7636>]."
"Although PKCE was designed as a mechanism to protect native apps, this advice applies to all kinds of OAuth clients, including web applications."


I read this as pretty clear advice — the AS has to support it, but doesn’t universally require it. Public clients have to use it, so an AS could reasonably require it automatically for public clients. Confidential clients can use it, and it’s a good idea, but it would be surprising for an AS to enforce it on a confidential client. Of course, even today, an AS can decide that any particular client has to use PKCE for whatever reason, so we’re not that different in the "maybe" space than we are now.


The following two lines are talking about different things:

I still think that the MAY in 2.1
"Clients that have ensured that the authorization server supports Proof Key for Code Exchange (PKCE, [RFC7636<https://oauthstuff.github.io/draft-ietf-oauth-security-topics/draft-ietf-oauth-security-topics.html#RFC7636>]) MAY rely on the CSRF protection provided by PKCE. "

This is not about the client using or not using PKCE — it’s about the client relying on PKCE for CSRF protection, which was previously relegated to state and nonce parameters alone.

and the MUST in 2.1.1
"Authorization servers MUST support PKCE [RFC7636<https://oauthstuff.github.io/draft-ietf-oauth-security-topics/draft-ietf-oauth-security-topics.html#RFC7636>]."

This just means it has to be available at the AS for anyone to use, and, as above, possibly required for some circumstances.

do not go well together.

//Axel


 — Justin


From: OAuth <oauth-bounces@ietf.org<mailto:oauth-bounces@ietf.org>> on behalf of Daniel Fett <mail=40danielfett.de@dmarc.ietf.org<mailto:mail=40danielfett.de@dmarc.ietf.org>>
Date: Wednesday, 3. January 2024 at 17:48
To: oauth@ietf.org<mailto:oauth@ietf.org> <oauth@ietf.org<mailto:oauth@ietf.org>>
Subject: Re: [OAUTH-WG] Shepherd Review of draft-ietf-oauth-security-topics-23

Hi Axel,

It is to be expected that not all AS will immediately upgrade to adhere to the security BCP after its release. So a client who wants to use PKCE may encounter AS that don't support it.

See also the discussion in https://mailarchive.ietf.org/arch/msg/oauth/ZiwEfenZZlboikXxBLes5ebPmBw/

-Daniel

Am 03.01.24 um 17:39 schrieb Axel.Nennker@telekom.de<mailto:Axel.Nennker@telekom.de>:
Hi Daniel,

there is also this sentence in this section https://oauthstuff.github.io/draft-ietf-oauth-security-topics/draft-ietf-oauth-security-topics.html#name-authorization-code-grant in a paragraph on it own.

"Authorization servers MUST support PKCE [RFC7636<https://oauthstuff.github.io/draft-ietf-oauth-security-topics/draft-ietf-oauth-security-topics.html#RFC7636>]."

Why must a client "ensure" that the AS supports PKCE if the security best practices say the AS MUST support PKCE?

//Axel


From: OAuth <oauth-bounces@ietf.org><mailto:oauth-bounces@ietf.org> on behalf of Daniel Fett <mail=40danielfett.de@dmarc.ietf.org><mailto:mail=40danielfett.de@dmarc.ietf.org>
Date: Wednesday, 3. January 2024 at 14:01
To: oauth@ietf.org<mailto:oauth@ietf.org> <oauth@ietf.org><mailto:oauth@ietf.org>
Subject: Re: [OAUTH-WG] Shepherd Review of draft-ietf-oauth-security-topics-23

Hi Axel,

I would be happy to see OAuth move away from state as a CSRF protection mechanism in the future, but there is not too much to be gained from relying solely on PKCE right now. The main advantage is that relying on PKCE incentivizes clients to properly manage the session state in a cookie instead of relying on a parameter. Beyond that, there's a small reduction in effort required by the client, messages will be smaller messages, etc.. The disadvantage is that a client puts CSRF protection in the hands of the AS. Therefore, we chose the wording "ensure" to say that the client has be sure that the AS actually implements PKCE correctly before relying on it. What that means in the concrete instance is up to the client.

Likewise, to your second point, I do not see enough of an advantage to RECOMMEND relying solely on PKCE for CSRF protection.

The main intention here is to open the door to rely on PKCE, e.g., in closed ecosystems, ecosystems with in-depth conformance testing, first-party applications and similar. This also helps to avoid a lot of convoluted language telling client developers how to properly choose, track, and check state values in profiles such as FAPI (and the pitfalls when interpreting that language).

-Daniel

Am 02.01.24 um 10:31 schrieb Axel.Nennker@telekom.de<mailto:Axel.Nennker@telekom.de>:
Hi,

sorry for being late in the game.

I am not too happy with this section:
"Clients that have ensured that the authorization server supports Proof Key for Code Exchange (PKCE, [RFC7636<https://oauthstuff.github.io/draft-ietf-oauth-security-topics/draft-ietf-oauth-security-topics.html#RFC7636>]) MAY rely on the CSRF protection provided by PKCE."


  1.  Maybe a minor point that is due to not being a native speaker, but the verb "ensure" seems too strong.
If the AZ states in its metadata, that it supports PKCE than this is "ensurance" enough, right? The client does not have to "ensure" the support by actually testing compliance, right?
I suggest rephrasing that to "If the authorization server states in its meta-data support for Proof Key for Code Exchange (PKCE, [RFC7636<https://oauthstuff.github.io/draft-ietf-oauth-security-topics/draft-ietf-oauth-security-topics.html#RFC7636>]) the client MAY rely on the CSRF protection provided by PKCE."
  2.  I suggest changing the "MAY" into a recommendation for all OAuth2-based protocols. OIDC flows can easily support PKCE, and new clients SHOULD use PKCE, I think.
Suggestion:
"If the authorization server states in its meta-data support for Proof Key for Code Exchange (PKCE, [RFC7636<https://oauthstuff.github.io/draft-ietf-oauth-security-topics/draft-ietf-oauth-security-topics.html#RFC7636>]), it is RECOMMENDED the client relies on the CSRF protection provided by PKCE."


Kind regards
Axel




From: OAuth <oauth-bounces@ietf.org><mailto:oauth-bounces@ietf.org> on behalf of Daniel Fett <fett=40danielfett.de@dmarc.ietf.org><mailto:fett=40danielfett.de@dmarc.ietf.org>
Date: Thursday, 28. December 2023 at 14:38
To: oauth@ietf.org<mailto:oauth@ietf.org> <oauth@ietf.org><mailto:oauth@ietf.org>
Subject: Re: [OAUTH-WG] Shepherd Review of draft-ietf-oauth-security-topics-23

Hi Hannes,

thanks again for your feedback! It is incorporated in the editor's copy now.

- https://oauthstuff.github.io/draft-ietf-oauth-security-topics/draft-ietf-oauth-security-topics.html

- Diff to published version: https://author-tools.ietf.org/api/iddiff?doc_1=draft-ietf-oauth-security-topics&url_2=https://oauthstuff.github.io/draft-ietf-oauth-security-topics/draft-ietf-oauth-security-topics.txt

I plan to publish the next version once we have resolved the discussion points from Roman's AD review.

-Daniel


Am 04.10.23 um 15:41 schrieb Tschofenig, Hannes:
Hi all,

here are some comments as part of my shepherd review of the OAuth Security BCP.

First, I want to send a big "Thanks" to everyone in the group for the work on this document and to the authors in particular. It has taken us a while to come up with such an impressive list of security recommendations for OAuth 2.0.

At this point in time my review comments can only be minor given the amount of feedback this documents has already received.

Here are a few remarks.

I believe we should indicate that the specification updates other OAuth RFCs. The obvious documents it updates are RFC 6749, RFC 6750 and RFC 6819.
You can set these "updates" in the template you are using.

In Section 1 you say:
"
It does not supplant the security advice given in
   [RFC6749], [RFC6750], and [RFC6819], but complements those documents.
"

In the subsequent paragraph you state that you "depreciate some modes of operation".

I believe you are need to be clear about what you are doing in relationship to these prior documents. It might also be useful to say something about OAuth 2.1.


Expand abbreviations on first use. Example: "AS" and "PKCE" in Section 2.1. The AS abbreviation is only expanded later in Section 3. Decide whether you want to use abbreviations or not. You mix them throughout the document without no reasons.
Listing the abbreviations in Section 1.2 may also be useful. There are not that many abbreviations anyway.


I have wording suggestions for this paragraph:

FROM:
"

   Authorization servers SHOULD use client authentication if possible.

   It is RECOMMENDED to use asymmetric (public-key based) methods for
   client authentication such as mTLS [RFC8705] or using signed JWTs
   ("Private Key JWT") in accordance with [RFC7521] and [RFC7523] (in
   [OpenID.Core] defined as the client authentication method
   private_key_jwt).  When such methods for client authentication are
   used, authorization servers do not need to store sensitive symmetric
   keys, making these methods more robust against a number of attacks.

"

TO:
"

   Authorization servers SHOULD enforce client authentication, if possible.

   It is RECOMMENDED to use asymmetric cryptography for
   client authentication, such as mTLS [RFC8705] or using signed JWTs
   ("Private Key JWT"), in accordance with [RFC7521] and [RFC7523] (in
   [OpenID.Core] defined as the client authentication method
   private_key_jwt).  When asymmetric cryptography for client authentication is
   used, authorization servers do not need to store sensitive symmetric
   keys, making client authentication more robust against leakage of keys.

"

(Note: For the reader it is always better if they are told what attacks
are prevented rather than saying "a number of attacks". You don't want the reader
to guess what you mean.)

Section 2 is a summary of what follows in Section 4. Maybe you can make this explicit
either in the title of Section 2 or in the first paragraph of Section 2.



Section 3.

You write:

"
   These attackers conform to the attacker model that was used in formal
   analysis efforts for OAuth [arXiv.1601.01229].  This is a minimal
   attacker model.  Implementers MUST take into account all possible
   types of attackers in the environment in which their OAuth
   implementations are expected to run.
"

When you say "these attackers" please clarify which attackers you are talking about.
Prior to this paragraph you have just spoken about various forms of network attackers.
Just before that you talked about network and web attackers.

Then, you introduce more attackers and you keep talking about "this attacker model" and
"these attackers". Make it easier for the reader by referring explictly which attackers
you are talking about in a specific paragraph.

Then, you conclude the section with a hint that there is an even stronger attacker model.
As a reader I might want to know what this stronger attacker model looks like and why you
do not consider it in this document.


Section 4.1.1:

You write:
"
Note: Vulnerabilities of this kind can also exist if the
   authorization server handles wildcards properly.
"

I believe you are saying that the vulnerabilities caused by incorrect redirect URI validation parsing when you refer to "this kind".
I would also remove the "note"


Section 4.1.3:

You write:

"
   *  Servers on which callbacks are hosted MUST NOT expose open
      redirectors (see Section 4.11).
"

Are you talking about authorization servers (which is what was referenced in the paragraph before)?


Section 4.10.1: Sender-constrained Access Tokens

The text gives the reader the impression that the token binding would be an option for developers to use.
I don't think that this is the case. I am particularly referring to this sentence:

"

   *  *DPoP* ([I-D.ietf-oauth-dpop]): DPoP (Demonstration of Proof-of-
      Possession at the Application Layer) outlines an application-level
      sender-constraining for access and refresh tokens that can be used
      in cases where neither mTLS nor OAuth Token Binding (see below)
      are available.
"

I would change it to:
"

   *  *DPoP* ([I-D.ietf-oauth-dpop]): DPoP (Demonstration of Proof-of-
      Possession at the Application Layer) outlines an application-level
      sender-constraining for access and refresh tokens that can be used
      in cases where mTLS is not available.
"

I would then remove the subsequent text talking about old, expired drafts.
Alternatively, you could move the text to the appendix.


Section 4.10.2: Audience Restricted Access Tokens

In the text you say:

"
   Audience restriction essentially restricts access tokens to a
   particular resource server.  The authorization server associates the
   access token with the particular resource server and the resource
   server SHOULD verify the intended audience.
"

You have to put a MUST here. If the resource server does not check the audience
restriction when using audience restricted access tokens then you obviously do not
get the value from it. It is like using DPOP and not using the proof-of-possession.

Likewise the SHOULD language in this sentence is also questionable:

"
The client SHOULD tell the authorization server the intended resource
   server.  The proposed mechanism [RFC8707] could be used or by
   encoding the information in the scope value.
"

If the client does not tell the authorization server what the intended resource server
is then how should the authorization server know (unless in a very limited setup).

Also the reference to RFC 8707 is a bit weak. We standardized resource indicators: why not
recommend using it?

Section 4.10.3: The section heading is "Discussion: Preventing Leakage via Metadata".
The content of the section is not really a discussion but rather a description of why
this path has not been taken. I wonder whether it would be better to move this section
to the appendix and then start the text by explaining why other solutions have been used instead of this approach.


Section 4.11: I would put the definition about what an "open redirector" is into the terminology section since you
are using the term already in earlier sections. Here is the definition:

"
An open redirector is an endpoint that forwards a user’s
   browser to an arbitrary URI obtained from a query parameter.
"


Typos/Wording:

FROM:
"
Afterwards, the updated the OAuth attacker model is presented.
"

TO:
"
Afterwards, the updated OAuth attacker model is presented.
"

Section 4.1:

"... wild ."
         ^

Consider using the guidelines for inclusive language:
https://www.rfc-editor.org/part2/#inclusive_language

For example, "If the attacker is able to ... , **he** will directly get access to ..."

Another example is "whitelisted".

Section 4.1.2: a wording suggestion.

FROM:
"
The attack
   described here combines this behavior with the client as an open
   redirector (see Section 4.11.1) in order to get access to access
   tokens.
"

TO:
"
The attack
   described here combines this behavior with the client as an open
   redirector (see Section 4.11.1) to obtain access tokens.
"


Section 4.7.1: word missing

FROM:

"
PKCE provides robust protection against CSRF attacks even in presence
   of an that can read the authorization response (see Attacker A3 in
   Section 3).
"

TO:

"
PKCE provides robust protection against CSRF attacks even in presence
   of an attacker that can read the authorization response (see Attacker A3 in
   Section 3).
"



Section 4.18.2: capitalization

FROM:

"
Wildcard origins like "*" in postMessage MUST not be used as
   attackers can use them to leak a victim's in-browser message to
   malicious origins.
"
TO:

"
Wildcard origins like "*" in postMessage MUST NOT be used as
   attackers can use them to leak a victim's in-browser message to
   malicious origins.
"

You might also want to replace the short title "oauth-security-topics" (which can be found on each page) with something like "OAuth 2.0 Security BCP".

Ciao
Hanns



_______________________________________________

OAuth mailing list

OAuth@ietf.org<mailto:OAuth@ietf.org>

https://www.ietf.org/mailman/listinfo/oauth

--

Please use my new email address: mail@danielfett.de<mailto:mail@danielfett.de>


_______________________________________________

OAuth mailing list

OAuth@ietf.org<mailto:OAuth@ietf.org>

https://www.ietf.org/mailman/listinfo/oauth



_______________________________________________

OAuth mailing list

OAuth@ietf.org<mailto:OAuth@ietf.org>

https://www.ietf.org/mailman/listinfo/oauth

_______________________________________________
OAuth mailing list
OAuth@ietf.org<mailto:OAuth@ietf.org>
https://www.ietf.org/mailman/listinfo/oauth