[secdir] Re: Secdir last call review of draft-ietf-ace-revoked-token-notification-06

Marco Tiloca <marco.tiloca@ri.se> Fri, 10 May 2024 13:13 UTC

Return-Path: <marco.tiloca@ri.se>
X-Original-To: secdir@ietfa.amsl.com
Delivered-To: secdir@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 47F44C14F5F3; Fri, 10 May 2024 06:13:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.096
X-Spam-Level:
X-Spam-Status: No, score=-2.096 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_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=ri.se
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 ri0fa0jBnYwR; Fri, 10 May 2024 06:13:01 -0700 (PDT)
Received: from GVYP280CU001.outbound.protection.outlook.com (mail-swedencentralazon11022011.outbound.protection.outlook.com [52.101.75.11]) (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 760A7C14F5F2; Fri, 10 May 2024 06:12:57 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kj5ngTgjtEQSqEj/rEELP7elAaCjzKnElWBSEuDdAdnHhM7vrz95owGp5rfdlz3CxhyZVn8e7oGYNZWoP/xPFJcXJIq/sO7OYND0bvkrvzY6oOo57Hx4EkMh7hLUqpwR2l0yLfHxyf24PCrPYIZtkihBjuVFy5hosyDQYCZ/zvmdXwCH5pJDauljPi7GXkCUb4FGeSmZsZrX5Ei1aroMpYCMSKCBDkMD1wX+VX4kahdIEd8teKr8tkBqYzP1EJy2Iq0T8kBtuFO46jDB9B8YnfE7Kxu0S7+ZZo0UsJmt3iDk8kfkigfd+7S0VWIzFFqe6ruP5vpVQBAAssz3TTSaNA==
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=Mz6cP695SyPn4u1e7euRuVvEb8R4hZNuyTyHxYZov6A=; b=DyYWYGZnfnC9FPmyjCHrwsgiYfryxn/3re3HbAaHqjtqoAB1uqZr/KrOmqPEt3rS8P5LWKjUJAaagje4UEtch5firRRY7WY4HfT2nMKJ7CAGDsPmS3hDLomxOgFhXV4b3Ij2KhBK3zaC7nIjTauvCjQCwMaY2QGy0tfgyvMmHnr5YL4ST+ovgj5G6NTIoo0y3a/ej/eg/stDJy3dytEGKSvDlRdTd9kHpUixnFyn8cKDrimUMhFhgg72Ok6F7DvIAQa+Krbg2sBMzHRIQw8fUZKzhx6T/8TcIL9ys/jLcz/bD1jAvMRTDrIKbpWuO1V9639lYfoB3VerPwSbSjkuAg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ri.se; dmarc=pass action=none header.from=ri.se; dkim=pass header.d=ri.se; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ri.se; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Mz6cP695SyPn4u1e7euRuVvEb8R4hZNuyTyHxYZov6A=; b=UjLDGghHoKMoXxiFSChWwpjCT1WeIBmin0Bdpm+k29DMoXjqMrhp9mhfadM3U7ZPwo0ocBh8PAI6pJaudopglPW9juynaAG+b2i7a8mJs/nu1FSNMIKKisi10K9Z/DxP21gpYKGGjR3811ftukrlDcU8yBLVmAWyqbQw7n0it7c=
Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=ri.se;
Received: from GVYP280MB0464.SWEP280.PROD.OUTLOOK.COM (2603:10a6:150:37::17) by GV3P280MB1046.SWEP280.PROD.OUTLOOK.COM (2603:10a6:150:f2::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.47; Fri, 10 May 2024 13:12:53 +0000
Received: from GVYP280MB0464.SWEP280.PROD.OUTLOOK.COM ([fe80::ac07:ed64:c098:f1f9]) by GVYP280MB0464.SWEP280.PROD.OUTLOOK.COM ([fe80::ac07:ed64:c098:f1f9%4]) with mapi id 15.20.7544.048; Fri, 10 May 2024 13:12:53 +0000
Message-ID: <a577e7c8-3393-4aa2-a1d6-372e1436e445@ri.se>
Date: Fri, 10 May 2024 15:12:51 +0200
User-Agent: Mozilla Thunderbird
To: Kyle Rose <krose@krose.org>, secdir@ietf.org
References: <171198804485.48386.4769073198215276191@ietfa.amsl.com>
Content-Language: en-US
From: Marco Tiloca <marco.tiloca@ri.se>
Autocrypt: addr=marco.tiloca@ri.se; keydata= xsBNBFSNeRUBCAC44iazWzj/PE3TiAlBsaWna0JbdIAJFHB8PLrqthI0ZG7GnCLNR8ZhDz6Z aRDPC4FR3UcMhPgZpJIqa6Zi8yWYCqF7A7QhT7E1WdQR1G0+6xUEd0ZD+QBdf29pQadrVZAt 0G4CkUnq5H+Sm05aw2Cpv3JfsATVaemWmujnMTvZ3dFudCGNdsY6kPSVzMRyedX7ArLXyF+0 Kh1T4WUW6NHfEWltnzkc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3Hy894Qcw4H6G799A1OL9B1EeA8Yj3aOz0NbUyf5GW+iotr3h8+KIC OYZ34/BQaOLzdvDNmRoGHn+NeTzhF7eSeiPKi2jex+NVodhjOVGXw8EhYGkeZLvynHEboiLM 4TbyPbVR9HsdVqKGVTDxKSE3namo3kvtY6syRFIiUz5WzJfYAuqbt6m3TxDEb8sA9pzaLuhm fnJRc12H5NVZEZmE/EkJFTlkP4wnZyOSf/r2/Vd0iHauBwv57cpY6HFFMe7rvK4s7ME5zctO Ely5C6NCu1ZaNtdUuqDSPA==
In-Reply-To: <171198804485.48386.4769073198215276191@ietfa.amsl.com>
Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="------------HJM0W394VN5ZGWAUAk9LCwgc"
X-ClientProxiedBy: MM0P280CA0104.SWEP280.PROD.OUTLOOK.COM (2603:10a6:190:9::21) To GVYP280MB0464.SWEP280.PROD.OUTLOOK.COM (2603:10a6:150:37::17)
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: GVYP280MB0464:EE_|GV3P280MB1046:EE_
X-MS-Office365-Filtering-Correlation-Id: ceefca41-1b6a-46e3-899b-08dc70f2e6a0
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|366007|1800799015;
X-Microsoft-Antispam-Message-Info: 6ECDdwYKqqk3Ugna7S44tLgwNLyNQyPS5m+XOO7BSBuZtCq4Sk0Ia0oSIJ3ssiDIAoirRxvtUMcPqIWfQfuII4s9atzQssZveqjNnzbPVJetP8toaNBU+Zjo93u5pDsfpwaLV5KDq/c2V03tzIl1EHNEjqKbMW3aeN6ptbqeZU6RaLifua8iEHgvVJcML7k3DWVfYl1Iway2t1l7i05lvJc7GWgIcZoLE7tDHFnA5HP0rp8KMCiAaau8KVJ0x94bFbPNYZ9PygoxNEuiRO+wAHv9GLWD9iUc+3s9qBrLazBcNyvCvYBp0IlwVBo8W7HZPx7/8pfcDRThndKc5912mB2/N0oOGdaXZ2lj6QkbOZ/ypn+uIopakTn/fQIe7yglIODmm8k9fxWxEPNAfkTdEBVOj1flt6t/nj65evrlv9KYUWWqRcQt6FXUngTjC5oOftLeSsYGwUCSkh8otNFmG1t5gknIx4byXXhOgHAl0UmLZts+doNUdjVTmnDTtdXZ0ygiGhi5cOCnhlkmimJWOK/1qVZLPRed2bItknyN/CwuKL0pNd26e5o3GgRYszrY+yopuDE+IUxhaFP11Bq6zKywarYeSdpiO1p4oY9E03cL6129sI8+jQHp4SBXKocQhjrNHSPI9jb1E7wfQRFbSW9hmAk7ZyP/u0E9BtQLr9H4pF2OawIBFoUyRz0S+LihXlOrR8cVX8hprwg4fciWEEVnaT2+HnLRNWRfOeId/cwx1rhJBjRpuw9npX8HAlcVFCAt5FbZPr3N0oBbHnT7u11nvxf4MauvWKrpeyfzALtVetztsEU7XzXJ3AWP27l1Ej5YeAglKdAsXBbxwe4npXzomWsFxZLCSMmvzKoQTI5k21KTGJpj7UzujE+F7ef+VjhsFkM5mmPz0fX35IIbNwQE8aPRfIVGTEkvLKeXM3P6liVv5wj0xzT1E4Yg0Bk9Ww7ZhWDzGWELSA4iANnKJSX5Y+BDNLjw7Nsv8woju5WnmCzXjghiPw6xyef6dqipThfdKW5iTYMOiAotnHGGZ+Y0e+WTtN8HIEraTgwxj/cQt1BZlL71GCRbCVP1mze4m4g9WmMnFrotkDV80k6kJYCThAcQv0SvC1cnmQIfkf/SYXKPrHdThflB1jCXmQHhY5MqkAvVzC8gb92mLDRqJ3t664udCuUrC8DFAvflvrHSWo4Jv9jCAnTHR7MDLiVjEwtmgA/qJjqOmwGQkFPl+c//ZEBKtwcD5PKBumuc+uI=
X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:GVYP280MB0464.SWEP280.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230031)(376005)(366007)(1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17mR6HqyPqBCm8/jOStwIQv+93DLKHId76hsK2sg2SUmT4ONlczy+2q/y2opVCD85I5WwrU0Ct0/Nkpom4B1o82UlZz75Ow3WLUxLeig1VywYmT7mgN4blFthq6ojGcPkyMYoO0gEWoD9j+uip/8KCI7MBBR+pXqdfrNtrnuP5oKxhdQogFBkW/VXRJ0Y8dZBCNq8DY6BFN+4dZ7kFYHJ+pcMaAalyzeqXxvJ5vf2rSLtak5R3sng+RdZk6AHgDHU7GtgqXAtnO7soUQqOD16nr/0MukHfSZsySE7CgqcLVY44JamYYX10qAKddWk5uQGf0iKFvVsejku68ZC2cQGhRNBgF4dFI2GhRrNViy0JLMYTe2RuBqy557qmTzZcNeN50MLTuqgwjFBnlzBDXKgBJUIJYqJM4ztHIKxzSHQm8ULUeIb4kSvlxJsdZKDHzVa3sikPfpPZagNmudZSWb8kgvR7iE7+NueIHj1lEh25OBrDovhASH2gMjtF2ILLxuYKH2KyjWcX9cAwK2cmweO1u0tUOAHDUWAvpw8aEX7y6+q6rIVI0kUQCjUfjNIOE/QTsHG3pG/S/HLzi33pR7aZl
X-OriginatorOrg: ri.se
X-MS-Exchange-CrossTenant-Network-Message-Id: ceefca41-1b6a-46e3-899b-08dc70f2e6a0
X-MS-Exchange-CrossTenant-AuthSource: GVYP280MB0464.SWEP280.PROD.OUTLOOK.COM
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2024 13:12:53.4254 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 5a9809cf-0bcb-413a-838a-09ecc40cc9e8
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: l0082zMV9rF+/n6KqqClN99loePw1k0n5omQEkXIFlfLX/9ScQW4CbG7PORa8/u6LoO/cCdYXs2Zbwrhqe1YUQ==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV3P280MB1046
Message-ID-Hash: HQRXTHQN4BP3OVYO6KXI64U2BTYBQS6R
X-Message-ID-Hash: HQRXTHQN4BP3OVYO6KXI64U2BTYBQS6R
X-MailFrom: marco.tiloca@ri.se
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-secdir.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: ace@ietf.org, draft-ietf-ace-revoked-token-notification.all@ietf.org, last-call@ietf.org
X-Mailman-Version: 3.3.9rc4
Precedence: list
Subject: [secdir] Re: Secdir last call review of draft-ietf-ace-revoked-token-notification-06
List-Id: Security Area Directorate <secdir.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/secdir/qGFv4n9P7bdn9CpiBGtwsohozNI>
List-Archive: <https://mailarchive.ietf.org/arch/browse/secdir>
List-Help: <mailto:secdir-request@ietf.org?subject=help>
List-Owner: <mailto:secdir-owner@ietf.org>
List-Post: <mailto:secdir@ietf.org>
List-Subscribe: <mailto:secdir-join@ietf.org>
List-Unsubscribe: <mailto:secdir-leave@ietf.org>

Hello Kyle,

Thanks a lot for your review! Please find in line below our detailed 
replies to your comments.

A Github PR where we have addressed your comments is available at [PR].

Unless any concern is raised, we plan to soon merge this PR (and the 
other ones related to other received reviews), and to submit the result 
as version -07 of the document.

Thanks,
/Marco

[PR] https://github.com/ace-wg/ace-revoked-token-notification/pull/10

On 2024-04-01 18:14, Kyle Rose via Datatracker wrote:
> Reviewer: Kyle Rose
> Review result: Has Issues
>
> I have reviewed this document as part of the security directorate's ongoing
> effort to review all IETF documents being processed by the IESG.  These
> comments were written primarily for the benefit of the security area directors.
>   Document editors and WG chairs should treat these comments just like any other
> last call comments.
>
> This document is Almost Ready.
>
> * The security issue outlined in section 13.5 ("Dishonest clients") adequately
> justifies maintaining confidentiality of the full list of revoked hashes, or at
> least of recent additions to the list, without reference to privacy as
> mentioned in section 13.1. The privacy issues posed by hashes of tokens that
> are not widely distributed or visible to passive observers are not at all clear
> to me.

==>MT

Quoting the privacy-related sentence in Section 13.1:

 > Disclosing any information about revoked access tokens to entities 
other than the intended registered devices may result in privacy concerns.

Admittedly, it is hard to think of immediate, severe privacy 
consequences from revealing token hashes and their insertion/deletion in 
the update collection of non-pertaining parties.

We included that sentence with the intentionally open "may result", as a 
way to err on the side of caution. This is aligned with the generally 
good practice of not exposing more than necessary to more entities than 
necessary.

That said, we agree that the security issue discussed in Section 13.5 is 
much more concrete and sufficient to justify the security measures 
defined in Section 13.1.

Therefore, in the interest of simplicity and clarity, in Section 13.1 we 
have removed the quoted sentence "Disclosing any information ... may 
result in privacy concerns".

<==

>
> * Furthermore, doesn't the security issue identified in 13.5 imply that only
> RSes should be notified of revocations, and clients left to wonder until their
> requests are denied, or at least until after the RSes to which the token is
> relevant have been notified? Secrecy matters really only because we want to
> prevent bad actors with access to the token from taking advantage of it during
> the window between revocation and RSes being aware of that revocation: if you
> notify the bad actor proactively, it doesn't really matter that you kept it
> secret from other nefarious observers. (Note that changing this would require
> the changes to the recommendation from 13.4.)
>
>      For what it's worth, this is not a novel problem, and it is one that
>      plagues revocation systems in general. Moreover, all the possible
>      approaches are unsatisfying in some way, often relying on assumptions about
>      the state of mind/intent or expected behavior of the adversarial actor.

==>MT

We did not mean to imply that only RSs should be notified of revoked 
access tokens, and the intention was not to have Clients left to wonder.

In fact, an access token might be revoked because the RS is found 
compromised or suspected so. In such a case, informing of the revocation 
is first of all in the interest of the Client, in order to protect the 
Client from accessing resources at an RS that is deemed malevolent or 
not appropriate to access.

Informing registered devices about pertaining revoked access tokens is 
intended to work in a homogeneous way, without making assumptions about 
the state of mind/intent or expected behavior of the participants in the 
protocol, all of which may be honest actors that have to be promptly 
notified of the revocation.

What has probably created confusion here is the inappropriate focus on 
dishonest clients in Section 13.5. A comment in the GENART review 
[GENART-REVIEW] also noted that the dishonest client discussed in the 
original text is in fact only one particular case of a more general issue.

[GENART-REVIEW] 
https://mailarchive.ietf.org/arch/msg/ace/ETtaBMaSyoZKMD82kgG49P2cF9U/

Building on the suggestion in the GENART review, the new text in Section 
13.5 clarifies that the vulnerability window for the RS actually spans 
from when an access token is revoked until when the RS becomes aware of 
that, irrespective of whether the Client is honest or not and of its 
intentions.

The intended new text of Section 13.5 reads as follows:

 > 13.5 Vulnerable Time Window at the RS
 >
 > A Client may attempt to access a protected resource at an RS after 
the access token allowing such an access has been revoked, but before 
the RS is aware of the revocation.
 >
 > In such a case, if the RS is still storing the access token, the 
Client will be able to access the protected resource, even though it 
should not. Such an access is a security violation, even if the Client 
is not attempting to be malicious.
 >
 > In order to minimize such risk, if an RS relies solely on polling 
through individual requests to the TRL endpoint to learn of revoked 
access tokens, the RS SHOULD implement an adequate trade-off between the 
polling frequency and the maximum length of the vulnerable time window.


Regarding the recommendation in Section 13.4:

* The Client considered therein is honest, since it "stores an access 
token that it still believes to be valid". That said, the discussed 
consideration starts from the fact that the Client has its access 
denied, which is explained to be due to possible different reasons.

* Building on the previous point, the goal of the recommendation is 
about avoiding that the Client just rushes at the AS on a whim and 
triggers the issue of a new access token. This is not really necessary 
to happen in case the current access token stored by the Client is 
actually still valid. That's why, before asking the AS for a new access 
token, the Client should first consider to re-try its access to the 
protected resource at the RS and/or to re-upload the same access token 
to the RS.

To expand on this case, we have extended the second paragraph of Section 
13.4, and mentioned one more possible reason why the Client can receive 
a genuine 4.01 (Unauthorized) response from the RS, even when the access 
token stored by the Client is still valid. That is:

OLD:
 > This can be due to different reasons. For example, the access token 
has actually been revoked and the Client is not aware about that yet, 
while the RS has gained knowledge about that and has expunged the access 
token. Also, an on-path, active adversary might have injected a forged 
4.01 (Unauthorized) response.

NEW (emphasis mine):
 > This can be due to different reasons. For example, the access token 
has actually been revoked and the Client is not aware about that yet, 
while the RS has gained knowledge about that and has expunged the access 
token. **As another example, the access token is still valid, but an 
on-path active adversary might have injected a forged 4.01 
(Unauthorized) response, or the RS might have deleted the access token 
from its local storage due to its dedicated storage space being all 
consumed.**

<==

> * I do not understand the criteria specified for purging hashes of revoked
> tokens in section 10.1. In particular, why is the first criteria required? If
> an RS never sees a particular token, this implies the hash would be kept
> forever, or at least until memory pressure is encountered. Should the RS not
> also be allowed to expunge a hash if the TRL endpoint signals removal via
> expiry? At that point the token would be invalid anyway, revoked or not.

==>MT

The first criterion is also necessary, in order to counteract what is 
described later in the same section, in the paragraph starting with 
"Retaining the stored token hashes as specified above ...". The 
following explains why, also by means of an example.

Quoting the text about the two criteria:

 > An RS stores a token hash th1 corresponding to an access token t1 
until both the following conditions hold.
 >
 > * The RS has received and seen t1, irrespective of having accepted 
and stored it.
 >
 > * The RS has gained knowledge that t1 has expired. This can be 
achieved, e.g., through the following means. ...

**If the first criterion above was not taken into account**, then the 
following undesired outcome can occur. Let's assume that the RS has used 
CoAP Observe and is thus subscribed to updates at the TRL endpoint of 
the AS.

1. The AS issues an access token TOKEN with a lifetime of X seconds. 
Instead of the 'exp' claim specifying an expiration time, TOKEN includes 
the 'exi' claim with value X (see Section 5.10.3 of RFC 9200). Then, the 
AS provides C with TOKEN.

2. Either of the two happens:

    - C (dishonestly) retains TOKEN without uploading it; or

    - C attempts to upload TOKEN at the RS, but its message gets 
severely delayed in transmission.

    In either case, the RS does not receive, hence does not see, TOKEN.

3. Later at some point, TOKEN gets revoked.

    When this happens, the AS adds the corresponding token hash 
TOKEN_HASH to the TRL, and sends an Observe notification to the RS.

    As a consequence, the RS learns that TOKEN has been revoked. In 
particular, the RS stores TOKEN_HASH after retrieving it from the 
received notification.

4. Time passes, with the RS still not having received TOKEN. Eventually, 
after X seconds have passed since the issuing of TOKEN, the AS declares 
TOKEN to be expired.

    Therefore, the AS removes TOKEN_HASH from the TRL and sends a 
notification to the RS. As a consequence, the RS learns that TOKEN has 
eventually expired.

5. Since the second criterion is fulfilled and the first one is not 
taken into account, the RS deletes TOKEN_HASH.

6. C successfully uploads TOKEN at the RS. That is, C stops retaining 
TOKEN and finally uploads it at the RS, or the severely delayed message 
conveying TOKEN finally reaches the RS. In either case:

    - The RS does not consider TOKEN to be revoked, because it is not 
storing the corresponding TOKEN_HASH; and

    - The RS does not consider the TOKEN as expired either, since it 
determines the expiration time to be its current local time plus X 
seconds, per the value indicated in the 'exi' claim of TOKEN.

    Therefore, the RS accepts and stores TOKEN even though that has been 
revoked and later expired.


If, as in the original text, the first criterion is also taken into 
account as we intend, then at step 5 the RS does **not** delete 
TOKEN_HASH, since it has not seen TOKEN yet.

Then, in case TOKEN is uploaded at the RS after that, the RS still 
stores TOKEN_HASH, and hence does not accept TOKEN. Furthermore, as 
defined in the second from last and third from last paragraphs of 
Section 10.1, the following occurs:

* The RS retrieves from the 'cti' claim of TOKEN the sequence number SN 
encoded therein, and pairs SN with TOKEN_HASH. Then the RS discards TOKEN.

* The RS can delete TOKEN_HASH. Before doing so, since SN is associated 
with TOKEN_HASH, the RS checks whether SN is greater than the highest 
sequence number SN* among any of the previously received and expired 
access tokens that included the 'exi' claim (see Section 5.10.3 of RFC 
9200). If that is the case, then RS sets SN as the new value of SN*.

* Finally, RS can safely delete TOKEN_HASH. If the RS receives TOKEN in 
the future, there will be no stored TOKEN_HASH that the RS can rely on 
for rejecting TOKEN. However, the RS will still be able to reject TOKEN 
by leveraging the stored sequence number SN*.

<==

> Other comments:
>
> * I did not review the properties of, or analyze the correctness of, the
> database consistency algorithm and associated update protocol used to keep
> registered devices up-to-date with relevant token hashes. I do not know if this
> algorithm and protocol were based on something specific, so if that is not the
> case then my main observation would be that the consistency requirements here
> are not unique to the proposed revocation function, so it may be worth
> reviewing literature relevant to the problem space associated with database
> view consistency across distributed and intermittently-connected devices to see
> if there is something more generic that can be leveraged in solving this
> problem.

==>MT

We separately reply about the two different aspects raised in the comment.

**Database consistency algorithm** - This is an important component of 
an AS that relies specifically on a database.

The AS is supposed to rely on a database for the storage and maintenance 
of, among other things: i) credentials or secrets of registered devices; 
ii) access policies for Clients at RSs; iii) issued and still valid 
access tokens, if supporting token introspection (see Section 5.9 of RFC 
9200).

In a similar fashion, the AS can rely on its database for concretely 
representing its TRL and the associated update collections. Indeed, 
consistency requirements are not unique to the proposed method for 
notifying about revoked access tokens. However, we believe that this 
aspect is implementation-specific and out of the scope of this 
specification.

More generally, database consistency can be enforced by the same means 
that the AS already uses to ensure the reliability of its database for 
other, more traditional reasons listed above.

Looking at other related documents:

* Neither RFC 9200 (ACE) nor RFC 6749 (OAuth 2.0, which ACE builds on 
and inherits security considerations from) provide considerations on the 
particular topic of view consistency.

* RFC 6819 provides security considerations related to the AS' database 
in OAuth 2.0, but in terms of countermeasures to address possible 
attacks against the AS, without covering the particular topic of view 
consistency.

* RFC 7662 defines token introspection for OAuth 2.0. In its Section 4, 
its security considerations (also inherited by ACE when supporting token 
introspection) outline that an AS providing token introspection has to 
be able to understand tokens for which introspection is requested (e.g., 
by storing token-related information in a database), but that the exact 
means to achieve that is implementation specific and out of scope.

Please note that the database in question is limited to the AS, and does 
not involve registered devices. That is, from a logical point-of-view, 
the AS is the centralized source of truth about the token hashes, just 
like it is for the status of issued access tokens if it provides token 
introspection.

If the AS' database is specifically implemented in a distributed fashion 
and/or relying on different replica to be kept in sync, that feels even 
more out of the scope of ACE and of this specification.


**Update protocol used to keep registered devices up-to-date** - This 
document defines the new TRL endpoint at the AS. Per RFC 9200, 
communications between C/RS and AS are expected to use CoAP 
(recommended) or alternatively HTTP.

In either case, the update protocol used to keep registered devices 
up-to-date boils down to the exchange of CoAP/HTTP messages with the AS, 
in order to perform RESTful accesses to the TRL at the AS. That is, when 
receiving a GET request to the TRL endpoint, the AS returns a response 
that conveys the current representation of (the pertaining portion of) 
the TRL to the requester.

In turn, the representation of the TRL at the AS is updated by the AS as 
defined in Section 4.1, based on only two possible triggering events: i) 
a non-expired access token is revoked; or ii) a revoked access token 
expires.

When specifically using CoAP and its extension Observe (RFC 7641), the 
AS also sends automatic Observe notification responses to the registered 
devices that have been observing the TRL endpoint (see Section 4.2 of 
RFC 7641), upon changes to (the pertaining portion of) the TRL. In 
particular, each Observe notification specifies the current 
representation of (the pertaining portion of) the TRL, like if replying 
to a just received GET request.

Furthermore, CoAP Observe specifically relies on the "eventual 
consistency" model (see Section 1.3 of RFC 7641). That is, quoting the 
abstract of RFC 7641 (with "(CoAP)" being my addition), CoAP Observe follows

 > a best-effort approach for sending new representations to (CoAP) 
clients and provides eventual consistency between the state observed by 
each (CoAP) client and the actual resource state at the (CoAP) server.

Note that Section 13.3 "Communication Patterns" of this document 
recommends that registered devices do not solely rely on Observe 
notifications from the TRL endpoint, but instead complement it with 
regular polling requests according to application policies.

<==

> * I also did not review any of the appendices.
>
>
>

-- 
Marco Tiloca
Ph.D., Senior Researcher

Phone: +46 (0)70 60 46 501

RISE Research Institutes of Sweden AB
Box 1263
164 29 Kista (Sweden)

Division: Digital Systems
Department: Computer Science
Unit: Cybersecurity

https://www.ri.se