<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>

<rfc xmlns:xi="http://www.w3.org/2001/XInclude" 
ipr="trust200902" 
docName="draft-ietf-ace-key-groupcomm-18" 
number="9594"
category="std" 
consensus="true" 
submissionType="IETF" 
updates=""
obsoletes=""
tocDepth="4" 
tocInclude="true" 
sortRefs="true" 
symRefs="true" 
version="3"
xml:lang="en">

  <front>

<!--[rfced] Please note that the title of the document has been updated as
follows. Abbreviations have been expanded per Section 3.6 of RFC 7322 ("RFC
Style Guide"). Please review.

Original:
Key Provisioning for Group Communication using ACE

Current:
Key Provisioning for Group Communication Using Authentication and Authorization
for Constrained Environments (ACE)
-->    
    
    <title abbrev="Key Provisioning for Group Communication">Key Provisioning for Group Communication Using Authentication and Authorization for Constrained Environments (ACE)</title>
    <seriesInfo name="RFC" value="9594"/>
    <author initials="F." surname="Palombini" fullname="Francesca Palombini">
      <organization>Ericsson AB</organization>
      <address>
        <postal>
          <street>Torshamnsgatan 23</street>
          <city>Kista, Stockholm</city>
          <code>16440</code>
          <country>Sweden</country>
        </postal>
        <email>francesca.palombini@ericsson.com</email>
      </address>
    </author>
    <author initials="M." surname="Tiloca" fullname="Marco Tiloca">
      <organization>RISE AB</organization>
      <address>
        <postal>
          <street>Isafjordsgatan 22</street>
          <city>Kista, Stockholm</city>
	  <code>16440</code>
          <country>Sweden</country>
        </postal>
        <email>marco.tiloca@ri.se</email>
      </address>
    </author>

    <date year="2024" month="July"/>

    <area>sec</area>
    <workgroup>ace</workgroup>

<!--[rfced] Please insert any keywords (beyond those that appear in
the title) for use on https://www.rfc-editor.org/search. -->

<keyword>example</keyword>

    <abstract>
      <t>This document defines how to use the Authentication and Authorization for Constrained Environments (ACE) framework to distribute keying material and configuration parameters for secure group communication. Candidate group members that act as Clients and are authorized to join a group can do so by interacting with a Key Distribution Center (KDC) acting as the Resource Server, from which they obtain the keying material to communicate with other group members. While defining general message formats as well as the interface and operations available at the KDC, this document supports different approaches and protocols for secure group communication. Therefore, details are delegated to separate application profiles of this document as specialized instances that target a particular group communication approach and define how communications in the group are protected. Compliance requirements for such application profiles are also specified.</t>
    </abstract>
  </front>
  <middle>
    <section anchor="intro">
      <name>Introduction</name>
      <t>This document builds on the Authentication and Authorization for Constrained Environments (ACE) framework and defines how to request, distribute, and renew keying material and configuration parameters to protect message exchanges in a group communication environment.</t>
      <t>Candidate group members that act as ACE Clients and are authorized to join a group can interact with the Key Distribution Center (KDC) acting as the ACE Resource Server that is responsible for that group in order to obtain the necessary keying material and parameters to communicate with other group members.</t>
      <t>In particular, this document defines the operations and interface available at the KDC, as well as general message formats for the interactions between Clients and the KDC. At the same time, communications in the group can rely on different approaches, e.g., based on multicast <xref target="I-D.ietf-core-groupcomm-bis"/> or publish-subscribe (pub-sub) messaging <xref target="I-D.ietf-core-coap-pubsub"/>, and can be protected in different ways.</t>
      <t>Therefore, this document delegates details on the communication and security approaches used in a group to separate application profiles. These are specialized instances of this document that target a particular group communication approach and define how communications in the group are protected, as well as the specific keying material and configuration parameters provided to group members.</t>
      <t>In order to ensure consistency and aid the development of such application profiles, <xref target="req"/> of this document defines a number of related compliance requirements. In particular, <xref target="req-mandatory"/> compiles the requirements that application profiles are <bcp14>REQUIRED</bcp14> to fulfill; these are referred to by an identifier that starts with "REQ". Instead, <xref target="req-optional"/> compiles the requirements that application profiles <bcp14>MAY</bcp14> fulfill; these are referred to by an identifier that starts with "OPT".</t>
      <t>New keying material is intended to be generated and distributed to the group upon membership changes (rekeying). If the application requires backward security (i.e., new group members must be prevented from accessing communications in the group prior to their joining), then a rekeying has to occur every time new members join the group. If the application requires forward security (i.e., former group members must be prevented from accessing communications in the group after their leaving), then a rekeying has to occur every time current members leave or are evicted from the group.</t>
      <t>A group rekeying scheme performs the actual distribution of the new keying material by rekeying the current group members when a new Client joins the group and rekeying the remaining group members when a Client leaves the group. This can rely on different approaches, including efficient group rekeying schemes such as those described in <xref target="RFC2093"/>, <xref target="RFC2094"/>, and <xref target="RFC2627"/>.</t>
      <t>Consistently with what is recommended in the ACE framework, this document uses Concise Binary Object Representation (CBOR) <xref target="RFC8949"/> for data encoding. However, using JSON <xref target="RFC8259"/> instead of CBOR is possible by relying on the conversion method specified in Sections <xref target="RFC8949" section="6.1" sectionFormat="bare"/> and <xref target="RFC8949" section="6.2" sectionFormat="bare"/> of <xref target="RFC8949"/>.</t>
      <section anchor="terminology">
        <name>Terminology</name>
        <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>
        <t>Readers are expected to be familiar with the following:</t>
        <ul spacing="normal">
          <li>The terms and concepts described in the ACE framework <xref target="RFC9200"/> and in the Authorization Information Format (AIF) <xref target="RFC9237"/> to express authorization information. The terminology for entities in the considered architecture is defined in OAuth 2.0 <xref target="RFC6749"/>. In particular, this includes Client (C), Resource Server (RS), and Authorization Server (AS).</li>
          <li>The terms and concepts described in the Constrained Application Protocol (CoAP) <xref target="RFC7252"/>. Unless otherwise indicated, the term "endpoint" is used here following its OAuth definition, aimed at denoting resources such as /token and /introspect at the AS  and /authz-info at the RS. This document does not use the CoAP definition of "endpoint", which is "An entity participating in the CoAP protocol".</li>
          <li>The terms and concepts described in Concise Data Definition Language (CDDL) <xref target="RFC8610"/>, CBOR <xref target="RFC8949"/>, and CBOR Object Signing and Encryption (COSE) <xref target="RFC9052"/> <xref target="RFC9053"/> <xref target="RFC9338"/>.</li>
        </ul>
        <t>A node interested in participating in group communication, as well as one that is already participating as a group member, is interchangeably denoted as "Client".</t>
        <t>This document also uses the following terms.</t>
        <dl spacing="normal">
        
            <dt>Group:</dt><dd><t>A set of nodes that share common keying material and security parameters used to protect their communications with one another. That is, the term refers to a "security group".</t>
            <t>
This term is not to be confused with an "application group", which has relevance at the application level and whose members share a common pool of resources or content. Examples of application groups are the set of all nodes deployed in a same physical room or the set of nodes registered to a pub-sub topic.  </t>
            <t>
This term is also not to be confused with a "multicast group", which has relevance at the network level and whose members all listen to a group network address for receiving messages sent to that group. An example of a multicast group is the set of nodes that are configured to receive messages that are sent to the group's associated IP multicast address.  </t>
            <t>
The same security group might be associated with multiple application groups. Also, the same application group can be associated with multiple security groups. Further details and considerations on the mapping between the three types of groups are out of the scope of this document.</t>
          </dd>
          <dt>Key Distribution Center (KDC):</dt>
	  <dd>The entity responsible for managing one or multiple groups, with particular reference to the group membership and the keying material to use for protecting group communications.</dd>
        </dl>

        <t>Furthermore, this document uses "names" or "identifiers" for groups and nodes. Their different meanings are summarized below.</t>

        <dl spacing="normal">
          <dt>Group name:</dt><dd>The identifier of a group as a text string encoded as UTF-8 <xref target="RFC3629"/>. Once established, it is invariant. It is used in the interactions between the Client, AS, and RS to identify a group. A group name is always unique among the group names of the existing groups under the same KDC.</dd>
          <dt>GROUPNAME:</dt><dd>The text string used in URIs to identify a group. Once established, it is invariant. GROUPNAME uniquely maps to the group name of a group, although they do not necessarily coincide.</dd>
          <dt>Group identifier:</dt><dd>The identifier of the group keying material used in a group. Unlike group name and GROUPNAME, this identifier changes over time when the group keying material is updated.</dd>
          <dt>Node name:</dt><dd>The identifier of a node as a text string encoded as UTF-8 <xref target="RFC3629"/> and consistent with the semantics of URI path segments (see <xref section="3.3" sectionFormat="of" target="RFC3986"/>). Once established, it is invariant. It is used in the interactions between the Client and RS, as well as to identify a member of a group. A node name is always unique among the node names of the current nodes within a group.</dd>
          <dt>NODENAME:</dt><dd>The text string used in URIs to identify a member of a group. Once established, it is invariant. Its value coincides with the node name of the associated group member.</dd>
        </dl>

        <t>This document additionally uses the following terminology:</t>
        <dl spacing="normal">
          <dt>Transport profile:</dt><dd>A profile of an ACE as per <xref section="5.8.4.3" sectionFormat="of" target="RFC9200"/>. 
<!--[rfced] "etc." can be used after a list of two or more items.
So, is there another item that can be added to
"... if it supports proof-of-possession access tokens, etc."?

Original:
      A transport profile specifies the communication
      protocol and communication security protocol between an ACE Client
      and Resource Server, as well as proof-of-possession methods, if it
      supports proof-of-possession access tokens, etc.
-->
A transport profile specifies the communication protocol and communication security protocol between an ACE Client and Resource Server, as well as proof-of-possession methods if it supports proof-of-possession access tokens, etc. Transport profiles of ACE include, for instance, those described in <xref target="RFC9202"/>, <xref target="RFC9203"/>, and <xref target="RFC9431"/>.</dd>
          <dt>Application profile:</dt><dd>A profile that defines how applications enforce and use supporting security services they require. These services may include, for instance, provisioning, revocation, and distribution of keying material. An application profile may define specific procedures and message formats.</dd>
          <dt>Authentication credential:</dt><dd>The set of information associated with an entity, including that entity's public key and parameters associated with the public key. Examples of authentication credentials are CBOR Web Tokens (CWTs), CWT Claims Sets (CCSs) <xref target="RFC8392"/>, X.509 certificates <xref target="RFC5280"/>, and C509 certificates <xref target="I-D.ietf-cose-cbor-encoded-cert"/>.</dd>
          <dt>Individual keying material:</dt><dd>Information pertaining exclusively to a group member, as associated with its group membership and related to other keying material and parameters used in the group. For example, this can be an identifier that the secure communication protocol employs to uniquely identify a node as a group member (e.g., a cryptographic key identifier uniquely associated with the group member in question). The specific nature and format of individual keying material used in a group is defined in the application profiles of this specification. The individual keying material of a group member is not related to the secure association between that group member and the KDC.</dd>
        </dl>

        <t>Examples throughout this document are expressed in CBOR diagnostic notation without the tag and value abbreviations.</t>
      </section>
    </section>
    <section anchor="overview">
      <name>Overview</name>
      <t>At a high level, the key provisioning process is separated in two phases: the first one follows the ACE Framework between the Client, AS, and KDC and the second one is the actual key distribution between the Client and KDC. After the two phases are completed, the Client is able to participate in the group communication via a Dispatcher entity.</t>

<!--[rfced] The SVG has the width and height specified, which makes
the artwork not scale. We suggest that scaling be enabled. Scaling 
will allow the figure to be resized when it is viewed on a mobile
device; however, there may be aesthetic trade-offs (e.g., image may
appear too large on a desktop screen or different figures may scale
differently based on their relative sizes).

Please review Figures 1, 34, and 35 in the HTML and PDF files and 
let us know how you'd like to proceed.

The current document (SVG does not scale):
 https://www.rfc-editor.org/authors/rfc9594.html
 https://www.rfc-editor.org/authors/rfc9594.pdf
 https://www.rfc-editor.org/authors/rfc9594.xml (source)

vs. SVG without width and height:
 https://www.rfc-editor.org/authors/test9594.html  
 https://www.rfc-editor.org/authors/test9594.pdf 
 https://www.rfc-editor.org/authors/test9594.xml (source)
-->

<!--[rfced] As "Group members" are shown as participants in Figure 1,
should they be included and defined in the list that follows the 
figure?
-->

      <figure anchor="fig-roles">
        <name>Key Distribution Participants</name>
        <artset>
          <artwork type="svg" align="center"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 544 224" class="diagram" text-anchor="middle" font-family="monospace" font-size="13px">
              <path d="M 8,32 L 8,64" fill="none" stroke="black"/>
              <path d="M 8,128 L 8,176" fill="none" stroke="black"/>
              <path d="M 56,72 L 56,120" fill="none" stroke="black"/>
              <path d="M 112,32 L 112,64" fill="none" stroke="black"/>
              <path d="M 112,128 L 112,176" fill="none" stroke="black"/>
              <path d="M 184,48 L 184,144" fill="none" stroke="black"/>
              <path d="M 240,32 L 240,64" fill="none" stroke="black"/>
              <path d="M 240,144 L 240,176" fill="none" stroke="black"/>
              <path d="M 344,32 L 344,64" fill="none" stroke="black"/>
              <path d="M 344,144 L 344,176" fill="none" stroke="black"/>
              <path d="M 408,128 L 408,176" fill="none" stroke="black"/>
              <path d="M 424,144 L 424,192" fill="none" stroke="black"/>
              <path d="M 440,160 L 440,208" fill="none" stroke="black"/>
              <path d="M 504,128 L 504,144" fill="none" stroke="black"/>
              <path d="M 520,144 L 520,160" fill="none" stroke="black"/>
              <path d="M 536,160 L 536,208" fill="none" stroke="black"/>
              <path d="M 8,32 L 112,32" fill="none" stroke="black"/>
              <path d="M 240,32 L 344,32" fill="none" stroke="black"/>
              <path d="M 184,48 L 232,48" fill="none" stroke="black"/>
              <path d="M 8,64 L 112,64" fill="none" stroke="black"/>
              <path d="M 240,64 L 344,64" fill="none" stroke="black"/>
              <path d="M 8,128 L 112,128" fill="none" stroke="black"/>
              <path d="M 408,128 L 504,128" fill="none" stroke="black"/>
              <path d="M 120,144 L 184,144" fill="none" stroke="black"/>
              <path d="M 240,144 L 344,144" fill="none" stroke="black"/>
              <path d="M 424,144 L 520,144" fill="none" stroke="black"/>
              <path d="M 120,160 L 232,160" fill="none" stroke="black"/>
              <path d="M 352,160 L 400,160" fill="none" stroke="black"/>
              <path d="M 440,160 L 536,160" fill="none" stroke="black"/>
              <path d="M 8,176 L 112,176" fill="none" stroke="black"/>
              <path d="M 240,176 L 344,176" fill="none" stroke="black"/>
              <path d="M 408,176 L 424,176" fill="none" stroke="black"/>
              <path d="M 424,192 L 440,192" fill="none" stroke="black"/>
              <path d="M 440,208 L 536,208" fill="none" stroke="black"/>
              <polygon class="arrowhead" points="408,160 396,154.4 396,165.6" fill="black" transform="rotate(0,400,160)"/>
              <polygon class="arrowhead" points="360,160 348,154.4 348,165.6" fill="black" transform="rotate(180,352,160)"/>
              <polygon class="arrowhead" points="240,160 228,154.4 228,165.6" fill="black" transform="rotate(0,232,160)"/>
              <polygon class="arrowhead" points="240,48 228,42.4 228,53.6" fill="black" transform="rotate(0,232,48)"/>
              <polygon class="arrowhead" points="128,160 116,154.4 116,165.6" fill="black" transform="rotate(180,120,160)"/>
              <polygon class="arrowhead" points="128,144 116,138.4 116,149.6" fill="black" transform="rotate(180,120,144)"/>
              <polygon class="arrowhead" points="64,120 52,114.4 52,125.6" fill="black" transform="rotate(90,56,120)"/>
              <polygon class="arrowhead" points="64,72 52,66.4 52,77.6" fill="black" transform="rotate(270,56,72)"/>
              <g class="text">
                <text x="60" y="52">AS</text>
                <text x="288" y="52">KDC</text>
                <text x="60" y="148">Client</text>
                <text x="292" y="164">Dispatcher</text>
                <text x="488" y="180">Group</text>
                <text x="488" y="196">members</text>
              </g>
            </svg>
          </artwork>
          <artwork type="ascii-art" align="center"><![CDATA[
.------------.               .------------.
|     AS     |        .----->|    KDC     |
'------------'        |      '------------'
      ^               |
      |               |
      v               |
.------------.        |                           .-----------.
|   Client   |<-------'      .------------.       | .---------+-.
|            |<------------->| Dispatcher |<----->| | .---------+-.
'------------'               '------------'       '-+ |   Group   |
                                                    '-+  members  |
                                                      '-----------'
]]></artwork>
        </artset>
      </figure>
      <t>The following participants (see <xref target="fig-roles"/>) take part in the authorization and key distribution.</t>
      <ul spacing="normal">
        <li>Client (C): A node that wants to join a group and take part in group communication with other group members. Within the group, the Client can have different roles.</li>
        <li>Authorization Server (AS): As per the AS defined in the ACE Framework <xref target="RFC9200"/>, it enforces access policies that prescribe whether a node is allowed to join a given group or not and with what roles and rights (e.g., write and/or read).</li>
        <li>Key Distribution Center (KDC): An entity that maintains the keying material to protect group communications and provides it to Clients authorized to join a given group. During the first part of the exchange (<xref target="sec-auth"/>), the KDC takes the role of the RS in the ACE Framework. During the second part (<xref target="key-distr"/>), which is not based on the ACE Framework, the KDC distributes the keying material. In addition, the KDC provides the latest keying material to group members when requested or, if required by the application, when group membership changes.</li>
          <li><t>Dispatcher: An entity through which the Clients communicate with the group when sending a message intended for multiple group members. That is, the Dispatcher distributes such a one-to-many message to the group members as intended recipients. The Dispatcher does not have access to the group keying material. A single-recipient message intended for only one group member may be delivered by alternative means, i.e., with no assistance from the Dispatcher.  </t>
          <t>
Examples of a Dispatcher are: the Broker in a pub-sub setting; a relayer for group communication that delivers group messages as multiple unicast messages to all group members; and an implicit entity as in a multicast communication setting, where messages are transmitted to a multicast IP address and delivered on the transport channel.  </t>
          <t>
If it consists of an explicit entity, such as a pub-sub Broker or a message relayer, the Dispatcher is comparable to an untrusted on-path intermediary; as such, it is able to see the messages sent by Clients in the group but not able to decrypt them and read their plain content.</t>
        </li>
      </ul>

      <t>This document specifies a mechanism for:</t>
      <ul spacing="normal">
        <li>authorizing a Client to join the group (<xref target="sec-auth"/>) and providing it with the group keying material to communicate with the other group members (<xref target="key-distr"/>),</li>
        <li>allowing a group member to retrieve group keying material (Sections <xref target="ssec-key-material-retrieval" format="counter"/> and <xref target="update-keys" format="counter"/>),</li>
        <li>allowing a group member to retrieve authentication credentials of other group members (<xref target="sec-key-retrieval"/>) and to provide an updated authentication credential (<xref target="update-pub-key"/>),</li>
        <li>allowing a group member to leave the group (<xref target="ssec-group-leaving"/>),</li>
        <li>evicting a group member from the group (<xref target="sec-node-removal"/>), and</li>
        <li>
          <t>renewing and redistributing the group keying material (rekeying), e.g., upon a membership change in the group (<xref target="sec-group-rekeying"/>).  </t>
          <t>
Rekeying the group may result in a temporary misalignment of the keying material stored by the different group members. Different situations where this can happen and how they can be handled are discussed in <xref target="sec-misalignment-keying-material"/>.</t>
        </li>
      </ul>
      <t><xref target="fig-flow"/> provides a high-level overview of the message flow for a node joining a group. The message flow can be expanded as follows.</t>
      <ol spacing="normal" type="1"><li>
          <t>The joining node requests an access token from the AS in order to access one or more group-membership resources at the KDC and hence join the associated groups.  </t>
          <t>
This exchange between the Client and AS <bcp14>MUST</bcp14> be secured, as specified by the transport profile of ACE used between the Client and KDC. Based on the response from the AS, the joining node will establish or continue using a secure communication association with the KDC.</t>
        </li>
        <li>
          <t>The joining node transfers authentication and authorization information to the KDC by transferring the obtained access token. This is typically achieved by including the access token in a request sent to the /authz-info endpoint at the KDC.  </t>
          <t>
Once this exchange is completed, the joining node <bcp14>MUST</bcp14> have a secure communication association established with the KDC before joining a group under that KDC.  </t>
          <t>
This exchange and the following secure communications between the Client and the KDC <bcp14>MUST</bcp14> occur in accordance with the transport profile of ACE used between the Client and KDC, such as the DTLS transport profile <xref target="RFC9202"/> and OSCORE transport profile <xref target="RFC9203"/> of ACE.</t>
        </li>
        <li>
          <t>The joining node starts the joining process to become a member of the group by sending a request to the related group-membership resource at the KDC. Based on the application requirements and policies, the KDC may perform a group rekeying by generating new group keying material and distributing it to the current group members through the rekeying scheme used in the group.  </t>
          <t>
At the end of the joining process, the joining node has received the parameters and group keying material from the KDC to securely communicate with the other group members. Also, the KDC has stored the association between the authorization information from the access token and the secure session with the joining node.</t>
        </li>
        <li>The joining node and the KDC maintain the secure association to support possible future communications. These especially include key management operations, such as the retrieval of updated keying material or participation of a group rekeying process.</li>
        <li>The joining node can communicate securely with the other group members by using the keying material provided in step 3.</li>
      </ol>
      <figure anchor="fig-flow">
        <name>Message Flow upon a New Node's Joining</name>
        <artwork align="center"><![CDATA[
        C                            AS  KDC                   Group
        |                             |   |                   Members
      / |                             |   |                      |
     |  |--- Authorization Request -->|   |                      |
     |  |                             |   |                      |
     |  |<-- Authorization Response --|   |                      |
(*) <   |                             |   |                      |
     |  |                             |   |                      |
     |  |---  Token Transfer Request ---->|                      |
     |  |                                 |                      |
     |  |<--- Token Transfer Response-----|                      |
      \ |                             |   |                      |
        |                             |   |                      |
        |--------- Join Request --------->|                      |
        |                             |   |                      |
        |                             |   | -- Group rekeying -->|
        |                             |   |      (optional)      |
        |<-------- Join Response ---------|                      |
        |                             |   |                      |
        |                             |   |                      |
        |                             |   |       Dispatcher     |
        |                                             |          |
        |<======= Secure group communication =========|=========>|
        |                                             |          |

(*) Defined in the ACE framework
]]></artwork>
      </figure>
    </section>
    <section anchor="sec-auth">
      <name>Authorization to Join a Group</name>
      <t>This section describes in detail the format of messages exchanged by the participants when a node requests access to a given group. This exchange is based on ACE <xref target="RFC9200"/>.</t>
      <t>As defined in <xref target="RFC9200"/>, the Client asks the AS for the authorization to join the group through the KDC (see <xref target="ssec-authorization-request"/>). If the request is approved and authorization is granted, the AS provides the Client with a proof-of-possession access token and parameters to securely communicate with the KDC (see <xref target="ssec-authorization-response"/>).</t>
      <t>Communications between the Client and the AS <bcp14>MUST</bcp14> be secured according to what is defined by the used transport profile of ACE. The Content-Format used in the message also depends on the used transport profile of ACE. 
<!--[rfced] In this document, media type names appear in single quotes
and without quotes in running text. We recommend using single quotes 
around media type names within this document. (Exception: we plan to 
leave the double quotes as they are because they used in the context of Content-Format). Please let us know if you prefer otherwise.  For example:

Original:
   it can be application/ace+cbor for the first two message
   and application/cwt for the third message:

Suggested:  
   it can be 'application/ace+cbor' for the first two messages
   and 'application/cwt' for the third message:
-->
For example, it can be application/ace+cbor for the first two messages and application/cwt for the third message, which are defined in the ACE framework.</t>
      <t>The transport profile of ACE also defines a number of details, such as the communication and security protocols used with the KDC (see <xref target="RFC9200" sectionFormat="of" section="C"/>).</t>
      <t><xref target="fig-group-member-registration"/> gives an overview of the exchange described above.</t>
      <figure anchor="fig-group-member-registration">
        <name>Message Flow of Join Authorization</name>
        <artwork align="center"><![CDATA[
Client                                             AS    KDC
   |                                                |     |
   |---- Authorization Request: POST /token ------->|     |
   |                                                |     |
   |<--- Authorization Response: 2.01 (Created) ----|     |
   |                                                |     |
   |---- Token Transfer Request: POST /authz-info ------->|
   |                                                |     |
   |<--- Token Transfer Response: 2.01 (Created) -------->|
   |                                                |     |
]]></artwork>
      </figure>
      <section anchor="ssec-authorization-request">
        <name>Authorization Request</name>
        <t>The Authorization Request sent from the Client to the AS is defined in <xref section="5.8.1" sectionFormat="of" target="RFC9200"/> and <bcp14>MAY</bcp14> contain the following parameters, which, if included, <bcp14>MUST</bcp14> have the format and value as specified below.</t>
        <ul spacing="normal">
          <li>
            <t>'scope': specifying the names of the groups that the Client requests to access and optionally the roles that the Client requests to have in those groups.  </t>
            <t>
This parameter is encoded as a CBOR byte string, which wraps a CBOR array of scope entries. All the scope entries are specified according to the same format, i.e., either the AIF format or the textual format defined below.  </t>
            <ul spacing="normal">
              <li>
                <t>If the AIF format is used, each scope entry is encoded as per <xref target="RFC9237"/>, i.e., as a CBOR array [Toid, Tperm]. If a scope entry expresses a set of roles to take in a group as per this document, the object identifier "Toid" specifies the group name and <bcp14>MUST</bcp14> be encoded as a CBOR text string, while the permission set "Tperm" specifies the roles that the Client wishes to take in the group.      </t>
                <t>
The AIF format is the default format for application profiles of this specification and is preferable for those that aim for a compact encoding of scope. This is especially desirable for application profiles defining several roles, with the Client possibly asking for multiple roles combined.      </t>
                <t><xref target="cddl-ex-0"/> shows an example in CDDL notation <xref target="RFC8610"/> where scope uses the AIF format.</t>
              </li>
              <li>
                <t>If the textual format is used, each scope entry is a CBOR array formatted as follows.      </t>
                <ul spacing="normal">
                  <li>As the first element, the group name, encoded as a CBOR text string.</li>
                  <li>Optionally, as the second element, the role or CBOR array of roles that the Client wishes to take in the group. This element is optional since roles may have been pre-assigned to the Client, as associated with its verifiable identity credentials. Alternatively, the application may have defined a single, well-known role for the target resource(s) and audience(s).</li>
                </ul>
                <t>
<xref target="cddl-ex"/> shows an example in CDDL notation where scope uses the textual format with the group name and role identifiers encoded as CBOR text strings.</t>
              </li>
            </ul>
<!--[rfced] For mentions of the REQs and OPTs that are listed in the appendix,
would you like links to appear in the HTML and PDF files? As an example,
in Section 3.1 see how "REQ1" links to REQ1 in Appendix A.  If you would
like links to be added throughout, please let us know.  Otherwise, we
will remove this one sample link.
-->
            <t>
It is <bcp14>REQUIRED</bcp14> for application profiles of this specification to specify the exact format and encoding of scope (<xref target="req1" format="none">REQ1</xref>). This includes defining the set of possible roles and their identifiers, as well as the corresponding encoding to use in the scope entries according to the used scope format.  </t>
            <t>
If the application profile uses the AIF format, it is also <bcp14>REQUIRED</bcp14> to register its specific instance of "Toid" and "Tperm", as well as the corresponding media type and Content-Format, as per the guidelines in <xref target="RFC9237"/> (REQ2).  </t>
            <t>
If the application profile uses the textual format, it <bcp14>MAY</bcp14> additionally specify CBOR values to use for abbreviating the role identifiers (OPT1).</t>
          </li>
          <li>'audience': with an identifier of the KDC.</li>
        </ul>
        <t>As defined in <xref target="RFC9200"/>, other additional parameters can be included if necessary.</t>
        <figure anchor="cddl-ex-0">
          <name>Example of scope Using the AIF Format</name>
<!--[rfced] This line appears to be a comment in CDDL; if so, we suggest
changing "rfc9237" to "RFC 9237", to match how RFC numbers appear in text.
There are two instances.

Original:
   ;# include rfc9237

Perhaps:
   ;# include RFC 9237
-->
          <sourcecode type="CDDL"><![CDATA[
;# include rfc9237

gname = tstr

permissions = uint .bits roles

roles = &(
   Requester: 1,
   Responder: 2,
   Monitor: 3,
   Verifier: 4
)

scope_entries = AIF-Generic<gname, permissions>

scope = bstr .cbor scope_entries
]]></sourcecode>
        </figure>
        <figure anchor="cddl-ex">
          <name>Example of scope Using the Textual Format, with the Role Identifiers Encoded as Text Strings</name>
          <sourcecode type="CDDL"><![CDATA[
gname = tstr

role = tstr

scope_entry = [ gname , ? ( role / [ 2*role ] ) ]

scope_entries = [ * scope_entry ]

scope = bstr .cbor scope_entries
]]></sourcecode>
        </figure>
      </section>
      <section anchor="ssec-authorization-response">
        <name>Authorization Response</name>
        <t>The AS processes the Authorization Request as defined in <xref section="5.8.2" sectionFormat="of" target="RFC9200"/>, especially verifying that the Client is authorized to access the specified groups with the requested roles or possibly a subset of those.</t>
        <t>In case of successful verification, the Authorization Response sent from the AS to the Client is also defined in <xref section="5.8.2" sectionFormat="of" target="RFC9200"/>. Note that the parameter 'expires_in' <bcp14>MAY</bcp14> be omitted if the application defines how the expiration time is communicated to the Client via other means or if it establishes a default value.</t>
        <t>Additionally, when included, the following parameter <bcp14>MUST</bcp14> have the corresponding values:</t>
        <ul spacing="normal">
          <li>'scope' has the same format and encoding of 'scope' in the Authorization Request, as defined in <xref target="ssec-authorization-request"/>. If this parameter is not present, the granted scope is equal to the one requested in <xref target="ssec-authorization-request"/>.</li>
        </ul>

<!--[rfced] We note that the following sentence contains the only instance
of 'access_token' in the document. Should 'access_token' be updated to
something else?

Original:
   The proof-of-possession access token (in 'access_token' above) MUST
   contain the following parameters:
-->   

        <t>The proof-of-possession access token (in 'access_token' above) <bcp14>MUST</bcp14> contain the following parameters:</t>
        <ul spacing="normal">
          <li>a confirmation claim (for example, see 'cnf' defined in <xref section="3.1" sectionFormat="of" target="RFC8747"/> for CWT);</li>
          <li>an expiration time claim (for example, see 'exp' defined in <xref section="3.1.4" sectionFormat="of" target="RFC8392"/> for CWT); and</li>
          <li>
            <t>a scope claim (for example, see 'scope' registered in <xref section="8.14" sectionFormat="of" target="RFC9200"/> for CWT).  </t>
            <t>
	      This claim specifies the same access control information as in the 'scope' parameter of the Authorization Response if the parameter is present in the message.

<!--[rfced] It is unclear what "if present" and "if not present" refer
to. How should this sentence be updated?

Original:
   If the parameter is not present, the
   claim specifies the access control information as in the 'scope'
   parameter of the Authorization Request, if present, or the default
   scope that the AS is granting the Client, if not present.
-->      

	    If the parameter is not present, the claim specifies the access control information as in the 'scope' parameter of the Authorization Request, if present, or the default scope that the AS is granting the Client, if not present.  </t>
            <t>
By default, this claim has the same encoding as the 'scope' parameter in the Authorization Request, as defined in <xref target="ssec-authorization-request"/>.  </t>
            <t>
Optionally, an alternative extended format of scope defined in <xref target="sec-extended-scope"/> can be used. This format explicitly signals the semantics used to express the actual access control information, which has to be parsed. This enables a Resource Server to correctly process a received access token, also in case:  </t>
            <ul spacing="normal">
              <li>the Resource Server implements a KDC that supports multiple application profiles of this specification using different scope semantics and/or</li>
              <li>the Resource Server implements further services beyond a KDC for group communication using different scope semantics.</li>
            </ul>
            <t>
If the Authorization Server is aware that this applies to the Resource Server for which the access token is issued, the Authorization Server <bcp14>SHOULD</bcp14> use the extended format of scope defined in <xref target="sec-extended-scope"/>.</t>
          </li>
        </ul>
        <t>The access token <bcp14>MAY</bcp14> additionally contain other claims that the transport profile of ACE or other optional parameters require.</t>
        <t>When receiving an Authorization Request from a Client that was previously authorized and for which the AS still stores a valid non-expired access token, the AS <bcp14>MAY</bcp14> reply with that token. Note that it is up to application profiles of ACE to make sure that reposting the same access token does not cause reuse of keying material between nodes (for example, that is accomplished with the use of random nonces in <xref target="RFC9203"/>).</t>
      </section>
      <section anchor="token-post">
        <name>Token Transferring</name>
        <t>The Client sends a Token Transfer Request to the KDC, i.e., a CoAP POST request including the access token and targeting the authz-info endpoint (see <xref section="5.10.1" sectionFormat="of" target="RFC9200"/>).</t>
        <t>Note that this request deviates from the one defined in <xref target="RFC9200"/>, since it allows asking the KDC for additional information concerning the authentication credentials used in the group to ensure source authentication, as well as for possible additional group parameters.</t>
        <t>The joining node <bcp14>MAY</bcp14> ask for this information from the KDC through the same Token Transfer Request.

<!--[rfced] We note that the phrasing "have Content-Format set to
application/ace..." and "have Content-Format application/ace..." are used
inconsistently throughout the document. Should these phrases be 
consistent? (Note that below are some examples; there are more occurrences
throughout the document.)

Original:
   In this case, the message MUST have
   Content-Format set to application/ace+cbor defined in Section 8.16 of
   [RFC9200]
   ...
   The Token Transfer Response MUST have Content-Format "application/
   ace+cbor"
   ...
   those messages MUST have Content-Format set to application/ace-
   groupcomm+cbor
   ...
   the KDC MUST reply with a 4.00 (Bad Request) error response, which MUST
   also have Content-Format application/ace-groupcomm+cbor.    
-->

	In this case, the message <bcp14>MUST</bcp14> have the Content-Format set to application/ace+cbor as defined in <xref section="8.16" sectionFormat="of" target="RFC9200"/>, and the message payload <bcp14>MUST</bcp14> be formatted as a CBOR map, which <bcp14>MUST</bcp14> include the access token. The CBOR map <bcp14>MAY</bcp14> additionally include the following parameter, which, if included, <bcp14>MUST</bcp14> have the format and value as specified below.</t>
        <ul spacing="normal">
          <li>'sign_info': defined in <xref target="sign-info"/>, specifying the CBOR simple value "null" (0xf6) to request information about the signature algorithm, the signature algorithm parameters, the signature key parameters, and the exact format of authentication credentials used in the groups that the Client has been authorized to join.</li>
        </ul>
        <t>Alternatively, such information may be pre-configured on the joining node or may be retrieved by alternative means. For example, the joining node may have performed an early group discovery process and obtained the link to the associated group-membership resource at the KDC, along with attributes that describe the group configuration (e.g., see <xref target="I-D.tiloca-core-oscore-discovery"/>).</t>
        <t>After successful verification, the Client is authorized to receive the group keying material from the KDC and join the group. Hence, the KDC replies to the Client with a Token Transfer Response, i.e., a  CoAP 2.01 (Created) response.</t>
        <t>The Token Transfer Response <bcp14>MUST</bcp14> have Content-Format "application/ace+cbor", and its payload is a CBOR map. Note that this deviates from what is defined in the ACE framework, where the response from the authz-info endpoint is defined as conveying no payload (see <xref section="5.10.1" sectionFormat="of" target="RFC9200"/>).</t>
        <t>If a scope entry in the access token specifies a role that requires the Client to send its own authentication credential to the KDC when joining the related group, then the CBOR map <bcp14>MUST</bcp14> include the parameter 'kdcchallenge' defined in <xref target="kdcchallenge"/>, specifying a dedicated challenge N_S generated by the KDC.</t>
        <t>Later, when joining the group (see <xref target="ssec-key-distribution-exchange"/>), the Client uses the 'kdcchallenge' value and additional information to build a proof-of-possession (PoP) input. In turn, this is used to compute PoP evidence, which the Client also provides to the KDC in order to prove possession of its own private key (see the 'client_cred_verify' parameter in <xref target="gid-post"/>).</t>
        <t>While storing the access token, the KDC <bcp14>MUST</bcp14> store the 'kdcchallenge' value associated with the Client at least until it receives a Join Request from the Client (see <xref target="ssec-key-distribution-exchange"/>) to be able to verify the PoP evidence provided during the join process and thus that the Client possesses its own private key. The KDC deletes the 'kdcchallenge' value associated with the Client upon deleting the access token (e.g., upon its expiration, see <xref section="5.10.3" sectionFormat="of" target="RFC9200"/>).</t>
        <t>The same 'kdcchallenge' value <bcp14>MAY</bcp14> be reused several times by the Client to generate new PoP evidence, e.g., in case the Client provides the KDC with a new authentication credential while being a group member (see <xref target="update-pub-key"/>) or joins a different group where it intends to use a different authentication credential. Therefore, it is <bcp14>RECOMMENDED</bcp14> that the KDC keeps storing the 'kdcchallenge' value after the first join is processed as well. If, upon receiving a Join Request from a Client, the KDC has already discarded the 'kdcchallenge' value, that will trigger an error response with a newly generated 'kdcchallenge' value that the Client can use to restart the join process, as specified in <xref target="ssec-key-distribution-exchange"/>.</t>
        <t>If 'sign_info' is included in the Token Transfer Request, the KDC <bcp14>SHOULD</bcp14> include the 'sign_info' parameter in the Token Transfer Response, as per the format defined in <xref target="sign-info"/>. Note that the field 'id' of each 'sign_info_entry' specifies the name or array of group names to which that 'sign_info_entry' applies. As an exception, the KDC <bcp14>MAY</bcp14> omit the 'sign_info' parameter in the Token Transfer Response even if 'sign_info' is included in the Token Transfer Request in case none of the groups that the Client is authorized to join use signatures to achieve source authentication.</t>
        <t>Note that the CBOR map specified as payload of the 2.01 (Created) response may include further parameters, e.g., according to the used transport profile of ACE. Application profiles of this specification <bcp14>MAY</bcp14> define additional parameters to use within this exchange (OPT2).</t>
        <t>Application profiles of this specification <bcp14>MAY</bcp14> define alternative specific negotiations of parameter values for the signature algorithm and signature keys if 'sign_info' is not used (OPT3).</t>
        <t>If allowed by the used transport profile of ACE, the Client may provide the Access Token to the KDC by other means than the Token Transfer Request. An example is the DTLS transport profile of ACE, where the Client can provide the access token to the KDC during the secure session establishment (see <xref section="3.3.2" sectionFormat="of" target="RFC9202"/>).</t>
        <section anchor="sign-info">
          <name>'sign_info' Parameter</name>
          <t>The 'sign_info' parameter is an <bcp14>OPTIONAL</bcp14> parameter of the request and response messages exchanged between the Client and the authz-info endpoint at the RS (see <xref section="5.10.1" sectionFormat="of" target="RFC9200"/>).</t>
          <t>This parameter allows the Client and the RS to exchange information about a signature algorithm and about authentication credentials to accordingly use for signature verification. Its exact semantics and content are application specific.</t>
          <t>In this specification and in application profiles building on it, this parameter is used to exchange information about the signature algorithm and about authentication credentials to be used with it in the groups indicated by the transferred access token as per its 'scope' claim (see <xref target="ssec-authorization-response"/>).</t>
          <t>When used in the Token Transfer Request sent to the KDC (see <xref target="token-post"/>), the 'sign_info' parameter specifies the CBOR simple value "null" (0xf6). This is done to ask for information about the signature algorithm and about the authentication credentials used in the groups that, as per the granted roles, the Client has been authorized to join or interact with (e.g., as an external signature verifier).</t>
          <t>When used in the following Token Transfer Response from the KDC (see <xref target="token-post"/>), the 'sign_info' parameter is a CBOR array of one or more elements. The number of elements is at most the number of groups that the Client has been authorized to join or interact with. Each element contains information about signing parameters and about authentication credentials for one or more groups and is formatted as follows.</t>
          <ul spacing="normal">
            <li>The first element 'id' is a group name or a CBOR array of group names, which is associated with groups for which the next four elements apply. Each specified group name is a CBOR text string and is hereafter referred to as 'gname'.</li>
            <li>The second element 'sign_alg' is a CBOR integer or a text string that indicates the signature algorithm used in the groups identified by the 'gname' values. It is <bcp14>REQUIRED</bcp14> for application profiles to define specific values that this parameter can take (REQ3), which are selected from the set of signing algorithms of the "COSE Algorithms" registry <xref target="COSE.Algorithms"/>.</li>
            <li>The third element 'sign_parameters' is a CBOR array that indicates the parameters of the signature algorithm used in the groups identified by the 'gname' values. Its content depends on the value of 'sign_alg'.

<!--[rfced] As "values" is plural, should "structure" also be plural?

Original:
   It is REQUIRED of application profiles to
   define the possible values and structure for the elements of this
   parameter (REQ4).
   ...
   It is REQUIRED of
   application profiles to define the possible values and structure
   for the elements of this parameter (REQ5).   
-->      

	    It is <bcp14>REQUIRED</bcp14> for application profiles to define the possible values and structure for the elements of this parameter (REQ4).</li>
            <li>The fourth element 'sign_key_parameters' is a CBOR array that indicates the parameters of the key used with the signature algorithm in the groups identified by the 'gname' values. Its content depends on the value of 'sign_alg'. It is <bcp14>REQUIRED</bcp14> for application profiles to define the possible values and structure for the elements of this parameter (REQ5).</li>
            <li>The fifth element 'cred_fmt' is either a CBOR integer indicating the format of authentication credentials used in the groups identified by the 'gname' values or has the CBOR simple value "null" (0xf6), which indicates that the KDC does not act as a repository of authentication credentials for group members. Its acceptable integer values are taken from the "Label" column of the "COSE Header Parameters" registry <xref target="COSE.Header.Parameters"/>, with some of those values also indicating the type of container to use for exchanging the authentication credentials with the KDC (e.g., a chain or bag of certificates). It is <bcp14>REQUIRED</bcp14> for application profiles to define specific values to use for this parameter consistently with the acceptable formats of authentication credentials (REQ6).</li>
          </ul>
          <t>The CDDL notation <xref target="RFC8610"/> of the 'sign_info' parameter is given below.</t>
          <sourcecode type="CDDL"><![CDATA[
sign_info = sign_info_req / sign_info_resp

sign_info_req  = null                  ; in the Token Transfer
                                       ; Request to the KDC

sign_info_resp = [ + sign_info_entry ] ; in the Token Transfer
                                       ; Response from the KDC

sign_info_entry =
[
  id : gname / [ + gname ],
  sign_alg : int / tstr,
  sign_parameters : [ any ],
  sign_key_parameters : [ + parameter : any ],
  cred_fmt : int / null
]

gname = tstr
]]></sourcecode>
          <t>This format is consistent with every signature algorithm currently defined in <xref target="RFC9053"/>, i.e., with algorithms that have only the COSE key type as their COSE capability. <xref target="sec-future-cose-algs"/> describes how the format of each 'sign_info_entry' can be generalized for possible future registered algorithms having a different set of COSE capabilities.</t>
        </section>
        <section anchor="kdcchallenge">
          <name>'kdcchallenge' Parameter</name>
          <t>The 'kdcchallenge' parameter is an <bcp14>OPTIONAL</bcp14> parameter of the response message returned from the authz-info endpoint at the RS, as defined in <xref section="5.10.1" sectionFormat="of" target="RFC9200"/>. This parameter contains a challenge generated by the RS and provided to the Client.</t>
          <t>In this specification and in application profiles building on it, the Client can use this challenge to prove possession of its own private key in the Join Request (see the 'client_cred_verify' parameter in <xref target="gid-post"/>).</t>
        </section>
      </section>
    </section>
    <section anchor="key-distr">
      <name>KDC Functionalities</name>
      <t>This section describes the functionalities provided by the KDC, as related to the provisioning of the keying material as well as to the group membership management.</t>
      <t>In particular, this section defines the interface available at the KDC, specifies the handlers of each resource provided by the KDC interface, and describes how Clients interact with those resources to join a group and to perform additional operations as group members.</t>
      <t>A key operation that the Client can perform after transferring the access token to the KDC is a Join Request-Response exchange with the KDC. In the Join Request, the Client specifies the group it requests to join (see <xref target="ssec-key-distribution-exchange"/>). The KDC will then verify the access token and that the Client is authorized to join the specified group. If so, the KDC provides the Client with the keying material to securely communicate with the other members of the group.</t>
      <t>Later on as a group member, the Client can also rely on the interface at the KDC to perform additional operations consistent with the roles it has in the group.</t>
      <section anchor="kdc-if">
        <name>Interface at the KDC</name>
        <t>The KDC provides its interface by hosting the following resources. Note that the root url-path "ace-group" used hereafter is a default name; implementations are not required to use this name and can define their own instead.</t>
        <t>If request messages sent to the KDC as well as success response messages from the KDC include a payload and specify a Content-Format, those messages <bcp14>MUST</bcp14> have Content-Format set to application/ace-groupcomm+cbor, as defined in <xref target="content-type"/>. CBOR labels for the message parameters are defined in <xref target="params"/>.</t>
        <ul spacing="normal">
            <li><t>/ace-group : the path of this root resource is invariant once the resource is established and indicates that this specification is used. If other applications run on a KDC implementing this specification and use this same path, those applications will collide, and a mechanism will be needed to differentiate the endpoints.  </t>
            <t>
A Client can access this resource in order to retrieve a set of group names, each corresponding to one of the specified group identifiers. This operation is described in <xref target="retrieval-gnames"/>.  </t>
            <t>
Clients may be authorized to access this resource even without being members of any group at the KDC and even if they are not authorized to become group members (e.g., when authorized to be external signature verifiers).  </t>
            <t>
The Interface Description (if=) Link Target Attribute value "ace.groups" is registered in <xref target="if-ace-group"/> and can be used to describe the interface provided by this root resource.  </t>
            <t>
The example below shows an exchange with a KDC with address 2001:db8::ab that hosts the resource /ace-group and returns a link to such a resource in link-format <xref target="RFC6690"/>.  </t> 

<!-- [rfced] Please review each artwork element and let us know if any should
be marked as sourcecode (or another element) instead.
-->


<artwork><![CDATA[
Request:

Header: GET (Code=0.01)
Uri-Host: "kdc.example.com"
Uri-Path: ".well-known"
Uri-Path: "core"
Uri-Query: "if=ace.groups"

Response:

Header: Content (Code=2.05)
Content-Format: 40 (application/link-format)
Payload:
  <coap://[2001:db8::ab]/ace-group>;if="ace.groups"
]]></artwork>
</li>

<!--[rfced] In the second sentence, may "of which it contains" 
be updated to be more concise, as follows or otherwise?

Original:
   *  /ace-group/GROUPNAME : one such sub-resource to /ace-group is
      hosted for each group with name GROUPNAME that the KDC manages.
      In particular, it is the group-membership resource associated with
      that group, of which it contains the symmetric group keying
      material.

Perhaps:
   *  /ace-group/GROUPNAME : one such sub-resource to /ace-group is
      hosted for each group with name GROUPNAME that the KDC manages.
      In particular, it is the group-membership resource associated with
      that group; it contains the symmetric group keying material.
-->      

            <li><t>/ace-group/GROUPNAME : one such sub-resource to /ace-group is hosted for each group with the name GROUPNAME that the KDC manages. In particular, it is the group-membership resource associated with that group, of which it contains the symmetric group keying material.  </t>
            <t>
A Client can access this resource in order to join the group with name GROUPNAME or later as a group member to retrieve the current group keying material. These operations are described in Sections <xref target="ssec-key-distribution-exchange" format="counter"/> and <xref target="ssec-key-material-retrieval" format="counter"/>, respectively.  </t>
            <t>
The Interface Description (if=) Link Target Attribute value "ace.group" is registered in <xref target="if-ace-group"/> and can be used to describe the interface provided by a group-membership resource.  </t>
            <t>
The example below shows an exchange with a KDC with address 2001:db8::ab that hosts the group-membership resource /ace-group/gp1 and returns a link to such a resource in link-format <xref target="RFC6690"/>.  </t>
            <artwork><![CDATA[
Request:

Header: GET (Code=0.01)
Uri-Host: "kdc.example.com"
Uri-Path: ".well-known"
Uri-Path: "core"
Uri-Query: "if=ace.group"

Response:

Header: Content (Code=2.05)
Content-Format: 40 (application/link-format)
Payload:
  <coap://[2001:db8::ab]/ace-group/gp1>;if="ace.group"
]]></artwork>

           <t>
If it is not required that the value of the GROUPNAME URI path and the group name in the access token scope ('gname' in <xref target="ssec-authorization-response"/>) coincide, the KDC <bcp14>MUST</bcp14> implement a mechanism to map the GROUPNAME value in the URI to the group name in order to refer to the correct group (REQ7).</t>
          </li>
            <li><t>/ace-group/GROUPNAME/creds : the path of this resource is invariant once the resource is established. This resource contains the authentication credentials of all the members of the group with the name GROUPNAME.  </t>
            <t>
This resource is created only in case the KDC acts as a repository of authentication credentials for group members.  </t>
            <t>
As a group member, a Client can access this resource in order to retrieve the authentication credentials of other group members. That is, the Client can retrieve the authentication credentials of all the current group members or a subset of them by specifying filter criteria. These operations are described in Sections <xref target="sec-key-retrieval-all" format="counter"/> and <xref target="sec-key-retrieval" format="counter"/>, respectively.  </t>
            <t>
Clients may be authorized to access this resource even without being group members, e.g., if authorized to be external signature verifiers for the group.</t>
          </li>
            <li><t>/ace-group/GROUPNAME/kdc-cred : the path of this resource is invariant once the resource is established. This resource contains the authentication credential of the KDC for the group with the name GROUPNAME.  </t>
            <t>
This resource is created only in case the KDC has an associated authentication credential and this is required for the correct group operation. It is <bcp14>REQUIRED</bcp14> for application profiles to define whether the KDC has such an associated authentication credential (REQ8).  </t>
            <t>
As a group member, a Client can access this resource in order to retrieve the current authentication credential of the KDC.  </t>
            <t>
Clients may be authorized to access this resource even without being group members, e.g., if authorized to be external signature verifiers for the group.</t>
          </li>
            <li><t>/ace-group/GROUPNAME/policies : the path of this resource is invariant once the resource is established. This resource contains the group policies of the group with the name GROUPNAME.  </t>
            <t>
A Client can access this resource as a group member in order to retrieve the group policies. This operation is described in <xref target="policies"/>.</t>
          </li>
            <li><t>/ace-group/GROUPNAME/num : the path of this resource is invariant once the resource is established. This resource contains the current version number for the symmetric group keying material of the group with the name GROUPNAME.  </t>
            <t>
A Client can access this resource as a group member in order to retrieve the version number of the keying material currently used in the group. This operation is described in <xref target="key-version"/>.</t>
          </li>
            <li><t>/ace-group/GROUPNAME/nodes/NODENAME : one such sub-resource of /ace-group/GROUPNAME is hosted for each group member of the group with the name GROUPNAME. Each such resource is identified by the node name NODENAME of the associated group member and contains the group keying material and the individual keying material for that group member.  </t>
            <t>
A Client as a group member can access this resource in order to retrieve the current group keying material together with its individual keying material, request new individual keying material to use in the group, and leave the group. These operations are described in Sections <xref target="update-keys" format="counter"/>, <xref target="new-keys" format="counter"/>, and <xref target="ssec-group-leaving" format="counter"/>, respectively.</t>
          </li>
            <li><t>/ace-group/GROUPNAME/nodes/NODENAME/cred : the path of this resource is invariant once the resource is established. This resource contains the individual authentication credential for the node with the name NODENAME as a group member of the group with the name GROUPNAME.  </t>
            <t>
A Client can access this resource in order to upload at the KDC a new authentication credential to use in the group. This operation is described in <xref target="update-pub-key"/>.  </t>
            <t>
This resource is not created if the group member does not have an authentication credential to use in the group or if the KDC does not store the authentication credentials of group members.</t>
          </li>
        </ul>

        <t>The KDC is expected to fully provide the interface defined above. It is otherwise <bcp14>REQUIRED</bcp14> for  the application profiles of this specification to indicate which resources are not hosted, i.e., which parts of the interface defined in this section are not supported by the KDC (REQ9). Application profiles of this specification <bcp14>MAY</bcp14> extend the KDC interface by defining additional handlers, as well as defining additional resources and their handlers.</t>
        <t>It is <bcp14>REQUIRED</bcp14> for application profiles of this specification to register a Resource Type for the group-membership resource (REQ10), i.e., the group-membership resource at /ace-group/GROUPNAME. This Resource Type can be used to discover the correct URL for sending a Join Request to the KDC. This Resource Type can also be used to indicate which specific application profile of this specification is used by a specific group-membership resource at the KDC.</t>
        <t>It is <bcp14>REQUIRED</bcp14> for application profiles of this specification to define what specific actions (e.g., CoAP methods) are allowed on each resource provided by the KDC interface, depending on whether the Client is a current group member, the roles that a Client is authorized to take as per the obtained access token (see <xref target="ssec-authorization-request"/>), and the roles that the Client has as current group member (REQ11).</t>
        <section anchor="client-operations">
          <name>Operations Supported by Clients</name>
          <t>It is expected that a Client minimally supports the following set of primary operations and corresponding interactions with the KDC.</t>
          <ul spacing="normal">
            <li>FETCH request to /ace-group/ in order to retrieve group names associated with group identifiers.</li>
            <li>POST and GET requests to /ace-group/GROUPNAME/ in order to join a group (POST) and later retrieve the current group key material as a group member (GET).</li>
            <li>GET and FETCH requests to /ace-group/GROUPNAME/creds in order to retrieve the authentication credentials of all the other group members (GET) or only some of them by filtering (FETCH). While retrieving authentication credentials remains possible by using GET requests, retrieval by filtering allows Clients to greatly limit the size of exchanged messages.</li>
            <li>GET request to /ace-group/GROUPNAME/num in order to retrieve the current version of the group key material as a group member.</li>
            <li>DELETE request to /ace-group/GROUPNAME/nodes/NODENAME  in order to leave the group.</li>
          </ul>
          <t>In addition, some Clients may rather not support the following set of secondary operations and corresponding interactions with the KDC. This can be specified, for instance, in compliance documents defining minimalistic Clients and their capabilities in specific deployments. In turn, these might also have to consider the used application profile of this specification.</t>
          <ul spacing="normal">
            <li>GET request to /ace-group/GROUPNAME/kdc-cred in order to retrieve the current authentication credential of the KDC. This is relevant only if the KDC has an associated authentication credential and this is required for the correct group operation.</li>
            <li>GET request to /ace-group/GROUPNAME/policies in order to retrieve the current group policies as a group member.</li>
            <li>GET request to /ace-group/GROUPNAME/nodes/NODENAME in order to retrieve the current group keying material and individual keying material. The former can also be retrieved through a GET request to /ace-group/GROUPNAME/ (see above).</li>
            <li>PUT request to /ace-group/GROUPNAME/nodes/NODENAME in order to ask for new individual keying material. Alternatively, the Client could obtain new individual keying material by rejoining the group through a POST request to /ace-group/GROUPNAME/ (see above). Furthermore, depending on its roles in the group or on the application profile of this specification, the Client might simply not be associated with any individual keying material.</li>
            <li>POST request to /ace-group/GROUPNAME/nodes/NODENAME/cred in order to provide the KDC with a new authentication credential. Alternatively, the Client could provide a new authentication credential by rejoining the group through a POST request to /ace-group/GROUPNAME/ (see above). Furthermore, depending on its roles in the group, the Client might simply not have an associated authentication credential to provide.</li>
          </ul>
          <t>It is <bcp14>REQUIRED</bcp14> for application profiles of this specification to categorize possible newly defined operations for Clients into primary and secondary operations and to provide accompanying considerations (REQ12).</t>
        </section>
        <section anchor="kdc-if-errors">
          <name>Error Handling</name>
          <t>Upon receiving a request from a Client, the KDC <bcp14>MUST</bcp14> check that it is storing a valid access token from that Client. If this is not the case, the KDC <bcp14>MUST</bcp14> reply with a 4.01 (Unauthorized) error response.</t>
          <t>Unless the request targets the /ace-group resource, the KDC <bcp14>MUST</bcp14> check that it is storing a valid access token from that Client such that:</t>
          <ul spacing="normal">
            <li>the scope specified in the access token includes a scope entry related to the group name GROUPNAME associated with the targeted resource and</li>
            <li>the set of roles specified in that scope entry allows the Client to perform the requested operation on the targeted resource (REQ11).</li>
          </ul>
          <t>In case the KDC stores a valid access token but the verifications above fail, the KDC <bcp14>MUST</bcp14> reply with a 4.03 (Forbidden) error response. This response <bcp14>MAY</bcp14> be an AS Request Creation Hints, as defined in <xref section="5.3" sectionFormat="of" target="RFC9200"/>, in which case the Content-Format <bcp14>MUST</bcp14> be set to application/ace+cbor.</t>
          <t>If the request is not formatted correctly (e.g., required fields are not present or are not encoded as expected), the handler <bcp14>MUST</bcp14> reply with a 4.00 (Bad Request) error response.</t>

<!--[rfced] May we update "non-expected" to "unexpected"?

Original:
   If the request includes unknown or non-expected fields, the handler
   MUST silently ignore them and continue processing the request.

Perhaps:
   If the request includes unknown or unexpected fields, the handler
   MUST silently ignore them and continue processing the request.
-->   
	  
          <t>If the request includes unknown or non-expected fields, the handler <bcp14>MUST</bcp14> silently ignore them and continue processing the request. Application profiles of this specification <bcp14>MAY</bcp14> define optional or mandatory payload formats for specific error cases (OPT4).</t>
          <t>Some error responses from the KDC can convey error-specific information according to the problem-details format defined in <xref target="RFC9290"/>. Such error responses <bcp14>MUST</bcp14> have Content-Format set to application/concise-problem-details+cbor. The payload of these error responses <bcp14>MUST</bcp14> be a CBOR map specifying a Concise Problem Details data item (see <xref section="2" sectionFormat="of" target="RFC9290"/>). The CBOR map is formatted as follows.</t>
          <ul spacing="normal">
            <li>
              <t>It <bcp14>MUST</bcp14> include the Custom Problem Detail entry 'ace-groupcomm-error', which is registered in <xref target="iana-custom-problem-details"/> of this document.  </t>
              <t>
This entry is formatted as a CBOR map including only one field, namely 'error-id'. The map key for 'error-id' is the CBOR unsigned integer with value 0. The value of 'error-id' is a CBOR integer specifying the error that occurred at the KDC. This value is taken from the "Value" column of the "ACE Groupcomm Errors" registry defined in <xref target="iana-ace-groupcomm-errors"/> of this document.  </t>
              <t>
The CDDL notation <xref target="RFC8610"/> of the 'ace-groupcomm-error' entry is given below.</t>
          <sourcecode type="CDDL"><![CDATA[
   ace-groupcomm-error = {
     &(error-id: 0) => int
   }
   ]]></sourcecode>
	    </li>
            <li>
              <t>It <bcp14>MAY</bcp14> include further Standard Problem Detail entries or Custom Problem Detail entries (see <xref target="RFC9290"/>).  </t>
              <t>
In particular, it can include the Standard Problem Detail entry 'detail' (map key -2), whose value is a CBOR text string that specifies a human-readable, diagnostic description of the error occurred at the KDC. The diagnostic text is intended for software engineers as well as for device and network operators in order to aid debugging and provide context for possible intervention. The diagnostic message <bcp14>SHOULD</bcp14> be logged by the KDC. The 'detail' entry is unlikely relevant in an unattended setup where human intervention is not expected.</t>
            </li>
          </ul>
          <t>An example of an error response using the problem-details format is shown in <xref target="fig-exapmle-error-response"/>.</t>
          <figure anchor="fig-exapmle-error-response">
            <name>Example of an Error Response with Problem Details</name>
            <artwork><![CDATA[
Response:

Header: Service Unavailable (Code=5.03)
Content-Format: application/concise-problem-details+cbor
Payload:
{
  / title /                -1: "No available node identifiers",
  / detail /               -2: "Things will change after a
                                group rekeying; try later",
  / ace-groupcomm-error /   0: {
    / error-id /  0: 4 / "No available node identifiers" /,
  }
}
]]></artwork>
          </figure>
          <t>The problem-details format (in general) and the Custom Problem Detail entry 'ace-groupcomm-error' (in particular) are <bcp14>OPTIONAL</bcp14> support for Clients. A Client supporting the entry 'ace-groupcomm-error' and that can understand the specified error may use that information to determine what actions to take next.</t>
          <t><xref target="error-types"/> of this specification defines an initial set of error identifiers as possible values for the 'error-id' field. Application profiles of this specification inherit this initial set of error identifiers and <bcp14>MAY</bcp14> define additional values (OPT5).</t>
        </section>
      </section>
      <section anchor="ace-group">
        <name>/ace-group</name>
        <t>This resource implements the FETCH handler.</t>
        <section anchor="ace-group-fetch">
          <name>FETCH Handler</name>
          <t>The FETCH handler receives group identifiers and returns the corresponding group names and GROUPNAME URIs.</t>
          <t>The handler expects a request with the payload formatted as a CBOR map, which <bcp14>MUST</bcp14> contain the following fields:</t>
          <ul spacing="normal">
            <li>'gid': whose value is encoded as a CBOR array, containing one or more group identifiers. The exact encoding of the group identifier <bcp14>MUST</bcp14> be specified by the application profile (REQ13). The Client indicates that it wishes to receive the group names of all the groups having these identifiers.</li>
          </ul>
          <t>The handler identifies the groups where communications are secured by using the keying material identified by those group identifiers.</t>
          <t>If all verifications succeed, the handler replies with a 2.05 (Content) response, whose payload is formatted as a CBOR map that <bcp14>MUST</bcp14> contain the following fields:</t>
          <ul spacing="normal">
            <li>'gid': whose value is encoded as a CBOR array, containing zero or more group identifiers. The handler indicates that those are the identifiers it is sending group names for. This CBOR array is a subset of the 'gid' array in the FETCH request.</li>
            <li>'gname': whose value is encoded as a CBOR array, containing zero or more group names. The elements of this array are encoded as text strings. Each element of index i in this CBOR array is associated with the element of index i in the 'gid' array.</li>
            <li>'guri': whose value is encoded as a CBOR array, containing zero or more URIs, each indicating a group-membership resource. The elements of this array are encoded as text strings. Each element of index i in this CBOR array is associated with the element of index i in the 'gid' array.</li>
          </ul>
          <t>If the KDC does not find any group associated with the specified group identifiers, the handler returns a response with the payload formatted as a CBOR byte string of zero length.</t>
          <t>Note that the KDC only verifies that the node is authorized by the AS to access this resource. Nodes that are not members of the group but are authorized to do signature verification on the group messages may be allowed to access this resource if the application needs it.</t>
          <section anchor="retrieval-gnames">
            <name>Retrieve Group Names</name>
            <t>In case the joining node only knows the group identifier of the group it wishes to join or about which it wishes to get updated information from the KDC, the node can contact the KDC to request the corresponding group name and group-membership resource URI. The node can request several group identifiers at once. It does so by sending a CoAP FETCH request to the /ace-group endpoint at the KDC formatted as defined in <xref target="ace-group-fetch"/>.</t>
            <t><xref target="fig-ace-group-fetch"/> gives an overview of the exchanges described above, and <xref target="fig-ace-group-fetch-2"/> shows an example.</t>
            <figure anchor="fig-ace-group-fetch">
              <name>Message Flow of Group Name and URI Retrieval Request-Response</name>
              <artwork align="center"><![CDATA[
Client                                                         KDC
   |                                                            |
   |------------ Group Name and URI Retrieval Request: -------->|
   |                      FETCH /ace-group                      |
   |                                                            |
   |<-- Group Name and URI Retrieval Response: 2.05 (Content) --|
   |                                                            |
]]></artwork>
            </figure>
            <figure anchor="fig-ace-group-fetch-2">
              <name>Example of Group Name and URI Retrieval Request-Response</name>
              <artwork><![CDATA[
Request:

Header: FETCH (Code=0.05)
Uri-Host: "kdc.example.com"
Uri-Path: "ace-group"
Content-Format: "application/ace-groupcomm+cbor"
Payload (in CBOR diagnostic notation):
  { "gid": [1, 2] }

Response:

Header: Content (Code=2.05)
Content-Format: "application/ace-groupcomm+cbor"
Payload (in CBOR diagnostic notation):
  { "gid": [1, 2], "gname": ["group1", "group2"],
    "guri": ["/ace-group/g1", "/ace-group/g2"] }
]]></artwork>
            </figure>
          </section>
        </section>
      </section>
      <section anchor="ace-groupgroupname">
        <name>/ace-group/GROUPNAME</name>
        <t>This resource implements the POST and GET handlers.</t>
        <section anchor="gid-post">
          <name>POST Handler</name>
          <t>The POST handler processes the Join Request sent by a Client to join a group and returns a Join Response as a successful result of the joining process (see <xref target="ssec-key-distribution-exchange"/>). At a high level, the POST handler adds the Client to the list of current group members, adds the authentication credential of the Client to the list of the group members' authentication credentials, and returns the symmetric group keying material for the group identified by GROUPNAME.</t>
          <t>The handler expects a request with payload formatted as a CBOR map, which <bcp14>MAY</bcp14> contain the following fields, which, if included, <bcp14>MUST</bcp14> have the format and value as specified below.</t>
          <ul spacing="normal">
            <li>'scope': with the value the specific group that the Client is attempting to join, i.e., the group name, and the roles it wishes to have in the group. This value is a CBOR byte string wrapping one scope entry, as defined in <xref target="ssec-authorization-request"/>.</li>
            <li>
              <t>'get_creds': if the Client wishes to receive the authentication credentials of the current group members from the KDC. This parameter may be included in the Join Request if the KDC stores the authentication credentials of the group members, while it is not useful to include it if the Client obtains those authentication credentials through alternative means, e.g., from the AS. Note that including this parameter might result in a following Join Response of a large size, which can be inconvenient for resource-constrained devices.  </t>
              <t>
If the Client wishes to retrieve the authentication credentials of all the current group members, the 'get_creds' parameter <bcp14>MUST</bcp14> encode the CBOR simple value "null" (0xf6). Otherwise, if the Client wishes to retrieve the authentication credentials of nodes with specific roles, the 'get_creds' parameter <bcp14>MUST</bcp14> encode a non-empty CBOR array containing the three elements 'inclusion_flag', 'role_filter', and 'id_filter', as defined below.  </t>
              <ul spacing="normal">
                <li>The first element, namely 'inclusion_flag', encodes the CBOR simple value "true" (0xf5) if the Client wishes to receive the authentication credentials of the nodes having their node identifier specified in 'id_filter' (i.e., selection by inclusive filtering). Instead, this element encodes the CBOR simple value "false" (0xf4) if the Client wishes to receive the authentication credentials of the nodes that don't have the node identifiers specified in the third element 'id_filter' (i.e., selection by exclusive filtering). In the Join Request, this parameter encodes the CBOR simple value "true" (0xf5).</li>
                <li>
                  <t>The second element, namely 'role_filter', is a CBOR array. Each element of the array contains one role or a combination of roles for the group identified by GROUPNAME. This parameter indicates that the Client wishes to receive the authentication credentials of all the group members having any of the specified roles or combination of roles (i.e., having any of those single roles or at least all the roles indicated in any of those combinations of roles).      </t>
                  <t>
For example, the array ["role1", "role2+role3"] indicates that the Client wishes to receive the authentication credentials of all group members that have at least "role1" or at least both "role2" and "role3". In the Join Request, this parameter is a non-empty array.</t>
                </li>
                <li>
                  <t>The third element, namely 'id_filter', is a CBOR array. Each element of the array contains a node identifier of a group member for the group identified by GROUPNAME. This parameter indicates that the Client wishes to receive the authentication credentials of the nodes that have or do not have the specified node identifiers based on the value of 'inclusion_flag' (i.e., as a selection by inclusive or exclusive filtering). In the Join Request, the Client does not filter authentication credentials based on node identifiers, so this parameter is an empty array.      </t>
                  <t>
In fact, when first joining the group, the Client is not expected or capable to express a filter based on node identifiers of other group members. Instead, when already a group member and sending a Join Request to rejoin, the Client is not expected to include the 'get_creds' parameter in the Join Request altogether, since it can rather retrieve authentication credentials associated with specific group identifiers as defined in <xref target="sec-key-retrieval"/>.</t>
                </li>
              </ul>

<!--[rfced] We are having some trouble parsing "using as example encoding".
May we update it as follows?

Original:
   The CDDL definition [RFC8610] of 'get_creds' is given in Figure 9,
   using as example encoding: node identifier encoded as a CBOR byte
   string; role identifier encoded as a CBOR text string, and
   combination of roles encoded as a CBOR array of roles.

Perhaps:
   The CDDL definition [RFC8610] of 'get_creds' is given in Figure 9;
   as an example, it uses a node identifier encoded as a CBOR byte
   string, a role identifier encoded as a CBOR text string, and a
   combination of roles encoded as a CBOR array of roles.
-->      
	      
              <t>
The CDDL definition <xref target="RFC8610"/> of 'get_creds' is given in <xref target="cddl-ex-getpubkeys"/>, using as example encoding: node identifier encoded as a CBOR byte string, role identifier encoded as a CBOR text string, and combination of roles encoded as a CBOR array of roles.  </t>
              <t>
Note that, for this handler, 'inclusion_flag' is always set to true and the array of roles 'role_filter' is always non-empty, while the array of node identifiers 'id_filter' is always empty. However, this is not necessarily the case for other handlers using the 'get_creds' parameter.</t>
          <figure anchor="cddl-ex-getpubkeys">
            <name>CDDL Definition of 'get_creds', Using an Example Node Identifier Encoded as bstr and Role as tstr</name>
            <sourcecode type="CDDL"><![CDATA[
inclusion_flag = bool

role = tstr
comb_role = [ 2*role ]
role_filter = [ *(role / comb_role) ]

id = bstr
id_filter = [ *id ]

get_creds = null / [ inclusion_flag, role_filter, id_filter]
]]></sourcecode>
          </figure>
        </li>

<!--[rfced] As the slash (/) can mean "and", "or", or "and/or", 
would this instance be more clear as "and/or"?

Original:
   This parameter MUST be present if the KDC is managing
   (collecting from/distributing to the Client) the authentication
   credentials of the group members and the Client's role in the
   group will require the Client to send messages to one or more
   group members.

Perhaps:
   This parameter MUST be present if the KDC is managing
   (collecting from and/or distributing to the Client) the authentication
   credentials of the group members and the Client's role in the
   group will require the Client to send messages to one or more
   group members.
-->      

            <li>'client_cred': encoded as a CBOR byte string, whose value is the original binary representation of the Client's authentication credential. This parameter <bcp14>MUST</bcp14> be present if the KDC is managing (collecting from / distributing to the Client) the authentication credentials of the group members and the Client's role in the group will require the Client to send messages to one or more group members. It is <bcp14>REQUIRED</bcp14> for application profiles to define the specific formats that are acceptable to use for authentication credentials in the group (REQ6).</li>
            <li>'cnonce': encoded as a CBOR byte string and including a dedicated nonce N_C generated by the Client. This parameter <bcp14>MUST</bcp14> be present.</li>
            <li>
              <t>'client_cred_verify': encoded as a CBOR byte string. This parameter <bcp14>MUST</bcp14> be present if the 'client_cred' parameter is present and no authentication credential associated with the Client's token can be retrieved for that group.  </t>
              <t>
This parameter contains proof-of-possession (PoP) evidence computed by the Client over the following PoP input: the scope (encoded as a CBOR byte string) concatenated with N_S (encoded as a CBOR byte string) concatenated with N_C (encoded as a CBOR byte string), where:  </t>
              <ul spacing="normal">
                <li>scope is the CBOR byte string either specified in the 'scope' parameter above, if present, or encoding a default scope entry that the handler is expected to know, if omitted;</li>
                <li>N_S is the challenge received from the KDC in the 'kdcchallenge' parameter of the 2.01 (Created) response to the Token Transfer Request (see <xref target="token-post"/>), encoded as a CBOR byte string; and</li>
                <li>N_C is the nonce generated by the Client and specified in the 'cnonce' parameter above, encoded as a CBOR byte string.</li>
              </ul>
              <t>
An example of PoP input to compute 'client_cred_verify' using CBOR encoding is given in <xref target="fig-client-cred-input"/>.  </t>
              <t>
A possible type of PoP evidence is a signature that the Client computes by using its own private key, whose corresponding public key is specified in the authentication credential carried in the 'client_cred' parameter. Application profiles of this specification <bcp14>MUST</bcp14> specify the exact approaches used to compute the PoP evidence to include in 'client_cred_verify' and <bcp14>MUST</bcp14> specify which of those approaches is used in which case (REQ14).  </t>
              <t>
If the token was not provided to the KDC through a Token Transfer Request (e.g., it is used directly to validate TLS instead), it is <bcp14>REQUIRED</bcp14> of the specific application profile to define how the challenge N_S is generated (REQ15).</t>
            </li>
            <li>'creds_repo': which can be present if the format of the Client's authentication credential in the 'client_cred' parameter is a certificate.

<!--[rfced] We are having trouble understanding "has as value the URI".
May we update it for clarity?

Original:
   In such a case, this parameter has as value the URI of the certificate.

Perhaps:
   In such a case, this parameter has as its value the URI of the certificate.

Or:
   In such a case, this parameter is set to the URI of the certificate.
-->

	    In such a case, this parameter has as value the URI of the certificate. This parameter is encoded as a CBOR text string. Alternative specific encodings of this parameter <bcp14>MAY</bcp14> be defined in application profiles of this specification (OPT6).</li>
            <li>
              <t>'control_uri': whose value is a full URI, encoded as a CBOR text string. A default url-path is /ace-group/GROUPNAME/node, although implementations can use different ones instead. The URI <bcp14>MUST NOT</bcp14> have url-path /ace-group/GROUPNAME.  </t>
              <t>
If 'control_uri' is specified in the Join Request, the Client acts as a CoAP server and hosts a resource at this specific URI. The KDC <bcp14>MAY</bcp14> use this URI to send CoAP requests to the Client (acting as a CoAP server in this exchange), for example, for one-to-one provisioning of new group keying material when performing a group rekeying (see <xref target="update-keys"/>) or to inform the Client of its removal from the group (see <xref target="sec-node-removal"/>).  </t>
              <t>
In particular, this resource is intended for communications exclusively concerning the group identified by GROUPNAME and whose group name is specified in the 'scope' parameter, if present. If the KDC does not implement mechanisms using this resource for that group, it can ignore this parameter. Other additional functionalities of this resource <bcp14>MAY</bcp14> be defined in application profiles of this specifications (OPT7).</t>
            </li>
          </ul>
          <figure anchor="fig-client-cred-input">
            <name>Example of PoP Input to Compute 'client_cred_verify' Using CBOR Encoding</name>
            <artwork><![CDATA[
scope, N_S, and N_C expressed in CBOR diagnostic notation:
  scope = h'826667726f7570316673656e646572'
  N_S   = h'018a278f7faab55a'
  N_C   = h'25a8991cd700ac01'


scope, N_S, and N_C as CBOR encoded byte strings:
  scope = 0x4f826667726f7570316673656e646572
  N_S   = 0x48018a278f7faab55a
  N_C   = 0x4825a8991cd700ac01

PoP input:
  0x4f 826667726f7570316673656e646572
    48 018a278f7faab55a 48 25a8991cd700ac01
]]></artwork>
          </figure>
          <t>If the request does not include a 'scope' field, the KDC is expected to understand what roles the Client is requesting to join the group with. For example, as per the access token, the Client might have been granted access to the group with only one role. If the KDC cannot determine which exact roles should be considered for the Client, it <bcp14>MUST</bcp14> reply with a 4.00 (Bad Request) error response.</t>
          <t>The handler considers the scope specified in the access token associated with the Client and checks the scope entry related to the group identified by the GROUPNAME associated with the endpoint. In particular, the handler checks whether the set of roles specified in that scope entry includes all the roles that the Client wishes to have in the group as per the Join Request. If this is not the case, the KDC <bcp14>MUST</bcp14> reply with a 4.03 (Forbidden) error response.</t>
          <t>If the KDC manages the group members' authentication credentials, the handler checks if one is included in the 'client_cred' field. If so, the KDC retrieves the authentication credential and performs the following actions.</t>
          <ul spacing="normal">
            <li>If the access token was provided through a Token Transfer Request (see <xref target="token-post"/>) but the KDC cannot retrieve the 'kdcchallenge' associated with this Client (see <xref target="token-post"/>), the KDC <bcp14>MUST</bcp14> reply with a 4.00 (Bad Request) error response, which <bcp14>MUST</bcp14> also have Content-Format application/ace-groupcomm+cbor. The payload of the error response is a CBOR map including a newly generated 'kdcchallenge' value, which is specified in the 'kdcchallenge' parameter. The KDC <bcp14>MUST</bcp14> store the newly generated value as the 'kdcchallenge' value associated with this Client, replacing the currently stored value (if any).</li>
            <li>
              <t>The KDC checks the authentication credential to be valid for the group identified by GROUPNAME. That is, it checks that the authentication credential has the format used in the group, is intended for the public key algorithm used in the group, and is aligned with the possible associated parameters used in the group.  </t>
              <t>
If this verification fails, the handler <bcp14>MUST</bcp14> reply with a 4.00 (Bad Request) error response. The response <bcp14>MUST</bcp14> have Content-Format set to application/concise-problem-details+cbor and is formatted as defined in <xref target="kdc-if-errors"/>. Within the Custom Problem Detail entry 'ace-groupcomm-error', the value of the 'error-id' field  <bcp14>MUST</bcp14> be set to 2 ("Authentication credential incompatible with the group configuration").</t>
            </li>
            <li>
              <t>The KDC verifies the PoP evidence contained in the 'client_cred_verify' field. Application profiles of this specification <bcp14>MUST</bcp14> specify the exact approaches used to verify the PoP evidence and <bcp14>MUST</bcp14> specify which of those approaches is used in which case (REQ14).  </t>
              <t>
If the PoP evidence does not pass verification, the handler <bcp14>MUST</bcp14> reply with a 4.00 (Bad Request) error response. The response <bcp14>MUST</bcp14> have Content-Format set to application/concise-problem-details+cbor and is formatted as defined in <xref target="kdc-if-errors"/>. Within the Custom Problem Detail entry 'ace-groupcomm-error', the value of the 'error-id' field  <bcp14>MUST</bcp14> be set to 3 ("Invalid Proof-of-Possession evidence").</t>
            </li>
          </ul>
          <t>If no authentication credential is included in the 'client_cred' field, the handler checks if an authentication credential is already associated with the received access token and to the group identified by GROUPNAME (see also <xref target="ssec-key-distribution-exchange"/>). Note that the same joining node may use different authentication credentials in different groups, and all those authentication credentials would be associated with the same access token.</t>
          <t>If an eligible authentication credential for the Client is neither present in the 'client_cred' field nor retrieved from the stored ones at the KDC, it is <bcp14>RECOMMENDED</bcp14> that the handler stops the processing and replies with a 4.00 (Bad Request) error response. Application profiles <bcp14>MAY</bcp14> define alternatives (OPT8).</t>
          <t>If, regardless of the reason, the KDC replies with a 4.00 (Bad Request) error response, the payload of the response <bcp14>MAY</bcp14> be a CBOR map. For instance, the CBOR map can include a 'sign_info' parameter formatted as 'sign_info_res' defined in <xref target="sign-info"/>, with the 'cred_fmt' element set to the CBOR simple value "null" (0xf6) if the Client sent its own authentication credential and the KDC is not set to store authentication credentials of the group members. When the response payload is a CBOR map including such parameters, the error response has Content-Format set to application/ace-groupcomm+cbor.</t>
          <t>If all the verifications above succeed, the KDC proceeds as follows.</t>
          <t>First, only in case the Client is not already a group member, the handler performs the following actions:</t>
          <ul spacing="normal">
            <li>The handler adds the Client to the list of current members of the group.</li>
            <li>The handler assigns a name NODENAME to the Client and creates a sub-resource to /ace-group/GROUPNAME at the KDC, i.e., "/ace-group/GROUPNAME/nodes/NODENAME".</li>
            <li>The handler associates the node identifier NODENAME with the access token and the secure communication association for the Client.</li>
          </ul>
          <t>Then, the handler performs the following actions.</t>
          <ul spacing="normal">
            <li>
              <t>If the KDC manages the group members' authentication credentials:  </t>
              <ul spacing="normal">
                <li>The handler associates the retrieved Client's authentication credential to the tuple composed of the node name NODENAME, the group name GROUPNAME, and the received access token.</li>
                <li>The handler adds the retrieved Client's authentication credential to the stored list of authentication credentials stored for the group identified by GROUPNAME. If such a list already includes an authentication credential for the Client, but a different authentication credential is specified in the 'client_cred' field, then the handler <bcp14>MUST</bcp14> replace the old authentication credential in the list with the one specified in the 'client_cred' field.</li>
              </ul>
            </li>
            <li>If backward security is prescribed by application policies installed at the KDC or by the used application profile of this specification, then the KDC <bcp14>MUST</bcp14> generate new group keying material and securely distribute it to the current group members (see <xref target="sec-group-rekeying"/>).</li>
            <li>The handler returns a successful Join Response, as defined below, containing the symmetric group keying material; the group policies; and the authentication credentials of the current members of the group if the KDC manages those and the Client requested them.</li>
          </ul>
          <t>The Join Response <bcp14>MUST</bcp14> have response code 2.01 (Created) if the Client has been added to the list of group members in this join exchange (see above) or 2.04 (Changed) otherwise, i.e., if the Client is rejoining the group without having left it.</t>
          <t>The Join Response message <bcp14>MUST</bcp14> include the Location-Path CoAP option, specifying the URI path to the sub-resource associated with the Client, i.e., "/ace-group/GROUPNAME/nodes/NODENAME".</t>
          <t>The Join Response message <bcp14>MUST</bcp14> have Content-Format application/ace-groupcomm+cbor. The payload of the response is formatted as a CBOR map, which <bcp14>MUST</bcp14> contain the following fields and values.</t>
          <ul spacing="normal">
            <li>'gkty': identifying the key type of the keying material specified in the 'key' parameter. This parameter is encoded as a CBOR integer or a CBOR text string. The set of values can be found in the "Key Type" column of the "ACE Groupcomm Key Types" registry. Implementations <bcp14>MUST</bcp14> verify that the key type matches the application profile being used, if present, as registered in the "ACE Groupcomm Key Types" registry.</li>
            <li>'key': containing the keying material for the group communication or information required to derive it.</li>
            <li>'num': containing the version number of the keying material for the group communication, formatted as a CBOR integer. This is a strictly monotonic increasing field. The application profile <bcp14>MUST</bcp14> define the initial version number (REQ16).</li>
          </ul>
          <t>The exact type of the keying material specified in the 'key' parameter <bcp14>MUST</bcp14> be defined in application profiles of this specification (REQ17), together with values of 'gkty' accepted by the application (REQ18). Additionally, documents specifying a type of keying material <bcp14>MUST</bcp14> register an entry in the "ACE Groupcomm Key Types" registry defined in <xref target="iana-key"/>, including its name, the corresponding value for the 'gkty parameter', and the application profile to be used with.</t>
      
	  <table anchor="fig-gkty">	    
	    <name>ACE Groupcomm Key Types</name>
		<thead>
		  <tr>
		    <th>Name</th>
		    <th>Key Type Value</th>
		    <th>Profile</th>
		    <th>Description</th>
		    <th>Reference</th>
		  </tr>
		</thead>
		<tbody>
		  <tr>
		    <td>Reserved</td>
		    <td>0</td>
		    <td></td>
		    <td>This value is reserved</td>
		    <td>RFC 9594</td>
		  </tr>
		</tbody>
	      </table>

          <t>The Join Response <bcp14>SHOULD</bcp14> contain the following parameters:</t>
          <ul spacing="normal">
            <li>'exp': with the value of the expiration time of the keying material for the group communication, encoded as a CBOR unsigned integer. This field contains a numeric value representing the number of seconds from 1970-01-01T00:00:00Z UTC until the specified UTC date/time, ignoring leap seconds, analogous to what is specified for NumericDate in <xref section="2" sectionFormat="of" target="RFC7519"/>. Group members <bcp14>MUST NOT</bcp14> use the keying material after the time indicated in this field, and they can retrieve the new group keying material from the KDC.</li>
            <li>'exi': with the value of the residual lifetime of the keying material for the group communication, encoded as a CBOR unsigned integer. If the 'exp' parameter is included, this parameter <bcp14>MUST</bcp14> also be included. This field contains a numeric value representing the residual lifetime of the keying material in seconds, i.e., the number of seconds between the current time at the KDC and the time when the keying material expires (as specified in the 'exp' parameter, if present). A Client determines the expiration time of the keying material by adding the seconds specified in the 'exi' parameter to its current time upon receiving the response containing the 'exi' parameter. The Client <bcp14>MUST NOT</bcp14> use the keying material after such an expiration time, and it can retrieve the new group keying material from the KDC.</li>
          </ul>
          <t>If a Client has a reliable way to synchronize its internal clock with UTC, and both the 'exp' and 'exi' parameters are present, then the Client <bcp14>MUST</bcp14> use the 'exp' parameter value as expiration time for the group keying material. Otherwise, the Client uses the 'exi' parameter value.</t>
          <t>When a Client relies on the 'exi' parameter, the expiration time that it computes is offset in the future with respect to the actual expiration time as intended by the KDC and specified in the 'exp' parameter (if present). Such an offset is the amount of time between when the KDC sends the response message including the 'exi' parameter and when the Client receives that message. That is, especially if the delivery of the response to the Client is delayed, the Client will believe the keying material to be valid for a longer time than the KDC actually means. However, before approaching the actual expiration time, the KDC is expected to rekey the group and distribute new keying material (see <xref target="sec-group-rekeying"/>).</t>
          <t>Optionally, the Join Response <bcp14>MAY</bcp14> contain the following parameters, which, if included, <bcp14>MUST</bcp14> have the format and value as specified below.</t>
          <ul spacing="normal">
            <li><t>'ace_groupcomm_profile': with the value of a CBOR integer that <bcp14>MUST</bcp14> be used to uniquely identify the application profile for group communication. Applications of this specification <bcp14>MUST</bcp14> register an application profile identifier and the related value for this parameter in the "ACE Groupcomm Profiles" registry (REQ19).</t>
	  
          <table anchor="ace-groupcomm-profile-0">
            <name>ACE Groupcomm Profiles</name>
            <thead>
	      <tr>
		<th>Name</th>
		<th>Description</th>
		<th>CBOR Value</th>
		<th>Reference</th>
	      </tr>
	    </thead>
	    <tbody>
	      <tr>
		<td>Reserved</td>
		<td>This value is reserved</td>
		<td>0</td>
		<td>[RFC-XXXX</td>
	      </tr>
	    </tbody>
	  </table>
	  
	    </li>
            <li>'creds': which <bcp14>MUST</bcp14> be present if 'get_creds' was present in the request; otherwise, it <bcp14>MUST NOT</bcp14> be present. This parameter is a CBOR array specifying the authentication credentials of the group members, i.e., of all of them or of the ones selected according to the 'get_creds' parameter in the request. In particular, each element of the array is a CBOR byte string, whose value is the original binary representation of a group member's authentication credential. It is <bcp14>REQUIRED</bcp14> for application profiles to define the specific formats of authentication credentials that are acceptable to use in the group (REQ6).</li>
            <li>
              <t>'peer_roles': which <bcp14>SHOULD</bcp14> be present if 'creds' is also present; otherwise, it <bcp14>MUST NOT</bcp14> be present. This parameter is a CBOR array of n elements, where n is the number of authentication credentials included in the 'creds' parameter (at most, the number of members in the group). The i-th element of the array specifies the role(s) that the group member associated with the i-th authentication credential in 'creds' has in the group. In particular, each array element is encoded like the role element of a scope entry, which is consistent with the used format (see <xref target="ssec-authorization-request"/>).  </t>
              <t>
This parameter <bcp14>MAY</bcp14> be omitted if the Client can rely on other means to unambiguously gain knowledge of the role of each group member whose associated authentication credential is specified in the 'creds' parameter. For example, all such group members may have the same role in the group joined by the Client, and such a role can be unambiguously assumed by the Client (e.g., based on what is defined in the used application profile of this specification). As another example, each of the authentication credentials specified in the 'creds' parameter can indicate the role(s) that the corresponding group member has in the group joined by the Client.  </t>
              <t>
When receiving the authentication credential of a Client in the 'client_cred' parameter of a Join Request (see <xref target="ssec-key-distribution-exchange"/>) or of an Authentication Credential Update Request (see <xref target="update-pub-key"/>), the KDC is not expected to check that the authentication credential indicates the role(s) that the Client can have or has in the group in question. When preparing a Join Response, the KDC can decide whether to include the 'peer_roles' parameter, depending on the specific set of authentication credentials specified in the 'creds' parameter of that Join Response.</t>
            </li>
            <li>'peer_identifiers': which <bcp14>MUST</bcp14> be present if 'creds' is also present; otherwise, it <bcp14>MUST NOT</bcp14> be present. This parameter is a CBOR array of n elements, where n is the number of authentication credentials included in the 'creds' parameter (at most, the number of members in the group). The i-th element of the array specifies the node identifier that the group member associated with the i-th authentication credential in 'creds' has in the group. In particular, the i-th array element is encoded as a CBOR byte string, whose value is the node identifier of the group member. The specific format of node identifiers of group members is specified by the application profile (REQ25).</li>
            <li><t>'group_policies': with the value of a CBOR map, whose entries specify how the group handles specific management aspects. These include, for instance, approaches to achieve synchronization of sequence numbers among group members. The elements of this field are registered in the "ACE Groupcomm Policies" registry. This specification defines the three elements "Sequence Number Synchronization Methods", "Key Update Check Interval", and "Expiration Delta", which are summarized in <xref target="fig-ACE-Groupcomm-Policies"/>.

<!--[rfced] Should "content format" be updated to "Content-Format" to 
match usage throughout the rest of the document?

Original:
   Application profiles that build on this document MUST specify the
   exact content format and default value of included map entries
   (REQ20).
-->      

	    Application profiles that build on this document <bcp14>MUST</bcp14> specify the exact content format and default value of included map entries (REQ20).</t>
<table anchor="fig-ACE-Groupcomm-Policies">
  <name>ACE Groupcomm Policies</name>
    <thead>
      <tr>
	<th>Name</th>
	<th>CBOR Label</th>
	<th>CBOR Type</th>
	<th>Description</th>
	<th>Reference</th>
      </tr>
    </thead>
    <tbody>
      <tr>
	<td>Sequence Number Synchronization Method</td>
	<td>0</td>
	<td>int or tstr</td>
	<td> Method for recipient group members to synchronize with sequence numbers of sender group members. Its value is taken from the "Value" column of the "Sequence Number Synchronization Method" registry.</td>
	<td>RFC 9594</td>
      </tr>
      <tr>
	<td>Key Update Check Interval</td>
	<td>1</td>
	<td>int</td>
	<td>Polling interval in seconds for group members to check at the KDC if the latest group keying material is the one that they store.</td>
	<td>RFC 9594</td>
      </tr>
      <tr>
	<td>Expiration Delta</td>
	<td>2</td>
	<td>uint</td>
	<td>Number of seconds from 'exp' until a UTC date/time, after which group members MUST stop using the group keying material that they store to decrypt incoming messages.</td>
	<td>RFC 9594</td>
      </tr>
    </tbody>
  </table>
	    </li>
            <li>
              <t>'kdc_cred': encoded as a CBOR byte string, whose value is the original binary representation of the KDC's authentication credential. This parameter is used if the KDC has an associated authentication credential and this is required for the correct group operation. It is <bcp14>REQUIRED</bcp14> for application profiles to define whether the KDC has an authentication credential or not and if this has to be provided through the 'kdc_cred' parameter (REQ8).  </t>
              <t>
In such a case, the KDC's authentication credential <bcp14>MUST</bcp14> have the same format used for the authentication credentials of the group members. It is <bcp14>REQUIRED</bcp14> for application profiles to define the specific formats that are acceptable to use for the authentication credentials in the group (REQ6).</t>
            </li>
            <li>'kdc_nonce': encoded as a CBOR byte string and including a dedicated nonce N_KDC generated by the KDC. This parameter <bcp14>MUST</bcp14> be present if the 'kdc_cred' parameter is present.</li>
            <li>
              <t>'kdc_cred_verify': encoded as a CBOR byte string. This parameter <bcp14>MUST</bcp14> be present if the 'kdc_cred' parameter is present.  </t>
              <t>
This parameter contains proof-of-possession (PoP) evidence computed by the KDC over the following PoP input: the nonce N_C (encoded as a CBOR byte string) concatenated with the nonce N_KDC (encoded as a CBOR byte string), where:  </t>
              <ul spacing="normal">
                <li>N_C is the nonce generated by the Client and specified in the 'cnonce' parameter of the Join Request, encoded as a CBOR byte string.</li>
                <li>N_KDC is the nonce generated by the KDC and specified in the 'kdc_nonce' parameter, encoded as a CBOR byte string.</li>
              </ul>
              <t>
An example of PoP input to compute 'kdc_cred_verify' using CBOR encoding is given in <xref target="fig-kdc-cred-input"/>.  </t>
              <t>
A possible type of PoP evidence is a signature that the KDC computes by using its own private key, whose corresponding public key is specified in the authentication credential carried in the 'kdc_cred' parameter. Application profiles of this specification <bcp14>MUST</bcp14> specify the exact approaches used by the KDC to compute the PoP evidence to include in 'kdc_cred_verify' and <bcp14>MUST</bcp14> specify which of those approaches is used in which case (REQ21).</t>
            </li>
            <li><t>'rekeying_scheme': identifying the rekeying scheme that the KDC uses to provide new group keying material to the group members. This parameter is encoded as a CBOR integer, whose value is taken from the "Value" column of the "ACE Groupcomm Rekeying Schemes" registry defined in <xref target="iana-ace-groupcomm-rekeying-schemes"/> of this specification.</t>
	  
          <table anchor="rekeying-scheme-0">
            <name>ACE Groupcomm Rekeying Schemes</name>
	    <thead>
	      <tr>
	      <th>Value</th>
	      <th>Name</th>
	      <th>Description</th>
	      <th>Reference</th>
	    </tr>
	    </thead>
	    <tbody>
	      <tr>
	      <td>0</td>
	      <td>Point-to-Point</td>
	      <td>The KDC individually targets each node to rekey, using the pairwise secure communication association with that node</td>
	      <td>RFC 9594</td>
	      </tr>
	    </tbody>
	  </table>
           
          <t>Application profiles of this specification <bcp14>MAY</bcp14> define a default group rekeying scheme to refer to in case the 'rekeying_scheme' parameter is not included in the Join Response (OPT9).</t>
	    </li>
            <li>
              <t>'mgt_key_material': encoded as a CBOR byte string and containing the specific administrative keying material that the joining node requires in order to participate in the group rekeying process performed by the KDC. This parameter <bcp14>MUST NOT</bcp14> be present if the 'rekeying_scheme' parameter is not present and the application profile does not specify a default group rekeying scheme to use in the group. Some simple rekeying schemes may not require specific administrative keying material to be provided, e.g., the basic "Point-to-Point" group rekeying scheme (see <xref target="point-to-point-rekeying"/>).  </t>
              <t>
In more advanced group rekeying schemes, the administrative keying material can be composed of multiple keys organized, for instance, into a logical tree hierarchy, whose root key is the only administrative key shared by all the group members. In such a case, each group member is exclusively associated with one leaf key in the hierarchy and stores only the administrative keys from the associated leaf key all the way up along the path to the root key. That is, different group members can be provided with a different subset of the overall administrative keying material.  </t>
              <t>
		It is expected from separate documents to define how the advanced group rekeying scheme, possibly indicated in the 'rekeying_scheme' parameter, is used by an application profile of this specification. This includes defining the format of the administrative keying material to specify in 'mgt_key_material' consistently with the group rekeying scheme and the application profile in question.</t>
            </li>
            <li>
              <t>'control_group_uri': with a full URI as the value, encoded as a CBOR text string. The URI <bcp14>MUST</bcp14> specify addressing information intended to reach all the members in the group. For example, this can be a multicast IP address, optionally together with a port number that, if omitted, defaults to 5683, i.e., the default port number for the "coap" URI scheme (see <xref section="6.1" sectionFormat="of" target="RFC7252"/>). The URI <bcp14>MUST</bcp14> include GROUPNAME in the url-path. A default url-path is /ace-group/GROUPNAME, although implementations can use different ones instead. The URI <bcp14>MUST NOT</bcp14> have url-path /ace-group/GROUPNAME/node.  </t>
              <t>
If 'control_group_uri' is included in the Join Response, the Clients supporting this parameter act as CoAP servers, host a resource at this specific URI, and listen to the specified addressing information.  </t>
              <t>
The KDC <bcp14>MAY</bcp14> use this URI to send one-to-many CoAP requests to the Client group members (acting as CoAP servers in this exchange), for example, for one-to-many provisioning of new group keying material when performing a group rekeying (see <xref target="update-keys"/>) or to inform the Clients of their removal from the group (see <xref target="sec-node-removal"/>).  </t>
              <t>
In particular, this resource is intended for communications exclusively concerning the group identified by GROUPNAME and whose group name was specified in the 'scope' parameter of the Join Request, if present. If the KDC does not implement mechanisms using this resource for that group, it can ignore this parameter. Other additional functionalities of this resource <bcp14>MAY</bcp14> be defined in application profiles of this specifications (OPT10).</t>
            </li>
          </ul>
          <figure anchor="fig-kdc-cred-input">
            <name>Example of PoP Input to Compute 'kdc_cred_verify' Using CBOR Encoding</name>
            <artwork><![CDATA[
N_C and N_KDC expressed in CBOR diagnostic notation:
  N_C   = h'25a8991cd700ac01'
  N_KDC = h'cef04b2aa791bc6d'


N_C and N_KDC as CBOR encoded byte strings:
  N_C   = 0x4825a8991cd700ac01
  N_KDC = 0x48cef04b2aa791bc6d

PoP input:
  0x48 25a8991cd700ac01 48 cef04b2aa791bc6d
]]></artwork>
          </figure>
          <t>After sending the Join Response, if the KDC has an associated authentication credential, the KDC <bcp14>MUST</bcp14> store the N_C value specified in the 'cnonce' parameter of the Join Request as a 'clientchallenge' value associated with the Client, replacing the currently stored value (if any). If, as a group member, the Client later sends a GET request to the /ace-group/GROUPNAME/kdc-cred resource for retrieving the latest KDC's authentication credential (see <xref target="kdc-pub-key-get"/>), then the KDC is able to use the stored 'clientchallenge' for computing PoP evidence to include in the response sent to the Client, hence proving the possession of its own private key.</t>
          <t>If the Join Response includes the 'kdc_cred_verify' parameter, the Client verifies the conveyed PoP evidence and considers the group joining unsuccessful in case of failed verification. Application profiles of this specification <bcp14>MUST</bcp14> specify the exact approaches used by the Client to verify the PoP evidence in 'kdc_cred_verify' and <bcp14>MUST</bcp14> specify which of those approaches is used in which case (REQ21).</t>
          <t>Specific application profiles that build on this document <bcp14>MUST</bcp14> specify the communication protocol that members of the group use to communicate with each other (REQ22) and how exactly the keying material is used to protect the group communication (REQ23).</t>
          <section anchor="ssec-key-distribution-exchange">
            <name>Join the Group</name>
            <t><xref target="fig-key-distr-join"/> gives an overview of the join exchange between the Client and the KDC when the Client first joins a group, while <xref target="fig-key-distr-join-2"/> shows an example.</t>
            <figure anchor="fig-key-distr-join">
              <name>Message Flow of the Join Request-Response</name>
              <artwork align="center"><![CDATA[
Client                                                     KDC
   |                                                        |
   |-------- Join Request: POST /ace-group/GROUPNAME ------>|
   |                                                        |
   |<------------ Join Response: 2.01 (Created) ----------- |
   | Location-Path = "/ace-group/GROUPNAME/nodes/NODENAME"  |
]]></artwork>
            </figure>
            <figure anchor="fig-key-distr-join-2">
              <name>Example of the First Join Request-Response for Group Joining</name>
              <artwork align="center"><![CDATA[
Request:

Header: POST (Code=0.02)
Uri-Host: "kdc.example.com"
Uri-Path: "ace-group"
Uri-Path: "g1"
Content-Format: "application/ace-groupcomm+cbor"
Payload (in CBOR diagnostic notation,
         with AUTH_CRED and POP_EVIDENCE being CBOR byte strings):
  { "scope": << [ "group1", ["sender", "receiver"] ] >> ,
    "get_creds": [true, ["sender"], []], "client_cred": AUTH_CRED,
    "cnonce": h'25a8991cd700ac01', "client_cred_verify": POP_EVIDENCE }

Response:

Header: Created (Code=2.01)
Content-Format: "application/ace-groupcomm+cbor"
Location-Path: "kdc.example.com"
Location-Path: "g1"
Location-Path: "nodes"
Location-Path: "c101"
Payload (in CBOR diagnostic notation,
         with KEY, AUTH_CRED_1, AUTH_CRED_2,
         ID_1, and ID_2 being CBOR byte strings):
  { "gkty": 13, "key": KEY, "num": 12, "exp": 1924992000,
    "exi": 2592000, "creds": [ AUTH_CRED_1, AUTH_CRED_2 ],
    "peer_roles": ["sender", ["sender", "receiver"]],
    "peer_identifiers": [ ID1, ID2 ] }
]]></artwork>
            </figure>
            <t>If not previously established, the Client and the KDC <bcp14>MUST</bcp14> first establish a pairwise-secure communication association (REQ24). This can be achieved, for instance, by using a transport profile of ACE. The join exchange <bcp14>MUST</bcp14> occur over that secure communication association. The Client and the KDC <bcp14>MAY</bcp14> use that same secure communication association to protect further pairwise communications that must be protected.</t>
            <t>It is <bcp14>REQUIRED</bcp14> that the secure communication association between the Client and the KDC is established by using the proof-of-possession key bound to the access token. As a result, the proof of possession to bind the access token to the Client is performed by using the proof-of-possession key bound to the access token for establishing secure communication between the Client and the KDC.</t>
            <t>To join the group, the Client sends a CoAP POST request to the /ace-group/GROUPNAME endpoint at the KDC, where the group to join is identified by GROUPNAME. The group name is specified in the scope entry conveyed by the 'scope' parameter of the request (if present), formatted as specified in <xref target="gid-post"/>. This group name is the same as in the scope entry corresponding to that group, specified in the 'scope' parameter of the Authorization Request/Response, or it can be retrieved from it. Note that, in case of successful joining, the Client will receive the URI to retrieve individual keying material and to leave the group in the Location-Path option of the response.</t>
            <t>If the node is joining a group for the first time and the KDC maintains the authentication credentials of the group members, the Client is <bcp14>REQUIRED</bcp14> to send its own authentication credential and proof-of-possession (PoP) evidence in the Join Request (see the 'client_cred' and 'client_cred_verify' parameters in <xref target="gid-post"/>). The request is accepted only if both the authentication credential is provided and the PoP evidence is successfully verified.</t>
            <t>If a node rejoins a group as authorized by the same access token and using the same authentication credential, it can omit the authentication credential and the PoP evidence, or just the PoP evidence, from the Join Request. Then, the KDC will be able to retrieve the node's authentication credential associated with the access token for that group. If the authentication credential has been discarded, the KDC replies with a 4.00 (Bad Request) error response, as specified in <xref target="gid-post"/>. If a node rejoins a group but wants to update its own authentication credential, it needs to include both its authentication credential and the PoP evidence in the Join Request like when it joined the group for the first time.</t>
          </section>
        </section>
        <section anchor="gid-get">
          <name>GET Handler</name>
          <t>The GET handler returns the symmetric group keying material for the group identified by GROUPNAME.</t>
          <t>The handler expects a GET request.</t>
          <t>In addition to what is defined in <xref target="kdc-if-errors"/>, the handler verifies that the Client is a current member of the group. If the verification fails, the KDC <bcp14>MUST</bcp14> reply with a 4.03 (Forbidden) error response. The response <bcp14>MUST</bcp14> have Content-Format set to application/concise-problem-details+cbor and is formatted as defined in <xref target="kdc-if-errors"/>. Within the Custom Problem Detail entry 'ace-groupcomm-error', the value of the 'error-id' field  <bcp14>MUST</bcp14> be set to 0 ("Operation permitted only to group members").</t>
          <t>If all verifications succeed, the handler replies with a 2.05 (Content) response containing the symmetric group keying material. The payload of the response is formatted as a CBOR map that <bcp14>MUST</bcp14> contain the parameters 'gkty', 'key', and 'num', as specified in <xref target="gid-post"/>.</t>
          <t>Each of the following parameters specified in <xref target="gid-post"/> <bcp14>MUST</bcp14> also be included in the payload of the response if they are included in the payload of the Join Responses sent for the group: 'rekeying_scheme' and 'mgt_key_material'.</t>
          <t>The payload <bcp14>MAY</bcp14> also include the parameters 'ace_groupcomm_profile', 'exp', and 'exi', as specified in <xref target="gid-post"/>. If the 'exp' parameter is included, the 'exi' parameter <bcp14>MUST</bcp14> also be included. If the parameter 'exi' is included, its value specifies the residual lifetime of the group keying material from the current time at the KDC.</t>
          <section anchor="ssec-key-material-retrieval">
            <name>Retrieve Group Keying Material</name>
            <t>A node in the group can contact the KDC to retrieve the current group keying material by sending a CoAP GET request to the /ace-group/GROUPNAME endpoint at the KDC, where the group is identified by GROUPNAME.</t>
            <t><xref target="fig-retrieve-key-material"/> gives an overview of the key distribution exchange between the Client and the KDC when the Client first joins a group, while <xref target="fig-retrieve-key-material-2"/> shows an example.</t>
            <figure anchor="fig-retrieve-key-material">
              <name>Message Flow of Key Distribution Request-Response</name>
              <artwork align="center"><![CDATA[
Client                                                              KDC
   |                                                                 |
   |------ Key Distribution Request: GET /ace-group/GROUPNAME ------>|
   |                                                                 |
   |<----------- Key Distribution Response: 2.05 (Content) --------- |
   |                                                                 |
]]></artwork>
            </figure>
            <figure anchor="fig-retrieve-key-material-2">
              <name>Example of Key Distribution Request-Response</name>
              <artwork><![CDATA[
Request:

Header: GET (Code=0.01)
Uri-Host: "kdc.example.com"
Uri-Path: "ace-group"
Uri-Path: "g1"
Payload: -

Response:

Header: Content (Code=2.05)
Content-Format: "application/ace-groupcomm+cbor"
Payload (in CBOR diagnostic notation,
         with KEY being a CBOR byte strings):
  { "gkty": 13, "key": KEY, "num": 12 }
]]></artwork>
            </figure>
          </section>
        </section>
      </section>
      <section anchor="ace-groupgroupnamecreds">
        <name>/ace-group/GROUPNAME/creds</name>
        <t>This resource implements the GET and FETCH handlers.</t>
        <section anchor="pubkey-fetch">
          <name>FETCH Handler</name>
          <t>The FETCH handler receives identifiers of group members for the group identified by GROUPNAME and returns the authentication credentials of such group members.</t>
          <t>The handler expects a request with the payload formatted as a CBOR map, which <bcp14>MUST</bcp14> contain the following field.</t>
          <ul spacing="normal">
            <li>
              <t>'get_creds': whose value is encoded as in <xref target="gid-post"/> with the following modifications.  </t>
              <ul spacing="normal">
                <li>
                  <t>The arrays 'role_filter' and 'id_filter' <bcp14>MUST NOT</bcp14> both be empty, i.e., in CDDL notation: [ bool, [ ], [ ] ]. If the 'get_creds' parameter has such a format, the request <bcp14>MUST</bcp14> be considered malformed, and the KDC <bcp14>MUST</bcp14> reply with a 4.00 (Bad Request) error response.      </t>
                  <t>
Note that a group member can retrieve the authentication credentials of all the current group members by sending a GET request to the same KDC resource instead (see <xref target="sec-key-retrieval-all"/>).</t>
                </li>
                <li>The element 'inclusion_flag' encodes the CBOR simple value "true" (0xf5) or "false" (0xf4), as defined in <xref target="gid-post"/>.</li>
                <li>The array 'role_filter' can be empty if the Client does not wish to filter the requested authentication credentials based on the roles of the group members.</li>
                <li>The array 'id_filter' contains zero or more node identifiers of group members for the group identified by GROUPNAME, as defined in <xref target="gid-post"/>. The array may be empty if the Client does not wish to filter the requested authentication credentials based on the node identifiers of the group members.</li>
              </ul>
            </li>
          </ul>
          <t>Note that, in case the 'role_filter' array and the 'id_filter' array are both non-empty:</t>
          <ul spacing="normal">
            <li>If the 'inclusion_flag' encodes the CBOR simple value "true" (0xf5), the handler returns the authentication credentials of group members whose roles match with 'role_filter' and/or have their node identifier specified in 'id_filter'.</li>
            <li>If the 'inclusion_flag' encodes the CBOR simple value "false" (0xf4), the handler returns the authentication credentials of group members whose roles match with 'role_filter' and, at the same time, do not have their node identifier specified in 'id_filter'.</li>
          </ul>
          <t>The specific format of authentication credentials as well as the identifiers, roles, and combination of roles of group members <bcp14>MUST</bcp14> be specified by application profiles of this specification (REQ1, REQ6, REQ25).</t>
          <t>The handler identifies the authentication credentials of the current group members for which either of the following holds:</t>
          <ul spacing="normal">
            <li>The role identifier matches with one of those indicated in the request; note that the request can specify a combination of roles, in which case, the handler selects only the group members that have all the roles included in the combination.</li>
            <li>The node identifier matches with one of those indicated in the request or does not match with any of those, which is consistent with the value of the element 'inclusion_flag'.</li>
          </ul>
          <t>If all verifications succeed, the handler returns a 2.05 (Content) message response with the payload formatted as a CBOR map, containing only the following parameters from <xref target="gid-post"/>.</t>
          <ul spacing="normal">
            <li>'num': which encodes the version number of the current group keying material.</li>
            <li>'creds': which encodes the list of authentication credentials of the selected group members.</li>
            <li>
              <t>'peer_roles': which encodes the role(s) that each of the selected group members has in the group.  </t>
              <t>
This parameter <bcp14>SHOULD</bcp14> be present, and it <bcp14>MAY</bcp14> be omitted, according to the same criteria defined for the Join Response (see <xref target="gid-post"/>).</t>
            </li>
            <li>'peer_identifiers': which encodes the node identifier that each of the selected group members has in the group.</li>
          </ul>
          <t>The specific format of authentication credentials as well as of node identifiers of group members is specified by the application profile (REQ6, REQ25).</t>
          <t>If the KDC does not store any authentication credential associated with the specified node identifiers, the handler returns a response with the payload formatted as a CBOR byte string of zero length.</t>
          <t>The handler <bcp14>MAY</bcp14> enforce one of the following policies in order to handle possible node identifiers that are included in the 'id_filter' element of the 'get_creds' parameter of the request but are not associated with any current group member. Such a policy <bcp14>MUST</bcp14> be specified by the application profile (REQ26).</t>
          <ul spacing="normal">
            <li>The KDC silently ignores those node identifiers.</li>
            <li>
              <t>The KDC retains authentication credentials of group members for a given amount of time after their leaving before discarding them. As long as such authentication credentials are retained, the KDC provides them to a requesting Client.  </t>
              <t>
If the KDC adopts this policy, the application profile <bcp14>MUST</bcp14> also specify the amount of time during which the KDC retains the authentication credential of a former group member after its leaving, possibly on a per-member basis.</t>
            </li>
          </ul>
          <t>Note that this resource handler only verifies that the node is authorized by the AS to access this resource. Nodes that are not members of the group but are authorized to do signature verifications on the group messages may be allowed to access this resource if the application needs it.</t>
          <section anchor="sec-key-retrieval">
            <name>Retrieve a Subset of Authentication Credentials in the Group</name>
            <t>In case the KDC maintains the authentication credentials of group members, a node in the group can contact the KDC to request the authentication credentials, roles, and node identifiers of a specified subset of group members by sending a CoAP FETCH request to the /ace-group/GROUPNAME/creds endpoint at the KDC, where the group is identified by GROUPNAME and formatted as defined in <xref target="pubkey-fetch"/>.</t>
            <t><xref target="fig-public-key-1"/> gives an overview of the exchange mentioned above, while <xref target="fig-public-key-2"/> shows an example of such an exchange.</t>
            <figure anchor="fig-public-key-1">
              <name>Message Flow of Authentication Credential Request-Response to Obtain the Authentication Credentials of Specific Group Members</name>
              <artwork align="center"><![CDATA[
Client                                                      KDC
   |                                                         |
   |            Authentication Credential Request:           |
   |-------------------------------------------------------->|
   |             FETCH /ace-group/GROUPNAME/creds            |
   |                                                         |
   |<-- Authentication Credential Response: 2.05 (Created) --|
   |                                                         |
]]></artwork>
            </figure>
            <figure anchor="fig-public-key-2">
              <name>Example of Authentication Credential Request-Response to Obtain the Authentication Credentials of Specific Group Members</name>
              <artwork><![CDATA[
Request:

Header: FETCH (Code=0.05)
Uri-Host: "kdc.example.com"
Uri-Path: "ace-group"
Uri-Path: "g1"
Uri-Path: "creds"
Content-Format: "application/ace-groupcomm+cbor"
Payload (in CBOR diagnostic notation):
  { "get_creds": [true, [], [ ID_2, ID_3 ]] }

Response:

Header: Content (Code=2.05)
Content-Format: "application/ace-groupcomm+cbor"
Payload (in CBOR diagnostic notation,
         with AUTH_CRED_2, AUTH_CRED_3,
         ID_2, and ID_3 being CBOR byte strings):
  { "creds": [ AUTH_CRED_2, AUTH_CRED_3, ],
    "peer_roles": [ ["sender", "receiver"], "receiver" ],
    "peer_identifiers": [ ID_2, ID_3 ] }
]]></artwork>
            </figure>
          </section>
        </section>
        <section anchor="pubkey-get">
          <name>GET Handler</name>
          <t>The handler expects a GET request.</t>
          <t>If all verifications succeed, the KDC replies with a 2.05 (Content) response as in the FETCH handler in <xref target="pubkey-fetch"/> but specifies the authentication credentials of all the group members, together with their roles and node identifiers, in the payload.</t>
          <t>The parameter 'peer_roles' <bcp14>SHOULD</bcp14> be present in the payload of the response, and it <bcp14>MAY</bcp14> be omitted, according to the same criteria defined for the Join Response (see <xref target="gid-post"/>).</t>
          <section anchor="sec-key-retrieval-all">
            <name>Retrieve All Authentication Credentials in the Group</name>
            <t>In case the KDC maintains the authentication credentials of group members, a group or an external signature verifier can contact the KDC to request the authentication credentials, roles, and node identifiers of all the current group members by sending a CoAP GET request to the /ace-group/GROUPNAME/creds endpoint at the KDC, where the group is identified by GROUPNAME.</t>
            <t><xref target="fig-public-key-3"/> gives an overview of the message exchange, while <xref target="fig-public-key-4"/> shows an example of such an exchange.</t>
            <figure anchor="fig-public-key-3">
              <name>Message Flow of Authentication Credential Request-Response to Obtain the Authentication Credentials of All the Group Members</name>
              <artwork align="center"><![CDATA[
Client                                                      KDC
   |                                                         |
   |            Authentication Credential Request:           |
   |-------------------------------------------------------->|
   |              GET /ace-group/GROUPNAME/creds             |
   |                                                         |
   |<-- Authentication Credential Response: 2.05 (Content) --|
   |                                                         |
]]></artwork>
            </figure>
            <figure anchor="fig-public-key-4">
              <name>Example of Authentication Credential Request-Response to Obtain the Authentication Credentials of All the Group Members</name>
              <artwork><![CDATA[
Request:

Header: GET (Code=0.01)
Uri-Host: "kdc.example.com"
Uri-Path: "ace-group"
Uri-Path: "g1"
Uri-Path: "creds"
Payload: -

Response:

Header: Content (Code=2.05)
Content-Format: "application/ace-groupcomm+cbor"
Payload (in CBOR diagnostic notation,
         with AUTH_CRED_1, AUTH_CRED_2, AUTH_CRED_3,
         ID_1, ID_2, and ID_3 being CBOR byte strings):
  { "num": 5,
    "creds": [ AUTH_CRED_1, AUTH_CRED_2, AUTH_CRED_3 ],
    "peer_roles": ["sender", ["sender", "receiver"], "receiver"],
    "peer_identifiers": [ ID_1, ID_2, ID_3 ] }
]]></artwork>
            </figure>
          </section>
        </section>
      </section>
      <section anchor="ace-groupgroupnamekdc-cred">
        <name>/ace-group/GROUPNAME/kdc-cred</name>
        <t>This resource implements a GET handler.</t>
        <section anchor="kdc-pub-key-get">
          <name>GET Handler</name>
          <t>The handler expects a GET request.</t>
          <t>If all verifications succeed, the handler returns a 2.05 (Content) message containing the KDC's authentication credential together with proof-of-possession (PoP) evidence. The response <bcp14>MUST</bcp14> have Content-Format set to application/ace-groupcomm+cbor. The payload of the response is a CBOR map, which includes the following fields.</t>
          <ul spacing="normal">
            <li>'kdc_cred: specifying the KDC's authentication credential. This parameter is encoded like the 'kdc_cred' parameter in the Join Response (see <xref target="gid-post"/>).</li>
            <li>'kdc_nonce': specifying a nonce generated by the KDC. This parameter is encoded like the 'kdc_nonce' parameter in the Join Response (see <xref target="gid-post"/>).</li>
            <li>
              <t>'kdc_cred_verify': specifying PoP evidence computed by the KDC over the following PoP input: the nonce N_C (encoded as a CBOR byte string) concatenated with the nonce N_KDC (encoded as a CBOR byte string), where:  </t>
              <ul spacing="normal">

<!--[rfced] This list item (ii) is unclear. How should it be clarified?

Original:
         N_C is the nonce generated by the Client group member such
         that:  i) the nonce was specified [...]; and ii) the
         KDC stored the nonce as 'clientchallenge' value associated with
         this Client as group member after sending the corresponding
         Join Response (see Section 4.3.1).

Perhaps: 
         N_C is the nonce generated by the Client group member such
         that: i) the nonce was specified [...]; and
         ii) the KDC stored the nonce as a 'clientchallenge' value associated
         with this group member Client after sending the corresponding Join
         Response (see Section 4.3.1).

Or:
         N_C is the nonce generated by the Client group member such
         that: i) the nonce was specified [...]; and
         ii) the KDC stored the nonce as a 'clientchallenge' value and 
         as a group member associated with this Client after sending the 
         corresponding Join Response (see Section 4.3.1).
-->

                <li>N_C is the nonce generated by the Client group member such that: i) the nonce was specified in the 'cnonce' parameter of the latest Join Request that the Client sent to the KDC in order to join the group identified by GROUPNAME and ii) the KDC stored the nonce as 'clientchallenge' value associated with this Client as group member after sending the corresponding Join Response (see <xref target="gid-post"/>). This nonce is encoded as a CBOR byte string.</li>
                <li>N_KDC is the nonce generated by the KDC and specified in the 'kdc_nonce' parameter, encoded as a CBOR byte string.</li>
              </ul>
              <t>
An example of PoP input to compute 'kdc_cred_verify' using CBOR encoding is given in <xref target="fig-kdc-cred-input-2"/>.  </t>
              <t>
The PoP evidence is computed by means of the same method used for computing the PoP evidence that was included in the Join Response for this Client (see <xref target="gid-post"/>).  </t>
              <t>
Application profiles of this specification <bcp14>MUST</bcp14> specify the exact approaches used by the KDC to compute the PoP evidence to include in 'kdc_cred_verify' and <bcp14>MUST</bcp14> specify which of those approaches is used in which case (REQ21).  </t>
              <t>
If an application profile supports the presence of external signature verifiers that send GET requests to this resource, then the application profile <bcp14>MUST</bcp14> specify how external signature verifiers provide the KDC with a self-generated nonce to use as N_C (REQ21).</t>
            </li>
          </ul>
          <figure anchor="fig-kdc-cred-input-2">
            <name>Example of PoP Input to Compute 'kdc_cred_verify' Using CBOR Encoding</name>
            <artwork><![CDATA[
N_C and N_KDC expressed in CBOR diagnostic notation:
  N_C   = h'25a8991cd700ac01'
  N_KDC = h'0b7db12aaff56da3'


N_C and N_KDC as CBOR encoded byte strings:
  N_C   = 0x4825a8991cd700ac01
  N_KDC = 0x480b7db12aaff56da3

PoP input:
  0x48 25a8991cd700ac01 48 0b7db12aaff56da3
]]></artwork>
          </figure>
          <section anchor="kdc-pub-key">
            <name>Retrieve the KDC's Authentication Credential</name>
            <t>In case the KDC has an associated authentication credential as required for the correct group operation, a group member or an external signature verifier can contact the KDC to request the KDC's authentication credential by sending a CoAP GET request to the /ace-group/GROUPNAME/kdc-cred endpoint at the KDC, where GROUPNAME identifies the group.</t>
            <t>Upon receiving the 2.05 (Content) response, the Client retrieves the KDC's authentication credential from the 'kdc_cred' parameter and <bcp14>MUST</bcp14> verify the proof-of-possession (PoP) evidence specified in the 'kdc_cred_verify' parameter. In case of successful verification of the PoP evidence, the Client <bcp14>MUST</bcp14> store the obtained KDC's authentication credential and replace the currently stored one.</t>
            <t>The PoP evidence is verified by means of the same method used when processing the Join Response (see <xref target="gid-post"/>). Application profiles of this specification <bcp14>MUST</bcp14> specify the exact approaches used by the Client to verify the PoP evidence in 'kdc_cred_verify' and <bcp14>MUST</bcp14> specify which of those approaches is used in which case (REQ21).</t>
            <t><xref target="fig-kdc-pub-key-req-resp"/> gives an overview of the exchange described above, while <xref target="fig-kdc-pub-key-req-resp-ex"/> shows an example.</t>
            <figure anchor="fig-kdc-pub-key-req-resp">
              <name>Message Flow of KDC Authentication Credential Request-Response to Obtain the Authentication Credential of the KDC</name>
              <artwork align="center"><![CDATA[
Group
Member                                                         KDC
  |                                                             |
  |             KDC Authentication Credential Request           |
  |------------------------------------------------------------>|
  |               GET /ace-group/GROUPNAME/kdc-cred             |
  |                                                             |
  |<-- KDC Authentication Credential Response: 2.05 (Content) --|
  |                                                             |
]]></artwork>
            </figure>
            <figure anchor="fig-kdc-pub-key-req-resp-ex">
              <name>Example of KDC Authentication Credential Request-Response to Obtain the Authentication Credential of the KDC</name>
              <artwork><![CDATA[
Request:

Header: GET (Code=0.01)
Uri-Host: "kdc.example.com"
Uri-Path: "ace-group"
Uri-Path: "g1"
Uri-Path: "kdc-cred"
Payload: -

Response:

Header: Content (Code=2.05)
Content-Format: "application/ace-groupcomm+cbor"
Payload (in CBOR diagnostic notation, with AUTH_CRED_KDC
         and POP_EVIDENCE being CBOR byte strings):
  {
    "kdc_nonce": h'0b7db12aaff56da3',
    "kdc_cred": AUTH_CRED_KDC,
    "kdc_cred_verify": POP_EVIDENCE
  }
]]></artwork>
            </figure>
          </section>
        </section>
      </section>
      <section anchor="ace-groupgroupnamepolicies">
        <name>/ace-group/GROUPNAME/policies</name>
        <t>This resource implements the GET handler.</t>
        <section anchor="policies-get">
          <name>GET Handler</name>
          <t>The handler expects a GET request.</t>
          <t>In addition to what is defined in <xref target="kdc-if-errors"/>, the handler verifies that the Client is a current member of the group. If the verification fails, the KDC <bcp14>MUST</bcp14> reply with a 4.03 (Forbidden) error response. The response <bcp14>MUST</bcp14> have Content-Format set to application/concise-problem-details+cbor and is formatted as defined in <xref target="kdc-if-errors"/>. Within the Custom Problem Detail entry 'ace-groupcomm-error', the value of the 'error-id' field  <bcp14>MUST</bcp14> be set to 0 ("Operation permitted only to group members").</t>
          <t>If all verifications succeed, the handler replies with a 2.05 (Content) response containing the list of policies for the group identified by GROUPNAME. The payload of the response is formatted as a CBOR map including only the parameter 'group_policies' defined in <xref target="gid-post"/> and specifying the current policies in the group. If the KDC does not store any policy, the payload is formatted as a zero-length CBOR byte string.</t>
          <t>The specific format and meaning of group policies <bcp14>MUST</bcp14> be specified in the application profile (REQ20).</t>
          <section anchor="policies">
            <name>Retrieve the Group Policies</name>
            <t>A node in the group can contact the KDC to retrieve the current group policies by sending a CoAP GET request to the /ace-group/GROUPNAME/policies endpoint at the KDC, where GROUPNAME identifies the group, and is formatted as defined in <xref target="policies-get"/></t>
            <t><xref target="fig-policies"/> gives an overview of the exchange described above, while <xref target="fig-policies-2"/> shows an example.</t>
            <figure anchor="fig-policies">
              <name>Message Flow of Policies Request-Response</name>
              <artwork align="center"><![CDATA[
Client                                                       KDC
   |                                                          |
   |-- Policies Request: GET /ace-group/GROUPNAME/policies -->|
   |                                                          |
   |<----------- Policies Response: 2.05 (Content) -----------|
   |                                                          |
]]></artwork>
            </figure>
            <figure anchor="fig-policies-2">
              <name>Example of Policies Request-Response</name>
              <artwork><![CDATA[
Request:

Header: GET (Code=0.01)
Uri-Host: "kdc.example.com"
Uri-Path: "ace-group"
Uri-Path: "g1"
Uri-Path: "policies"
Payload: -

Response:

Header: Content (Code=2.05)
Content-Format: "application/ace-groupcomm+cbor"
Payload(in CBOR diagnostic notation):
  { "group_policies": {"exp-delta": 120} }
]]></artwork>
            </figure>
          </section>
        </section>
      </section>
      <section anchor="ace-groupgroupnamenum">
        <name>/ace-group/GROUPNAME/num</name>
        <t>This resource implements the GET handler.</t>
        <section anchor="num-get">
          <name>GET Handler</name>
          <t>The handler expects a GET request.</t>
          <t>In addition to what is defined in <xref target="kdc-if-errors"/>, the handler verifies that the Client is a current member of the group. If the verification fails, the KDC <bcp14>MUST</bcp14> reply with a 4.03 (Forbidden) error response. The response <bcp14>MUST</bcp14> have Content-Format set to application/concise-problem-details+cbor and is formatted as defined in <xref target="kdc-if-errors"/>. Within the Custom Problem Detail entry 'ace-groupcomm-error', the value of the 'error-id' field  <bcp14>MUST</bcp14> be set to 0 ("Operation permitted only to group members").</t>
          <t>If all verifications succeed, the handler returns a 2.05 (Content) message containing an integer that represents the version number of the symmetric group keying material. This number is incremented on the KDC every time the KDC updates the symmetric group keying material  before the new keying material is distributed. This number is stored in persistent storage.</t>
          <t>The payload of the response is formatted as a CBOR integer.</t>
          <section anchor="key-version">
            <name>Retrieve the Keying Material Version</name>
            <t>A node in the group can contact the KDC to request information about the version number of the symmetric group keying material by sending a CoAP GET request to the /ace-group/GROUPNAME/num endpoint at the KDC, where GROUPNAME identifies the group, and is formatted as defined in <xref target="num-get"/>. In particular, the version is incremented by the KDC every time the group keying material is renewed before it is distributed to the group members.</t>
            <t><xref target="fig-version"/> gives an overview of the exchange described above, while <xref target="fig-version-2"/> shows an example.</t>
            <figure anchor="fig-version">
              <name>Message Flow of Version Request-Response</name>
              <artwork align="center"><![CDATA[
Client                                                     KDC
   |                                                        |
   |---- Version Request: GET /ace-group/GROUPNAME/num ---->|
   |                                                        |
   |<---------- Version Response: 2.05 (Content) -----------|
   |                                                        |
]]></artwork>
            </figure>
            <figure anchor="fig-version-2">
              <name>Example of Version Request-Response</name>
              <artwork><![CDATA[
Request:

Header: GET (Code=0.01)
Uri-Host: "kdc.example.com"
Uri-Path: "ace-group"
Uri-Path: "g1"
Uri-Path: "num"
Payload: -

Response:

Header: Content (Code=2.05)
Payload(in CBOR diagnostic notation):
  13
]]></artwork>
            </figure>
          </section>
        </section>
      </section>
      <section anchor="node-subresource">
        <name>/ace-group/GROUPNAME/nodes/NODENAME</name>
        <t>This resource implements the GET, PUT, and DELETE handlers.</t>
        <t>In addition to what is defined in <xref target="kdc-if-errors"/>, each of the handlers performs the following two verifications.</t>
        <ul spacing="normal">
          <li>The handler verifies that the Client is a current member of the group. If the verification fails, the KDC <bcp14>MUST</bcp14> reply with a 4.03 (Forbidden) error response. The response <bcp14>MUST</bcp14> have Content-Format set to application/concise-problem-details+cbor and is formatted as defined in <xref target="kdc-if-errors"/>. Within the Custom Problem Detail entry 'ace-groupcomm-error', the value of the 'error-id' field  <bcp14>MUST</bcp14> be set to 0 ("Operation permitted only to group members").</li>
          <li>The handler verifies that the node name of the Client is equal to NODENAME used in the url-path. If the verification fails, the handler replies with a 4.03 (Forbidden) error response.</li>
        </ul>
        <section anchor="node-get">
          <name>GET Handler</name>
          <t>The handler expects a GET request.</t>
          <t>If all verifications succeed, the handler replies with a 2.05 (Content) response containing both the group keying material and the individual keying material for the Client or information enabling the Client to derive it.</t>
          <t>The payload of the response is formatted as a CBOR map, which includes the same fields of the response defined in <xref target="gid-get"/>. In particular, the format for the group keying material is the same as defined in the response of <xref target="gid-get"/>. If the 'exp' parameter is included, the 'exi' parameter <bcp14>MUST</bcp14> also be included. If the parameter 'exi' is included, its value specifies the residual lifetime of the group keying material from the current time at the KDC.</t>

<!--[rfced] These sentences are difficult to parse because of their use of
commas. May we update them as follows for clarity?

Additionally, does "it" refer to the "format"?

Original:
   The specific format of
   individual keying material for group members, or of the information
   to derive it, and corresponding CBOR label, MUST be specified in the
   application profile (REQ27) and registered in Section 11.7.
   ...
   The specific format of newly-generated individual keying
   material for group members, or of the information to derive it, and
   corresponding CBOR label, MUST be specified in the application
   profile (REQ27) and registered in Section 11.7.   

Perhaps:
   The specific format of
   individual keying material for group members or of the information
   to derive the format and corresponding CBOR label MUST be specified
   in the application profile (REQ27) and registered in Section 11.7.
   ...
   The specific format of newly generated individual keying
   material for group members or of the information to derive the format
   and corresponding CBOR label MUST be specified in the application profile
   (REQ27) and registered in Section 11.7.   
-->

          <t>The CBOR map can include additional parameters that specify the individual keying material for the Client. The specific format of individual keying material for group members, or of the information to derive it, and corresponding CBOR label, <bcp14>MUST</bcp14> be specified in the application profile (REQ27) and registered in <xref target="iana-reg"/>.</t>
          <t>Optionally, the KDC can make the sub-resource at /ace-group/GROUPNAME/nodes/NODENAME also Observable <xref target="RFC7641"/> for the associated node. In case the KDC removes that node from the group without having been explicitly asked for it, this allows the KDC to send an unsolicited 4.04 (Not Found) response to the node as a notification of eviction from the group (see <xref target="sec-node-removal"/>).</t>
          <t>Note that the node could have also been observing the resource at /ace-group/GROUPNAME in order to be informed of changes in the keying material. In such a case, this method would result in largely overlapping notifications received for the resource at /ace-group/GROUPNAME and the sub-resource at /ace-group/GROUPNAME/nodes/NODENAME.</t>
          <t>In order to mitigate this, a node that supports the No-Response option <xref target="RFC7967"/> can use it when starting the observation of the sub-resource at /ace-group/GROUPNAME/nodes/NODENAME. In particular, the GET observation request can also include the No-Response option, with value set to 2 (Not interested in 2.xx responses).</t>
          <section anchor="update-keys">
            <name>Retrieve Group and Individual Keying Material</name>
            <t>When any of the following happens, a node <bcp14>MUST</bcp14> stop using the stored group keying material to protect outgoing messages and <bcp14>SHOULD</bcp14> stop using it to decrypt and verify incoming messages.</t>
            <ul spacing="normal">
              <li>Upon expiration of the keying material, according to what is indicated by the KDC with the 'exp' and/or 'exi' parameter (e.g., in a Join Response) or to a pre-configured value.</li>
              <li>Upon receiving a notification of revoked/renewed keying material from the KDC, possibly as part of an update of the keying material (rekeying) triggered by the KDC.</li>
              <li>Upon receiving messages from other group members without being able to retrieve the keying material to correctly decrypt them. This may be due to rekeying messages previously sent by the KDC that the Client was not able to receive or decrypt.</li>
            </ul>
            <t>In either case, if it wants to continue participating in the group communication, the Client has to request the latest keying material from the KDC. To this end, the Client sends a CoAP GET request to the /ace-group/GROUPNAME/nodes/NODENAME endpoint at the KDC, formatted as specified in <xref target="node-get"/>. The Client can request the latest keying material from the KDC before the currently stored, old keying material reaches its expiration time.</t>
            <t>Note that policies can be set up so that the Client sends a Key Distribution Request to the KDC only after a given number of received messages could not be decrypted (because of failed decryption processing or the inability to retrieve the necessary keying material).</t>
            <t>It is application dependent and pertains to the particular message exchange (e.g., <xref target="I-D.ietf-core-oscore-groupcomm"/>) to set up these policies for instructing Clients to retain incoming messages and for how long (OPT11). This allows Clients to possibly decrypt such messages after getting updated keying material, rather than just consider them invalid messages to discard right away.</t>
            <t>After having failed to decrypt messages from another group member and having sent a Key Distribution Request to the KDC, the Client might end up retrieving the same, latest group keying material that it already stores. In such a case, multiple failed decryptions might be due to the message sender and/or the KDC that have changed their authentication credential. Hence, the Client can retrieve such latest authentication credentials by sending to the KDC an Authentication Credential Request (see Sections <xref target="sec-key-retrieval" format="counter"/> and <xref target="sec-key-retrieval-all" format="counter"/>) and a KDC Authentication Credential Request (see <xref target="kdc-pub-key"/>), respectively.</t>
            <t>The Client can also send to the KDC a Key Distribution Request without having been triggered by a failed decryption of a message from another group member if the Client wants to be sure that it currently stores the latest group keying material. If that is the case, the Client will receive from the KDC the same group keying material it already stores.</t>
            <t><xref target="fig-key-redistr-req-resp"/> gives an overview of the exchange described above, while <xref target="fig-key-redistr-req-resp-2"/> shows an example.</t>
            <figure anchor="fig-key-redistr-req-resp">
              <name>Message Flow of Key Distribution Request-Response</name>
              <artwork align="center"><![CDATA[
Client                                                          KDC
   |                                                             |
   |------------------ Key Distribution Request: --------------->|
   |           GET /ace-group/GROUPNAME/nodes/NODENAME           |
   |                                                             |
   |<-------- Key Distribution Response: 2.05 (Content) ---------|
   |                                                             |
]]></artwork>
            </figure>
            <figure anchor="fig-key-redistr-req-resp-2">
              <name>Example of Key Distribution Request-Response</name>
              <artwork><![CDATA[
Request:

Header: GET (Code=0.01)
Uri-Host: "kdc.example.com"
Uri-Path: "ace-group"
Uri-Path: "g1"
Uri-Path: "nodes"
Uri-Path: "c101"
Payload: -

Response:

Header: Content (Code=2.05)
Content-Format: "application/ace-groupcomm+cbor"
Payload (in CBOR diagnostic notation,
         with KEY and IND_KEY being CBOR byte strings,
         and "ind-key" being the profile-specified label
         for individual keying material):
  { "gkty": 13, "key": KEY, "num": 12, "ind-key": IND_KEY }
]]></artwork>
            </figure>
          </section>
        </section>
        <section anchor="node-put">
          <name>PUT Handler</name>
          <t>The PUT handler processes requests from a Client that asks for new individual keying material, as required to process messages exchanged in the group.</t>
          <t>The handler expects a PUT request with an empty payload.</t>
          <t>In addition to what is defined in <xref target="kdc-if-errors"/> and at the beginning of <xref target="node-subresource"/>, the handler verifies that this operation is consistent with the set of roles that the Client has in the group (REQ11). If the verification fails, the KDC <bcp14>MUST</bcp14> reply with a 4.00 (Bad Request) error response. The response <bcp14>MUST</bcp14> have Content-Format set to application/concise-problem-details+cbor and is formatted as defined in <xref target="kdc-if-errors"/>. Within the Custom Problem Detail entry 'ace-groupcomm-error', the value of the 'error-id' field  <bcp14>MUST</bcp14> be set to 1 ("Request inconsistent with the current roles").</t>
          <t>If the KDC is currently not able to serve this request, i.e., to generate new individual keying material for the requesting Client, the KDC <bcp14>MUST</bcp14> reply with a 5.03 (Service unavailable) error response. The response <bcp14>MUST</bcp14> have Content-Format set to application/concise-problem-details+cbor and is formatted as defined in <xref target="kdc-if-errors"/>. Within the Custom Problem Detail entry 'ace-groupcomm-error', the value of the 'error-id' field  <bcp14>MUST</bcp14> be set to 4 ("No available node identifiers").</t>
          <t>If all verifications succeed, the handler replies with a 2.05 (Content) response containing newly generated individual keying material for the Client. The payload of the response is formatted as a CBOR map. The specific format of newly generated individual keying material for group members or of the information to derive it, and corresponding CBOR label, <bcp14>MUST</bcp14> be specified in the application profile (REQ27) and registered in <xref target="iana-reg"/>.</t>
          <t>The typical successful outcome consists in replying with newly generated individual keying material for the Client, as defined above. However, application profiles of this specification <bcp14>MAY</bcp14> also extend this handler in order to achieve different akin outcomes (OPT12), for instance:</t>
          <ul spacing="normal">
            <li>Not providing the Client with newly generated individual keying material, but rather rekeying the whole group, i.e., providing all the current group members with newly generated group keying material.</li>
            <li>Both providing the Client with newly generated individual keying material, as well as rekeying the whole group, i.e., providing all the current group members with newly generated group keying material.</li>
          </ul>
          <t>In either case, the handler may specify the new group keying material as part of the 2.05 (Content) response.</t>
          <t>Note that this handler is not intended to accommodate requests from a group member to trigger a group rekeying, whose scheduling and execution is an exclusive prerogative of the KDC (also see related security considerations in <xref target="sec-cons-rekeying"/>).</t>
          <section anchor="new-keys">
            <name>Request to Change Individual Keying Material</name>
            <t>A Client may ask the KDC for new individual keying material. For instance, this can be due to the expiration of such individual keying material or to the exhaustion of Authenticated Encryption with Associated Data (AEAD) nonces if an AEAD encryption algorithm is used for protecting communications in the group. An example of individual keying material can simply be an individual encryption key associated with the Client. Hence, the Client may ask for a new individual encryption key or for new input material to derive it.</t>
            <t>To this end, the Client performs a Key Renewal Request-Response exchange with the KDC, i.e., it sends a CoAP PUT request to the /ace-group/GROUPNAME/nodes/NODENAME endpoint at the KDC, where GROUPNAME identifies the group and NODENAME is its node name, and is formatted as defined in <xref target="node-get"/>.</t>
            <t><xref target="fig-renewal-req-resp"/> gives an overview of the exchange described above, while <xref target="fig-renewal-req-resp-2"/> shows an example.</t>
            <figure anchor="fig-renewal-req-resp">
              <name>Message Flow of Key Renewal Request-Response</name>
              <artwork align="center"><![CDATA[
Client                                                    KDC
   |                                                       |
   |---------------- Key Renewal Request: ---------------->|
   |        PUT /ace-group/GROUPNAME/nodes/NODENAME        |
   |                                                       |
   |<-------- Key Renewal Response: 2.05 (Content) --------|
   |                                                       |
]]></artwork>
            </figure>
            <figure anchor="fig-renewal-req-resp-2">
              <name>Example of Key Renewal Request-Response</name>
              <artwork><![CDATA[
Request:

Header: PUT (Code=0.03)
Uri-Host: "kdc.example.com"
Uri-Path: "ace-group"
Uri-Path: "g1"
Uri-Path: "nodes"
Uri-Path: "c101"
Payload: -

Response:

Header: Content (Code=2.05)
Content-Format: "application/ace-groupcomm+cbor"
Payload (in CBOR diagnostic notation, with IND_KEY being a
         CBOR byte string, and "ind-key" being the profile-specified
         label for individual keying material):
  { "ind-key": IND_KEY }
]]></artwork>
            </figure>
            <t>Note that there is a difference between the Key Renewal Request in this section and the Key Distribution Request in <xref target="update-keys"/>. The former asks the KDC for new individual keying material, while the latter asks the KDC for the current group keying material together with the current individual keying material.</t>
            <t>As discussed in <xref target="node-put"/>, application profiles of this specification may define alternative outcomes for the Key Renewal Request-Response exchange (OPT12), where the provisioning of new individual keying material is replaced by or combined with the execution of a whole group rekeying.</t>
          </section>
        </section>
        <section anchor="node-delete">
          <name>DELETE Handler</name>
          <t>The DELETE handler removes the node identified by NODENAME from the group identified by GROUPNAME.</t>
          <t>The handler expects a DELETE request with an empty payload.</t>
          <t>In addition to what is defined in <xref target="kdc-if-errors"/>, the handler verifies that the Client is a current member of the group. If the verification fails, the KDC <bcp14>MUST</bcp14> reply with a 4.03 (Forbidden) error response. The response <bcp14>MUST</bcp14> have Content-Format set to application/concise-problem-details+cbor and is formatted as defined in <xref target="kdc-if-errors"/>. Within the Custom Problem Detail entry 'ace-groupcomm-error', the value of the 'error-id' field  <bcp14>MUST</bcp14> be set to 0 ("Operation permitted only to group members").</t>
          <t>If all verification succeeds, the handler performs the actions defined in <xref target="sec-node-removal"/> and replies with a 2.02 (Deleted) response with an empty payload.</t>
          <section anchor="ssec-group-leaving">
            <name>Leave the Group</name>
            <t>A Client can actively request to leave the group. In this case, the Client sends a CoAP DELETE request to the endpoint /ace-group/GROUPNAME/nodes/NODENAME at the KDC, where GROUPNAME identifies the group and NODENAME is its node name, formatted as defined in <xref target="node-delete"/></t>
            <t>Note that, after having left the group, the Client may wish to join it again. Then, as long as the Client is still authorized to join the group, i.e., the associated access token is still valid, the Client can request to rejoin the group directly to the KDC (see <xref target="ssec-key-distribution-exchange"/>) without having to retrieve a new access token from the AS.</t>
          </section>
        </section>
      </section>
      <section anchor="ace-groupgroupnamenodesnodenamecred">
        <name>/ace-group/GROUPNAME/nodes/NODENAME/cred</name>
        <t>This resource implements the POST handler.</t>
        <section anchor="node-pub-key-post">
          <name>POST Handler</name>
          <t>The POST handler is used to replace the stored authentication credential of this Client (identified by NODENAME) with the one specified in the request at the KDC for the group identified by GROUPNAME.</t>
          <t>The handler expects a POST request with the payload, as specified in <xref target="gid-post"/>, with the difference that it includes only the parameters 'client_cred', 'cnonce', and 'client_cred_verify'.</t>
          <t>The PoP evidence included in the 'client_cred_verify' parameter is computed in the same way considered in <xref target="gid-post"/> and defined by the specific application profile (REQ14) by using the following to build the PoP input: i) the same scope entry specified by the Client in the 'scope' parameter of the latest Join Request that the Client sent to the KDC in order to join the group identified by GROUPNAME; ii) the latest N_S value stored by the Client; and iii) a new N_C nonce generated by the Client and specified in the parameter 'cnonce' of this request.</t>
          <t>An example of PoP input to compute 'client_cred_verify' using CBOR encoding is given in <xref target="fig-client-cred-input-2"/>.</t>
          <t>It is <bcp14>REQUIRED</bcp14> for application profiles to define the specific formats of authentication credentials that are acceptable to use in the group (REQ6).</t>
          <t>In addition to what is defined in <xref target="kdc-if-errors"/> and at the beginning of <xref target="node-subresource"/>, the handler verifies that this operation is consistent with the set of roles that the node has in the group. If the verification fails, the KDC <bcp14>MUST</bcp14> reply with a 4.00 (Bad Request) error response. The response <bcp14>MUST</bcp14> have Content-Format set to application/concise-problem-details+cbor and is formatted as defined in <xref target="kdc-if-errors"/>. Within the Custom Problem Detail entry 'ace-groupcomm-error', the value of the 'error-id' field  <bcp14>MUST</bcp14> be set to 1 ("Request inconsistent with the current roles").</t>
          <t>If the KDC cannot retrieve the 'kdcchallenge' associated with this Client (see <xref target="token-post"/>), the KDC <bcp14>MUST</bcp14> reply with a 4.00 (Bad Request) error response, which <bcp14>MUST</bcp14> also have Content-Format application/ace-groupcomm+cbor. The payload of the error response is a CBOR map including a newly generated 'kdcchallenge' value. This is specified in the 'kdcchallenge' parameter. In such a case, the KDC <bcp14>MUST</bcp14> store the newly generated value as the 'kdcchallenge' value associated with this Client, replacing the currently stored value (if any).</t>
          <t>Otherwise, the handler checks that the authentication credential specified in the 'client_cred' field is valid for the group identified by GROUPNAME. That is, the handler checks that the authentication credential is encoded according to the format used in the group, is intended for the public key algorithm used in the group, and is aligned with the possible associated parameters used in the group. If that cannot be successfully verified, the handler <bcp14>MUST</bcp14> reply with a 4.00 (Bad Request) error response. The response <bcp14>MUST</bcp14> have Content-Format set to application/concise-problem-details+cbor and is formatted as defined in <xref target="kdc-if-errors"/>. Within the Custom Problem Detail entry 'ace-groupcomm-error', the value of the 'error-id' field  <bcp14>MUST</bcp14> be set to 2 ("Authentication credential incompatible with the group configuration").</t>
          <t>Otherwise, the handler verifies the PoP evidence contained in the 'client_cred_verify' field of the request by using the authentication credential specified in the 'client_cred' field, as well as the same way considered in <xref target="gid-post"/> and defined by the specific application profile (REQ14). If the PoP evidence does not pass verification, the handler <bcp14>MUST</bcp14> reply with a 4.00 (Bad Request) error response. The response <bcp14>MUST</bcp14> have Content-Format set to application/concise-problem-details+cbor and is formatted as defined in <xref target="kdc-if-errors"/>. Within the Custom Problem Detail entry 'ace-groupcomm-error', the value of the 'error-id' field  <bcp14>MUST</bcp14> be set to 3 ("Invalid Proof-of-Possession evidence").</t>
          <t>If all verifications succeed, the handler performs the following actions.</t>
          <ul spacing="normal">
            <li>The handler associates the authentication credential from the 'client_cred' field of the request with the node identifier NODENAME, as well as with the access token associated with the node identified by NODENAME.</li>
            <li>In the stored list of group members' authentication credentials for the group identified by GROUPNAME, the handler replaces the authentication credential of the node identified by NODENAME with the authentication credential specified in the 'client_cred' field of the request.</li>
          </ul>
          <t>Then, the handler replies with a 2.04 (Changed) response, which does not include a payload.</t>
          <figure anchor="fig-client-cred-input-2">
            <name>Example of PoP Input to Compute 'client_cred_verify' Using CBOR Encoding</name>
            <artwork><![CDATA[
scope, N_S, and N_C expressed in CBOR diagnostic notation:
  scope = h'826667726f7570316673656e646572'
  N_S   = h'018a278f7faab55a'
  N_C   = h'0446baefc56111bf'


scope, N_S, and N_C as CBOR encoded byte strings:
  scope = 0x4f826667726F7570316673656E646572
  N_S   = 0x48018a278f7faab55a
  N_C   = 0x480446baefc56111bf

PoP input:
  0x4f 826667726f7570316673656e646572
    48 018a278f7faab55a 48 0446baefc56111bf
]]></artwork>
          </figure>
          <section anchor="update-pub-key">
            <name>Uploading an Authentication Credential</name>
            <t>In case the KDC maintains the authentication credentials of group members, a node in the group can contact the KDC to upload a new authentication credential to use in the group and to replace the currently stored one.</t>
            <t>To this end, the Client performs an Authentication Credential Update Request-Response exchange with the KDC, i.e., it sends a CoAP POST request to the /ace-group/GROUPNAME/nodes/NODENAME/cred endpoint at the KDC, where GROUPNAME identifies the group and NODENAME is its node name.</t>
            <t>The request is formatted as specified in <xref target="node-pub-key-post"/>.</t>
            <t><xref target="fig-pub-key-update-req-resp"/> gives an overview of the exchange described above, while <xref target="fig-pub-key-update-req-resp-2"/> shows an example.</t>
            <figure anchor="fig-pub-key-update-req-resp">
              <name>Message Flow of Authentication Credential Update Request-Response</name>
              <artwork align="center"><![CDATA[
Client                                                          KDC
|                                                                |
|----------- Authentication Credential Update Request: --------->|
|         POST /ace-group/GROUPNAME/nodes/NODENAME/cred          |
|                                                                |
|<-- Authentication Credential Update Response: 2.04 (Changed) --|
|                                                                |
]]></artwork>
            </figure>
            <figure anchor="fig-pub-key-update-req-resp-2">
              <name>Example of Authentication Credential Update Request-Response</name>
              <artwork><![CDATA[
Request:

Header: POST (Code=0.02)
Uri-Host: "kdc.example.com"
Uri-Path: "ace-group"
Uri-Path: "g1"
Uri-Path: "nodes"
Uri-Path: "c101"
Uri-Path: "cred"
Content-Format: "application/ace-groupcomm+cbor"
Payload (in CBOR diagnostic notation, with AUTH_CRED
         and POP_EVIDENCE being CBOR byte strings):
  { "client_cred": AUTH_CRED, "cnonce": h'0446baefc56111bf',
    "client_cred_verify": POP_EVIDENCE }

Response:

Header: Changed (Code=2.04)
Payload: -
]]></artwork>
            </figure>
            <t>Additionally, after updating its own authentication credential, a group member <bcp14>MAY</bcp14> send to the group a number of requests, including an identifier of the updated authentication credential, to notify other group members that they have to retrieve it. How this is done depends on the group communication protocol used and therefore is application profile specific (OPT13).</t>
          </section>
        </section>
      </section>
    </section>
    <section anchor="sec-node-removal">
      <name>Removal of a Group Member</name>
      <t>A Client identified by NODENAME may be removed from a group identified by GROUPNAME where it is a member, for example, due to the following reasons.</t>
      <ol spacing="normal" type="1">
	<li>The Client explicitly asks to leave the group, as defined in <xref target="ssec-group-leaving"/>.</li>
        <li>The node has been found compromised or is suspected so. The KDC is expected to determine that a group member has to be evicted either through its own means or based on information that it obtains from a trusted source (e.g., an Intrusion Detection System or an issuer of authentication credentials). Additional mechanics, protocols, and interfaces at the KDC that can support this are out of the scope of this document.</li>
        <li>The Client's authorization to be a group member with the current roles is not valid anymore, i.e., the access token has expired or has been revoked. If the AS provides token introspection (see <xref section="5.9" sectionFormat="of" target="RFC9200"/>), the KDC can optionally use it and check whether the Client is still authorized.</li>
      </ol>
      <t>In all cases, the KDC performs the following actions.</t>
      <ul spacing="normal">
        <li>The KDC removes the Client from the list of current members of the group. When doing so, the KDC deletes the currently stored value of 'clientchallenge' for that Client, which was specified in the latest Join Request that the Client sent to the KDC in order to join the group (see <xref target="gid-post"/>).</li>
        <li>In case of forced eviction, i.e., for cases 2 and 3 above, the KDC deletes the authentication credential of the removed Client if it acts as a repository of authentication credentials for group members.</li>
        <li>If the removed Client is registered as an observer of the group-membership resource at /ace-group/GROUPNAME, the KDC removes the Client from the list of observers of that resource.</li>
        <li>
          <t>If the sub-resource nodes/NODENAME was created for the removed Client, the KDC deletes that sub-resource.  </t>
          <t>
In case of forced eviction, i.e., for cases 2 and 3 above, the KDC <bcp14>MAY</bcp14> explicitly inform the removed Client by means of the following methods.  </t>
          <ul spacing="normal">
            <li>If the evicted Client implements the 'control_uri' resource specified in <xref target="gid-post"/>, the KDC sends a DELETE request, targeting the URI specified in the 'control_uri' parameter of the Join Request (see <xref target="gid-post"/>).</li>
            <li>
              <t>If the evicted Client is observing its associated sub-resource at /ace-group/GROUPNAME/nodes/NODENAME (see <xref target="node-get"/>), the KDC sends an unsolicited 4.04 (Not Found) error response, which does not include the Observe Option and indicates that the observed resource has been deleted (see <xref section="3.2" sectionFormat="of" target="RFC7641"/>).      </t>
              <t>
The response <bcp14>MUST</bcp14> have Content-Format set to application/concise-problem-details+cbor and is formatted as defined in <xref target="kdc-if-errors"/>. Within the Custom Problem Detail entry 'ace-groupcomm-error', the value of the 'error-id' field  <bcp14>MUST</bcp14> be set to 5 ("Group membership terminated").</t>
            </li>
          </ul>
        </li>
        <li>If forward security is prescribed by application policies installed at the KDC or by the used application profile of this specification, then the KDC <bcp14>MUST</bcp14> generate new group keying material and securely distribute it to all the current group members except the leaving node (see <xref target="sec-group-rekeying"/>).</li>
      </ul>
    </section>
    <section anchor="sec-group-rekeying">
      <name>Group Rekeying Process</name>
      <t>A group rekeying is started and driven by the KDC. The KDC is not intended to accommodate explicit requests from group members to trigger a group rekeying. That is, the scheduling and execution of a group rekeying is an exclusive prerogative of the KDC.

<!--[rfced] Are the three reasons listed the only things that can       
trigger a group rekeying, or are they just examples? If there are
other reasons, should the sentence be updated as follows?

Original:
   Reasons that can trigger a group rekeying are a change in the group
   membership, the current group keying material approaching its
   expiration time, or a regularly scheduled update of the group keying
   material.

Perhaps:
   Some reasons that can trigger a group rekeying include a change in
   the group membership, the current group keying material approaching
   its expiration time, or a regularly scheduled update of the group
   keying material.
-->   

      Reasons that can trigger a group rekeying are a change in the group membership, the current group keying material approaching its expiration time, or a regularly scheduled update of the group keying material.</t>
      <t>The KDC can perform a group rekeying before the current group keying material expires, unless it is acceptable or there are reasons to temporarily pause secure communications in the group, following the expiration of the current keying material. For example, a pause in the group communication might have been scheduled to start anyway when the group keying material expires, e.g., to allow maintenance operations on the group members. As another example, the KDC might be carrying out a verification that some group members are seemingly compromised and to be evicted, and this needs to be completed in order to appropriately define and schedule the exact rekeying process to perform. As a result, the KDC could delay the execution of the group rekeying.</t>
      <t>The KDC <bcp14>MUST</bcp14> increment the version number NUM of the current keying material before distributing the newly generated keying material with version number NUM+1 to the group. Once the group rekeying is completed, the KDC <bcp14>MUST</bcp14> delete the old keying material and <bcp14>SHOULD</bcp14> store the newly distributed keying material in persistent storage.</t>
      <t>Distributing the new group keying material requires the KDC to send multiple rekeying messages to the group members. Depending on the rekeying scheme used in the group and the reason that has triggered the rekeying process, each rekeying message can be intended for one or multiple group members, hereafter referred to as target group members. The KDC <bcp14>MUST</bcp14> support at least the "Point-to-Point" group rekeying scheme described in <xref target="point-to-point-rekeying"/> and <bcp14>MAY</bcp14> support additional ones.</t>
      <t>Each rekeying message <bcp14>MUST</bcp14> have Content-Format set to application/ace-groupcomm+cbor and its payload formatted as a CBOR map, which <bcp14>MUST</bcp14> include at least the information specified in the Key Distribution Response message (see <xref target="gid-get"/>), i.e., the parameters 'gkty', 'key', and 'num' defined in <xref target="gid-post"/>. The CBOR map <bcp14>SHOULD</bcp14> also include the parameters 'exp' and 'exi'. If the 'exp' parameter is included, the 'exi' parameter <bcp14>MUST</bcp14> also be included. The CBOR map <bcp14>MAY</bcp14> include the parameter 'mgt_key_material' to specify new administrative keying material for the target group members if it is relevant for the used rekeying scheme.</t>
      <t>A rekeying message may include additional information, depending on the rekeying scheme used in the group, the reason that has triggered the rekeying process, and the specific target group members. In particular, if the group rekeying is performed due to one or multiple Clients that have joined the group and the KDC acts as a repository of authentication credentials of the group members, then a rekeying message <bcp14>MAY</bcp14> also include the authentication credentials that those Clients use in the group, together with the roles and node identifier that the corresponding Client has in the group. It is <bcp14>RECOMMENDED</bcp14> to specify this information by means of the parameters 'creds', 'peer_roles', and 'peer_identifiers', like it is done in the Join Response message (see <xref target="gid-post"/>).</t>
      <t>The complete format of a rekeying message, including the encoding and content of the 'mgt_key_material' parameter, has to be defined in separate specifications aimed at profiling the used rekeying scheme in the context of the used application profile of this specification. As a particular case, an application profile of this specification <bcp14>MAY</bcp14> define additional information to include in rekeying messages for the "Point-to-Point" group rekeying scheme in <xref target="point-to-point-rekeying"/> (OPT14).</t>
      <t>Consistently with the used group rekeying scheme, the actual delivery of rekeying messages can occur through different approaches, as discussed in Sections <xref target="point-to-point-rekeying" format="counter"/> and <xref target="one-to-many-rekeying" format="counter"/>.</t>
      <t>The possible, temporary misalignment of the keying material stored by the different group members due to a group rekeying is discussed in <xref target="sec-misalignment-keying-material"/>. Further security considerations related to the group rekeying process are compiled in <xref target="sec-cons-rekeying"/>.</t>
      <section anchor="point-to-point-rekeying">
        <name>Point-to-Point Group Rekeying</name>
        <t>A point-to-point group rekeying consists in the KDC sending one individual rekeying message to each target group member. In particular, the rekeying message is protected by means of the security association between the KDC and the target group member in question, as per the used application profile of this specification and the used transport profile of ACE.</t>
        <t>This is the approach taken by the basic "Point-to-Point" group rekeying scheme, which the KDC can explicitly signal in the Join Response (see <xref target="gid-post"/>), through the 'rekeying_scheme' parameter specifying the value 0.</t>
        <t>When taking this approach in the group identified by GROUPNAME, the KDC can practically deliver the rekeying messages to the target group members in different, coexisting ways.</t>
        <ul spacing="normal">
          <li>
            <t>The KDC <bcp14>SHOULD</bcp14> make the /ace-group/GROUPNAME resource Observable <xref target="RFC7641"/>. Thus, upon performing a group rekeying, the KDC can distribute the new group keying material through individual notification responses sent to the target group members that are also observing that resource.  </t>
            <t>
In case the KDC deletes the group (and thus deletes the /ace-group/GROUPNAME resource), relying on CoAP Observe as discussed above also allows the KDC to send an unsolicited 4.04 (Not Found) response to each observer group member as a notification of group termination. The response <bcp14>MUST</bcp14> have Content-Format set to application/concise-problem-details+cbor and is formatted as defined in <xref target="kdc-if-errors"/>. Within the Custom Problem Detail entry 'ace-groupcomm-error', the value of the 'error-id' field  <bcp14>MUST</bcp14> be set to 6 ("Group deleted").</t>
          </li>
          <li>
            <t>If a target group member specified a URI in the 'control_uri' parameter of the Join Request upon joining the group (see <xref target="gid-post"/>), the KDC can provide that group member with the new group keying material by sending a unicast POST request to that URI.  </t>
            <t>
A Client that does not plan to observe the /ace-group/GROUPNAME resource at the KDC <bcp14>SHOULD</bcp14> provide a URI in the 'control_uri' parameter of the Join Request upon joining the group.</t>
          </li>
        </ul>
        <t>If the KDC has to send a rekeying message to a target group member, but this did not include the 'control_uri' parameter in the Join Request and is not a registered observer for the /ace-group/GROUPNAME resource, then that target group member would not be able to participate in the group rekeying. Later on, after having repeatedly failed to successfully exchange secure messages in the group, that group member can retrieve the current group keying material from the KDC by sending a GET request to /ace-group/GROUPNAME or /ace-group/GROUPNAME/nodes/NODENAME (see Sections <xref target="gid-get" format="counter"/> and <xref target="node-get" format="counter"/>, respectively).</t>
        <t><xref target="fig-rekeying-example-1"/> provides an example of point-to-point group rekeying. In particular, the example makes the following assumptions:</t>
        <ul spacing="normal">
          <li>The group currently consists of four group members, namely C1, C2, C3, and C4.</li>
          <li>Each group member, when joining the group, provided the KDC with a URI in the 'control_uri' parameter with url-path "grp-rek".</li>
          <li>Before the group rekeying is performed, the keying material used in the group has version number num=5.</li>
          <li>The KDC performs the group rekeying in such a way to evict the group member C3, which has been found to be compromised.</li>
        </ul>
        <t>In the example, the KDC individually rekeys the group members intended to remain in the group (i.e., C1, C2, and C4) by means of one rekeying message each.</t>
        <figure anchor="fig-rekeying-example-1">
          <name>Example of Message Exchanges for a Point-to-Point Group Rekeying</name>
          <artset>
            <artwork type="svg" align="center"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 560 384" class="diagram" text-anchor="middle" font-family="monospace" font-size="13px">
                <path d="M 32,32 L 32,64" fill="none" stroke="black"/>
                <path d="M 40,256 L 40,288" fill="none" stroke="black"/>
                <path d="M 80,72 L 80,208" fill="none" stroke="black"/>
                <path d="M 112,256 L 112,288" fill="none" stroke="black"/>
                <path d="M 184,256 L 184,288" fill="none" stroke="black"/>
                <path d="M 224,72 L 224,208" fill="none" stroke="black"/>
                <path d="M 256,256 L 256,288" fill="none" stroke="black"/>
                <path d="M 328,256 L 328,288" fill="none" stroke="black"/>
                <path d="M 400,256 L 400,288" fill="none" stroke="black"/>
                <path d="M 480,256 L 480,288" fill="none" stroke="black"/>
                <path d="M 520,72 L 520,208" fill="none" stroke="black"/>
                <path d="M 552,32 L 552,64" fill="none" stroke="black"/>
                <path d="M 552,256 L 552,288" fill="none" stroke="black"/>
                <path d="M 32,32 L 552,32" fill="none" stroke="black"/>
                <path d="M 32,64 L 552,64" fill="none" stroke="black"/>
                <path d="M 40,256 L 112,256" fill="none" stroke="black"/>
                <path d="M 184,256 L 256,256" fill="none" stroke="black"/>
                <path d="M 328,256 L 400,256" fill="none" stroke="black"/>
                <path d="M 480,256 L 552,256" fill="none" stroke="black"/>
                <path d="M 40,288 L 112,288" fill="none" stroke="black"/>
                <path d="M 184,288 L 256,288" fill="none" stroke="black"/>
                <path d="M 328,288 L 400,288" fill="none" stroke="black"/>
                <path d="M 480,288 L 552,288" fill="none" stroke="black"/>
                <path d="M 44,344 L 140,344" fill="none" stroke="black"/>
                <path d="M 444,344 L 548,344" fill="none" stroke="black"/>
                <polygon class="arrowhead" points="528,208 516,202.4 516,213.6" fill="black" transform="rotate(90,520,208)"/>
                <polygon class="arrowhead" points="232,208 220,202.4 220,213.6" fill="black" transform="rotate(90,224,208)"/>
                <polygon class="arrowhead" points="88,208 76,202.4 76,213.6" fill="black" transform="rotate(90,80,208)"/>
                <g class="text">
                  <text x="288" y="52">KDC</text>
                  <text x="24" y="100">Group</text>
                  <text x="168" y="100">Group</text>
                  <text x="464" y="100">Group</text>
                  <text x="28" y="116">keying</text>
                  <text x="172" y="116">keying</text>
                  <text x="468" y="116">keying</text>
                  <text x="36" y="132">material</text>
                  <text x="180" y="132">material</text>
                  <text x="476" y="132">material</text>
                  <text x="32" y="148">(num=6)</text>
                  <text x="176" y="148">(num=6)</text>
                  <text x="472" y="148">(num=6)</text>
                  <text x="76" y="244">/grp-rek</text>
                  <text x="220" y="244">/grp-rek</text>
                  <text x="364" y="244">/grp-rek</text>
                  <text x="516" y="244">/grp-rek</text>
                  <text x="76" y="276">C1</text>
                  <text x="220" y="276">C2</text>
                  <text x="364" y="276">C3</text>
                  <text x="516" y="276">C4</text>
                  <text x="320" y="308">[TO</text>
                  <text x="348" y="308">BE</text>
                  <text x="396" y="308">EVICTED]</text>
                  <text x="40" y="324">|</text>
                  <text x="552" y="324">|</text>
                  <text x="40" y="340">\</text>
                  <text x="172" y="340">Stored</text>
                  <text x="224" y="340">group</text>
                  <text x="276" y="340">keying</text>
                  <text x="340" y="340">material</text>
                  <text x="408" y="340">(num=5)</text>
                  <text x="552" y="340">/</text>
                </g>
              </svg>
            </artwork>
            <artwork type="ascii-art" align="center"><![CDATA[
    .----------------------------------------------------------------.
    |                              KDC                               |
    '----------------------------------------------------------------'
          |                 |                                    |
 Group    |        Group    |                           Group    |
 keying   |        keying   |                           keying   |
 material |        material |                           material |
 (num=6)  |        (num=6)  |                           (num=6)  |
          |                 |                                    |
          |                 |                                    |
          |                 |                                    |
          v                 v                                    v

      /grp-rek          /grp-rek          /grp-rek           /grp-rek
     .--------.        .--------.        .--------.         .--------.
     |   C1   |        |   C2   |        |   C3   |         |   C4   |
     '--------'        '--------'        '--------'         '--------'
                                       [TO BE EVICTED]
     |                                                               |
     \____________ Stored group keying material (num=5) _____________/
]]></artwork>
          </artset>
        </figure>
      </section>
      <section anchor="one-to-many-rekeying">
        <name>One-to-Many Group Rekeying</name>
        <t>This section provides high-level recommendations on how the KDC can rekey a group by means of a more efficient and scalable group rekeying scheme, e.g., <xref target="RFC2093"/>, <xref target="RFC2094"/>, and <xref target="RFC2627"/>. That is, each rekeying message might be, and likely is, intended for multiple target group members, and thus can be delivered to the whole group, although possible to decrypt only for the actual target group members.</t>
        <t>This yields an overall lower number of rekeying messages, thus potentially reducing the overall time required to rekey the group. On the other hand, it requires the KDC to provide and use additional administrative keying material to protect the rekeying messages and to additionally sign them to ensure source authentication (see <xref target="one-to-many-rekeying-protection"/>).</t>
        <t>Compared to a group rekeying performed in a point-to-point fashion (see <xref target="point-to-point-rekeying"/>), a one-to-many group rekeying typically pays off in large-scale groups due to the reduced time for completing the rekeying, a more efficient utilization of network resources, and a reduced performance overhead at the KDC. To different extents, it also requires individual group members to locally perform additional operations in order to handle the administrative keying material and verify source authentication of rekeying messages. Therefore, one-to-many group rekeying schemes and their employment ought to ensure that the experienced performance overhead on the group members also remains bearable for resource-constrained devices.</t>
        <t>The exact set of rekeying messages to send, their content and format, the administrative keying material to use to protect them, as well as the set of target group members depend on the specific group rekeying scheme and are typically affected by the reason that has triggered the group rekeying. Details about the data content and format of rekeying messages have to be defined by separate documents profiling the use of the group rekeying scheme in the context of the used application profile of this specification.</t>
        <t>When one of these group rekeying schemes is used, the KDC provides related information to a Client joining the group in the Join Response message (see <xref target="gid-post"/>). In particular, 'rekeying_scheme' identifies the rekeying scheme used in the group (if no default can be assumed); 'control_group_uri', if present, specifies a URI whose addressing information is, e.g., a multicast IP address, where the KDC will send the rekeying messages for that group by reaching all the group members; and 'mgt_key_material' specifies a subset of the administrative keying material intended for that particular joining Client to have, as used to protect the rekeying messages sent to the group when also intended for that joining Client.</t>
        <t>Rekeying messages can be protected at the application layer by using COSE and the administrative keying material as prescribed by the specific group rekeying scheme (see <xref target="one-to-many-rekeying-protection"/>). After that, the delivery of protected rekeying messages to the intended target group members can occur in different ways, such as the following ones.</t>
        <dl newline="false" spacing="normal">
          <dt>Over multicast -</dt>
	  <dd><t>In this case, the KDC simply sends a rekeying message as a CoAP request addressed to the URI specified in the 'control_group_uri' parameter of the Join Response (see <xref target="gid-post"/>).  </t>
            <t>
If a particular rekeying message is intended for a single target group member, the KDC may alternatively protect the message using the security association with that group member and deliver the message like when using the "Point-to-Point" group rekeying scheme (see <xref target="point-to-point-rekeying"/>).</t></dd>
<dt>Through a pub-sub communication model -</dt>
<dd><t>In this case, the KDC acts as a publisher and publishes each rekeying message to a specific "rekeying topic", which is associated with the group and is hosted at a broker server. Following their group joining, the group members subscribe to the rekeying topic at the broker, thus receiving the group rekeying messages as they are published by the KDC.  </t>
            <t>
In order to make such message delivery more efficient, the rekeying topic associated with a group can be further organized into subtopics. For instance, the KDC can use a particular subtopic to address a particular set of target group members during the rekeying process as possibly aligned to a similar organization of the administrative keying material (e.g., a key hierarchy).  </t>
            <t>
The setup of rekeying topics at the broker as well as the discovery of the topics at the broker for group members are application specific. A possible way is for the KDC to provide such information in the Join Response message (see <xref target="gid-post"/>) by means of a new parameter analogous to 'control_group_uri' and specifying the URI(s) of the rekeying topic(s) that a group member has to subscribe to at the broker.</t></dd>
        </dl>
        <t>Regardless of the specifically used delivery method, the group rekeying scheme can perform a possible rollover of the administrative keying material through the same sent rekeying messages. Actually, such a rollover occurs every time a group rekeying is performed upon the leaving of group members, which have to be excluded from future communications in the group.</t>
        <t>From a high-level point of view, each group member stores only a subset of the overall administrative keying material, which is obtained upon joining the group. Then, when a group rekeying occurs:</t>
        <ul spacing="normal">
          <li>Each rekeying message is protected by using a (most convenient) key from the administrative keying material such that: i) the used key is not stored by any node leaving the group, i.e., the key is safe to use and does not have to be renewed and ii) the used key is stored by all the target group members that indeed have to be provided with new group keying material to protect communications in the group.</li>
          <li>Each rekeying message includes not only the new group keying material intended for all the rekeyed group members but also any new administrative keys that: i) are pertaining to and supposed to be stored by the target group members and ii) had to be updated since leaving group members to store the previous version.</li>
        </ul>
        <t>Further details depend on the specific rekeying scheme used in the group.</t>
        <t><xref target="fig-rekeying-example-2"/> provides an example of a one-to-many group rekeying over multicast. In particular, the example makes the following assumptions:</t>
        <ul spacing="normal">
          <li>The group currently consists of four group members, namely C1, C2, C3, and C4.</li>
          <li>Each group member, when joining the group, provided the KDC with a URI in the 'control_uri' parameter with url-path "grp-rek".</li>
          <li>Each group member, when joining the group, received from the KDC a URI in the 'control_group_uri' parameter, specifying the multicast address MULT_ADDR and url-path "grp-mrek".</li>
          <li>Before the group rekeying is performed, the keying material used in the group has version number num=5.</li>
          <li>The KDC performs the group rekeying in such a way to evict the group member C3, which has been found to be compromised.</li>
        </ul>
        <t>In the example, the KDC determines that the most convenient way to perform a group rekeying that evicts C3 is as follows.</t>
        <t>First, the KDC sends one rekeying message over multicast to the multicast address MULT_ADDR and the url-path "grp-mrek". In the figure, the message is denoted with dashed lines. The message is protected with a non-compromised key from the administrative keying material that only C1 and C2 store. Therefore, even though all the group members receive this message, only C1 and C2 are able to decrypt it. The message includes: the new group keying material with version number num=6 and new keys from the administrative keying material to replace those stored by the group members C1, C2, and C3.</t>
        <t>After that, the KDC sends one rekeying message addressed individually to C4 and with url-path "grp-rek". In the figure, the message is denoted with a dotted line. The message is protected with the secure association shared between C4 and the KDC. The message includes: the new group keying material with version number num=6 and new keys from the administrative keying material to replace those stored by both C4 and C3.</t>
        <figure anchor="fig-rekeying-example-2">
          <name>Example of Message Exchanges for a One-to-Many Group Rekeying</name>
          <artset>
            <artwork type="svg" align="center"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 576 400" class="diagram" text-anchor="middle" font-family="monospace" font-size="13px">
                <path d="M 8,32 L 8,64" fill="none" stroke="black"/>
                <path d="M 8,288 L 8,320" fill="none" stroke="black"/>
                <path d="M 56,192 L 56,240" fill="none" stroke="black"/>
                <path d="M 80,288 L 80,320" fill="none" stroke="black"/>
                <path d="M 112,288 L 112,320" fill="none" stroke="black"/>
                <path d="M 160,192 L 160,240" fill="none" stroke="black"/>
                <path d="M 184,288 L 184,320" fill="none" stroke="black"/>
                <path d="M 216,288 L 216,320" fill="none" stroke="black"/>
                <path d="M 272,72 L 272,240" fill="none" stroke="black"/>
                <path d="M 312,288 L 312,320" fill="none" stroke="black"/>
                <path d="M 344,288 L 344,320" fill="none" stroke="black"/>
                <path d="M 392,192 L 392,240" fill="none" stroke="black"/>
                <path d="M 568,32 L 568,64" fill="none" stroke="black"/>
                <path d="M 568,288 L 568,320" fill="none" stroke="black"/>
                <path d="M 8,32 L 568,32" fill="none" stroke="black"/>
                <path d="M 8,64 L 568,64" fill="none" stroke="black"/>
                <path d="M 56,192 L 392,192" fill="none" stroke="black"/>
                <path d="M 8,288 L 80,288" fill="none" stroke="black"/>
                <path d="M 112,288 L 184,288" fill="none" stroke="black"/>
                <path d="M 216,288 L 312,288" fill="none" stroke="black"/>
                <path d="M 344,288 L 568,288" fill="none" stroke="black"/>
                <path d="M 8,320 L 80,320" fill="none" stroke="black"/>
                <path d="M 112,320 L 184,320" fill="none" stroke="black"/>
                <path d="M 216,320 L 312,320" fill="none" stroke="black"/>
                <path d="M 344,320 L 568,320" fill="none" stroke="black"/>
                <path d="M 12,376 L 132,376" fill="none" stroke="black"/>
                <path d="M 436,376 L 564,376" fill="none" stroke="black"/>
                <polygon class="arrowhead" points="400,240 388,234.4 388,245.6" fill="black" transform="rotate(90,392,240)"/>
                <polygon class="arrowhead" points="280,240 268,234.4 268,245.6" fill="black" transform="rotate(90,272,240)"/>
                <polygon class="arrowhead" points="168,240 156,234.4 156,245.6" fill="black" transform="rotate(90,160,240)"/>
                <polygon class="arrowhead" points="64,240 52,234.4 52,245.6" fill="black" transform="rotate(90,56,240)"/>
                <circle cx="8" cy="96" r="6" class="closeddot" fill="black"/>
                <circle cx="8" cy="112" r="6" class="closeddot" fill="black"/>
                <circle cx="336" cy="96" r="6" class="closeddot" fill="black"/>
                <circle cx="336" cy="128" r="6" class="closeddot" fill="black"/>
                <g class="text">
                  <text x="272" y="52">KDC</text>
                  <text x="544" y="84">:</text>
                  <text x="40" y="100">Group</text>
                  <text x="92" y="100">keying</text>
                  <text x="156" y="100">material</text>
                  <text x="224" y="100">(num=6)</text>
                  <text x="368" y="100">Group</text>
                  <text x="420" y="100">keying</text>
                  <text x="544" y="100">:</text>
                  <text x="48" y="116">Updated</text>
                  <text x="140" y="116">administrative</text>
                  <text x="380" y="116">material</text>
                  <text x="448" y="116">(num=6)</text>
                  <text x="544" y="116">:</text>
                  <text x="44" y="132">keying</text>
                  <text x="108" y="132">material</text>
                  <text x="160" y="132">for</text>
                  <text x="188" y="132">C1</text>
                  <text x="216" y="132">and</text>
                  <text x="244" y="132">C2</text>
                  <text x="376" y="132">Updated</text>
                  <text x="468" y="132">administrative</text>
                  <text x="544" y="132">:</text>
                  <text x="372" y="148">keying</text>
                  <text x="436" y="148">material</text>
                  <text x="488" y="148">for</text>
                  <text x="516" y="148">C4</text>
                  <text x="544" y="148">:</text>
                  <text x="544" y="164">:</text>
                  <text x="544" y="180">:</text>
                  <text x="544" y="196">:</text>
                  <text x="544" y="212">:</text>
                  <text x="544" y="228">:</text>
                  <text x="544" y="244">v</text>
                  <text x="48" y="276">/grp-mrek</text>
                  <text x="152" y="276">/grp-mrek</text>
                  <text x="256" y="276">/grp-mrek</text>
                  <text x="384" y="276">/grp-mrek</text>
                  <text x="532" y="276">/grp-rek</text>
                  <text x="44" y="308">C1</text>
                  <text x="148" y="308">C2</text>
                  <text x="268" y="308">C3</text>
                  <text x="452" y="308">C4</text>
                  <text x="216" y="340">[TO</text>
                  <text x="244" y="340">BE</text>
                  <text x="292" y="340">EVICTED]</text>
                  <text x="8" y="356">|</text>
                  <text x="568" y="356">|</text>
                  <text x="8" y="372">\</text>
                  <text x="164" y="372">Stored</text>
                  <text x="216" y="372">group</text>
                  <text x="268" y="372">keying</text>
                  <text x="332" y="372">material</text>
                  <text x="400" y="372">(num=5)</text>
                  <text x="568" y="372">/</text>
                </g>
              </svg>
            </artwork>
            <artwork type="ascii-art" align="center"><![CDATA[
.---------------------------------------------------------------------.
|                               KDC                                   |
'---------------------------------------------------------------------'
                                 |                                 :
* Group keying material (num=6)  |       * Group keying            :
* Updated administrative         |         material (num=6)        :
  keying material for C1 and C2  |       * Updated administrative  :
                                 |         keying material for C4  :
                                 |                                 :
                                 |                                 :
      +------------+-------------+--------------+                  :
      |            |             |              |                  :
      |            |             |              |                  :
      v            v             v              v                  v

 /grp-mrek    /grp-mrek    /grp-mrek       /grp-mrek          /grp-rek
.--------.   .--------.   .-----------.   .---------------------------.
|   C1   |   |   C2   |   |     C3    |   |            C4             |
'--------'   '--------'   '-----------'   '---------------------------'
                         [TO BE EVICTED]
|                                                                     |
\_______________ Stored group keying material (num=5) ________________/
]]></artwork>
          </artset>
        </figure>
        <section anchor="one-to-many-rekeying-protection">
          <name>Protection of Rekeying Messages</name>
          <t>When using a group rekeying scheme relying on one-to-many rekeying messages, the actual data content of each rekeying message is prepared according to what the rekeying scheme prescribes.</t>
          <t>The following describes one possible method for the KDC to protect the rekeying messages when using the administrative keying material.</t>
          <t>The method assumes that the following holds for the administrative keying material specified in the 'mgt_key_material' parameter of the Join Response (see <xref target="gid-post"/>).</t>
          <ul spacing="normal">
            <li>The encryption algorithm <bcp14>SHOULD</bcp14> be the same one used to protect communications in the group.</li>
            <li>The included symmetric encryption keys are accompanied by a corresponding and unique key identifier assigned by the KDC.</li>
            <li>A Base IV is also included with the same size of the AEAD nonce considered by the encryption algorithm to use.</li>
          </ul>
          <t>First, the KDC computes a COSE_Encrypt0 object as follows.</t>
          <ul spacing="normal">
            <li>The encryption key to use is selected from the administrative keying material, as defined by the rekeying scheme used in the group.</li>
            <li>The plaintext is the actual data content of the rekeying message.</li>
            <li>The Additional Authenticated Data (AAD) is empty unless otherwise specified by separate documents profiling the use of the group rekeying scheme.</li>
            <li>
              <t>Since the KDC is the only sender of rekeying messages, the AEAD nonce can be computed as follows, where NONCE_SIZE is the size in bytes of the AEAD nonce. Separate documents profiling the use of the group rekeying scheme may define alternative ways to compute the AEAD nonce.  </t>
              <t>
The KDC considers the following values.  </t>
              <ul spacing="normal">
                <li>COUNT: as a 2-byte unsigned integer associated with the used encryption key. Its value is set to 0 when starting to perform a new group rekeying instance and is incremented after each use of the encryption key.</li>
                <li>NEW_NUM: as the version number of the new group keying material to distribute in this rekeying instance, left-padded with zeros to exactly NONCE_SIZE - 2 bytes.</li>
              </ul>
              <t>
Then, the KDC computes a Partial IV as the byte string concatenation of COUNT and NEW_NUM in this order. Finally, the AEAD nonce is computed as the XOR between the Base IV and the Partial IV.  </t>
              <t>
In order to comply with the security requirements of AEAD encryption algorithms, the KDC <bcp14>MUST NOT</bcp14> reuse the same pair (AEAD encryption key, AEAD nonce). For example, this includes not using the same encryption key from the administrative keying material more than 2<sup>16</sup> times during the same rekeying instance.</t>
            </li>
            <li>
              <t>The protected header of the COSE_Encrypt0 object <bcp14>MUST</bcp14> include the following parameters.  </t>
              <ul spacing="normal">
                <li>'alg': specifying the used encryption algorithm.</li>
                <li>'kid': specifying the identifier of the encryption key from the administrative keying material used to protect this rekeying message.</li>
              </ul>
            </li>
            <li>The unprotected header of the COSE_Encrypt0 object <bcp14>MUST</bcp14> include the 'Partial IV' parameter with the value of the Partial IV computed above.</li>
          </ul>
          <t>In order to ensure source authentication, each rekeying message protected with the administrative keying material <bcp14>MUST</bcp14> be signed by the KDC. To this end, the KDC computes a countersignature of the COSE_Encrypt0 object, as described in Sections <xref target="RFC9338" section="3.2" sectionFormat="bare"/> and <xref target="RFC9338" section="3.3" sectionFormat="bare"/> of <xref target="RFC9338"/>. In particular, the following applies when computing the countersignature.</t>
          <ul spacing="normal">
            <li>The Countersign_structure contains the context text string "CounterSignature0".</li>
            <li>The private key of the KDC is used as the signing key.</li>
            <li>The payload is the ciphertext of the COSE_Encrypt0 object.</li>
            <li>The Additional Authenticated Data (AAD) is empty, unless otherwise specified by separate documents profiling the use of a group rekeying scheme.</li>
            <li>The protected header of the signing object <bcp14>MUST</bcp14> include the parameter 'alg', which specifies the used signature algorithm.</li>
          </ul>
          <t>If the source authentication of messages exchanged in the group is also ensured by means of signatures, then rekeying messages <bcp14>MUST</bcp14> be signed using the same signature algorithm and related parameters. Also, the KDC's authentication credential including the public key to use for signature verification <bcp14>MUST</bcp14> be provided in the Join Response through the 'kdc_cred' parameter, together with the corresponding proof-of-possession (PoP) evidence in the 'kdc_cred_verify' parameter.</t>
          <t>If source authentication of messages exchanged in the group is not ensured by means of signatures, then the administrative keying material conveyed in the 'mgt_key_material' parameter of the Join Response sent by KDC (see <xref target="gid-post"/>) <bcp14>MUST</bcp14> also comprise a KDC's authentication credential including the public key to use for signature verification, together with the corresponding PoP evidence. Within the 'mgt_key_material' parameter, it is <bcp14>RECOMMENDED</bcp14> to specify this information by using the same format and encoding used for the parameters 'kdc_cred', 'kdc_nonce', and 'kdc_cred_verify' in the Join Response. It is up to separate documents profiling the use of the group rekeying scheme to specify such details.</t>
          <t>After that, the KDC specifies the computed countersignature in the 'Countersignature0 version 2' header parameter of the COSE_Encrypt0 object.</t>
          <t>Finally, the KDC specifies the COSE_Encrypt0 object as payload of a CoAP request, which is sent to the target group members as per the used message delivery method.</t>
        </section>
      </section>
      <section anchor="sec-misalignment-keying-material">
        <name>Misalignment of Group Keying Material</name>
        <t>A group member can receive a message shortly after the group has been rekeyed and new keying material has been distributed by the KDC. In the following two cases, this may result in misaligned keying material between the group members.</t>
        <t>In the first case, the sender protects a message using the old group keying material. However, the recipient receives the message after having received the new group keying material, hence not being able to correctly process it.

<!--[rfced] As "old, recent" seems to be contradictory, should the phrasing
in the first sentence be updated to "old, retained", as used in the second
sentence?

Original:
   A possible way to limit the impact of this
   issue is to preserve the old, recent group keying material for a
   maximum amount of time defined by the application, during which it is
   used solely for processing incoming messages. By doing so, the
   recipient can still temporarily process received messages also by
   using the old, retained group keying material.
-->   

	A possible way to limit the impact of this issue is to preserve the old, recent group keying material for a maximum amount of time defined by the application, during which it is used solely for processing incoming messages. By doing so, the recipient can still temporarily process received messages also by using the old, retained group keying material. Note that a former (compromised) group member can take advantage of this by sending messages protected with the old, retained group keying material. Therefore, a conservative application policy should not admit the storage of old group keying material. Eventually, the sender will have obtained the new group keying material too and can possibly resend the message protected with such keying material.</t>
        <t>In the second case, the sender protects a message using the new group keying material, but the recipient receives that message before having received the new group keying material. Therefore, the recipient would not be able to correctly process the message and hence discards it. If the recipient receives the new group keying material shortly after that and the application at the sender endpoint performs retransmissions, the former will still be able to receive and correctly process the message. In any case, the recipient should actively ask the KDC for the latest group keying material according to an application-defined policy, for instance, after a given number of unsuccessfully decrypted incoming messages.</t>
      </section>
    </section>
    <section anchor="sec-extended-scope">
      <name>Extended Scope Format</name>
      <t>This section defines an extended format of binary-encoded scope, which additionally specifies the semantics used to express the same access control information from the corresponding original scope.</t>
      <t>As also discussed in <xref target="ssec-authorization-response"/>, this enables a Resource Server to unambiguously process a received access token, also in case the Resource Server runs multiple applications or application profiles that involve different scope semantics.</t>
      <t>The extended format is intended only for the 'scope' claim of access tokens for the cases where the claim takes a CBOR byte string as the value. That is, the extended format does not apply to the 'scope' parameter included in ACE messages, i.e., the Authorization Request and Authorization Response exchanged between the Client and the Authorization Server (see Sections <xref target="RFC9200" section="5.8.1" sectionFormat="bare"/> and <xref target="RFC9200" section="5.8.2" sectionFormat="bare"/> of <xref target="RFC9200"/>), the AS Request Creation Hints message from the Resource Server (see <xref section="5.3" sectionFormat="of" target="RFC9200"/>), and the Introspection Response from the Authorization Server (see <xref section="5.9.2" sectionFormat="of" target="RFC9200"/>).</t>
      <t>The value of the 'scope' claim following the extended format is composed as follows. Given the original scope using semantics SEM and encoded as a CBOR byte string, the corresponding extended scope consists of the same CBOR byte string enclosed by a CBOR tag <xref target="RFC8949"/>, whose tag number identifies the semantics SEM.</t>
      <t>The resulting tagged CBOR byte string is used as the value of the 'scope' claim of the access token.</t>
      <t>Figures <xref target="cddl-ex-0-ext" format="counter"/> and <xref target="cddl-ex-ext" format="counter"/> build on the examples in <xref target="ssec-authorization-response"/> and show the corresponding extended scopes.</t>
      <figure anchor="cddl-ex-0-ext">
        <name>Example CDDL Definition of scope, Using the Default Authorization Information Format</name>
        <sourcecode type="CDDL"><![CDATA[
;# include rfc9237

gname = tstr

permissions = uint .bits roles

roles = &(
   Requester: 1,
   Responder: 2,
   Monitor: 3,
   Verifier: 4
)

scope_entries = AIF-Generic<gname, permissions>

scope = bstr .cbor scope_entries

extended_scope = #6.TAG_FOR_THIS_SEMANTICS(scope)
]]></sourcecode>
      </figure>
      <figure anchor="cddl-ex-ext">
        <name>CDDL Definition of scope, Using an Example Group Name Encoded as tstr and Role as tstr</name>
        <sourcecode type="CDDL"><![CDATA[
gname = tstr

role = tstr

scope_entry = [ gname , ? ( role / [ 2*role ] ) ]

scope_entries = [ * scope_entry ]

scope = bstr .cbor scope_entries

extended_scope = #6.TAG_FOR_THIS_SEMANTICS(scope)
]]></sourcecode>
      </figure>
      <t>The usage of the extended scope format is not limited to application profiles of this specification or to applications based on group communication. Rather, it is generally applicable to any application and application profile where access control information in the access token is expressed as a binary-encoded scope.</t>
      <t>Applications and application profiles using the extended format of scope have to specify which CBOR tag from <xref target="CBOR.Tags"/> is used for identifying the scope semantics or to register a new CBOR tag if a suitable one does not exist already (REQ28). In case there is an already existing, suitable CBOR tag, a new CBOR tag should not be registered in order to avoid codepoint squatting.</t>
      <t>If the binary-encoded scope uses semantics associated with a registered CoAP Content-Format <xref target="RFC7252"/> <xref target="CoAP.Content.Formats"/>, then a suitable CBOR tag associated with that CoAP Content-Format would already be registered, as defined in <xref section="4.3" sectionFormat="of" target="RFC9277"/>.</t>
      <t>This is especially relevant when the binary encoded scope uses the AIF format. That is, it is expected that the definition of an AIF-specific data model comes together with the registration of CoAP Content-Formats for the relevant combinations of its Toid and Tperm values. As discussed above, this yields the automatic registration of the CBOR tags associated with those CoAP Content-Formats.</t>
    </section>
    <section anchor="params">
      <name>ACE Groupcomm Parameters</name>
      <t>This specification defines a number of parameters used during the second part of the message exchange after the exchange of Token Transfer Request and Response. The table below summarizes them and specifies the CBOR key to use instead of the full descriptive name.</t>
      <t>Note that the media type application/ace-groupcomm+cbor <bcp14>MUST</bcp14> be used when these parameters are transported in the respective message fields.</t>
      <table anchor="fig-ACE-Groupcomm-Parameters">
        <name>ACE Groupcomm Parameters</name>
   <thead>
<tr>
<th>Name</th>
<th>CBOR Key</th>
<th>CBOR Type</th>
<th>Reference</th>
</tr>
</thead>
<tbody>
<tr>

<td>gid</td>
<td>0</td>
<td>array</td>
<td>RFC 9594</td>
</tr><tr>

<td>gname</td>
<td>1</td>
<td>array of tstr</td>
<td>RFC 9594</td>
</tr><tr>

<td>guri</td>
<td>2</td>
<td>array of tstr</td>
<td>RFC 9594</td>
</tr><tr>

<td>scope</td>
<td>3</td>
<td>bstr</td>
<td>RFC 9594</td>
</tr><tr>

<td>get_creds</td>
<td>4</td>
<td>array /Simple value "null"</td>
<td>RFC 9594</td>
</tr><tr>                                  

<td>client_cred</td>
<td>5</td>
<td>bstr</td>
<td>RFC 9594</td>
</tr><tr>

<td>cnonce</td>
<td>6</td>
<td>bstr</td>
<td>RFC 9594</td>
</tr><tr>

<td>client_cred_verify</td>
<td>24</td>
<td>bstr</td>
<td>RFC 9594</td>
</tr><tr>

<td>creds_repo</td>
<td>25</td>
<td>tstr</td>
<td>RFC 9594</td>
</tr><tr>

<td>control_uri</td>
<td>26</td>
<td>tstr</td>
<td>RFC 9594</td>
</tr><tr>

<td>gkty</td>
<td>7</td>
<td>int / tstr</td>
<td>RFC 9594</td>
</tr><tr>

<td>key</td>
<td>8</td>
<td>See the "ACE Groupcomm Key Types" registry</td>
<td>RFC 9594</td>
</tr><tr>

<td>num</td>
<td>9</td>
<td>int</td>
<td>RFC 9594</td>
</tr><tr>

<td>ace_groupcomm_profile</td>
<td>10</td>
<td>int</td>
<td>RFC 9594</td>
</tr><tr>

<td>exp</td>
<td>11</td>
<td>uint</td>
<td>RFC 9594</td>
</tr><tr>

<td>exi</td>
<td>12</td>
<td>uint</td>
<td>RFC 9594</td>
</tr><tr>

<td>creds</td>
<td>13</td>
<td>array</td>
<td>RFC 9594</td>
</tr><tr>

<td>peer_roles</td>
<td>14</td>
<td>array</td>
<td>RFC 9594</td>
</tr><tr>

<td>peer_identifiers</td>
<td>15</td>
<td>array</td>
<td>RFC 9594</td>
</tr><tr>

<td>group_policies</td>
<td>16</td>
<td>map</td>
<td>RFC 9594</td>
</tr><tr>

<td>kdc_cred</td>
<td>17</td>
<td>bstr</td>
<td>RFC 9594</td>
</tr><tr>

<td>kdc_nonce</td>
<td>18</td>
<td>bstr</td>
<td>RFC 9594</td>
</tr><tr>

<td>kdc_cred_verify</td>
<td>19</td>
<td>bstr</td>
<td>RFC 9594</td>
</tr><tr>

<td>rekeying_scheme</td>
<td>20</td>
<td>int</td>
<td>RFC 9594</td>
</tr><tr>

<td>mgt_key_material</td>
<td>27</td>
<td>bstr</td>
<td>RFC 9594</td>
</tr><tr>

<td>control_group_uri</td>
<td>28</td>
<td>tstr</td>
<td>RFC 9594</td>
</tr><tr>

<td>sign_info</td>
<td>29</td>
<td>array / Simple value "null"</td>
<td>RFC 9594 </td>
</tr><tr>

<td>kdcchallenge</td>
<td>30</td>
<td>bstr</td>
<td>RFC 9594</td>
</tr>
</tbody>

</table>

      <t>The KDC is expected to support all the parameters above. Instead, a Client can support only a subset of such parameters, depending on the roles it expects to take in the joined groups or on other conditions defined in application profiles of this specification.</t>
      <t>In the following, the parameters are categorized according to the support expected by Clients. That is, a Client that supports a parameter is able to: i) use and specify it in a request message to the KDC and ii) understand and process it if specified in a response message from the KDC. It is <bcp14>REQUIRED</bcp14> of application profiles of this specification to sort their newly defined parameters according to the same categorization (REQ29).</t>
      <t>Note that the actual use of a parameter and its inclusion in a message depends on the specific exchange, the specific Client and group involved, as well as what is defined in the used application profile of this specification.</t>

<!--[rfced] To improve readability, would you like each parameter to be its
own list item?

Original:
   A Client MUST support the following parameters.

   *  'scope', 'cnonce', 'gkty', 'key', 'num', 'exp', 'exi', 'gid',
      'gname', 'guri', 'creds', 'peer_identifiers',
      'ace_groupcomm_profile', 'control_uri', 'rekeying_scheme'.

Perhaps:
   A Client MUST support the following parameters.

   *  'scope'
   *  'cnonce'
   *  'gkty'
   *  'key'
   *  'num'
   *  'exp'
   *  'exi'
   *  'gid'
   *  'gname'
   *  'guri'
   *  'creds'
   *  'peer_identifiers'
   *  'ace_groupcomm_profile'
   *  'control_uri'
   *  'rekeying_scheme'
-->      

      <t>A Client <bcp14>MUST</bcp14> support the following parameters.</t>
      <ul spacing="normal">
        <li>'scope', 'cnonce', 'gkty', 'key', 'num', 'exp', 'exi', 'gid', 'gname', 'guri', 'creds', 'peer_identifiers', 'ace_groupcomm_profile', 'control_uri', 'rekeying_scheme'.</li>
      </ul>
      <t>A Client <bcp14>SHOULD</bcp14> support the following parameter.</t>
      <ul spacing="normal">
        <li>'get_creds': That is, not supporting this parameter would yield the inconvenient and undesirable behavior where: i) the Client does not ask for the other group members' authentication credentials upon joining the group (see <xref target="ssec-key-distribution-exchange"/>) and ii) later on as a group member, the Client only retrieves the authentication credentials of all group members (see <xref target="sec-key-retrieval-all"/>).</li>
      </ul>
      <t>The following conditional parameters are relevant only if specific conditions hold. It is <bcp14>REQUIRED</bcp14> of application profiles of this specification to define whether Clients must, should, or may support these parameters and under which circumstances (REQ30).</t>
      <ul spacing="normal">
        <li>'client_cred' and 'client_cred_verify': These parameters are relevant for a Client that has an authentication credential to use in a joined group.</li>
        <li>'kdcchallenge': This parameter is relevant for a Client that has an authentication credential to use in a joined group and that provides the access token to the KDC through a Token Transfer Request (see <xref target="token-post"/>).</li>
        <li>'creds_repo': This parameter is relevant for a Client that has an authentication credential to use in a joined group and that makes it available from a key repository different than the KDC.</li>
        <li>'group_policies': This parameter is relevant for a Client that is interested in the specific policies used in a group, but it does not know them or cannot become aware of them before joining that group.</li>
        <li>'peer_roles': This parameter is relevant for a Client that has to know about the roles of other group members, especially when retrieving and handling their corresponding authentication credentials.</li>
        <li>'kdc_nonce', 'kdc_cred', and 'kdc_cred_verify': These parameters are relevant for a Client that joins a group for which, as per the used application profile of this specification, the KDC has an associated authentication credential and this is required for the correct group operation.</li>
        <li>'mgt_key_material': This parameter is relevant for a Client that supports an advanced rekeying scheme possibly used in the group, such as based on one-to-many rekeying messages sent over IP multicast.</li>
        <li>'control_group_uri': This parameter is relevant for a Client that supports the hosting of local resources, each associated with a group (hence acting as CoAP server), and the reception of one-to-many requests sent to those resources by the KDC (e.g., over IP multicast), which targets multiple members of the corresponding group. Examples of related management operations that the KDC can perform by this means are the eviction of group members and the execution of a group rekeying process through an advanced rekeying scheme, such as based on one-to-many rekeying messages.</li>
      </ul>
    </section>
    <section anchor="error-types">
      <name>ACE Groupcomm Error Identifiers</name>
      <t>This specification defines a number of values that the KDC can use as error identifiers. These are used in error responses with Content-Format application/concise-problem-details+cbor as values of the 'error-id' field within the Custom Problem Detail entry 'ace-groupcomm-error' (see <xref target="kdc-if-errors"/>).</t>
<table anchor="fig-ACE-Groupcomm-Error-Identifiers">
  <name>ACE Groupcomm Error Identifiers</name>
  <thead>
    <tr>
      <th>Value</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      
      <td>0</td>
      <td>Operation permitted only to group members</td>
      </tr><tr>
      
      <td>1</td>
      <td>Request inconsistent with the current roles</td>
      </tr><tr>
      
      <td>2</td>
      <td>Authentication credential incompatible with the group configuration</td>
      </tr><tr>
      
      <td>3</td>
      <td>Invalid proof-of-possession evidence</td>
      </tr><tr>
      
      <td>4</td>
      <td>No available node identifiers</td>
      </tr><tr>
      
      <td>5</td>
      <td>Group membership terminated</td>
      </tr><tr>
      
      <td>6</td>
      <td>Group deleted</td>
    </tr>
  </tbody>
</table>

      <t>If a Client supports the problem-details format <xref target="RFC9290"/> and the Custom Problem Detail entry 'ace-groupcomm-error' defined in <xref target="kdc-if-errors"/> and is able to understand the error specified in the 'error-id' field therein, then the Client can use that information to determine what actions to take next. If the Concise Problem Details data item specified in the error response includes the 'detail' entry and the Client supports it, such an entry may provide additional context.</t>
      <t>In particular, the following guidelines apply, and application profiles of this specification can define more detailed actions for the Client to take when learning that a specific error has occurred.</t>
      <ul spacing="normal">
        <li>In case of error 0, the Client should stop sending the request in question to the KDC. Rather, the Client should first join the targeted group. If it has not happened already, this first requires the Client to obtain an appropriate access token authorizing access to the group and provide it to the KDC.</li>
        <li>In case of error 1, the Client as a group member should rejoin the group with all the roles needed to perform the operation in question. This might require the Client to first obtain a new access token and provide it to the KDC if the current access token does not authorize it to take those roles in the group. For operations admitted to a Client that is not a group member (e.g., an external signature verifier), the Client should first obtain a new access token authorizing to also have the missing roles.</li>
        <li>In case of error 2, the Client has to obtain or self-generate a different asymmetric key pair, as aligned to the public key algorithms and parameters used in the targeted group. After that, the Client should provide the KDC with its new authentication credential, which is consistent with the format used in the targeted group and including the new public key.</li>

<!--[rfced] To avoid the awkward phrasing of "should ensure to be computing",
may we update this to be "should confirm its computing"?

Original:
   *  In case of error 3, the Client should ensure to be computing its
      proof-of-possession evidence by correctly using the parameters and
      procedures defined in the used application profile of this
      specification.

Perhaps:
   *  In case of error 3, the Client should confirm its computing of the
      proof-of-possession evidence by correctly using the parameters and
      procedures defined in the used application profile of this
      specification.  

Or:
   *  In case of error 3, the Client should ensure that it is computing
      its proof-of-possession evidence by correctly using the parameters 
      and procedures defined in the used application profile of this
      specification.
-->

        <li>In case of error 3, the Client should ensure to be computing its proof-of-possession evidence by correctly using the parameters and procedures defined in the used application profile of this specification. In an unattended setup, it might not be possible for a Client to autonomously diagnose the error and take an effective next action to address it.</li>
        <li>In case of error 4, the Client should wait for a certain (pre-configured) amount of time before trying to resend its request to the KDC.</li>
        <li>In case of error 5, the Client may try joining the group again. This might require the Client to first obtain a new access token and provide it to the KDC, e.g., if the current access token has expired.</li>
        <li>In case of error 6, the Client should clean up its state regarding the group, just like if it has left the group with no intention to rejoin it.</li>
      </ul>
    </section>
    <section anchor="sec-cons">
      <name>Security Considerations</name>
      <t>Security considerations are inherited from the ACE framework <xref target="RFC9200"/> and from the specific transport profile of ACE used between the Clients and the KDC, e.g., <xref target="RFC9202"/> and <xref target="RFC9203"/>.</t>
      <t>When using the problem-details format defined in <xref target="RFC9290"/> for error responses, then the privacy and security considerations from Sections <xref target="RFC9290" section="4" sectionFormat="bare"/> and <xref target="RFC9290" section="5" sectionFormat="bare"/> of <xref target="RFC9290"/> also apply.</t>
      <t>Furthermore, the following security considerations apply.</t>
      <section anchor="sec-cons-communication">
        <name>Secure Communication in the Group</name>
        <t>When a group member receives a message from a certain sender for the first time since joining the group, it needs to have a mechanism in place to avoid replayed messages and to assert their freshness, e.g., as described in <xref section="B.1.2" sectionFormat="of" target="RFC8613"/> or <xref section="10" sectionFormat="of" target="I-D.ietf-core-oscore-groupcomm"/>. Such a mechanism also aids the recipient group member in case it has rebooted and lost the security state used to protect previous group communications with that sender.</t>
        <t>By its nature, the KDC is invested with a large amount of trust, since it acts as a generator and provider of the symmetric keying material used to protect communications in each of its groups. While details depend on the specific communication and security protocols used in the group, the KDC is in the position to decrypt messages exchanged in the group as if it was also a group member, as long as those are protected through commonly shared group keying material.</t>
        <t>A compromised KDC would thus put the attacker in the same position, which also means that:</t>
        <ul spacing="normal">
          <li>The attacker can generate and control new group keying material, hence possibly rekeying the group and evicting certain group members as part of a broader attack.</li>
          <li>The attacker can actively participate in communications in a group, even without having been authorized to join it, and can allow further unauthorized entities to do so.</li>
          <li>The attacker can build erroneous associations between node identifiers and group members' authentication credentials.</li>
        </ul>
        <t>On the other hand, as long as the security protocol used in the group ensures source authentication of messages (e.g., by means of signatures), the KDC is not able to impersonate group members since it does not have their private keys.</t>
        <t>Further security considerations are specific to the communication and security protocols used in the group, and thus have to be provided by those protocols and complemented by the application profiles of this specification using them.</t>
      </section>
      <section anchor="sec-cons-rekeying">
        <name>Update of Group Keying Material</name>
        <t>The KDC can generate new group keying material and provide it to the group members (rekeying) through the rekeying scheme used in the group, as discussed in <xref target="sec-group-rekeying"/>.</t>
        <t>In particular, the KDC must renew the latest group keying material upon its expiration. Before then, the KDC <bcp14>MAY</bcp14> also renew the group keying material on a regular or periodical fashion.</t>
        <t>Unless otherwise defined by an application profile of this specification, the KDC <bcp14>SHOULD</bcp14> renew the group keying material upon a group membership change. As a possible exception, the KDC may not rekey the group upon the joining of a new group member if the application does not require backward security. As another possible exception discussed more in detail later in this section, the KDC may rely on a rekeying policy that reasonably takes into account the expected rate of group membership changes and the duration of a group rekeying.</t>
        <t>Since the minimum number of group members is one, the KDC <bcp14>SHOULD</bcp14> provide even a Client joining an empty group with new keying material never used before in that group. Similarly, the KDC <bcp14>SHOULD</bcp14> also provide new group keying material to a Client that remains the only member in the group after the leaving of other group members.</t>
        <t>Note that the considerations in <xref target="sec-cons-communication"/> about dealing with replayed messages still hold, even in case the KDC rekeys the group upon every single joining of a new group member. However, if the KDC has renewed the group keying material upon a group member's joining and the time interval between the end of the rekeying process and that member's joining is sufficiently small, then that group member is also on the safe side, since it would not accept replayed messages protected with the old group keying material previous to its joining.</t>
        <t>Once a joining node has obtained the new, latest keying material through a Join Response from the KDC (see <xref target="ssec-key-distribution-exchange"/>), the joining node becomes able to read any message that was exchanged in the group and protected with that keying material. This is the case if the KDC provides the current group members with the new, latest keying material before completing the joining procedure. However, the joining node is not able to read messages exchanged in the group and protected with keying material older than the one provided in the Join Response, i.e., having a strictly lower version number NUM.</t>
        <t>A node that has left the group should not expect any of its outgoing messages to be successfully processed if received by other nodes in the group after its leaving due to a possible group rekeying occurring before the message reception.</t>
        <t>The KDC may enforce a rekeying policy that takes into account the overall time required to rekey the group, as well as the expected rate of changes in the group membership. That is, the KDC may not rekey the group at each and every group membership change, for instance, if members' joining and leaving occur frequently and performing a group rekeying takes too long. Instead, the KDC might rekey the group after a minimum number of group members have joined or left within a given time interval, after a maximum amount of time since the last group rekeying was completed, or yet during predictable network inactivity periods.</t>
        <t>However, this would result in the KDC not constantly preserving backward and forward security in the group. That is:</t>
        <ul spacing="normal">
          <li>Newly joining group members would be able to access the keying material used before their joining, and thus they could access past group communications if they have recorded old exchanged messages. This might still be acceptable for some applications and in situations where the new group members are freshly deployed through strictly controlled procedures.</li>
          <li>The leaving group members would remain able to access upcoming group communications, as protected with the current keying material that has not been updated. This is typically undesirable, especially if the leaving group member is compromised or suspected to be, and it might have an impact or compromise the security properties of the protocols used in the group to protect messages exchanged among the group members.</li>
        </ul>
        <t>The KDC should renew the group keying material in case it has rebooted, even if it stores the whole group keying material in persistent storage. This assumes that the secure associations with the current group members as well as any administrative keying material required to rekey the group are also stored in persistent storage.</t>
        <t>However, if the KDC relies on Observe notifications to distribute the new group keying material, the KDC would have lost all the current ongoing Observations with the group members after rebooting, and the group members would continue using the old group keying material. Therefore, the KDC will rely on each group member asking for the new group keying material (see Sections <xref target="ssec-key-material-retrieval" format="counter"/> and <xref target="update-keys" format="counter"/>) or perform a group rekeying by actively sending rekeying messages to group members as discussed in <xref target="sec-group-rekeying"/>.</t>
        <t>The KDC needs to have a mechanism in place to detect DoS attacks from nodes repeatedly performing actions that might trigger a group rekeying. Such actions can include leaving and/or rejoining the group at high rates or often asking the KDC for new individual keying material. Ultimately, the KDC can resort to removing these nodes from the group and (temporarily) preventing them from joining the group again.</t>
        <t>The KDC also needs to have a congestion control mechanism in place in order to avoid network congestion upon distributing new group keying material. For example, CoAP and Observe give guidance on such mechanisms, see <xref section="4.7" sectionFormat="of" target="RFC7252"/> and <xref section="4.5.1" sectionFormat="of" target="RFC7641"/>.</t>
      </section>
      <section anchor="block-wise-considerations">
        <name>Block-Wise Considerations</name>
        <t>If the Block-Wise CoAP options <xref target="RFC7959"/> are used and the keying material is updated in the middle of a Block-Wise transfer, the sender of the blocks just changes the group keying material to the updated one and continues the transfer. As long as both sides get the new group keying material, updating the group keying material in the middle of a transfer will not cause any issue. Otherwise, the sender will have to transmit the message again when receiving an error message from the recipient.</t>
        <t>Compared to a scenario where the transfer does not use Block-Wise, depending on how fast the group keying material is changed, the group members might consume a larger amount of the network bandwidth by repeatedly resending the same blocks, which might be problematic.</t>
      </section>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>Per this document, IANA has completed the following actions.</t>
      <section anchor="media-type">
        <name>Media Type Registrations</name>
        <t>This specification has registered the 'application/ace-groupcomm+cbor' media type for messages of the protocols defined in this document following the ACE exchange and carrying parameters encoded in CBOR. This registration follows the procedures specified in <xref target="RFC6838"/>.</t>
<dl newline="false">
        <dt>Type name:</dt><dd>application</dd>
        <dt>Subtype name:</dt><dd> ace-groupcomm+cbor</dd>
        <dt>Required parameters:</dt><dd> N/A</dd>
        <dt>Optional parameters:</dt><dd> N/A</dd>
        <dt>Encoding considerations:</dt><dd> Must be encoded as a CBOR map containing the parameters defined in RFC 9594.</dd>
        <dt>Security considerations:</dt><dd> See <xref target="sec-cons"/> of RFC 9594.</dd>
        <dt>Interoperability considerations:</dt><dd> N/A</dd>
        <dt>Published specification:</dt><dd> RFC 9594</dd>
        <dt>Applications that use this media type:</dt><dd> The type is used by Authorization Servers, Clients, and Resource Servers that support the ACE groupcomm framework as specified in RFC 9594.</dd>
        <dt>Fragment identifier considerations:</dt><dd> N/A</dd>
        <dt>Additional information:</dt><dd> N/A</dd>
        <dt>Person &amp; email address to contact for further information:</dt><dd> ACE WG mailing list (ace@ietf.org) or IETF Applications and Real-Time Area (art@ietf.org)</dd>
        <dt>Intended usage:</dt><dd> COMMON</dd>
        <dt>Restrictions on usage:</dt><dd> None</dd>
        <dt>Author/Change controller:</dt><dd> IETF</dd>
        <dt>Provisional registration:</dt><dd> No</dd>
</dl>
      </section>
      <section anchor="content-type">
        <name>CoAP Content-Formats</name>
        <t>IANA has registered the following entry in the "CoAP Content-Formats" registry within the "CoRE Parameters" registry group.</t>
<dl newline="false" spacing="compact">
        <dt>Content Type:</dt><dd> application/ace-groupcomm+cbor</dd>
        <dt>Content Coding:</dt><dd> -</dd>
        <dt>ID:</dt><dd> 261</dd>
        <dt>Reference:</dt><dd> RFC 9594</dd>
</dl>
      </section>
      <section anchor="iana-kinfo">
        <name>OAuth Parameters</name>
        <t>IANA has registered the following entries in the "OAuth Parameters" registry, following the procedure specified in <xref section="11.2" sectionFormat="of" target="RFC6749"/>.</t>
        <dl spacing="compact">
          <dt>Parameter name:</dt><dd> sign_info</dd>
          <dt>Parameter usage location:</dt><dd> client-rs request, rs-client response</dd>
          <dt>Change controller:</dt><dd> IETF</dd>
          <dt>Specification document(s):</dt><dd> RFC 9594</dd>
</dl>

<dl spacing="compact">
          <dt>Parameter name:</dt><dd> kdcchallenge</dd>
          <dt>Parameter usage location:</dt><dd> rs-client response</dd>
          <dt>Change controller:</dt><dd> IETF</dd>
          <dt>Specification document(s):</dt><dd> RFC 9594</dd>
        </dl>

      </section>
      <section anchor="iana-kinfo-map">
        <name>OAuth Parameters CBOR Mappings</name>
        <t>IANA has registered the following entries in the "OAuth Parameters CBOR
Mappings" registry, following the procedure specified in <xref section="8.10" sectionFormat="of" target="RFC9200"/>.</t>
        <dl spacing="compact">
          <dt>Name:</dt><dd>sign_info</dd>
          <dt>CBOR Key:</dt><dd>45</dd>
          <dt>Value Type:</dt><dd>Null or array</dd>
          <dt>Reference:</dt><dd>RFC 9594</dd>
</dl>

        <dl spacing="compact">
          <dt>Name:</dt><dd>kdcchallenge</dd>
          <dt>CBOR Key:</dt><dd>46</dd>
          <dt>Value Type:</dt><dd>byte string</dd>
          <dt>Reference:</dt><dd>RFC 9594</dd>
        </dl>
      </section>
      <section anchor="if-ace-group">
        <name>Interface Description (if=) Link Target Attribute Values</name>
        <t>IANA has registered the following entry in the "Interface Description (if=) Link Target Attribute Values" registry within the "CoRE Parameters" registry group.</t>
        <dl spacing="compact">
          <dt>Value:</dt><dd> ace.groups</dd>
          <dt>Description:</dt><dd> The KDC interface at the parent resource of group-membership resources is used to retrieve names of security groups using the ACE framework.</dd>
          <dt>Reference:</dt><dd> <xref target="kdc-if"/> of RFC 9594</dd>
        </dl>

        <dl spacing="compact">
          <dt>Value:</dt><dd> ace.group</dd>
          <dt>Description:</dt><dd> The KDC interface at a group-membership resource is used to provision keying material and related information and policies to members of the corresponding security group using the ACE framework.</dd>
          <dt>Reference:</dt><dd> <xref target="kdc-if"/> of RFC 9594</dd>
        </dl>
      </section>
      <section anchor="iana-custom-problem-details">
        <name>Custom Problem Detail Keys Registry</name>
        <t>IANA has registered the following entry in the "Custom Problem Detail Keys" registry within the "CoRE Parameters" registry group.</t>
        <dl spacing="compact">
          <dt>Key Value:</dt><dd>0</dd>
          <dt>Name:</dt><dd> ace-groupcomm-error</dd>
<!--[rfced] We suggest moving the RFC number so that it's not used as
an adjective before the noun. If this change is acceptable, we will ask
IANA to update the registry 
(https://www.iana.org/assignments/core-parameters/core-parameters.xhtml#core-custom-problem-detail-keys) accordingly. However, we note that the other registered
value has a similar description ("Carry [RFC7807] problem details...").

Original:
   *  Brief Description: Carry [RFC-XXXX] problem details in a Concise
      Problem Details data item.

Suggested:
   Brief Description: Carry problem details from RFC 9594 in a Concise 
      Problem Details data item.
-->
          <dt>Brief Description:</dt><dd>Carry RFC 9594 problem details in a Concise Problem Details data item.</dd>
          <dt>Change Controller:</dt><dd> IETF</dd>
          <dt>Reference:</dt><dd>RFC 9594, <xref target="kdc-if-errors"/></dd>
        </dl>
      </section>
      <section anchor="iana-reg">
        <name>ACE Groupcomm Parameters</name>

<!--[rfced] In Sections 11.7 - 11.13, this paragraph seems unnecessary and
redundant with the registration procedures described within each section.
So, we suggest the paragraph be trimmed as follows in each of those sections.
a) Is this acceptable?

Original:
   The registry has been created to use the "Expert Review" registration
   procedure [RFC8126].  Expert review guidelines are provided in
   Section 11.14.  Values in this registry are covered by different
   registration policies as indicated.  It should be noted that, in
   addition to the expert review, some portions of the registry require
   a specification, potentially a Standards Track RFC, to be supplied as
   well.

Perhaps:
   Values in this registry are covered by different registration policies 
   as indicated below. Some policies require Expert Review; guidelines are
   provided in Section 11.14.

b) If that change is not acceptable, did you intend for all registrations to
be subject to expert review, including in the Private Use range? That is how
the original text reads.  Please revise as necessary.
-->
<t>This specification has established the "ACE Groupcomm Parameters" IANA registry within the "Authentication and Authorization for Constrained Environments (ACE)" registry group.</t>
        <t>The registry has been created to use the "Expert Review" registration procedure <xref target="RFC8126"/>. Expert Review guidelines are provided in <xref target="review"/>. Values in this registry are covered by different registration policies as indicated. It should be noted that, in addition to the Expert Review, some portions of the registry require a specification, potentially a Standards Track RFC, to be supplied as well.</t>
        <t>The columns of this registry are:</t>
        <dl spacing="normal">
          <dt>Name:</dt><dd> This is a descriptive name that enables easier reference to
the item. The name <bcp14>MUST</bcp14> be unique. It is not used in the encoding.</dd>
          <dt>CBOR Key:</dt><dd> This is the value used as the CBOR key of the item. These values <bcp14>MUST</bcp14> be unique. The value can be a positive integer, a negative integer, or a text string. Different ranges of values use different registration policies <xref target="RFC8126"/>. Integer values from -256 to 255 as well as text strings of length 1 are designated as "Standards Action With Expert Review". Integer values from -65536 to -257 and from 256 to 65535 as well as text strings of length 2 are designated as "Specification Required". Integer values greater than 65535 as well as text strings of length greater than 2 are designated as "Expert Review". Integer values less than -65536 are marked as "Private Use".</dd>
          <dt>CBOR Type:</dt><dd> This contains the CBOR type of the item or a pointer to the registry that defines its type when that depends on another item.</dd>
          <dt>Reference:</dt><dd> This contains a pointer to the public specification for the item.</dd>
        </dl>
        <t>This registry has been initially populated with the values in <xref target="fig-ACE-Groupcomm-Parameters"/>.</t>
      </section>
      <section anchor="iana-key">
        <name>ACE Groupcomm Key Types</name>
        <t>This specification establishes the "ACE Groupcomm Key Types" IANA registry within the "Authentication and Authorization for Constrained Environments (ACE)" registry group.</t>
        <t>The registry has been created to use the "Expert Review" registration procedure <xref target="RFC8126"/>. Expert Review guidelines are provided in <xref target="review"/>. Values in this registry are covered by different registration policies as indicated. It should be noted that, in addition to the Expert Review, some portions of the registry require a specification, potentially a Standards Track RFC, to be supplied as well.</t>
        <t>The columns of this registry are:</t>
        <dl spacing="normal">
          <dt>Name:</dt><dd> This is a descriptive name that enables easier reference to
the item. The name <bcp14>MUST</bcp14> be unique. It is not used in the encoding.</dd>
          <dt>Key Type Value:</dt><dd> This is the value used to identify the keying material. These values <bcp14>MUST</bcp14> be unique. The value can be a positive integer, a negative integer, or a text string. Different ranges of values use different registration policies <xref target="RFC8126"/>. Integer values from -256 to 255 as well as text strings of length 1 are designated as "Standards Action With Expert Review". Integer values from -65536 to -257 and from 256 to 65535 as well as text strings of length 2 are designated as "Specification Required". Integer values greater than 65535 as well as text strings of length greater than 2 are designated as "Expert Review". Integer values less than -65536 are marked as "Private Use".</dd>
          <dt>Profile:</dt><dd> This field may contain one or more descriptive strings of application profiles to be used with this item. The values should be taken from the "Name" column of the "ACE Groupcomm Profiles" registry.</dd>
          <dt>Description:</dt><dd> This field contains a brief description of the keying material.</dd>
          <dt>Reference:</dt><dd> This contains a pointer to the public specification for the format of the keying material, if one exists.</dd>
        </dl>
        <t>This registry has been initially populated with the value in <xref target="fig-gkty"/>.</t>
      </section>
      <section anchor="ace-groupcomm-profiles">
        <name>ACE Groupcomm Profiles</name>
        <t>This specification establishes the "ACE Groupcomm Profiles" IANA registry within the "Authentication and Authorization for Constrained Environments (ACE)" registry group.</t>
        <t>The registry has been created to use the "Expert Review" registration procedure <xref target="RFC8126"/>. Expert Review guidelines are provided in <xref target="review"/>. Values in this registry are covered by different registration policies as indicated. It should be noted that, in addition to the Expert Review, some portions of the registry require a specification, potentially a Standards Track RFC, to be supplied as well.</t>
        <t>The columns of this registry are:</t>
        <dl spacing="normal">
          <dt>Name:</dt><dd> The name of the application profile to be used as value of the profile attribute.</dd>
          <dt>Description:</dt><dd> Text giving an overview of the application profile and the context it is developed for.</dd>
          <dt>CBOR Value:</dt><dd> CBOR abbreviation for the name of this application profile. These values <bcp14>MUST</bcp14> be unique. The value can be a positive integer or a negative integer. Different ranges of values use different registration policies <xref target="RFC8126"/>. Integer values from -256 to 255 are designated as "Standards Action With Expert Review". Integer values from -65536 to -257 and from 256 to 65535 are designated as "Specification Required". Integer values greater than 65535 are designated as "Expert Review". Integer values less than -65536 are marked as "Private Use".</dd>
          <dt>Reference:</dt><dd> This contains a pointer to the public specification of the abbreviation for this application profile, if one exists.</dd>
        </dl>
        <t>This registry has been initially populated with the value in <xref target="ace-groupcomm-profile-0"/>.</t>
      </section>
      <section anchor="ace-groupcomm-policies">
        <name>ACE Groupcomm Policies</name>
        <t>This specification establishes the "ACE Groupcomm Policies" IANA registry within the "Authentication and Authorization for Constrained Environments (ACE)" registry group.</t>
        <t>The registry has been created to use the "Expert Review" registration procedure <xref target="RFC8126"/>. Expert Review guidelines are provided in <xref target="review"/>. Values in this registry are covered by different registration policies as indicated. It should be noted that, in addition to the Expert Review, some portions of the registry require a specification, potentially a Standards Track RFC, to be supplied as well.</t>
        <t>The columns of this registry are:</t>
        <dl spacing="normal">
          <dt>Name:</dt><dd> The name of the group communication policy.</dd>
          <dt>CBOR Label:</dt><dd> The value to be used to identify this group communication policy. These values <bcp14>MUST</bcp14> be unique. The value can be a positive integer, a negative integer, or a text string. Different ranges of values use different registration policies <xref target="RFC8126"/>. Integer values from -256 to 255 as well as text strings of length 1 are designated as "Standards Action With Expert Review". Integer values from -65536 to -257 and from 256 to 65535 as well as text strings of length 2 are designated as "Specification Required". Integer values greater than 65535 as well as text strings of length greater than 2 are designated as "Expert Review". Integer values less than -65536 are marked as "Private Use".</dd>
          <dt>CBOR Type:</dt><dd> The CBOR type used to encode the value of this group communication policy.</dd>
          <dt>Description:</dt><dd> This field contains a brief description for this group communication policy.</dd>
          <dt>Reference:</dt><dd> This field contains a pointer to the public specification providing the format of the group communication policy, if one exists.</dd>
        </dl>
        <t>This registry has been initially populated with the values in <xref target="fig-ACE-Groupcomm-Policies"/>.</t>
      </section>
      <section anchor="sequence-number-synchronization-methods">
        <name>Sequence Number Synchronization Methods</name>
        <t>This specification establishes the "Sequence Number Synchronization Methods" IANA registry within the "Authentication and Authorization for Constrained Environments (ACE)" registry group.</t>
        <t>The registry has been created to use the "Expert Review" registration procedure <xref target="RFC8126"/>. Expert Review guidelines are provided in <xref target="review"/>. Values in this registry are covered by different registration policies as indicated. It should be noted that, in addition to the Expert Review, some portions of the registry require a specification, potentially a Standards Track RFC, to be supplied as well.</t>
        <t>The columns of this registry are:</t>
        <dl spacing="normal">
          <dt>Name:</dt><dd> The name of the sequence number synchronization method.</dd>
          <dt>Value:</dt><dd> The value to be used to identify this sequence number synchronization method. These values <bcp14>MUST</bcp14> be unique. The value can be a positive integer, a negative integer, or a text string. Different ranges of values use different registration policies <xref target="RFC8126"/>. Integer values from -256 to 255 as well as text strings of length 1 are designated as "Standards Action With Expert Review". Integer values from -65536 to -257 and from 256 to 65535 as well as text strings of length 2 are designated as "Specification Required". Integer values greater than 65535 as well as text strings of length greater than 2 are designated as "Expert Review". Integer values less than -65536 are marked as "Private Use".</dd>
          <dt>Description:</dt><dd> This field contains a brief description for this sequence number synchronization method.</dd>
          <dt>Reference:</dt><dd> This field contains a pointer to the public specification describing the sequence number synchronization method.</dd>
        </dl>
      </section>
      <section anchor="iana-ace-groupcomm-errors">
        <name>ACE Groupcomm Errors</name>
        <t>This specification establishes the "ACE Groupcomm Errors" IANA registry within the "Authentication and Authorization for Constrained Environments (ACE)" registry group.</t>
        <t>The registry has been created to use the "Expert Review" registration procedure <xref target="RFC8126"/>. Expert Review guidelines are provided in <xref target="review"/>. Values in this registry are covered by different registration policies as indicated. It should be noted that, in addition to the Expert Review, some portions of the registry require a specification, potentially a Standards Track RFC, to be supplied as well.</t>
        <t>The columns of this registry are:</t>
        <dl spacing="normal">
          <dt>Value:</dt><dd> The value to be used to identify the error. These values <bcp14>MUST</bcp14> be unique. The value can be a positive integer or a negative integer. Different ranges of values use different registration policies <xref target="RFC8126"/>. Integer values from -256 to 255 are designated as "Standards Action With Expert Review". Integer values from -65536 to -257 and from 256 to 65535 are designated as "Specification Required". Integer values greater than 65535 are designated as "Expert Review". Integer values less than -65536 are marked as "Private Use".</dd>
          <dt>Description:</dt><dd> This field contains a brief description of the error.</dd>
          <dt>Reference:</dt><dd> This field contains a pointer to the public specification defining the error, if one exists.</dd>
        </dl>
        <t>This registry has been initially populated with the values in <xref target="fig-ACE-Groupcomm-Error-Identifiers"/>. The "Reference" column for all of these entries refers to this document.</t>
      </section>
      <section anchor="iana-ace-groupcomm-rekeying-schemes">
        <name>ACE Groupcomm Rekeying Schemes</name>
        <t>This specification establishes the "ACE Groupcomm Rekeying Schemes" IANA registry within the "Authentication and Authorization for Constrained Environments (ACE)" registry group.</t>
        <t>The registry has been created to use the "Expert Review" registration procedure <xref target="RFC8126"/>. Expert Review guidelines are provided in <xref target="review"/>. Values in this registry are covered by different registration policies as indicated. It should be noted that, in addition to the Expert Review, some portions of the registry require a specification, potentially a Standards Track RFC, to be supplied as well.</t>
        <t>The columns of this registry are:</t>
        <dl spacing="normal">
          <dt>Value:</dt><dd> The value to be used to identify the group rekeying scheme. These values <bcp14>MUST</bcp14> be unique. The value can be a positive integer or a negative integer. Different ranges of values use different registration policies <xref target="RFC8126"/>. Integer values from -256 to 255 are designated as "Standards Action With Expert Review". Integer values from -65536 to -257 and from 256 to 65535 are designated as "Specification Required". Integer values greater than 65535 are designated as "Expert Review". Integer values less than -65536 are marked as "Private Use".</dd>
          <dt>Name:</dt><dd> The name of the group rekeying scheme.</dd>
          <dt>Description:</dt><dd> This field contains a brief description of the group rekeying scheme.</dd>
          <dt>Reference:</dt><dd> This field contains a pointer to the public specification defining the group rekeying scheme, if one exists.</dd>
        </dl>
        <t>This registry has been initially populated with the value in <xref target="rekeying-scheme-0"/>.</t>
      </section>
      <section anchor="review">
        <name>Expert Review Instructions</name>
        <t>The IANA registries established in this document are defined as Expert Review.
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.</t>
        <t>Expert Reviewers should take into consideration the following points:</t>
        <ul spacing="normal">
          <li>Point squatting should be discouraged. Reviewers are encouraged to get sufficient information for registration requests to ensure that the usage is not going to duplicate one that is already registered and that the point is likely to be used in deployments. The zones tagged as "Private Use" are intended for testing purposes and closed environments; code points in other ranges should not be assigned for testing.</li>
          <li>Specifications are required for the standards track range of point assignment. Specifications should exist for Specification Required ranges, but early assignment before a specification is available is considered to be permissible. When specifications are not provided, the description provided needs to have sufficient information to identify what the point is being used for.</li>
          <li>Experts should take into account the expected usage of fields when approving point assignments. The fact that there is a range for Standards Track documents does not mean that a Standards Track document cannot have points assigned outside of that range. The length of the encoded value should be weighed against how many code points of that length are left, the size of the device it will be used on, and the number of code points left that encode to that size.</li>
        </ul>
      </section>
    </section>
  </middle>
  <back>

    <displayreference target="I-D.ietf-core-groupcomm-bis" to="GROUP-CoAP"/>
    <displayreference target="I-D.ietf-core-oscore-groupcomm" to="GROUP-OSCORE"/>
    <displayreference target="I-D.ietf-core-coap-pubsub" to="CoAP-PUBSUB"/>
    <displayreference target="I-D.ietf-cose-cbor-encoded-cert" to="C509-CERT"/>
    <displayreference target="I-D.tiloca-core-oscore-discovery" to="OSCORE-DISCOVERY"/>

    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
	
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3629.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6690.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6749.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6838.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8126.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8610.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7252.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7967.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8747.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8949.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9052.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9053.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9200.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9237.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9290.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9338.xml"/>

        <reference anchor="COSE.Algorithms" target="https://www.iana.org/assignments/cose/">
          <front>
            <title>COSE Algorithms</title>
            <author>
              <organization>IANA</organization>
            </author>
          </front>
        </reference>

        <reference anchor="COSE.Header.Parameters" target="https://www.iana.org/assignments/cose/">
          <front>
            <title>COSE Header Parameters</title>
            <author>
              <organization>IANA</organization>
            </author>
          </front>
        </reference>

        <reference anchor="COSE.Key.Types" target="https://www.iana.org/assignments/cose/">
          <front>
            <title>COSE Key Types</title>
            <author>
              <organization>IANA</organization>
            </author>
          </front>
        </reference>

        <reference anchor="CBOR.Tags" target="https://www.iana.org/assignments/cbor-tags/">
          <front>
            <title>Concise Binary Object Representation (CBOR) Tags</title>
            <author>
              <organization>IANA</organization>
            </author>
          </front>
        </reference>

        <reference anchor="CoAP.Content.Formats" target="https://www.iana.org/assignments/core-parameters/">
          <front>
            <title>CoAP Content-Formats</title>
            <author>
              <organization>IANA</organization>
            </author>
          </front>
        </reference>

      </references>
      <references>
        <name>Informative References</name>

        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2093.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2094.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2627.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3986.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5280.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7519.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7641.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7959.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8259.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8392.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8613.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9202.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9203.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9277.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9431.xml"/>

<!-- [I-D.ietf-core-groupcomm-bis] IESG state: I-D Exists as of 02/26/24 -->
        <xi:include href="https://datatracker.ietf.org/doc/bibxml3/draft-ietf-core-groupcomm-bis.xml"/>

<!-- [I-D.ietf-core-oscore-groupcomm] IESG state: I-D Exists as of 02/26/24
     Long way used to fix "Mattsson, J. P."-->

<reference anchor="I-D.ietf-core-oscore-groupcomm" target="https://datatracker.ietf.org/doc/html/draft-ietf-core-oscore-groupcomm-21">
<front>
<title>
Group Object Security for Constrained RESTful Environments (Group OSCORE)
</title>
<author initials="M." surname="Tiloca" fullname="Marco Tiloca">
<organization>RISE AB</organization>
</author>
<author initials="G." surname="Selander" fullname="Göran Selander">
<organization>Ericsson AB</organization>
</author>
<author initials="F." surname="Palombini" fullname="Francesca Palombini">
<organization>Ericsson AB</organization>
</author>
<author initials="J." surname="Preuß Mattsson" fullname="John Preuß Mattsson">
<organization>Ericsson AB</organization>
</author>
<author initials="R." surname="Höglund" fullname="Rikard Höglund">
<organization>RISE AB</organization>
</author>
<date month="March" day="4" year="2024"/>
</front>
<seriesInfo name="Internet-Draft" value="draft-ietf-core-oscore-groupcomm-21"/>
</reference>

<!-- [I-D.ietf-core-coap-pubsub] IESG state: I-D Exists as of 02/26/24 -->
        <xi:include href="https://datatracker.ietf.org/doc/bibxml3/draft-ietf-core-coap-pubsub.xml"/>

<!-- [I-D.ietf-cose-cbor-encoded-cert] IESG state: I-D Exists as of 7/7/24
     Long way used to fix "Mattsson, J. P."-->
<reference anchor="I-D.ietf-cose-cbor-encoded-cert" target="https://datatracker.ietf.org/doc/html/draft-ietf-cose-cbor-encoded-cert-11">
<front>
<title>
CBOR Encoded X.509 Certificates (C509 Certificates)
</title>
<author initials="J." surname="Preuß Mattsson" fullname="John Preuß Mattsson">
<organization>Ericsson AB</organization>
</author>
<author initials="G." surname="Selander" fullname="Göran Selander">
<organization>Ericsson AB</organization>
</author>
<author initials="S." surname="Raza" fullname="Shahid Raza">
<organization>RISE AB</organization>
</author>
<author initials="J." surname="Höglund" fullname="Joel Höglund">
<organization>RISE AB</organization>
</author>
<author initials="M." surname="Furuhed" fullname="Martin Furuhed">
<organization>Nexus Group</organization>
</author>
<date month="July" day="8" year="2024"/>
</front>
<seriesInfo name="Internet-Draft" value="draft-ietf-cose-cbor-encoded-cert-11"/>
</reference>

<!-- [I-D.tiloca-core-oscore-discovery] IESG state: I-D Exists as of 02/26/24 -->
        <xi:include href="https://datatracker.ietf.org/doc/bibxml3/draft-tiloca-core-oscore-discovery.xml"/>

      </references>
    </references>
    <section anchor="req">
      <name>Requirements for Application Profiles</name>
      <t>This section lists the requirements for application profiles of this specification for the convenience of application profile designers.</t>
      <section anchor="req-mandatory">
        <name>Mandatory-to-Address Requirements</name>
        <ol type="REQ%d:">
          <li anchor="req1">Specify the format and encoding of 'scope'. This includes defining the set of possible roles and their identifiers, as well as the corresponding encoding to use in the scope entries according to the used scope format (see <xref target="ssec-authorization-request"/>).</li>
          <li>If the AIF format of 'scope' is used, register its specific instance of "Toid" and "Tperm" as media type parameters and a corresponding Content-Format, as per the guidelines in <xref target="RFC9237"/>.</li>
          <li>If used, specify the acceptable values for 'sign_alg' (see <xref target="token-post"/>).</li>
          <li>If used, specify the acceptable values for 'sign_parameters' (see <xref target="token-post"/>).</li>
          <li>If used, specify the acceptable values for 'sign_key_parameters' (see <xref target="token-post"/>).</li>
          <li>Specify the acceptable formats for authentication credentials and, if used, the acceptable values for 'cred_fmt' (see <xref target="token-post"/>).</li>
          <li>If the value of the GROUPNAME URI path and the group name in the access token scope (gname in <xref target="ssec-authorization-response"/>) are not required to coincide, specify the mechanism to map the GROUPNAME value in the URI to the group name (see <xref target="kdc-if"/>).</li>
          <li>Define whether the KDC has an authentication credential and if this has to be provided through the 'kdc_cred' parameter (see <xref target="gid-post"/>).</li>
          <li>Specify if any part of the KDC interface as defined in this document is not supported by the KDC (see <xref target="kdc-if"/>).</li>
          <li>Register a Resource Type for the group-membership resource, which is used to discover the correct URL for sending a Join Request to the KDC (see <xref target="kdc-if"/>).</li>
          <li>Define what specific actions (e.g., CoAP methods) are allowed on each resource provided by the KDC interface, depending on whether the Client is a current group member; the roles that a Client is authorized to take as per the obtained access token (see <xref target="ssec-authorization-request"/>); and the roles that the Client has as a current group member.</li>
          <li>Categorize possible newly defined operations for Clients into primary operations expected to be minimally supported and secondary operations and provide accompanying considerations (see <xref target="client-operations"/>).</li>
          <li>Specify the encoding of the group identifier (see <xref target="ace-group-fetch"/>).</li>
          <li>Specify the approaches used to compute and verify the PoP evidence to include in 'client_cred_verify' and which of those approaches is used in which case (see <xref target="gid-post"/>).</li>
          <li>Specify how the nonce N_S is generated if the token is not provided to the KDC through the Token Transfer Request to the authz-info endpoint (e.g., if it is used directly to validate TLS instead).</li>
          <li>Define the initial value of the 'num' parameter (see <xref target="gid-post"/>).</li>
          <li>Specify the format of the 'key' parameter and register a corresponding entry in the "ACE Groupcomm Key Types" IANA registry (see <xref target="gid-post"/>).</li>
          <li>Specify the acceptable values of the 'gkty' parameter (see <xref target="gid-post"/>).</li>
          <li>Specify and register the application profile identifier (see <xref target="gid-post"/>).</li>
          <li>If used, specify the format and content of 'group_policies' and its entries. Specify the policies' default values (see <xref target="gid-post"/>).</li>
          <li>Specify the approaches used to compute and verify the PoP evidence to include in 'kdc_cred_verify' and which of those approaches is used in which case (see Sections <xref target="gid-post" format="counter"/> and <xref target="kdc-pub-key-get" format="counter"/>). If external signature verifiers are supported, specify how those provide a nonce to the KDC to be used for computing the PoP evidence (see <xref target="kdc-pub-key-get"/>).</li>
          <li>Specify the communication protocol that the members of the group must use (e.g., CoAP for group communication).</li>
          <li>Specify the security protocol the group members must use to protect their communication (e.g., group OSCORE). This must provide encryption, integrity, and replay protection.</li>
          <li>Specify how the communication is secured between the Client and KDC. Optionally, specify a transport profile of ACE <xref target="RFC9200"/> to use between Client and KDC (see <xref target="ssec-key-distribution-exchange"/>).</li>
          <li>Specify the format of the identifiers of group members (see Sections <xref target="gid-post" format="counter"/> and <xref target="pubkey-fetch" format="counter"/>).</li>
          <li>Specify policies at the KDC to handle ids that are not included in 'get_creds' (see <xref target="pubkey-fetch"/>).</li>
          <li>Specify the format of newly generated individual keying material for group members, or of the information to derive it, and corresponding CBOR label (see <xref target="node-get"/>).</li>
          <li>Specify which CBOR tag is used for identifying the semantics of binary scopes, or register a new CBOR tag if a suitable one does not exist already (see <xref target="sec-extended-scope"/>).</li>
          <li>Categorize newly defined parameters according to the same criteria of <xref target="params"/>.</li>
          <li>Define whether Clients must, should, or may support the conditional parameters defined in <xref target="params"/> and under which circumstances.</li>
        </ol>
      </section>
      <section anchor="req-optional">
        <name>Optional-to-Address Requirements</name>
        <ol type="OPT%d:">
          <li>Optionally, if the textual format of 'scope' is used, specify CBOR values to use for abbreviating the role identifiers in the group (see <xref target="ssec-authorization-request"/>).</li>
          <li>Optionally, specify the additional parameters used in the exchange of Token Transfer Request and Response (see <xref target="token-post"/>).</li>
          <li>Optionally, specify the negotiation of parameter values for signature algorithm and signature keys if 'sign_info' is not used (see <xref target="token-post"/>).</li>
          <li>Optionally, specify possible or required payload formats for specific error cases.</li>
          <li>Optionally, specify additional identifiers of error types as values of the 'error-id' field within the Custom Problem Detail entry 'ace-groupcomm-error' (see <xref target="kdc-if-errors"/>).</li>
          <li>Optionally, specify the encoding of 'creds_repo' if the default is not used (see <xref target="gid-post"/>).</li>
          <li>Optionally, specify the functionalities implemented at the 'control_uri' resource hosted at the Client, including message exchange encoding and other details (see <xref target="gid-post"/>).</li>
          <li>Optionally, specify the behavior of the handler in case of failure to retrieve an authentication credential for the specific node (see <xref target="gid-post"/>).</li>
          <li>Optionally, define a default group rekeying scheme to refer to in case the 'rekeying_scheme' parameter is not included in the Join Response (see <xref target="gid-post"/>).</li>
          <li>Optionally, specify the functionalities implemented at the 'control_group_uri' resource hosted at the Client, including message exchange encoding and other details (see <xref target="gid-post"/>).</li>
          <li>Optionally, specify policies that instruct Clients to retain messages and for how long if they are unsuccessfully decrypted (see <xref target="update-keys"/>). This makes it possible to decrypt such messages after getting updated keying material.</li>
          <li>Optionally, specify for the KDC to perform group rekeying (together or instead of renewing individual keying material) when receiving a Key Renewal Request (see <xref target="new-keys"/>).</li>
          <li>Optionally, specify how the identifier of a group member's authentication credential is included in requests sent to other group members (see <xref target="update-pub-key"/>).</li>
          <li>Optionally, specify additional information to include in rekeying messages for the "Point-to-Point" group rekeying scheme (see <xref target="sec-group-rekeying"/>).</li>
        </ol>
      </section>
    </section>
    <section anchor="sec-future-cose-algs">
      <name>Extensibility for Future COSE Algorithms</name>
      <t>As defined in <xref section="8.1" sectionFormat="of" target="RFC9053"/>, future algorithms can be registered in the "COSE Algorithms" registry <xref target="COSE.Algorithms"/> as specifying none or multiple COSE capabilities.</t>
      <t>To enable the seamless use of such future registered algorithms, this section defines a general, agile format for each 'sign_info_entry' of the 'sign_info' parameter in the Token Transfer Response; see <xref target="sign-info"/>.</t>
      <t>If any of the currently registered COSE algorithms are considered, using this general format yields the same structure of 'sign_info_entry' defined in this document, thus ensuring backward compatibility.</t>
      <section anchor="sec-future-cose-algs-sign-info-entry">
        <name>Format of 'sign_info_entry'</name>
        <t>The format of each 'sign_info_entry' (see <xref target="sign-info"/>) is generalized as follows.</t>
        <ul spacing="normal">
          <li>
            <t>'sign_parameters' includes N &gt;= 0 elements, each of which is a COSE capability of the signature algorithm indicated in 'sign_alg'.  </t>
            <t>
In particular, 'sign_parameters' has the same format and value of the COSE capabilities array for the signature algorithm indicated in 'sign_alg', as specified for that algorithm in the "Capabilities" column of the "COSE Algorithms" registry <xref target="COSE.Algorithms"/>.</t>
          </li>
          <li>
            <t>'sign_key_parameters' is replaced by N elements 'sign_capab', each of which is a CBOR array.  </t>
            <t>
The i-th 'sign_capab' array (i = 0, ..., N-1) is the array of COSE capabilities for the algorithm capability specified in 'sign_parameters'[i].  </t>
            <t>
In particular, each 'sign_capab' array has the same format and value of the COSE capabilities array for the algorithm capability specified in 'sign_parameters'[i].  </t>
            <t>
Such a COSE capabilities array is currently defined for the algorithm capability COSE key type in the "Capabilities" column of the "COSE Key Types" registry <xref target="COSE.Key.Types"/>.</t>
          </li>
        </ul>
        <figure anchor="fig-sign-info-entry-general">
          <name>'sign_info_entry' with a General Format</name>
          <sourcecode type="CDDL"><![CDATA[
sign_info_entry =
[
    id : gname / [ + gname ],
    sign_alg : int / tstr,
    sign_parameters : [ * alg_capab : any ],
  * sign_capab : [ * capab : any ],
    cred_fmt : int / null
]

gname = tstr
]]></sourcecode>
        </figure>
      </section>
    </section>
    <section numbered="false" anchor="acknowledgments">

<!--[rfced] FYI - As John's last name is "Preuß Mattsson" we have moved his
name after Daniel Migault so that the names in the Acknowledgements section 
appear in alphabetical order.
-->

      <name>Acknowledgments</name>
      <t>The following individuals were helpful in shaping this document: <contact fullname="Christian Amsüss"/>, <contact fullname="Carsten Bormann"/>, <contact fullname="Roman Danyliw"/>, <contact fullname="Martin Duke"/>, <contact fullname="Thomas Fossati"/>, <contact fullname="Vidhi Goel"/>, <contact fullname="Rikard Höglund"/>, <contact fullname="Ben Kaduk"/>, <contact fullname="Erik Kline"/>, <contact fullname="Warren Kumari"/>, <contact fullname="Watson Ladd"/>, <contact fullname="Daniel Migault"/>, <contact fullname="John Preuß Mattsson"/>, <contact fullname="Zaheduzzaman Sarker"/>, <contact fullname="Jim Schaad"/>, <contact fullname="Ludwig Seitz"/>, <contact fullname="Göran Selander"/>, <contact fullname="Cigdem Sengul"/>, <contact fullname="Dave Thaler"/>, <contact fullname="Henry Thompson"/>, <contact fullname="Peter van der Stok"/>, and <contact fullname="Paul Wouters"/>.</t>
      <t>The work on this document has been partly supported by VINNOVA and the Celtic-Next project CRITISEC, by the H2020 project SIFIS-Home (Grant agreement 952652), and by the EIT-Digital High Impact Initiative ACTIVE.</t>
    </section>

<!--[rfced] Terminology

a) The following terminology appears to be used inconsistently
throughout the document. Please review and let us know if/how they may
be made consistent.

Broker vs. broker
code point vs. codepoint

b) Throughout the text, "ACE Framework" and "ACE framework" appears to be 
used inconsistently. May we update all instance to "ACE framework (lowercase)
match more common usage in previous RFCs?

c) May we make "Observable" lowercase as it is lowercase in RFC 7641?

Original:
   Optionally, the KDC can make the sub-resource at /ace-
   group/GROUPNAME/nodes/NODENAME also Observable [RFC7641] for the
   associated node.
   ...
   *  The KDC SHOULD make the /ace-group/GROUPNAME resource Observable
      [RFC7641].   
-->

<!--[rfced] Acronyms
	
a) FYI - We have added expansions for the following abbreviations
per Section 3.6 of RFC 7322 ("RFC Style Guide"). Please review each
expansion in the document carefully to ensure correctness.

 Authenticated Encryption with Associated Data (AEAD)
 Concise Binary Object Representation (CBOR)
 Concise Data Definition Language (CDDL)
 Constrained Application Protocol (CoAP)
 CBOR Object Signing and Encryption (COSE)

b) Should instances of "AIF format" be updated to read simply "AIF" to avoid
redundancy (if expanded, "AIF format" would read "Authorization Information
Format format"). Please review and let us know if any updates are needed.
-->

<!-- [rfced] Please review the "Inclusive Language" portion of the online 
Style Guide <https://www.rfc-editor.org/styleguide/part2/#inclusive_language> 
and let us know if any changes are needed.  

Note that our script did not flag any words in particular, but this should 
still be reviewed as a best practice.
-->

  </back>
</rfc>
