<?xml version="1.0"encoding="utf-8"?> <!-- This template is for creating an Internet Draft using xml2rfc, which is available here: http://xml.resource.org. -->encoding="UTF-8"?> <!DOCTYPE rfcSYSTEM "rfc2629.dtd"[<!-- One method to get references from the online citation libraries. There has to be one entity for each item to be referenced. An alternate method (rfc include) is described in the references. --> <!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"> <!ENTITY RFC3986 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3986.xml"> <!ENTITY RFC4949 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4949.xml"> <!ENTITY RFC6347 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6347.xml"> <!ENTITY RFC6690 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6690.xml"> <!ENTITY RFC6749 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6749.xml"> <!ENTITY RFC6750 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6750.xml"> <!ENTITY RFC6819 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6819.xml"> <!ENTITY RFC6838 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6838.xml"> <!ENTITY RFC6920 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6920.xml"> <!ENTITY RFC7009 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7009.xml"> <!ENTITY RFC8949 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8949.xml"> <!ENTITY RFC7228 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7228.xml"> <!ENTITY RFC7231 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7231.xml"> <!ENTITY RFC7252 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7252.xml"> <!ENTITY RFC7519 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7519.xml"> <!ENTITY RFC7521 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7521.xml"> <!ENTITY RFC7540 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7540.xml"> <!ENTITY RFC7591 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7591.xml"> <!ENTITY RFC7641 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7641.xml"> <!ENTITY RFC7662 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7662.xml"> <!ENTITY RFC7744 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7744.xml"> <!ENTITY RFC7959 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7959.xml"> <!ENTITY RFC8126 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8126.xml"> <!ENTITY RFC8152 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8152.xml"> <!ENTITY RFC8174 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.xml"><!ENTITYRFC8252 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8252.xml">nbsp " "> <!ENTITYRFC8259 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8259.xml">zwsp "​"> <!ENTITYRFC8392 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8392.xml">nbhy "‑"> <!ENTITYRFC8414 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8414.xml"> <!ENTITY RFC8446 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8446.xml"> <!ENTITY RFC8516 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8516.xml"> <!ENTITY RFC8613 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8613.xml"> <!ENTITY RFC8628 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8628.xml"> <!ENTITY RFC8693 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8693.xml"> <!ENTITY RFC8747 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8747.xml"> <!ENTITY I-D.ietf-ace-oauth-params SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-ace-oauth-params.xml"> <!ENTITY I-D.erdtman-ace-rpcc SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.erdtman-ace-rpcc.xml"> <!ENTITY I-D.ietf-tls-dtls13 SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-tls-dtls13.xml"> <!ENTITY I-D.ietf-quic-transport SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-quic-transport.xml"> <!ENTITY I-D.ietf-ace-dtls-authorize SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-ace-dtls-authorize.xml"> <!ENTITY I-D.ietf-ace-oscore-profile SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-ace-oscore-profile.xml">wj "⁠"> ]><?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?> <!-- used by XSLT processors --> <!-- For a complete list and description of processing instructions (PIs), please see http://xml.resource.org/authoring/README.html. --> <!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use. (Here they are set differently than their defaults in xml2rfc v1.32) --> <?rfc strict="yes" ?> <!-- give errors regarding ID-nits and DTD validation --> <!-- control the table of contents (ToC) --> <?rfc toc="yes"?> <!-- generate a ToC --> <?rfc tocdepth="4"?> <!-- the number of levels of subsections in ToC. default: 3 --> <!-- control references --> <?rfc symrefs="yes"?> <!-- use symbolic references tags, i.e, [RFC2119] instead of [1] --> <?rfc sortrefs="yes" ?> <!-- sort the reference entries alphabetically --> <!-- control vertical white space (using these PIs as follows is recommended by the RFC Editor) --> <?rfc compact="yes" ?> <!-- do not start each main section on a new page --> <?rfc subcompact="no" ?> <!-- keep one blank line between list items --> <!-- end of list of popular I-D processing instructions --><rfc xmlns:xi="http://www.w3.org/2001/XInclude" docName="draft-ietf-ace-oauth-authz-45" number="9200" ipr="trust200902" obsoletes="" updates="" submissionType="IETF" category="std"docName="draft-ietf-ace-oauth-authz-43" ipr="trust200902">consensus="true" xml:lang="en" tocInclude="true" tocDepth="4" symRefs="true" sortRefs="true" version="3"> <!--category values: std, bcp, info, exp, and historic ipr values: full3667, noModification3667, noDerivatives3667 you can add the attributes updates="NNNN" and obsoletes="NNNN" they will automatically be output with "(if approved)" --> <!-- ***** FRONT MATTER *****xml2rfc v2v3 conversion 3.9.1 --> <front><!-- The abbreviated title is used in the page header - it is only necessary if the full title is longer than 39 characters --><title abbrev="ACE-OAuth">Authentication and Authorization for Constrained Environments(ACE) usingUsing the OAuth 2.0 Framework (ACE-OAuth)</title><!-- add 'role="editor"' below for the editors if appropriate --> <!-- Another author who claims to be an editor --><seriesInfo name="RFC" value="9200"/> <author fullname="Ludwig Seitz" initials="L." surname="Seitz"> <organization>Combitech</organization> <address> <postal> <street>Djäknegatan 31</street> <code>211 35</code> <city>Malmö</city> <country>Sweden</country> </postal> <email>ludwig.seitz@combitech.com</email><!-- uri and facsimile elements may also be added --></address> </author> <authorfullname="Goeranfullname="Göran Selander" initials="G." surname="Selander"> <organization>Ericsson</organization> <address> <postal><street>Faroegatan 6</street><code>164 80</code> <city>Kista</city> <country>Sweden</country> </postal> <email>goran.selander@ericsson.com</email><!-- uri and facsimile elements may also be added --></address> </author> <author fullname="Erik Wahlstroem" initials="E." surname="Wahlstroem"> <organization/> <address> <postal><street></street> <code></code> <city></city><street/> <code/> <city/> <country>Sweden</country> </postal> <email>erik@wahlstromstekniska.se</email> </address> </author> <author fullname="Samuel Erdtman" initials="S." surname="Erdtman"> <organization>Spotify AB</organization> <address> <postal> <street>Birger Jarlsgatan 61, 4tr</street> <code>113 56</code> <city>Stockholm</city> <country>Sweden</country> </postal> <email>erdtman@spotify.com</email><!-- uri and facsimile elements may also be added --></address> </author> <author fullname="Hannes Tschofenig" initials="H." surname="Tschofenig"> <organization>Arm Ltd.</organization> <address> <postal><street></street><street/> <code>6067</code> <city>Absam</city> <country>Austria</country> </postal> <email>Hannes.Tschofenig@arm.com</email><!-- uri and facsimile elements may also be added --></address> </author> <dateyear="2021" /> <!-- If the month and year are both specified and are the current ones, xml2rfc will fill in the current day for you. If only the current year is specified, xml2rfc will fill in the current day and month for you. If the year is not the current one, it is necessary to specify at least a month (xml2rfc assumes day="1" if not specified for the purpose of calculating the expiry date). With drafts it is normally sufficient to specify just the year. --> <!-- Meta-data Declarations -->year="2022" month="August"/> <area>Security</area><workgroup>ACE Working Group</workgroup> <!-- WG name at the upperleft corner of the doc, IETF is fine for individual submissions. If this element is not present, the default is "Network Working Group", which is used by the RFC Editor as a nod to the history of the IETF. --> <keyword>CoAP, OAuth 2.0, Access Control, Authorization, Internet<workgroup>ACE</workgroup> <keyword>CoAP</keyword> <keyword>OAuth 2.0</keyword> <keyword>Access Control</keyword> <keyword>Authorization</keyword> <keyword>Internet of Things</keyword><!-- Keywords will be incorporated into HTML output files in a meta tag but they have no effect on text or nroff output. If you submit your draft to the RFC Editor, the keywords will be used for the search engine. --><abstract> <t>This specification defines a framework for authentication and authorization in Internet of Things (IoT) environments calledACE-OAuth.ACE&nbhy;OAuth. The framework is based on a set of building blocks including OAuth 2.0 and the Constrained Application Protocol (CoAP), thus transforming a well-known and widely used authorization solution into a form suitable for IoT devices. Existing specifications are used where possible, but extensions are added and profiles are defined to better serve the IoT use cases. </t> </abstract> </front> <middle><!-- ***************************************************** --><section anchor="intro"title="Introduction">numbered="true" toc="default"> <name>Introduction</name> <t>Authorization is the process for granting approval to an entity to access a generic resource <xreftarget="RFC4949"/>.target="RFC4949" format="default"/>. The authorization task itself can best be described as granting access to a requestingclient,client for a resource hosted on a device, i.e., the resource server (RS). This exchange is mediated by one or multiple authorization servers(AS).(ASes). Managing authorization for a large number of devices and users can be a complex task. </t> <t>While prior work on authorization solutions for the Web and for the mobile environment also applies to the Internet of Things (IoT) environment, many IoT devices are constrained, for example, in terms of processing capabilities, available memory, etc. For suchdevicesdevices, the Constrained Application Protocol (CoAP) <xreftarget="RFC7252"/>target="RFC7252" format="default"/> can alleviate some resource concerns when used instead of HTTP to implement the communication flows of this specification.</t> <t><xreftarget="constraints"/>target="constraints" format="default"/> gives an overview of the constraints considered in this design, and a more detailed treatment of constraints can be found in <xreftarget="RFC7228"/>.target="RFC7228" format="default"/>. This design aims to accommodate different IoT deploymentsand thusas well as a continuous range of device and network capabilities. Taking energy consumption as anexample: Atexample, at oneendend, there are energy-harvesting orbattery poweredbattery-powered deviceswhichthat have a tight powerbudget,budget; on the otherendend, there are mains-powereddevices,devices; and all levels exist in between.</t> <t>Hence, IoT devices may be very different in terms of available processing and message exchangecapabilitiescapabilities, and there is a need to support many different authorization use cases <xreftarget="RFC7744"/>.</t>target="RFC7744" format="default"/>.</t> <t>This specification describes a framework forauthenticationAuthentication andauthorization in constrained environmentsAuthorization for Constrained Environments (ACE) built onre-usereuse of OAuth 2.0 <xreftarget="RFC6749"/>,target="RFC6749" format="default"/>, thereby extending authorization to Internet of Things devices. This specification contains the necessary building blocks for adjusting OAuth 2.0 to IoT environments.</t> <t>Profiles of this framework are available in separate specifications, such as <xreftarget="I-D.ietf-ace-dtls-authorize"/>target="RFC9202" format="default"/> or <xreftarget="I-D.ietf-ace-oscore-profile"/>.target="RFC9203" format="default"/>. Such profiles may specify the use of the framework for a specific security protocol and the underlying transports for use in a specific deployment environment to improve interoperability. Implementations may claim conformance with a specific profile, whereby implementations utilizing the same profile interoperate, while implementations of different profiles are not expected to be interoperable. More powerful devices, such as mobile phones and tablets, may implement multiple profiles and will therefore be able to interact with a wider range of constrained devices. Requirements on profiles are described at contextually appropriate places throughout thisspecification,specification and also summarized in <xreftarget="app:profileRequirements"/>.target="app_profileRequirements" format="default"/>. </t> </section><!-- ***************************************************** --><section anchor="terminology"title="Terminology">numbered="true" toc="default"> <name>Terminology</name> <t>The key words"MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY","<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"OPTIONAL""<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as described inBCP 14BCP 14 <xreftarget="RFC2119"/>target="RFC2119" format="default"/> <xreftarget="RFC8174"/>target="RFC8174" format="default"/> when, and only when, they appear in all capitals, as shown here.</t> <t>Certain security-relatedtermsterms, such as "authentication", "authorization", "confidentiality", "(data) integrity", "message authentication code", and"verify""verify", are taken from <xreftarget="RFC4949"/>.target="RFC4949" format="default"/>. </t> <t>Since exchanges in this specification are described as RESTful protocol interactions, HTTP <xreftarget="RFC7231"/>target="RFC9110" format="default"/> offers useful terminology. (Note that "RESTful" refers to the Representational State Transfer (REST) architecture.) </t> <t>Terminology for entities in the architecture is defined in OAuth 2.0 <xreftarget="RFC6749"/>target="RFC6749" format="default"/>, such as client (C), resource server (RS), and authorization server (AS).</t> <t>Note that the term "endpoint" is used here following its OAuth definition, which is to denoteresourcesresources, such as token and introspection at the AS and authz-info at the RS (see <xreftarget="tokenAuthInfoEndpoint"/>target="tokenAuthInfoEndpoint" format="default"/> for a definition of the authz-info endpoint). The CoAP<xref target="RFC7252"/>definition, which is"An"[a]n entity participating in the CoAP protocol" <xref target="RFC7252" format="default"/>, is not used in this specification.</t> <t>Thespecificationsspecification in this document is called the "framework" or "ACE framework". When referring to "profiles of thisframework"framework", it refers to additional specifications that define the use of this specification with concrete transport and communication security protocols (e.g., CoAP over DTLS). </t> <t>The term "Access Information" is used for parameters, other than the access token, provided to the client by the AS to enable it to access the RS(e.g.(e.g., public key of theRS,RS or profile supported by RS).</t> <t>The term"Authorization Information""authorization information" is used to denote all information, including the claims of relevant access tokens, that an RS uses to determine whether an access request should be granted.</t> <t>Throughout this document, examples for CBOR data items are expressed in CBOR extended diagnostic notation as defined in <xref section="8" sectionFormat="of" target="RFC8949"/> and <xref section="G" sectionFormat="of" target="RFC8610"/> ("diagnostic notation"), unless noted otherwise. We often use diagnostic notation comments to provide a textual representation of the numeric parameter names and values.</t> </section><!-- ***************************************************** --><section anchor="overview"title="Overview">numbered="true" toc="default"> <name>Overview</name> <t>This specification defines the ACE framework for authorization in the Internet of Things environment. It consists of a set of building blocks.</t> <t> The basic block is the OAuth 2.0 <xreftarget="RFC6749"/>target="RFC6749" format="default"/> framework, which enjoys widespread deployment. Many IoT devices can support OAuth 2.0 without any additional extensions, but for certain constrainedsettingssettings, additional profiling is needed. </t> <t>Another building block is the lightweight web transfer protocol CoAP <xreftarget="RFC7252"/>,target="RFC7252" format="default"/>, for those communication environments where HTTP is not appropriate. CoAP typically runs on top of UDP, which further reduces overhead and message exchanges. While this specification defines extensions for the use of OAuth over CoAP, other underlying protocols are not prohibited from being supported in the future, such as HTTP/2 <xreftarget="RFC7540"/>,target="RFC9113" format="default"/>, Message Queuing Telemetry Transport (MQTT) <xreftarget="MQTT5.0"/>,target="MQTT5.0" format="default"/>, Bluetooth Low Energy (BLE) <xreftarget="BLE"/>target="BLE" format="default"/>, and QUIC <xreftarget="I-D.ietf-quic-transport"/>.target="RFC9000" format="default"/>. Note that this document specifies protocol exchanges in terms of RESTfulverbsverbs, such as GET and POST. Future profiles using protocols that do not support these verbsMUST<bcp14>MUST</bcp14> specify how the corresponding protocol messages are transmitted instead.</t> <t>A third building block is the Concise Binary Object Representation (CBOR) <xreftarget="RFC8949"/>,target="RFC8949" format="default"/>, for encodings where JSON <xreftarget="RFC8259"/>target="RFC8259" format="default"/> is not sufficiently compact. CBOR is a binary encoding designed for small code and message size. Self-contained tokens and protocol message payloads are encoded in CBOR when CoAP is used. When CoAP is not used, the use of CBOR remainsRECOMMENDED.<bcp14>RECOMMENDED</bcp14>. </t> <t>A fourth building block is CBOR Object Signing and Encryption (COSE) <xreftarget="RFC8152"/>,target="RFC8152" format="default"/>, which enables object-level layer security as an alternative or complement to transport layer security (DTLS <xreftarget="RFC6347"/>target="RFC6347" format="default"/> <xref target="RFC9147"/> or TLS <xreftarget="RFC8446"/>).target="RFC8446" format="default"/>). COSE is used to secure self-containedtokenstokens, such as proof-of-possession (PoP) tokens, which are an extension to the OAuth bearer tokens. The default token format is defined in CBOR Web Token (CWT) <xreftarget="RFC8392"/>.target="RFC8392" format="default"/>. Application-layer security for CoAP using COSE can be provided withOSCOREObject Security for Constrained RESTful Environments (OSCORE) <xreftarget="RFC8613"/>.</t>target="RFC8613" format="default"/>.</t> <t>With the building blocks listed above, solutions satisfying various IoT device and network constraints are possible. A list of constraints is described in detail in <xreftarget="RFC7228"/>target="RFC7228" format="default"/>, and a description of how the building blocks mentioned above relate to the various constraints can be found in <xreftarget="constraints"/>.</t>target="constraints" format="default"/>.</t> <t>Luckily, not every IoT device suffers from all constraints.TheNevertheless, the ACE frameworkneverthelesstakes all these aspects into account and allows several different deployment variants toco-exist,coexist, rather than mandating a one-size-fits-all solution. It is important to cover the wide range of possible interworking use cases and the different requirements from a security point of view. Once IoT deployments mature, popular deployment variants will be documented in the form of ACE profiles.</t> <section anchor="oauth2Overview"title="OAuth 2.0">numbered="true" toc="default"> <name>OAuth 2.0</name> <t>The OAuth 2.0 authorization framework enables a client to obtain scoped access to a resource with the permission of a resource owner. Authorization information, or references to it, is passed between the nodes using access tokens. These access tokens are issued to clients by an authorization server with the approval of the resource owner. The client uses the access token to access the protected resources hosted by the resource server.</t> <t>A number of OAuth 2.0 terms are used within this specification:<list style="hanging"> <t hangText="Access Tokens:"><vspace blankLines="0"/></t> <dl newline="true" spacing="normal"> <dt>Access Tokens:</dt> <dd> <t> Access tokens are credentials needed to access protected resources. An access token is a data structure representing authorization permissions issued by the AS to the client. Access tokens are generated by the AS and consumed by the RS. The access token content is opaque to the client.<vspace blankLines="1"/></t> <t> Access tokens can have differentformats,formats and various methods of utilizatione.g.,(e.g., cryptographic properties) based on the security requirements of the given deployment.<vspace blankLines="1"/></t><t hangText="Introspection:"><vspace blankLines="0"/></dd> <dt>Introspection:</dt> <dd> Introspection is a method for a resourceserverserver, or potentially a client, to query the authorization server for the active state and content of a received access token. This is particularly useful in those cases where the authorization decisions are very dynamic and/or where the received access token itself is an opaquereferencereference, rather than a self-contained token. More information about introspection in OAuth 2.0 can be found in <xreftarget="RFC7662"/>. </t> <t hangText="Refresh Tokens:"><vspace blankLines="0"/>target="RFC7662" format="default"/>. </dd> <dt>Refresh Tokens:</dt> <dd> <t> Refresh tokens are credentials used to obtain access tokens. Refresh tokens are issued to the client by the authorization server and are used to obtain a new access token when the current access tokenexpires,expires or to obtain additional access tokens with identical or narrower scope (such access tokens may have a shorter lifetime and fewer permissions than authorized by the resource owner). Issuing a refresh token is optional at the discretion of the authorization server. If the authorization server issues a refresh token, it is included when issuing an access token (i.e., step (B) in <xreftarget="fig:protocolFlow"/>). <vspace blankLines="1"/>target="fig_protocolFlow" format="default"/>). </t> <t> A refresh token in OAuth 2.0 is a string representing the authorization granted to the client by the resource owner. The string is usually opaque to the client. The token denotes an identifier used to retrieve the authorization information. Unlike access tokens, refresh tokens are intended for use only with authorization servers and are never sent to resource servers. In this framework, refresh tokens are encoded in binary instead of strings, if used.<vspace blankLines="1"/></t> <t hangText="Proof of Possession Tokens:"><vspace blankLines="0"/></t> </dd> <dt>Proof-of-Possession Tokens:</dt> <dd> <t> A token may be bound to a cryptographic key, which is then used to bind the token to a request authorized by the token. Such tokens are called proof-of-possession tokens (or PoP tokens).<vspace blankLines="1"/></t> <t> The proof-of-possession security concept used here assumes that the AS acts as a trusted third party that binds keys to tokens. In the case of access tokens, theseso calledso-called PoP keys are then used by the client to demonstrate the possession of the secret to the RS when accessing the resource. The RS, when receiving an access token, needs to verify that the key used by the client matches the one bound to the access token. When this specification uses the term "accesstoken"token", it is assumed to be a PoP access token unless specifically stated otherwise.<vspace blankLines="1"/></t> <t> The key bound to the token (the PoP key) may use either symmetric or asymmetric cryptography. The appropriate choice of the kind of cryptography depends on the constraints of the IoT devices as well as on the security requirements of the use case.<vspace blankLines="1"/> <list style="hanging"> <t hangText="Symmetric</t> <dl newline="true" spacing="normal"> <dt>Symmetric PoPkey:"><vspace blankLines="0"/>key:</dt> <dd> <t> The AS generates arandomrandom, symmetric PoP key. The key is either stored to be returned on introspection calls or included in the token. Either the whole token or only the keyMUST<bcp14>MUST</bcp14> be encrypted in the latter case. The PoP key is also returned to client together with thetoken.<vspace blankLines="1"/> </t> <t hangText="Asymmetrictoken, protected by the secure channel.</t> </dd> <dt>Asymmetric PoPkey:"><vspace blankLines="0"/>key:</dt> <dd> An asymmetric key pair is generated by the client and the public key is sent to the AS (if it does not already have knowledge of the client's public key). Information about the public key, which is the PoP key in this case, is either stored to be returned on introspection calls or included inside the token and sent back to the client. The resource server consuming the token can identify the public key from the information in the token, which allows the client to use the corresponding private key for the proof of possession.</t> </list> <vspace blankLines="1"/></dd> </dl> <t> The token is either a simplereference,reference or a structured information object (e.g., CWT <xreftarget="RFC8392"/>)target="RFC8392" format="default"/>) protected by a cryptographic wrapper (e.g., COSE <xreftarget="RFC8152"/>).target="RFC8152" format="default"/>). The choice of PoP key does not necessarily imply a specific credential type for the integrity protection of thetoken.<vspace blankLines="1"/> </t> <t hangText="Scopestoken.</t> </dd> <dt>Scopes andPermissions:"><vspace blankLines="0"/>Permissions:</dt> <dd> <t> In OAuth 2.0, the client specifies the type of permissions it is seeking to obtain (via thescope<tt>scope</tt> parameter) in the access token request. In turn, the AS may use thescope<tt>scope</tt> response parameter to inform the client of the scope of the access token issued. As the client could be a constrained device as well, this specification defines the use of CBORencoding, seeencoding (see <xreftarget="oauthProfile"/>,target="oauthProfile" format="default"/>) for such requests and responses.<vspace blankLines="1"/></t> <t> The values of thescope<tt>scope</tt> parameter in OAuth 2.0 are expressed as a list of space-delimited, case-sensitivestrings,strings with a semantic that iswell-knownwell known to the AS and the RS.<!-- <vspace blankLines="1"/> A common misconception is that the requested scopes must also be included in the returned access token, but the requested scopes are only metadata about the token. They could also be packaged in the token as a separate attribute, but it's more common to assert the requested and authorized access using claims within the access token. <vspace blankLines="1"/>-->More details about the concept of scopesisare found underSection 3.3 in<xref target="RFC6749"/>.<vspace blankLines="1"/> </t> <t hangText="Claims:"><vspace blankLines="0"/>sectionFormat="of" section="3.3"/>.</t> </dd> <dt>Claims:</dt> <dd> <t> Information carried in the access token or returned from introspection, called claims, is in the form of name-value pairs. An access token may, for example, include a claim identifying the AS that issued the token (via the"iss"<tt>iss</tt> claim) and what audience the access token is intended for (via the"aud"<tt>aud</tt> claim). The audience of an access token can be a specificresource orresource, one resource, or many resource servers. The resource owner policies influence what claims are put into the access token by the authorization server.<vspace blankLines="1"/></t> <t> While the structure and encoding of the access token varies throughout deployments, a standardized format has been defined with the JSON Web Token (JWT) <xreftarget="RFC7519"/>target="RFC7519" format="default"/>, where claims are encoded as a JSON object. In <xreftarget="RFC8392"/>target="RFC8392" format="default"/>, the CBOR Web Token (CWT) has been defined as an equivalent format using CBOR encoding.<vspace blankLines="1"/></t><t hangText="The token</dd> <dt>Token andintrospection Endpoints:"><vspace blankLines="0"/>Introspection Endpoints:</dt> <dd> <t> The AS hosts the token endpoint that allows a client to request access tokens. The client makes a POST request to the token endpoint on the AS and receives the access token in the response (if the request was successful).<vspace blankLines="0"/></t> <t> In some deployments, a token introspection endpoint is provided by the AS, which can be used by the RS and potentially the client, if they need to request additional information regarding a received access token. The requesting entity makes a POST request to the introspection endpoint on the AS and receives information about the access token in the response. (See "Introspection" above.)<vspace blankLines="1"/> </t> </list></t> </dd> </dl> </section> <section anchor="coap"title="CoAP">numbered="true" toc="default"> <name>CoAP</name> <t> CoAP is an application-layer protocol similar toHTTP,HTTP but specifically designed for constrained environments. CoAP typically uses datagram-oriented transport, such as UDP, where reordering and loss of packets can occur. A security solution needs to take the latter aspects into account.</t> <t>While HTTP uses headers and query strings to convey additional information about a request, CoAP encodes such information into header parameters called 'options'.</t> <t>CoAP supports application-layer fragmentation of the CoAP payloads throughblockwiseblock-wise transfers <xreftarget="RFC7959"/>.target="RFC7959" format="default"/>. However,blockwiseblock-wise transfer does not increase the size limits of CoAPoptions, thereforeoptions; therefore, data encoded in options has to be kept small. </t> <t>Transport layer security for CoAP can be provided by DTLS or TLS <xreftarget="RFC6347"/><xref target="RFC8446"/>target="RFC6347" format="default"/> <xref target="RFC8446" format="default"/> <xreftarget="I-D.ietf-tls-dtls13"/>.target="RFC9147" format="default"/>. CoAP defines a number of proxy operations that require transport layer security to be terminated at the proxy. One approach for protecting CoAP communication end-to-end through proxies, and also to support security for CoAP over a different transport in a uniform way, is to provide security at the application layer using an object-based securitymechanismmechanism, such as COSE <xreftarget="RFC8152"/>.target="RFC8152" format="default"/>. </t> <t> One application of COSE is OSCORE <xreftarget="RFC8613"/>,target="RFC8613" format="default"/>, which provides end-to-end confidentiality, integrity and replay protection, and a secure binding between CoAP request and response messages. In OSCORE, the CoAP messages are wrapped in COSE objects and sent using CoAP. </t> <t>In thisframeworkframework, the use of CoAP as replacement for HTTP isRECOMMENDED<bcp14>RECOMMENDED</bcp14> for use in constrained environments. For communicationsecuritysecurity, this framework does not make an explicit protocol recommendation, since the choice depends on the requirements of the specific application. DTLS <xreftarget="RFC6347"/>,target="RFC6347" format="default"/> <xreftarget="I-D.ietf-tls-dtls13"/>target="RFC9147" format="default"/> and OSCORE <xreftarget="RFC8613"/>target="RFC8613" format="default"/> are mentioned asexamples,examples; other protocols fulfilling the requirements from <xreftarget="minimalCommSecReq"/>target="minimalCommSecReq" format="default"/> are also applicable.</t> </section> </section><!-- ***************************************************** --><section anchor="specs"title="Protocol Interactions">numbered="true" toc="default"> <name>Protocol Interactions</name> <t> The ACE framework is based on the OAuth 2.0 protocol interactions using the token endpoint and optionally the introspection endpoint. A client obtains an access token, and optionally a refresh token, from an AS using the token endpoint and subsequently presents the access token to an RS to gain access to a protected resource. In mostdeploymentsdeployments, the RS can process the access tokenlocally, howeverlocally; however, in somecasescases, the RS may present it to the AS via the introspection endpoint to get fresh information. These interactions are shown in <xreftarget="fig:protocolFlow"/>.target="fig_protocolFlow" format="default"/>. An overview of various OAuth concepts is provided in <xreftarget="oauth2Overview"/>.target="oauth2Overview" format="default"/>. </t><t><figure align="center" anchor="fig:protocolFlow" title="Basic<figure anchor="fig_protocolFlow"> <name>Basic ProtocolFlow.">Flow</name> <artworkalign="left"><![CDATA[align="left" name="" type="" alt=""><![CDATA[ +--------+ +---------------+ | |---(A)-- Token Request ------->| | | | | Authorization | | |<--(B)-- Access Token ---------| Server | | | + Access Information | | | | + Refresh Token (optional) +---------------+ | | ^ | | | Introspection Request (D)| | | Client | Response | |(E) | | (optional exchange) | | | | | v | | +--------------+ | |---(C)-- Token + Request ----->| | | | | Resource | | |<--(F)-- Protected Resource ---| Server | | | | | +--------+ +--------------+ ]]></artwork></figure></t> <t> <list style="hanging"> <t hangText="Requesting</figure> <dl newline="true" spacing="normal"> <dt>Requesting an Access Token(A):"><vspace blankLines="0"/>(A):</dt> <dd> <t> The client makes an access token request to the token endpoint at the AS. This framework assumes the use of PoP access tokens (see <xreftarget="oauth2Overview"/>target="oauth2Overview" format="default"/> for a short description) wherein the AS binds a key to an access token. The client may include permissions it seeks toobtain,obtain and information about the credentials it wants to use forproof-of-possessionproof of possession (e.g., symmetric/asymmetric cryptography or a reference to a specific key) of the accesstoken.<vspace blankLines="1"/> </t> <t hangText="Accesstoken.</t> </dd> <dt>Access Token Response(B):"><vspace blankLines="0"/>(B):</dt> <dd> <t> If the request from the client has been successfully verified, authenticated, and authorized, the AS returns an access token and optionally a refresh token. Note that only certain grant types support refresh tokens. The AS can also return additional parameters, referred to as "Access Information". In addition to the response parameters defined by OAuth 2.0 and the PoP access token extension, this framework defines parameters that can be used to inform the client about capabilities of the RS,e.g.e.g., the profile the RS supports. More information about these parameters can be found in <xreftarget="tokenParams"/>. <vspace blankLines="1"/>target="tokenParams" format="default"/>. </t><t hangText="Resource</dd> <dt>Resource Request(C):"><vspace blankLines="0"/>(C):</dt> <dd> <t> The client interacts with the RS to request access to the protected resource and provides the access token. The protocol to use between the client and the RS is not restricted to CoAP. HTTP, HTTP/2 <xreftarget="RFC7540"/>,target="RFC9113" format="default"/>, QUIC <xreftarget="I-D.ietf-quic-transport"/>,target="RFC9000" format="default"/>, MQTT <xreftarget="MQTT5.0"/>,target="MQTT5.0" format="default"/>, Bluetooth Low Energy <xreftarget="BLE"/>,target="BLE" format="default"/>, etc., are also viable candidates.<vspace blankLines="1"/></t> <t> Depending on the device limitations and the selected protocol, this exchange may be split up into twoparts: <list style="empty"> <t>(1) theparts:</t> <ol type="(%d)" spacing="normal"> <li>the client sends the access token containing, or referencing, the authorization information to theRS,RS that will be used for subsequent resource requests by the client, and</t> <t>(2) the</li> <li>the client makes the resource accessrequest,request using the communication security protocol and other Access Information obtained from theAS.</t> </list> <vspace blankLines="1"/>AS.</li> </ol> <t> The client and the RS mutually authenticate using the security protocol specified in the profile (see stepB)(B)) and the keys obtained in the access token or the Access Information. The RS verifies that the token is integrity protected and originated by the AS. It then compares the claims contained in the access token with the resource request. If the RS is online, validation can be handed over to the AS using token introspection (see messagesD(D) andE)(E)) over HTTP orCoAP.<vspace blankLines="1"/> </t> <t hangText="TokenCoAP.</t> </dd> <dt>Token Introspection Request(D):"><vspace blankLines="0"/>(D):</dt> <dd> <t> A resource server may be configured to introspect the access token by including it in a request to the introspection endpoint at that AS. Token introspection over CoAP is defined in <xreftarget="introspectionEndpoint"/>target="introspectionEndpoint" format="default"/> and for HTTP in <xreftarget="RFC7662"/>. <vspace blankLines="1"/>target="RFC7662" format="default"/>. </t> <t> Note that token introspection is an optional step and can be omitted if the token is self-contained and the resource server is prepared to perform the token validation on itsown.<vspace blankLines="1"/> </t> <t hangText="Tokenown.</t> </dd> <dt>Token Introspection Response(E):"><vspace blankLines="0"/>(E):</dt> <dd> <t> The AS validates the token and returns the most recent parameters, such asscope, audience, validity etc.<tt>scope</tt>, <tt>audience</tt>, validity, etc., associated with it back to the RS. The RS then uses the received parameters to process the request to either accept or to denyit.<vspace blankLines="1"/> </t> <t hangText="Protectedit.</t> </dd> <dt>Protected Resource(F):"><vspace blankLines="0"/>(F):</dt> <dd> If the request from the client is authorized, the RS fulfills the request and returns a response with the appropriate response code. The RS uses the dynamically established keys to protect theresponse,response according to the communication security protocol used.</t> </list> </t></dd> </dl> <t>The OAuth 2.0 framework defines a number of "protocol flows" via grant types, which have been extended further with extensions to OAuth 2.0 (such as <xreftarget="RFC7521"/>target="RFC7521" format="default"/> and <xreftarget="RFC8628"/>).target="RFC8628" format="default"/>). What grant type works best depends on the usagescenario andscenario; <xreftarget="RFC7744"/>target="RFC7744" format="default"/> describes many different IoT usecasescases, but there are two grant types that cover a majority of these scenarios, namely theAuthorization Code Grantauthorization code grant (described inSection 4.1 of<xreftarget="RFC7521"/>)target="RFC6749" format="default" sectionFormat="of" section="4.1"/>) and theClient Credentials Grantclient credentials grant (described inSection 4.4 of<xreftarget="RFC7521"/>).target="RFC6749" sectionFormat="of" section="4.4"/>). TheAuthorization Code Grantauthorization code grant is a good fit for use with apps running onsmart phonessmartphones and tablets that request access to IoT devices, a common scenario in the smart home environment, where users need to go through an authentication and authorization phase (at least during the initial setup phase). The native apps guidelines described in <xreftarget="RFC8252"/>target="RFC8252" format="default"/> are applicable to this use case. TheClient Credential Grantclient credentials grant is a good fit for use with IoT devices where the OAuth client itself is constrained. In such a case, the resource owner haspre-arrangedprearranged access rights for the client with the authorization server, which is often accomplished using a commissioning tool.</t> <t> The consent of the resource owner, for giving a client access to a protected resource, can be provided dynamically as in thetraditionalclassical OAuth flows, or it could bepre-configuredpreconfigured by the resource owner as authorization policies at the AS, which the AS evaluates when a token request arrives. The resource owner and the requesting party (i.e., client owner) are not shown in <xreftarget="fig:protocolFlow"/>.target="fig_protocolFlow" format="default"/>. </t> <t> This framework supports a wide variety of communication security mechanisms between the ACE entities, such as the client, AS, and RS. It is assumed that the client has been registered (also called enrolled or onboarded) to an AS using a mechanism defined outside the scope of this document. In practice, various techniques for onboarding have been used, such as factory-based provisioning or the use of commissioning tools. Regardless of the onboarding technique, this provisioning procedure implies that the client and the AS exchange credentials and configuration parameters. These credentials are used to mutually authenticate each other and to protect messages exchanged between the client and the AS.</t> <t>It is also assumed that the RS has been registered with the AS, potentially in a similar way as the client has been registered with the AS. Established keying material between the AS and the RS allows the AS to apply cryptographic protection to the access token to ensure that its content cannot bemodified, andmodified and, if needed, that the content is confidentiality protected. Confidentiality protection of the access token content would be provided on top of confidentiality protection via a communication security protocol. </t> <t>The keying material necessary for establishing communication security between the C and RS is dynamically established as part of the protocol described in this document. </t> <t> At the start of the protocol, there is an optional discovery step where the client discovers the resource server and the resources this server hosts. In this step, the client might also determine what permissions are needed to access the protected resource. A generic procedure is described in <xreftarget="asDiscovery"/>;target="asDiscovery" format="default"/>; profilesMAY<bcp14>MAY</bcp14> define other procedures for discovery.</t> <t>In Bluetooth Low Energy, for example, advertisements are broadcast by a peripheral, including information about the primary services. In CoAP, as a second example, a client can make a request to "/.well-known/core" to obtain information about available resources, which are returned in a standardizedformatformat, as described in <xreftarget="RFC6690"/>.target="RFC6690" format="default"/>. </t> </section><!-- ***************************************************** --><section anchor="oauthProfile"title="Framework">numbered="true" toc="default"> <name>Framework</name> <t>The following sections detail the profiling and extensions of OAuth 2.0 for constrained environments, which constitutes the ACE framework. </t> <dl newline="true" spacing="normal"> <dt>Credential Provisioning</dt> <dd> <t><list style="hanging"> <t hangText="Credential Provisioning"><vspace blankLines="0"/>In constrainedenvironmentsenvironments, it cannot be assumed that the client and the RS are part of a common key infrastructure. Therefore, the AS provisions credentials and associated information to allow mutual authentication between the client and the RS. The resulting security association between the client and the RS may then also be used to bind these credentials to the access tokens the client uses.<vspace blankLines="1"/></t><t hangText="Proof-of-Possession"><vspace blankLines="0"/></dd> <dt>Proof of Possession</dt> <dd> <t> The ACE framework, by default, implementsproof-of-possessionproof of possession for access tokens, i.e., that the token holder can prove being a holder of the key bound to the token. The binding is provided by the"cnf"<tt>cnf</tt> (confirmation) claim <xreftarget="RFC8747"/>target="RFC8747" format="default"/>, indicating what key is used forproof-of-possession.proof of possession. If a client needs to submit a new access token, e.g., to obtain additional access rights, they can request that the AS binds this token to the same key as the previous one.<vspace blankLines="1"/></t><t hangText="ACE Profiles"><vspace blankLines="0"/></dd> <dt>ACE Profiles</dt> <dd> The client or RS may be limited in the encodings or protocols it supports. To support a variety of different deployment settings, specific interactions between the client and RS are defined in an ACE profile. In the ACEframeworkframework, the AS is expected to manage the matching of compatible profile choices between a client and an RS. The AS informs the client of the selected profile using the"ace_profile"<tt>ace_profile</tt> parameter in the token response.</t> </list> </t></dd> </dl> <t>OAuth 2.0 requires the use of TLSbothto protect the communication between the AS and client when requesting an accesstoken;token between the client and RS when accessing a resource and between the AS and RS if introspection is used. In constrainedsettingssettings, TLS is not alwaysfeasible,feasible or desirable.NeverthelessNevertheless, it isREQUIRED<bcp14>REQUIRED</bcp14> that the communications named above are encrypted, integrityprotectedprotected, and protected against message replay. It is alsoREQUIRED<bcp14>REQUIRED</bcp14> that the communicating endpoints perform mutual authentication.FurthermoreFurthermore, itMUST<bcp14>MUST</bcp14> be assured that responses are bound to the requests in the sense that the receiver of a response can be certain that the response actually belongs to a certain request. Note that setting up such a secure communication may require some unprotected messages to be exchanged first(e.g.(e.g., sending the token from the client to the RS).</t> <t>ProfilesMUST<bcp14>MUST</bcp14> specify a communication security protocol between the client and RS that provides the features required above. ProfilesMUST<bcp14>MUST</bcp14> specify a communication security protocolRECOMMENDED<bcp14>RECOMMENDED</bcp14> to be used between the client and AS that provides the features required above. ProfilesMUST specify<bcp14>MUST</bcp14> specify, forintrospectionintrospection, a communication security protocolRECOMMENDED<bcp14>RECOMMENDED</bcp14> to be used between the RS and AS that provides the features required above. These recommendations enable interoperability between different implementations without the need to define a new profile if the communication between the C and AS, or between the RS and AS, is protected with a different security protocol complying with the security requirements above.</t> <t>In OAuth2.02.0, the communication with the Token and the Introspection endpoints at the AS is assumed to be via HTTP and may use Uri-query parameters. When profiles of this framework use CoAP instead, it isREQUIRED<bcp14>REQUIRED</bcp14> to use of the following alternative instead of Uri-query parameters: The sender (client or RS) encodes the parameters of its request as a CBOR map and submits that map as the payload of the POST request. The CBOR encoding for a number of OAuth 2.0 parameters is specified in thisdocument,document; if a profile needs to use other OAuth 2.0 parameters withCoAPCoAP, itMUST<bcp14>MUST</bcp14> specify their CBOR encoding.</t> <t>Profiles that use CBOR encoding of protocol message parameters at the outermost encoding layerMUST<bcp14>MUST</bcp14> use thecontent format 'application/ace+cbor'.Content-Format "application/ace+cbor". If CoAP is used for communication, the Content-FormatMUST<bcp14>MUST</bcp14> be abbreviated with the ID: 19 (see <xreftarget="IANAcoapContentFormat"/>).</t>target="IANAcoapContentFormat" format="default"/>).</t> <t>The OAuth 2.0 AS uses a JSON structure in the payload of its responses both to the client and RS. If CoAP is used, it isREQUIRED<bcp14>REQUIRED</bcp14> to use CBOR <xreftarget="RFC8949"/>target="RFC8949" format="default"/> instead of JSON. Depending on the profile, the CBOR payloadMAY<bcp14>MAY</bcp14> be enclosed in a non-CBOR cryptographic wrapper.</t> <section anchor="asDiscovery"title="Discoveringnumbered="true" toc="default"> <name>Discovering AuthorizationServers"> <t>CServers</name> <t>The C must discover the AS in charge of the RS to determine where to request the access token. To do so, the C 1) must1.find out the AS URI to which the token request message must be sent and2. MUST2) <bcp14>MUST</bcp14> validate that the AS with this URI is authorized to provide access tokens for this RS. </t> <t> In order to determine the AS URI, the CMAY<bcp14>MAY</bcp14> send an initial Unauthorized Resource Request message to the RS. The RS then denies the request and sends the address of its AS back to the C (see <xreftarget="rreq"/>).target="rreq" format="default"/>). How the C validates the AS authorization is not in scope for this document. The C may,e.g.,for example, ask its owner if this AS is authorized for this RS. The C may also use a mechanism that addresses both problems at once(e.g.(e.g., by querying a dedicated secure service provided by the client owner) .</t></section><!--AS Discovery --></section> <section anchor="rreq"title="Unauthorizednumbered="true" toc="default"> <name>Unauthorized Resource RequestMessage">Message</name> <t>An Unauthorized Resource Request message is a request for any resource hosted by the RS for which the client does not have authorization granted.RSes MUSTThe RSs <bcp14>MUST</bcp14> treat any request for a protected resource as an Unauthorized Resource Request message when any of the following hold:<list style="symbols"> <t>The</t> <ul spacing="normal"> <li>The request has been received on an unsecuredchannel.</t> <t>Thechannel.</li> <li>The RS has no valid access token for the sender of the request regarding the requested action on thatresource.</t> <t>Theresource.</li> <li>The RS has a valid access token for the sender of the request, but that token does not authorize the requested action on the requestedresource.</t> </list> </t>resource.</li> </ul> <t>Note: These conditions ensure that the RS can handle requests autonomously once access was granted and a secure channel has been established between the C and RS. The authz-info endpoint, as part of the process for authorizing to protected resources, is not itself a protected resource andMUST NOT<bcp14>MUST NOT</bcp14> be protected as specified above (cf. <xreftarget="tokenAuthInfoEndpoint"/>).</t>target="tokenAuthInfoEndpoint" format="default"/>).</t> <t>Unauthorized Resource Request messagesMUST<bcp14>MUST</bcp14> be denied with an "unauthorized_client" error response. In this response, theResource Server SHOULDresource server <bcp14>SHOULD</bcp14> provide proper"ASAS Request CreationHints"Hints to enable the client to request an access token from the RS'sASAS, as described in <xreftarget="asInfo"/>.</t>target="asInfo" format="default"/>.</t> <t>The handling of all client requests (including unauthorized ones) by the RS is described in <xreftarget="requestC2RS"/>.</t> </section><!-- Unauthorized Request -->target="requestC2RS" format="default"/>.</t> </section> <section anchor="asInfo"title="ASnumbered="true" toc="default"> <name>AS Request CreationHints">Hints</name> <t>The"ASAS Request CreationHints" message isHints are sent by an RS as a response to an Unauthorized Resource Request message (see <xreftarget="rreq"/>)target="rreq" format="default"/>) to help the sender of the Unauthorized Resource Request message acquire a valid access token. The"ASAS Request CreationHints" message isHints are a CBOR or JSON map, with anOPTIONAL<bcp14>OPTIONAL</bcp14> element"AS"<tt>AS</tt> specifying an absolute URI (seeSection 4.3 of<xreftarget="RFC3986"/>)target="RFC3986" sectionFormat="of" section="4.3"/>) that identifies the appropriate AS for the RS.</t> <t>The message can also contain the followingOPTIONAL parameters: <list style="symbols"> <t>A "audience"<bcp14>OPTIONAL</bcp14> parameters:</t> <ul spacing="normal"> <li>An <tt>audience</tt> element contains an identifier the client should request at the AS, as suggested by the RS. With this parameter, when included in the access token request to the AS, the AS is able to restrict the use of the access token to specific RSs. See <xreftarget="audience"/>target="audience" format="default"/> for a discussion of thisparameter.</t> <t>A "kid"parameter.</li> <li>A <tt>kid</tt> (key identifier) elementcontainingcontains the key identifier of a key used in an existing security association between the client and the RS. The RS expects the client to request an access token bound to thiskey,key in order to avoid having tore-establishreestablish the securityassociation.</t> <t>A "cnonce"association.</li> <li>A <tt>cnonce</tt> elementcontainingcontains a client-nonce. See <xreftarget="cnonceParam"/>.</t> <t>A "scope"target="cnonceParam" format="default"/>.</li> <li>A <tt>scope</tt> elementcontainingcontains the suggested scope that the client should request towards theAS.</t> </list></t>AS.</li> </ul> <t><xreftarget="fig:asinfo"/>target="table_asinfo" format="default"/> summarizes the parameters that may be part of the"ASAS Request CreationHints". <figure align="center" anchor="fig:asinfo" title="ASHints.</t> <table anchor="table_asinfo"> <name>AS Request CreationHints"> <artwork align="left"><![CDATA[ /-----------+----------+---------------------\ | Name | CBOR Key | Value Type | |-----------+----------+---------------------| | AS | 1 | text string | | kid | 2 | byte string | | audience | 5 | text string | | scope | 9 | textHints</name> <thead> <tr> <th>Name</th> <th>CBOR Key</th> <th>Value Type</th> </tr> </thead> <tbody> <tr> <td>AS</td> <td>1</td> <td>text string</td> </tr> <tr> <td>kid</td> <td>2</td> <td>byte string</td> </tr> <tr> <td>audience</td> <td>5</td> <td>text string</td> </tr> <tr> <td>scope</td> <td>9</td> <td>text or bytestring | | cnonce | 39 | byte string | \-----------+----------+---------------------/ ]]></artwork></figure></t>string</td> </tr> <tr> <td>cnonce</td> <td>39</td> <td>byte string</td> </tr> </tbody> </table> <t>Note that the schema part of the AS parameter may need to be adapted to the security protocol that is used between the client and the AS.ThusThus, the example AS value "coap://as.example.com/token" might need to be transformed to "coaps://as.example.com/token". It is assumed that the client can determine the correct schema part on its own depending on the way it communicates with the AS.</t> <t><xreftarget="fig:as-info-payload"/>target="fig_as-info-payload" format="default"/> shows an example for an"ASAS Request CreationHints" messageHints payload usingCBOR <xref target="RFC8949"/>diagnosticnotation, using the parameter names instead of the CBOR keys for better human readability.</t>notation.</t> <figuretitle="ASanchor="fig_as-info-payload"> <name>AS Request Creation Hintspayload example" anchor="fig:as-info-payload"><artwork><![CDATA[Payload Example</name> <sourcecode type="cbor-diag"><![CDATA[ 4.01 Unauthorized Content-Format: application/ace+cbor Payload : {"AS"/ AS / 1 : "coaps://as.example.com/token","audience"/ audience / 5 :"coaps://rs.example.com" "scope""coaps://rs.example.com", / scope / 9 : "rTempC","cnonce"/ cnonce / 39 : h'e0a156bb3f' }]]></artwork></figure>]]></sourcecode> </figure> <t>In the example above, the response parameter"AS"<tt>AS</tt> points the receiver of this message to the URI "coaps://as.example.com/token" to request access tokens. The RS sending this response uses an internal clock that is not synchronized with the clock of the AS. Therefore, itcan notcannot reliably verify the expiration time of access tokens it receives.ToNevertheless, to ensure a certain level of access tokenfreshness nevertheless,freshness, the RS has included a<spanx style="verb">cnonce</spanx><tt>cnonce</tt> parameter (see <xreftarget="cnonceParam"/>)target="cnonceParam" format="default"/>) in the response. (Thehex-sequencehex sequence of thecnonce<tt>cnonce</tt> parameter is encoded in CBOR-based notation in this example.)</t> <t><xreftarget="fig:as-info-cbor"/>target="fig_as-info-cbor" format="default"/> illustrates the mandatorytouse of binary encoding of the message payload shown in <xreftarget="fig:as-info-payload"/>.</t>target="fig_as-info-payload" format="default"/>.</t> <figuretitle="ASanchor="fig_as-info-cbor"> <name>AS Request Creation Hintsexample encodedExample Encoded inCBOR" anchor="fig:as-info-cbor"><artwork><![CDATA[CBOR</name> <sourcecode name="" type="cbor-pretty"><![CDATA[ a4 # map(4) 01 # unsigned(1) (=AS) 78 1c # text(28) 636f6170733a2f2f61732e657861 6d706c652e636f6d2f746f6b656e # "coaps://as.example.com/token" 05 # unsigned(5) (=audience) 76 # text(22) 636f6170733a2f2f72732e657861 6d706c652e636f6d # "coaps://rs.example.com" 09 # unsigned(9) (=scope) 66 # text(6) 7254656d7043 # "rTempC" 18 27 # unsigned(39) (=cnonce) 45 # bytes(5) e0a156bb3f #]]></artwork></figure>]]></sourcecode> </figure> <section anchor="cnonceParam"title="Thenumbered="true" toc="default"> <name>The Client-NonceParameter">Parameter</name> <t>If the RS does not synchronize its clock with the AS, it could be tricked into accepting old accesstokens,tokens that are either expired or have been compromised. In order to ensure some level of token freshness in that case, the RS can use the"cnonce"<tt>cnonce</tt> (client-nonce) parameter. The processing requirements for this parameter are as follows:<list style="symbols"> <t>An</t> <ul spacing="normal"> <li>An RS sending a"cnonce"<tt>cnonce</tt> parameter in an"ASAS Request CreationHints"Hints messageMUST<bcp14>MUST</bcp14> store information to validate that a given cnonce is fresh. How this is implemented internally is out of scope for this specification. Expiration of client-nonces should be based roughly on the time it would take a client to obtain an access token after receiving the"ASAS Request CreationHints" message,Hints, with some allowance for unexpecteddelays.</t> <t>Adelays.</li> <li>A client receiving a"cnonce"<tt>cnonce</tt> parameter in an"ASAS Request CreationHints"Hints messageMUST<bcp14>MUST</bcp14> include this in the parameters when requesting an access token at the AS, using the"cnonce"<tt>cnonce</tt> parameter from <xreftarget="cnonceParamToken"/>.</t> <t>Iftarget="cnonceParamToken" format="default"/>.</li> <li>If an AS grants an access token request containing a"cnonce"<tt>cnonce</tt> parameter, itMUST<bcp14>MUST</bcp14> include this value in the access token, using the"cnonce"<tt>cnonce</tt> claim specified in <xreftarget="accessToken"/>.</t> <t>Antarget="accessToken" format="default"/>.</li> <li>An RS that is using the client-nonce mechanism and that receives an access tokenMUST<bcp14>MUST</bcp14> verify that this token contains acnonce<tt>cnonce</tt> claim, with a client-nonce value that is fresh according to the information stored at the first step above. If thecnonce<tt>cnonce</tt> claim is not present or if thecnonce<tt>cnonce</tt> claim value is not fresh, the RSMUST<bcp14>MUST</bcp14> discard the access token. If this was an interaction with the authz-infoendpointendpoint, the RSMUST<bcp14>MUST</bcp14> also respond with an error message using a response code equivalent to the CoAP code 4.01(Unauthorized).</t> </list> </t>(Unauthorized).</li> </ul> </section> </section></section><!--AS information--><section anchor="authorizationGrants"title="Authorization Grants">numbered="true" toc="default"> <name>Authorization Grants</name> <t>To request an access token, the client obtains authorization from the resource owner or uses its client credentials as a grant. The authorization is expressed in the form of an authorization grant.</t> <t>The OAuth framework <xreftarget="RFC6749"/>target="RFC6749" format="default"/> defines four grant types. The grant types can be split up into twogroups,groups: those granted on behalf of the resource owner (password, authorization code, implicit) and those for the client (client credentials). Further grant types have been added later, such as<xref target="RFC7521"/> definingan assertion-based authorizationgrant.</t>grant defined in <xref target="RFC7521" format="default"/>.</t> <t>The grant type is selected depending on the use case. In cases where the client acts on behalf of the resource owner, the authorization code grant is recommended. If the client acts on behalf of the resourceowner,owner but does not have any display or has very limited interaction possibilities, it is recommended to use the device code grant defined in <xreftarget="RFC8628"/>.target="RFC8628" format="default"/>. In cases where the client actsautonomouslyautonomously, the client credentials grant is recommended.</t> <t>For details on the different grant types, seesection 1.3 of<xreftarget="RFC6749"/>.target="RFC6749" sectionFormat="of" section="1.3"/>. The OAuth 2.0 framework provides an extension mechanism for defining additional grant types, so profiles of this frameworkMAY<bcp14>MAY</bcp14> define additional grant types, if needed.</t> </section><!--Grants--><section anchor="clientCredentials"title="Client Credentials">numbered="true" toc="default"> <name>Client Credentials</name> <t>Authentication of the client is mandatory independent of the grant type when requesting an access token from the token endpoint. In the case of the client credentials grant type, the authentication and grant coincide.</t> <t>Client registration and provisioning of client credentials to the client is out of scope for this specification.</t> <t>The OAuth framework defines one client credential type insection 2.3.1 of<xreftarget="RFC6749"/>: client idtarget="RFC6749" sectionFormat="of" section="2.3.1"/> that comprises the client_id andclient secret.client_secret values. <xreftarget="I-D.erdtman-ace-rpcc"/>target="I-D.erdtman-oauth-rpcc" format="default"/> addsraw-public-keyraw public key andpre-shared-keypre-shared key to the client credentialstypes.type. Profiles of this frameworkMAY<bcp14>MAY</bcp14> extend it with an additional client credentials type using client certificates.</t> </section><!--Client Credentials--><section anchor="ASAuthentication"title="AS Authentication">numbered="true" toc="default"> <name>AS Authentication</name> <t>The clientcredentialcredentials grant does not, by default, authenticate the AS that the client connects to. In classic OAuth, the AS is authenticated with a TLS server certificate.</t> <t>Profiles of this frameworkMUST<bcp14>MUST</bcp14> specify how clients authenticate the AS and how communication security is implemented. By default, server side TLS certificates, as defined by OAuth 2.0, are required.</t> </section><!--AS Authentication--><section anchor="authorizeEndpoint"title="Thenumbered="true" toc="default"> <name>The AuthorizationEndpoint">Endpoint</name> <t>The OAuth 2.0 authorization endpoint is used to interact with the resource owner and obtain an authorizationgrant,grant in certain grant flows. The primary use case for the ACE-OAuth framework is for machine-to-machine interactions that do not involve the resource owner in the authorization flow; therefore, this endpoint is out of scope here. Future profiles may define constrained adaptation mechanisms for this endpoint as well.Non-constrainedNonconstrained clients interacting with constrained resource servers can use the specification insection 3.1 of<xreftarget="RFC6749"/>target="RFC6749" sectionFormat="of" section="3.1"/> and the attack countermeasures suggested insection 4.2 of<xreftarget="RFC6819"/>.</t>target="RFC6819" sectionFormat="of" section="4.2"/>.</t> </section><!--The 'Authorize' Endpoint--><section anchor="tokenEndpoint"title="Thenumbered="true" toc="default"> <name>The TokenEndpoint">Endpoint</name> <t>In standard OAuth 2.0, the AS provides the token endpoint for submitting access token requests. This framework extends the functionality of the token endpoint, giving the AS the possibility to help the client and RStoestablish shared keys ortoexchange their public keys. Furthermore, this framework defines encodings usingCBOR,CBOR as a substitute for JSON.</t> <t>The endpoint may also be exposed overHTTPSHTTPS, as in classical OAuth or even other transports. A profileMUST<bcp14>MUST</bcp14> define the details of the mapping between the fields describedbelow,below and these transports. If HTTPS with JSON is used, the semantics of Sections4.1.3<xref target="RFC6749" section="4.1.3" sectionFormat="bare"/> and4.1.4<xref target="RFC6749" section="4.1.4" sectionFormat="bare"/> of the OAuth 2.0 specificationMUST<xref target="RFC6749" format="default"/> <bcp14>MUST</bcp14> be followed (with additions as described below). Ifthe CoAP is some other transport withCBORpayload formatissupported,used as the payload format, the semantics described in this sectionMUST<bcp14>MUST</bcp14> be followed.</t> <t>For the AS to be able to issue a token, the clientMUST<bcp14>MUST</bcp14> be authenticated and present a valid grant for the scopes requested. Profiles of this frameworkMUST<bcp14>MUST</bcp14> specify how the AS authenticates the client and how the communication between the client and AS is protected, fulfilling the requirements specified in <xreftarget="oauthProfile"/>.</t>target="oauthProfile" format="default"/>.</t> <t>The default name of this endpoint inana url-pathSHOULD<bcp14>SHOULD</bcp14> be '/token'. However, implementations are not required to use this name and can define their own instead.</t><t>The figures of this section use CBOR diagnostic notation without the integer abbreviations for the parameters or their values for illustrative purposes. Note that implementations MUST use the integer abbreviations and the binary CBOR encoding, if the CBOR encoding is used.</t><section anchor="tokenRequest"title="Client-to-AS Request">numbered="true" toc="default"> <name>Client-to-AS Request</name> <t>The client sends a POST request to the token endpoint at the AS. The profileMUST<bcp14>MUST</bcp14> specify how the communication is protected. The content of the request consists of the parameters specified in the relevant subsection ofsection 4Section <xref target="RFC6749" section="4" sectionFormat="bare"/> of the OAuth 2.0 specification <xreftarget="RFC6749"/>,target="RFC6749" format="default"/>, depending on the grant type, with the following exceptions and additions:<list style="symbols"> <t>The</t> <ul spacing="normal"> <li>The <tt>grant_type</tt> parameter"grant_type"isOPTIONAL<bcp14>OPTIONAL</bcp14> in the context of this framework (as opposed toREQUIRED<bcp14>REQUIRED</bcp14> inRFC6749).<xref target="RFC6749" format="default"/>). If that parameter is missing, the default value "client_credentials" isimplied.</t> <t>The "audience"implied.</li> <li>The <tt>audience</tt> parameter from <xreftarget="RFC8693"/>target="RFC8693" format="default"/> isOPTIONAL<bcp14>OPTIONAL</bcp14> to request an access token bound to a specificaudience.</t> <t>The "cnonce"audience.</li> <li>The <tt>cnonce</tt> parameter defined in <xreftarget="cnonceParamToken"/>target="cnonceParamToken" format="default"/> isREQUIRED<bcp14>REQUIRED</bcp14> if the RS provided a client-nonce in the"ASAS Request CreationHints"Hints message<xref target="asInfo"/></t> <t>The "scope"(<xref target="asInfo" format="default"/>).</li> <li>The <tt>scope</tt> parameterMAY<bcp14>MAY</bcp14> be encoded as a byte string instead of the string encoding specified insection 3.3 of<xreftarget="RFC6749"/>,target="RFC6749" sectionFormat="of" section="3.3"/> or in order to allow compact encoding of complex scopes. The syntax of such a binary encoding is explicitly not specified here and left to profiles or applications. Note specifically that a binary encoded scope does not necessarily use the space character '0x20' to delimitscope-tokens.</t> <t>Thescope-tokens.</li> <li>The client can send an empty (null value)"ace_profile"<tt>ace_profile</tt> parameter to indicate that it wants the AS to include the"ace_profile"<tt>ace_profile</tt> parameter in the response. See <xreftarget="paramProfile"/>.</t> <t>Atarget="paramProfile" format="default"/>.</li> <li>A clientMUST<bcp14>MUST</bcp14> be able to use the parameters from <xreftarget="I-D.ietf-ace-oauth-params"/>target="RFC9201" format="default"/> in an access token request to the tokenendpointendpoint, and the ASMUST<bcp14>MUST</bcp14> be able to process these additionalparameters.</t> </list></t>parameters.</li> </ul> <t>The defaultbehavior,behavior is that the AS generates a symmetric proof-of-possession key for the client. In order to use an asymmetric key pair or tore-usereuse a key previously established with the RS, the client is supposed to use the"req_cnf"<tt>req_cnf</tt> parameter from <xreftarget="I-D.ietf-ace-oauth-params"/>.target="RFC9201" format="default"/>. </t> <t>If CoAP isusedused, then these parametersMUST<bcp14>MUST</bcp14> be provided in a CBORmap, seemap (see <xreftarget="fig:cborTokenParameters"/>.</t>target="table_cborTokenParameters" format="default"/>).</t> <t>When HTTP is used as atransporttransport, then the client makes a request to the tokenendpoint,endpoint; the parametersMUST<bcp14>MUST</bcp14> be encoded as defined inAppendix B of<xreftarget="RFC6749"/>.</t>target="RFC6749" sectionFormat="of" section="B"/>.</t> <t>The following examples illustrate different types of requests for proof-of-possession tokens. </t> <t><xreftarget="fig:symmATreq"/>target="fig_symmATreq" format="default"/> shows a request for a token with a symmetric proof-of-possessionkey. The content is displayed in CBORkey, using diagnosticnotation, without abbreviations for better readability.notation.</t> <figurealign="center" anchor="fig:symmATreq" title="Example requestanchor="fig_symmATreq"> <name>Example Request for anaccess token boundAccess Token Bound to asymmetric key."> <artwork align="left"><![CDATA[Symmetric Key</name> <sourcecode name="" type="cbor-diag"><![CDATA[ Header: POST (Code=0.02) Uri-Host: "as.example.com" Uri-Path: "token" Content-Format:"application/ace+cbor"application/ace+cbor Payload: {"client_id"/ client_id / 24 : "myclient","audience"/ audience / 5 : "tempSensor4711" }]]></artwork> </figure></t>]]></sourcecode> </figure> <t><xreftarget="fig:asymmATreq"/>target="fig_asymmATreq" format="default"/> shows a request for a token with an asymmetric proof-of-possession key. Notethatthat, in thisexampleexample, OSCORE <xreftarget="RFC8613"/>target="RFC8613" format="default"/> is used to provideobject-security, thereforeobject-security; therefore, the Content-Format is "application/oscore" wrapping the "application/ace+cbor" type content. The OSCORE option has a decoded interpretation appended in parentheses for the reader's convenience. Also notethatthat, in thisexampleexample, the audience is implicitly known by both the client and AS.FurthermoreFurthermore, note that this example uses the"req_cnf"<tt>req_cnf</tt> parameter from <xreftarget="I-D.ietf-ace-oauth-params"/>.target="RFC9201" format="default"/>. </t> <figurealign="center" anchor="fig:asymmATreq" title="Example token request boundanchor="fig_asymmATreq"> <name>Example Token Request Bound to anasymmetric key."> <artwork align="left"><![CDATA[Asymmetric Key</name> <sourcecode name="" type="cbor-diag"><![CDATA[ Header: POST (Code=0.02) Uri-Host: "as.example.com" Uri-Path: "token" OSCORE: 0x09, 0x05, 0x44, 0x6C (h=0, k=1, n=001, partialIV= 0x05, kid=[0x44, 0x6C]) Content-Format:"application/oscore"application/oscore Payload:0x44025d10x44025d1/ ... (full payload omitted for brevity) ...68b3825e/68b3825e Decrypted payload: {"client_id"/ client_id / 24 : "myclient","req_cnf"/ req_cnf / 4 : {"COSE_Key"/ COSE_Key / 1 : {"kty"/ kty / 1 :"EC", "kid"2 / EC2 /, / kid / 2 : h'11',"crv"/ crv / -1 :"P-256", "x"1 / P-256 /, / x / -2 : b64'usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8',"y"/ y / -3 : b64'IBOL+C3BttVivg+lSreASjpkttcsz+1rb7btKLv8EX4' } } }]]></artwork> </figure></t>]]></sourcecode> </figure> <t><xreftarget="fig:kidATreq"/>target="fig_kidATreq" format="default"/> shows a request for a token where a previously communicated proof-of-possession key is only referenced using the"req_cnf"<tt>req_cnf</tt> parameter from <xreftarget="I-D.ietf-ace-oauth-params"/>.target="RFC9201" format="default"/>. </t> <figurealign="center" anchor="fig:kidATreq" title="Example requestanchor="fig_kidATreq"> <name>Example Request for anaccess token boundAccess Token Bound to akey reference."> <artwork align="left"><![CDATA[Key Reference</name> <sourcecode name="" type="cbor-diag"><![CDATA[ Header: POST (Code=0.02) Uri-Host: "as.example.com" Uri-Path: "token" Content-Format:"application/ace+cbor"application/ace+cbor Payload: {"client_id"/ client_id / 24 : "myclient","audience"/ audience / 5 : "valve424","scope"/ scope / 9 : "read","req_cnf"/ req_cnf / 4 : {"kid"/ kid / 3 : b64'6kg0dXJM13U' } }]]></artwork> </figure></t>]]></sourcecode> </figure> <t>Refresh tokens are typically not stored as securely as proof-of-possession keys in requesting clients.Proof-of-possession basedProof-of-possession-based refresh token requestsMUST NOT<bcp14>MUST NOT</bcp14> request different proof-of-possession keys or different audiences in token requests. Refresh token requests can onlyusebe used to request access tokens bound to the same proof-of-possession key and the same audience as access tokens issued in the initial token request.</t> </section> <section anchor="tokenResponse"title="AS-to-Client Response">numbered="true" toc="default"> <name>AS-to-Client Response</name> <t>If the access token request has been successfully verified by the AS and the client is authorized to obtain an access token corresponding to its access token request, the AS sends a response with the response code equivalent to the CoAP response code 2.01 (Created). If the client request was invalid, or not authorized, the AS returns an errorresponseresponse, as described in <xreftarget="errorsToken"/>.</t>target="errorsToken" format="default"/>.</t> <t>Note that the AS decides which token type and profile to use when issuing a successful response. It is assumed that the AS has prior knowledge of the capabilities of the client and the RS (see <xreftarget="app:registration"/>).target="app_registration" format="default"/>). This prior knowledge may, for example, be set by the use of a dynamic client registration protocol exchange <xreftarget="RFC7591"/>.target="RFC7591" format="default"/>. If the client has requested a specific proof-of-possession key using the"req_cnf"<tt>req_cnf</tt> parameter from <xreftarget="I-D.ietf-ace-oauth-params"/>,target="RFC9201" format="default"/>, this may also influence which profile the AS selects, as it needs to support the use of the key type requested by the client.</t> <t>The content of the successful reply is the Access Information. When using CoAP, the payloadMUST<bcp14>MUST</bcp14> be encoded as a CBORmap,map; when usingHTTPHTTP, the encoding is a JSONmapmap, as specified insection 5.1 of<xreftarget="RFC6749"/>.target="RFC6749" sectionFormat="of" section="5.1"/>. In bothcasescases, the parameters specified inSection 5.1 of<xreftarget="RFC6749"/>target="RFC6749" sectionFormat="of" section="5.1"/> are used, with the following additions andchanges: <list style="hanging"> <t hangText="ace_profile:"><vspace blankLines="0"/> OPTIONALchanges:</t> <dl newline="true" spacing="normal" indent="6"> <dt>ace_profile:</dt> <dd>This parameter is <bcp14>OPTIONAL</bcp14> unless the request included an emptyace_profile parameter<tt>ace_profile</tt> parameter, in which case it is MANDATORY. This indicates the profile that the clientMUST<bcp14>MUST</bcp14> use towards the RS. See <xreftarget="paramProfile"/>target="paramProfile" format="default"/> for the formatting of this parameter. If this parameter is absent, the AS assumes that the client implicitly knows which profile to use towards theRS.</t> <t hangText="token_type:"><vspace blankLines="0"/> ThisRS.</dd> <dt><tt>token_type</tt>:</dt> <dd>This parameter isOPTIONAL,<bcp14>OPTIONAL</bcp14>, as opposed to'required'<bcp14>REQUIRED</bcp14> in <xreftarget="RFC6749"/>.target="RFC6749" format="default"/>. Bydefaultdefault, implementations of this frameworkSHOULD<bcp14>SHOULD</bcp14> assume that thetoken_type<tt>token_type</tt> is "PoP". If a specific use case requires anothertoken_type<tt>token_type</tt> (e.g., "Bearer") to beusedused, then this parameter isREQUIRED. </t> </list> </t> <t>Furthermore<bcp14>REQUIRED</bcp14>. </dd> </dl> <t>Furthermore, <xreftarget="I-D.ietf-ace-oauth-params"/>target="RFC9201" format="default"/> defines additional parameters that the ASMUST<bcp14>MUST</bcp14> be able to use when responding to a request to the token endpoint.</t> <t><xreftarget="fig:rsinfo"/>target="table_rsinfo" format="default"/> summarizes the parameters that can currently be part of the Access Information. Future extensions may define additionalparameters. <figure align="center" anchor="fig:rsinfo" title="Accessparameters.</t> <table anchor="table_rsinfo"> <name>Access Informationparameters"> <artwork align="left"><![CDATA[ /-------------------+-------------------------------\ | Parameter name | Specified in | |-------------------+-------------------------------| | access_token | RFC 6749 | | token_type | RFC 6749 | | expires_in | RFC 6749 | | refresh_token | RFC 6749 | | scope | RFC 6749 | | state | RFC 6749 | | error | RFC 6749 | | error_description | RFC 6749 | | error_uri | RFC 6749 | | ace_profile | [this document] | | cnf | [I-D.ietf-ace-oauth-params] | | rs_cnf | [I-D.ietf-ace-oauth-params] | \-------------------+-------------------------------/ ]]></artwork></figure> </t>Parameters</name> <thead> <tr> <th>Parameter name</th> <th>Specified in</th> </tr> </thead> <tbody> <tr> <td><tt>access_token</tt></td> <td><xref target="RFC6749" format="default"/></td> </tr> <tr> <td><tt>token_type</tt></td> <td><xref target="RFC6749" format="default"/></td> </tr> <tr> <td><tt>expires_in</tt></td> <td><xref target="RFC6749" format="default"/></td> </tr> <tr> <td><tt>refresh_token</tt></td> <td><xref target="RFC6749" format="default"/></td> </tr> <tr> <td><tt>scope</tt></td> <td><xref target="RFC6749" format="default"/></td> </tr> <tr> <td><tt>state</tt></td> <td><xref target="RFC6749" format="default"/></td> </tr> <tr> <td><tt>error</tt></td> <td><xref target="RFC6749" format="default"/></td> </tr> <tr> <td><tt>error_description</tt></td> <td><xref target="RFC6749" format="default"/></td> </tr> <tr> <td><tt>error_uri</tt></td> <td><xref target="RFC6749" format="default"/></td> </tr> <tr> <td><tt>ace_profile</tt></td> <td>RFC 9200</td> </tr> <tr> <td><tt>cnf</tt></td> <td><xref target="RFC9201" format="default"/></td> </tr> <tr> <td><tt>rs_cnf</tt></td> <td><xref target="RFC9201" format="default"/></td> </tr> </tbody> </table> <t><xreftarget="fig:symmATres"/>target="fig_symmATres" format="default"/> shows a response containing a token and a"cnf"<tt>cnf</tt> parameter with a symmetric proof-of-possession key, which is defined in <xreftarget="I-D.ietf-ace-oauth-params"/>.target="RFC9201" format="default"/>. Note that the key identifier'kid'<tt>kid</tt> is only used to simplify indexing and retrieving the key, and no assumptions should be made that it is unique in the domains of either the client or the RS. </t> <figurealign="center" anchor="fig:symmATres" title="Exampleanchor="fig_symmATres"> <name>Example ASresponseResponse with anaccess token boundAccess Token Bound to asymmetric key."> <artwork align="left"><![CDATA[Symmetric Key</name> <sourcecode name="" type="cbor-diag"><![CDATA[ Header: Created (Code=2.01) Content-Format:"application/ace+cbor"application/ace+cbor Payload: {"access_token"/ access_token / 1 :b64'SlAV32hkKGb64'SlAV32hk'/ ... (remainder of CWT omitted for brevity; CWT contains COSE_Key in the"cnf" claim)', "ace_profile"cnf claim)/, / ace_profile / 38 : "coap_dtls","expires_in"/ expires_in / 2 :"3600", "cnf"3600, / cnf / 8 : {"COSE_Key"/ COSE_Key / 1 : {"kty"/ kty / 1 :"Symmetric", "kid"4 / Symmetric /, / kid / 2 : b64'39Gqlw',"k"/ k / -1 :b64'hJtXhkV8FJG+Onbc6mxCcQh'b64'hJtXhkV8FJG+Onbc6mxC' } } }]]></artwork> </figure></t>]]></sourcecode> </figure> </section> <section anchor="errorsToken"title="Error Response">numbered="true" toc="default"> <name>Error Response</name> <t>The error responses for interactions with the AS are generally equivalent to the ones defined inSection 5.2 of<xreftarget="RFC6749"/>,target="RFC6749" sectionFormat="of" section="5.2"/>, with the following exceptions:<list style="symbols"> <t>When</t> <ul spacing="normal"> <li>When usingCoAPCoAP, the payloadMUST<bcp14>MUST</bcp14> be encoded as a CBOR map, with the Content-Format "application/ace+cbor". When usingHTTPHTTP, the payload is encoded inJSONJSON, as specified insection 5.2 of<xreftarget="RFC6749"/>.</t> <t>Atarget="RFC6749" sectionFormat="of" section="5.2"/>.</li> <li>A response code equivalent to the CoAP code 4.00 (Bad Request)MUST<bcp14>MUST</bcp14> be used for all error responses, except forinvalid_clientinvalid_client, where a response code equivalent to the CoAP code 4.01 (Unauthorized)MAY<bcp14>MAY</bcp14> be used under the same conditions as specified inSection 5.2 of<xreftarget="RFC6749"/>.</t> <t>Thetarget="RFC6749" sectionFormat="of" section="5.2"/>.</li> <li>The parameters"error", "error_description"<tt>error</tt>, <tt>error_description</tt>, and"error_uri" MUST<tt>error_uri</tt> <bcp14>MUST</bcp14> be abbreviated using the codes specified in <xreftarget="fig:cborTokenParameters"/>,target="table_cborTokenParameters" format="default"/>, when a CBOR encoding isused.</t> <t>Theused.</li> <li>The error code (i.e., value of the"error"<tt>error</tt> parameter)MUST<bcp14>MUST</bcp14> beabbreviatedabbreviated, as specified in <xreftarget="fig:cborErrorCodes"/>,target="table_cborErrorCodes" format="default"/>, when a CBOR encoding isused.</t> </list> <figure align="center" anchor="fig:cborErrorCodes" title="CBOR abbreviationsused.</li> </ul> <table anchor="table_cborErrorCodes"> <name>CBOR Abbreviations forcommon error codes"> <artwork align="left"><![CDATA[ /---------------------------+-------------\ | Name | CBOR Values | |---------------------------+-------------| | invalid_request | 1 | | invalid_client | 2 | | invalid_grant | 3 | | unauthorized_client | 4 | | unsupported_grant_type | 5 | | invalid_scope | 6 | | unsupported_pop_key | 7 | | incompatible_ace_profiles | 8 | \---------------------------+-------------/ ]]></artwork> </figure> </t>Common Error Codes</name> <thead> <tr> <th>Name</th> <th>CBOR Values</th> <th>Original Specification</th> </tr> </thead> <tbody> <tr> <td><tt>invalid_request</tt></td> <td>1</td> <td><xref target="RFC6749" sectionFormat="of" section="5.2"/></td> </tr> <tr> <td><tt>invalid_client</tt></td> <td>2</td> <td><xref target="RFC6749" sectionFormat="of" section="5.2"/></td> </tr> <tr> <td><tt>invalid_grant</tt></td> <td>3</td> <td><xref target="RFC6749" sectionFormat="of" section="5.2"/></td> </tr> <tr> <td><tt>unauthorized_client</tt></td> <td>4</td> <td><xref target="RFC6749" sectionFormat="of" section="5.2"/></td> </tr> <tr> <td><tt>unsupported_grant_type</tt></td> <td>5</td> <td><xref target="RFC6749" sectionFormat="of" section="5.2"/></td> </tr> <tr> <td><tt>invalid_scope</tt></td> <td>6</td> <td><xref target="RFC6749" sectionFormat="of" section="5.2"/></td> </tr> <tr> <td><tt>unsupported_pop_key</tt></td> <td>7</td> <td>RFC 9200</td> </tr> <tr> <td><tt>incompatible_ace_profiles</tt></td> <td>8</td> <td>RFC 9200</td> </tr> </tbody> </table> <t>In addition to the error responses defined in OAuth 2.0, the following behaviorMUST<bcp14>MUST</bcp14> be implemented by the AS:<list style="symbols"> <t>If</t> <ul spacing="normal"> <li>If the client submits an asymmetric key in the token request that the RS cannot process, the ASMUST<bcp14>MUST</bcp14> reject that request with a response code equivalent to the CoAP code 4.00 (BadRequest)Request), including the error code "unsupported_pop_key" specified in <xreftarget="fig:cborErrorCodes"/>.</t> <t>Iftarget="table_cborErrorCodes" format="default"/>.</li> <li>If the client and the RS it has requested an access token for do not share a common profile, the ASMUST<bcp14>MUST</bcp14> reject that request with a response code equivalent to the CoAP code 4.00 (BadRequest)Request), including the error code "incompatible_ace_profiles" specified in <xreftarget="fig:cborErrorCodes"/>.</t> </list></t>target="table_cborErrorCodes" format="default"/>.</li> </ul> </section> <section anchor="tokenParams"title="Requestnumbered="true" toc="default"> <name>Request and ResponseParameters">Parameters</name> <t>This section provides more detail about the new parameters that can be used in access token requests and responses, as well as abbreviations for more compact encoding of existing parameters and common parameter values.</t> <section anchor="paramGrantType"title="Grant Type">numbered="true" toc="default"> <name>Grant Type</name> <t>The abbreviations specified in the registry defined in <xreftarget="IANAGrantTypeMappings"/> MUSTtarget="IANAGrantTypeMappings" format="default"/> <bcp14>MUST</bcp14> be used in CBOR encodings instead of the string values defined in <xreftarget="RFC6749"/>,target="RFC6749" format="default"/> if CBOR payloads are used.<figure align="center" anchor="fig:grant_types" title="CBOR abbreviations</t> <table anchor="table_grant_types"> <name>CBOR Abbreviations forcommon grant types "> <artwork align="left"><![CDATA[ /--------------------+------------+------------------------\ | Name | CBOR Value | Original Specification | |--------------------+------------+------------------------| | password | 0 | s. 4.3.2 of [RFC6749] | | authorization_code | 1 | s. 4.1.3 of [RFC6749] | | client_credentials | 2 | s. 4.4.2 of [RFC6749] | | refresh_token | 3 | s. 6 of [RFC6749] | \--------------------+------------+------------------------/ ]]></artwork> </figure></t>Common Grant Types</name> <thead> <tr> <th>Name</th> <th>CBOR Value</th> <th>Original Specification</th> </tr> </thead> <tbody> <tr> <td><tt>password</tt></td> <td>0</td> <td><xref target="RFC6749" sectionFormat="of" section="4.3.2"/></td> </tr> <tr> <td><tt>authorization_code</tt></td> <td>1</td> <td><xref target="RFC6749" sectionFormat="of" section="4.1.3"/></td> </tr> <tr> <td><tt>client_credentials</tt></td> <td>2</td> <td><xref target="RFC6749" sectionFormat="of" section="4.4.2"/></td> </tr> <tr> <td><tt>refresh_token</tt></td> <td>3</td> <td><xref target="RFC6749" sectionFormat="of" section="6"/></td> </tr> </tbody> </table> </section> <section anchor="paramTokenType"title="Token Type">numbered="true" toc="default"> <name>Token Type</name> <t>The"token_type"<tt>token_type</tt> parameter, defined insection 5.1 of<xreftarget="RFC6749"/>,target="RFC6749" sectionFormat="of" section="5.1"/>, allows the AS to indicate to the client which type of access token it is receiving (e.g., a bearer token). </t> <t>This document registers the new value "PoP" for theOAuth"OAuth Access TokenTypesTypes" registry, specifying a proof-of-possession token. How theproof-of-possessionproof of possession by the client to the RS is performedMUST<bcp14>MUST</bcp14> be specified by the profiles.</t> <t>The values in the"token_type"<tt>token_type</tt> parameterMUST<bcp14>MUST</bcp14> use the CBOR abbreviations defined in the registry specified by <xreftarget="IANATokenTypeMappings"/>,target="IANATokenTypeMappings" format="default"/> if a CBOR encoding isused. </t>used.</t> <t>In thisframeworkframework, the "pop" value for the"token_type"<tt>token_type</tt> parameter is the default. The AS may, however, provide a different value from those registered in <xreftarget="IANA.OAuthAccessTokenTypes"/>.</t>target="IANA.OAuthAccessTokenTypes" format="default"/>.</t> </section> <section anchor="paramProfile"title="Profile">numbered="true" toc="default"> <name>Profile</name> <t>Profiles of this frameworkMUST<bcp14>MUST</bcp14> define the communication protocol and the communication security protocol between the client and the RS. The security protocolMUST<bcp14>MUST</bcp14> provide encryption,integrityintegrity, and replay protection. ItMUST<bcp14>MUST</bcp14> also provide a binding between requests and responses.FurthermoreFurthermore, profilesMUST<bcp14>MUST</bcp14> define a list of allowed proof-of-possessionmethods,methods if they support proof-of-possession tokens.</t> <t>A profileMUST<bcp14>MUST</bcp14> specify an identifier thatMUST<bcp14>MUST</bcp14> be used to uniquely identify itself in the"ace_profile"<tt>ace_profile</tt> parameter. The textual representation of the profile identifier is intended for human readability and for JSON-basedinteractions,interactions; itMUST NOT<bcp14>MUST NOT</bcp14> be used for CBOR-based interactions. ProfilesMUST<bcp14>MUST</bcp14> register their identifier in the registry defined in <xreftarget="IANAProfile"/>.target="IANAProfile" format="default"/>. </t> <t>ProfilesMAY<bcp14>MAY</bcp14> define additional parameters for both the token request and the Access Information in the access token response in order to support negotiation or signaling ofprofile specificprofile-specific parameters. </t> <t>Clients that want the AS to provide them with the"ace_profile"<tt>ace_profile</tt> parameter in the access token response can indicate that by sendinga ace_profilean <tt>ace_profile</tt> parameter with a null value for CBOR-based interactions, or an empty string if CBOR is not used, in the access token request.</t> </section> <section anchor="cnonceParamToken"title="Client-Nonce">numbered="true" toc="default"> <name>Client-Nonce</name> <t>This parameterMUST<bcp14>MUST</bcp14> be sent from the client to theAS,AS if it previously received a"cnonce"<tt>cnonce</tt> parameter in the"ASAS Request CreationHints" <xref target="asInfo"/>.Hints (<xref target="asInfo" format="default"/>). The parameter is encoded as a byte string for CBOR-basedinteractions,interactions and as a string(Base64(base64url without padding encodedbinary)binary <xref target="RFC4648" format="default"/>) if CBOR is not used. ItMUST<bcp14>MUST</bcp14> copy the value from thecnonce<tt>cnonce</tt> parameter in the"ASAS Request CreationHints".</t>Hints.</t> </section> </section><!--Parameters --><section anchor="tokenCborParams"title="Mappingnumbered="true" toc="default"> <name>Mapping Parameters toCBOR">CBOR</name> <t>If CBOR encoding is used, all OAuth parameters in access token requests and responsesMUST<bcp14>MUST</bcp14> be mapped to CBORtypestypes, as specified in the registry defined by <xreftarget="IANAOAuthParameterMappingsRegistry"/>,target="IANAOAuthParameterMappingsRegistry" format="default"/>, using the given integer abbreviation for the map keys.</t> <t>Note that we have aligned the abbreviations corresponding to claims with the abbreviations defined in <xreftarget="RFC8392"/>.</t>target="RFC8392" format="default"/>.</t> <t>Note also that abbreviations from -24 to 23 have a1 byte1-byte encoding size in CBOR. We have thus chosen to assign abbreviations in that range to parameters we expect to be used most frequently in constrained scenarios.</t><t> <figure align="center" anchor="fig:cborTokenParameters" title="CBOR mappings used<table anchor="table_cborTokenParameters"> <name>CBOR Mappings Used intoken requestsToken Requests andresponses"> <artwork align="left"><![CDATA[ /-------------------+----------+---------------------\ | Name | CBOR Key | Value Type | |-------------------+----------+---------------------| | access_token | 1 | byte string | | expires_in | 2 | unsigned integer | | audience | 5 | text string | | scope | 9 | textResponses</name> <thead> <tr> <th>Name</th> <th>CBOR Key</th> <th>Value Type</th> <th>Original Specification</th> </tr> </thead> <tbody> <tr> <td><tt>access_token</tt></td> <td>1</td> <td>byte string</td> <td><xref target="RFC6749" format="default"/></td> </tr> <tr> <td><tt>expires_in</tt></td> <td>2</td> <td>unsigned integer</td> <td><xref target="RFC6749" format="default"/></td> </tr> <tr> <td><tt>audience</tt></td> <td>5</td> <td>text string</td> <td><xref target="RFC8693" format="default"/></td> </tr> <tr> <td><tt>scope</tt></td> <td>9</td> <td>text or bytestring | | client_id | 24 | text string | | client_secret | 25 | byte string | | response_type | 26 | text string | | redirect_uri | 27 | text string | | state | 28 | text string | | code | 29 | byte string | | error | 30 | integer | | error_description | 31 | text string | | error_uri | 32 | text string | | grant_type | 33 | unsigned integer | | token_type | 34 | integer | | username | 35 | text string | | password | 36 | text string | | refresh_token | 37 | byte string | | ace_profile | 38 | integer | | cnonce | 39 | byte string | \-------------------+----------+---------------------/ ]]></artwork> </figure> </t>string</td> <td><xref target="RFC6749" format="default"/></td> </tr> <tr> <td><tt>client_id</tt></td> <td>24</td> <td>text string</td> <td><xref target="RFC6749" format="default"/></td> </tr> <tr> <td><tt>client_secret</tt></td> <td>25</td> <td>byte string</td> <td><xref target="RFC6749" format="default"/></td> </tr> <tr> <td><tt>response_type</tt></td> <td>26</td> <td>text string</td> <td><xref target="RFC6749" format="default"/></td> </tr> <tr> <td><tt>redirect_uri</tt></td> <td>27</td> <td>text string</td> <td><xref target="RFC6749" format="default"/></td> </tr> <tr> <td><tt>state</tt></td> <td>28</td> <td>text string</td> <td><xref target="RFC6749" format="default"/></td> </tr> <tr> <td><tt>code</tt></td> <td>29</td> <td>byte string</td> <td><xref target="RFC6749" format="default"/></td> </tr> <tr> <td><tt>error</tt></td> <td>30</td> <td>integer</td> <td><xref target="RFC6749" format="default"/></td> </tr> <tr> <td><tt>error_description</tt></td> <td>31</td> <td>text string</td> <td><xref target="RFC6749" format="default"/></td> </tr> <tr> <td><tt>error_uri</tt></td> <td>32</td> <td>text string</td> <td><xref target="RFC6749" format="default"/></td> </tr> <tr> <td><tt>grant_type</tt></td> <td>33</td> <td>unsigned integer</td> <td><xref target="RFC6749" format="default"/></td> </tr> <tr> <td><tt>token_type</tt></td> <td>34</td> <td>integer</td> <td><xref target="RFC6749" format="default"/></td> </tr> <tr> <td><tt>username</tt></td> <td>35</td> <td>text string</td> <td><xref target="RFC6749" format="default"/></td> </tr> <tr> <td><tt>password</tt></td> <td>36</td> <td>text string</td> <td><xref target="RFC6749" format="default"/></td> </tr> <tr> <td><tt>refresh_token</tt></td> <td>37</td> <td>byte string</td> <td><xref target="RFC6749" format="default"/></td> </tr> <tr> <td><tt>ace_profile</tt></td> <td>38</td> <td>integer</td> <td>RFC 9200</td> </tr> <tr> <td><tt>cnonce</tt></td> <td>39</td> <td>byte string</td> <td>RFC 9200</td> </tr> </tbody> </table> </section> </section></section><!-- Token endpoint --><section anchor="introspectionEndpoint"title="Thenumbered="true" toc="default"> <name>The IntrospectionEndpoint">Endpoint</name> <t>Token introspection <xreftarget="RFC7662"/> MAYtarget="RFC7662" format="default"/> <bcp14>MAY</bcp14> be implemented by theAS,AS and the RS. When implemented, itMAY<bcp14>MAY</bcp14> be used by the RS and to query the AS for metadata about a given token, e.g., validity or scope. Analogous to the protocol defined in <xreftarget="RFC7662"/>target="RFC7662" format="default"/> for HTTP and JSON, this section defines adaptations to more constrained environments using CBOR and leaving the choice of the application protocol to theprofile.</t>profile. The client MAY also implement and use introspection analogously to the RS to obtain information about a given token.</t> <t>Communication between the requesting entity and the introspection endpoint at the ASMUST<bcp14>MUST</bcp14> be integrity protected and encrypted. The communication security protocolMUST<bcp14>MUST</bcp14> also provide a binding between requests and responses. Furthermore, the two interacting partiesMUST<bcp14>MUST</bcp14> perform mutual authentication. Finally, the ASSHOULD<bcp14>SHOULD</bcp14> verify that the requesting entity has the right to access introspection information about the provided token. Profiles of this framework that support introspectionMUST<bcp14>MUST</bcp14> specify how authentication and communication security between the requesting entity and the AS is implemented.</t> <t> The default name of this endpoint inana url-pathSHOULD<bcp14>SHOULD</bcp14> be '/introspect'. However, implementations are not required to use this name and can define their own instead.</t><t>The figures of this section use the CBOR diagnostic notation without the integer abbreviations for the parameters and their values for better readability. </t><section anchor="introReq"title="Introspection Request">numbered="true" toc="default"> <name>Introspection Request</name> <t>The requesting entity sends a POST request to the introspection endpoint at the AS. The profileMUST<bcp14>MUST</bcp14> specify how the communication is protected. If CoAP is used, the payloadMUST<bcp14>MUST</bcp14> be encoded as a CBOR map with a"token"<tt>token</tt> entry containing the access token. Further optional parameters representing additional context that is known by the requesting entity to aid the AS in its responseMAY<bcp14>MAY</bcp14> be included.</t> <t>For CoAP-based interaction, all messagesMUST<bcp14>MUST</bcp14> use the content type "application/ace+cbor". ForHTTPHTTP, the encoding defined insection 2.1 of<xreftarget="RFC7662"/>target="RFC7662" sectionFormat="of" section="2.1"/> is used.</t> <t>The same parameters are required and optional as inSection 2.1 of<xreftarget="RFC7662"/>.</t>target="RFC7662" sectionFormat="of" section="2.1"/>.</t> <t>For example, <xreftarget="fig:introReq"/>target="fig_introReq" format="default"/> shows an RS calling the token introspection endpoint at the AS to query about an OAuth 2.0 proof-of-possession token. Note that object security based on OSCORE <xreftarget="RFC8613"/>target="RFC8613" format="default"/> is assumed in thisexample, thereforeexample; therefore, the Content-Format is "application/oscore". <xreftarget="fig:introReq-payl"/>target="fig_introReq-payl" format="default"/> shows the decodedpayload.payload.</t> <figurealign="center" anchor="fig:introReq" title="Example introspection request."> <artwork align="left"><![CDATA[anchor="fig_introReq"> <name>Example Introspection Request</name> <sourcecode name="" type=""><![CDATA[ Header: POST (Code=0.02) Uri-Host: "as.example.com" Uri-Path: "introspect" OSCORE: 0x09, 0x05, 0x25 Content-Format:"application/oscore"application/oscore Payload: ... COSE content ...]]></artwork>]]></sourcecode> </figure> <figurealign="center" anchor="fig:introReq-payl" title="Decoded payload."> <artwork align="left"><![CDATA[anchor="fig_introReq-payl"> <name>Decoded Payload</name> <sourcecode name="" type="cbor-diag"><![CDATA[ {"token"/ token / 11 : b64'7gj0dXJQ43U',"token_type_hint"/ token_type_hint / 33 :"PoP"2 / PoP / }]]></artwork> </figure></t>]]></sourcecode> </figure> </section> <section anchor="introRes"title="Introspection Response">numbered="true" toc="default"> <name>Introspection Response</name> <t>If the introspection request is authorized and successfully processed, the AS sends a response with the response code equivalent to the CoAP code 2.01 (Created). If the introspection request was invalid, notauthorizedauthorized, or couldn't beprocessedprocessed, the AS returns an errorresponseresponse, as described in <xreftarget="errorsIntro"/>.</t>target="errorsIntro" format="default"/>.</t> <t>In a successful response, the AS encodes the response parameters in a map. If CoAP is used, thisMUST<bcp14>MUST</bcp14> be encoded as a CBORmap,map; if HTTP isusedused, the JSON encoding specified insection 2.2 of<xreftarget="RFC7662"/>target="RFC7662" sectionFormat="of" section="2.2"/> is used. The map containing the response payload includes the same required and optional parameters as inSection 2.2 of<xreftarget="RFC7662"/>target="RFC7662" sectionFormat="of" section="2.2"/>, with the followingadditions: <list style="hanging"> <t hangText="ace_profile"> OPTIONAL.additions:</t> <dl newline="true" spacing="normal"> <dt><tt>ace_profile</tt></dt> <dd>This parameter is <bcp14>OPTIONAL</bcp14>. This indicates the profile that the RSMUST<bcp14>MUST</bcp14> use with the client. See <xreftarget="paramProfile"/>target="paramProfile" format="default"/> for more details on the formatting of this parameter. If this parameter is absent, the AS assumes that the RS implicitly knows which profile to use towards theclient.</t> <t hangText="cnonce"> OPTIONAL. Aclient.</dd> <dt><tt>cnonce</tt></dt> <dd>This parameter is <bcp14>OPTIONAL</bcp14>. This is a client-nonce provided to the AS by the client. The RSMUST<bcp14>MUST</bcp14> verify that this corresponds to the client-nonce previously provided to the client in the"ASAS Request CreationHints".Hints. See Sections <xreftarget="asInfo"/>target="asInfo" format="counter"/> and <xreftarget="cnonceParamToken"/>. </t> <t hangText="exi"> OPTIONAL. The "expires-in"target="cnonceParamToken" format="counter"/>. Its value is a byte string when encoded in CBOR and is the base64url encoding of this byte string without padding when encoded in JSON <xref target="RFC4648" format="default"/>. </dd> <dt><tt>cti</tt></dt> <dd>This parameter is <bcp14>OPTIONAL</bcp14>. This is the <tt>cti</tt> claim associated to this access token. This parameter has the same meaning and processing rules as the <tt>jti</tt> parameter defined in <xref target="RFC7662" sectionFormat="of" section="3.1.2"/> except that its value is a byte string when encoded in CBOR and is the base64url encoding of this byte string without padding when encoded in JSON <xref target="RFC4648" format="default"/>.</dd> <dt><tt>exi</tt></dt> <dd>This parameter is <bcp14>OPTIONAL</bcp14>. This is the <tt>expires_in</tt> claim associated to this access token. See <xreftarget="tokenExpiration"/>. </t> </list> </t> <t>Furthermoretarget="tokenExpiration" format="default"/>. </dd> </dl> <t>Furthermore, <xreftarget="I-D.ietf-ace-oauth-params"/>target="RFC9201" format="default"/> defines more parameters that the ASMUST<bcp14>MUST</bcp14> be able to use when responding to a request to the introspection endpoint.</t> <t>For example, <xreftarget="fig:introRes"/>target="fig_introRes" format="default"/> shows an AS response to the introspection request in <xreftarget="fig:introReq"/>.target="fig_introReq" format="default"/>. Note that this example contains the"cnf"<tt>cnf</tt> parameter defined in <xreftarget="I-D.ietf-ace-oauth-params"/>.target="RFC9201" format="default"/>. </t> <figurealign="center" anchor="fig:introRes" title="Example introspection response."> <artwork align="left"><![CDATA[anchor="fig_introRes"> <name>Example Introspection Response</name> <sourcecode name="" type="cbor-diag"><![CDATA[ Header: Created (Code=2.01) Content-Format:"application/ace+cbor"application/ace+cbor Payload: {"active"/ active / 10 : true,"scope"/ scope / 9 : "read","ace_profile"/ ace_profile / 38 :"coap_dtls", "cnf"1 / coap_dtls /, / cnf / 8 : {"COSE_Key"/ COSE_Key / 1 : {"kty"/ kty / 1 :"Symmetric", "kid"4 / Symmetric /, / kid / 2 : b64'39Gqlw',"k"/ k / -1 :b64'hJtXhkV8FJG+Onbc6mxCcQh'b64'hJtXhkV8FJG+Onbc6mxC' } } }]]></artwork> </figure></t>]]></sourcecode> </figure> </section> <section anchor="errorsIntro"title="Error Response">numbered="true" toc="default"> <name>Error Response</name> <t>The error responses for CoAP-based interactions with the AS are equivalent to the ones for HTTP-basedinteractionsinteractions, as defined inSection 2.3 of<xreftarget="RFC7662"/>,target="RFC7662" sectionFormat="of" section="2.3"/>, with the followingdifferences: <list style="symbols"> <t>Ifdifferences:</t> <ul spacing="normal"> <li>If content is sent and CoAP isusedused, the payloadMUST<bcp14>MUST</bcp14> be encoded as a CBOR map and the Content-Format "application/ace+cbor"MUST<bcp14>MUST</bcp14> be used. ForHTTPHTTP, the encoding defined insection 2.3 of<xreftarget="RFC6749"/>target="RFC6749" sectionFormat="of" section="2.3"/> isused.</t> <t>Ifused.</li> <li>If the credentials used by the requesting entity (usually the RS) areinvalidinvalid, the ASMUST<bcp14>MUST</bcp14> respond with the response code equivalent to the CoAP code 4.01 (Unauthorized) and use the required and optional parameters fromSection 2.3 in<xreftarget="RFC7662"/>.</t> <t>Iftarget="RFC7662" sectionFormat="of" section="2.3"/>.</li> <li>If the requesting entity does not have the right to perform this introspection request, the ASMUST<bcp14>MUST</bcp14> respond with a response code equivalent to the CoAP code 4.03 (Forbidden). In thiscasecase, no payload isreturned.</t> <t>Thereturned.</li> <li>The parameters"error", "error_description"<tt>error</tt>, <tt>error_description</tt>, and"error_uri" MUST<tt>error_uri</tt> <bcp14>MUST</bcp14> be abbreviated using the codes specified in <xreftarget="fig:cborTokenParameters"/>.</t> <t>Thetarget="table_cborTokenParameters" format="default"/>.</li> <li>The error codesMUST<bcp14>MUST</bcp14> be abbreviated using the codes specified in the registry defined by <xreftarget="IANAErrorCBORMappings"/>.</t> </list> </t>target="IANAErrorCBORMappings" format="default"/>.</li> </ul> <t>Note that a properly formed and authorized query for an inactive or otherwise invalid token does not warrant an error response by this specification. In these cases, the authorization serverMUST<bcp14>MUST</bcp14> instead respond with an introspection response with the"active"<tt>active</tt> field set to "false".</t> </section> <section anchor="introParamsCbor"title="Mappingnumbered="true" toc="default"> <name>Mapping Introspection Parameters toCBOR">CBOR</name> <t>If CBOR is used, the introspection request and response parametersMUST<bcp14>MUST</bcp14> be mapped to CBORtypestypes, as specified in the registry defined by <xreftarget="IANAIntrospectionEndpointCBORMappingsRegistry"/>,target="IANAIntrospectionEndpointCBORMappingsRegistry" format="default"/>, using the given integer abbreviation for the map key.</t> <t>Note that we have aligned abbreviations that correspond to a claim with the abbreviations defined in <xreftarget="RFC8392"/>target="RFC8392" format="default"/> and the abbreviations of parameters with the same name from <xreftarget="tokenCborParams"/>. <figure align="center" anchor="fig:cborIntrospectionParameters" title="CBORtarget="tokenCborParams" format="default"/>. </t> <table anchor="table_cborIntrospectionParameters"> <name>CBOR Mappingstofor Token IntrospectionParameters."> <artwork align="left"><![CDATA[ /-------------------+----------+-------------------------\ | Parameter name | CBOR Key | Value Type | |-------------------+----------+-------------------------| | iss | 1 | text string | | sub | 2 | text string | | aud | 3 | text string | | exp | 4 | integerParameters</name> <thead> <tr> <th>Parameter name</th> <th>CBOR Key</th> <th>Value Type</th> <th>Original Specification</th> </tr> </thead> <tbody> <tr> <td><tt>iss</tt></td> <td>1</td> <td>text string</td> <td><xref target="RFC7662" format="default"/></td> </tr> <tr> <td><tt>sub</tt></td> <td>2</td> <td>text string</td> <td><xref target="RFC7662" format="default"/></td> </tr> <tr> <td><tt>aud</tt></td> <td>3</td> <td>text string</td> <td><xref target="RFC7662" format="default"/></td> </tr> <tr> <td><tt>exp</tt></td> <td>4</td> <td>integer or| | | |floating-pointnumber | | nbf | 5 | integernumber</td> <td><xref target="RFC7662" format="default"/></td> </tr> <tr> <td><tt>nbf</tt></td> <td>5</td> <td>integer or| | | |floating-pointnumber | | iat | 6 | integernumber</td> <td><xref target="RFC7662" format="default"/></td> </tr> <tr> <td><tt>iat</tt></td> <td>6</td> <td>integer or| | | |floating-pointnumber | | cti | 7 | byte string | | scope | 9 | text or byte string | | active | 10 | Truenumber</td> <td><xref target="RFC7662" format="default"/></td> </tr> <tr> <td><tt>cti</tt></td> <td>7</td> <td>byte string</td> <td>RFC 9200</td> </tr> <tr> <td><tt>scope</tt></td> <td>9</td> <td>text orFalse | | token | 11 | byte string | | client_id | 24 | text string | | error | 30 | integer | | error_description | 31 | text string | | error_uri | 32 | text string | | token_type_hint | 33 | text string | | token_type | 34 | integer | | username | 35 | text string | | ace_profile | 38 | integer | | cnonce | 39 |bytestring | | exi | 40 | unsigned integer | \-------------------+----------+-------------------------/ ]]></artwork> </figure> </t>string</td> <td><xref target="RFC7662" format="default"/></td> </tr> <tr> <td><tt>active</tt></td> <td>10</td> <td>True or False</td> <td><xref target="RFC7662" format="default"/></td> </tr> <tr> <td><tt>token</tt></td> <td>11</td> <td>byte string</td> <td><xref target="RFC7662" format="default"/></td> </tr> <tr> <td><tt>client_id</tt></td> <td>24</td> <td>text string</td> <td><xref target="RFC7662" format="default"/></td> </tr> <tr> <td><tt>error</tt></td> <td>30</td> <td>integer</td> <td><xref target="RFC7662" format="default"/></td> </tr> <tr> <td><tt>error_description</tt></td> <td>31</td> <td>text string</td> <td><xref target="RFC7662" format="default"/></td> </tr> <tr> <td><tt>error_uri</tt></td> <td>32</td> <td>text string</td> <td><xref target="RFC7662" format="default"/></td> </tr> <tr> <td><tt>token_type_hint</tt></td> <td>33</td> <td>text string</td> <td><xref target="RFC7662" format="default"/></td> </tr> <tr> <td><tt>token_type</tt></td> <td>34</td> <td>integer</td> <td><xref target="RFC7662" format="default"/></td> </tr> <tr> <td><tt>username</tt></td> <td>35</td> <td>text string</td> <td><xref target="RFC7662" format="default"/></td> </tr> <tr> <td><tt>ace_profile</tt></td> <td>38</td> <td>integer</td> <td>RFC 9200</td> </tr> <tr> <td><tt>cnonce</tt></td> <td>39</td> <td>byte string</td> <td>RFC 9200</td> </tr> <tr> <td>exi</td> <td>40</td> <td>unsigned integer</td> <td>RFC 9200</td> </tr> </tbody> </table> </section> </section></section><!-- introspection endpoint --><section anchor="accessToken"title="Thenumbered="true" toc="default"> <name>The AccessToken">Token</name> <t>In thisframeworkframework, the use of CBOR Web Token (CWT) as specified in <xreftarget="RFC8392"/>target="RFC8392" format="default"/> isRECOMMENDED.<bcp14>RECOMMENDED</bcp14>. </t> <t>In order to facilitate offline processing of access tokens, this document uses the"cnf"<tt>cnf</tt> claim from <xreftarget="RFC8747"/>target="RFC8747" format="default"/> and the"scope"<tt>scope</tt> claim from <xreftarget="RFC8693"/>target="RFC8693" format="default"/> for JWT- and CWT-encoded tokens. In addition to string encoding specified for the"scope"<tt>scope</tt> claim, a binary encodingMAY<bcp14>MAY</bcp14> be used. The syntax of such an encoding is explicitly not specified here and left to profiles or applications, specifically note that a binary encoded scope does not necessarily use the space character '0x20' to delimit scope-tokens.</t> <t>If the AS needs to convey a hint to the RS about which profile it should use to communicate with the client, the ASMAY<bcp14>MAY</bcp14> include an"ace_profile"<tt>ace_profile</tt> claim in the access token, with the same syntax and semantics as defined in <xreftarget="paramProfile"/>.</t>target="paramProfile" format="default"/>.</t> <t>If the client submitted aclient-nonce<tt>cnonce</tt> parameter in the access token request<xref target="cnonceParamToken"/>,(<xref target="cnonceParamToken" format="default"/>), the ASMUST<bcp14>MUST</bcp14> include the value of this parameter in the"cnonce"<tt>cnonce</tt> claim specified here. The"cnonce"<tt>cnonce</tt> claim uses binary encoding.</t> <section anchor="tokenAuthInfoEndpoint"title="Thenumbered="true" toc="default"> <name>The Authorization InformationEndpoint">Endpoint</name> <t>The access token, containing authorization information and information about the proof-of-possession method used by the client, needs to be transported to the RS so that the RS can authenticate and authorize the client request.</t> <t>This section defines a method for transporting the access token to the RS using a RESTfulprotocolprotocol, such as CoAP. Profiles of this frameworkMAY<bcp14>MAY</bcp14> define other methods for token transport. </t> <t>The method consists of an authz-info endpoint, implemented by the RS. A client using this methodMUST<bcp14>MUST</bcp14> make a POST request to the authz-info endpoint at the RS with the access token in the payload. The CoAP Content-Format or HTTPMedia Type MUSTmedia type <bcp14>MUST</bcp14> reflect the format of the token,e.g. application/cwte.g., "application/cwt", for CBOR WebTokens,Tokens; if no Content-Format orMedia Typemedia type is defined for the token format,application/octet-stream MUST"application/octet-stream" <bcp14>MUST</bcp14> be used.</t> <t>The RS receiving the tokenMUST<bcp14>MUST</bcp14> verify the validity of the token. If the token is valid, the RSMUST<bcp14>MUST</bcp14> respond to the POST request with a response code equivalent toCoAP'sCoAP code 2.01 (Created). <xreftarget="verifyToken"/>target="verifyToken" format="default"/> outlines how an RSMUST<bcp14>MUST</bcp14> proceed to verify the validity of an access token.</t> <t>The RSMUST<bcp14>MUST</bcp14> be prepared to store at least one access token for future use. This is a difference as to how access tokens are handled in OAuth 2.0, where the access token is typically sent along with eachrequest,request and therefore not stored at the RS.</t> <t>When using thisframeworkframework, it isRECOMMENDED<bcp14>RECOMMENDED</bcp14> that an RS stores only one token per proof-of-possession key. This means that an additional token linked to the same key will supersede any existing token at theRS,RS by replacing the corresponding authorization information. The reason is that this greatly simplifies (constrained) implementations, with respect to required storage and resolving a request to the applicable token. The use of multiple access tokens for a single client increases the strain on the resourceserverserver, as it must consider every access token and calculate the actual permissions of the client. Also, tokens may contradict eachotherother, which may lead the server to enforce wrong permissions. If one of the access tokens expires earlier than others, the resulting permissions may offer insufficient protection. </t> <t>If the payload sent to the authz-info endpoint does not parse to a token, the RSMUST<bcp14>MUST</bcp14> respond with a response code equivalent to the CoAP code 4.00 (Bad Request).</t> <t>The RSMAY<bcp14>MAY</bcp14> make an introspection request to validate the token before responding to the POST request to the authz-info endpoint,e.g.e.g., if the token is an opaque reference. Some transport protocols may provide a way to indicate that the RS is busy and the client should retry after an interval; this type of status update would be appropriate while the RS is waiting for an introspection response. </t> <t>ProfilesMUST<bcp14>MUST</bcp14> specify whether the authz-info endpoint is protected, including whether error responses from this endpoint are protected. Note that since the token contains information thatallowallows the client and the RS to establish a security context in the first place, mutual authentication may not be possible at this point.</t> <t>The default name of this endpoint inana url-path is'/authz-info', however'/authz-info'; however, implementations are not required to use this name and can define their own instead.</t> <section anchor="verifyToken"title="Verifyingnumbered="true" toc="default"> <name>Verifying an AccessToken">Token</name> <t>When an RS receives an access token, itMUST<bcp14>MUST</bcp14> verify it before storing it. The details of token verification depends on various aspects, including the token encoding, the type of token, the security protection applied to the token, and the claims. The token encoding matters since the security protection differs between the token encodings. For example, a CWT token usesCOSECOSE, while a JWT token usesJOSE.JSON Object Signing and Encryption (JOSE). The type of token also has an influence on the verification procedure since tokens may beself-containedself-contained, whereby token verification may happen locally at theRSRS, while atoken-by-referencereference token requires further interaction with the authorization server, forexampleexample, using token introspection, to obtain the claims associated with the token reference. Self-contained tokensMUST,<bcp14>MUST</bcp14> at least be integrityprotectedprotected, but theyMAY<bcp14>MAY</bcp14> also be encrypted.</t> <t>For self-containedtokenstokens, the RSMUST<bcp14>MUST</bcp14> process the security protection of the token first, as specified by the respective token format. ForCWTCWT, the description can be found in <xreftarget="RFC8392"/> andtarget="RFC8392" format="default"/>; forJWTJWT, the relevant specification is <xreftarget="RFC7519"/>.target="RFC7519" format="default"/>. ThisMUST<bcp14>MUST</bcp14> include a verification that security protection (and thus the token) was generated by an AS that has the right to issue access tokens for this RS.</t> <t>In case the token is communicated byreferencereference, the RS needs to obtain the claims first. When the RS uses tokenintrospectionintrospection, the relevant specification is <xreftarget="RFC7662"/>target="RFC7662" format="default"/> with CoAP transport specified in <xreftarget="introspectionEndpoint"/>.target="introspectionEndpoint" format="default"/>. </t> <t>Errors may happen during this initial processing stage:<list style="symbols"> <t>If</t> <ul spacing="normal"> <li>If the verification of the security wrapper fails, or the token was issued by an AS that does not have the right to issue tokens for the receiving RS, the RSMUST<bcp14>MUST</bcp14> discard the token and, if this was an interaction with authz-info, return an error message with a response code equivalent to the CoAP code 4.01(Unauthorized).</t> <t>If(Unauthorized).</li> <li>If the claims cannot beobtainedobtained, the RSMUST<bcp14>MUST</bcp14> discard the token and, in case of an interaction via the authz-info endpoint, return an error message with a response code equivalent to the CoAP code 4.00 (BadRequest).</t> </list> </t>Request).</li> </ul> <t>Next, the RSMUST<bcp14>MUST</bcp14> verify claims, if present, contained in the access token. Errors are returned when claim checks fail, in the order of priority of this list:<list style="hanging"> <t hangText="iss">The issuer</t> <dl newline="true" spacing="normal"> <dt><tt>iss</tt></dt> <dd>The <tt>iss</tt> claim (if present) must identify the AS that has produced the security protection for the access token. If that is not thecasecase, the RSMUST<bcp14>MUST</bcp14> discard the token. If this was an interaction with authz-info, the RSMUST<bcp14>MUST</bcp14> also respond with a response code equivalent to the CoAP code 4.01(Unauthorized).</t> <t hangText="exp">The(Unauthorized).</dd> <dt><tt>exp</tt></dt> <dd>The expiration date must be in the future. If that is not thecasecase, the RSMUST<bcp14>MUST</bcp14> discard the token. If this was an interaction withauthz-infoauthz-info, the RSMUST<bcp14>MUST</bcp14> also respond with a response code equivalent to the CoAP code 4.01 (Unauthorized). Note that the RS has to terminate access rights to the protected resources at the time when the tokens expire.</t> <t hangText="aud">The audience</dd> <dt><tt>aud</tt></dt> <dd>The <tt>aud</tt> claim must refer to an audience that the RS identifies with. If that is not thecasecase, the RSMUST<bcp14>MUST</bcp14> discard the token. If this was an interaction with authz-info, the RSMUST<bcp14>MUST</bcp14> also respond with a response code equivalent to the CoAP code 4.03(Forbidden).</t> <t hangText="scope">The(Forbidden).</dd> <dt><tt>scope</tt></dt> <dd>The RS must recognize value of thescope<tt>scope</tt> claim. If that is not thecasecase, the RSMUST<bcp14>MUST</bcp14> discard the token. If this was an interaction with authz-info, the RSMUST<bcp14>MUST</bcp14> also respond with a response code equivalent to the CoAP code 4.00 (Bad Request). The RSMAY<bcp14>MAY</bcp14> provide additional information in the errorresponse,response to clarify what wentwrong.</t> </list></t>wrong.</dd> </dl> <t>Additional processing may be needed for other claims in a way specific to a profile or the underlying application.</t> <t>Note that theSubject (sub)<tt>sub</tt> (Subject) claim cannot always be verified when the token is submitted to the RS since the client may not have authenticated yet. Also note that a counter for theexpires_in (exi)<tt>exi</tt> (expires in) claimMUST<bcp14>MUST</bcp14> be initialized when the RS first verifies this token.</t> <t>Also note that profiles of this framework may define access token transport mechanisms that do not allow for error responses.ThereforeTherefore, the error messages specified here only apply if the token was sent to the authz-info endpoint.</t> <t>When sending error responses, the RSMAY<bcp14>MAY</bcp14> use the error codes fromSection 3.1 of<xreftarget="RFC6750"/>,target="RFC6750" sectionFormat="of" section="3.1"/> to provide additional details to the client.</t> </section> <section anchor="protAuthzInfo"title="Protectingnumbered="true" toc="default"> <name>Protecting the Authorization InformationEndpoint">Endpoint</name> <t>As this framework can be used in RESTful environments, it is important to make sure that attackers cannot perform unauthorized requests on the authz-info endpoints, other than submitting access tokens.</t><t>Specifically<t>Specifically, itSHOULD NOT<bcp14>SHOULD NOT</bcp14> be possible to perform GET,DELETEDELETE, or PUT on the authz-info endpoint.</t> <t>The RSSHOULD<bcp14>SHOULD</bcp14> implementrate limitingrate-limiting measures to mitigate attacks aiming to overload the processing capacity of the RS by repeatedly submitting tokens. For CoAP-basedcommunicationcommunication, the RS could use the mechanisms from <xreftarget="RFC8516"/>target="RFC8516" format="default"/> to indicate that it is overloaded.</t> </section> </section> <section anchor="requestC2RS"title="Clientnumbered="true" toc="default"> <name>Client Requests to theRS">RS</name> <t>Before sending a request to an RS, the clientMUST<bcp14>MUST</bcp14> verify that the keys used to protect this communication are still valid. See <xreftarget="keyExpiration"/>target="keyExpiration" format="default"/> for details on how the client determines the validity of the keys used.</t> <t>If an RS receives a request from aclient,client and the target resource requires authorization, the RSMUST<bcp14>MUST</bcp14> first verify that it has an access token that authorizes thisrequest,request and that the client has performed the proof-of-possession binding for that token to the request.</t> <t>The response codeMUST<bcp14>MUST</bcp14> be 4.01 (Unauthorized) in case the client has not performed theproof-of-possession,proof of possession or if the RS has no valid access token for the client. If the RS has an access token for the client but the token does not authorize access for the resource that was requested, the RSMUST<bcp14>MUST</bcp14> reject the request with a 4.03 (Forbidden). If the RS has an access token for the client but it does not cover the action that was requested on the resource, the RSMUST<bcp14>MUST</bcp14> reject the request with a 4.05 (Method Not Allowed).</t> <t>Note: The use of the response codes 4.03 and 4.05 is intended to prevent infinite loops where adumbclient optimistically tries to access a requested resource with any access token received from AS. As malicious clients could pretend to be the C to determine the C's privileges, these detailed response codes must be used only when a certain level of security is alreadyavailableavailable, which can be achieved only when the client is authenticated.</t> <t>Note: The RSMAY<bcp14>MAY</bcp14> use introspection for timely validation of an accesstoken,token at the time when a request is presented.</t> <t>Note: Matching the claims of the access token (e.g.,scope)<tt>scope</tt>) to a specific request is application specific.</t> <t>If the request matches a valid token and the client has performed theproof-of-possessionproof of possession for that token, the RS continues to process the request as specified by the underlying application.</t> </section> <section anchor="tokenExpiration"title="Token Expiration">numbered="true" toc="default"> <name>Token Expiration</name> <t>Depending on the capabilities of the RS, there are various ways in which it can verify the expiration of a received access token.Here followsThe following is a list of the possibilities including what functionality they require of the RS.</t><t><list style="symbols"> <t>The<ul spacing="normal"> <li>The token is a CWT and includes an"exp"<tt>exp</tt> claim and possibly the"nbf"<tt>nbf</tt> claim. The RS verifies these by comparing them to values from its internalclockclock, as defined in <xreftarget="RFC7519"/>.target="RFC7519" format="default"/>. In thiscasecase, the RS's internal clock must reflect the current date andtime,time or at least be synchronized with the AS's clock. How this clock synchronization would be performed is out of scope for thisspecification.</t> <t>Thespecification.</li> <li>The RS verifies the validity of the token by performing an introspectionrequestrequest, as specified in <xreftarget="introspectionEndpoint"/>.target="introspectionEndpoint" format="default"/>. This requires the RS to have a reliable network connection to the AS and to be able to handle two secure sessions in parallel (C to RS and RS toAS).</t> <t>InAS).</li> <li>In order to support token expiration for devices that have no reliable way of synchronizing their internal clocks, this specification defines the following approach: The claim"exi" ("expires in")<tt>exi</tt> (expires in) can beused,used to provide the RS with the lifetime of the token in seconds from the time the RS first receives the token. This mechanism only works for self-contained tokens,i.e.i.e., CWTs and JWTs. ForCWTsCWTs, this parameter is encoded as an unsigned integer, while JWTs encode this as JSONnumber.</t>number.</li> <li> <t> Processing this claim requires that the RS does the following:<list style="symbols"> <t>For</t> <ul spacing="normal"> <li>For each token the RSreceives,receives that contains an"exi" claim: Keep<tt>exi</tt> claim, keep track of the time it received that token and revisit that list regularly to expunge expiredtokens.</t>tokens.</li> <li> <t>Keep track of the identifiers of tokens containing the"exi"<tt>exi</tt> claim that have expired (in order to avoid accepting them again). In order to avoid an unbounded memory usage growth, thisMUST<bcp14>MUST</bcp14> be implemented in the following way when the"exi"<tt>exi</tt> claim is used:<list style="symbols"> <t>When</t> <ul spacing="normal"> <li>When creating the token, the ASMUST<bcp14>MUST</bcp14> add a'cti'<tt>cti</tt> claim( or 'jti'(or <tt>jti</tt> for JWTs) to the access token. The value of this claimMUST<bcp14>MUST</bcp14> be created as the binary representation of the concatenation of the identifier of the RS with a sequence number counting the tokens containing an'exi'<tt>exi</tt> claim, issued by this AS for theRS.</t> <t>TheRS.</li> <li>The RSMUST<bcp14>MUST</bcp14> store the highest sequence number of an expired token containing the"exi"<tt>exi</tt> claim that it hasseen,seen and treat tokens with lower sequence numbers as expired. Note that this could lead to discarding valid tokens with lower sequencenumbers,numbers if the AS where to issue tokens of different validity time for the same RS. The assumption is that typically tokens in such a scenario would all have the same validitytime.</t> </list></t> </list></t> </list></t>time.</li> </ul> </li> </ul> </li> </ul> <t>If a token that authorizes along running requestlong-running request, such as a CoAP Observe <xreftarget="RFC7641"/>target="RFC7641" format="default"/>, expires, the RSMUST<bcp14>MUST</bcp14> send an error response with the response code equivalent to the CoAP code 4.01 (Unauthorized) to the client and then terminate processing thelong runninglong-running request.</t> </section> <section anchor="keyExpiration"title="Key Expiration">numbered="true" toc="default"> <name>Key Expiration</name> <t>The AS provides the client with key material that the RS uses. This can either be a common symmetricPoP-key,PoP key or an asymmetric key used by the RS to authenticate towards the client. Since there is currently no expiration metadata associated to those keys, the client has no way of knowing if these keys are still valid. This may lead to situations where the client sends requests containing sensitive information to the RS using a key that is expired and possibly in the hands of anattacker,attacker or where the client accepts responses from the RS that are not properly protected and could possibly have been forged by an attacker. </t> <t>In order to prevent this, the client must assume that those keys are only valid as long as the related access token is. Since the access token is opaque to the client, one of the following methodsMUST<bcp14>MUST</bcp14> be used to inform the client about the validity of an access token:<list style="symbols"> <t>The</t> <ul spacing="normal"> <li>The client knows a default validity time for all tokens it is using(i.e.(i.e., how long a token is valid after being issued). This information could be provisioned to the client when it is registered at theAS,AS or published by the AS in a way that the client canquery.</t> <t>Thequery.</li> <li>The AS informs the client about the token validity using the"expires_in"<tt>expires_in</tt> parameter in the AccessInformation.</t> </list> </t>Information.</li> </ul> <t>A client that is not able to obtain information about the expiration of a tokenMUST NOT<bcp14>MUST NOT</bcp14> use this token.</t> </section></section><!-- access token --></section><!--Framework--></section> <section anchor="security"title="Security Considerations">numbered="true" toc="default"> <name>Security Considerations</name> <t>Security considerations applicable to authentication and authorization in RESTful environments provided in OAuth 2.0 <xreftarget="RFC6749"/>target="RFC6749" format="default"/> apply to this work.FurthermoreFurthermore, <xreftarget="RFC6819"/>target="RFC6819" format="default"/> provides additional security considerations forOAuthOAuth, which apply to IoT deployments as well. If the introspection endpoint is used, the security considerations from <xreftarget="RFC7662"/>target="RFC7662" format="default"/> also apply.</t> <t>The following subsections address issues specific to this document andit'sits use in constrained environments.</t> <section anchor="tokenProtection"title="Protecting Tokens">numbered="true" toc="default"> <name>Protecting Tokens</name> <t>A large range of threats can be mitigated by protecting the contents of the access token by using a digital signature or a keyed messagedigestdigest, e.g., a Message Authentication Code (MAC) or an Authenticated Encryption with Associated Data (AEAD) algorithm. Consequently, the token integrity protectionMUST<bcp14>MUST</bcp14> be applied to prevent the token from being modified, particularly since it contains a reference to the symmetric key or the asymmetric key used forproof-of-possession.proof of possession. If the access token contains the symmetric key, this symmetric keyMUST<bcp14>MUST</bcp14> be encrypted by the authorization server so that only the resource server can decrypt it. Note that using an AEAD algorithm is preferable over using a MAC unless the token needs to be publicly readable.</t> <t>If the token is intended for multiple recipients(i.e.(i.e., an audience that is a group), integrity protection of the token with a symmetric key, shared between the AS and the recipients, is not sufficient, since any of the recipients could modify the token undetected by the other recipients.ThereforeTherefore, a token with amulti-recipientmultirecipient audienceMUST<bcp14>MUST</bcp14> be protected with an asymmetricsignature. </t>signature.</t> <t>It is important for the authorization server to include the identity of the intended recipient (the audience), typically a single resource server (or a list of resource servers), in the token. The same shared secretMUST NOT<bcp14>MUST NOT</bcp14> be used as a proof-of-possession key with multiple resourceserversservers, since the benefit from using the proof-of-possession concept is then significantly reduced.</t> <t>If clients are capable of doing so, they should frequently request fresh access tokens, as this allows the AS to keep the lifetime of the tokens short. This allows the AS to use shorter proof-of-possession key sizes, which translate to a performance benefit for the client and for the resource server. Shorter keys also lead to shorter messages (particularly with asymmetric keying material).</t> <t>When authorization servers bind symmetric keys to access tokens, theySHOULD<bcp14>SHOULD</bcp14> scope these access tokens to a specific permission.</t> <t>In certainsituationssituations, it may be necessary to revoke an access token that is still valid. Client-initiated revocation is specified in <xreftarget="RFC7009"/>target="RFC7009" format="default"/> for OAuth 2.0. Other revocation mechanisms are currently not specified, as the underlying assumption in OAuth is that access tokens are issued with a relatively short lifetime. This may not hold true for disconnected constraineddevices,devices needing access tokens with relatively longlifetimes,lifetimes and would therefore necessitate further standardization work that is out of scope for this document.</t></section><!--token protection--></section> <section anchor="commSec"title="Communication Security">numbered="true" toc="default"> <name>Communication Security</name> <t>Communication with the authorization serverMUST<bcp14>MUST</bcp14> use confidentiality protection. This step is extremely important since the client or the RS may obtain the proof-of-possession key from the authorization server for use with a specific access token. Not using confidentiality protection exposes this secret (and the access token) to aneavesdroppereavesdropper, thereby completely negating proof-of-possession security. The requirements for communication security of profiles are specified in <xreftarget="oauthProfile"/>.</t>target="oauthProfile" format="default"/>.</t> <t>Additional protection for the access token can be applied by encrypting it, forexampleexample, encryption of CWTs is specified inSection 5.1 of<xreftarget="RFC8392"/>.target="RFC8392" sectionFormat="of" section="7.1"/>. Such additional protection can be necessary if the token is later transferred over an insecure connection(e.g.(e.g., when it is sent to the authz-info endpoint).</t> <t>Care mustbybe taken by developers to prevent leakage of the PoP credentials (i.e., the private key or the symmetric key). An adversary in possession of the PoP credentials bound to the access token will be able to impersonate the client. Be aware that this is a real risk with many constrained environments, since adversaries may get physical access to the devices and can therefore use physical extraction techniques to gain access to memory contents. This risk can be mitigated to some extent by making sure that keys are refreshed frequently, by using software isolationtechniquestechniques, and by using hardware security.</t></section><!--communication security--></section> <section anchor="keys"title="Long-Term Credentials">numbered="true" toc="default"> <name>Long-Term Credentials</name> <t>Both the clients and RSs have long-term credentials that are used to securecommunications,communications and authenticate to the AS. These credentials need to be protected against unauthorized access. In constraineddevices,devices deployed in publicly accessible places, such protection can be difficult to achieve without specialized hardware(e.g.(e.g., secure key storage memory).</t> <t>If credentials are lost or compromised, the operator of the affected devices needs to have procedures to invalidate any access these credentials give and needs to revoke tokens linked to such credentials. The loss of a credential linked to a specific deviceMUST NOT<bcp14>MUST NOT</bcp14> lead to a compromise of other credentials not linked to thatdevice, thereforedevice; therefore, secret keys used for authenticationMUST NOT<bcp14>MUST NOT</bcp14> be shared between more than two parties.</t> <t>Operators of the clients orRS SHOULDRSs <bcp14>SHOULD</bcp14> have procedures in place to replace credentials that are suspected to have been compromised or that have been lost.</t> <t>Operators alsoSHOULD<bcp14>SHOULD</bcp14> have procedures for decommissioningdevices,devices that include securely erasing credentials and othersecurity criticalsecurity-critical material in the devices being decommissioned.</t></section><!--credential livecycle--></section> <section anchor="unprotected-as-information"title="Unprotectednumbered="true" toc="default"> <name>Unprotected AS Request CreationHints">Hints</name> <t>Initially, no secure channel exists to protect the communication between the C and RS. Thus, the C cannot determine if the"ASAS Request CreationHints"Hints contained in an unprotected response from the RS to an unauthorized request (see <xreftarget="asInfo"/>)target="asInfo" format="default"/>) are authentic. Therefore, the Ctherefore MUST<bcp14>MUST</bcp14> determine if an AS is authorized to provide access tokens for a certain RS. How this determination is implemented is out of scope for this document and left to the applications.</t> </section> <section anchor="minimalCommSecReq"title="Minimalnumbered="true" toc="default"> <name>Minimal Security Requirements forCommunication">Communication</name> <t>This section summarizes the minimal requirements for the communication security of the different protocol interactions.<list style="hanging"> <t hangText="C-AS">All</t> <dl newline="true" spacing="normal"> <dt>C-AS</dt> <dd>All communication between the client and theAuthorization Server MUSTauthorization server <bcp14>MUST</bcp14> beencrypted,encrypted and integrity and replay protected.FurthermoreFurthermore, responses from the AS to the clientMUST<bcp14>MUST</bcp14> be bound to the client's request to avoid attacks where the attacker swaps the intended response for an older one valid for a previous request. This requires that the client and theAuthorization Serverauthorization server have previously exchanged either a shared secret or their public keys in order to negotiate a secure communication.FurthermoreFurthermore, the clientMUST<bcp14>MUST</bcp14> be able to determine whether an AS has the authority to issue access tokens for a certain RS. Thiscancan, forexampleexample, be done throughpre-configured lists,preconfigured lists or through an online lookup mechanism that in turn also must be secured.</t> <t hangText="RS-AS">The</dd> <dt>RS-AS</dt> <dd>The communication between theResource Serverresource server and theAuthorization Serverauthorization server via the introspection endpointMUST<bcp14>MUST</bcp14> beencrypted,encrypted and integrity and replay protected.FurthermoreFurthermore, responses from the AS to the RSMUST<bcp14>MUST</bcp14> be bound to the RS's request. This requires that the RS and theAuthorization Serverauthorization server have previously exchanged either a sharedsecret,secret or their public keys in order to negotiate a secure communication.FurthermoreFurthermore, the RSMUST<bcp14>MUST</bcp14> be able to determine whether an AS has the authority to issue access tokens itself. This is usually configured out ofband,band but could also be performed through an online lookupmechanismmechanism, provided that it is also secured in the sameway.</t> <t hangText="C-RS">Theway.</dd> <dt>C-RS</dt> <dd>The initial communication between the client and theResource Server can notresource server cannot be secured in general, since the RS is not in possession of on access token for that client, which would carry the necessary parameters. If both parties support DTLS without clientauthenticationauthentication, it isRECOMMEND<bcp14>RECOMMENDED</bcp14> to use this mechanism for protecting the initial communication. After the client has successfully transmitted the access token to the RS, a secure communication protocolMUST<bcp14>MUST</bcp14> be established between the client and RS for the actual resource request. This protocolMUST<bcp14>MUST</bcp14> provide confidentiality,integrityintegrity, and replayprotectionprotection, as well as a binding between requests and responses. This requires that the client learned either the RS's public key or received a symmetric proof-of-possession key bound to the access token from the AS. The RS must have learned either the client's publickey orkey, a shared symmetric key from the claims in thetokentoken, or an introspection request. Since ACE does not provide profile negotiation between the C and RS, the clientMUST<bcp14>MUST</bcp14> have learned what profile the RS supports(e.g.(e.g., from the AS orpre-configured)preconfigured) andinitiateinitiated the communicationaccordingly.</t> </list></t>accordingly.</dd> </dl> </section> <section anchor="nonce"title="Tokennumbered="true" toc="default"> <name>Token Freshness andExpiration">Expiration</name> <t>An RS that is offline faces the problem of clock drift. Since it cannot synchronize its clock with the AS, it may be tricked into accepting old access tokens that are no longer valid or have been compromised. In order to prevent this, an RS may use the nonce-based mechanism(cnonce)(<tt>cnonce</tt>) defined in <xreftarget="asInfo"/>target="asInfo" format="default"/> to ensure freshness of an Access Token subsequently presented to this RS.</t> <t>Another problem with clock drift is that evaluating the standard token expiration claim"exp"<tt>exp</tt> can give unpredictable results. </t> <t>Acceptable ranges of clock drift are highly dependent on the concrete application. Important factors are how long access tokens arevalid,valid and how critical timely expiration of the access token is.</t> <t>The expiration mechanism implemented by the"exi"<tt>exi</tt> claim, based on the first time the RS sees thetokentoken, was defined to provide a more predictable alternative. The"exi"<tt>exi</tt> approach has some drawbacks that need to be considered:<list> <t>A</t> <ul spacing="normal"> <li>A malicious client may hold back tokens with the"exi"<tt>exi</tt> claim in order to prolong theirlifespan.</t> <t>Iflifespan.</li> <li> If an RS loses state(e.g.(e.g., due to an unscheduled reboot), it may lose the current values of counters tracking the"exi"<tt>exi</tt> claims of tokens it isstoring.</t> </list>storing.</li> </ul> <t> The first drawback is inherent to the deployment scenario and the"exi"<tt>exi</tt> solution. It can therefore not be mitigated without requiring the RS be online at times. The second drawback can be mitigated by regularly storing the value of"exi"<tt>exi</tt> counters to persistent memory.</t> </section> <section anchor="mixnmatch"title="Combining Profiles">numbered="true" toc="default"> <name>Combining Profiles</name> <t>There may be use cases where different transport and security protocols are allowed for the different interactions, and, if that is not explicitly covered by an existing profile, it corresponds to combining profiles into a new one. For example, a new profile could specify that apreviously-definedpreviously defined MQTT-TLS profile is used between the client and the RS in combination with apreviously-definedpreviously defined CoAP-DTLS profile for interactions between the client and the AS. The new profile that combines existing profilesMUST<bcp14>MUST</bcp14> specify how the existing profiles' securityproperties are achieved. Anyrequirements remain satisfied. Therefore, any profiletherefore MUST<bcp14>MUST</bcp14> clearly specify its security requirements andMUST<bcp14>MUST</bcp14> document if its security depends on the combination of various protocol interactions.</t> </section> <section anchor="infoLeak"title="Unprotected Information">numbered="true" toc="default"> <name>Unprotected Information</name> <t>Communication with the authz-info endpoint, as well as the various error responses defined in this framework,allpotentiallyincludeincludes sending information over an unprotected channel. These messages may leak information to anadversary,adversary or may be manipulated by active attackers to induce incorrect behavior. Forexampleexample, error responses for requests to theAuthorization Informationauthorization information endpoint can reveal information about an otherwise opaque access token to an adversary who has intercepted this token.</t> <t>As far as error messages are concerned, this framework is written under the assumption that, in general, the benefits of detailed error messages outweigh the risk due to information leakage. For particular usecases,cases where this assessment does not apply, detailed error messages can be replaced by more generic ones.</t> <t>In somescenariosscenarios, it may be possible to protect the communication with the authz-info endpoint(e.g.(e.g., through DTLS with only server-side authentication). In cases where this is not possible, it isRECOMMENDED<bcp14>RECOMMENDED</bcp14> to use encrypted CWTs or tokens that are opaque references and need to be subjected to introspection by the RS.</t> <t>If the initialunauthorized resource requestUnauthorized Resource Request message (see <xreftarget="rreq"/>)target="rreq" format="default"/>) is used, the clientMUST<bcp14>MUST</bcp14> make sure that it is not sending sensitive content in this request. While GET and DELETE requests only reveal the target URI of the resource, POST and PUT requests would reveal the whole payload of the intended operation.</t> <t>Since the client is not authenticated at the point when it is submitting an access token to the authz-info endpoint, attackers may be pretending to be a client and trying to trick an RS to use an obsolete profile that in turn specifies a vulnerable security mechanism via the authz-info endpoint. Such an attack would require a valid access token containing an"ace_profile"<tt>ace_profile</tt> claim requesting the use of said obsolete profile. ResourceOwnersowners should update the configuration of theirRS'sRSs to prevent them from using such obsolete profiles.</t> </section> <section anchor="audience"title="Identifying Audiences">numbered="true" toc="default"> <name>Identifying Audiences</name> <t>Theaudience claim<tt>aud</tt> claim, as defined in <xreftarget="RFC7519"/>target="RFC7519" format="default"/>, and the equivalent"audience"<tt>audience</tt> parameter from <xreftarget="RFC8693"/>target="RFC8693" format="default"/> are intentionally vague on how to match the audience value to a specific RS. This is intended to allowapplication specificapplication-specific semantics to be used. This section attempts to give some general guidance for the use of audiences in constrained environments.</t> <t>URLs are not a good way of identifying mobile devices that can switch networks and thus be associated with new URLs. If the audience represents a singleRS,RS and asymmetric keys are used, the RS can be uniquely identified by a hash of its public key. If this approach isusedused, it isRECOMMENDED<bcp14>RECOMMENDED</bcp14> to apply the procedure fromsection 3 of<xreftarget="RFC6920"/>.</t>target="RFC6920" sectionFormat="of" section="3"/>.</t> <t>If the audience addresses a group of resource servers, the mapping of a group identifier to an individual RS has to be provisioned to each RS before the group-audience is usable. Managing dynamic groups could be anissue,issue if any RS is not always reachable when the groups' memberships change. Furthermore, issuing access tokens bound to symmetric proof-of-possession keys that apply to a group-audience is problematic, as an RS that is in possession of the access token can impersonate the client towards the other RSs that are part of the group. It is thereforeNOT RECOMMENDED<bcp14>NOT RECOMMENDED</bcp14> to issue access tokens bound to agroup audiencegroup-audience and symmetric proof-of possession keys.</t> <t>Even the client must be able to determine the correct values to put into the"audience" parameter,<tt>audience</tt> parameter in order to obtain a token for the intended RS. Errors in this process can lead to the client inadvertently obtaining a token for the wrong RS. The correct values for"audience"<tt>audience</tt> can either be provisioned to the client as part of itsconfiguration,configuration or dynamically looked up by the client in some directory. In the lattercasecase, the integrity and correctness of the directory data must be assured. Note that the"audience"<tt>audience</tt> hint provided by the RS as part of the"ASAS Request CreationHints" <xref target="asInfo"/>Hints (<xref target="asInfo" format="default"/>) is not typically source authenticated and integrityprotected,protected and should therefore not be treated a trusted value.</t> </section> <section anchor="introDos"title="Denialnumbered="true" toc="default"> <name>Denial of Service Against or withIntrospection">Introspection</name> <t> The optional introspection mechanism provided by OAuth and supported in the ACE framework allows for two types of attacks that need to be considered by implementers.</t> <t>First, an attacker could perform adenial of servicedenial-of-service attack against the introspection endpoint at the AS in order to prevent validation of access tokens. To maintain the security of the system, an RS that is configured to use introspectionMUST NOT<bcp14>MUST NOT</bcp14> allow access based on a token for which it couldn't reach the introspection endpoint.</t> <t>Second, an attacker could use the fact that an RS performs introspection to perform adenial of servicedenial-of-service attack against that RS by repeatedly sending tokens to its authz-info endpoint that require an introspection call. The RS can mitigate such attacks by implementing rate limits on how many introspection requests they perform in a given time interval for a certain client IP address submitting tokens to /authz-info. When that limit has been reached, incoming requests from that address are rejected for a certain amount of time. A general rate limit on the introspection requests should also beconsidered,considered in order to mitigate distributed attacks.</t> </section> </section> <section anchor="privacy"title="Privacy Considerations">numbered="true" toc="default"> <name>Privacy Considerations</name> <t>Implementers and users should be aware of the privacy implications of the different possible deployments of this framework.</t> <t>The AS is in a very central position and can potentially learn sensitive information about the clients requesting access tokens. If the client credentials grant is used, the AS can track what kind of access the client intends to perform. With othergrantsgrants, this can be prevented by theResource Owner.resource owner. To do so, the resource owner needs to bind the grants it issues to anonymous, ephemeral credentials that do not allow the AS to link different grants and thus different access token requests by the same client.</t> <t>The claims contained in a token can revealprivacy sensitiveprivacy-sensitive information about the client and the RS to any party having access to them (whether by processing the content of a self-contained token or by introspection). The ASSHOULD<bcp14>SHOULD</bcp14> be configured to minimize the information about clients and RSs disclosed in the tokens it issues.</t> <t>If tokens are only integrity protected and not encrypted, they may reveal information to attackers listening on thewire,wire or be able to acquire the access tokens in some other way. In the case ofCWTsCWTs, the token may, e.g., reveal the audience, thescopescope, and the confirmation method used by the client. The latter may reveal the identity of the device or application running the client. This may be linkable to the identity of the person using the client (if there is a person and not a machine-to-machine interaction).</t> <t>Clients using asymmetric keys forproof-of-possessionproof of possession should be aware of the consequences of using the same key pair forproof-of-possessionproof of possession towards different RSs. A set of colluding RSs or an attacker able to obtain the access tokens will be able to link therequests,requests or even to determine the client's identity.</t> <t>An unprotected response to an unauthorized request (see <xreftarget="asInfo"/>)target="asInfo" format="default"/>) may disclose information about the RS and/or its existing relationship with the C. It is advisable to include as little information as possible in an unencrypted response. Even the absolute URI of the AS may reveal sensitive information about the service that the RS provides. Developers must ensure that the RS does not disclose information that has an impact on the privacy of the stakeholders in the"ASAS Request CreationHints".Hints. They may choose to use a different mechanism for the discovery of the AS if necessary. If means of encrypting communication between the C and RS already exist, more detailed information may be included with an error response to provide the C with sufficient information to react on that particular error.</t> </section> <section anchor="iana"title="IANA Considerations">numbered="true" toc="default"> <name>IANA Considerations</name> <t>This document creates several registries with a registration policy of"Expert Review";Expert Review; guidelines to the experts are given in <xreftarget="IANAinstructions"/>.</t>target="IANAinstructions" format="default"/>.</t> <section anchor="IANAASInformation"title="ACEnumbered="true" toc="default"> <name>ACE Authorization Server Request CreationHints">Hints</name> <t>This specification establishes the IANA "ACE Authorization Server Request Creation Hints"registry. The registry has been created to use the "Expert Review" registration procedure <xref target="RFC8126"/>. It should be noted that, in addition to the expert review, some portions of the registry require a specification, potentially a Standards Track RFC, be supplied as well.</t>registry.</t> <t>The columns of the registryare: <list style='hanging'> <t hangText='Name'>Theare:</t> <dl newline="false"> <dt>Name:</dt> <dd>The name of theparameter</t> <t hangText='CBOR Key'>CBORparameter.</dd> <dt>CBOR Key:</dt> <dd>CBOR map key for the parameter. Different ranges of values use different registration policies <xreftarget="RFC8126"/>.target="RFC8126" format="default"/>. Integer values from -256 to 255 are designated as Standards Action. 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 PrivateUse.</t> <t hangText='Value Type'>TheUse.</dd> <dt>Value Type:</dt> <dd>The CBOR data types allowable for the values of thisparameter.</t> <t hangText='Reference'>Thisparameter.</dd> <dt>Reference:</dt> <dd>This contains a pointer to the public specification of therequest creation hintRequest Creation Hint abbreviation, if oneexists.</t> </list></t>exists.</dd> </dl> <t>This registrywill behas been initially populated by the values in <xreftarget="fig:asinfo"/>.target="table_asinfo"/>. The Reference column for all of these entrieswill beis this document.</t> </section> <section anchor="IANAcoreRT"title="CoREnumbered="true" toc="default"> <name>CoRE ResourceType Registry">Types</name> <t>IANAis requested to registerhas registered a new Resource Type (rt=) Link Target Attribute in the "Resource Type (rt=) Link Target Attribute Values" subregistry under the "Constrained RESTful Environments (CoRE) Parameters" <xreftarget="IANA.CoreParameters"/>target="IANA.CoreParameters" format="default"/> registry:</t><t><?rfc subcompact="yes"?> <list style='symbols'> <t>Value: <spanx style="verb">ace.ai</spanx></t> <t>Description: ACE-OAuth<dl newline="false" spacing="compact"> <dt>Value:</dt> <dd><tt>ace.ai</tt></dd> <dt>Description:</dt> <dd>ACE-OAuth authz-info endpointresource.</t> <t>Reference: [this document]</t> </list></t>resource.</dd> <dt>Reference:</dt> <dd>RFC 9200</dd> </dl> <t>Specific ACE-OAuth profiles can use this common resource type for defining their profile-specific discovery processes.</t> </section> <section anchor="IANAOAuthErrorCodes"title="OAuthnumbered="true" toc="default"> <name>OAuth ExtensionsError Registration">Errors</name> <t>This specification registers the following error values in theOAuth"OAuth Extensions ErrorregistryRegistry" <xreftarget="IANA.OAuthExtensionsErrorRegistry"/>.</t> <t><?rfc subcompact="yes"?> <list style='symbols'> <t>Error name: <spanx style="verb">unsupported_pop_key</spanx></t> <t>Error usage location: tokentarget="IANA.OAuthExtensionsErrorRegistry" format="default"/>.</t> <dl newline="false" spacing="compact"> <dt>Name:</dt> <dd><tt>unsupported_pop_key</tt></dd> <dt>Usage Location:</dt> <dd>token errorresponse</t> <t>Related protocol extension: [this document]</t> <t>Change Controller: IESG</t> <t>Specification document(s): <xref target="errorsToken"/> of [this document]</t> </list></t> <t><?rfc subcompact="yes"?> <list style='symbols'> <t>Error name: <spanx style="verb">incompatible_ace_profiles</spanx></t> <t>Error usage location: tokenresponse</dd> <dt>Protocol Extension:</dt> <dd>RFC 9200</dd> <dt>Change Controller:</dt> <dd>IETF</dd> <dt>Reference:</dt> <dd><xref target="errorsToken" format="default"/> of RFC 9200</dd> </dl> <dl newline="false" spacing="compact"> <dt>Name:</dt> <dd><tt>incompatible_ace_profiles</tt></dd> <dt>Usage Location:</dt> <dd>token errorresponse</t> <t>Related protocol extension: [this document]</t> <t>Change Controller: IESG</t> <t>Specification document(s): <xref target="errorsToken"/> of [this document]</t> </list></t>response</dd> <dt>Protocol Extension:</dt> <dd>RFC 9200</dd> <dt>Change Controller:</dt> <dd>IETF</dd> <dt>Reference:</dt> <dd><xref target="errorsToken" format="default"/> of RFC 9200</dd> </dl> </section> <section anchor="IANAErrorCBORMappings"title="OAuthnumbered="true" toc="default"> <name>OAuth Error Code CBORMappings Registry">Mappings</name> <t>This specification establishes the IANA "OAuth Error Code CBOR Mappings"registry. The registry has been created to use the "Expert Review" registration procedure <xref target="RFC8126"/>, except for the value range designated for private use.</t>registry.</t> <t>The columns of the registryare: <list style='hanging'> <t hangText='Name'>Theare:</t> <dl newline="false"> <dt>Name:</dt> <dd>The OAuth Error Code name, refers to the name inSection 5.2. of<xreftarget="RFC6749"/>,target="RFC6749" sectionFormat="of" section="5.2"/>, e.g.,"invalid_request".</t> <t hangText='CBOR Value'>CBOR"invalid_request".</dd> <dt>CBOR Value:</dt> <dd>CBOR abbreviation for this error code. Integer values less than -65536 are marked as"Private Use",Private Use; all other values use the registration policy"Expert Review"Expert Review <xreftarget="RFC8126"/>.</t> <t hangText='Reference'>Thistarget="RFC8126" format="default"/>.</dd> <dt>Reference:</dt> <dd>This contains a pointer to the public specification of the error code abbreviation, if oneexists.</t> </list></t>exists.</dd> <dt>Original Specification:</dt> <dd>This contains a pointer to the public specification of the error code, if one exists.</dd> </dl> <t>This registrywill behas been initially populated by the values in <xreftarget="fig:cborErrorCodes"/>.target="table_cborErrorCodes"/>. The Reference column for all of these entrieswill beis this document.</t> </section> <section anchor="IANAGrantTypeMappings"title="OAuthnumbered="true" toc="default"> <name>OAuth Grant Type CBORMappings">Mappings</name> <t>This specification establishes the IANA "OAuth Grant Type CBOR Mappings"registry. The registry has been created to use the "Expert Review" registration procedure <xref target="RFC8126"/>, except for the value range designated for private use. </t>registry.</t> <t>The columns of this registryare: <list style='hanging'> <t hangText='Name'>Theare:</t> <dl newline="false"> <dt>Name:</dt> <dd>The name of the granttypetype, as specified inSection 1.3 of<xreftarget="RFC6749"/>.</t> <t hangText='CBOR Value'>CBORtarget="RFC6749" sectionFormat="of" section="1.3"/>.</dd> <dt>CBOR Value:</dt> <dd>CBOR abbreviation for this grant type. Integer values less than -65536 are marked as"Private Use",Private Use; all other values use the registration policy"Expert Review"Expert Review <xreftarget="RFC8126"/>.</t> <t hangText='Reference'>Thistarget="RFC8126" format="default"/>.</dd> <dt>Reference:</dt> <dd>This contains a pointer to the public specification of the grant type abbreviation, if oneexists.</t> <t hangText='Original Specification'>Thisexists.</dd> <dt>Original Specification:</dt> <dd>This contains a pointer to the public specification of the grant type, if oneexists.</t> </list></t>exists.</dd> </dl> <t>This registrywill behas been initially populated by the values in <xreftarget="fig:grant_types"/>.target="table_grant_types"/>. The Reference column for all of these entrieswill beis this document.</t> </section> <section anchor="IANAOAuthTokenType"title="OAuthnumbered="true" toc="default"> <name>OAuth Access TokenTypes">Types</name> <t>This section registers the following new token type in the "OAuth Access Token Types" registry <xreftarget="IANA.OAuthAccessTokenTypes"/>.</t> <t><?rfc subcompact="yes"?> <list style='symbols'> <t>Type name: <spanx style="verb">PoP</spanx></t> <t>Additionaltarget="IANA.OAuthAccessTokenTypes" format="default"/>.</t> <dl newline="false" spacing="compact"> <dt>Name:</dt> <dd><tt>PoP</tt></dd> <dt>Additional Token Endpoint ResponseParameters: "cnf", "rs_cnf" see section 3.3 ofParameters:</dt> <dd><tt>cnf</tt>, <tt>rs_cnf</tt> (see <xref target="RFC8747" sectionFormat="of" section="3.1"/> and <xreftarget="I-D.ietf-ace-oauth-params"/>.</t> <t>HTTPtarget="RFC9201" sectionFormat="of" section="3.2"/>).</dd> <dt>HTTP AuthenticationScheme(s): N/A</t> <t>Change Controller: IETF</t> <t>Specification document(s): [this document]</t> </list></t>Scheme(s):</dt> <dd>N/A</dd> <dt>Change Controller:</dt> <dd>IETF</dd> <dt>Reference:</dt> <dd>RFC 9200</dd> </dl> </section> <section anchor="IANATokenTypeMappings"title="OAuthnumbered="true" toc="default"> <name>OAuth Access Token Type CBORMappings">Mappings</name> <t>This specificationestablishedestablishes the IANA "OAuth Access Token Type CBOR Mappings"registry. The registry has been created to use the "Expert Review" registration procedure <xref target="RFC8126"/>, except for the value range designated for private use. </t>registry.</t> <t>The columns of this registryare: <list style='hanging'> <t hangText='Name'>Theare:</t> <dl newline="false"> <dt>Name:</dt> <dd>The name of the tokentypetype, as registered in theOAuth"OAuth Access TokenTypesTypes" registry, e.g.,"Bearer".</t> <t hangText='CBOR Value'>CBOR"Bearer".</dd> <dt>CBOR Value:</dt> <dd>CBOR abbreviation for this token type. Integer values less than -65536 are marked as"Private Use",Private Use; all other values use the registration policy"Expert Review"Expert Review <xreftarget="RFC8126"/>.</t> <t hangText='Reference'>Thistarget="RFC8126" format="default"/>.</dd> <dt>Reference:</dt> <dd>This contains a pointer to the public specification of the OAuth token type abbreviation, if oneexists.</t> <t hangText='Original Specification'>Thisexists.</dd> <dt>Original Specification:</dt> <dd>This contains a pointer to the public specification of the OAuth token type, if oneexists.</t> </list></t>exists.</dd> </dl> <section anchor="IANATokenTypeMappingsInitial"title="Initialnumbered="true" toc="default"> <name>Initial RegistryContents"> <t> <?rfc subcompact="yes"?> <list style='symbols'> <t>Name: <spanx style="verb">Bearer</spanx></t> <t>Value: 1</t> <t>Reference: [this document]</t> <t>Original Specification: <xref target="RFC6749"/></t> </list> </t> <t> <?rfc subcompact="yes"?> <list style='symbols'> <t>Name: <spanx style="verb">PoP</spanx></t> <t>Value: 2</t> <t>Reference: [this document]</t> <t>Original Specification: [this document]</t> </list> </t>Contents</name> <dl newline="false" spacing="compact"> <dt>Name:</dt> <dd><tt>Bearer</tt></dd> <dt>CBOR Value:</dt> <dd>1</dd> <dt>Reference:</dt> <dd>RFC 9200</dd> <dt>Original Specification:</dt> <dd><xref target="RFC6749" format="default"/></dd> </dl> <dl newline="false" spacing="compact"> <dt>Name:</dt> <dd><tt>PoP</tt></dd> <dt>CBOR Value:</dt> <dd>2</dd> <dt>Reference:</dt> <dd>RFC 9200</dd> <dt>Original Specification:</dt> <dd>RFC 9200</dd> </dl> </section> </section> <section anchor="IANAProfile"title="ACE Profile Registry">numbered="true" toc="default"> <name>ACE Profiles</name> <t>This specification establishes the IANA "ACE Profile" registry.The registry has been created to use the "Expert Review" registration procedure <xref target="RFC8126"/>. It should be noted that, in addition to the expert review, some portions of the registry require a specification, potentially a Standards Track RFC, be supplied as well.</t></t> <t>The columns of this registryare: <list style='hanging'> <t hangText='Name'>are:</t> <dl newline="false"> <dt>Name:</dt> <dd> The name of theprofile,profile to be used as the value of the profileattribute.</t> <t hangText='Description'>attribute.</dd> <dt>Description:</dt> <dd> Text giving an overview of the profile and the context it is developedfor.</t> <t hangText='CBOR Value'>CBORfor.</dd> <dt>CBOR Value:</dt> <dd>CBOR abbreviation for this profile name. Different ranges of values use different registration policies <xreftarget="RFC8126"/>.target="RFC8126" format="default"/>. Integer values from -256 to 255 are designated as Standards Action. 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".Expert Review. Integer values less than -65536 are marked as PrivateUse.</t> <t hangText='Reference'>ThisUse.</dd> <dt>Reference:</dt> <dd>This contains a pointer to the public specification of the profile abbreviation, if oneexists.</t> </list></t> <t>This registry will be initially empty and will be populated by the registrations from the ACE framework profiles.</t>exists.</dd> </dl> </section> <section anchor="IANAOAuthParameter"title="OAuth Parameter Registration">numbered="true" toc="default"> <name>OAuth Parameters</name> <t>This specification registers the following parameter in the "OAuth Parameters" registry <xreftarget="IANA.OAuthParameters"/>:</t> <t><?rfc subcompact="yes"?> <list style='symbols'> <t>Name: <spanx style="verb">ace_profile</spanx></t> <t>Parametertarget="IANA.OAuthParameters" format="default"/>:</t> <dl newline="false" spacing="compact"> <dt>Name:</dt> <dd><tt>ace_profile</tt></dd> <dt>Parameter UsageLocation: token response</t> <t>Change Controller: IESG</t> <t>Reference:Location:</dt> <dd>token response</dd> <dt>Change Controller:</dt> <dd>IETF</dd> <dt>Reference:</dt> <dd>Sections <xreftarget="tokenResponse"/>target="tokenResponse" format="counter"/> and <xreftarget="paramProfile"/>target="paramProfile" format="counter"/> of[this document]</t> </list></t>RFC 9200</dd> </dl> </section> <section anchor="IANAOAuthParameterMappingsRegistry"title="OAuthnumbered="true" toc="default"> <name>OAuth Parameters CBORMappings Registry">Mappings</name> <t>This specification establishes the IANA "OAuth Parameters CBOR Mappings"registry. The registry has been created to use the "Expert Review" registration procedure <xref target="RFC8126"/>, except for the value range designated for private use.</t>registry.</t> <t>The columns of this registryare: <list style='hanging'> <t hangText='Name'>Theare:</t> <dl newline="false"> <dt>Name:</dt> <dd>The OAuth Parameter name, refers to the name in the OAuth parameter registry, e.g.,"client_id".</t> <t hangText='CBOR Key'>CBOR<tt>client_id</tt>.</dd> <dt>CBOR Key:</dt> <dd>CBOR map key for this parameter. Integer values less than -65536 are marked as"Private Use",Private Use; all other values use the registration policy"Expert Review"Expert Review <xreftarget="RFC8126"/>.</t> <t hangText='Value Type'>Thetarget="RFC8126" format="default"/>.</dd> <dt>Value Type:</dt> <dd>The allowable CBOR data types for values of thisparameter.</t> <t hangText='Reference'>Thisparameter.</dd> <dt>Reference:</dt> <dd>This contains a pointer to the public specification of the OAuth parameter abbreviation, if oneexists.</t> </list></t>exists.</dd> <dt>Original Specification</dt> <dd>This contains a pointer to the public specification of the OAuth parameter, if one exists.</dd> </dl> <t>This registrywill behas been initially populated by the values in <xreftarget="fig:cborTokenParameters"/>.target="table_cborTokenParameters"/>. The Reference column for all of these entrieswill beis this document.</t> </section> <section anchor="IANAOAuthIntrospectionResponseParameterRegistration"title="OAuthnumbered="true" toc="default"> <name>OAuth Introspection ResponseParameter Registration">Parameters</name> <t>This specification registers the following parameters in theOAuth"OAuth Token IntrospectionResponseResponse" registry <xreftarget="IANA.TokenIntrospectionResponse"/>.</t> <t> <?rfc subcompact="yes"?> <list style='symbols'> <t>Name: <spanx style="verb">ace_profile</spanx></t> <t>Description: Thetarget="IANA.TokenIntrospectionResponse" format="default"/>.</t> <dl newline="false" spacing="compact"> <dt>Name:</dt> <dd><tt>ace_profile</tt></dd> <dt>Description:</dt> <dd>The ACE profile used between the client andRS.</t> <t>Change Controller: IESG</t> <t>Reference: <xref target="introRes"/> of [this document]</t> </list> </t> <t> <?rfc subcompact="yes"?> <list style='symbols'> <t>Name: <spanx style="verb">cnonce</spanx></t> <t>Description: "client-nonce".RS.</dd> <dt>Change Controller:</dt> <dd>IETF</dd> <dt>Reference:</dt> <dd> <xref target="introRes" format="default"/> of RFC 9200</dd> </dl> <dl newline="false" spacing="compact"> <dt>Name:</dt> <dd><tt>cnonce</tt></dd> <dt>Description:</dt> <dd>"client-nonce". A nonce previously provided to the AS by the RS via the client. Used to verify token freshness when the RS cannot synchronize its clock with theAS.</t> <t>Change Controller: IESG</t> <t>Reference: <xref target="introRes"/> of [this document]</t> </list> </t> <t> <?rfc subcompact="yes"?> <list style='symbols'> <t>Name: <spanx style="verb">exi</spanx></t> <t>Description: "ExpiresAS.</dd> <dt>Change Controller:</dt> <dd>IETF</dd> <dt>Reference:</dt> <dd><xref target="introRes" format="default"/> of RFC 9200</dd> </dl> <dl newline="false" spacing="compact"> <dt>Name</dt> <dd><tt>cti</tt></dd> <dt>Description</dt> <dd>"CWT ID". The identifier of a CWT as defined in <xref target="RFC8392" format="default"/>.</dd> <dt>Change Controller</dt> <dd>IETF</dd> <dt>Reference</dt> <dd><xref target="introRes" format="default"/> of RFC 9200</dd> </dl> <dl newline="false" spacing="compact"> <dt>Name:</dt> <dd><tt>exi</tt></dd> <dt>Description:</dt> <dd>"Expires in". Lifetime of the token in seconds from the time the RS first sees it. Used to implement a weakerfromform of token expiration for devices that cannot synchronize their internalclocks.</t> <t>Change Controller: IESG</t> <t>Reference: <xref target="introRes"/> of [this document]</t> </list> </t>clocks.</dd> <dt>Change Controller:</dt> <dd>IETF</dd> <dt>Reference:</dt> <dd><xref target="introRes" format="default"/> of RFC 9200</dd> </dl> </section> <section anchor="IANAIntrospectionEndpointCBORMappingsRegistry"title="OAuthnumbered="true" toc="default"> <name>OAuth Token Introspection Response CBORMappings Registry">Mappings</name> <t>This specification establishes the IANA "OAuth Token Introspection Response CBOR Mappings"registry. The registry has been created to use the "Expert Review" registration procedure <xref target="RFC8126"/>, except for the value range designated for private use.</t>registry.</t> <t>The columns of this registryare: <list style='hanging'> <t hangText='Name'>Theare:</t> <dl newline="false"> <dt>Name:</dt> <dd>The OAuth Parameter name, refers to the name in the OAuth parameter registry, e.g.,"client_id".</t> <t hangText='CBOR Key'>CBOR<tt>client_id</tt>.</dd> <dt>CBOR Key:</dt> <dd>CBOR map key for this parameter. Integer values less than -65536 are marked as"Private Use",Private Use; all other values use the registration policy"Expert Review"Expert Review <xreftarget="RFC8126"/>.</t> <t hangText='Value Type'>Thetarget="RFC8126" format="default"/>.</dd> <dt>Value Type:</dt> <dd>The allowable CBOR data types for values of thisparameter.</t> <t hangText='Reference'>Thisparameter.</dd> <dt>Reference:</dt> <dd>This contains a pointer to the public specification of the introspection response parameter abbreviation, if oneexists.</t> </list></t> <t>Thisexists.</dd> <dt>Original Specification</dt> <dd>This contains a pointer to the public specification of the OAuth Token Introspection parameter, if one exists.</dd> </dl> <t> This registrywill behas been initially populated by the values in <xreftarget="fig:cborIntrospectionParameters"/>.target="table_cborIntrospectionParameters"/>. The Reference column for all of these entrieswill beis this document.</t> <t>Note that the mappings of parameters corresponding to claim names intentionally coincide with the CWT claim name mappings from <xreftarget="RFC8392"/>.</t>target="RFC8392" format="default"/>.</t> </section> <section anchor="IANAJWTClaims"title="JSONnumbered="true" toc="default"> <name>JSON Web TokenClaims">Claims</name> <t>This specification registers the following new claims in theJSON"JSON Web Token(JWT) registry of JSONClaims" subregistry under the "JSON Web TokenClaims(JWT)" registry <xreftarget="IANA.JsonWebTokenClaims"/>:</t> <t><?rfc subcompact="yes"?> <list style='symbols'> <t>Claim Name: <spanx style="verb">ace_profile</spanx></t> <t>Claim Description: Thetarget="IANA.JsonWebTokenClaims" format="default"/>:</t> <dl newline="false" spacing="compact"> <dt>Claim Name:</dt> <dd><tt>ace_profile</tt></dd> <dt>Claim Description:</dt> <dd>The ACE profile a token is supposed to be usedwith.</t> <t>Change Controller: IESG</t> <t>Reference: <xref target="accessToken"/> of [this document]</t> </list></t> <t><?rfc subcompact="yes"?> <list style='symbols'> <t>Claim Name: <spanx style="verb">cnonce</spanx></t> <t>Claim Description: "client-nonce".with.</dd> <dt>Change Controller:</dt> <dd>IETF</dd> <dt>Reference:</dt> <dd><xref target="accessToken" format="default"/> of RFC 9200</dd> </dl> <dl newline="false" spacing="compact"> <dt>Claim Name:</dt> <dd><tt>cnonce</tt></dd> <dt>Claim Description:</dt> <dd>"client-nonce". A nonce previously provided to the AS by the RS via the client. Used to verify token freshness when the RS cannot synchronize its clock with theAS.</t> <t>Change Controller: IESG</t> <t>Reference: <xref target="accessToken"/> of [this document]</t> </list></t> <t><?rfc subcompact="yes"?> <list style='symbols'> <t>Claim Name: <spanx style="verb">exi</spanx></t> <t>Claim Description: "ExpiresAS.</dd> <dt>Change Controller:</dt> <dd>IETF</dd> <dt>Reference:</dt> <dd><xref target="accessToken" format="default"/> of RFC 9200</dd> </dl> <dl newline="false" spacing="compact"> <dt>Claim Name:</dt> <dd><tt>exi</tt></dd> <dt>Claim Description:</dt> <dd>"Expires in". Lifetime of the token in seconds from the time the RS first sees it. Used to implement a weakerfromform of token expiration for devices that cannot synchronize their internalclocks.</t> <t>Change Controller: IESG</t> <t>Reference: <xref target="tokenExpiration"/> of [this document]</t> </list></t>clocks.</dd> <dt>Change Controller:</dt> <dd>IETF</dd> <dt>Reference:</dt> <dd><xref target="tokenExpiration" format="default"/> of RFC 9200</dd> </dl> </section> <section anchor="IANACWTClaims"title="CBORnumbered="true" toc="default"> <name>CBOR Web TokenClaims">Claims</name> <t>This specification registers the following new claims in the "CBOR Web Token (CWT) Claims" registry <xreftarget="IANA.CborWebTokenClaims"/>.</t> <t><?rfc subcompact="yes"?> <list style='symbols'> <t>Claim Name: <spanx style="verb">ace_profile</spanx></t> <t>Claim Description: Thetarget="IANA.CborWebTokenClaims" format="default"/>.</t> <dl newline="false" spacing="compact"> <dt>Claim Name:</dt> <dd><tt>ace_profile</tt></dd> <dt>Claim Description:</dt> <dd>The ACE profile a token is supposed to be usedwith.</t> <t>JWTwith.</dd> <dt>JWT ClaimName: ace_profile</t> <t>Claim Key: TBD (suggested: 38)</t> <t>ClaimName:</dt> <dd><tt>ace_profile</tt></dd> <dt>Claim Key:</dt> <dd>38</dd> <dt>Claim ValueType(s): integer</t> <t>Change Controller: IESG</t> <t>Specification Document(s): <xref target="accessToken"/> of [this document]</t> </list></t> <t><?rfc subcompact="yes"?> <list style='symbols'> <t>Claim Name: <spanx style="verb">cnonce</spanx></t> <t>Claim Description: TheType:</dt> <dd>integer</dd> <dt>Change Controller:</dt> <dd>IETF</dd> <dt>Reference:</dt> <dd><xref target="accessToken" format="default"/> of RFC 9200</dd> </dl> <dl newline="false" spacing="compact"> <dt>Claim Name:</dt> <dd><tt>cnonce</tt></dd> <dt>Claim Description:</dt> <dd>The client-nonce sent to the AS by the RS via theclient.</t> <t>JWTclient.</dd> <dt>JWT ClaimName: cnonce</t> <t>Claim Key: TBD (suggested: 39)</t> <t>ClaimName:</dt> <dd><tt>cnonce</tt></dd> <dt>Claim Key:</dt> <dd>39</dd> <dt>Claim ValueType(s): byte string</t> <t>Change Controller: IESG</t> <t>Specification Document(s): <xref target="accessToken"/> of [this document]</t> </list></t> <t><?rfc subcompact="yes"?> <list style='symbols'> <t>Claim Name: <spanx style="verb">exi</spanx></t> <t>Claim Description: TheType:</dt> <dd>byte string</dd> <dt>Change Controller:</dt> <dd>IETF</dd> <dt>Reference:</dt> <dd><xref target="accessToken" format="default"/> of RFC 9200</dd> </dl> <dl newline="false" spacing="compact"> <dt>Claim Name:</dt> <dd><tt>exi</tt></dd> <dt>Claim Description:</dt> <dd>The expiration time of a token measured from when it was received at the RS inseconds.</t> <t>JWTseconds.</dd> <dt>JWT ClaimName: exi</t> <t>Claim Key: TBD (suggested: 40)</t> <t>ClaimName:</dt> <dd><tt>exi</tt></dd> <dt>Claim Key:</dt> <dd>40</dd> <dt>Claim ValueType(s): integer</t> <t>Change Controller: IESG</t> <t>Specification Document(s): <xref target="tokenExpiration"/> of [this document]</t> </list></t> <t><?rfc subcompact="yes"?> <list style='symbols'> <t>Claim Name: <spanx style="verb">scope</spanx></t> <t>Claim Description: TheType:</dt> <dd>unsigned integer</dd> <dt>Change Controller:</dt> <dd>IETF</dd> <dt>Reference:</dt> <dd><xref target="tokenExpiration" format="default"/> of RFC 9200</dd> </dl> <dl newline="false" spacing="compact"> <dt>Claim Name:</dt> <dd><tt>scope</tt></dd> <dt>Claim Description:</dt> <dd>The scope of an accesstokentoken, as defined in <xreftarget="RFC6749"/>.</t> <t>JWTtarget="RFC6749" format="default"/>.</dd> <dt>JWT ClaimName: scope</t> <t>Claim Key: TBD (suggested: 9)</t> <t>ClaimName:</dt> <dd><tt>scope</tt></dd> <dt>Claim Key:</dt> <dd>9</dd> <dt>Claim ValueType(s): byteType:</dt> <dd>byte string or textstring</t> <t>Change Controller: IESG</t> <t>Specification Document(s): Section 4.2 of <xref target="RFC8693"/></t> </list></t>string</dd> <dt>Change Controller:</dt> <dd>IETF</dd> <dt>Reference:</dt> <dd><xref target="RFC8693" sectionFormat="of" section="4.2"/></dd> </dl> </section> <section anchor="IANAmediaType"title="Medianumbered="true" toc="default"> <name>Media TypeRegistrations">Registration</name> <t>This specification registers the'application/ace+cbor'"application/ace+cbor" media type for messages of the protocols defined in this document carrying parameters encoded in CBOR. This registration follows the procedures specified in <xreftarget="RFC6838"/>.</t> <t>Type name: application</t> <t>Subtype name: ace+cbor</t> <t>Required parameters: N/A</t> <t>Optional parameters: N/A</t> <t>Encoding considerations: Musttarget="RFC6838" format="default"/>.</t> <dl newline="false"> <dt>Type name:</dt> <dd>application</dd> <dt>Subtype name:</dt> <dd>ace+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 protocol parameters defined in[this document].</t> <t>Security considerations: SeeRFC 9200.</dd> <dt>Security considerations:</dt> <dd>See <xreftarget="security"/>target="security" format="default"/> of[this document]</t> <t>Interoperability considerations: N/A</t> <t>Published specification: [this document]</t> <t>ApplicationsRFC 9200</dd> <dt>Interoperability considerations:</dt> <dd>N/A</dd> <dt>Published specification:</dt> <dd>RFC 9200</dd> <dt>Applications that use this mediatype: Thetype:</dt> <dd>The type is used by authorization servers,clientsclients, and resource servers that support the ACE framework with CBORencodingencoding, as specified in[this document].</t> <t>FragmentRFC 9200.</dd> <dt>Fragment identifierconsiderations: N/A </t> <t>Additional information: N/A</t> <t>Personconsiderations:</dt> <dd>N/A</dd> <dt>Additional information:</dt> <dd>N/A</dd> <dt>Person & email address to contact for furtherinformation: <iesg@ietf.org></t> <t>Intended usage: COMMON</t> <t>Restrictions on usage: none</t> <t>Author: Ludwiginformation:</dt> <dd><br/>IESG <iesg@ietf.org></dd> <dt>Intended usage:</dt> <dd>COMMON</dd> <dt>Restrictions on usage:</dt> <dd>none</dd> <dt>Author:</dt> <dd>Ludwig Seitz<ludwig.seitz@combitech.se></t> <t>Change controller: IESG</t><ludwig.seitz@combitech.se></dd> <dt>Change controller:</dt> <dd>IETF</dd> </dl> </section> <section anchor="IANAcoapContentFormat"title="CoAP Content-Format Registry"> <t>This specification registers thenumbered="true" toc="default"> <name>CoAP Content-Formats</name> <t>The following entrytohas been registered in the "CoAP Content-Formats" registry:</t><t>Media Type: application/ace+cbor</t> <t>Encoding: -</t> <t>ID: TBD (suggested: 19)</t> <t>Reference: [this document]</t><dl newline="false" spacing="compact"> <dt>Media Type:</dt> <dd>application/ace+cbor</dd> <dt>Encoding:</dt> <dd>-</dd> <dt>ID:</dt> <dd>19</dd> <dt>Reference:</dt> <dd>RFC 9200</dd> </dl> </section> <section anchor="IANAinstructions"title="Expertnumbered="true" toc="default"> <name>Expert ReviewInstructions">Instructions</name> <t>All of the IANA registries established in this document are defined to use a registration policy of 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>ExpertreviewersReviewers should take into consideration the following points:<list style="symbols"> <t>Point</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 alreadyregistered,registered and that the point is likely to be used in deployments. The zones tagged asprivate usePrivate Use are intended for testing purposes and closed environments; code points in other ranges should not be assigned fortesting.</t> <t>Specificationstesting.</li> <li>Specifications are needed for the first-come, first-serve range if they are expected to be used outside of closed environments in an interoperable way. When specifications are not provided, the description provided needs to have sufficient information to identify what the point is being usedfor.</t> <t>Expertsfor.</li> <li>Experts should take into account the expected usage of fields when approving point assignment. The fact that there is a range forstandards trackStandards Track documents does not mean that astandards trackStandards 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, i.e., the size of device it will be usedon.</t> <t>Sinceon.</li> <li>Since a high degree of overlap is expected between these registries and the contents of the OAuth parameters <xreftarget="IANA.OAuthParameters"/>target="IANA.OAuthParameters" format="default"/> registries, experts should require new registrations to maintain alignment with parameters from OAuth that have comparable functionality. Deviation from this alignment should only be allowed if there are functionaldifferences,differences that are motivated by the use case and that cannot be easily or efficiently addressed by comparable OAuthparameters.</t> </list></t>parameters.</li> </ul> </section></section><!-- IANA considerations --> <section anchor="Acknowledgments" title="Acknowledgments"> <t>This document is a product of the ACE working group of the IETF.</t> <t>Thanks to Eve Maler for her contributions to the use of OAuth 2.0 and UMA in IoT scenarios, Robert Taylor for his discussion input, and Malisa Vucinic for his input on the predecessors of this proposal.</t> <t>Thanks to the authors of draft-ietf-oauth-pop-key-distribution, from where parts of the security considerations where copied.</t> <t>Thanks to Stefanie Gerdes, Olaf Bergmann, and Carsten Bormann for contributing their work on AS discovery from draft-gerdes-ace-dcaf-authorize (see <xref target="asDiscovery"/>) and the considerations on multiple access tokens.</t> <t>Thanks to Jim Schaad and Mike Jones for their comprehensive reviews.</t> <t>Thanks to Benjamin Kaduk for his input on various questions related to this work.</t> <t>Thanks to Cigdem Sengul for some very useful review comments.</t> <t>Thanks to Carsten Bormann for contributing the text for the CoRE Resource Type registry.</t> <t>Thanks to Roman Danyliw for suggesting the <xref target="app:diffOAuth"/> (including its contents).</t> <t>Ludwig Seitz and Goeran Selander worked on this document as part of the CelticPlus project CyberWI, with funding from Vinnova. Ludwig Seitz was also received further funding for this work by Vinnova in the context of the CelticNext project Critisec.</t></section><!-- Possibly a 'Contributors' section ... --></middle><!-- *****BACK MATTER ***** --><back><!-- References split into informative and normative --> <!-- There are 2 ways to insert reference entries from the citation libraries: 1. define an ENTITY at the top,<displayreference target="I-D.erdtman-oauth-rpcc" to="OAUTH-RPCC"/> <displayreference target="I-D.gerdes-ace-dcaf-authorize" to="DCAF"/> <displayreference target="I-D.ietf-oauth-pop-key-distribution" to="POP-KEY-DIST"/> <references> <name>References</name> <references> <name>Normative References</name> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3986.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6347.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6749.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6750.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6838.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6920.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8949.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7252.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7519.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7662.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8126.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8152.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8392.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8693.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8747.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8610.xml"/> <reference anchor='RFC9201' target="https://www.rfc-editor.org/info/rfc9201"> <front> <title>Additional OAuth Parameters for Authentication anduse "ampersand character"RFC2629; here (as shown) 2. simply use a PI "less than character"?rfc include="reference.RFC.2119.xml"?> here (for I-Ds: include="reference.I-D.narten-iana-considerations-rfc2434bis.xml") Both are cited textually in the same manner: by using xref elements. If you use the PI option, xml2rfc will, by default, try to find included files in the same directory as the including file. You can also define the XML_LIBRARY environment variable with a value containing a set of directories to search. These can be eitherAuthorization inthe local filing system or remote ones accessed by http (http://domain/dir/... ).--> <references title="Normative References"> <!--?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?--> &RFC2119; &RFC3986; &RFC6347; &RFC6749; &RFC6750; &RFC6838; &RFC6920; &RFC8949; &RFC7252; &RFC7519; &RFC7662; &RFC8126; &RFC8152; &RFC8174; &RFC8392; &RFC8693; &RFC8747; &I-D.ietf-ace-oauth-params;Constrained Environments (ACE)</title> <author initials='L' surname='Seitz' fullname='Ludwig Seitz'> <organization /> </author> <date year='2022' month='August'/> </front> <seriesInfo name="RFC" value="9201"/> <seriesInfo name="DOI" value="10.17487/RFC9201"/> </reference> <reference anchor="IANA.OAuthAccessTokenTypes"target="https://www.iana.org/assignments/oauth-parameters/oauth-parameters.xhtml#token-types">target="https://www.iana.org/assignments/oauth-parameters"> <front> <title>OAuth Access Token Types</title> <author> <organization>IANA</organization> </author><date/></front> </reference> <reference anchor="IANA.OAuthParameters"target="https://www.iana.org/assignments/oauth-parameters/oauth-parameters.xhtml#parameters">target="https://www.iana.org/assignments/oauth-parameters"> <front> <title>OAuth Parameters</title> <author> <organization>IANA</organization> </author><date/></front> </reference> <reference anchor="IANA.TokenIntrospectionResponse"target="https://www.iana.org/assignments/oauth-parameters/oauth-parameters.xhtml#token-introspection-response">target="https://www.iana.org/assignments/oauth-parameters"> <front> <title>OAuth Token Introspection Response</title> <author> <organization>IANA</organization> </author><date/></front> </reference> <reference anchor="IANA.JsonWebTokenClaims"target="https://www.iana.org/assignments/jwt/jwt.xhtml#claims">target="https://www.iana.org/assignments/jwt"> <front> <title>JSON Web Token Claims</title> <author> <organization>IANA</organization> </author><date/></front> </reference> <reference anchor="IANA.CborWebTokenClaims"target="https://www.iana.org/assignments/cwt/cwt.xhtml#claims-registry">target="https://www.iana.org/assignments/cwt"> <front> <title>CBOR Web Token (CWT) Claims</title> <author> <organization>IANA</organization> </author><date/></front> </reference> <reference anchor="IANA.OAuthExtensionsErrorRegistry"target="https://www.iana.org/assignments/oauth-parameters/oauth-parameters.xhtml#extensions-error">target="https://www.iana.org/assignments/oauth-parameters"> <front> <title>OAuth Extensions Error Registry</title> <author> <organization>IANA</organization> </author><date/></front> </reference> <reference anchor="IANA.CoreParameters"target="https://www.iana.org/assignments/core-parameters/core-parameters.xhtml">target="https://www.iana.org/assignments/core-parameters"> <front> <title>Constrained RESTful Environments (CoRE) Parameters</title> <author> <organization>IANA</organization> </author><date/></front> </reference> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4648.xml"/> </references><references title="Informative References"> &RFC4949; &RFC6690; &RFC6819; &RFC7009; &RFC7228; &RFC7231; &RFC7521; &RFC7540; &RFC7591; &RFC7641; &RFC7744; &RFC7959; &RFC8252; &RFC8259; &RFC8414; &RFC8446; &RFC8516; &RFC8613; &RFC8628; &I-D.ietf-tls-dtls13; &I-D.erdtman-ace-rpcc; &I-D.ietf-quic-transport; &I-D.ietf-ace-oscore-profile; &I-D.ietf-ace-dtls-authorize;<references> <name>Informative References</name> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4949.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6690.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6819.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7009.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7228.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9110.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7521.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9113.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7591.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7641.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7744.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7959.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8252.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8259.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8414.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8446.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8516.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8613.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8628.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9147.xml"/> <xi:include href="https://datatracker.ietf.org/doc/bibxml3/reference.I-D.erdtman-oauth-rpcc-00.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9000.xml"/> <reference anchor='RFC9203' target='https://www.rfc-editor.org/info/rfc9203'> <front> <title>The Object Security for Constrained RESTful Environments (OSCORE) Profile of the Authentication and Authorization for Constrained Environments (ACE) Framework</title> <author initials='F' surname='Palombini' fullname='Francesca Palombini'> <organization /> </author> <author initials='L' surname='Seitz' fullname='Ludwig Seitz'> <organization /> </author> <author initials='G' surname='Selander' fullname='Goeran Selander'> <organization /> </author> <author initials='M' surname='Gunnarsson' fullname='Martin Gunnarsson'> <organization /> </author> <date year="2022" month="August" /> </front> <seriesInfo name="RFC" value="9203"/> <seriesInfo name="DOI" value="10.17487/RFC9203"/> </reference> <reference anchor='RFC9202' target='https://www.rfc-editor.org/info/rfc9202'> <front> <title>Datagram Transport Layer Security (DTLS) Profile for Authentication and Authorization for Constrained Environments (ACE)</title> <author initials='S' surname='Gerdes' fullname='Stefanie Gerdes'> <organization /> </author> <author initials='O' surname='Bergmann' fullname='Olaf Bergmann'> <organization /> </author> <author initials='C' surname='Bormann' fullname='Carsten Bormann'> <organization /> </author> <author initials='G' surname='Selander' fullname='Goeran Selander'> <organization /> </author> <author initials='L' surname='Seitz' fullname='Ludwig Seitz'> <organization /> </author> <date year="2022" month="August"/> </front> <seriesInfo name="RFC" value="9202"/> <seriesInfo name="DOI" value="10.17487/RFC9202"/> </reference> <xi:include href="https://datatracker.ietf.org/doc/bibxml3/reference.I-D.ietf-oauth-pop-key-distribution-07.xml"/> <xi:include href="https://datatracker.ietf.org/doc/bibxml3/reference.I-D.gerdes-ace-dcaf-authorize-04.xml"/> <reference anchor="Margi10impact"> <front> <title>Impact of Operating Systems on Wireless Sensor Networks (Security) Applications and Testbeds</title> <authorinitials="C. B."initials="C." surname="Margi"/> <authorinitials="B.T."initials="B." surname="de Oliveira"/> <authorinitials="G.T."initials="G." surname="de Sousa"/> <authorinitials="M.A."initials="M." surname="Simplicio Jr"/> <authorinitials="P.S.L.M."initials="P." surname="Barreto"/> <authorinitials="T.C.M.B."initials="T." surname="Carvalho"/> <author initials="M." surname="Naeslund"/> <author initials="R." surname="Gold"/> <date year="2010"month="August" />month="August"/> </front> <seriesInfoname="Proceedingsname="DOI" value="10.1109/ICCCN.2010.5560028"/> <refcontent>Proceedings ofthe" value="19ththe 19th International Conference on Computer Communications andNetworks (ICCCN)"/>Networks</refcontent> </reference> <reference anchor="MQTT5.0" target="https://docs.oasis-open.org/mqtt/mqtt/v5.0/mqtt-v5.0.html"> <front> <title>MQTT Version 5.0</title> <author initials="A." surname="Banks"/> <author initials="E." surname="Briggs"/> <author initials="K." surname="Borgendale"/> <author initials="R." surname="Gupta"/> <date year="2019" month="March"/> </front><seriesInfo name="OASIS" value="Standard"/><refcontent>OASIS Standard</refcontent> </reference> <reference anchor="BLE" target="https://www.bluetooth.com/specifications/bluetooth-core-specification/"> <front><title>Bluetooth Core<title>Core Specificationv5.1</title> <author initials="" surname="Bluetooth SIG"/>5.3</title> <author> <organization>Bluetooth Special Interest Group</organization> </author> <dateyear="2019" month="January"/>year="2021" month="July"/> </front> <seriesInfo name="Section" value="4.4"/> </reference> </references> </references> <sectiontitle="Design Justification" anchor="constraints">anchor="constraints" numbered="true" toc="default"> <name>Design Justification</name> <t>This section provides further insight into the design decisions of the solution documented in this document. <xreftarget="overview"/>target="overview" format="default"/> lists several building blocks and briefly summarizes their importance. The justification for offering some of those building blocks, as opposed to using OAuth 2.0 as is, is given below.</t> <t>Common IoT constraints are:<list style="hanging"> <t hangText="Low</t> <dl newline="true" spacing="normal"> <dt>Low PowerRadio:"><vspace blankLines="1"/>Radio:</dt> <dd> Many IoT devices are equipped with a small batterywhichthat needs to last for a long time. For many constrained wireless devices, the highest energy cost is associated to transmitting or receiving messages (roughly by a factor of 10 compared to AES) <xreftarget="Margi10impact"/>.target="Margi10impact" format="default"/>. It is therefore important to keep the total communication overhead low, including minimizing the number and size of messages sent and received, which has an impact of choice on the message format and protocol. By using CoAP over UDP andCBOR encodedCBOR-encoded messages, some of these aspects are addressed. Security protocols contribute to the communication overhead and can, in some cases, be optimized. For example, authentication and key establishment may, in certain cases where security requirements allow, be replaced by the provisioning of security context by a trusted third party, using transport or application-layer security.<vspace blankLines="0"/> </t> <t hangText="Low</dd> <dt>Low CPUSpeed:"><vspace blankLines="1"/>Speed:</dt> <dd> Some IoT devices are equipped with processors that are significantly slower than those found in most current devices on the Internet. This typically has implications on what timely cryptographic operations a device is capable of performing, which in turn impacts, e.g., protocol latency. Symmetric key cryptography may be used instead of the computationally more expensive public key cryptography where the security requirements so allow, but this may also require support fortrusted-third-party-assistedtrusted, third-party-assisted secret key establishment using transport- or application-layer security.<vspace blankLines="0"/></t> <t hangText="Small</dd> <dt>Small Amount ofMemory:"> <vspace blankLines="1"/>Memory:</dt> <dd> Microcontrollers embedded in IoT devices are often equipped with only a small amount of RAM and flash memory, which places limitations on what kind of processing can be performed and how much code can be put on those devices. To reduce code size, fewer and smaller protocol implementations can be put on the firmware of such a device. In this case, CoAP may be used instead of HTTP, symmetric-key cryptography may be used instead of public-key cryptography, and CBOR may be used instead of JSON. An authentication and key establishment protocol, e.g., the DTLS handshake, in comparison with assisted key establishment, also has an impact on memory and codefootprints.<vspace blankLines="0"/> </t> <t hangText="Userfootprints. </dd> <dt>User InterfaceLimitations:"> <vspace blankLines="1"/>Limitations:</dt> <dd> Protecting access to resources is both an important security as well as privacy feature. End users and enterprise customers may not want to give access to the data collected by their IoT device or to functions it may offer to third parties. Since the classical approach of requesting permissions from end users via a rich user interface does not work in many IoT deployment scenarios, these functions need to be delegated to user-controlled devices that are better suitable for such tasks, such assmart phonessmartphones and tablets.<vspace blankLines="1"/></t> <t hangText="Communication Constraints:"> <vspace blankLines="1"/></dd> <dt>Communication Constraints:</dt> <dd> <t> In certain constrainedsettingssettings, an IoT device may not be able to communicate with a given device at all times. Devices may besleeping,sleeping or just disconnected from the Internet because of general lack of connectivity in the area,forcost reasons, orforsecurity reasons, e.g., to avoid an entry point forDenial-of-Servicedenial-of-service attacks.<vspace blankLines="1"/></t> <t> The communication interactions this framework builds upon (as shown graphically in <xreftarget="fig:protocolFlow"/>)target="fig_protocolFlow" format="default"/>) may be accomplished using a variety of different protocols, and not all parts of the message flow are used in all applications due to the communication constraints. Deployments making use of CoAP are expected, but this framework is not limited to them. Otherprotocolsprotocols, such asHTTP,HTTP oreven protocols such asBluetooth Smartcommunicationcommunication, that do not necessarily useIP,IP could also be used. The latter raises the need for application-layer security over the various interfaces.</t></list> </t></dd> </dl> <t>In the light of theseconstraintsconstraints, we have made the following designdecisions: <list style="hanging"> <t hangText="CBOR,decisions:</t> <dl newline="true" spacing="normal"> <dt>CBOR, COSE,CWT:"><vspace blankLines="1"/>CWT:</dt> <dd> When using this framework, it isRECOMMENDED<bcp14>RECOMMENDED</bcp14> to use CBOR <xreftarget="RFC8949"/>target="RFC8949" format="default"/> as the data format. Where CBOR data needs to be protected, the use of COSE <xreftarget="RFC8152"/>target="RFC8152" format="default"/> isRECOMMENDED.<bcp14>RECOMMENDED</bcp14>. Furthermore, where self-contained tokens are needed, it isRECOMMENDED<bcp14>RECOMMENDED</bcp14> to useofCWT <xreftarget="RFC8392"/>.target="RFC8392" format="default"/>. These measures aim at reducing the size of messages sent over the wire, the RAM size of data objects that need to be kept inmemorymemory, and the size of libraries that devices need to support.<vspace blankLines="1"/></t> <t hangText="CoAP:"><vspace blankLines="1"/></dd> <dt>CoAP:</dt> <dd> When using this framework, it isRECOMMENDED<bcp14>RECOMMENDED</bcp14> to useofCoAP <xreftarget="RFC7252"/>target="RFC7252" format="default"/> instead of HTTP. This does not preclude the use of other protocols specifically aimed at constrained devices,like,e.g., Bluetooth Low Energy (see <xreftarget="coap"/>).target="coap" format="default"/>). This aims again at reducing the size of messages sent over the wire, the RAM size of data objects that need to be kept inmemorymemory, and the size of libraries that devices need to support.<vspace blankLines="1"/></t> <t hangText="Access Information:"><vspace blankLines="1"/></dd> <dt>Access Information:</dt> <dd> This framework defines the name "Access Information" for data concerning the RS that the AS returns to the client in an access token response (see <xreftarget="tokenResponse"/>).target="tokenResponse" format="default"/>). This aims at enabling scenarios where a powerfulclient,client supporting multipleprofiles,profiles needs to interact with an RS for which it does not know the supported profiles and the raw public key.<vspace blankLines="1"/></t> <t hangText="Proof-of-Possession:"><vspace blankLines="1"/></dd> <dt>Proof of Possession:</dt> <dd> This framework makes use of proof-of-possession tokens, using the"cnf"<tt>cnf</tt> claim <xreftarget="RFC8747"/>.target="RFC8747" format="default"/>. A request parameter"cnf"<tt>cnf</tt> and a Response parameter"cnf",<tt>cnf</tt>, both having a value space semantically and syntactically identical to the"cnf"<tt>cnf</tt> claim, are defined for the tokenendpoint,endpoint to allow requesting and stating confirmation keys. This aims at making token theft harder. Token theft is specifically relevant in constrained use cases, as communication often passes throughmiddle-boxes,middleboxes, which could be able to steal bearer tokens and use them to gain unauthorized access.<vspace blankLines="1"/> </t> <t hangText="Authz-Info endpoint:"><vspace blankLines="1"/></dd> <dt>Authz-Info endpoint:</dt> <dd> This framework introduces a new way of providing access tokens to an RS by exposingaan authz-infoendpoint,endpoint to which access tokens can be POSTed. This aims at reducing the size of the request message and the code complexity at the RS. The size of the request message is problematic, since many constrained protocols have severe message size limitations at the physical layer (e.g., in the order of 100 bytes). This means that larger packets get fragmented, which in turn combines badly with the high rate of packetloss,loss and the need to retransmit the whole message if one packet gets lost.ThusThus, separating sending of the request and sending of the access tokens helps to reduce fragmentation.<vspace blankLines="1"/></t> <t hangText="Client</dd> <dt>Client CredentialsGrant:"><vspace blankLines="1"/>Grant:</dt> <dd> In thisframeworkframework, the use of the client credentials grant isRECOMMENDED<bcp14>RECOMMENDED</bcp14> for machine-to-machine communication use cases, where manual intervention of the resource owner to produce a grant token is not feasible. The intention is that the resource owner would insteadpre-arrangeprearrange authorization with theAS,AS based on the client's own credentials. The client can then (without manual intervention) obtain access tokens from the AS.<vspace blankLines="1"/></t> <t hangText="Introspection:"><vspace blankLines="1"/></dd> <dt>Introspection:</dt> <dd> In thisframeworkframework, the use of access token introspection isRECOMMENDED<bcp14>RECOMMENDED</bcp14> in cases where the client is constrained in a way that itcan notcannot easily obtain new access tokens(i.e.(i.e., it has connectivity issues that prevent it from communicating with the AS). In thatcasecase, it isRECOMMENDED<bcp14>RECOMMENDED</bcp14> to use a long-termtoken,token that could be a simple reference. The RS is assumed to be able to communicate with theAS,AS and can therefore performintrospection,introspection in order to learn the claims associated with the token reference. The advantage of such an approach is that the resource owner can change the claims associated to the token reference without having to be in contact with the client, thus granting or revoking access rights.<vspace blankLines="1"/></t> </list> </t></dd> </dl> </section> <sectionanchor="app:rolesAndResponsibilities" title="Roles and Responsibilities"> <t><list style="hanging"> <t hangText="Resource Owner"> <list style="symbols"> <t>Makeanchor="app_rolesAndResponsibilities" numbered="true" toc="default"> <name>Roles and Responsibilities</name> <dl newline="true" spacing="normal"> <dt>Resource Owner</dt> <dd> <ul spacing="normal"> <li>Make sure that the RS is registered at the AS. This includes making known to the AS which profiles, token_type, scopes, and key types (symmetric/asymmetric) the RS supports. Also making it known to the AS which audience(s) the RS identifies itselfwith.</t> <t>Makewith.</li> <li>Make sure that clients can discover the AS that is in charge of theRS.</t> <t>IfRS.</li> <li>If the client-credentials grant is used, make sure that the AS has the necessary,up-to-date,up-to-date access control policies for theRS.</t> </list> <vspace blankLines="0"/> </t> <t hangText="Requesting Party"> <list style="symbols"> <t>MakeRS.</li> </ul> </dd> <dt>Requesting Party</dt> <dd> <ul spacing="normal"> <li>Make sure that the client is provisioned the necessary credentials to authenticate to theAS.</t> <t>MakeAS.</li> <li>Make sure that the client is configured to follow the security requirements of theRequesting Partyrequesting party when issuing requests (e.g., minimum communication securityrequirements,requirements or trustanchors).</t> <t>Registeranchors).</li> <li>Register the client at the AS. This includes making known to the AS which profiles, token_types, and key types (symmetric/asymmetric) for theclient.</t> </list> <vspace blankLines="0"/> </t> <t hangText="Authorization Server"> <list style="symbols"> <t>Registerclient.</li> </ul> </dd> <dt>Authorization Server</dt> <dd> <ul spacing="normal"> <li>Register the RS and manage corresponding securitycontexts.</t> <t>Registercontexts.</li> <li>Register clients and authenticationcredentials.</t> <t>Allow Resource Ownerscredentials.</li> <li>Allow resource owners to configure and update access control policies related to their registeredRSs.</t> <t>ExposeRSs.</li> <li>Expose the token endpoint to allow clients to requesttokens.</t> <t>Authenticatetokens.</li> <li>Authenticate clients that wish to request atoken.</t> <t>Processtoken.</li> <li>Process a token request using the authorization policies configured for theRS.</t> <t>Optionally: ExposeRS.</li> <li>Optionally, expose the introspection endpoint that allowsRS'sRSs to submit token introspectionrequests.</t> <t>Ifrequests.</li> <li>If providing an introspectionendpoint: Authenticateendpoint, authenticate RSs that wish to get an introspectionresponse.</t> <t>Ifresponse.</li> <li>If providing an introspectionendpoint: Processendpoint, process token introspectionrequests.</t> <t>Optionally: Handle token revocation.</t> <t>Optionally: Providerequests.</li> <li>Optionally, handle token revocation.</li> <li>Optionally, provide discovery metadata. See <xreftarget="RFC8414"/></t> <t>Optionally: Handletarget="RFC8414" format="default"/>.</li> <li>Optionally, handle refreshtokens.</t> </list><vspace blankLines="0"/> </t> <t hangText="Client"> <list style="symbols"> <t>Discovertokens.</li> </ul> </dd> <dt>Client</dt> <dd> <ul spacing="normal"> <li>Discover the AS in charge of the RS that is to be targeted with arequest.</t>request.</li> <li> <t>Submit the token request (see step (A) of <xreftarget="fig:protocolFlow"/>). <list style="symbols"> <t>Authenticatetarget="fig_protocolFlow" format="default"/>). </t> <ul spacing="normal"> <li>Authenticate to theAS.</t> <t>OptionallyAS.</li> <li>Optionally (if notpre-configured): Specifypreconfigured), specify which RS, which resource(s), and which action(s) the request(s) willtarget.</t> <t>Iftarget.</li> <li>If raw public keys(rpk)(RPKs) or certificates are used, make sure the AS has the rightrpkRPK or certificate for thisclient.</t> </list> </t>client.</li> </ul> </li> <li> <t>Process the access token and Access Information (see step (B) of <xreftarget="fig:protocolFlow"/>). <list style="symbols"> <t>Checktarget="fig_protocolFlow" format="default"/>). </t> <ul spacing="normal"> <li>Check that the Access Information provides the necessary security parameters (e.g., PoPkey,key or information on communication security protocols supported by theRS).</t> <t>SafelyRS).</li> <li>Safely store the proof-of-possessionkey.</t> <t>Ifkey.</li> <li>If provided by theAS: SafelyAS, safely store the refreshtoken.</t> </list> </t>token.</li> </ul> </li> <li> <t>Send the token and request to the RS (see step (C) of <xreftarget="fig:protocolFlow"/>). <list style="symbols"> <t>Authenticatetarget="fig_protocolFlow" format="default"/>). </t> <ul spacing="normal"> <li>Authenticate towards the RS (this could coincide with theproof of possession process).</t> <t>Transmitproof-of-possession process).</li> <li>Transmit the token as specified by the AS (default is to the authz-infoendpoint,endpoint; alternative options are specified byprofiles).</t> <t>Performprofiles).</li> <li>Perform the proof-of-possession procedure as specified by the profile in use (this may already have been taken care of through the authenticationprocedure).</t> </list> </t> <t>Processprocedure).</li> </ul> </li> <li>Process the RS response (see step (F) of <xreftarget="fig:protocolFlow"/>)target="fig_protocolFlow" format="default"/>) of theRS.</t> </list><vspace blankLines="0"/> </t> <t hangText="Resource Server"> <list style="symbols"> <t>ExposeRS.</li> </ul> </dd> <dt>Resource Server</dt> <dd> <ul spacing="normal"> <li>Expose a way to submit access tokens. Bydefaultdefault, this is the authz-infoendpoint.</t>endpoint.</li> <li> <t>Process an access token.<list style="symbols"> <t>Verify</t> <ul spacing="normal"> <li>Verify the token is from a recognizedAS.</t> <t>CheckAS.</li> <li>Check the token'sintegrity.</t> <t>Verifyintegrity.</li> <li>Verify that the token applies to thisRS.</t> <t>CheckRS.</li> <li>Check that the token has not expired (if the token provides expirationinformation).</t> <t>Storeinformation).</li> <li>Store the token so that it can be retrieved in the context of a matchingrequest.</t> </list>request.</li> </ul> <t> Note: The order proposed here is notnormative,normative; any process that arrives at an equivalent result can be used. A noteworthy consideration is whether one can use cheap operations early on to quickly discardnon-applicablenonapplicable or invalidtokens,tokens before performing expensive cryptographic operations(e.g.(e.g., doing an expiration check before verifying a signature).<vspace blankLines="0"/></t> </li> <li> <t>Process a request.<list style="symbols"> <t>Set</t> <ul spacing="normal"> <li>Set up communication security with theclient.</t> <t>Authenticateclient.</li> <li>Authenticate theclient.</t> <t>Matchclient.</li> <li>Match the client against existingtokens.</t> <t>Checktokens.</li> <li>Check that tokens belonging to the client actually authorize the requestedaction.</t> <t>Optionally: Checkaction.</li> <li>Optionally, check that the matching tokens are still valid, using introspection (if this ispossible.)</t> </list> </t> <t>Sendpossible.)</li> </ul> </li> <li>Send a response following the agreed upon communication securitymechanism(s).</t> <t>Safelymechanism(s).</li> <li>Safely storecredentialscredentials, such as raw publickeyskeys, for authentication or proof-of-possession keys linked to accesstokens.</t> </list> </t> </list></t>tokens.</li> </ul> </dd> </dl> </section><!-- ***************************************************** --><sectionanchor="app:profileRequirements" title="Requirementsanchor="app_profileRequirements" numbered="true" toc="default"> <name>Requirements onProfiles">Profiles</name> <t>This section lists the requirements on profiles of thisframework,framework for the convenience of profiledesigners. <list style="symbols"> <t>Optionallydesigners.</t> <ul spacing="normal"> <li>Optionally, define new methods for the client to discover the necessary permissions and AS for accessing aresource,resource different from the one proposed in Sections <xreftarget="asDiscovery"/>.target="asDiscovery" format="counter"/> and <xreftarget="specs"/> </t> <t>Optionallytarget="specs" format="counter"/></li> <li>Optionally, specify new granttypes. <xref target="authorizationGrants"/></t> <t>Optionallytypes (<xref target="authorizationGrants" format="default"/>).</li> <li>Optionally, define the use of client certificates as client credentialtype. <xref target="clientCredentials"/></t> <t>Specifytype (<xref target="clientCredentials" format="default"/>).</li> <li>Specify the communication protocol the client and RSthemust use (e.g.,CoAP).CoAP) (Sections <xreftarget="oauthProfile"/>target="oauthProfile" format="counter"/> and <xreftarget="paramProfile"/></t> <t>Specifytarget="paramProfile" format="counter"/>).</li> <li>Specify the security protocol the client and RS must use to protect their communication (e.g., OSCORE or DTLS). This must provideencryption,encryption and integrity and replayprotection. <xref target="paramProfile"/></t> <t>Specifyprotection (<xref target="paramProfile" format="default"/>).</li> <li>Specify how the client and the RS mutuallyauthenticate. <xref target="specs"/></t> <t>Specifyauthenticate (<xref target="specs" format="default"/>).</li> <li>Specify the proof-of-possession protocol(s) and how to selectone,one if several are available. Also specify which key types (e.g., symmetric/asymmetric) are supported by a specific proof-of-possessionprotocol. <xref target="paramTokenType"/></t> <t>Specifyprotocol (<xref target="paramTokenType" format="default"/>).</li> <li>Specify a uniqueace_profile identifier. <xref target="paramProfile"/></t> <t>If<tt>ace_profile</tt> identifier (<xref target="paramProfile" format="default"/>).</li> <li>If introspection issupported: Specifysupported, specify the communication and security protocol forintrospection. <xref target="introspectionEndpoint"/></t> <t>Specifyintrospection (<xref target="introspectionEndpoint" format="default"/>).</li> <li>Specify the communication and security protocol for interactions between the client and AS. This must provide encryption, integrity protection, replayprotectionprotection, and a binding between requests andresponses.responses (Sections <xreftarget="oauthProfile"/>target="oauthProfile" format="counter"/> and <xreftarget="tokenEndpoint"/></t> <t>Specifytarget="tokenEndpoint" format="counter"/>).</li> <li>Specify how/if the authz-info endpoint is protected, including how error responses areprotected. <xref target="tokenAuthInfoEndpoint"/></t> <t>Optionallyprotected (<xref target="tokenAuthInfoEndpoint" format="default"/>).</li> <li>Optionally, define other methods of token transport than the authz-infoendpoint. <xref target="tokenAuthInfoEndpoint"/></t> </list> </t>endpoint (<xref target="tokenAuthInfoEndpoint" format="default"/>).</li> </ul> </section> <sectionanchor="app:registration" title="Assumptionsanchor="app_registration" numbered="true" toc="default"> <name>Assumptions on AS Knowledge about the C andRS">RS</name> <t>This section lists the assumptions on what an AS should know about a client and an RS in order to be able to respond to requests to the token and introspection endpoints. How this information is established is out of scope for this document.<list style="symbols"> <t>The</t> <ul spacing="normal"> <li>The identifier of the client orRS.</t> <t>TheRS.</li> <li>The profiles that the client or RSsupports.</t> <t>Thesupports.</li> <li>The scopes that the RSsupports.</t> <t>Thesupports.</li> <li>The audiences that the RS identifieswith.</t> <t>Thewith.</li> <li>The key types (e.g., pre-shared symmetric key, raw public key, key length, and other key parameters) that the client or RSsupports.</t> <t>Thesupports.</li> <li>The types of access tokens the RS supports (e.g.,CWT).</t> <t>IfCWT).</li> <li>If the RS supports CWTs, the COSE parameters for the crypto wrapper (e.g., algorithm, key-wrap algorithm, and key-length) that the RSsupports.</t> <t>Thesupports.</li> <li>The expiration time for access tokens issued to this RS (unless the RS accepts a default time chosen by theAS).</t> <t>TheAS).</li> <li>The symmetric key shared between the client and AS (ifany).</t> <t>Theany).</li> <li>The symmetric key shared between the RS and AS (ifany).</t> <t>Theany).</li> <li>The raw public key of the client or RS (ifany).</t> <t>Whetherany).</li> <li>Whether the RS has synchronized time (and thus is able to use the'exp'<tt>exp</tt> claim) ornot.</t> </list> </t>not.</li> </ul> </section> <sectionanchor="app:diffOAuth" title="Differencesanchor="app_diffOAuth" numbered="true" toc="default"> <name>Differences to OAuth2.0">2.0</name> <t>This document adapts OAuth 2.0 to be suitable for constrained environments. Thissectionssection lists the main differences from the normative requirements of OAuth2.0. <list style="symbols"> <t>Use2.0.</t> <dl newline="true" spacing="normal"> <dt>Use ofTLS -- OAuthTLS</dt> <dd>OAuth 2.0 requires the use of TLSbothto protect the communication between the AS and client when requesting an accesstoken;token, between the client and RS when accessing aresourceresource, and between the AS and RS if introspection is used. This framework requires similar securityproperties,properties but does not require that they be realized with TLS. See <xreftarget="oauthProfile"/>.</t> <t>Cardinality of "grant_type" parameter -- Intarget="oauthProfile" format="default"/>.</dd> <dt>Cardinality of <tt>grant_type</tt> parameter</dt> <dd>In client-to-AS requests using OAuth 2.0, the"grant_type"<tt>grant_type</tt> parameter is required (per <xreftarget="RFC6749"/>).target="RFC6749" format="default"/>). In this framework, this parameter is optional. See <xreftarget="tokenRequest"/>.</t> <t>Encoding of "scope" parameter -- Intarget="tokenRequest" format="default"/>.</dd> <dt>Encoding of <tt>scope</tt> parameter</dt> <dd>In client-to-AS requests using OAuth 2.0, the"scope"<tt>scope</tt> parameter is string encoded (per <xreftarget="RFC6749"/>).target="RFC6749" format="default"/>). In this framework, this parameter may also be encoded as a byte string. See <xreftarget="tokenRequest"/>.</t> <t>Cardinality of "token_type" parameter -- intarget="tokenRequest" format="default"/>.</dd> <dt>Cardinality of <tt>token_type</tt> parameter</dt> <dd>In AS-to-client responses using OAuth 2.0, thetoken_type<tt>token_type</tt> parameter is required (per <xreftarget="RFC6749"/>).target="RFC6749" format="default"/>). In this framework, this parameter is optional. See <xreftarget="tokenResponse"/>.</t> <t>Accesstarget="tokenResponse" format="default"/>.</dd> <dt>Access tokenretention -- inretention</dt> <dd>In OAuth 2.0, the access token may be sent with every request to the RS. The exact use of access tokens depends on the semantics of the application and the session management concept it uses. In this framework, the RS must be able to store these tokens for later use. See <xreftarget="tokenAuthInfoEndpoint"/>.</t> </list> </t>target="tokenAuthInfoEndpoint" format="default"/>.</dd> </dl> </section><!-- ***************************************************** --><sectionanchor="app:options" title="Deployment Examples">anchor="app_options" numbered="true" toc="default"> <name>Deployment Examples</name> <t>There is a large variety of IoT deployments, as is indicated in <xreftarget="constraints"/>,target="constraints" format="default"/>, and this section highlights a few common variants. This section is not normative but illustrates how the framework can be applied. </t> <t>For each of the deployment variants, there are a number of possible security setups between clients, resourceserversservers, and authorization servers. The main focus in the following subsections is on how authorization of a client request for a resource hosted by an RS is performed. This requires the security of the requests and responses between the clients and the RS to be considered. </t> <t>Note: CBOR diagnostic notation is used for examples of requests and responses.</t><!-- ************************** --> <!-- ************************** --><section anchor="localTokenValidation"title="Localnumbered="true" toc="default"> <name>Local TokenValidation">Validation</name> <t>In this scenario, the case where the resource server is offline is considered, i.e., it is not connected to the AS at the time of the access request. This access procedure involves stepsA, B, C,(A), (B), (C), andF(F) of <xreftarget="fig:protocolFlow"/>. </t>target="fig_protocolFlow" format="default"/>.</t> <t>Since the resource server must be able to verify the access token locally, self-contained access tokens must be used.</t> <t>This example shows the interactions between a client, the authorizationserverserver, and a temperature sensor acting as a resource server. Message exchanges A and B are shown in <xreftarget="fig:RSOffline"/>.</t> <t><list style="hanging"> <t>A: Thetarget="fig_RSOffline" format="default"/>.</t> <dl newline="false" spacing="normal" indent="4"> <dt>A:</dt> <dd> <t>The client first generates a public-private key pair used for communication security with the RS.</t> <t>The client sends a CoAP POST request to the token endpoint at the AS. The security of this request can be transport or application layer. It is up the communication security profile to define. In theexampleexample, it is assumed that both the client and AS have performed mutualauthentication e.g.authentication, e.g., via DTLS. The request contains the public key of the client and theAudience<tt>audience</tt> parameter set to "tempSensorInLivingRoom", a value that the temperature sensor identifies itself with. The AS evaluates the request and authorizes the client to access the resource.</t><t>B: The</dd> <dt>B:</dt> <dd> <t>The AS responds with a 2.05Content(Content) response containing the Access Information, including the access token. The PoP access token contains the public key of the client, and the Access Information contains the public key of the RS. For communicationsecuritysecurity, this example uses DTLS RawPublicKey between the client and the RS. The issued token will have a short validity time, i.e.,"exp"<tt>exp</tt> close to"iat",<tt>iat</tt>, in order to mitigate attacks using stolen client credentials. The token includesthe claimclaims, such as"scope"<tt>scope</tt>, with the authorized access that an owner of the temperature device can enjoy. In this example, the"scope" claim,<tt>scope</tt> claim issued by theAS,AS informs the RS that the owner of thetoken,token that can prove the possession of a key is authorized to make a GET request against the /temperature resource and a POST request on the /firmware resource. Note that the syntax and semantics of thescope<tt>scope</tt> claim are application specific.</t> <t>Note: In thisexampleexample, it is assumed that the client knows what resource it wants toaccess,access and is therefore able to request specificaudience<tt>audience</tt> andscope<tt>scope</tt> claims for the access token.</t></list></t> <t><figure align="center" anchor="fig:RSOffline" title="Token</dd> </dl> <figure anchor="fig_RSOffline"> <name>Token Request and Response Using ClientCredentials.">Credentials</name> <artworkalign="left"><![CDATA[align="left" name="" type="" alt=""><![CDATA[ Authorization Client Server | | |<=======>| DTLS Connection Establishment | | and mutual authentication | | A: +-------->| Header: POST (Code=0.02) | POST | Uri-Path:"token" | | Content-Format: application/ace+cbor | | Payload: <Request-Payload> | | B: |<--------+ Header: 2.05 Content | 2.05 | Content-Format: application/ace+cbor | | Payload: <Response-Payload> | | ]]></artwork></figure></t></figure> <t>The information contained in the Request-Payload and the Response-Payload is shown in <xreftarget="fig:RSOfflineReq"/>target="fig_RSOfflineReq" format="default"/>. Note that the parameter"rs_cnf"<tt>rs_cnf</tt> from <xreftarget="I-D.ietf-ace-oauth-params"/>target="RFC9201" format="default"/> is used to inform the client about the resource server's public key. </t> <figurealign="center" anchor="fig:RSOfflineReq" title="Requestanchor="fig_RSOfflineReq"> <name>Request and Response PayloadDetails."> <artwork align="left"><![CDATA[Details</name> <sourcecode name="" type="cbor-diag"><![CDATA[ Request-Payload : {"audience"/ audience / 5 : "tempSensorInLivingRoom","client_id"/ client_id / 24 : "myclient","req_cnf"/ req_cnf / 4 : {"COSE_Key"/ COSE_Key / 1 : {"kid"/ kid / 2 :b64'1Bg8vub9tLe1gHMzV76e8', "kty"b64'1Bg8vub9tLe1gHMzV76e', / kty / 1 :"EC", "crv"2 / EC2 /, / crv / -1 :"P-256", "x"1 / P-256 /, / x / -2 : b64'f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU',"y"/ y / -3 : b64'x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0' } } } Response-Payload : {"access_token"/ access_token / 1 :b64'0INDoQEKoQVNKkXfb7xaWqMTf6 ...', "rs_cnf"b64'0INDoQEKoQVNKkXfb7xaWqMT'/ .../, / rs_cnf / 41 : {"COSE_Key"/ COSE_Key / 1 : {"kid"/ kid / 2 : b64'c29tZSBwdWJsaWMga2V5IGlk',"kty"/ kty / 1 :"EC", "crv"2 / EC2 /, / crv / -1 :"P-256", "x"1 / P-256 /, / x / -2 : b64'MKBCTNIcKUSDii11ySs3526iDZ8AiTo7Tu6KPAqv7D4',"y"/ y / -3 : b64'4Etl6SRW2YiLUrN5vfvVHuhp7x8PxltmWWlbbM4IFyM' } } }]]></artwork> </figure></t>]]></sourcecode> </figure> <t>The content of the access token is shown in <xreftarget="fig:BothcborMappingValueAsymmetricCWT"/>.</t> <t><figure align="center" anchor="fig:BothcborMappingValueAsymmetricCWT" title="Accesstarget="fig_BothcborMappingValueAsymmetricCWT" format="default"/>.</t> <figure anchor="fig_BothcborMappingValueAsymmetricCWT"> <name>Access TokenincludingIncluding Public Key of theclient."> <artwork align="left"><![CDATA[Client</name> <sourcecode name="" type="cbor-diag"><![CDATA[ {"aud"/ aud / 3 : "tempSensorInLivingRoom","iat"/ iat / 6 :"1563451500", "exp"1563451500, / exp / 4 :"1563453000", "scope"1563453000, / scope / 9 : "temperature_g firmware_p","cnf"/ cnf / 8 : {"COSE_Key"/ COSE_Key / 1 : {"kid"/ kid / 2 :b64'1Bg8vub9tLe1gHMzV76e8', "kty"b64'1Bg8vub9tLe1gHMzV76e', / kty / 1 :"EC", "crv"2 / EC2 /, / crv / -1 :"P-256", "x"1 / P-256 /, / x / -2 : b64'f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU',"y"/ y / -3 : b64'x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0' } } }]]></artwork> </figure></t>]]></sourcecode> </figure> <t>Messages C and F are shown in Figures <xreftarget="fig:RSOfflinePostAccessTokenAsymmetric"/> -target="fig_RSOfflinePostAccessTokenAsymmetric" format="counter"/> and <xreftarget="fig:RSOfflineDTLSRequestAndResponse"/>. <list style="hanging"> <t>C:target="fig_RSOfflineDTLSRequestAndResponse" format="counter"/>.</t> <dl newline="false" spacing="normal" indent="4"> <dt>C:</dt> <dd> The client then sends the PoP access token to the authz-info endpoint at the RS. This is a plain CoAP POST request, i.e., no transport or application-layer security is used between the client and RS since the token is integrity protected between the AS and RS. The RS verifies that the PoP access token was created by a known and trusted AS,thatwhich it applies to this RS, and that it is valid. The RS caches the security context together with authorization information about this client contained in the PoP accesstoken.</t> <t><figure align="center" anchor="fig:RSOfflinePostAccessTokenAsymmetric" title="Accesstoken.</dd> </dl> <figure anchor="fig_RSOfflinePostAccessTokenAsymmetric"> <name>Access TokenprovisioningProvisioning toRS">the RS</name> <artworkalign="left"><![CDATA[align="left" name="" type="" alt=""><![CDATA[ Resource Client Server | | C: +-------->| Header: POST (Code=0.02) | POST | Uri-Path:"authz-info" | | Payload: 0INDoQEKoQVN ... | | |<--------+ Header: 2.04 Changed | 2.04 | | | ]]></artwork></figure></t></figure> <t>The client and the RS runs the DTLS handshake using the raw public keys established instepsteps B and C.</t> <t>The client sends a CoAP GET request to /temperature on the RS over DTLS. The RS verifies that the request isauthorized,authorized based on previously established security context.</t><t>F: The<dl newline="false" spacing="normal" indent="3"> <dt>F:</dt> <dd>The RS responds over the same DTLS channel with a CoAP 2.05 Contentresponse,response containing a resource representation aspayload.</t> </list></t> <t><figure align="center" anchor="fig:RSOfflineDTLSRequestAndResponse" title="Resourcepayload.</dd> </dl> <figure anchor="fig_RSOfflineDTLSRequestAndResponse"> <name>Resource Request and ResponseprotectedProtected byDTLS.">DTLS</name> <artworkalign="left"><![CDATA[align="left" name="" type="" alt=""><![CDATA[ Resource Client Server | | |<=======>| DTLS Connection Establishment | | using Raw Public Keys | | +-------->| Header: GET (Code=0.01) | GET | Uri-Path: "temperature" | | | | | | F: |<--------+ Header: 2.05 Content | 2.05 | Payload: <sensor value> | | ]]></artwork></figure></t></figure> </section><!-- ************************** --><section anchor="introspectionAidedTokenValidation"title="Introspectionnumbered="true" toc="default"> <name>Introspection Aided TokenValidation">Validation</name> <t>In this deploymentscenarioscenario, it is assumed that a client is not able to access the AS at the time of the access request, whereas the RS is assumed to be connected to the back-end infrastructure.ThusThus, the RS can make use of token introspection. This access procedure involves stepsA-F(A)-(F) of <xreftarget="fig:protocolFlow"/>,target="fig_protocolFlow" format="default"/> but assumes stepsA(A) andB(B) have been carried out during a phase when the client had connectivity to the AS. </t> <t>Since the client is assumed to be offline, at least for a certain period of time, apre-provisionedpreprovisioned access token has to belong-lived.long lived. Since the client is constrained, the token will not beself contained (i.e.self-contained (i.e., not a CWT) but instead just a reference. The resource server uses its connectivity to learn about the claims associated to the access token by using introspection, which is shown in the example below.</t> <t>In theexampleexample, interactions between an offline client (key fob), an RS (online lock), and an AS is shown. It is assumed that there is a provisioning step where the client has access to the AS. This corresponds to message exchanges A andBB, which are shown in <xreftarget="fig:cOffline"/>.target="fig_cOffline" format="default"/>. </t> <t>Authorization consent from the resource owner can bepre-configured,preconfigured, but it can also be provided via an interactive flow with the resource owner. An example of this for the key fob case could be that the resource owner has a connectedcar, hecar and buys a generic keythat he wantsto use with the car. To authorize the keyfob hefob, the owner connects it tohisa computer that then provides the UI for the device. Afterthatthat, OAuth 2.0 implicit flow can be used to authorize the key forhisthe car at the carmanufacturersmanufacturer's AS.</t> <t>Note: In thisexampleexample, the client does not know the exact door it will be used to access since the token request is notsendsent at the time of access. So thescope<tt>scope</tt> andaudience<tt>audience</tt> parameters are set quite wide to start with, while tailored values narrowing down the claims to the specific RS being accessed can be provided to that RS during an introspection step.</t><t> <list style="hanging"> <t>A: The<dl newline="false" spacing="normal" indent="4"> <dt>A:</dt> <dd>The client sends a CoAP POST request to the token endpoint at the AS. The request contains theAudience<tt>audience</tt> parameter set to "PACS1337"(PACS, Physical(Physical AccessSystem),System (PACS)), a valuethethat identifies the physical access control system to which the individual doors are connected. The AS generates an access token as an opaque string, which it can match to the specific client and the targeted audience. It furthermore generates a symmetric proof-of-possession key. The communication security and authentication between the client and AS is assumed to have been provided at the transport layer(e.g.(e.g., via DTLS) using a pre-shared security context(psk, rpk(pre-shared key (PSK), RPK, orcertificate).</t> <t>B: Thecertificate).</dd> <dt>B:</dt> <dd>The AS responds with a CoAP 2.05 Content response, containing as payload the Access Information, including the access token and the symmetric proof-of-possession key. Communication security between the C and RS will be DTLS and PreSharedKey. The PoP key is used as the PreSharedKey.</t> </list> </t></dd> </dl> <t>Note: In thisexampleexample, we are using a symmetric key for a multi-RS audience, which is not recommended normally (see <xreftarget="audience"/>). Howevertarget="audience" format="default"/>). However, in thiscasecase, the risk is deemed to be acceptable, since all the doors are part of the same physical access controlsystem, and thereforesystem; therefore, the risk of a malicious RS impersonating the client towards another RS is low.</t><t><figure align="center" anchor="fig:cOffline" title="Token<figure anchor="fig_cOffline"> <name>Token Request and ResponseusingUsing ClientCredentials.">Credentials</name> <artworkalign="left"><![CDATA[align="left" name="" type="" alt=""><![CDATA[ Authorization Client Server | | |<=======>| DTLS Connection Establishment | | and mutual authentication | | A: +-------->| Header: POST (Code=0.02) | POST | Uri-Path:"token" | | Content-Format: application/ace+cbor | | Payload: <Request-Payload> | | B: |<--------+ Header: 2.05 Content | | Content-Format: application/ace+cbor | 2.05 | Payload: <Response-Payload> | | ]]></artwork></figure></t></figure> <t>The information contained in the Request-Payload and the Response-Payload is shown in <xreftarget="fig:cOfflineReq"/>.target="fig_cOfflineReq" format="default"/>. </t> <figurealign="center" anchor="fig:cOfflineReq" title="Requestanchor="fig_cOfflineReq"> <name>Request and Response Payload for the Coffline"> <artwork align="left"><![CDATA[Offline</name> <sourcecode name="" type="cbor-diag"><![CDATA[ Request-Payload: {"client_id"/ client_id / 24 : "keyfob","audience"/ audience / 5 : "PACS1337" } Response-Payload: {"access_token"/ access_token / 1 :b64'VGVzdCB0b2tlbg==', "cnf"b64'VGVzdCB0b2tlbg', / cnf / 8 : {"COSE_Key"/ COSE_Key / 1 : {"kid"/ kid / 2 : b64'c29tZSBwdWJsaWMga2V5IGlk',"kty"/ kty / 1 :"oct", "alg"4 / Symmetric /, / k / -1 :"HS256", "k":b64'ZoRSOrFzN_FzUA5XKMYoVHyzff5oRJxl-IXRtztJ6uE' } } }]]></artwork> </figure></t> <t>The]]></sourcecode> </figure> <t>In this case, the access tokenin this caseis just an opaque byte string referencing the authorization information at the AS.</t><t><list style="hanging"> <t>C: Next,<dl newline="false" spacing="normal" indent="4"> <dt>C:</dt> <dd>Next, the client POSTs the access token to the authz-info endpoint in the RS. This is a plain CoAP request, i.e., no DTLS between the client and RS. Since the token is an opaque string, the RS cannot verify it on its own, and thus defers to respond to the client with a status code until after stepE.</t> <t>D: TheE.</dd> <dt>D:</dt> <dd>The RS sends the token to the introspection endpoint on the AS using a CoAP POST request. In thisexampleexample, the RS and AS are assumed to have performed mutual authentication using apre sharedpre-shared security context(psk, rpk(PSK, RPK, or certificate) with the RS acting as the DTLSclient. </t> <t>E: Theclient.</dd> <dt>E:</dt> <dd> <t>The AS provides the introspection response (2.05 Content) containing parameters about the token. This includes the confirmation key(cnf)(<tt>cnf</tt>) parameter that allows the RS to verify the client's proof of possession in step F. Note that our example in <xreftarget="fig:cOfflineIntroReq"/>target="fig_cOfflineIntroReq" format="default"/> assumes apre-establishedpreestablished key(e.g.(e.g., one used by the client and the RS for a previous token) that is now only referenced by itskey-identifier 'kid'. </t>key identifier <tt>kid</tt>.</t> <t>After receiving message E, the RS responds to the client's POST in step C with the CoAP response code 2.01 (Created).</t><t><figure align="center" anchor="fig:cOfflineIntrospection" title="Token</dd> </dl> <figure anchor="fig_cOfflineIntrospection"> <name>Token Introspection for the Coffline">Offline</name> <artworkalign="left"><![CDATA[align="left" name="" type="" alt=""><![CDATA[ Resource Client Server | | C: +-------->| Header: POST (T=CON, Code=0.02) | POST | Uri-Path:"authz-info" | | Payload:b64'VGVzdCB0b2tlbg=='b64'VGVzdCB0b2tlbg' | | | | Authorization | | Server | | | | D: +--------->| Header: POST (Code=0.02) | | POST | Uri-Path: "introspect" | | | Content-Format:"application/ace+cbor"application/ace+cbor | | | Payload: <Request-Payload> | | | | E: |<---------+ Header: 2.05 Content | | 2.05 | Content-Format:"application/ace+cbor"application/ace+cbor | | | Payload: <Response-Payload> | | | | | |<--------+ Header: 2.01 Created | 2.01 | | | ]]></artwork></figure></t></figure> <t>The information contained in the Request-Payload and the Response-Payload is shown in <xreftarget="fig:cOfflineIntroReq"/>.target="fig_cOfflineIntroReq" format="default"/>. </t> <figurealign="center" anchor="fig:cOfflineIntroReq" title="Requestanchor="fig_cOfflineIntroReq"> <name>Request and Response Payload forIntrospection"> <artwork align="left"><![CDATA[Introspection</name> <sourcecode name="" type="cbor-diag"><![CDATA[ Request-Payload: {"token"/ token / 11 :b64'VGVzdCB0b2tlbg==', "client_id"b64'VGVzdCB0b2tlbg', / client_id / 24 :"FrontDoor","FrontDoor" } Response-Payload: {"active"/ active / 10 : true,"aud"/ aud / 3 : "lockOfDoor4711","scope"/ scope / 9 :"open,"open close","iat"/ iat / 6 : 1563454000,"cnf"/ cnf / 8 : {"kid"/ kid / 3 : b64'c29tZSBwdWJsaWMga2V5IGlk' } }]]></artwork> </figure></t> </list> </t> <t> <list style="hanging"> <t> The]]></sourcecode> </figure> <t>The client uses the symmetric PoP key to establish a DTLS PreSharedKey secure connection to the RS. The CoAP request PUT is sent to the uri-path /state on the RS, changing the state of the door tolocked. </t> <t> F: Thelocked.</t> <dl newline="false" spacing="normal" indent="4"> <dt>F:</dt> <dd>The RS responds withaan appropriate response over the secure DTLSchannel. </t> </list> </t> <t><figure align="center" anchor="fig:cOfflineDTLSRequestAndResponse" title="Resource requestchannel.</dd> </dl> <figure anchor="fig_cOfflineDTLSRequestAndResponse"> <name>Resource Request andresponse protectedResponse Protected byOSCORE">OSCORE</name> <artworkalign="left"><![CDATA[align="left" name="" type="" alt=""><![CDATA[ Resource Client Server | | |<=======>| DTLS Connection Establishment | | using Pre Shared Key | | +-------->| Header: PUT (Code=0.03) | PUT | Uri-Path: "state" | | Payload: <new state for the lock> | | F: |<--------+ Header: 2.04 Changed | 2.04 | Payload: <new state for the lock> | | ]]></artwork></figure></t></figure> </section> </section> <section anchor="Acknowledgments" numbered="false" toc="default"> <name>Acknowledgments</name> <t>This document is a product of the ACE Working Group of the IETF.</t> <t>Thanks to <contact fullname="Eve Maler"/> for her contributions to the use of OAuth 2.0 and Unlicensed Mobile Access (UMA) in IoT scenarios, <contact fullname="Robert Taylor"/> for his discussion input, and <contact fullname="Mališa Vučinić"/> for his input on the predecessors of this proposal.</t> <t>Thanks to the authors of "<xref target="I-D.ietf-oauth-pop-key-distribution" format="default"/><xref target="I-D.ietf-oauth-pop-key-distribution" format="title"/>" <xref target="I-D.ietf-oauth-pop-key-distribution" format="default"/>, from where parts of the security considerations where copied.</t> <t>Thanks to <contact fullname="Stefanie Gerdes"/>, <contact fullname="Olaf Bergmann"/>, and <contact fullname="Carsten Bormann"/> for contributing their work on AS discovery from "<xref target="I-D.gerdes-ace-dcaf-authorize" format="title"/>" <xref target="I-D.gerdes-ace-dcaf-authorize" format="default"/> (see <xref target="asDiscovery" format="default"/>) and the considerations on multiple access tokens.</t> <t>Thanks to <contact fullname="Jim Schaad"/> and <contact fullname="Mike Jones"/> for their comprehensive reviews.</t> <t>Thanks to <contact fullname="Benjamin Kaduk"/> for his input on various questions related to this work.</t> <t>Thanks to <contact fullname="Cigdem Sengul"/> for some very useful review comments.</t> <t>Thanks to <contact fullname="Carsten Bormann"/> for contributing the text for the CoRE Resource Type registry.</t> <t>Thanks to <contact fullname="Roman Danyliw"/> for suggesting <xref target="app_diffOAuth" format="default"/> (including its contents).</t> <t><contact fullname="Ludwig Seitz"/> and <contact fullname="Göran Selander"/> worked on this document as part of the CelticPlus project CyberWI, with funding from Vinnova. <contact fullname="Ludwig Seitz"/> has also received further funding for this work by Vinnova in the context of the CelticNext project CRITISEC.</t> </section> </back> </rfc>