RFC 9770: Notification of Revoked Access Tokens in the Authentication and Authorization for Constrained Environments (ACE) Framework
- M. Tiloca,
- F. Palombini,
- S. Echeverria,
- G. Lewis
Abstract
This document specifies a method of the Authentication and Authorization for Constrained Environments (ACE) framework, which allows an authorization server to notify clients and resource servers (i.e., registered devices) about revoked access tokens. As specified in this document, the method allows clients and resource servers (RSs) to access a Token Revocation List (TRL) on the authorization server by using the Constrained Application Protocol (CoAP), with the possible additional use of resource observation. Resulting (unsolicited) notifications of revoked access tokens complement alternative approaches such as token introspection, while not requiring additional endpoints on clients and RSs.¶
Status of This Memo
This is an Internet Standards Track document.¶
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841.¶
Information about the current status of this document, any
errata, and how to provide feedback on it may be obtained at
https://
Copyright Notice
Copyright (c) 2025 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(https://
1. Introduction
Authentication and Authorization for Constrained Environments (ACE) [RFC9200] is a framework that enforces access control on Internet of Things (IoT) devices acting as resource servers (RSs). In order to use ACE, both clients and RSs have to register with an authorization server (AS) and become registered devices. Once registered, a client can send a request to the AS to obtain an access token for an RS. For a client to access the RS, the client must present the issued access token at the RS, which then validates it before storing it (see Section 5.10.1.1 of [RFC9200]).¶
Even though access tokens have expiration times, there are circumstances by which an access token may need to be revoked before its expiration time, such as when:¶
As discussed in Section 6.1 of [RFC9200], only client
This document specifies a method for allowing registered devices to access and possibly subscribe to a Token Revocation List (TRL) on the AS in order to obtain updated information about pertaining access tokens that were revoked prior to their expiration. As specified in this document, the registered devices use the Constrained Application Protocol (CoAP) [RFC7252] to communicate with the AS and with one another and can subscribe to the TRL on the AS by using resource observation for CoAP [RFC7641]. Underlying protocols other than CoAP are not prohibited from being supported in the future, if they are defined to be used in the ACE framework.¶
Unlike in the case of token introspection (see Section 5.9 of [RFC9200]), a registered device does not provide an owned access token to the AS for inquiring about its current state. Instead, registered devices simply obtain updated information about pertaining access tokens that were revoked prior to their expiration as efficiently identified by corresponding hash values.¶
The benefits of this method are that it complements token introspection and does not require the registered devices to support any additional endpoints (see Section 1.1). The only additional requirements for registered devices are a request
The process by which access tokens are declared revoked is out of the scope of this document. The method by which the AS determines or is notified of revoked access tokens, according to which the AS consequently updates the TRL as specified in this document, is also out of scope.¶
1.1. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
Readers are expected to be familiar with the terms and concepts described in the ACE framework [RFC9200], as well as with terms and concepts related to CBOR Web Tokens (CWTs) [RFC8392] and JSON Web Tokens (JWTs) [RFC7519].¶
The terminology for entities in the considered architecture is defined in OAuth 2.0 [RFC6749]. In particular, this includes client, RS, and authorization server (AS).¶
Readers are also expected to be familiar with the terms and concepts related to the Concise Data Definition Language (CDDL) [RFC8610], Concise Binary Object Representation (CBOR) [RFC8949], JSON [RFC8259], CBOR Object Signing and Encryption (COSE) [RFC9052], CoAP [RFC7252], CoAP Observe [RFC7641], and the use of hash functions to name objects as defined in [RFC6920].¶
Note that the term "endpoint" is used here following its OAuth definition [RFC6749], aimed at denoting resources such as /token and /introspect at the AS, and /authz-info at the RS. The CoAP definition, which is "[a]n entity participating in the CoAP protocol" [RFC7252], is not used in this document.¶
This specification also uses the following terminology:¶
- Token hash:
- identifier of an access token, in binary format encoding. The token hash has no relation to other access token identifiers possibly used, such as the 'cti' (CWT ID) claim of CBOR Web Tokens (CWTs) [RFC8392].¶
- Token Revocation List (TRL):
- a collection of token hashes such that the corresponding access tokens have been revoked but are not expired yet.¶
- TRL endpoint:
- an endpoint at the AS with a TRL as its representation. The default name of the TRL endpoint in a url-path is '/revoke/trl'. Implementations are not required to use this name and can define their own instead.¶
- Registered device:
- a device registered at the AS, i.e., as a client, an RS, or both. A registered device acts as a requester towards the TRL endpoint.¶
- Administrator:
-
an entity that is authorized to get full access to the TRL at the AS and that acts as a requester towards the TRL endpoint. An administrator is not necessarily a registered device as defined above, i.e., a client requesting access tokens or an RS consuming access tokens.¶
An administrator might also be authorized to perform further administrative operations at the AS, e.g., through a dedicated admin interface that is out of the scope of this document. By considering the token hashes retrieved from the TRL together with other information obtained from the AS, the administrator becomes able to derive additional information, e.g., the fact that accesses have been revoked for specific registered devices.¶
- Pertaining access token:
-
- Token hash pertaining to a requester:
- a token hash corresponding to an access token pertaining to that requester, i.e., an administrator or a registered device.¶
- TRL update pertaining to a requester:
- an update to the TRL through which token hashes pertaining to that requester have been added to or removed from the TRL.¶
- Full query:
- a type of query to the TRL where the AS returns the token hashes of the revoked access tokens currently in the TRL and pertaining to the requester. Further details are specified in Sections 6 and 7.¶
- Diff query:
- a type of query to the TRL where the AS returns a list of diff entries, each related to one update that occurred to the TRL and containing a set of token hashes pertaining to the requester. Further details are specified in Sections 6 and 8.¶
See Section 4 for further terminology used throughout that section.¶
Examples throughout this document are expressed in CBOR diagnostic notation as defined in Section 8 of [RFC8949] and Appendix G of [RFC8610]. Diagnostic notation comments are often used to provide a textual representation of the numeric parameter names and values.¶
2. Protocol Overview
This protocol defines how a CoAP-based AS informs clients and RSs, i.e., registered devices, about pertaining revoked access tokens. How the relationship between a registered device and the AS is established is out of the scope of this specification.¶
At a high level, the steps of this protocol are as follows:¶
Figure 1 shows a high-level overview of the service provided by this protocol. For the sake of simplicity, the example shown in the figure considers the simultaneous revocation of the three access tokens t1, t2, and t3 whose corresponding token hashes are th1, th2, and th3, respectively. Consequently, the AS adds the three token hashes to the TRL at once and sends Observe notifications to one administrator and four registered devices. Each dotted line associated with a pair of registered devices indicates the access token that they both own.¶
Appendix C provides examples of the protocol flow and message exchanges between the AS and a registered device.¶
3. Issuing of Access Tokens at the AS
An AS that supports the method defined in this document MUST adhere to the following rules when issuing an access token:¶
Section 14.6 discusses how adhering to the rules above neutralizes an attack against the RS where an active adversary can induce the RS to compute a token hash different from the correct one.¶
4. Token Hash
This section specifies how token hashes are computed.¶
First, Section 4.1 provides the motivation for the used construction.¶
Building on that, the value used as input to compute a token hash is defined in Section 4.2 for the client and the AS and in Section 4.3 for the RS. Finally, Section 4.4 defines how such an input is used for computing the token hash.¶
The process outlined below refers to the base64url encoding and decoding without padding (see Section 5 of [RFC4648]) and denotes as "binary representation" of a text string the corresponding UTF-8 encoding [RFC3629], which is the implied charset used in JSON (see Section 8.1 of [RFC8259]).¶
Consistent with Section 3.4 of [RFC8949], the term "tag" is used for the entire CBOR data item consisting of both a tag number and the tag content: the tag content is the CBOR data item that is being tagged.¶
Also, "tagged access token" is used to denote nested CBOR tags (possibly a single one), with the innermost tag content being a CWT.¶
4.1. Motivation for the Used Construction
An access token can have one among different formats. The most expected formats are CWT [RFC8392] and JWT [RFC7519], with the former being the default format to use in the ACE framework (see Section 3 of [RFC9200]). While access tokens are opaque to clients, an RS is aware of whether access tokens that are issued for it to consume are either CWTs or JWTs.¶
4.1.1. Issuing of the Access Token to the Client
There are two possible encodings that the AS can use for the AS-to-Client response (see Section 5.8.2 of [RFC9200]) where the issued access token is included and provided to the requester client. The RS may not be aware of which encoding is used for that response to that particular requester client.¶
4.1.2. Provisioning of Access Tokens to the RS
In accordance with the used transport profile of ACE (e.g., [RFC9202], [RFC9203], [RFC9431]), the RS receives a piece of token-related information hereafter denoted as TOKEN_INFO.¶
In particular:¶
The following overviews how the above specifically applies to the existing transport profiles of ACE:¶
Note that, if the access token is a CWT, it is specifically tagged as defined in Section 3.¶
4.1.3. Design Rationale
Considering the possible variants discussed above, it must always be ensured that the same HASH_INPUT value is used as input for generating the token hash of a given access token, by the AS that has issued the access token and by the registered devices to which the access token pertains (both client and RS).¶
This is achieved by building HASH_INPUT according to the content of the 'access_token' parameter in the AS-to-Client responses because that is what the AS, the client, and the RS are all able to see.¶
4.2. Hash Input on the Client and the AS
The client and the AS consider the content of the 'access_token' parameter in the AS-to-Client response, in which the access token is included and provided to the requester client. Note that, if the access token is a CWT, it is specifically tagged as defined in Section 3.¶
The following defines how the client and the AS determine the HASH_INPUT value to use as input for computing the token hash of the conveyed access token, depending on the AS-to-Client response being encoded in CBOR (see Section 4.2.1) or in JSON (see Section 4.2.2).¶
Once HASH_INPUT is determined, the client and the AS use it to compute the token hash of the conveyed access token as defined in Section 4.4.¶
4.2.1. AS-to-Client Response Encoded in CBOR
If the AS-to-Client response is encoded in CBOR, then HASH_INPUT is defined as follows:¶
4.2.2. AS-to-Client Response Encoded in JSON
If the AS-to-Client response is encoded in JSON, then HASH_INPUT is the binary representation of the text string conveyed by the 'access_token' parameter.¶
With reference to the example in Figure 4, HASH_INPUT is the binary representation of "eyJh...YFiA". When showing the access token, Figure 4 uses line breaks for display purposes only.¶
Note that:¶
4.3. HASH_INPUT on the RS
The following defines how the RS determines the HASH_INPUT value to use as input for computing the token hash of an access token, depending on the RS using either CWTs (see Section 4.3.1) or JWTs (see Section 4.3.2).¶
4.3.1. Access Tokens as CWTs
If the RS expects access tokens to be CWTs, then the RS performs the following steps:¶
4.3.2. Access Tokens as JWTs
If the RS expects access tokens to be JWTs, then the RS performs the following steps:¶
The RS skips Step 3 only if it is certain that all its pertaining access tokens are provided to any client by means of AS-to-Client responses encoded as CBOR messages. Otherwise, the RS MUST perform Step 3.¶
The RS skips Step 4 only if it is certain that all its pertaining access tokens are provided to any client by means of AS-to-Client responses encoded as JSON messages. Otherwise, the RS MUST perform Step 4.¶
If the RS performs both Steps 3 and 4 above, then the RS MUST store, maintain, and rely on both token hashes as associated with the access token, consistent with what is specified in Section 11.1.¶
Section 14.7 discusses how computing and storing both token hashes neutralizes an attack against the RS, where a dishonest client can induce the RS to compute a token hash different from the correct one.¶
4.4. Computing the Token Hash
Once HASH_INPUT is determined as defined in Sections 4.2 and 4.3, a hash value of HASH_INPUT is generated as per Section 6 of [RFC6920]. The resulting output in binary format is used as the token hash. Note that the used binary format embeds the identifier of the used hash function in the first byte of the computed token hash.¶
The specific hash function used MUST be collision resistant on byte strings and MUST be selected from the "Named Information Hash Algorithm Registry" [IANA
The AS specifies the used hash function to registered devices during their registration procedure (see Section 10).¶
5. Token Revocation List (TRL)
Upon startup, the AS creates a single Token Revocation List (TRL) encoded as a CBOR array.¶
Each element of the array is a CBOR byte string, whose value is the token hash of an access token. The CBOR array MUST be treated as a set, i.e., the order of its elements has no meaning.¶
The TRL is initialized as empty, i.e., its initial content MUST be the empty CBOR array. The TRL is accessible through the TRL endpoint at the AS.¶
5.1. Update of the TRL
The AS updates the TRL in the following two cases:¶
The AS MAY perform a single update to the TRL such that one or more token hashes are added or removed at once. For example, this can be the case if multiple access tokens are revoked or expire at the same time or within an acceptably narrow time frame.¶
6. The TRL Endpoint
Consistent with Section 6.5 of [RFC9200], all communications between the AS and a requester interacting with the TRL endpoint at the AS MUST be encrypted, as well as integrity and replay protected. Furthermore, responses from the AS to the requester MUST be bound to the corresponding requests.¶
Following a request to the TRL endpoint, the corresponding success response messages sent by the AS use Content-Format "application
The AS MUST implement measures to prevent access to the TRL endpoint by entities other than registered devices and authorized administrators (see Section 10).¶
The TRL endpoint supports only the GET method, and allows two types of queries of the TRL:¶
If it supports diff queries, the AS MAY additionally support the related "Cursor" extension, which has two benefits:¶
If it supports the "Cursor" extension, the AS stores additional information when maintaining the history of updates to the TRL as defined in Section 6.2.1. Also, the processing of full query requests and diff query requests, as well as the related response format, are further extended as defined in Section 9.¶
Appendix B provides an aggregated overview of the local supportive parameters that the AS internally uses at its TRL endpoint when supporting diff queries and the "Cursor" extension.¶
6.1. Error Responses with Problem Details
Some error responses from the TRL endpoint at the AS can convey error-specific information according to the problem-details format defined in [RFC9290]. Such error responses MUST have Content-Format set to "application
An example of an error response using the problem-details format is shown in Figure 5.¶
The problem-details format in general and the Custom Problem Detail entry 'ace-trl-error' in particular are OPTIONAL to support for registered devices. A registered device supporting the entry 'ace-trl-error' and that is able to understand the specified error may use that information to determine what actions to take next.¶
6.2. Supporting Diff Queries
If the AS supports diff queries, it is able to transfer a list of diff entries, each of which is related to one update that occurred to the TRL (see Section 6). That is, when replying to a diff query performed for a requester, the AS provides the diff entries related to the most recent TRL updates pertaining to the requester.¶
The following defines how the AS builds and maintains an ordered list of diff entries, for each registered device and administrator, hereafter referred to as "requesters". In particular, a requester's diff entry associated with a TRL update contains a set of token hashes pertaining to that requester, each of which was added to the TRL or removed from the TRL at that update.¶
The AS defines the single constant positive integer MAX_N >= 1. For each requester, the AS maintains an update collection of maximum MAX_N series items, each of which is a diff entry. For each requester, the AS MUST keep track of the MAX_N most recent TRL updates pertaining to the requester. If the AS supports diff queries, the AS MUST provide requesters with the value of MAX_N upon their registration (see Section 10).¶
The series of items in the update collection MUST be strictly chronologically ordered. That is, at any point in time, the first series item is the one least recently added to the update collection and still retained by the AS; the last series item is the one most recently added to the update collection. The particular method used to achieve this is implementation specific.¶
Each time the TRL changes, the AS performs the following operations for each requester:¶
6.2.1. Supporting the "Cursor" Extension
If it supports the "Cursor" extension for diff queries, the AS also performs the following actions:¶
The AS defines the single constant unsigned integer MAX_INDEX <= ((264) - 1). The value of MAX_INDEX is REQUIRED to be at least (MAX_N - 1) and is RECOMMENDED to be at least ((232) - 1). MAX_INDEX SHOULD be orders of magnitude greater than MAX_N.¶
The following applies separately for each requester's update collection:¶
When processing a diff query using the "Cursor" extension, the values of 'index' are used as cursor information, as defined in Section 9.2.¶
For each requester's update collection, the AS also defines a constant positive integer MAX_DIFF_BATCH <= MAX_N, whose value specifies the maximum number of diff entries to be included in a single diff query response. The specific value MAY depend on the specific registered device or administrator associated with the update collection in question. If supporting the "Cursor" extension, the AS MUST provide registered devices and administrators with the corresponding value of MAX_DIFF_BATCH upon their registration (see Section 10).¶
6.3. Query Parameters
A GET request to the TRL endpoint can include the following query parameters. The AS MUST silently ignore unknown query parameters.¶
7. Full Query of the TRL
In order to produce a (notification) response to a GET request asking for a full query of the TRL, the AS performs the following actions:¶
Figure 6 provides the CDDL definition [RFC8610] of the CBOR array 'full
Figure 7 shows an example of a response from the AS following a full query request to the TRL endpoint. In this example, the AS does not support diff queries nor the "Cursor" extension; hence the 'cursor' parameter is not included in the payload of the response. Also, full token hashes are omitted for brevity.¶
8. Diff Query of the TRL
In order to produce a (notification) response to a GET request asking for a diff query of the TRL, the AS performs the following actions:¶
Note that, if the AS supports both diff queries and the related "Cursor" extension, Steps 3 and 4 defined below are extended as defined in Section 9.2.¶
Figure 8 provides the CDDL definition [RFC8610] of the CBOR array 'diff
Figure 9 shows an example of a response from the AS following a diff query request to the TRL endpoint, where U = 3 diff entries are included. In this example, the AS does not support the "Cursor" extension; hence, the 'cursor' parameter and the 'more' parameter are not included in the payload of the response. Also, full token hashes are omitted for brevity.¶
Appendix A discusses how performing a diff query of the TRL is, in fact, a usage example of the Series Transfer Pattern defined in [STP].¶
9. Response Messages when Using the "Cursor" Extension
If the AS supports both diff queries and the "Cursor" extension, it composes a response to a full query request or diff query request as defined in Sections 9.1 and 9.2, respectively.¶
The exact format of the response depends on:¶
Error handling and the possible resulting error responses are as defined in Section 6.3.¶
9.1. Response to Full Query
When processing a full query request to the TRL endpoint, the AS composes a response as defined in Section 7.¶
In particular, the 'cursor' parameter included in the CBOR map carried in the response payload specifies either the CBOR simple value null (0xf6) or a CBOR unsigned integer.¶
The 'cursor' parameter MUST encode the CBOR simple value null (0xf6) in case there are currently no TRL updates pertaining to the requester, i.e., the update collection for that requester is empty. This is the case from when the requester registers at the AS until the first update pertaining to that requester occurs to the TRL.¶
Otherwise, the 'cursor' parameter MUST encode a CBOR unsigned integer. The unsigned integer MUST take the 'index' value of the last series item in the update collection associated with the requester (see Section 6.2.1) as corresponding to the most recent TRL update pertaining to the requester. In fact, such a value is the current value of 'last_index' for the update collection associated with the requester.¶
9.2. Response to Diff Query
When processing a diff query request to the TRL endpoint, the AS composes a response as defined in the following subsections.¶
9.2.1. Empty Update Collection
If the update collection associated with the requester has no elements, the AS returns a 2.05 (Content) response. The response MUST have Content-Format set to "application
Note that the above applies when the update collection associated with the requester has no elements, regardless of whether or not the 'cursor' query parameter is included in the diff query request and irrespective of the specified unsigned integer value if present.¶
9.2.2. Cursor Not Included in the Diff Query Request
If the update collection associated with the requester is not empty and the diff query request does not include the 'cursor' query parameter, the AS performs the actions defined in Section 8, with the following differences:¶
If the 'more' parameter in the payload of the received 2.05 (Content) response has a value of true, the requester can send a follow-up diff query request including the 'cursor' query parameter with the same value of the 'cursor' parameter specified in this diff query response. As defined in Section 9.2.3, this would result in the AS transferring the following subset of series items as diff entries, thus resuming from where interrupted in the previous transfer.¶
9.2.3. Cursor Included in the Diff Query Request
If the update collection associated with the requester is not empty and the diff query request includes the 'cursor' query parameter with value P, the AS proceeds as follows, depending on which of the following two cases hold:¶
- Case A:
-
The series item X with 'index' having value P and the series item Y with 'index' having value (P + 1) % (MAX_INDEX + 1) are both not found in the update collection associated with the requester. This occurs when the item Y (and possibly further ones after it) has been previously removed from the update collection for that requester (see Step 5 at Section 6.2).¶
In this case, the AS returns a 2.05 (Content) response. The response MUST have Content-Format set to "application
/ace -trl+cbor", and its payload MUST be a CBOR map formatted as follows:¶ With the combination ('cursor', 'more') = (
null,true), the AS is indicating that the update collection is, in fact, not empty, but that one or more series items have been lost due to their removal. These include the item with 'index' value (P + 1) % (MAX_INDEX + 1) that the requester wished to obtain as the first one following the specified reference point with 'index' value P.¶When receiving this diff query response, the requester SHOULD send a new full query request to the AS. A successful response provides the requester with the full current pertaining subset of the TRL as well as a valid value of the 'cursor' parameter (see Section 9.1) to be, possibly, used as query parameter in a following diff query request.¶
- Case B:
-
The series item X with 'index' having value P is found in the update collection associated with the requester, or instead the series item X is not found and the series item Y with 'index' having value (P + 1) % (MAX_INDEX + 1) is found in the update collection associated with the requester.¶
In this case, the AS performs the actions defined in Section 8 with the following differences:¶
If the 'more' parameter in the payload of the received 2.05 (Content) response has value
true, the requester can send a follow-up diff query request including the 'cursor' query parameter with the same value of the 'cursor' parameter specified in this diff query response. This would result in the AS transferring the following subset of series items as diff entries, thus resuming from where interrupted in the previous transfer.¶
10. Registration at the Authorization Server
During the registration process at the AS, an administrator or a registered device receives the following information as part of the registration response:¶
Once the registration process is completed, the AS maintains the registration and related information until a possible deregistration occurs, hence keeping track of active administrators and registered devices. The particular way to achieve this is implementation specific. In any case, such a mechanism to maintain registrations is enforced at the AS in order to ensure that requests sent by clients to the /token endpoint (see Section 5.8 of [RFC9200]) and by RSs to the /introspect endpoint (see Section 5.9 of [RFC9200]) are processed as intended.¶
When communicating with one another, the registered devices and the AS have to use a secure communication association and be mutually authenticated (see Section 5 of [RFC9200]).¶
In the same spirit, communications between the AS and an administrator MUST be ensured to be mutually authenticated, encrypted, and integrity protected as well as protected against message replay.¶
Before starting its registration process at the AS, an administrator has to establish such a secure communication association with the AS, if they do not share one already. In particular, mutual authentication is REQUIRED during the establishment of the secure association. To this end, the administrator and the AS can rely, e.g., on establishing a TLS or DTLS secure session with mutual authentication (see [RFC8446] and [RFC9147]) or an Object Security for Constrained RESTful Environments (OSCORE) Security Context [RFC8613] by running the authenticated key exchange protocol EDHOC [RFC9528].¶
When receiving authenticated requests from the administrator for accessing the TRL endpoint, the AS can always check whether the requester is authorized to take such a role, i.e., to access the content of the whole TRL.¶
To this end, the AS may rely on a local access control list or similar, which specifies the authentication credentials of trusted, authorized administrators. In particular, the AS verifies the requester to the TRL endpoint as an authorized administrator only if the access control list includes the same authentication credential used by the requester when establishing the mutually authenticated secure communication association with the AS.¶
Further details about the registration process at the AS are out of scope for this specification. Note that the registration process is also out of the scope of the ACE framework (see Section 5.5 of [RFC9200]).¶
11. Notification of Revoked Access Tokens
Once registered at the AS, the administrator or a registered device can send a GET request to the TRL endpoint at the AS. The request can express the wish for a full query (see Section 7) or a diff query (see Section 8) of the TRL. Also, the request can include the CoAP Observe Option set to 0 (register) in order to start an observation of the TRL endpoint as per Section 3.1 of [RFC7641].¶
In case the request is successfully processed, the AS replies with a 2.05 (Content) response. In particular, if the AS supports diff queries but not the "Cursor" extension (see Sections 6.2 and 6.2.1), then the payload of the response is formatted as defined in Sections 7 or 8, in case the GET request has yielded the execution of a full query or of a diff query of the TRL, respectively. Instead, if the AS supports both diff queries and the related "Cursor" extension, then the payload of the response is formatted as defined in Section 9.¶
In case a requester does not receive a response from the TRL endpoint or it receives an error response from the TRL endpoint, the requester does not make any assumptions or draw any conclusions regarding the revocation or expiration of its pertaining access tokens. The requester MAY try again by sending a new request to the TRL endpoint.¶
When the TRL is updated (see Section 5.1), the AS sends Observe notifications to the observers whose pertaining subset of the TRL has changed. Observe notifications are sent as per Section 4.2 of [RFC7641]. If supported by the AS, an observer may configure the behavior according to which the AS sends those Observe notifications. To this end, a possible way relies on the conditional control parameter "c.pmax" defined in [COND-PARAMETERS], which can be included as a "name=value" query parameter in an Observation Request. This ensures that no more than c.pmax seconds elapse between two consecutive notifications sent to that observer, regardless of whether or not the TRL has changed.¶
Following a first exchange with the AS, an administrator or a registered device can send additional GET requests to the TRL endpoint at any time, analogously to what is defined above. When doing so, the requester towards the TRL endpoint can ask the AS to perform a full query (see Section 7) or a diff query (see Section 8) of the TRL. In the latter case, the requester can additionally rely on the "Cursor" extension (see Sections 6.3 and 9.2).¶
As specified in Section 6.2, an AS supporting diff queries maintains an update collection of maximum MAX_N series items for each administrator or registered device, hereafter referred to as a "requester". In particular, if an update collection includes MAX_N series items, adding a further series item to that update collection results in deleting the oldest series item from that update collection.¶
From then on, the requester associated with the update collection will not be able to retrieve the deleted series item when sending a new diff query request to the TRL endpoint. If that series item reflected the revocation of an access token pertaining to the requester, then the requester will not learn about that when receiving the corresponding diff query response from the AS.¶
Sending a diff query request specifically as an Observation Request, and, thus, relying on Observe notifications, largely reduces the chances for a requester to miss updates that have occurred to its associated update collection. In turn, this relies on the requester successfully receiving the Observe notification responses from the TRL (see also Section 14.3).¶
In order to limit the amount of time during which the requester is unaware of pertaining access tokens that have been revoked but are not expired yet, a requester SHOULD NOT rely solely on diff query requests. In particular, a requester SHOULD also regularly send a full query request to the TRL endpoint according to a related application policy.¶
11.1. Handling of Revoked Access Tokens and Token Hashes
When receiving a response from the TRL endpoint, a registered device MUST expunge every stored access token associated with a token hash specified in the response. In case the registered device is an RS, it MUST NOT delete the stored token hash after having expunged the associated access token.¶
If an RS uses the method defined in this document with the AS that has issued an access token, then the RS MUST NOT accept and store that access token if any of the following holds.¶
An RS MUST store the token hash th1 corresponding to an access token t1 until both the following conditions hold:¶
The RS MUST NOT delete the stored token hashes whose corresponding access tokens do not fulfill both the two conditions above, unless it becomes necessary due to memory limitations. In such a case, the RS MUST delete the earliest stored token hashes first.¶
Retaining the stored token hashes as specified above limits the impact from a (dishonest) client whose pertaining access token:¶
That is, the RS would not accept such a revoked and expired access token as long as it stores the corresponding token hash.¶
This risk can be further limited. Specifically, if token introspection is implemented by both the RS and the AS, the RS can introspect the access token (see Section 5.9 of [RFC9200]) when receiving an access token that includes the 'exi' claim and for which a corresponding token hash is not stored.¶
When, due to the stored and corresponding token hash th2, an access token t2 that includes the 'exi' claim is expunged or is not accepted upon its upload, the RS retrieves the sequence number sn2 encoded in the 'cti' claim (for CWTs) or in the 'jti' claim (for JWTs) (see Section 5.10.3 of [RFC9200]). Then, the RS stores sn2 as associated with th2. If expunging or not accepting t2 yields the deletion of th2, then the RS MUST associate sn2 with th2 before continuing with the deletion of th2.¶
When deleting any token hash, the RS checks whether the token hash is associated with a sequence number sn_th. In such a case, the RS checks whether sn_th is greater than the highest sequence number sn* among the expired access tokens including the 'exi' claim for the RS. If that is the case, sn* MUST take the value of sn_th.¶
By virtue of what is defined in Section 5.10.3 of [RFC9200], this ensures that, following the deletion of the token hash associated with an access token including the 'exi' claim and uploaded for the first time after it has been revoked and later expired, the RS will not accept the access token at that point in time or in the future.¶
12. ACE Token Revocation List Parameters
This specification defines a number of parameters that can be transported in the response from the TRL endpoint, when the response payload is a CBOR map. Note that such a response MUST use the Content-Format "application
The table below summarizes the parameters. For each of them, it specifies the value to use as CBOR key, i.e., as abbreviation in the key of the map pair for the parameter, instead of the parameter's name as a text string.¶
13. ACE Token Revocation List Error Identifiers
This specification defines a number of values that the AS can use as error identifiers. These are used in error responses with Content-Format "application
14. Security Considerations
The protocol defined in this document inherits the security considerations from the ACE framework [RFC9200] and those about the usage of CWTs from [RFC8392], the usage of JWTs from [RFC7519] and [RFC8725], the usage of CoAP Observe from [RFC7641], and the computation of the token hashes from [RFC6920]. The following considerations also apply.¶
14.1. Content Retrieval from the TRL
The AS MUST ensure that each registered device can access and retrieve only its pertaining subset of the TRL. To this end, the AS can always perform the required filtering based on the authenticated identity of the registered device, i.e., a (non-public) identifier that the AS can securely relate to the registered device and the secure association that they use to communicate.¶
The AS MUST ensure that, other than registered devices accessing their own pertaining subset of the TRL, only authorized and authenticated administrators can access the content of the whole TRL (see Section 10).¶
Note that the TRL endpoint supports only the GET method (see Section 6). Therefore, as detailed in Sections 7 and 8, access to the TRL endpoint is performed only by means of protected and authenticated GET requests, which, by definition, are safe in the REST sense and do not alter the content of the TRL. That is, registered devices and administrators can perform exclusively read-only operations when accessing the TRL endpoint.¶
In fact, the content of the TRL can be updated only internally by the AS, in the two circumstances described in Section 5.1. Therefore, an adversary that is not in control of the AS cannot manipulate the content of the TRL, e.g., by removing a token hash and thereby fraudulently allowing a client to access protected resources in spite of a revoked access token or by adding a token hash and thereby fraudulently stopping a client from accessing protected resources in spite of an access token being still valid.¶
14.2. Size of the TRL
If many non-expired access tokens associated with a registered device are revoked, the pertaining subset of the TRL could grow to a size bigger than what the registered device is prepared to handle upon reception of a response from the TRL endpoint, especially if relying on a full query of the TRL (see Section 7).¶
This could be exploited by attackers to negatively affect the behavior of a registered device. Therefore, in order to help reduce the size of the TRL, the AS SHOULD refrain from issuing access tokens with an excessively long expiration time.¶
14.3. Communication Patterns
The communication about revoked access tokens presented in this specification is expected to especially rely on CoAP Observe notifications sent from the AS to a requester (i.e., an administrator or a registered device). The suppression of those notifications by an external attacker that has access to the network would prevent requesters from ever knowing that their pertaining access tokens have been revoked.¶
In order to avoid this, a requester SHOULD NOT rely solely on the CoAP Observe notifications. In particular, a requester SHOULD also regularly poll the AS for the most current information about revoked access tokens by sending GET requests to the TRL endpoint. Specific strategies and schedules for polling the AS are to be defined by a related application policy and by taking into account the expected operational and availability patterns adopted by the requester (e.g., in the interest of energy saving and other optimizations).¶
14.4. Request of New Access Tokens
If a client stores an access token that it still believes to be valid, and it accordingly attempts to access a protected resource at the RS, the client may receive an unprotected 4.01 (Unauthorized) response from the RS.¶
This can be due to a number of causes, for example:¶
In either case, if the client believes that the access token is still valid, it SHOULD NOT immediately ask for a new access token to the AS upon receiving a 4.01 (Unauthorized) response from the RS. Instead, the client SHOULD send a request to the TRL endpoint at the AS. If the client gains knowledge that the access token is not valid anymore, the client expunges the access token and can ask for a new one. Otherwise, the client can try again to upload the same access token to the RS or request a new one.¶
14.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 access is a security violation, even if the client is not attempting to be malicious.¶
In order to minimize such a 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.¶
14.6. Preventing Unnoticed Manipulation of Access Tokens
As defined in Section 3, issued access tokens MUST NOT rely on unprotected headers to specify information as header parameters. Also, when issued access tokens are CWTs, they MUST be tagged by using the COSE CBOR tag corresponding to the used COSE object. Further, the result MUST be tagged using the CWT CBOR tag; no further tagging is performed.¶
This ensures that the RS always computes the correct token hash corresponding to an access token, i.e., the same token hash computed by the AS and C for that access token.¶
By construction, the rules defined in Section 3 prevent an active adversary from successfully performing an attack against the RS, which would otherwise be possible in case the access token is uploaded to the RS over an unprotected communication channel.¶
In such an attack, the adversary intercepts the access token en route to the RS. Then, the adversary manipulates the access token in a way that is going to be unnoticed by the RS but without preventing the successful cryptographic validation of the access token at the RS. To this end, the adversary has two possible options:¶
After that, the adversary sends the manipulated access token to the RS.¶
After having successfully validated the manipulated access token, the RS computes a corresponding token hash different from the one computed and stored by C and the AS. Finally, the RS stores the manipulated access token and the corresponding wrong token hash.¶
Later on, if the access token is revoked and the AS provides the RS with the corresponding correct token hash, the RS does not recognize the received token hash among the stored ones; therefore, the RS does not delete the revoked access token.¶
14.7. Two Token Hashes at the RS Using JWTs
Section 4.3.2 specifies that an RS using JWTs as access tokens has to compute and store two token hashes associated with the same access token. This is because the RS does not know for sure if the AS provided the access token to the client by means of an AS-to-Client response encoded in CBOR or in JSON.¶
Taking advantage of that, a dishonest client can attempt to perform an attack against the RS. That is, the client can first receive the JWT in an AS-to-Client response encoded in CBOR (JSON). Then, the client can upload the JWT to the RS in a way that makes the RS believe that the client instead received the JWT in an AS-to-Client response encoded in JSON (CBOR).¶
Consequently, the RS considers a HASH_INPUT different from the one considered by the AS and the client (see Section 4.2). Hence, the RS computes a token hash h' different from the token hash h computed by the AS and the client. It follows that, if the AS revokes the access token and advertises the right token hash h, then the RS will not learn about the access token revocation; therefore, the RS will not delete the access token.¶
Fundamentally, this would happen because the HASH_INPUT used to compute the token hash of a JWT depends on whether the AS-to-Client response is encoded in CBOR or in JSON. This makes the RS vulnerable to the attack described above when JWTs are used as access tokens. However, this is not a problem if the access token is a CWT, since the HASH_INPUT used to compute the token hash of a CWT does not depend on whether the AS-to-Client response is encoded in CBOR or in JSON.¶
While this asymmetry cannot be avoided altogether, the method defined for the AS and the client in Section 4.2 deliberately penalizes the case where the RS uses JWTs as access tokens. In such a case, the RS effectively neutralizes the attack described above by computing and storing two token hashes associated with the same access token (see Section 4.3.2).¶
Conversely, this design deliberately favors the case where the RS uses CWTs as access tokens, which is a preferable option for resource
14.8. Additional Security Measures
By accessing the TRL at the AS, registered devices and administrators are able to learn that their pertaining access tokens have been revoked. However, they cannot learn the reason why, including when that reason is the compromise, misbehavior, or decommissioning of a registered device.¶
In fact, even the AS might not know that a registered device to which a revoked access token pertains has been specifically compromised, misbehaving, or decommissioned. At the same time, it might not be acceptable to only revoke the access tokens pertaining to such a registered device.¶
Therefore, in order to preserve the security of the system and application, the entity that authoritatively declares a registered device to be compromised, misbehaving, or decommissioned should also promptly trigger the execution of additional revocation processes as deemed appropriate. These include, for instance:¶
The methods by which these processes are triggered and carried out are out of the scope of this document.¶
15. IANA Considerations
The IANA actions for this document are described in the following subsections.¶
15.1. Media Type Registrations
IANA has registered the media type "application
- Type name:
- application¶
- Subtype name:
- ace-trl+cbor¶
- Required parameters:
- N/A¶
- Optional parameters:
- N/A¶
- Encoding considerations:
- Must be encoded as a CBOR map containing the protocol parameters defined in RFC 9770.¶
- Security considerations:
- See Section 14 of RFC 9770.¶
- Interoperability considerations:
- N/A¶
- Published specification:
- RFC 9770¶
- Applications that use this media type:
- The type is used by authorization servers, clients, and RSs that support the notification of revoked access tokens according to a Token Revocation List maintained by the authorization server as specified in RFC 9770.¶
- Fragment identifier considerations:
- N/A¶
- Additional information:
- N/A¶
- Person & email address to contact for further information:
- ACE WG mailing list (ace@ietf.org) or IETF Applications and Real-Time Area (art@ietf.org)¶
- Intended usage:
- COMMON¶
- Restrictions on usage:
- None¶
- Author/Change controller:
- IETF¶
15.2. CoAP Content-Formats Registry
IANA has registered the following entry to the "CoAP Content
15.3. Custom Problem Detail Keys Registry
IANA has registered the following entry in the "Custom Problem Detail Keys" registry within the "Constrained RESTful Environments (CoRE) Parameters" registry group.¶
15.4. ACE Token Revocation List Parameters Registry
IANA has established the "ACE Token Revocation List Parameters" registry within the "Authentication and Authorization for Constrained Environments (ACE)" registry group.¶
One of the following registration policies is used: "Standards Action With Expert Review", "Specification Required" per Section 4.6 of [RFC8126], or "Expert Review" per Section 4.5 of [RFC8126]. Expert Review guidelines are provided in Section 15.6.¶
All assignments according to "Standards Action With Expert Review" are made on a "Standards Action" basis per Section 4.9 of [RFC8126] with Expert Review additionally required per Section 4.5 of [RFC8126]. The procedure for early IANA allocation of Standards Track code points defined in [RFC7120] also applies. When such a procedure is used, IANA will ask the designated expert(s) to approve the early allocation before registration. In addition, WG chairs are encouraged to consult the expert(s) early during the process outlined in Section 3.1 of [RFC7120].¶
The columns of this registry are as follows:¶
This registry has been initially populated by the values in Section 12. The "Reference" column for all of these entries refers to this document.¶
15.5. ACE Token Revocation List Errors
IANA has established the "ACE Token Revocation List Errors" registry within the "Authentication and Authorization for Constrained Environments (ACE)" registry group.¶
One of the following registration policies is used: "Standards Action With Expert Review", "Specification Required" per Section 4.6 of [RFC8126], or "Expert Review" per Section 4.5 of [RFC8126]. Expert Review guidelines are provided in Section 15.6.¶
All assignments according to "Standards Action With Expert Review" are made on a "Standards Action" basis per Section 4.9 of [RFC8126] with Expert Review additionally required per Section 4.5 of [RFC8126]. The procedure for early IANA allocation of Standards Track code points defined in [RFC7120] also applies. When such a procedure is used, IANA will ask the designated expert(s) to approve the early allocation before registration. In addition, WG chairs are encouraged to consult the expert(s) early during the process outlined in Section 3.1 of [RFC7120].¶
The columns of this registry are as follows:¶
This registry has been initially populated by the values in Section 13. The "Reference" column for all of these entries refers to this document.¶
15.6. Expert Review Instructions
The IANA registries established by this document use "Standards Action With Expert Review", "Specification Required", or "Expert Review" registration procedures depending on the range of values for which an assignment is requested. This section gives some general guidelines for what the experts should be looking for, but they are being designated as experts for a reason, so they should be given substantial latitude.¶
Expert reviewers should take into consideration the following points:¶
16. References
16.1. Normative References
- [IANA
.Hash .Algorithms] -
IANA, "Named Information Hash Algorithm Registry", <https://
www >..iana .org /assignments /named -information - [RFC2119]
-
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10
.17487 , , <https:///RFC2119 www >..rfc -editor .org /info /rfc2119 - [RFC3629]
-
Yergeau, F., "UTF-8, a transformation format of ISO 10646", STD 63, RFC 3629, DOI 10
.17487 , , <https:///RFC3629 www >..rfc -editor .org /info /rfc3629 - [RFC4648]
-
Josefsson, S., "The Base16, Base32, and Base64 Data Encodings", RFC 4648, DOI 10
.17487 , , <https:///RFC4648 www >..rfc -editor .org /info /rfc4648 - [RFC6347]
-
Rescorla, E. and N. Modadugu, "Datagram Transport Layer Security Version 1.2", RFC 6347, DOI 10
.17487 , , <https:///RFC6347 www >..rfc -editor .org /info /rfc6347 - [RFC6749]
-
Hardt, D., Ed., "The OAuth 2.0 Authorization Framework", RFC 6749, DOI 10
.17487 , , <https:///RFC6749 www >..rfc -editor .org /info /rfc6749 - [RFC6838]
-
Freed, N., Klensin, J., and T. Hansen, "Media Type Specifications and Registration Procedures", BCP 13, RFC 6838, DOI 10
.17487 , , <https:///RFC6838 www >..rfc -editor .org /info /rfc6838 - [RFC6920]
-
Farrell, S., Kutscher, D., Dannewitz, C., Ohlman, B., Keranen, A., and P. Hallam-Baker, "Naming Things with Hashes", RFC 6920, DOI 10
.17487 , , <https:///RFC6920 www >..rfc -editor .org /info /rfc6920 - [RFC7120]
-
Cotton, M., "Early IANA Allocation of Standards Track Code Points", BCP 100, RFC 7120, DOI 10
.17487 , , <https:///RFC7120 www >..rfc -editor .org /info /rfc7120 - [RFC7252]
-
Shelby, Z., Hartke, K., and C. Bormann, "The Constrained Application Protocol (CoAP)", RFC 7252, DOI 10
.17487 , , <https:///RFC7252 www >..rfc -editor .org /info /rfc7252 - [RFC7515]
-
Jones, M., Bradley, J., and N. Sakimura, "JSON Web Signature (JWS)", RFC 7515, DOI 10
.17487 , , <https:///RFC7515 www >..rfc -editor .org /info /rfc7515 - [RFC7516]
-
Jones, M. and J. Hildebrand, "JSON Web Encryption (JWE)", RFC 7516, DOI 10
.17487 , , <https:///RFC7516 www >..rfc -editor .org /info /rfc7516 - [RFC7519]
-
Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token (JWT)", RFC 7519, DOI 10
.17487 , , <https:///RFC7519 www >..rfc -editor .org /info /rfc7519 - [RFC7641]
-
Hartke, K., "Observing Resources in the Constrained Application Protocol (CoAP)", RFC 7641, DOI 10
.17487 , , <https:///RFC7641 www >..rfc -editor .org /info /rfc7641 - [RFC8126]
-
Cotton, M., Leiba, B., and T. Narten, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 8126, DOI 10
.17487 , , <https:///RFC8126 www >..rfc -editor .org /info /rfc8126 - [RFC8174]
-
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10
.17487 , , <https:///RFC8174 www >..rfc -editor .org /info /rfc8174 - [RFC8259]
-
Bray, T., Ed., "The JavaScript Object Notation (JSON) Data Interchange Format", STD 90, RFC 8259, DOI 10
.17487 , , <https:///RFC8259 www >..rfc -editor .org /info /rfc8259 - [RFC8392]
-
Jones, M., Wahlstroem, E., Erdtman, S., and H. Tschofenig, "CBOR Web Token (CWT)", RFC 8392, DOI 10
.17487 , , <https:///RFC8392 www >..rfc -editor .org /info /rfc8392 - [RFC8446]
-
Rescorla, E., "The Transport Layer Security (TLS) Protocol Version 1.3", RFC 8446, DOI 10
.17487 , , <https:///RFC8446 www >..rfc -editor .org /info /rfc8446 - [RFC8610]
-
Birkholz, H., Vigano, C., and C. Bormann, "Concise Data Definition Language (CDDL): A Notational Convention to Express Concise Binary Object Representation (CBOR) and JSON Data Structures", RFC 8610, DOI 10
.17487 , , <https:///RFC8610 www >..rfc -editor .org /info /rfc8610 - [RFC8613]
-
Selander, G., Mattsson, J., Palombini, F., and L. Seitz, "Object Security for Constrained RESTful Environments (OSCORE)", RFC 8613, DOI 10
.17487 , , <https:///RFC8613 www >..rfc -editor .org /info /rfc8613 - [RFC8725]
-
Sheffer, Y., Hardt, D., and M. Jones, "JSON Web Token Best Current Practices", BCP 225, RFC 8725, DOI 10
.17487 , , <https:///RFC8725 www >..rfc -editor .org /info /rfc8725 - [RFC8949]
-
Bormann, C. and P. Hoffman, "Concise Binary Object Representation (CBOR)", STD 94, RFC 8949, DOI 10
.17487 , , <https:///RFC8949 www >..rfc -editor .org /info /rfc8949 - [RFC9052]
-
Schaad, J., "CBOR Object Signing and Encryption (COSE): Structures and Process", STD 96, RFC 9052, DOI 10
.17487 , , <https:///RFC9052 www >..rfc -editor .org /info /rfc9052 - [RFC9147]
-
Rescorla, E., Tschofenig, H., and N. Modadugu, "The Datagram Transport Layer Security (DTLS) Protocol Version 1.3", RFC 9147, DOI 10
.17487 , , <https:///RFC9147 www >..rfc -editor .org /info /rfc9147 - [RFC9200]
-
Seitz, L., Selander, G., Wahlstroem, E., Erdtman, S., and H. Tschofenig, "Authentication and Authorization for Constrained Environments Using the OAuth 2.0 Framework (ACE-OAuth)", RFC 9200, DOI 10
.17487 , , <https:///RFC9200 www >..rfc -editor .org /info /rfc9200 - [RFC9202]
-
Gerdes, S., Bergmann, O., Bormann, C., Selander, G., and L. Seitz, "Datagram Transport Layer Security (DTLS) Profile for Authentication and Authorization for Constrained Environments (ACE)", RFC 9202, DOI 10
.17487 , , <https:///RFC9202 www >..rfc -editor .org /info /rfc9202 - [RFC9203]
-
Palombini, F., Seitz, L., Selander, G., and M. Gunnarsson, "The Object Security for Constrained RESTful Environments (OSCORE) Profile of the Authentication and Authorization for Constrained Environments (ACE) Framework", RFC 9203, DOI 10
.17487 , , <https:///RFC9203 www >..rfc -editor .org /info /rfc9203 - [RFC9290]
-
Fossati, T. and C. Bormann, "Concise Problem Details for Constrained Application Protocol (CoAP) APIs", RFC 9290, DOI 10
.17487 , , <https:///RFC9290 www >..rfc -editor .org /info /rfc9290 - [RFC9431]
-
Sengul, C. and A. Kirby, "Message Queuing Telemetry Transport (MQTT) and Transport Layer Security (TLS) Profile of Authentication and Authorization for Constrained Environments (ACE) Framework", RFC 9431, DOI 10
.17487 , , <https:///RFC9431 www >..rfc -editor .org /info /rfc9431 - [RFC9528]
-
Selander, G., Preuß Mattsson, J., and F. Palombini, "Ephemeral Diffie-Hellman Over COSE (EDHOC)", RFC 9528, DOI 10
.17487 , , <https:///RFC9528 www >..rfc -editor .org /info /rfc9528 - [SHA-256]
-
NIST, "Secure Hash Standard", NIST FIPS PUB 180-4, DOI 10
.6028 , , <https:///NIST .FIPS .180 -4 nvlpubs >..nist .gov /nistpubs /FIPS /NIST .FIPS .180 -4 .pdf
16.2. Informative References
- [COND
-PARAMETERS] -
Silverajan, B., Koster, M., and A. Soloway, "Conditional Query Parameters for CoAP Observe", Work in Progress, Internet-Draft, draft
-ietf , , <https://-core -conditional -attributes -11 datatracker >..ietf .org /doc /html /draft -ietf -core -conditional -attributes -11 - [RFC7009]
-
Lodderstedt, T., Ed., Dronia, S., and M. Scurtescu, "OAuth 2.0 Token Revocation", RFC 7009, DOI 10
.17487 , , <https:///RFC7009 www >..rfc -editor .org /info /rfc7009 - [STP]
-
Bormann, C. and K. Hartke, "The Series Transfer Pattern (STP)", Work in Progress, Internet-Draft, draft
-bormann , , <https://-t2trg -stp -03 datatracker >..ietf .org /doc /html /draft -bormann -t2trg -stp -03
Appendix A. On Using the Series Transfer Pattern
Performing a diff query of the TRL as specified in Section 8 is, in fact, a usage example of the Series Transfer Pattern (STP) defined in [STP].¶
That is, a diff query enables the transfer of a series of diff entries with the AS providing U <= MAX_N diff entries as related to the U most recent TRL updates pertaining to a requester, i.e., a registered device or an administrator.¶
When responding to a diff query request from a requester (see Section 8), 'diff_set' is a subset of the update collection associated with the requester where each 'diff_entry' record is a series item from that update collection. Note that 'diff_set' specifies the whole current update collection when the value of U is equal to SIZE, i.e., the current number of series items in the update collection.¶
The value N of the 'diff' query parameter in the GET request allows the requester and the AS to trade the amount of provided information with the latency of the information transfer.¶
Since the update collection associated with each requester includes up to MAX_N series items, the AS deletes the oldest series item when a new one is generated and added to the end of the update collection, due to a new TRL update pertaining to that requester (see Section 6.2). This addresses the question "When can the server decide to no longer retain older items?" raised in Section 3.2 of [STP].¶
Furthermore, performing a diff query of the TRL together with the "Cursor" extension as specified in Section 9 relies, in fact, on the "cursor" pattern of the STP (see Section 3.3 of [STP]).¶
Appendix B. Local Supportive Parameters of the TRL Endpoint
Table 3 provides an aggregated overview of the local supportive parameters that the AS internally uses at its TRL endpoint when supporting diff queries (see Section 6) and the "Cursor" extension (see Section 6.2.1).¶
Except for MAX_N defined in Section 6.2, all the other parameters are defined in Section 6.2.1 and are used only if the AS supports the "Cursor" extension.¶
For each parameter, the columns of the table provide the following information. Both a registered device and an administrator are referred to as "requester".¶
- Name:
- The parameter name. A name with letters in uppercase denotes a parameter whose value does not change after its initialization.¶
- Single instance:
- "Y" if there is a single parameter instance associated with the TRL or "N" if there is one parameter instance per update collection (i.e., per requester).¶
- Description:
- A short description of the parameter.¶
- Values:
- The unsigned integer values that the parameter can assume, where LB and UB denote the inclusive lower bound and upper bound, respectively.¶
Appendix C. Interaction Examples
This section provides examples of interactions between an RS as a registered device and an AS. In the examples, all the access tokens issued by the AS are intended to be consumed by the considered RS.¶
The AS supports both full queries and diff queries of the TRL, as defined in Sections 7 and 8, respectively.¶
The RS registration is assumed to be done by the RS sending a POST request with an unspecified payload to the AS, which replies with a 2.01 (Created) response. The payload of the registration response is assumed to be a CBOR map, which, in turn, is assumed to include the following entries:¶
Furthermore, 'h(x)' refers to the hash function used to compute the token hashes, as defined in Section 4 of this specification and according to [RFC6920]. Assuming the usage of CWTs transported in AS-to-Client responses encoded in CBOR (see Section 4.2.1), 'bstr.h(t1)' and 'bstr.h(t2)' denote CBOR byte strings, whose values are the token hashes of the access tokens t1 and t2, respectively.¶
C.1. Full Query with Observe
Figure 10 shows an interaction example of a CoAP observation and a full query of the TRL.¶
In this example, the AS does not support the "Cursor" extension. Hence, the 'cursor' parameter is not included in the payload of the responses to a full query request.¶
C.2. Diff Query with Observe
Figure 11 shows an interaction example of a CoAP observation and a diff query of the TRL.¶
The RS indicates N = 3 as the value of the 'diff' query parameter, i.e., as the maximum number of diff entries to be included in a response from the AS.¶
In this example, the AS does not support the "Cursor" extension. Hence, the 'cursor' parameter and the 'more' parameter are not included in the payload of the responses to a diff query request.¶
C.3. Full Query with Observe and Diff Query
Figure 12 shows an interaction example of a CoAP observation and a full query of the TRL.¶
The example also shows one of the notifications from the AS getting lost in transmission; thus, that notification does not reach the RS.¶
When this happens, and after a waiting time defined by the application has elapsed, the RS sends a GET request with no Observe Option to the AS, asking the AS to perform a diff query of the TRL. The RS indicates N = 8 as the value of the 'diff' query parameter, i.e., as the maximum number of diff entries to be included in a response from the AS.¶
In this example, the AS does not support the "Cursor" extension. Hence, the 'cursor' parameter is not included in the payload of the responses to a full query request. Also, the 'cursor' parameter and the 'more' parameter are not included in the payload of the responses to a diff query request.¶
C.4. Diff Query with Observe and "Cursor" Extension
In this example, the AS supports the "Cursor" extension. Hence, the CBOR map conveyed as payload of the registration response additionally includes a "max
Figure 13 shows an interaction example of a CoAP observation and a diff query of the TRL.¶
The RS specifies the 'diff' query parameter with a value of 3, i.e., the maximum number of diff entries to be included in a response from the AS.¶
If the RS has not received a notification from the AS for a waiting time defined by the application, the RS sends a GET request with no Observe Option to the AS, asking the AS to perform a diff query of the TRL.¶
This is followed up by a further diff query request that includes the 'cursor' query parameter. Note that the payload of the corresponding response differs from the payload of the response to the previous diff query request.¶
C.5. Full Query with Observe and Diff Query with "Cursor" Extension
In this example, the AS supports the "Cursor" extension. Hence, the CBOR map conveyed as payload of the registration response additionally includes a "max
Figure 14 shows an interaction example of a CoAP observation and a full query of the TRL.¶
The example also shows some of the notifications from the AS getting lost in transmission; thus, those notifications do not reach the RS.¶
When this happens, and after a waiting time defined by the application has elapsed, the RS sends a GET request with no Observe Option to the AS, asking the AS to perform a diff query of the TRL. In particular, the RS specifies:¶
The response from the AS conveys a first batch of MAX_DIFF_BATCH = 5 series items from the update collection corresponding to the RS. The AS indicates that further series items are actually available in the update collection by setting the 'more' parameter of the response to true. Also, the 'cursor' parameter of the response is set to 7, i.e., to the 'index' value of the most recent series item included in the response.¶
After that, the RS follows up with a further diff query request including the 'cursor' query parameter with a value of 7 in order to retrieve the next and last batch of series items from the update collection.¶
Acknowledgments
Ludwig Seitz contributed as a coauthor of initial versions of this document.¶
The authors sincerely thank Christian Amsüss, Carsten Bormann, Deb Cooley, Roman Danyliw, Dhruv Dhody, Rikard Höglund, Benjamin Kaduk, David Navarro, Joerg Ott, Marco Rasori, Michael Richardson, Kyle Rose, Zaheduzzaman Sarker, Jim Schaad, Göran Selander, Travis Spencer, Orie Steele, Éric Vyncke, Niklas Widell, Dale Worley, and Paul Wouters for their comments and feedback.¶
The work on this document has been partly supported by the Sweden's Innovation Agency VINNOVA and the Celtic-Next projects CRITISEC and CYPRESS; and by the H2020 project SIFIS-Home (Grant agreement 952652).¶