ACE Working Group                                               L. Seitz
Internet-Draft                                                 Combitech
Intended status: Standards Track                             G. Selander
Expires: September 9, October 18, 2021                                       Ericsson
                                                           E. Wahlstroem

                                                              S. Erdtman
                                                              Spotify AB
                                                           H. Tschofenig
                                                                Arm Ltd.
                                                           March 8,
                                                          April 16, 2021

  Authentication and Authorization for Constrained Environments (ACE)
               using the OAuth 2.0 Framework (ACE-OAuth)
                     draft-ietf-ace-oauth-authz-38
                     draft-ietf-ace-oauth-authz-39

Abstract

   This specification defines a framework for authentication and
   authorization in Internet of Things (IoT) environments called ACE-
   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.

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at https://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on September 9, October 18, 2021.

Copyright Notice

   Copyright (c) 2021 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (https://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   4
   2.  Terminology . . . . . . . . . . . . . . . . . . . . . . . . .   5
   3.  Overview  . . . . . . . . . . . . . . . . . . . . . . . . . .   6
     3.1.  OAuth 2.0 . . . . . . . . . . . . . . . . . . . . . . . .   7
     3.2.  CoAP  . . . . . . . . . . . . . . . . . . . . . . . . . .  10
   4.  Protocol Interactions . . . . . . . . . . . . . . . . . . . .  11
   5.  Framework . . . . . . . . . . . . . . . . . . . . . . . . . .  15  14
     5.1.  Discovering Authorization Servers . . . . . . . . . . . .  16
     5.2.  Unauthorized Resource Request Message . . . . . . . . . .  17  16
     5.3.  AS Request Creation Hints . . . . . . . . . . . . . . . .  17
       5.3.1.  The Client-Nonce Parameter  . . . . . . . . . . . . .  19
     5.4.  Authorization Grants  . . . . . . . . . . . . . . . . . .  20
     5.5.  Client Credentials  . . . . . . . . . . . . . . . . . . .  21
     5.6.  AS Authentication . . . . . . . . . . . . . . . . . . . .  21
     5.7.  The Authorization Endpoint  . . . . . . . . . . . . . . .  21
     5.8.  The Token Endpoint  . . . . . . . . . . . . . . . . . . .  22  21
       5.8.1.  Client-to-AS Request  . . . . . . . . . . . . . . . .  22
       5.8.2.  AS-to-Client Response . . . . . . . . . . . . . . . .  25
       5.8.3.  Error Response  . . . . . . . . . . . . . . . . . . .  27
       5.8.4.  Request and Response Parameters . . . . . . . . . . .  28
         5.8.4.1.  Grant Type  . . . . . . . . . . . . . . . . . . .  29  28
         5.8.4.2.  Token Type  . . . . . . . . . . . . . . . . . . .  29
         5.8.4.3.  Profile . . . . . . . . . . . . . . . . . . . . .  29
         5.8.4.4.  Client-Nonce  . . . . . . . . . . . . . . . . . .  30
       5.8.5.  Mapping Parameters to CBOR  . . . . . . . . . . . . .  30
     5.9.  The Introspection Endpoint  . . . . . . . . . . . . . . .  31
       5.9.1.  Introspection Request . . . . . . . . . . . . . . . .  32
       5.9.2.  Introspection Response  . . . . . . . . . . . . . . .  33
       5.9.3.  Error Response  . . . . . . . . . . . . . . . . . . .  34
       5.9.4.  Mapping Introspection parameters Parameters to CBOR  . . . . . .  35
     5.10. The Access Token  . . . . . . . . . . . . . . . . . . . .  35
       5.10.1.  The Authorization Information Endpoint . . . . . . .  36
         5.10.1.1.  Verifying an Access Token  . . . . . . . . . . .  37
         5.10.1.2.  Protecting the Authorization       Information
                    Endpoint . . . . . . . . . . . . . . . . . . . .  39
       5.10.2.  Client Requests to the RS  . . . . . . . . . . . . .  39
       5.10.3.  Token Expiration . . . . . . . . . . . . . . . . . .  40
       5.10.4.  Key Expiration . . . . . . . . . . . . . . . . . . .  41  42
   6.  Security Considerations . . . . . . . . . . . . . . . . . . .  42
     6.1.  Protecting Tokens . . . . . . . . . . . . . . . . . . . .  42
     6.2.  Communication Security  . . . . . . . . . . . . . . . . .  43
     6.3.  Long-Term Credentials . . . . . . . . . . . . . . . . . .  44
     6.4.  Unprotected AS Request Creation Hints . . . . . . . . . .  44  45
     6.5.  Minimal security requirements Security Requirements        for communication Communication  .  45
     6.6.  Token Freshness and Expiration  . . . . . . . . . . . . .  46
     6.7.  Combining profiles Profiles  . . . . . . . . . . . . . . . . . . .  46  47
     6.8.  Unprotected Information . . . . . . . . . . . . . . . . .  47
     6.9.  Identifying audiences Audiences . . . . . . . . . . . . . . . . . .  47  48
     6.10. Denial of service against Service Against or with      Introspection  . .  48
   7.  Privacy Considerations  . . . . . . . . . . . . . . . . . . .  49
   8.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  50
     8.1.  ACE Authorization Server Request Creation Hints . . . . .  50
     8.2.  CoRE Resource Type registry Registry . . . . . . . . . . . . . . .  50  51
     8.3.  OAuth Extensions Error Registration . . . . . . . . . . .  51
     8.4.  OAuth Error Code CBOR Mappings Registry . . . . . . . . .  51
     8.5.  OAuth Grant Type CBOR Mappings  . . . . . . . . . . . . .  51  52
     8.6.  OAuth Access Token Types  . . . . . . . . . . . . . . . .  52
     8.7.  OAuth Access Token Type CBOR Mappings . . . . . . . . . .  52
       8.7.1.  Initial Registry Contents . . . . . . . . . . . . . .  53
     8.8.  ACE Profile Registry  . . . . . . . . . . . . . . . . . .  53
     8.9.  OAuth Parameter Registration  . . . . . . . . . . . . . .  53  54
     8.10. OAuth Parameters CBOR Mappings Registry . . . . . . . . .  54
     8.11. OAuth Introspection Response Parameter Registration . . .  54
     8.12. OAuth Token Introspection Response CBOR Mappings Registry  55
     8.13. JSON Web Token Claims . . . . . . . . . . . . . . . . . .  55
     8.14. CBOR Web Token Claims . . . . . . . . . . . . . . . . . .  56
     8.15. Media Type Registrations  . . . . . . . . . . . . . . . .  57
     8.16. CoAP Content-Format Registry  . . . . . . . . . . . . . .  57  58
     8.17. Expert Review Instructions  . . . . . . . . . . . . . . .  58
   9.  Acknowledgments . . . . . . . . . . . . . . . . . . . . . . .  59
   10. References  . . . . . . . . . . . . . . . . . . . . . . . . .  59
     10.1.  Normative References . . . . . . . . . . . . . . . . . .  59
     10.2.  Informative References . . . . . . . . . . . . . . . . .  62
   Appendix A.  Design Justification . . . . . . . . . . . . . . . .  65
   Appendix B.  Roles and Responsibilities . . . . . . . . . . . . .  68
   Appendix C.  Requirements on Profiles . . . . . . . . . . . . . .  71
   Appendix D.  Assumptions on AS knowledge Knowledge about C and RS . . . . .  71  72
   Appendix E.  Deployment Examples  . . . . . . . . . . . . . . . .  72
     E.1.  Local Token Validation  . . .  Differences to OAuth 2.0 . . . . . . . . . . . . . .  72
     E.2.  Introspection Aided Token Validation  . . . . . . . . . .  76
   Appendix F.  Document Updates . .  Deployment Examples  . . . . . . . . . . . . . . . .  80  73
     F.1.  Version -21 to 22 . . .  Local Token Validation  . . . . . . . . . . . . . . . . .  81  73
     F.2.  Version -20 to 21 . . . . . . . . . . . . . . . . . . . .  81
     F.3.  Version -19 to 20 . . . . . . . . . . . . . . . . . . . .  81
     F.4.  Version -18 to -19  . . . . .  Introspection Aided Token Validation  . . . . . . . . . .  77
   Authors' Addresses  . . . .  81
     F.5.  Version -17 to -18 . . . . . . . . . . . . . . . . . . .  81
     F.6.  Version -16

1.  Introduction

   Authorization is the process for granting approval to -17  . . . . . . . . . . . . . . . . . . .  81
     F.7.  Version -15 an entity to -16  . . . . . . . . . . . . . . . . . . .  82
     F.8.  Version -14
   access a generic resource [RFC4949].  The authorization task itself
   can best be described as granting access to -15  . . . . . . . . . . . . . . . . . . .  82
     F.9.  Version -13 to -14  . . . . . . . . . . . . . . . . . . .  82
     F.10. Version -12 to -13  . . . . . . . . . . . . . . . . . . .  82
     F.11. Version -11 to -12  . . . . . . . . . . . . . . . . . . .  83
     F.12. Version -10 to -11  . . . . . . . . . . . . . . . . . . .  83
     F.13. Version -09 to -10  . . . . . . . . . . . . . . . . . . .  83
     F.14. Version -08 to -09  . . . . . . . . . . . . . . . . . . .  83
     F.15. Version -07 to -08  . . . . . . . . . . . . . . . . . . .  83
     F.16. Version -06 to -07  . . . . . . . . . . . . . . . . . . .  84
     F.17. Version -05 to -06  . . . . . . . . . . . . . . . . . . .  84
     F.18. Version -04 to -05  . . . . . . . . . . . . . . . . . . .  84
     F.19. Version -03 to -04  . . . . . . . . . . . . . . . . . . .  85
     F.20. Version -02 to -03  . . . . . . . . . . . . . . . . . . .  85
     F.21. Version -01 to -02  . . . . . . . . . . . . . . . . . . .  85
     F.22. Version -00 to -01  . . . . . . . . . . . . . . . . . . .  86
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  86

1.  Introduction

   Authorization is the process for granting approval to an entity to
   access a generic resource [RFC4949].  The authorization task itself
   can best be described as granting access to a requesting client, for
   a resource hosted on a device, the resource server (RS).  This
   exchange is mediated by one or multiple authorization servers (AS).
   Managing authorization for a large number of devices and users can be
   a complex task.

   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 web
   applications on constrained nodes, this specification RECOMMENDS the
   use of the Constrained Application Protocol (CoAP) [RFC7252] as
   replacement for HTTP.

   Appendix A gives an overview of the constraints considered in this
   design, and a more detailed treatment of constraints can be found in
   [RFC7228].  This design aims to accommodate different IoT deployments
   and thus a continuous range of device and network capabilities.

   Taking energy consumption as an example: At one end there are energy-
   harvesting or battery powered devices which have a tight power
   budget, on the other end there are mains-powered devices, and all
   levels in between.

   Hence, IoT devices may be very different in terms of available
   processing and message exchange capabilities and there is a need to
   support many different authorization use cases [RFC7744].

   This specification describes a framework for authentication and
   authorization in constrained environments (ACE) built on re-use of
   OAuth 2.0 [RFC6749], thereby extending authorization to Internet of
   Things devices.  This specification contains the necessary building
   blocks for adjusting OAuth 2.0 to IoT environments.

   More detailed, interoperable specifications can be found in separate
   profile specifications.  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.  Some devices, such as mobile phones
   and tablets, may implement multiple profiles and will therefore be
   able to interact with a wider range of low end devices.  Requirements
   on profiles are described at contextually appropriate places
   throughout this specification, and also summarized in Appendix C.

2.  Terminology

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
   "OPTIONAL" in this document are to be interpreted as described in BCP
   14 [RFC2119] [RFC8174] when, and only when, they appear in all
   capitals, as shown here.

   Certain security-related terms such as "authentication",
   "authorization", "confidentiality", "(data) integrity", "message
   authentication code", and "verify" are taken from [RFC4949].

   Since exchanges in this specification are described as RESTful
   protocol interactions, HTTP [RFC7231] offers useful terminology.

   Terminology for entities in the architecture is defined in OAuth 2.0
   [RFC6749] such as client (C), resource server (RS), and authorization
   server (AS).

   Note that the term "endpoint" is used here following its OAuth
   definition, which is to denote resources such as token and
   introspection at the AS and authz-info at the RS (see Section 5.10.1
   for a definition of the authz-info endpoint).  The CoAP [RFC7252]
   definition, which is "An entity participating in the CoAP protocol"
   is not used in this specification.

   The specifications in this document is called the "framework" or "ACE
   framework".  When referring to "profiles of this 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).

   We use the term "Access Information" for parameters other than the
   access token provided to the client by the AS to enable it to access
   the RS (e.g. public key of the RS, profile supported by RS).

   We use the term "Authorization Information" to denote all
   information, including the claims of relevant access tokens, that an
   RS uses to determine whether an access request should be granted.

3.  Overview

   This specification defines the ACE framework for authorization in the
   Internet of Things environment.  It consists of a set of building
   blocks.

   The basic block is the OAuth 2.0 [RFC6749] framework, which enjoys
   widespread deployment.  Many IoT devices can support OAuth 2.0
   without any additional extensions, but for certain constrained
   settings additional profiling is needed.

   Another building block is the lightweight web transfer protocol CoAP
   [RFC7252], 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 [RFC7540], Message Queuing Telemetry Transport (MQTT)
   [MQTT5.0], Bluetooth Low Energy (BLE) [BLE] and QUIC
   [I-D.ietf-quic-transport].  Note that this document specifies
   protocol exchanges in terms of RESTful verbs such as GET and POST.
   Future profiles using protocols that do not support these verbs MUST
   specify how the corresponding protocol messages are transmitted
   instead.

   A third building block is the Concise Binary Object Representation
   (CBOR) [RFC8949], for encodings where JSON [RFC8259] is not
   sufficiently compact.  CBOR is a binary encoding designed for small
   code and message size, which may be used for encoding of self
   contained tokens, and also for encoding payloads transferred in
   protocol messages.

   A fourth building block is CBOR Object Signing and Encryption (COSE)
   [RFC8152], which enables object-level layer security as an
   alternative or complement to transport layer security (DTLS [RFC6347]
   or TLS [RFC8446]).  COSE is used to secure self-contained tokens 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) [RFC8392].  Application layer security for CoAP using
   COSE can be provided with OSCORE [RFC8613].

   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 [RFC7228] and a description of
   how the building blocks mentioned above relate to the various
   constraints can be found in Appendix A.

   Luckily, not every IoT device suffers from all constraints.  The ACE
   framework nevertheless takes all these aspects into account and
   allows several different deployment variants to co-exist, 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.

3.1.  OAuth 2.0

   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.

   A number of OAuth 2.0 terms are used within this specification:

   The token and introspection Endpoints:
      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).
      In some deployments, a token introspection endpoint is provided by
      the AS, which can be used by the RS if it needs to request
      additional information regarding a received access token.  The RS
      makes a POST request to the introspection endpoint on the AS and
      receives information about the access token in the response.  (See
      "Introspection" below.)

   Access Tokens:
      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.

      Access tokens can have different formats, and various methods of
      utilization e.g., cryptographic properties) based on the security
      requirements of the given deployment.

   Refresh Tokens:
      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 token becomes invalid or 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 Figure 1).

      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.

   Proof of Possession Tokens:
      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).

      The proof-of-possession (PoP) 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, these so 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 "access token" it is assumed to be a
      PoP access token token unless specifically stated otherwise.

      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.

      Symmetric PoP key:
         The AS generates a random symmetric PoP key.  The key is either
         stored to be returned on introspection calls or encrypted and
         included in the token.  The PoP key is also encrypted for the
         token recipient and sent to the recipient together with the
         token.

      Asymmetric PoP key:
         An asymmetric key pair is generated on the token's recipient
         and the public key is sent to the AS (if it does not already
         have knowledge of the recipient'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 requesting party.  The
         consumer of the token can identify the public key from the
         information in the token, which allows the recipient of the
         token to use the corresponding private key for the proof of
         possession.

      The token is either a simple reference, or a structured
      information object (e.g., CWT [RFC8392]) protected by a
      cryptographic wrapper (e.g., COSE [RFC8152]).  The choice of PoP
      key does not necessarily imply a specific credential type for the
      integrity protection of the token.

   Scopes and Permissions:
      In OAuth 2.0, the client specifies the type of permissions it is
      seeking to obtain (via the scope parameter) in the access token
      request.  In turn, the AS may use the scope 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 CBOR encoding, see Section 5, for such requests
      and responses.

      The values of the scope parameter in OAuth 2.0 are expressed as a
      list of space-delimited, case-sensitive strings, with a semantic
      that is well-known to the AS and the RS.  More details about the
      concept of scopes is found under Section 3.3 in [RFC6749].

   Claims:
      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" claim) and what audience
      the access token is intended for (via the "aud" claim).  The
      audience of an access token can be a specific resource or one or
      many resource servers.  The resource owner policies influence what
      claims are put into the access token by the authorization server.

      While the structure and encoding of the access token varies
      throughout deployments, a standardized format has been defined
      with the JSON Web Token (JWT) [RFC7519] where claims are encoded
      as a JSON object.  In [RFC8392], an equivalent format using CBOR
      encoding (CWT) has been defined.

   Introspection:
      Introspection is a method for a resource server 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 opaque reference rather
      than a self-contained token.  More information about introspection
      in OAuth 2.0 can be found in [RFC7662].

3.2.  CoAP

   CoAP is an application layer protocol similar to 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.

   While HTTP uses headers and query strings to convey additional
   information about a request, CoAP encodes such information into
   header parameters called 'options'.

   CoAP supports application-layer fragmentation of the CoAP payloads
   through blockwise transfers [RFC7959].  However, blockwise transfer
   does not increase the size limits of CoAP options, therefore data
   encoded in options has to be kept small.

   Transport layer security for CoAP can be provided by DTLS or TLS
   [RFC6347][RFC8446] [I-D.ietf-tls-dtls13].  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
   security mechanism such as COSE [RFC8152].

   One application of COSE is OSCORE [RFC8613], 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.

   This framework RECOMMENDS the use of CoAP as replacement for HTTP for
   use in constrained environments.  For communication security this
   framework does not make an explicit protocol recommendation, since
   the choice depends on the requirements of the specific application.
   DTLS [RFC6347], [I-D.ietf-tls-dtls13] and OSCORE [RFC8613] are
   mentioned as examples, other protocols fulfilling the requirements
   from Section 6.5 are also applicable.

4.  Protocol Interactions

   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
   most deployments the RS can process the access token locally, however
   in some cases the RS may present it to the AS via the introspection
   endpoint to get fresh information.  These interactions are shown in
   Figure 1.  An overview of various OAuth concepts is provided in
   Section 3.1.

   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 [RFC7521] and [RFC8628]).  What grant types works
   best depends on the usage scenario and [RFC7744] describes many
   different IoT use cases but there are two preferred grant types,
   namely the Authorization Code Grant (described in Section 4.1 of
   [RFC7521]) and the Client Credentials Grant (described in Section 4.4
   of [RFC7521]).  The Authorization Code Grant is a good fit for use
   with apps running on smart phones 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 [RFC8252] are applicable to this use case.
   The Client Credential Grant is a good fit for use with IoT devices
   where the OAuth client itself is constrained.  In such a case, the
   resource owner has pre-arranged access rights for the client with the
   authorization server, which is often accomplished using a
   commissioning tool.

   The consent of the resource owner, for giving a client access to a
   protected resource, can be provided dynamically as in the traditional
   OAuth flows, or it could be pre-configured 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 Figure 1.

   This framework supports a wide variety of communication security
   mechanisms between the ACE entities, such as 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.

   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 be modified, and if needed, that the
   content is confidentiality protected.

   The keying material necessary for establishing communication security
   between C and RS is dynamically established as part of the protocol
   described in this document.

   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 Section 5.1; profiles MAY define other
   procedures for discovery.

   In Bluetooth Low Energy, for example, advertisements are broadcasted
   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 standardized format as described in [RFC6690].

   +--------+                               +---------------+
   |        |---(A)-- Token Request ------->|               |
   |        |                               | Authorization |
   |        |<--(B)-- Access Token ---------|    Server     |
   |        |    + Access Information       |               |
   |        |    + Refresh Token (optional) +---------------+
   |        |                                      ^ |
   |        |            Introspection Request  (D)| |
   | Client |                  (optional)          | |
   |        |                         Response     | |(E)
   |        |                         (optional)   | v
   |        |                               +--------------+
   |        |---(C)-- Token + Request ----->|              |
   |        |                               |   Resource   |
   |        |<--(F)-- Protected Resource ---|    Server    |
   |        |                               |              |
   +--------+                               +--------------+

                      Figure 1: Basic Protocol Flow.

   Requesting an Access Token (A):
      The client makes an access token request to the token endpoint at
      the AS.  This framework assumes the use of PoP access tokens (see
      Section 3.1 for a short description) wherein the AS binds a key to
      an access token.  The client may include permissions it seeks to
      obtain, and information about the credentials it wants to use
      (e.g., symmetric/asymmetric cryptography or a reference to a
      specific credential).

   Access Token Response (B):
      If the AS successfully processes the request from the client, it
      returns an access token and optionally a refresh token (note that
      only certain grant types support refresh tokens).  It 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. the profiles the RS supports.  More information about
      these parameters can be found in Section 5.8.4.

   Resource Request (C):
      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, QUIC, MQTT, Bluetooth Low Energy, etc., are also
      viable candidates.

      Depending on the device limitations and the selected protocol,
      this exchange may be split up into two parts:

         (1) the client sends the access token containing, or
         referencing, the authorization information to the RS, that may
         be used for subsequent resource requests by the client, and

         (2) the client makes the resource access request, using the
         communication security protocol and other Access Information
         obtained from the AS.

      The Client and the RS mutually authenticate using the security
      protocol specified in the profile (see step 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 messages D
      and E) over HTTP or CoAP.

   Token Introspection Request (D):
      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 Section 5.9 and
      for HTTP in [RFC7662].

      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 its own.

   Token Introspection Response (E):
      The AS validates the token and returns the most recent parameters,
      such as scope, audience, 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 deny it.

   Protected Resource (F):
      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 the
      response, according to the communication security protocol used.

5.  Framework

   The following sections detail the profiling and extensions of OAuth
   2.0 for constrained environments, which constitutes the ACE
   framework.

   Credential Provisioning
      For IoT, it cannot be assumed that the client and RS are part of a
      common key infrastructure, so the AS provisions credentials or
      associated information to allow mutual authentication between
      client and RS.  The resulting security association between client
      and RS may then also be used to bind these credentials to the
      access tokens the client uses.

   Proof-of-Possession
      The ACE framework, by default, implements proof-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" claim [RFC8747] indicating what key is used for 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.

   ACE Profiles
      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 client and RS are defined in an ACE
      profile.  In ACE framework 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" parameter in the token response.

   OAuth 2.0 requires the use of TLS both to protect the communication
   between AS and client when requesting an access token; between client
   and RS when accessing a resource and between AS and RS if
   introspection is used.  In constrained settings TLS is not always
   feasible, or desirable.  Nevertheless it is REQUIRED that the
   communications named above are encrypted, integrity protected and
   protected against message replay.  It is also REQUIRED that the
   communicating endpoints perform mutual authentication.  Furthermore
   it MUST 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. sending the token from the client to the
   RS).

   Profiles MUST specify a communication security protocol between
   client and RS that provides the features required above.  Profiles
   MUST specify a communication security protocol RECOMMENDED to be used
   between client and AS that provides the features required above.
   Profiles MUST specify requesting client, for introspection
   a communication security
   protocol RECOMMENDED to be used between RS and AS that provides the
   features required above.  These recommendations enable
   interoperability between different implementations without the need
   to define resource hosted on a new profile if device, the communication between C and AS, resource server (RS).  This
   exchange is mediated by one or
   between RS multiple authorization servers (AS).
   Managing authorization for a large number of devices and AS, is protected with users can be
   a different security protocol
   complying with the security requirements above.

   In OAuth 2.0 the communication with complex task.

   While prior work on authorization solutions for the Token Web and for 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 is
   REQUIRED
   mobile environment also applies to use of the following alternative instead Internet of Uri-query
   parameters: The sender (client or RS) encodes the parameters Things (IoT)
   environment, many IoT devices are constrained, for example, in terms
   of its
   request as a CBOR map and submits that map as processing capabilities, available memory, etc.  For such devices
   the payload Constrained Application Protocol (CoAP) [RFC7252] can alleviate
   some resource concerns when used instead of HTTP to implement the POST
   request.

   Profiles that use CBOR encoding
   communication flows of this specification.

   Appendix A gives an overview of protocol message parameters at the
   outermost encoding layer MUST use the media format 'application/
   ace+cbor'.  If CoAP is used for communication, the Content-Format
   MUST be abbreviated with the ID: 19 (see Section 8.16).

   The OAuth 2.0 AS uses a JSON structure constraints considered in the payload this
   design, and a more detailed treatment of its
   responses both constraints can be found in
   [RFC7228].  This design aims to client accommodate different IoT deployments
   and RS.  If CoAP is used, it is REQUIRED to
   use CBOR [RFC8949] instead thus a continuous range of JSON.  Depending device and network capabilities.
   Taking energy consumption as an example: At one end there are energy-
   harvesting or battery powered devices which have a tight power
   budget, on the profile, the
   CBOR payload MAY be enclosed other end there are mains-powered devices, and all
   levels in a non-CBOR cryptographic wrapper.

5.1.  Discovering Authorization Servers

   C must discover the AS between.

   Hence, IoT devices may be very different in charge terms of RS to determine where to request
   the access token.  To do so, C must 1. find out the AS URI to which
   the token request available
   processing and message must be sent exchange capabilities and 2.  MUST validate that the
   AS with this URI there is authorized a need to provide access tokens
   support many different authorization use cases [RFC7744].

   This specification describes a framework for this RS.

   In order authentication and
   authorization in constrained environments (ACE) built on re-use of
   OAuth 2.0 [RFC6749], thereby extending authorization to determine Internet of
   Things devices.  This specification contains the AS URI, C MAY send an initial Unauthorized
   Resource Request message necessary building
   blocks for adjusting OAuth 2.0 to RS.  RS then denies the request and sends IoT environments.

   Profiles of this framework are available in separate specifications,
   such as [I-D.ietf-ace-dtls-authorize] or
   [I-D.ietf-ace-oscore-profile].  Such profiles may specify the address use of its AS back to C (see Section 5.2).  How C validates
   the AS authorization is not in scope framework for this document.  C may, e.g.,
   ask it's owner if this AS is authorized a specific security protocol and the underlying
   transports for this RS.  C may also use in a mechanism that addresses both problems at once.

5.2.  Unauthorized Resource Request Message

   An Unauthorized Resource Request message is specific deployment environment to improve
   interoperability.  Implementations may claim conformance with a request for any
   resource hosted by RS for which
   specific profile, whereby implementations utilizing the client does same profile
   interoperate, while implementations of different profiles are not have
   authorization granted.  RSes MUST treat any request for
   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 protected
   resource wider range of constrained
   devices.  Requirements on profiles are described at contextually
   appropriate places throughout this specification, and also summarized
   in Appendix C.

2.  Terminology

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
   "OPTIONAL" in this document are to be interpreted as described in BCP
   14 [RFC2119] [RFC8174] when, and only when, they appear in all
   capitals, as shown here.

   Certain security-related terms such as "authentication",
   "authorization", "confidentiality", "(data) integrity", "message
   authentication code", and "verify" are taken from [RFC4949].

   Since exchanges in this specification are described as RESTful
   protocol interactions, HTTP [RFC7231] offers useful terminology.

   Terminology for entities in the architecture is defined in OAuth 2.0
   [RFC6749] such as an Unauthorized Resource Request message when any of client (C), resource server (RS), and authorization
   server (AS).

   Note that the term "endpoint" is used here following hold:

   o  The request has been received on an unprotected channel.

   o  The RS has no valid access its OAuth
   definition, which is to denote resources such as token for the sender of and
   introspection at the request
      regarding AS and authz-info at the requested action on that resource.

   o  The RS has a valid access token (see Section 5.10.1
   for the sender a definition of the request, but
      that token does not authorize the requested action on the
      requested resource.

   Note: These conditions ensure that the RS can handle requests
   autonomously once access was granted and a secure channel has been
   established between C and RS.  The authz-info endpoint, as part of endpoint).  The CoAP [RFC7252]
   definition, which is "An entity participating in the process for authorizing to protected resources, CoAP protocol"
   is not itself a
   protected resource and MUST NOT be protected as specified above (cf.
   Section 5.10.1).

   Unauthorized Resource Request messages MUST be denied with an
   "unauthorized_client" error response.  In used in this response, specification.

   The specifications in this document is called the Resource
   Server SHOULD provide proper AS Request Creation Hints "framework" or "ACE
   framework".  When referring to enable the
   Client "profiles of this framework" it refers
   to request an access token from RS's AS as described in
   Section 5.3.

   The handling additional specifications that define the use of all this
   specification with concrete transport and communication security
   protocols (e.g., CoAP over DTLS).

   The term "Access Information" is used for parameters, other than the
   access token, provided to the client requests (including unauthorized ones) by the RS is described in Section 5.10.2.

5.3.  AS Request Creation Hints

   The AS Request Creation Hints message is sent by an RS as a response to an Unauthorized Resource Request message (see Section 5.2) enable it to help access
   the sender RS (e.g. public key of the Unauthorized Resource Request message acquire a
   valid access token. RS, profile supported by RS).

   The AS Request Creation Hints message term "Authorization Information" is a CBOR
   map, with an OPTIONAL element "AS" specifying an absolute URI (see
   Section 4.3 used to denote all
   information, including the claims of [RFC3986]) relevant access tokens, that identifies an
   RS uses to determine whether an access request should be granted.

3.  Overview

   This specification defines the appropriate AS ACE framework for authorization in the
   RS.

   The message can also contain the following OPTIONAL parameters:

   o  A "audience" element containing
   Internet of Things environment.  It consists of a suggested audience that set of building
   blocks.

   The basic block is the
      client should request at OAuth 2.0 [RFC6749] framework, which enjoys
   widespread deployment.  Many IoT devices can support OAuth 2.0
   without any additional extensions, but for certain constrained
   settings additional profiling is needed.

   Another building block is the AS.

   o  A "kid" element containing lightweight web transfer protocol CoAP
   [RFC7252], 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 key identifier use of a key used in an
      existing security association between OAuth over CoAP, other underlying
   protocols are not prohibited from being supported in the client future, such
   as HTTP/2 [RFC7540], Message Queuing Telemetry Transport (MQTT)
   [MQTT5.0], Bluetooth Low Energy (BLE) [BLE] and the RS.  The
      RS expects the client to request an access token bound to QUIC
   [I-D.ietf-quic-transport].  Note that this
      key, document specifies
   protocol exchanges in order to avoid having to re-establish the security
      association.

   o  A "cnonce" element containing a client-nonce.  See Section 5.3.1.

   o  A "scope" element containing the suggested scope terms of RESTful verbs such as GET and POST.
   Future profiles using protocols that do not support these verbs MUST
   specify how the client
      should request towards the AS.

   Figure 2 summarizes corresponding protocol messages are transmitted
   instead.

   A third building block is the parameters that Concise Binary Object Representation
   (CBOR) [RFC8949], for encodings where JSON [RFC8259] is not
   sufficiently compact.  CBOR is a binary encoding designed for small
   code and message size, which may be part used for encoding of the AS Request
   Creation Hints.

           /-----------+----------+---------------------\
           | Name      | self
   contained tokens, and also for encoding payloads transferred in
   protocol messages.

   A fourth building block is CBOR Key | Value Type          |
           |-----------+----------+---------------------|
           | AS        |     1    | text string         |
           | kid       |     2    | byte string         |
           | audience  |     5    | text string         |
           | scope     |     9    | text Object Signing and Encryption (COSE)
   [RFC8152], which enables object-level layer security as an
   alternative or byte string |
           | cnonce    |    39    | byte string         |
           \-----------+----------+---------------------/

                    Figure 2: AS Request Creation Hints

   Note that the schema part of the AS parameter may need to be adapted complement to the transport layer security protocol that (DTLS [RFC6347]
   or TLS [RFC8446]).  COSE is used between the client and the AS.
   Thus 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.

   Figure 3 shows an example for secure self-contained tokens such
   as proof-of-possession (PoP) tokens, which are an AS Request Creation Hints message
   payload using CBOR [RFC8949] diagnostic notation, using the parameter
   names instead of extension to the
   OAuth bearer tokens.  The default token format is defined in CBOR keys Web
   Token (CWT) [RFC8392].  Application-layer security for better human readability.

       4.01 Unauthorized
       Content-Format: application/ace+cbor
       Payload :
       {
        "AS" : "coaps://as.example.com/token",
        "audience" : "coaps://rs.example.com"
        "scope" : "rTempC",
        "cnonce" : h'e0a156bb3f'
       }

            Figure 3: AS Request Creation Hints payload example

   In CoAP using
   COSE can be provided with OSCORE [RFC8613].

   With the example building blocks listed above, the response parameter "AS" points the receiver solutions satisfying various
   IoT device and network constraints are possible.  A list of this message to
   constraints is described in detail in [RFC7228] and a description of
   how the URI "coaps://as.example.com/token" building blocks mentioned above relate to request
   access tokens. the various
   constraints can be found in Appendix A.

   Luckily, not every IoT device suffers from all constraints.  The RS sending this response (i.e., RS) uses an
   internal clock that ACE
   framework nevertheless takes all these aspects into account and
   allows several different deployment variants to co-exist, rather than
   mandating a one-size-fits-all solution.  It is only loosely synchronized with important to cover the
   wide range of possible interworking use cases and the clock different
   requirements from a security point of view.  Once IoT deployments
   mature, popular deployment variants will be documented in the AS.  Therefore it can not reliably verify the expiration time form of
   access tokens it receives.  To ensure
   ACE profiles.

3.1.  OAuth 2.0

   The OAuth 2.0 authorization framework enables a certain level of client to obtain
   scoped access token
   freshness nevetheless, the RS has included to a "cnonce" parameter (see
   Section 5.3.1) in resource with the response.

   Figure 4 illustrates permission of a resource owner.
   Authorization information, or references to it, is passed between the mandatory
   nodes using access tokens.  These access tokens are issued to use binary encoding clients
   by an authorization server with the approval of the
   message payload shown in Figure 3.

   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                     #

        Figure 4: AS Request Creation Hints example encoded in CBOR

5.3.1. resource owner.
   The Client-Nonce Parameter

   If the RS does not synchronize its clock with client uses the AS, it could be
   tricked into accepting old access tokens, that are either expired or
   have been compromised.  In order to ensure some level of token
   freshness in that case, to access the RS can use protected resources
   hosted by the "cnonce" (client-nonce)
   parameter.  The processing requirements for resource server.

   A number of OAuth 2.0 terms are used within this parameter specification:

   Access Tokens:
      Access tokens are as
   follows:

   o credentials needed to access protected
      resources.  An RS sending access token is a "cnonce" parameter in an data structure representing
      authorization permissions issued by the AS Request Creation Hints
      message MUST store information to validate that a given cnonce is
      fresh.  How this is implemented internally the client.  Access
      tokens are generated by the AS and consumed by the RS.  The access
      token content is out of scope for
      this specification.  Expiration opaque to the client.

      Access tokens can have different formats, and various methods of client-nonces should be
      utilization e.g., cryptographic properties) based
      roughly on the time it would take security
      requirements of the given deployment.

   Introspection:
      Introspection is a client method for a resource server or potentially a
      client, to obtain an access
      token after receiving query the AS Request Creation Hints message, with
      some allowance authorization server for unexpected delays.

   o  A client receiving a "cnonce" parameter in an AS Request Creation
      Hints message MUST include this in the parameters when requesting
      an active state and
      content of a received access token at token.  This is particularly useful
      in those cases where the AS, using authorization decisions are very dynamic
      and/or where the "cnonce" parameter from
      Section 5.8.4.4.

   o  If an AS grants an received access token request containing itself is an opaque
      reference rather than a "cnonce"
      parameter, it MUST include this value self-contained token.  More information
      about introspection in the OAuth 2.0 can be found in [RFC7662].

   Refresh Tokens:
      Refresh tokens are credentials used to obtain access token, using tokens.
      Refresh tokens are issued to the "cnonce" claim specified in Section 5.10.

   o  An RS that is using client by the client-nonce mechanism authorization
      server and that receives
      an are used to obtain a new access token MUST verify that this when the current
      access token contains a cnonce
      claim, expires, or to obtain additional access tokens with
      identical or narrower scope (such access tokens may have a client-nonce value that is fresh according to shorter
      lifetime and fewer permissions than authorized by the
      information stored resource
      owner).  Issuing a refresh token is optional at the first step above. discretion of
      the authorization server.  If the cnonce claim authorization server issues a
      refresh token, it is not present or if the cnonce claim value included when issuing an access token (i.e.,
      step (B) in Figure 1).

      A refresh token in OAuth 2.0 is not fresh, a string representing the RS
      MUST discard
      authorization granted to the access token.  If this was an interaction with client by the authz-info endpoint resource owner.  The
      string is usually opaque to the RS MUST also respond with client.  The token denotes an error
      message using a response code equivalent
      identifier used to retrieve the CoAP code 4.01
      (Unauthorized).

5.4.  Authorization Grants

   To request an authorization information.  Unlike
      access token, the client obtains tokens, refresh tokens are intended for use only with
      authorization from the servers and are never sent to resource owner or uses its client credentials as a grant.  The
   authorization is expressed servers.  In
      this framework, refresh tokens are encoded in the form binary instead of an authorization grant.

   The OAuth framework [RFC6749] defines four grant types.  The grant
   types can be split up into two groups, those granted on behalf
      strings, if used.

   Proof of Possession Tokens:
      A token may be bound to a cryptographic key, which is then used to
      bind the
   resource owner (password, authorization code, implicit) and those for token to a request authorized by the client (client credentials).  Further grant types have been added
   later, such as [RFC7521] defining an assertion-based authorization
   grant. token.  Such tokens
      are called proof-of-possession tokens (or PoP tokens).

      The grant type is selected depending on proof-of-possession security concept used here assumes that
      the use case. AS acts as a trusted third party that binds keys to tokens.
      In cases where the case of access tokens, these so called PoP keys are then
      used by the client acts on behalf to demonstrate the possession of the resource owner, secret to
      the authorization
   code grant is recommended.  If RS when accessing the resource.  The RS, when receiving an
      access token, needs to verify that the key used by the client acts on behalf of
      matches the
   resource owner, but does not have any display or has very limited
   interaction possibilities, one bound to the access token.  When this
      specification uses the term "access token" it is recommended assumed to be a
      PoP access token unless specifically stated otherwise.

      The key bound to use the device code
   grant defined in [RFC8628].  In cases where the client acts
   autonomously token (the PoP key) may use either symmetric
      or asymmetric cryptography.  The appropriate choice of the client credentials grant is recommended.

   For details kind of
      cryptography depends on the different grant types, see section 1.3 of
   [RFC6749].  The OAuth 2.0 framework provides an extension mechanism
   for defining additional grant types, so profiles constraints of this framework
   MAY define additional grant types, if needed.

5.5.  Client Credentials

   Authentication the IoT devices as well
      as on the security requirements of the client use case.

      Symmetric PoP key:
         The AS generates a random symmetric PoP key.  The key is mandatory independent of either
         stored to be returned on introspection calls or included in the grant
   type when requesting an access token from
         token.  Either the whole token endpoint.  In the
   case of or only the client credentials grant type, key MUST be
         encrypted in the authentication and
   grant coincide.

   Client registration and provisioning of client credentials latter case.  The PoP key is also returned to the
         client together with the token.

      Asymmetric PoP key:
         An asymmetric key pair is out of scope for this specification.

   The OAuth framework defines one client credential type in section
   2.3.1 of [RFC6749]: client id and generated by the client secret.
   [I-D.erdtman-ace-rpcc] adds raw-public-key and pre-shared-key the
         public key is sent to the
   client credentials types.  Profiles of this framework MAY extend with
   an additional client credentials type using client certificates.

5.6. AS Authentication

   The client credential grant (if it does not, by default, authenticate the AS
   that not already have
         knowledge of the client connects to.  In classic OAuth, client's public key).  Information about the AS
         public key, which is
   authenticated with a TLS server certificate.

   Profiles of the PoP key in this framework MUST specify how clients authenticate case, is either stored
         to be returned on introspection calls or included inside the
   AS
         token and how communication security is implemented.  By default, server
   side TLS certificates, as defined by OAuth 2.0, are required.

5.7.  The Authorization Endpoint

   The OAuth 2.0 authorization endpoint is used sent back to interact with the client.  The resource owner and obtain an authorization grant, server
         consuming the token can identify the public key from the
         information in certain grant
   flows.  The primary the token, which allows the client to use case for the ACE-OAuth framework is
         corresponding private key for
   machine-to-machine interactions that do not involve the resource
   owner in the authorization flow; therefore, this endpoint proof of possession.

      The token is out either a simple reference, or a structured
      information object (e.g., CWT [RFC8392]) protected by a
      cryptographic wrapper (e.g., COSE [RFC8152]).  The choice of
   scope here.  Future profiles may define constrained adaptation
   mechanisms PoP
      key does not necessarily imply a specific credential type for this endpoint as well.  Non-constrained clients
   interacting with constrained resource servers can use the
   specification in section 3.1
      integrity protection of [RFC6749] and the attack
   countermeasures suggested in section 4.2 of [RFC6819].

5.8.  The Token Endpoint token.

   Scopes and Permissions:
      In standard OAuth 2.0, the AS provides the token endpoint for
   submitting access token requests.  This framework extends client specifies the
   functionality type of permissions it is
      seeking to obtain (via the scope parameter) in the access token endpoint, giving
      request.  In turn, the AS may use the possibility scope response parameter to
   help
      inform the client and RS to establish shared keys or to exchange their
   public keys.  Furthermore, this framework defines encodings using
   CBOR, as a substitute for JSON.

   The endpoint may, however, be exposed over HTTPS as in classical
   OAuth or even other transports.  A profile MUST define of the details scope of the mapping between access token issued.  As the fields described below, and these transports.
   If HTTPS is used, JSON or CBOR payloads may
      client could be supported.  If JSON
   payloads are used, a constrained device as well, this specification
      defines the semantics use of CBOR encoding, see Section 4 5, for such requests
      and responses.

      The values of the scope parameter in OAuth 2.0
   specification MUST be followed (with additions are expressed as described below).
   If CBOR payload a
      list of space-delimited, case-sensitive strings, with a semantic
      that is supported, the semantics described below MUST be
   followed.

   For the AS to be able well-known to issue a token, the client MUST be
   authenticated AS and present a valid grant for the RS.  More details about the
      concept of scopes requested.
   Profiles is found under Section 3.3 in [RFC6749].

   Claims:
      Information carried in the access token or returned from
      introspection, called claims, is in the form of this framework MUST specify how name-value pairs.
      An access token may, for example, include a claim identifying the
      AS authenticates that issued the
   client and how token (via the communication between client "iss" claim) and AS what audience
      the access token is protected,
   fulfilling intended for (via the requirements specified in Section 5. "aud" claim).  The default name
      audience of this endpoint in an url-path is '/token', however
   implementations are not required to use this name and access token can define
   their own instead. be a specific resource or one or
      many resource servers.  The figures of this section use CBOR diagnostic notation without resource owner policies influence what
      claims are put into the
   integer abbreviations for access token by the parameters or their values for
   illustrative purposes.  Note that implementations MUST use authorization server.

      While the
   integer abbreviations structure and encoding of the binary access token varies
      throughout deployments, a standardized format has been defined
      with the JSON Web Token (JWT) [RFC7519] where claims are encoded
      as a JSON object.  In [RFC8392] the CBOR Web Token (CWT) has been
      defined as an equivalent format using CBOR encoding, if encoding.

   The token and introspection Endpoints:
      The AS hosts the CBOR
   encoding is used.

5.8.1.  Client-to-AS Request token endpoint that allows a client to request
      access tokens.  The client sends makes a POST request to the token
      endpoint at the AS.  The
   profile MUST specify how the communication is protected.  The content
   of on the request consists of AS and receives the parameters specified access token in the relevant
   subsection of section 4 of response
      (if the OAuth 2.0 specification [RFC6749],
   depending on request was successful).
      In some deployments, a token introspection endpoint is provided by
      the grant type, with AS, which can be used by the following exceptions RS and
   additions:

   o  The parameter "grant_type" is OPTIONAL in the context of this
      framework (as opposed to REQUIRED in RFC6749).  If that parameter
      is missing, potentially the default value "client_credentials" is implied.

   o  The "audience" parameter from [RFC8693] is OPTIONAL client, if
      they need to request an
      access token bound to additional information regarding a specific audience.

   o received
      access token.  The "cnonce" parameter defined in Section 5.8.4.4 is REQUIRED if
      the RS provided requesting entity makes a client-nonce in POST request to the "AS Request Creation Hints"
      message Section 5.3

   o  The "scope" parameter MAY be encoded as a byte string instead of
      introspection endpoint on the string encoding specified in section 3.3 of [RFC6749], AS and receives information about
      the access token in
      order allow compact encoding of complex scopes.  The syntax the response.  (See "Introspection" above.)

3.2.  CoAP

   CoAP is an application-layer protocol similar to HTTP, but
   specifically designed for constrained environments.  CoAP typically
   uses datagram-oriented transport, such as UDP, where reordering and
   loss of
      such a binary encoding is explicitly not specified here packets can occur.  A security solution needs to take the
   latter aspects into account.

   While HTTP uses headers and left query strings to profiles or applications, specifically note that convey additional
   information about a binary
      encoded scope request, CoAP encodes such information into
   header parameters called 'options'.

   CoAP supports application-layer fragmentation of the CoAP payloads
   through blockwise transfers [RFC7959].  However, blockwise transfer
   does not necessarily use increase the space character '0x20' size limits of CoAP options, therefore data
   encoded in options has to delimit scope-tokens.

   o  The client be kept small.

   Transport layer security for CoAP can send an empty (null value) "ace_profile" parameter
      to indicate be provided by DTLS or TLS
   [RFC6347][RFC8446] [I-D.ietf-tls-dtls13].  CoAP defines a number of
   proxy operations that it wants the AS require transport layer security to include be
   terminated at the "ace_profile"
      parameter proxy.  One approach for protecting CoAP
   communication end-to-end through proxies, and also to support
   security for CoAP over a different transport in the response.  See Section 5.8.4.3.

   o  A client MUST be able a uniform way, is to use
   provide security at the parameters from
      [I-D.ietf-ace-oauth-params] in application layer using an access token object-based
   security mechanism such as COSE [RFC8152].

   One application of COSE is OSCORE [RFC8613], which provides end-to-
   end confidentiality, integrity and replay protection, and a secure
   binding between CoAP request to and response messages.  In OSCORE, the
      token endpoint
   CoAP messages are wrapped in COSE objects and sent using CoAP.

   In this framework the AS MUST be able to process these additional
      parameters.

   The default behavior, use of CoAP as replacement for HTTP is that the AS generates a symmetric proof-of-
   possession key
   RECOMMENDED for the client.  In order to use in constrained environments.  For communication
   security this framework does not make an asymmetric key
   pair or to re-use a key previously established with explicit protocol
   recommendation, since the RS, choice depends on the
   client is supposed to use requirements of the "req_cnf" parameter from
   [I-D.ietf-ace-oauth-params].

   If CBOR is used then these parameters MUST be provided
   specific application.  DTLS [RFC6347], [I-D.ietf-tls-dtls13] and
   OSCORE [RFC8613] are mentioned as a CBOR map.

   When HTTP examples, other protocols
   fulfilling the requirements from Section 6.5 are also applicable.

4.  Protocol Interactions

   The ACE framework is used as a transport then based on the client makes a request to OAuth 2.0 protocol interactions
   using the token endpoint by sending the parameters using and optionally the "application/
   x-www-form-urlencoded" format with introspection endpoint.
   A client obtains an access token, and optionally a character encoding of UTF-8 in refresh token,
   from an AS using the HTTP request entity-body, as defined in section 3.2 of [RFC6749].

   The following examples illustrate different types of requests for
   proof-of-possession tokens.

   Figure 5 shows a request for a token with a symmetric proof-of-
   possession key.  The content is displayed in CBOR diagnostic
   notation, without abbreviations for better readability.

   Header: POST (Code=0.02)
   Uri-Host: "as.example.com"
   Uri-Path: "token"
   Content-Format: "application/ace+cbor"
   Payload:
   {
     "client_id" : "myclient",
     "audience" : "tempSensor4711"
    }

    Figure 5: Example request for an endpoint and subsequently presents the
   access token bound to a symmetric
                                   key.

   Figure 6 shows a request for a token with an asymmetric proof-of-
   possession key.  Note that in this example OSCORE [RFC8613] is used RS to provide object-security, therefore gain access to a protected resource.  In
   most deployments the Content-Format is
   "application/oscore" wrapping RS can process the "application/ace+cbor" type
   content.  The OSCORE option has a decoded interpretation appended access token locally, however
   in
   parentheses for some cases the reader's convenience.  Also note that in this
   example RS may present it to the audience is implicitly known by both client and AS.
   Furthermore note that this example uses AS via the "req_cnf" parameter from
   [I-D.ietf-ace-oauth-params].

   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"
   Payload:
     0x44025d1 ... (full payload omitted for brevity) ... 68b3825e

   Decrypted payload:
   {
     "client_id" : "myclient",
     "req_cnf" : {
       "COSE_Key" : {
         "kty" : "EC",
         "kid" : h'11',
         "crv" : "P-256",
         "x" : b64'usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8',
         "y" : b64'IBOL+C3BttVivg+lSreASjpkttcsz+1rb7btKLv8EX4'
       }
     }
   }

        Figure 6: Example token request bound introspection
   endpoint to an asymmetric key. get fresh information.  These interactions are shown in
   Figure 7 shows a 1.  An overview of various OAuth concepts is provided in
   Section 3.1.

   +--------+                               +---------------+
   |        |---(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    |
   |        |                               |              |
   +--------+                               +--------------+

                      Figure 1: Basic Protocol Flow.

   Requesting an Access Token (A):
      The client makes an access token request to the token endpoint at
      the AS.  This framework assumes the use of PoP access tokens (see
      Section 3.1 for a token where short description) wherein the AS binds a previously communicated
   proof-of-possession key is only referenced using to
      an access token.  The client may include permissions it seeks to
      obtain, and information about the "req_cnf"
   parameter from [I-D.ietf-ace-oauth-params].

   Header: POST (Code=0.02)
   Uri-Host: "as.example.com"
   Uri-Path: "token"
   Content-Format: "application/ace+cbor"
   Payload:
   {
     "client_id" : "myclient",
     "audience" : "valve424",
     "scope" : "read",
     "req_cnf" : {
       "kid" : b64'6kg0dXJM13U'
     }
   }W

       Figure 7: Example request credentials it wants to use for
      proof-of-possession (e.g., symmetric/asymmetric cryptography or a
      reference to a specific key) of the access token.

   Access Token Response (B):
      If the request from the client has been successfully verified,
      authenticated, and authorized, the AS returns an access token bound to and
      optionally a key
                                reference.

   Refresh tokens are typically not stored as securely as proof-of-
   possession keys in requesting clients.  Proof-of-possession based refresh token requests MUST NOT request different proof-of-possession
   keys or different audiences in token requests.  Refresh token
   requests can token.  Note that only use certain grant types
      support refresh tokens.  The AS can also return additional
      parameters, referred to request access tokens bound as "Access Information".  In addition to
      the same
   proof-of-possession key response parameters defined by OAuth 2.0 and the same audience as PoP access tokens issued
   in the initial
      token request.

5.8.2.  AS-to-Client Response

   If extension, this framework defines parameters that can be
      used to inform the client about capabilities of the RS, e.g.  the
      profile the RS supports.  More information about these parameters
      can be found in Section 5.8.4.

   Resource Request (C):
      The client interacts with the access token RS to request has been successfully verified by access to the AS
      protected resource and provides the client is authorized to obtain an access token corresponding token.  The protocol to its access token request,
      use between the AS sends a response with client and the
   response code equivalent RS is not restricted to CoAP.
      HTTP, HTTP/2 [RFC7540], QUIC [I-D.ietf-quic-transport], MQTT
      [MQTT5.0], Bluetooth Low Energy [BLE], etc., are also viable
      candidates.

      Depending on the device limitations and the selected protocol,
      this exchange may be split up into two parts:

         (1) the CoAP response code 2.01 (Created).
   If client request was invalid, sends the access token containing, or not authorized,
         referencing, the AS returns an
   error response as described in Section 5.8.3.

   Note authorization information to the RS, that will
         be used for subsequent resource requests by the AS decides which token type client, and profile to use when
   issuing a successful response.  It is assumed that

         (2) the AS has prior
   knowledge of client makes the capabilities of resource access request, using the
         communication security protocol and other Access Information
         obtained from the AS.

      The client and the RS (see
   Appendix D).  This prior knowledge may, for example, be set by mutually authenticate using the
   use of a dynamic client registration security
      protocol exchange [RFC7591].  If
   the client has requested a specific proof-of-possession key using specified in the
   "req_cnf" parameter from [I-D.ietf-ace-oauth-params], this may also
   influence which profile (see step B) and the AS selects, as it needs to support keys
      obtained in the
   use of 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 key type requested access token
      with the client.

   The content of resource request.  If the successful reply RS is online, validation can be
      handed over to the Access Information.  When AS using CBOR payloads, the content MUST token introspection (see messages D
      and E) over HTTP or CoAP.

   Token Introspection Request (D):
      A resource server may be encoded as configured to introspect the access token
      by including it in a CBOR map,
   containing parameters as specified request to the introspection endpoint at that
      AS.  Token introspection over CoAP is defined in Section 5.1 of [RFC6749], with
   the following additions 5.9 and changes:

   ace_profile:
      OPTIONAL unless the request included an empty ace_profile
      parameter
      for HTTP in which case it is MANDATORY.  This indicates the
      profile [RFC7662].

      Note that token introspection is an optional step and can be
      omitted if the client MUST use towards the RS.  See
      Section 5.8.4.3 for token is self-contained and the formatting of this parameter.  If this
      parameter resource server is absent,
      prepared to perform the token validation on its own.

   Token Introspection Response (E):
      The AS assumes that validates the client implicitly
      knows which profile to use towards token and returns the RS.

   token_type:
      This parameter is OPTIONAL, most recent parameters,
      such as opposed scope, audience, validity etc. associated with it back to 'required' in [RFC6749].
      By default implementations of this framework SHOULD assume that
      the token_type is "PoP".  If a specific use case requires another
      token_type (e.g., "Bearer") to be used RS.  The RS then this parameter is
      REQUIRED.

   Furthermore [I-D.ietf-ace-oauth-params] defines additional uses the received parameters
   that to process the AS MUST be able
      request to use when responding either accept or to a deny it.

   Protected Resource (F):
      If the request to from the
   token endpoint.

   Figure 8 summarizes client is authorized, the parameters that can currently be part of RS fulfills the
   Access Information.  Future extensions may define additional
   parameters.

           /-------------------+-------------------------------\
           | 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]   |
           \-------------------+-------------------------------/

                  Figure 8: Access Information parameters

   Figure 9 shows a response containing a token
      request and returns a "cnf" parameter response with the appropriate response code.
      The RS uses the dynamically established keys to protect the
      response, according to the communication security protocol used.

   The OAuth 2.0 framework defines a symmetric proof-of-possession key, number of "protocol flows" via
   grant types, which is defined in
   [I-D.ietf-ace-oauth-params].  Note have been extended further with extensions to
   OAuth 2.0 (such as [RFC7521] and [RFC8628]).  What grant type works
   best depends on the usage scenario and [RFC7744] describes many
   different IoT use cases but there are two grant types that cover a
   majority of these scenarios, namely the key identifier 'kid' is
   only used to simplify indexing Authorization Code Grant
   (described in Section 4.1 of [RFC7521]) and retrieving the key, Client Credentials
   Grant (described in Section 4.4 of [RFC7521]).  The Authorization
   Code Grant is a good fit for use with apps running on smart phones
   and no
   assumptions should be made tablets that it is unique request access to IoT devices, a common scenario in
   the domains of either
   the client or smart home environment, where users need to go through an
   authentication and authorization phase (at least during the RS.

   Header: Created (Code=2.01)
   Content-Format: "application/ace+cbor"
   Payload:
   {
     "access_token" : b64'SlAV32hkKG ...
      (remainder of CWT omitted for brevity;
      CWT contains COSE_Key initial
   setup phase).  The native apps guidelines described in the "cnf" claim)',
     "ace_profile" : "coap_dtls",
     "expires_in" : "3600",
     "cnf" : {
       "COSE_Key" : {
         "kty" : "Symmetric",
         "kid" : b64'39Gqlw',
         "k" : b64'hJtXhkV8FJG+Onbc6mxCcQh'
       }
     }
   }

       Figure 9: Example AS response with an access token bound [RFC8252] are
   applicable to a
                              symmetric key.

5.8.3.  Error Response this use case.  The error responses Client Credential Grant is a good
   fit for CoAP-based interactions use with IoT devices where the AS are
   generally equivalent to OAuth client itself is
   constrained.  In such a case, the ones resource owner has pre-arranged
   access rights for HTTP-based interactions as
   defined in Section 5.2 of [RFC6749], the client with the following exceptions:

   o  When authorization server, which is
   often accomplished using CBOR the raw payload before being processed by the
      communication security protocol MUST be encoded as a CBOR map.

   o  A response code equivalent to commissioning tool.

   The consent of the CoAP code 4.00 (Bad Request)
      MUST be used for all error responses, except resource owner, for invalid_client
      where giving a response code equivalent client access to the CoAP code 4.01
      (Unauthorized) MAY a
   protected resource, can be used under the same conditions as specified
      in Section 5.2 of [RFC6749].

   o  The Content-Format (for CoAP-based interactions) provided dynamically as in the traditional
   OAuth flows, or media type
      (for HTTP-based interactions) "application/ace+cbor" MUST it could be used
      for pre-configured by the error response.

   o resource owner as
   authorization policies at the AS, which the AS evaluates when a token
   request arrives.  The parameters "error", "error_description" resource owner and "error_uri" MUST
      be abbreviated using the codes specified requesting party (i.e.,
   client owner) are not shown in Figure 12, when 1.

   This framework supports a CBOR
      encoding is used.

   o  The error code (i.e., value wide variety of communication security
   mechanisms between the "error" parameter) MUST be
      abbreviated ACE entities, such as specified in Figure 10, when a CBOR encoding client, AS, and RS.  It
   is
      used.

           /---------------------------+-------------\
           | 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      |
           \---------------------------+-------------/

           Figure 10: CBOR abbreviations for common error codes 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 addition 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 error responses defined in OAuth 2.0, client and the
   following behavior MUST be implemented by AS.

   It is also assumed that the AS:

   o  If RS has been registered with the client submits an asymmetric key AS,
   potentially in a similar way as the token request that client has been registered with
   the AS.  Established keying material between the AS and the RS cannot process, allows
   the AS MUST reject to apply cryptographic protection to the access token to
   ensure that request with its content cannot be modified, 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
      response code equivalent communication security protocol.

   The keying material necessary for establishing communication security
   between C and RS is dynamically established as part of the protocol
   described in this document.

   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 CoAP code 4.00 (Bad Request) protected resource.  A generic
   procedure is described in Section 5.1; profiles MAY define other
   procedures for discovery.

   In Bluetooth Low Energy, for example, advertisements are broadcast by
   a peripheral, including information about the error code "unsupported_pop_key" defined 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
      Figure 10.

   o  If a standardized format as described in [RFC6690].

5.  Framework

   The following sections detail the profiling and extensions of OAuth
   2.0 for constrained environments, which constitutes the ACE
   framework.

   Credential Provisioning
      In constrained environments it cannot be assumed that the client
      and the RS it has requested an access token for do
      not share are part of a common profile, key infrastructure.  Therefore,
      the AS MUST reject that request with a
      response code equivalent provisions credentials and associated information to allow
      mutual authentication between the CoAP code 4.00 (Bad Request)
      including client and the error code "incompatible_ace_profiles" defined in
      Figure 10.

5.8.4.  Request RS.  The
      resulting security association between the client and Response Parameters

   This section provides more detail about the new parameters that can RS may
      then also be used in to bind these credentials to the access token requests and responses, as well as
   abbreviations tokens
      the client uses.

   Proof-of-Possession
      The ACE framework, by default, implements proof-of-possession for more compact encoding
      access tokens, i.e., that the token holder can prove being a
      holder of existing parameters and
   common parameter values.

5.8.4.1.  Grant Type the key bound to the token.  The abbreviations specified in binding is provided by
      the registry defined in Section 8.5
   MUST be "cnf" claim [RFC8747] indicating what key is used in CBOR encodings instead of the string values defined
   in [RFC6749], if CBOR payloads are used.

           /--------------------+------------+------------------------\
           | Name               | CBOR Value | Original Specification |
           |--------------------+------------+------------------------|
           | password           |      0     |      [RFC6749]         |
           | authorization_code |      1     |      [RFC6749]         |
           | client_credentials |      2     |      [RFC6749]         |
           | refresh_token      |      3     |      [RFC6749]         |
           \--------------------+------------+------------------------/

           Figure 11: CBOR abbreviations for common grant types

5.8.4.2.  Token Type 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.

   ACE Profiles
      The "token_type" parameter, defined client or RS may be limited in section 5.1 the encodings or protocols it
      supports.  To support a variety of [RFC6749],
   allows different deployment settings,
      specific interactions between client and RS are defined in an ACE
      profile.  In ACE framework the AS is expected to indicate to manage the client which type
      matching of access token it
   is receiving (e.g., compatible profile choices between a bearer token).

   This document registers client and an RS.
      The AS informs the new value "PoP" for client of the OAuth Access
   Token Types registry, specifying a proof-of-possession token.  How selected profile using the proof-of-possession by
      "ace_profile" parameter in the client token response.

   OAuth 2.0 requires the use of TLS both to protect the communication
   between AS and client when requesting an access token; between client
   and RS when accessing a resource and between AS and RS if
   introspection is performed used.  In constrained settings TLS is not always
   feasible, or desirable.  Nevertheless it is REQUIRED that the
   communications named above are encrypted, integrity protected and
   protected against message replay.  It is also REQUIRED that the
   communicating endpoints perform mutual authentication.  Furthermore
   it MUST be
   specified by assured that responses are bound to the profiles.

   The values requests in the "token_type" parameter MUST use
   sense that the CBOR
   abbreviations defined in receiver of a response can be certain that the registry specified by Section 8.7, if
   response actually belongs to a
   CBOR encoding is used.

   In this framework certain request.  Note that setting up
   such a secure communication may require some unprotected messages to
   be exchanged first (e.g. sending the "pop" value for token from the "token_type" parameter is client to the default.  The AS may, however, provide a different value.

5.8.4.3.  Profile
   RS).

   Profiles of this framework MUST define the communication protocol and
   the specify a communication security protocol between the
   client and RS that provides the RS.
   The security protocol MUST provide encryption, integrity and replay
   protection.  It features required above.  Profiles
   MUST also provide specify a binding communication security protocol RECOMMENDED to be used
   between requests client and
   responses.  Furthermore profiles MUST define a list of allowed proof-
   of-possession methods, if they support proof-of-possession tokens.

   A profile MUST specify an identifier AS that MUST be used to uniquely
   identify itself in the "ace_profile" parameter.  The textual
   representation of provides the profile identifier is intended for human
   readability and for JSON-based interactions, it MUST NOT be used for
   CBOR-based interactions. features required above.
   Profiles MUST register their identifier in
   the registry defined in Section 8.8.

   Profiles MAY define additional parameters specify for both the token request introspection a communication security
   protocol RECOMMENDED to be used between RS and AS that provides the Access Information in
   features required above.  These recommendations enable
   interoperability between different implementations without the access token response in order need
   to
   support negotiation or signaling of define a new profile specific parameters.

   Clients that want if the AS to provide them communication between C and AS, or
   between RS and AS, is protected with a different security protocol
   complying with the "ace_profile"
   parameter in security requirements above.

   In OAuth 2.0 the access token response can indicate that by sending a
   ace_profile parameter communication with a null value (for CBOR-based interactions)
   or an empty string (for JSON based interactions) in the access token
   request.

5.8.4.4.  Client-Nonce

   This parameter MUST be sent from Token and the Introspection
   endpoints at the client AS is assumed to the AS, if be via HTTP and may use Uri-query
   parameters.  When profiles of this framework use CoAP instead, it
   previously received a "cnonce" parameter in is
   REQUIRED to use of the AS Request Creation
   Hints Section 5.3. following alternative instead of Uri-query
   parameters: The parameter is encoded sender (client or RS) encodes the parameters of its
   request as a byte string for
   CBOR-based interactions, CBOR map and submits that map as a string (Base64 encoded binary) for
   JSON-based interactions.  It the payload of the POST
   request.

   Profiles that use CBOR encoding of protocol message parameters at the
   outermost encoding layer MUST copy use the value from content format 'application/
   ace+cbor'.  If CoAP is used for communication, the cnonce
   parameter in Content-Format
   MUST be abbreviated with the ID: 19 (see Section 8.16).

   The OAuth 2.0 AS Request Creation Hints.

5.8.5.  Mapping Parameters uses a JSON structure in the payload of its
   responses both to CBOR client and RS.  If CBOR encoding CoAP is used, all OAuth parameters in access token
   requests and responses MUST be mapped it is REQUIRED to
   use CBOR types as specified in [RFC8949] instead of JSON.  Depending on the registry defined by Section 8.10, using profile, the given integer
   abbreviation for
   CBOR payload MAY be enclosed in a non-CBOR cryptographic wrapper.

5.1.  Discovering Authorization Servers

   C must discover the map keys.

   Note that we have aligned AS in charge of RS to determine where to request
   the abbreviations corresponding access token.  To do so, C must 1. find out the AS URI to claims
   with which
   the abbreviations defined in [RFC8392].

   Note also token request message must be sent and 2.  MUST validate that abbreviations from -24 the
   AS with this URI is authorized to 23 have a 1 byte encoding
   size in CBOR.  We have thus chosen provide access tokens for this RS.

   In order to assign abbreviations in that
   range determine the AS URI, C MAY send an initial Unauthorized
   Resource Request message to parameters we expect RS.  RS then denies the request and sends
   the address of its AS back to be used most frequently in
   constrained scenarios.

           /-------------------+----------+---------------------\
           | Name              | CBOR Key | Value Type          |
           |-------------------+----------+---------------------|
           | access_token      | 1        | byte string         |
           | expires_in        | 2        | unsigned integer    |
           | audience          | 5        | text string         |
           | scope             | 9        | text or byte string |
           | 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         |
           \-------------------+----------+---------------------/

       Figure 12: CBOR mappings used C (see Section 5.2).  How C validates
   the AS authorization is not in scope for this document.  C may, e.g.,
   ask its owner if this AS is authorized for this RS.  C may also use a
   mechanism that addresses both problems at once (e.g. by querying a
   dedicated secure service provided by the client owner) .

5.2.  Unauthorized Resource Request Message

   An Unauthorized Resource Request message is a request for any
   resource hosted by RS for which the client does not have
   authorization granted.  RSes MUST treat any request for a protected
   resource as an Unauthorized Resource Request message when any of the
   following hold:

   o  The request has been received on an unsecured channel.

   o  The RS has no valid access token for the sender of the request
      regarding the requested action on that resource.

   o  The RS has a valid access token for the sender of the request, but
      that token does not authorize the requested action on the
      requested resource.

   Note: These conditions ensure that the RS can handle requests
   autonomously once access was granted and responses

5.9. a secure channel has been
   established between C and RS.  The Introspection Endpoint

   Token introspection [RFC7662] can authz-info endpoint, as part of
   the process for authorizing to protected resources, is not itself a
   protected resource and MUST NOT be OPTIONALLY provided protected as specified above (cf.
   Section 5.10.1).

   Unauthorized Resource Request messages MUST be denied with an
   "unauthorized_client" error response.  In this response, the Resource
   Server SHOULD provide proper "AS Request Creation Hints" to enable
   the client to request an access token from RS's AS as described in
   Section 5.3.

   The handling of all client requests (including unauthorized ones) by
   the AS,
   and RS is then used described in Section 5.10.2.

5.3.  AS Request Creation Hints

   The "AS Request Creation Hints" message is sent by the an RS and potentially the client to query the AS
   for metadata about as a given token, e.g., validity or scope.  Analogous
   response to the protocol defined in [RFC7662] for HTTP and JSON, this section
   defines adaptations an Unauthorized Resource Request message (see
   Section 5.2) to more constrained environments using CBOR and
   leaving help the choice sender of the application protocol to Unauthorized Resource Request
   message acquire a valid access token.  The "AS Request Creation
   Hints" message is a CBOR or JSON map, with an OPTIONAL element "AS"
   specifying an absolute URI (see Section 4.3 of [RFC3986]) that
   identifies the profile.

   Communication between appropriate AS for the requesting entity and RS.

   The message can also contain the introspection
   endpoint following OPTIONAL parameters:

   o  A "audience" element contains an identifier the client should
      request at the AS MUST be integrity protected and encrypted.  The
   communication security protocol MUST also provide a binding between
   requests and responses.  Furthermore AS, as suggested by the two interacting parties MUST
   perform mutual authentication.  Finally RS.  With this parameter,
      when included in the AS SHOULD verify that access token request to the
   requesting entity has AS, the right AS is
      able to access introspection information
   about restrict the provided token.  Profiles use of access token to specific RSs.  See
      Section 6.9 for a discussion of this framework that support
   introspection MUST specify how authentication and communication parameter.

   o  A "kid" element containing the key identifier of a key used in an
      existing security association between the requesting entity client and the AS is implemented. RS.  The default name of this endpoint in
      RS expects the client to request an url-path is '/introspect',
   however implementations are not required access token bound to use this name and can
   define their own instead.

   The figures of this section uses CBOR diagnostic notation without
      key, in order to avoid having to re-establish the
   integer abbreviations for security
      association.

   o  A "cnonce" element containing a client-nonce.  See Section 5.3.1.

   o  A "scope" element containing the parameters or their values for better
   readability.

   Note suggested scope that supporting introspection is OPTIONAL for implementations of
   this framework.

5.9.1.  Introspection Request

   The requesting entity sends a POST request to the introspection
   endpoint at client
      should request towards the AS.  The profile MUST specify how the communication
   is protected.  If CBOR is used,

   Figure 2 summarizes the payload MUST parameters that may be encoded as a CBOR
   map with a "token" entry containing part of the access token.  Further
   optional parameters representing additional context "AS
   Request Creation Hints".

           /-----------+----------+---------------------\
           | Name      | CBOR Key | Value Type          |
           |-----------+----------+---------------------|
           | AS        |     1    | text string         |
           | kid       |     2    | byte string         |
           | audience  |     5    | text string         |
           | scope     |     9    | text or byte string |
           | cnonce    |    39    | byte string         |
           \-----------+----------+---------------------/

                    Figure 2: AS Request Creation Hints

   Note that is known by the requesting entity to aid schema part of the AS in its response MAY parameter may need to be included.

   For CoAP-based interaction, all messages MUST use adapted
   to the content type
   "application/ace+cbor", while for HTTP-based interactions security protocol that is used between the
   equivalent media type "application/ace+cbor" MUST be used.

   The same parameters are required client and optional as in Section 2.1 of
   [RFC7662].

   For example, Figure 13 shows an RS calling the token introspection
   endpoint at AS.
   Thus the example AS value "coap://as.example.com/token" might need to query about an OAuth 2.0 proof-of-possession
   token.  Note that object security based on OSCORE [RFC8613]
   be transformed to "coaps://as.example.com/token".  It is assumed in this example, therefore that
   the Content-Format is
   "application/oscore". client can determine the correct schema part on its own depending
   on the way it communicates with the AS.

   Figure 14 3 shows an example for an "AS Request Creation Hints" message
   payload using CBOR [RFC8949] diagnostic notation, using the decoded payload.

   Header: POST (Code=0.02)
   Uri-Host: "as.example.com"
   Uri-Path: "introspect"
   OSCORE: 0x09, 0x05, 0x25 parameter
   names instead of the CBOR keys for better human readability.

       4.01 Unauthorized
       Content-Format: "application/oscore"
   Payload:
   ... COSE content ...

                 Figure 13: Example introspection request. application/ace+cbor
       Payload :
       {
     "token"
        "AS" : b64'7gj0dXJQ43U',
     "token_type_hint" "coaps://as.example.com/token",
        "audience" : "PoP" "coaps://rs.example.com"
        "scope" : "rTempC",
        "cnonce" : h'e0a156bb3f'
       }

            Figure 14: Decoded payload.

5.9.2.  Introspection Response

   If 3: AS Request Creation Hints payload example

   In the introspection request is authorized and successfully
   processed, example above, the AS sends a response with parameter "AS" points the response code equivalent receiver
   of this message to the CoAP code 2.01 (Created).  If the introspection URI "coaps://as.example.com/token" to request was
   invalid,
   access tokens.  The RS sending this response uses an internal clock
   that is not authorized or couldn't be processed synchronized with the clock of the AS.  Therefore, it can
   not reliably verify the expiration time of access tokens it receives.
   To ensure a certain level of access token freshness nevertheless, the AS returns an
   error response as described in Section 5.9.3.

   In
   RS has included a successful response, "cnonce" parameter (see Section 5.3.1) in the AS encodes
   response.  (The hex-sequence of the response parameters cnonce parameter is encoded in a
   map including with the same required and optional parameters as
   CBOR-based notation in
   Section 2.2 of [RFC7662] with this example.)

   Figure 4 illustrates the following addition:

   ace_profile  OPTIONAL.  This indicates mandatory to use binary encoding of the profile that
   message payload shown in Figure 3.

   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                     #

        Figure 4: AS Request Creation Hints example encoded in CBOR

5.3.1.  The Client-Nonce Parameter

   If the RS MUST
      use does not synchronize its clock with the client.  See Section 5.8.4.3 for more details on the
      formatting of this parameter.

   cnonce  OPTIONAL.  A client-nonce provided AS, it could be
   tricked into accepting old access tokens, that are either expired or
   have been compromised.  In order to ensure some level of token
   freshness in that case, the AS by RS can use the client. "cnonce" (client-nonce)
   parameter.  The processing requirements for this parameter are as
   follows:

   o  An RS sending a "cnonce" parameter in an "AS Request Creation
      Hints" message MUST verify store information to validate that a given
      cnonce is fresh.  How this corresponds to is implemented internally is out of
      scope for this specification.  Expiration of client-nonces should
      be based roughly on the client-nonce
      previously provided time it would take a client to obtain an
      access token after receiving the "AS Request Creation Hints"
      message, with some allowance for unexpected delays.

   o  A client receiving a "cnonce" parameter in the AS an "AS Request Creation
      Hints.  See Section 5.3 and Section 5.8.4.4.

   exi  OPTIONAL.  The "expires-in" claim associated to
      Hints" message MUST include this access
      token.  See Section 5.10.3.

   Furthermore [I-D.ietf-ace-oauth-params] defines more parameters that in the AS MUST be able to use parameters when responding to a request to requesting
      an access token at the
   introspection endpoint.

   For example, Figure 15 shows AS, using the "cnonce" parameter from
      Section 5.8.4.4.

   o  If an AS response to the introspection grants an access token request in Figure 13.  Note that containing a "cnonce"
      parameter, it MUST include this example contains the "cnf"
   parameter defined value in [I-D.ietf-ace-oauth-params].

   Header: Created (Code=2.01)
   Content-Format: "application/ace+cbor"
   Payload:
   {
     "active" : true,
     "scope" : "read",
     "ace_profile" : "coap_dtls",
     "cnf" : {
       "COSE_Key" : {
         "kty" : "Symmetric",
         "kid" : b64'39Gqlw',
         "k" : b64'hJtXhkV8FJG+Onbc6mxCcQh'
       }
     }
   }

                Figure 15: Example introspection response.

5.9.3.  Error Response

   The error responses for CoAP-based interactions with the AS are
   equivalent to access token, using
      the ones for HTTP-based interactions as defined "cnonce" claim specified in Section 2.3 of [RFC7662], with the following differences: 5.10.

   o  If content is sent and CBOR  An RS that is used using the payload client-nonce mechanism and that receives
      an access token MUST be encoded as verify that this token contains a CBOR map and cnonce
      claim, with a client-nonce value that is fresh according to the
      information stored at the first step above.  If the cnonce claim
      is not present or if the cnonce claim value is not fresh, the Content-Format "application/ace+cbor" RS
      MUST be
      used.

   o  If the credentials used by discard the requesting entity (usually access token.  If this was an interaction with
      the RS)
      are invalid authz-info endpoint the AS RS MUST also respond with the an error
      message using a response code equivalent to the CoAP code 4.01 (Unauthorized) and use
      (Unauthorized).

5.4.  Authorization Grants

   To request an access token, the required and
      optional parameters client obtains authorization from Section 5.2 the
   resource owner or uses its client credentials as a grant.  The
   authorization is expressed in [RFC6749].

   o the form of an authorization grant.

   The OAuth framework [RFC6749] defines four grant types.  The grant
   types can be split up into two 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 [RFC7521] defining an assertion-based authorization
   grant.

   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 requesting entity client acts on behalf of the
   resource owner, but does not have the right any display or has very limited
   interaction possibilities, it is recommended to perform use the device code
   grant defined in [RFC8628].  In cases where the client acts
   autonomously the client credentials grant is recommended.

   For details on the different grant types, see section 1.3 of
   [RFC6749].  The OAuth 2.0 framework provides an extension mechanism
   for defining additional grant types, so profiles of this
      introspection request, framework
   MAY define additional grant types, if needed.

5.5.  Client Credentials

   Authentication of the client is mandatory independent of the AS MUST respond with a response code
      equivalent to grant
   type when requesting an access token from the CoAP code 4.03 (Forbidden). token endpoint.  In this the
   case no
      payload is returned.

   o  The parameters "error", "error_description" of the client credentials grant type, the authentication and "error_uri" MUST
      be abbreviated using
   grant coincide.

   Client registration and provisioning of client credentials to the codes specified in Figure 12.

   o
   client is out of scope for this specification.

   The error codes MUST be abbreviated using the codes specified OAuth framework defines one client credential type in
      the registry defined by Section 8.4.

   Note that a properly formed section
   2.3.1 of [RFC6749]: client id and authorized query for client secret.
   [I-D.erdtman-ace-rpcc] adds raw-public-key and pre-shared-key to the
   client credentials types.  Profiles of this framework MAY extend with
   an inactive or
   otherwise invalid token additional client credentials type using client certificates.

5.6.  AS Authentication

   The client credential grant does not warrant an error response not, by this
   specification. default, authenticate the AS
   that the client connects to.  In these cases, classic OAuth, the authorization AS is
   authenticated with a TLS server certificate.

   Profiles of this framework MUST instead
   respond with an introspection response with the "active" field set to
   "false".

5.9.4.  Mapping Introspection parameters to CBOR

   If CBOR is used, specify how clients authenticate the introspection request
   AS and response parameters
   MUST be mapped to CBOR types how communication security is implemented.  By default, server
   side TLS certificates, as specified in the registry defined by
   Section 8.12, using the given integer abbreviation for the map key.

   Note that we have aligned abbreviations that correspond OAuth 2.0, are required.

5.7.  The Authorization Endpoint

   The OAuth 2.0 authorization endpoint is used to a claim interact with the abbreviations defined in [RFC8392]
   resource owner and the abbreviations of
   parameters with the same name from Section 5.8.5.

       /-------------------+----------+-------------------------\
       | Parameter name    | CBOR Key | Value Type              |
       |-------------------+----------+-------------------------|
       | iss               | 1        | text string             |
       | sub               | 2        | text string             |
       | aud               | 3        | text string             |
       | exp               | 4        | integer or              |
       |                   |          |   floating-point number |
       | nbf               | 5        | integer or              |
       |                   |          |   floating-point number |
       | iat               | 6        | integer or              |
       |                   |          |   floating-point number |
       | cti               | 7        | byte string             |
       | scope             | 9        | text or byte string     |
       | active            | 10       | True or False           |
       | 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       | byte string             |
       | exi               | 40       | unsigned integer        |
       \-------------------+----------+-------------------------/

        Figure 16: CBOR Mappings to Token Introspection Parameters.

5.10. obtain an authorization grant, in certain grant
   flows.  The Access Token

   This primary use case for the ACE-OAuth framework RECOMMENDS is for
   machine-to-machine interactions that do not involve the use of CBOR web token (CWT) as
   specified resource
   owner in [RFC8392].

   In order to facilitate offline processing the authorization flow; therefore, this endpoint is out of access tokens,
   scope here.  Future profiles may define constrained adaptation
   mechanisms for this
   document uses endpoint as well.  Non-constrained clients
   interacting with constrained resource servers can use the "cnf" claim from [RFC8747]
   specification in section 3.1 of [RFC6749] and the "scope" claim
   from [RFC8693] for JWT- and CWT-encoded tokens. attack
   countermeasures suggested in section 4.2 of [RFC6819].

5.8.  The Token Endpoint

   In addition to
   string encoding specified standard OAuth 2.0, the AS provides the token endpoint for
   submitting access token requests.  This framework extends the "scope" claim, a binary encoding
   MAY be used.  The syntax
   functionality 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.

   If token endpoint, giving the AS needs to convey a hint the possibility to
   help the client and RS about which profile it
   should use to communicate with establish shared keys or to exchange their
   public keys.  Furthermore, this framework defines encodings using
   CBOR, as a substitute for JSON.

   The endpoint may also be exposed over HTTPS as in classical OAuth or
   even other transports.  A profile MUST define the client, details of the AS MAY include an
   "ace_profile" claim in
   mapping between the access token, fields described below, and these transports.  If
   HTTPS is used, the semantics of Sections 4.1.3 and 4.1.4 of the OAuth
   2.0 specification MUST be followed (with additions as described
   below).  If the CoAP is some other transport with CBOR payload format
   is supported, the same syntax and semantics as defined described in Section 5.8.4.3.

   If this section MUST be
   followed.

   For the client submitted AS to be able to issue a client-nonce parameter in the access token
   request Section 5.8.4.4, token, the AS client MUST include be
   authenticated and present a valid grant for the value scopes requested.
   Profiles of this
   parameter in framework MUST specify how the "cnonce" claim specified here.  The "cnonce" claim
   uses binary encoding.

5.10.1.  The Authorization Information Endpoint

   The access token, containing authorization information AS authenticates the
   client and
   information about how the proof-of-possession method used by communication between client and AS is protected,
   fulfilling the client,
   needs to requirements specified in Section 5.

   The default name of this endpoint in an url-path SHOULD be transported '/token'.
   However, implementations are not required to use this name and can
   define their own instead.

   The figures of this section use CBOR diagnostic notation without the RS so
   integer abbreviations for the parameters or their values for
   illustrative purposes.  Note that implementations MUST use the RS can authenticate
   integer abbreviations and
   authorize the binary CBOR encoding, if the CBOR
   encoding is used.

5.8.1.  Client-to-AS Request

   The client request.

   This section defines sends a method for transporting the access token POST request to the RS using a RESTful protocol such as CoAP.  Profiles of this
   framework MAY define other methods for token transport. endpoint at the AS.  The method consists
   profile MUST specify how the communication is protected.  The content
   of an authz-info endpoint, implemented by the RS.
   A client using this method MUST make a POST request to consists of the parameters specified in the relevant
   subsection of section 4 of the authz-info
   endpoint at OAuth 2.0 specification [RFC6749],
   depending on the RS grant type, with the access token in the payload. following exceptions and
   additions:

   o  The RS
   receiving the token MUST verify parameter "grant_type" is OPTIONAL in the validity context of the token. this
      framework (as opposed to REQUIRED in RFC6749).  If the
   token that parameter
      is valid, missing, the RS MUST respond default value "client_credentials" is implied.

   o  The "audience" parameter from [RFC8693] is OPTIONAL to the POST request with 2.01
   (Created).  Section Section 5.10.1.1 outlines how an RS MUST proceed
   to verify the validity of an
      access token.

   The RS MUST be prepared to store at least one access token for future
   use.  This bound to a specific audience.

   o  The "cnonce" parameter defined in Section 5.8.4.4 is REQUIRED if
      the RS provided a difference to how access tokens are handled client-nonce in OAuth
   2.0, where the access token "AS Request Creation Hints"
      message Section 5.3

   o  The "scope" parameter MAY be encoded as a byte string instead of
      the string encoding specified in section 3.3 of [RFC6749], in
      order allow compact encoding of complex scopes.  The syntax of
      such a binary encoding is typically sent along with each
   request, explicitly not specified here and therefore left
      to profiles or applications.  Note specifically that a binary
      encoded scope does not stored at necessarily use the RS.

   This specification RECOMMENDS that space character '0x20'
      to delimit scope-tokens.

   o  The client can send an RS stores only one token per
   proof-of-possession key.  This means empty (null value) "ace_profile" parameter
      to indicate that it wants the AS to include the "ace_profile"
      parameter in the response.  See Section 5.8.4.3.

   o  A client MUST be able to use the parameters from
      [I-D.ietf-ace-oauth-params] in an additional access token linked request to the same key will supersede any existing
      token at the RS, by
   replacing endpoint and the corresponding authorization information. AS MUST be able to process these additional
      parameters.

   The reason default behavior, is that this greatly simplifies (constrained) implementations, with
   respect to required storage and resolving a request to the applicable
   token.

   If AS generates a symmetric proof-of-
   possession key for the payload sent client.  In order to the authz-info endpoint does not parse use an asymmetric key
   pair or to re-use a
   token, the RS MUST respond key previously established with a response code equivalent to the
   CoAP code 4.00 (Bad Request).

   The RS MAY make an introspection request to validate RS, the token before
   responding
   client is supposed to use the POST "req_cnf" parameter from
   [I-D.ietf-ace-oauth-params].

   If CoAP is used then these parameters MUST be provided in a CBOR map,
   see Figure 12.

   When HTTP is used as a transport then the client makes a request to
   the authz-info token endpoint, e.g. if the parameters MUST be encoded as defined in
   Appendix B of [RFC6749].

   The following examples illustrate different types of requests for
   proof-of-possession tokens.

   Figure 5 shows a request for a token with a symmetric proof-of-
   possession key.  The content is displayed in CBOR diagnostic
   notation, without abbreviations for better readability.

   Header: POST (Code=0.02)
   Uri-Host: "as.example.com"
   Uri-Path: "token"
   Content-Format: "application/ace+cbor"
   Payload:
   {
     "client_id" : "myclient",
     "audience" : "tempSensor4711"
   }

    Figure 5: Example request for an opaque reference.  Some transport protocols may
   provide a way access token bound to indicate a symmetric
                                   key.

   Figure 6 shows a request for a token with an asymmetric proof-of-
   possession key.  Note that in this example OSCORE [RFC8613] is used
   to provide object-security, therefore the RS Content-Format is busy and
   "application/oscore" wrapping the client should
   retry after an interval; this "application/ace+cbor" type of status update would be
   appropriate while the RS is waiting
   content.  The OSCORE option has a decoded interpretation appended in
   parentheses for an introspection response.

   Profiles MUST specify whether the authz-info endpoint is protected,
   including whether error responses from this endpoint are protected.
   Note that since the token contains information reader's convenience.  Also note that allow in this
   example the audience is implicitly known by both client and AS.
   Furthermore note that this example uses the RS "req_cnf" parameter from
   [I-D.ietf-ace-oauth-params].

   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"
   Payload:
     0x44025d1 ... (full payload omitted for brevity) ... 68b3825e

   Decrypted payload:
   {
     "client_id" : "myclient",
     "req_cnf" : {
       "COSE_Key" : {
         "kty" : "EC",
         "kid" : h'11',
         "crv" : "P-256",
         "x" : b64'usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8',
         "y" : b64'IBOL+C3BttVivg+lSreASjpkttcsz+1rb7btKLv8EX4'
       }
     }
   }

        Figure 6: Example token request bound to establish a security context in the first place, mutual
   authentication may not be possible at this point.

   The default name of this endpoint in an url-path asymmetric key.

   Figure 7 shows a request for a token where a previously communicated
   proof-of-possession key is '/authz-info',
   however implementations are not required to use this name and can
   define their own instead.

5.10.1.1.  Verifying an Access Token

   When an RS receives only referenced using the "req_cnf"
   parameter from [I-D.ietf-ace-oauth-params].

   Header: POST (Code=0.02)
   Uri-Host: "as.example.com"
   Uri-Path: "token"
   Content-Format: "application/ace+cbor"
   Payload:
   {
     "client_id" : "myclient",
     "audience" : "valve424",
     "scope" : "read",
     "req_cnf" : {
       "kid" : b64'6kg0dXJM13U'
     }
   }

       Figure 7: Example request for an access token, it token bound to a key
                                reference.

   Refresh tokens are typically not stored as securely as proof-of-
   possession keys in requesting clients.  Proof-of-possession based
   refresh token requests MUST verify it before storing
   it.  The details of NOT request different proof-of-possession
   keys or different audiences in token verification depends on various aspects,
   including the requests.  Refresh token encoding, the type of token, the security
   protection applied
   requests can only use to request access tokens bound to the token, same
   proof-of-possession key and the claims.  The token encoding
   matters since the security wrapper differs between same audience as access tokens issued
   in the initial token
   encodings.  For example, a CWT token uses COSE while a JWT token uses
   JOSE.  The type of request.

5.8.2.  AS-to-Client Response

   If the access token also request has an influence on been successfully verified by the verification
   procedure since tokens may be self-contained whereby AS
   and the client is authorized to obtain an access token
   verification may happen locally at corresponding
   to its access token request, the RS while AS sends a token-by-reference
   requires further interaction response with the authorization server, for
   example using token introspection,
   response code equivalent to obtain the claims associated
   with CoAP response code 2.01 (Created).
   If client request was invalid, or not authorized, the token reference.  Self-contained tokens MUST, at a minimum,
   be integrity protected but they MAY also be encrypted.

   For self-contained tokens AS returns an
   error response as described in Section 5.8.3.

   Note that the RS MUST process AS decides which token type and profile to use when
   issuing a successful response.  It is assumed that the security protection AS has prior
   knowledge of the token first, as specified by the respective token format.  For
   CWT capabilities of the description can be found in [RFC8392] client and for JWT the
   relevant specification is [RFC7519]. RS (see
   Appendix D).  This MUST include prior knowledge may, for example, be set by the
   use of a
   verification that security protection (and thus dynamic client registration protocol exchange [RFC7591].  If
   the token) was
   generated by an AS that client has requested a specific proof-of-possession key using the right to issue access tokens for
   "req_cnf" parameter from [I-D.ietf-ace-oauth-params], this
   RS.

   In case the token is communicated by reference may also
   influence which profile the RS AS selects, as it needs to obtain support the claims first.
   use of the key type requested the client.

   The content of the successful reply is the Access Information.  When
   using CoAP, the RS uses token introspection payload MUST be encoded as a CBOR map, when using
   HTTP the relevant
   specification encoding is [RFC7662] with CoAP transport a JSON map as specified in seciton 5.1 of

   [RFC6749].  In both cases the parameters specified in Section 5.9.

   Errors may happen during this initial processing stage:

   o  If token or claim verification fails, 5.1 of
   [RFC6749] are used, with the RS MUST discard following additions and changes:

   ace_profile:
      OPTIONAL unless the
      token and, if this was an interaction with authz-info, return request included an
      error message with a response code equivalent to empty ace_profile
      parameter in which case it is MANDATORY.  This indicates the CoAP code
      4.01 (Unauthorized).

   o
      profile that the client MUST use towards the RS.  See
      Section 5.8.4.3 for the formatting of this parameter.  If this
      parameter is absent, the claims cannot be obtained AS assumes that the RS MUST discard client implicitly
      knows which profile to use towards the token
      and, RS.

   token_type:
      This parameter is OPTIONAL, as opposed to 'required' in case [RFC6749].
      By default implementations of an interaction via this framework SHOULD assume that
      the authz-info endpoint, return
      an error message with token_type is "PoP".  If a response code equivalent specific use case requires another
      token_type (e.g., "Bearer") to be used then this parameter is
      REQUIRED.

   Furthermore [I-D.ietf-ace-oauth-params] defines additional parameters
   that the CoAP code
      4.00 (Bad Request).

   Next, the RS AS MUST verify claims, if present, contained in the access
   token.  Errors are returned be able to use when claim checks fail, in responding to a request to the order of
   priority
   token endpoint.

   Figure 8 summarizes the parameters that can currently be part of this list:

   iss  The issuer claim must identify an AS the
   Access Information.  Future extensions may define additional
   parameters.

           /-------------------+-------------------------------\
           | 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]   |
           \-------------------+-------------------------------/

                  Figure 8: Access Information parameters

   Figure 9 shows a response containing a token and a "cnf" parameter
   with a symmetric proof-of-possession key, which is defined in
   [I-D.ietf-ace-oauth-params].  Note that has the authority key identifier 'kid' is
   only used to
      issue access tokens for simplify indexing and retrieving the receiving RS.  If key, and no
   assumptions should be made that it is not unique in the case domains of either
   the RS MUST discard client or the token.  If this was an interaction with
      authz-info, RS.

   Header: Created (Code=2.01)
   Content-Format: "application/ace+cbor"
   Payload:
   {
     "access_token" : b64'SlAV32hkKG ...
      (remainder of CWT omitted for brevity;
      CWT contains COSE_Key in the RS MUST also respond with a "cnf" claim)',
     "ace_profile" : "coap_dtls",
     "expires_in" : "3600",
     "cnf" : {
       "COSE_Key" : {
         "kty" : "Symmetric",
         "kid" : b64'39Gqlw',
         "k" : b64'hJtXhkV8FJG+Onbc6mxCcQh'
       }
     }
   }

       Figure 9: Example AS response code
      equivalent with an access token bound to the CoAP code 4.01 (Unauthorized).

   exp a
                              symmetric key.

5.8.3.  Error Response

   The expiration date must be in the future.  If that is not the
      case the RS MUST discard the token.  If this was an interaction error responses for interactions with authz-info the RS MUST also respond with a response code AS are generally
   equivalent to the CoAP code 4.01 (Unauthorized).  Note that the RS
      has to terminate access rights to ones defined in Section 5.2 of [RFC6749], with the protected resources at
   following exceptions:

   o  When using CoAP the
      time when payload MUST be encoded as a CBOR map, with
      the tokens expire.

   aud  The audience claim must refer to an audience that Content-Format "application/ace+cbor".  When using HTTP the RS
      identifies with.  If that
      payload is not the case the RS MUST discard the
      token.  If this was an interaction with authz-info, encoded in JSON as specified in section 5.2 of
      [RFC6749].

   o  A response code equivalent to the RS CoAP code 4.00 (Bad Request)
      MUST
      also respond with be used for all error responses, except for invalid_client
      where a response code equivalent to the CoAP code 4.03
      (Forbidden).

   scope 4.01
      (Unauthorized) MAY be used under the same conditions as specified
      in Section 5.2 of [RFC6749].

   o  The RS must recognize parameters "error", "error_description" and "error_uri" MUST
      be abbreviated using the codes specified in Figure 12, when a CBOR
      encoding is used.

   o  The error code (i.e., value of the scope claim.  If that "error" parameter) MUST be
      abbreviated as specified in Figure 10, when a CBOR encoding is
      not
      used.

           /---------------------------+-------------\
           | 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      |
           \---------------------------+-------------/

           Figure 10: CBOR abbreviations for common error codes

   In addition to the case error responses defined in OAuth 2.0, the RS
   following behavior MUST discard be implemented by the token. AS:

   o  If this was the client submits an
      interaction with authz-info, asymmetric key in the token request that
      the RS cannot process, the AS MUST also respond reject that request with a
      response code equivalent to the CoAP code 4.00 (Bad Request).  The
      RS MAY provide additional information in Request)
      including the error response, to
      clarify what went wrong.

   Additional processing may be needed for other claims code "unsupported_pop_key" specified in a way
   specific to a profile or the underlying application.

   Note that the Subject (sub) claim cannot always be verified when the
   token is submitted to the RS since
      Figure 10.

   o  If the client may not have
   authenticated yet.  Also note that a counter for the expires_in (exi)
   claim MUST be initialized when and the RS first verifies this token.

   Also note that profiles of this framework may define it has requested an access token
   transport mechanisms that for do
      not allow for error responses.
   Therefore the error messages specified here only apply if share a common profile, the token
   was sent AS MUST reject that request with a
      response code equivalent to the authz-info endpoint.

   When sending error responses, the RS MAY use CoAP code 4.00 (Bad Request)
      including the error codes from
   Section 3.1 of [RFC6750], to provide additional details to the
   client.

5.10.1.2.  Protecting code "incompatible_ace_profiles" specified in
      Figure 10.

5.8.4.  Request and Response Parameters

   This section provides more detail about the Authorization Information Endpoint

   As this framework new parameters that can
   be used in RESTful environments, it is
   important to make sure that attackers cannot perform unauthorized access token requests on and responses, as well as
   abbreviations for more compact encoding of existing parameters and
   common parameter values.

5.8.4.1.  Grant Type

   The abbreviations specified in the authz-info endpoints, other than submitting access
   tokens.

   Specifically it SHOULD NOT registry defined in Section 8.5
   MUST be possible to perform GET, DELETE or PUT
   on used in CBOR encodings instead of the authz-info endpoint and on it's children (if any). string values defined
   in [RFC6749], if CBOR payloads are used.

           /--------------------+------------+------------------------\
           | 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]     |
           \--------------------+------------+------------------------/

           Figure 11: CBOR abbreviations for common grant types

5.8.4.2.  Token Type

   The POST method SHOULD NOT be allowed on children "token_type" parameter, defined in section 5.1 of [RFC6749],
   allows the authz-info
   endpoint.

   The RS SHOULD implement rate limiting measures AS to mitigate attacks
   aiming indicate to overload the processing capacity client which type of the RS by repeatedly
   submitting tokens.  For CoAP-based communication the RS could use the
   mechanisms from [RFC8516] to indicate that access token it
   is overloaded.

5.10.2.  Client Requests to the RS

   Before sending receiving (e.g., a request to an RS, the client MUST verify that bearer token).

   This document registers the
   keys used to protect this communication are still valid.  See
   Section 5.10.4 new value "PoP" for details on how the client determines the validity
   of the keys used.

   If an RS receives a request from OAuth Access
   Token Types registry, specifying a client, and the target resource
   requires authorization, proof-of-possession token.  How
   the RS MUST first verify that it has an
   access token that authorizes this request, and that proof-of-possession by the client has
   performed the proof-of-possession binding that token to the request.

   The response code RS is performed MUST be 4.01 (Unauthorized)
   specified by the profiles.

   The values in case the client has
   not performed "token_type" parameter MUST use the proof-of-possession, or CBOR
   abbreviations defined in the registry specified by Section 8.7, if RS has no valid access
   token a
   CBOR encoding is used.

   In this framework the "pop" value for the client.  If RS has an access token for "token_type" parameter is
   the default.  The AS may, however, provide a different value from
   those registered in [IANA.OAuthAccessTokenTypes].

5.8.4.3.  Profile

   Profiles of this framework MUST define the communication protocol and
   the client but communication security protocol between the token does not authorize access for client and the resource that was
   requested, RS RS.
   The security protocol MUST reject the request with provide encryption, integrity and replay
   protection.  It MUST also provide a 4.03 (Forbidden).  If RS
   has binding between requests and
   responses.  Furthermore profiles MUST define a list of allowed proof-
   of-possession methods, if they support proof-of-possession tokens.

   A profile MUST specify an access token for the client but it does not cover the action identifier that was requested on the resource, RS MUST reject be used to uniquely
   identify itself in the request with a
   4.05 (Method Not Allowed).

   Note: "ace_profile" parameter.  The use textual
   representation of the response codes 4.03 and 4.05 profile identifier is intended to
   prevent infinite loops where a dumb Client optimistically tries to
   access a requested resource with any access token received from AS.
   As malicious clients could pretend to be C to determine C's
   privileges, these detailed response codes must for human
   readability and for JSON-based interactions, it MUST NOT be used only when a
   certain level of security is already available which can be achieved
   only when for
   CBOR-based interactions.  Profiles MUST register their identifier in
   the Client is authenticated.

   Note: The RS registry defined in Section 8.8.

   Profiles MAY use introspection define additional parameters for timely validation of an access
   token, at both the time when a token request is presented.

   Note: Matching
   and the Access Information in the access token response in order to
   support negotiation or signaling of profile specific parameters.

   Clients that want the claims of AS to provide them with the "ace_profile"
   parameter in the access token (e.g., scope) to response can indicate that by sending a
   specific request
   ace_profile parameter with a null value for CBOR-based interactions,
   or an empty string if CBOR is application specific.

   If not used, in the request matches a valid access token and request.

5.8.4.4.  Client-Nonce

   This parameter MUST be sent from the client has performed the
   proof-of-possession for that token, the RS continues to process the
   request as specified by the underlying application.

5.10.3.  Token Expiration

   Depending on the capabilities of the RS, there are various ways in
   which AS, if it can verify the expiration of a
   previously received access token.  Here
   follows a list of the possibilities including what functionality they
   require of "cnonce" parameter in the RS.

   o "AS Request Creation
   Hints" Section 5.3.  The token parameter is encoded as a CWT and includes an "exp" claim byte string for
   CBOR-based interactions, and possibly as a string (Base64 encoded binary) if
   CBOR is not used.  It MUST copy the
      "nbf" claim.  The RS verifies these by comparing them to values value from its internal clock as defined in [RFC7519].  In this case the
      RS's internal clock must reflect cnonce parameter
   in the current date "AS Request Creation Hints".

5.8.5.  Mapping Parameters to CBOR

   If CBOR encoding is used, all OAuth parameters in access token
   requests and time, or at
      least responses MUST be synchronized with mapped to CBOR types as specified in
   the AS's clock.  How this clock
      synchronization would be performed is out of scope registry defined by Section 8.10, using the given integer
   abbreviation for this
      specification.

   o  The RS verifies the validity of map keys.

   Note that we have aligned the abbreviations corresponding to claims
   with the token by performing an
      introspection request as specified abbreviations defined in Section 5.9.  This requires
      the RS [RFC8392].

   Note also that abbreviations from -24 to 23 have a reliable network connection 1 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.

           /-------------------+----------+---------------------\
           | Name              | CBOR Key | Value Type          |
           |-------------------+----------+---------------------|
           | access_token      | 1        | byte string         |
           | expires_in        | 2        | unsigned integer    |
           | audience          | 5        | text string         |
           | scope             | 9        | text or byte string |
           | 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         |
           \-------------------+----------+---------------------/

       Figure 12: CBOR mappings used in token requests and responses

5.9.  The Introspection Endpoint

   Token introspection [RFC7662] MAY be implemented by the AS AS, and to the
   RS.  When implemented, it MAY be
      able to handle two secure sessions in parallel (C to used by the RS and RS to
      AS).

   o  In order query the AS
   for metadata about a given token, e.g., validity or scope.  Analogous
   to support token expiration the protocol defined in [RFC7662] for devices that have no
      reliable way of synchronizing their internal clocks, HTTP and JSON, this
      specification section
   defines adaptations to more constrained environments using CBOR and
   leaving the following approach: The claim "exi"
      ("expires in") can be used, choice of the application protocol to provide the RS with profile.

   Communication between the lifetime of requesting entity and the token in seconds from introspection
   endpoint at the time AS MUST be integrity protected and encrypted.  The
   communication security protocol MUST also provide a binding between
   requests and responses.  Furthermore, the RS first receives two interacting parties
   MUST perform mutual authentication.  Finally, the
      token.  For CBOR-based interaction this parameter is encoded as
      unsigned integer, while JSON-based interactions encode this as
      JSON number.

   o  Processing this claim requires AS SHOULD verify
   that the RS does requesting entity has the following:

      *  For each token right to access introspection
   information about the RS receives, that contains an "exi" claim:
         Keep track provided token.  Profiles of the time it received this framework
   that token support introspection MUST specify how authentication and revisit that
         list regularly to expunge expired tokens.

      *  Keep track of
   communication security between the identifiers of tokens containing requesting entity and the "exi"
         claim that have expired (in order to avoid accepting them
         again).  In order to avoid an unbounded memory usage growth, AS is
   implemented.

   The default name of this MUST be implemented endpoint in an url-path SHOULD be
   '/introspect'.  However, implementations are not required to use this
   name and can define their own instead.

   The figures of this section use the following way when the "exi"
         claim is used:

         +  When creating CBOR diagnostic notation without
   the token, integer abbreviations for the AS MUST add a 'cti' claim ( or
            'jti' parameters and their values for JWTs)
   better readability.

5.9.1.  Introspection Request

   The requesting entity sends a POST request to the access token. introspection
   endpoint at the AS.  The value of this
            claim profile MUST be created as the binary representation of the
            concatenation of specify how the identifier of communication
   is protected.  If CoAP is used, the RS payload MUST be encoded as a CBOR
   map with a sequence
            number counting the tokens "token" entry containing an 'exi' claim, issued the access token.  Further
   optional parameters representing additional context that is known by this AS for
   the RS.

         +  The RS requesting entity to aid the AS in its response MAY be included.

   For CoAP-based interaction, all messages MUST store use the highest sequence number content type
   "application/ace+cbor".  For HTTP the encoding defined in section 2.1
   of [RFC7662] is used.

   The same parameters are required and optional as in Section 2.1 of
   [RFC7662].

   For example, Figure 13 shows an expired RS calling the token containing introspection
   endpoint at the "exi" claim AS to query about an OAuth 2.0 proof-of-possession
   token.  Note that it has seen, and treat
            tokens with lower sequence numbers as expired. object security based on OSCORE [RFC8613] is
   assumed in this example, therefore the Content-Format is
   "application/oscore".  Figure 14 shows the decoded payload.

   Header: POST (Code=0.02)
   Uri-Host: "as.example.com"
   Uri-Path: "introspect"
   OSCORE: 0x09, 0x05, 0x25
   Content-Format: "application/oscore"
   Payload:
   ... COSE content ...

                 Figure 13: Example introspection request.

   {
     "token" : b64'7gj0dXJQ43U',
     "token_type_hint" : "PoP"
   }

                        Figure 14: Decoded payload.

5.9.2.  Introspection Response

   If a token that authorizes a long running the introspection request such as a CoAP
   Observe [RFC7641] expires, is authorized and successfully
   processed, the RS MUST send an error AS sends a response with the response code equivalent
   to the CoAP code 4.01 (Unauthorized) to 2.01 (Created).  If the client and then terminate processing introspection request was
   invalid, not authorized or couldn't be processed the long running request.

5.10.4.  Key Expiration

   The AS provides the client with key material that the RS uses.  This
   can either be a common symmetric PoP-key, or returns an asymmetric key used
   by
   error response as described in Section 5.9.3.

   In a successful response, the RS to authenticate towards AS encodes the client.  Since there response parameters in a
   map.  If CoAP 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 used, this MUST be encoded as a key that CBOR map, if HTTP is expired and possibly in
   used the
   hands JSON encoding specified in section 2.2 of an attacker, or accepts responses from the RS that are not
   properly protected and could possibly have been forged by an
   attacker.

   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 [RFC7662] is opaque to used.
   The map containing the client, one response payload includes the same required
   and optional parameters as in Section 2.2 of [RFC7662] with the
   following methods additions:

   ace_profile  OPTIONAL.  This indicates the profile that the RS MUST be
   used to inform
      use with the client about client.  See Section 5.8.4.3 for more details on the validity
      formatting of an access token:

   o  The client knows a default validity time for all tokens it is
      using (i.e. how long a token this parameter.  If this parameter is valid after being issued).  This
      information could be provisioned absent, the AS
      assumes that the RS implicitly knows which profile to use towards
      the client when it is
      registered at client.

   cnonce  OPTIONAL.  A client-nonce provided to the AS, or published AS by the AS in a way client.
      The RS MUST verify that this corresponds to the client-nonce
      previously provided to the client can query.

   o in the "AS Request Creation
      Hints".  See Section 5.3 and Section 5.8.4.4.

   exi  OPTIONAL.  The "expires-in" claim associated to this access
      token.  See Section 5.10.3.

   Furthermore [I-D.ietf-ace-oauth-params] defines more parameters that
   the AS informs MUST be able to use when responding to a request to the client about
   introspection endpoint.

   For example, Figure 15 shows an AS response to the token validity using introspection
   request in Figure 13.  Note that this example contains the
      "expires_in" "cnf"
   parameter defined in [I-D.ietf-ace-oauth-params].

   Header: Created (Code=2.01)
   Content-Format: "application/ace+cbor"
   Payload:
   {
     "active" : true,
     "scope" : "read",
     "ace_profile" : "coap_dtls",
     "cnf" : {
       "COSE_Key" : {
         "kty" : "Symmetric",
         "kid" : b64'39Gqlw',
         "k" : b64'hJtXhkV8FJG+Onbc6mxCcQh'
       }
     }
   }

                Figure 15: Example introspection response.

5.9.3.  Error Response

   The error responses for CoAP-based interactions with the Access Information.

   A client that is not able AS are
   equivalent to obtain information about the expiration
   of a token MUST NOT use this token.

6.  Security Considerations

   Security considerations applicable to authentication and
   authorization in RESTful environments provided in OAuth 2.0 [RFC6749]
   apply to this work.  Furthermore [RFC6819] provides additional
   security considerations ones for OAuth which apply to IoT deployments HTTP-based interactions as
   well.  If the introspection endpoint is used, the security
   considerations from [RFC7662] also apply.

   The following subsections address issues specific to this document
   and it's use defined in constrained environments.

6.1.  Protecting Tokens

   A large range
   Section 2.3 of threats can be mitigated by protecting [RFC7662], with the contents
   of following differences:

   o  If content is sent and CoAP is used the access token by using a digital signature or payload MUST be encoded as
      a keyed message
   digest (MAC) or an Authenticated Encryption with Associated Data
   (AEAD) algorithm.  Consequently, CBOR map and the token integrity protection Content-Format "application/ace+cbor" MUST be applied to prevent the token from being modified, particularly
   since it contains a reference to
      used.  For HTTP the symmetric key or encoding defined in section 2.3 of [RFC6749]
      is used.

   o  If the asymmetric
   key credentials used for proof-of-possession.  If by the access token contains requesting entity (usually the
   symmetric key, this symmetric key RS)
      are invalid the AS MUST be encrypted by respond with the
   authorization server so that only response code equivalent
      to the resource server can decrypt it.
   Note that using an AEAD algorithm is preferable over using a MAC
   unless CoAP code 4.01 (Unauthorized) and use the token needs to be publicly readable. required and
      optional parameters from Section 2.3 in [RFC7662].

   o  If the token is intended for multiple recipients (i.e. an audience
   that is a group), integrity protection of requesting entity does not have the token right to perform this
      introspection request, the AS MUST respond with a symmetric
   key, shared between response code
      equivalent to the AS CoAP code 4.03 (Forbidden).  In this case no
      payload is returned.

   o  The parameters "error", "error_description" and "error_uri" MUST
      be abbreviated using the recipients, is not sufficient,
   since any of codes specified in Figure 12.

   o  The error codes MUST be abbreviated using the recipients could modify codes specified in
      the token undetected registry defined by the
   other recipients.  Therefore Section 8.4.

   Note that a properly formed and authorized query for an inactive or
   otherwise invalid token with a multi-recipient audience
   MUST be protected with does not warrant an asymmetric signature.

   It is important for error response by this
   specification.  In these cases, 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 secret MUST NOT be used as proof-of-possession key instead
   respond with an introspection response with
   multiple resource servers since the benefit from using the proof-of-
   possession concept is then significantly reduced. "active" field set to
   "false".

5.9.4.  Mapping Introspection Parameters to CBOR

   If clients are capable of doing so, they should frequently request
   fresh access tokens, as this allows CBOR is used, the AS introspection request and response parameters
   MUST be mapped to keep the lifetime of CBOR types as specified in the tokens short.  This allows registry defined by
   Section 8.12, using the AS to use shorter proof-of-
   possession key sizes, which translate given integer abbreviation for the map key.

   Note that we have aligned abbreviations that correspond to a performance benefit for claim
   with the client abbreviations defined in [RFC8392] and for the resource server.  Shorter keys also lead to
   shorter messages (particularly abbreviations of
   parameters with asymmetric keying material).

   When authorization servers bind symmetric keys to access tokens, they
   SHOULD the same name from Section 5.8.5.

       /-------------------+----------+-------------------------\
       | Parameter name    | CBOR Key | Value Type              |
       |-------------------+----------+-------------------------|
       | iss               | 1        | text string             |
       | sub               | 2        | text string             |
       | aud               | 3        | text string             |
       | exp               | 4        | integer or              |
       |                   |          |   floating-point number |
       | nbf               | 5        | integer or              |
       |                   |          |   floating-point number |
       | iat               | 6        | integer or              |
       |                   |          |   floating-point number |
       | cti               | 7        | byte string             |
       | scope these access tokens             | 9        | text or byte string     |
       | active            | 10       | True or False           |
       | 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       | byte string             |
       | exi               | 40       | unsigned integer        |
       \-------------------+----------+-------------------------/

        Figure 16: CBOR Mappings to a specific permission. Token Introspection Parameters.

5.10.  The Access Token

   In certain situations it may be necessary to revoke an access token
   that is still valid.  Client-initiated revocation is specified in
   [RFC7009] for OAuth 2.0.  Other revocation mechanisms are currently
   not specified, as this framework the underlying assumption use of CBOR Web Token (CWT) as specified in OAuth is that access
   tokens are issued with a relatively short lifetime.  This may not
   hold true for disconnected constrained devices, needing access tokens
   with relatively long lifetimes, and would therefore necessitate
   further standardization work that
   [RFC8392] is out RECOMMENDED.

   In order to facilitate offline processing of scope for access tokens, this document.

6.2.  Communication Security

   Communication with the authorization server MUST use confidentiality
   protection.  This step is extremely important since the client or the
   RS may obtain
   document uses the proof-of-possession key "cnf" claim from [RFC8747] and the authorization
   server "scope" claim
   from [RFC8693] for use with a specific access token.  Not using
   confidentiality protection exposes this secret (and the access token) JWT- and CWT-encoded tokens.  In addition to an eavesdropper thereby completely negating proof-of-possession
   security.  The requirements for communication security of profiles
   are
   string encoding specified in Section 5.

   Additional protection for the access token can "scope" claim, a binary encoding
   MAY be applied by
   encrypting it, for example encryption used.  The syntax of CWTs such an encoding is explicitly not
   specified in
   Section 5.1 of [RFC8392].  Such additional protection can be
   necessary if 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.

   If the token is later transferred over an insecure
   connection (e.g. when AS needs to convey a hint to the RS about which profile it is sent
   should use to communicate with the authz-info endpoint).

   Developers MUST ensure that client, the ephemeral credentials (i.e., AS MAY include an
   "ace_profile" claim in the
   private key or access token, with the session key) are not leaked to third parties.  An
   adversary same syntax and
   semantics as defined in possession of Section 5.8.4.3.

   If the ephemeral credentials bound to client submitted a client-nonce parameter in the access token will be able to impersonate
   request Section 5.8.4.4, the client.  Be aware that AS MUST include the value of this is a real risk with many constrained environments, since
   adversaries can often easily get physical access to
   parameter in the devices.
   This risk can also be mitigated to some extent by making sure that
   keys are refreshed more frequently.

6.3.  Long-Term Credentials

   Both clients "cnonce" claim specified here.  The "cnonce" claim
   uses binary encoding.

5.10.1.  The Authorization Information Endpoint

   The access token, containing authorization information and RSs have long-term credentials that are
   information about the proof-of-possession method used to
   secure communications, and authenticate to by the AS.  These credentials
   need client,
   needs to be protected against unauthorized access.  In constrained
   devices, deployed in publicly accessible places, such protection can
   be difficult transported to achieve without specialized hardware (e.g. secure key
   storage memory).

   If credentials are lost or compromised, the operator of RS so that the affected
   devices needs to have procedures to invalidate any access these
   credentials give RS can authenticate and
   authorize the client request.

   This section defines a method for transporting the access token to revoke tokens linked to
   the RS using a RESTful protocol such credentials. as CoAP.  Profiles of this
   framework MAY define other methods for token transport.

   The loss method consists of an authz-info endpoint, implemented by the RS.
   A client using this method MUST make a credential linked POST request to a specific device the authz-info
   endpoint at the RS with the access token in the payload.  The CoAP
   Content-Format or HTTP Media Type MUST NOT lead to
   a compromise reflect the format of other credentials not linked to that device,
   therefore secret keys used the
   token, e.g. application/cwt for authentication CBOR Web Tokens, if no Content-Format
   or Media Type is defined for the token format, application/octet-
   stream MUST NOT be shared
   between more than two parties.

   Operators of clients or used.

   The RS SHOULD have procedures in place to replace
   credentials that are suspected to have been compromised or that have
   been lost.

   Operators also SHOULD have procedures for decommissioning devices,
   that include securely erasing credentials and other security critical
   material in receiving the devices being decommissioned.

6.4.  Unprotected AS Request Creation Hints

   Initially, no secure channel exists to protect token MUST verify the communication
   between C and RS.  Thus, C cannot determine if validity of the token.  If
   the token is valid, the AS Request
   Creation Hints contained in an unprotected response from RS MUST respond to an
   unauthorized the POST request (see with a
   response code equivalent to CoAP's 2.01 (Created).  Section 5.3) are authentic.  C therefore 5.10.1.1
   outlines how an RS MUST determine if proceed to verify the validity of an AS access
   token.

   The RS MUST be prepared to store at least one access token for future
   use.  This is authorized a difference to provide how access tokens for a
   certain RS.

   A compromised RS may use are handled in OAuth
   2.0, where the hints for attempting to trick a client
   into contacting an AS that access token is typically sent along with each
   request, and therefore not supposed to be in charge of that stored at the RS.  Therefore, C must not communicate with an AS if

   When using this framework it cannot
   determine is RECOMMENDED that this AS has the authority to issue access tokens for
   this RS.  Otherwise, a compromised an RS may use 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 the
   RS, by replacing the corresponding authorization information.  The
   reason is that this greatly simplifies (constrained) implementations,
   with respect to perform required storage and resolving a
   denial of service attack against request to the
   applicable token.

   If the payload sent to the authz-info endpoint does not parse to a specific AS, by redirecting
   token, the RS MUST respond with a
   large number of client requests response code equivalent to that AS.

6.5.  Minimal security requirements for communication

   This section summarizes the minimal requirements for the
   communication security of
   CoAP code 4.00 (Bad Request).

   The RS MAY make an introspection request to validate the different protocol interactions.

   C-AS  All communication between token before
   responding to the client and POST request to the Authorization
      Server MUST be encrypted, integrity and replay protected.
      Furthermore responses from authz-info endpoint, e.g. if
   the AS token is an opaque reference.  Some transport protocols may
   provide a way to indicate that the RS is busy and the client MUST should
   retry after an interval; this type of status update would be bound to
      the client's request to avoid attacks where the attacker swaps
   appropriate while the
      intended response RS is waiting for an older one valid for a previous request.
      This requires introspection response.

   Profiles MUST specify whether the authz-info endpoint is protected,
   including whether error responses from this endpoint are protected.
   Note that since the token contains information that allow the client
   and the Authorization Server have
      previously exchanged either a shared secret or their public keys
      in order RS to negotiate establish a secure communication.  Furthermore security context in the
      client MUST first place, mutual
   authentication may not be able to determine whether possible at this point.

   The default name of this endpoint in an AS has the authority url-path is '/authz-info',
   however implementations are not required to issue access tokens for a certain RS.  This use this name and can for example be
      done through pre-configured lists, or through
   define their own instead.

5.10.1.1.  Verifying an online lookup
      mechanism that in turn also must be secured.

   RS-AS Access Token

   When an RS receives an access token, it MUST verify it before storing
   it.  The communication between details of token verification depends on various aspects,
   including the Resource Server and token encoding, the
      Authorization Server via type of token, the introspection endpoint MUST be
      encrypted, integrity security
   protection applied to the token, and replay protected.  Furthermore responses
      from the AS to claims.  The token encoding
   matters since the security protection differs between the token
   encodings.  For example, a CWT token uses COSE while a JWT token uses
   JOSE.  The type of token also has an influence on the RS MUST verification
   procedure since tokens may be bound to the RS's request.  This
      requires that self-contained whereby token
   verification may happen locally at the RS and the Authorization Server have previously
      exchanged either a shared secret, or their public keys in order to
      negotiate while a secure communication.  Furthermore token-by-reference
   requires further interaction with the RS MUST be able authorization server, for
   example using token introspection, to determine whether an AS has obtain the authority to issue access claims associated
   with the token reference.  Self-contained tokens itself.  This is usually configured out of band, but could
      also MUST, at least be performed through an online lookup mechanism provided that
      it is
   integrity protected but they MAY also secured in the same way.

   C-RS  The initial communication between the client and the Resource
      Server can not be secured in general, since encrypted.

   For self-contained tokens 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
      client authentication it is RECOMMEND to use this mechanism for
      protecting MUST process the initial communication.  After security protection
   of the client has
      successfully transmitted token first, as specified by the access respective token to format.  For
   CWT the RS, a secure
      communication protocol MUST description can be established between client found in [RFC8392] and RS for JWT the actual resource request.
   relevant specification is [RFC7519].  This protocol MUST provide
      confidentiality, integrity and replay protection as well as include a
      binding between requests and responses.  This requires
   verification that security protection (and thus the
      client learned either the RS's public key or received a symmetric
      proof-of-possession key bound to token) was
   generated by an AS that has the right to issue access tokens for this
   RS.

   In case the token from is communicated by reference the AS.
      The RS must have learned either the client's public key or a
      shared symmetric key from needs to obtain
   the claims in first.  When the RS uses token introspection the relevant
   specification is [RFC7662] with CoAP transport specified in
   Section 5.9.

   Errors may happen during this initial processing stage:

   o  If the verification of the security wrapper fails, or the token
      was issued by an
      introspection request.  Since ACE AS that does not provide profile
      negotiation between C and RS, the client MUST have learned what
      profile the RS supports (e.g. from right to issue tokens
      for the AS or pre-configured) and
      initiate receiving RS, the communication accordingly.

6.6.  Token Freshness and Expiration

   An RS that is offline faces MUST discard the problem of clock drift.  Since it
   cannot synchronize its clock token and, if this
      was an interaction with authz-info, return an error message with a
      response code equivalent to the AS, it may CoAP code 4.01 (Unauthorized).

   o  If the claims cannot be tricked into
   accepting old access tokens that are no longer valid or have been
   compromised.  In order to prevent this, an obtained the RS may use MUST discard the nonce-based
   mechanism defined token
      and, in Section 5.3 to ensure freshness case of an Access
   Token subsequently presented to this RS.

   Another problem interaction via the authz-info endpoint, return
      an error message with clock drift is that evaluating a response code equivalent to the standard
   token expiration claim "exp" can give unpredictable results.

   Acceptable ranges of clock drift are highly dependent on CoAP code
      4.00 (Bad Request).

   Next, the RS MUST verify claims, if present, contained in the concrete
   application.  Important factors are how long access tokens
   token.  Errors are valid,
   and how critical timely expiration returned when claim checks fail, in the order of access token is.
   priority of this list:

   iss  The expiration mechanism implemented by issuer claim (if present) must identify the "exi" claim, based on AS that has
      produced the
   first time security protection for the access token.  If that is
      not the case the RS sees MUST discard the token token.  If this was defined to provide a more
   predictable alternative.  The "exi" approach has some drawbacks that
   need to be considered:

      A malicious client may hold back tokens an
      interaction with authz-info, the "exi" claim in
      order to prolong their lifespan.

      If an RS loses state (e.g. due MUST also respond with a
      response code equivalent to an unscheduled reboot), it may
      loose the current values of counters tracking the "exi" claims of
      tokens it is storing. CoAP code 4.01 (Unauthorized).

   exp  The first drawback expiration date must be in the future.  If that is inherent to not the deployment scenario and
      case the
   "exi" solution.  It can therefore not be mitigated without requiring RS MUST discard the token.  If this was an interaction
      with authz-info the RS be online at times.  The second drawback can be mitigated
   by regularly storing MUST also respond with a response code
      equivalent to the value of "exi" counters 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.

   aud  The audience claim must refer to persistent
   memory.

6.7.  Combining profiles

   There may be use cases were different profiles of this framework are
   combined.  For example, an MQTT-TLS profile audience that the RS
      identifies with.  If that is used between not the
   client and case the RS in combination MUST discard the
      token.  If this was an interaction with a CoAP-DTLS profile for
   interactions between authz-info, the client and RS MUST
      also respond with a response code equivalent to the AS. CoAP code 4.03
      (Forbidden).

   scope  The security RS must recognize value of a
   profile MUST NOT depend on the assumption scope claim.  If that the profile is used
   for all
      not the different types of interactions in case the RS MUST discard the token.  If this framework.

6.8.  Unprotected Information

   Communication was an
      interaction with authz-info, the authz-info endpoint, as well as RS MUST also respond with a
      response code equivalent to the various
   error responses defined in this framework, all potentially include
   sending CoAP code 4.00 (Bad Request).  The
      RS MAY provide additional information over an unprotected channel.  These messages in the error response, to
      clarify what went wrong.

   Additional processing may
   leak information be needed for other claims in a way
   specific to an adversary, a profile or may the underlying application.

   Note that the Subject (sub) claim cannot always be manipulated by active
   attackers verified when the
   token is submitted to induce incorrect behavior.  For example error responses the RS since the client may not have
   authenticated yet.  Also note that a counter for requests to the Authorization Information endpoint can reveal
   information about an otherwise opaque expires_in (exi)
   claim MUST be initialized when the RS first verifies this token.

   Also note that profiles of this framework may define access token to an adversary
   who has intercepted this token.

   As far as
   transport mechanisms that do not allow for error messages are concerned, this framework is written
   under the assumption that, in general, responses.
   Therefore the benefits of detailed error messages outweigh specified here only apply if the risk due token
   was sent to information leakage.  For
   particular the authz-info endpoint.

   When sending error responses, the RS MAY use cases, where this assessment does not apply, detailed the error messages can be replaced by more generic ones.

   In some scenarios it may be possible codes from
   Section 3.1 of [RFC6750], to provide additional details to protect the communication
   with
   client.

5.10.1.2.  Protecting the authz-info endpoint (e.g. through DTLS with only server-side
   authentication).  In cases where this is not possible Authorization Information Endpoint

   As this framework
   RECOMMENDS to use encrypted CWTs or tokens that are opaque references
   and need to can be subjected to introspection by the RS.

   If the initial unauthorized resource request message (see
   Section 5.2) used in RESTful environments, it is used, the client MUST
   important to make sure that attackers cannot perform unauthorized
   requests on the authz-info endpoints, other than submitting access
   tokens.

   Specifically it is not
   sending sensitive content in this request.  While GET and SHOULD NOT be possible to perform GET, DELETE
   requests only reveal or PUT
   on the target URI authz-info endpoint and on its children (if any).

   The POST method SHOULD NOT be allowed on children of the resource, POST and PUT
   requests would reveal authz-info
   endpoint.

   The RS SHOULD implement rate limiting measures to mitigate attacks
   aiming to overload the whole payload processing capacity of the intended operation.

   Since RS by repeatedly
   submitting tokens.  For CoAP-based communication the client is not authenticated at RS could use the point when
   mechanisms from [RFC8516] to indicate that it is
   submitting an access token overloaded.

5.10.2.  Client Requests 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

   Before sending a valid access token containing request to an "ace_profile" claim requesting RS, the
   use of said obsolete profile.  Resource Owners should update client MUST verify that the
   configuration of their RS's
   keys used to prevent them from using such obsolete
   profiles.

6.9.  Identifying audiences

   The audience claim as defined in [RFC7519] and the equivalent
   "audience" parameter from [RFC8693] protect this communication are intentionally vague still valid.  See
   Section 5.10.4 for details on how to
   match the audience value to a specific RS.  This is intended to allow
   application specific semantics to be used.  This section attempts to
   give some general guidance for client determines the use of audiences in constrained
   environments.

   URLs are not a good way validity
   of identifying mobile devices that can switch
   networks and thus be associated with new URLs.  If the audience
   represents a single RS, and asymmetric keys are used, the used.

   If an RS can be
   uniquely identified by receives a hash of its public key.  If this approach is
   used this framework RECOMMENDS to apply the procedure request from section 3
   of [RFC6920].

   If the audience addresses a group of client, and the target resource servers,
   requires authorization, the RS MUST first verify that it has an
   access token that authorizes this request, and that the mapping of
   group identifier to individual RS client has
   performed the proof-of-possession binding that token to be provisioned to each RS
   before the group-audience is usable.  Managing dynamic groups could request.

   The response code MUST be an issue, 4.01 (Unauthorized) in case the client has
   not performed the proof-of-possession, or if any RS is not always reachable when has no valid access
   token for the groups'
   memberships change.  Furthermore, issuing client.  If RS has an access tokens bound to
   symmetric proof-of-possession keys token for the client but
   the token does not authorize access for the resource that apply to a group-audience is
   problematic, as an was
   requested, RS that is in possession of MUST reject the request with a 4.03 (Forbidden).  If RS
   has an access token can
   impersonate for the client towards but it does not cover the other RSs action
   that are part was requested on the resource, RS MUST reject the request with a
   4.05 (Method Not Allowed).

   Note: The use of the
   group.  It response codes 4.03 and 4.05 is therefore NOT RECOMMENDED to issue access tokens bound intended to
   prevent infinite loops where a group audience and symmetric proof-of possession keys.

   Even the dumb client must optimistically tries to
   access a requested resource with any access token received from AS.
   As malicious clients could pretend to be able C to determine C's
   privileges, these detailed response codes must be used only when a
   certain level of security is already available which can be achieved
   only when the client is authenticated.

   Note: The RS MAY use introspection for timely validation of an access
   token, at the time when a request is presented.

   Note: Matching the claims of the correct values access token (e.g., scope) to put
   into a
   specific request is application specific.

   If the "audience" parameter, in order to obtain request matches a valid token for the
   intended RS.  Errors in this process can lead to and the client
   inadvertently obtaining a token for has performed the wrong RS.  The correct values
   proof-of-possession for "audience" can either be provisioned that token, the RS continues to process the client
   request as part of its
   configuration, or dynamically looked up specified by the client in some
   directory.  In the latter case underlying application.

5.10.3.  Token Expiration

   Depending on the integrity and correctness capabilities of the
   directory data must be assured.  Note that RS, there are various ways in
   which it can verify the "audience" hint
   provided by expiration of a received access token.  Here
   follows a list of the RS as part possibilities including what functionality they
   require of the "AS Request Creation Hints"
   Section 5.3 RS.

   o  The token is not typically source authenticated a CWT and integrity
   protected, includes an "exp" claim and should therefore not be treated a trusted value.

6.10.  Denial of service against or with Introspection possibly the
      "nbf" claim.  The optional introspection mechanism provided RS verifies these by OAuth and supported comparing them to values
      from its internal clock as defined in [RFC7519].  In this case the ACE framework allows for two types of attacks that need to
      RS's internal clock must reflect the current date and time, or at
      least be
   considered by implementers.

   First, an attacker could perform a denial synchronized with the AS's clock.  How this clock
      synchronization would be performed is out of scope for this
      specification.

   o  The RS verifies the validity of service attack against the token by performing an
      introspection endpoint at request as specified in Section 5.9.  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 to
      AS).

   o  In order to prevent validation support token expiration for devices that have no
      reliable way of access tokens.  To maintain synchronizing their internal clocks, this
      specification defines the security following approach: The claim "exi"
      ("expires in") can be used, to provide the RS with the lifetime of
      the system, an token in seconds from the time the RS that first receives the
      token.  This mechanism only works for self-contained tokens, i.e.
      CWTs and JWTs.  For CWTs this parameter is configured to use introspection MUST NOT allow access based on a encoded as unsigned
      integer, while JWTs encode this as JSON number.

   o  Processing this claim requires that the RS does the following:

      *  For each token for which it couldn't reach the introspection endpoint.

   Second, RS receives, that contains an attacker could use "exi" claim:
         Keep track of the fact time it received that an RS performs
   introspection token and revisit that
         list regularly to perform a denial expunge expired tokens.

      *  Keep track of the identifiers of service attack against that RS
   by repeatedly sending tokens to its authz-info endpoint containing the "exi"
         claim that require have expired (in order to avoid accepting them
         again).  In order to avoid an introspection call.  RS can mitigate such attacks by implementing
   rate limits on how many introspection requests they perform unbounded memory usage growth,
         this MUST be implemented in the following way when the "exi"
         claim is used:

         +  When creating the token, the AS MUST add a
   given time interval 'cti' claim ( or
            'jti' for a certain client IP address submitting tokens JWTs) 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 be
   considered, to mitigate distributed attacks.

7.  Privacy Considerations

   Implementers and users should access token.  The value of this
            claim MUST be aware created as the binary representation of the privacy implications
            concatenation of the different possible deployments identifier of the RS with a sequence
            number counting the tokens containing an 'exi' claim, issued
            by this framework.

   The AS is in a very central position and can potentially learn
   sensitive information about for the clients requesting access tokens.  If RS.

         +  The RS MUST store the client credentials grant is used, highest sequence number of an expired
            token containing the "exi" claim that it has seen, and treat
            tokens with lower sequence numbers as expired.  Note that
            this could lead to discarding valid tokens with lower
            sequence numbers, if the AS can track what kind where to issue tokens of
   access
            different validity time for the client intends to perform.  With other grants this can be
   prevented by same RS.  The assumption is
            that typically tokens in such a scenario would all have the Resource Owner.  To do so,
            same validity time.

   If a token that authorizes a long running request such as a CoAP
   Observe [RFC7641] expires, the resource owner needs
   to bind RS MUST send an error response with
   the grants it issues response code equivalent to anonymous, ephemeral credentials that
   do not allow the AS CoAP code 4.01 (Unauthorized) to link different grants
   the client and thus different
   access token requests by then terminate processing the same client. long running request.

5.10.4.  Key Expiration

   The claims contained in a token can reveal privacy sensitive
   information about AS provides the client and with key material that the RS uses.  This
   can either be a common symmetric PoP-key, or an asymmetric key used
   by the RS to any party having access authenticate towards the client.  Since there is
   currently no expiration metadata associated to
   them (whether by processing those keys, the content client
   has no way of a self-contained token or
   by introspection).  The AS SHOULD be configured knowing if these keys are still valid.  This may lead
   to minimize situations where the client sends requests containing sensitive
   information about clients to the RS using a key that is expired and RSs disclosed possibly in the tokens it issues.

   If tokens
   hands of an attacker, or accepts responses from the RS that are only integrity not
   properly protected and not encrypted, they may
   reveal information could possibly have been forged by an
   attacker.

   In order to attackers listening on prevent this, the wire, or able to
   acquire client must assume that those keys are
   only valid as long as the related access tokens in some other way.  In token is.  Since the case access
   token is opaque to the client, one of CWTs the
   token may, e.g., reveal following methods MUST be
   used to inform the audience, client about the validity of an access token:

   o  The client knows a default validity time for all tokens it is
      using (i.e. how long a token is valid after being issued).  This
      information could be provisioned to the scope and client when it is
      registered at the confirmation
   method used AS, or published by the client.  The latter may reveal the identity of the
   device or application running AS in a way that the client.  This may be linkable to
      client can query.

   o  The AS informs the identity of client about the person token validity using the
      "expires_in" parameter in the Access Information.

   A client (if there that is a person and not a machine-to-machine interaction).

   Clients using asymmetric keys for proof-of-possession should be aware
   of the consequences of using the same key pair for proof-of-
   possession towards different RSs.  A set of colluding RSs or an
   attacker able to obtain information about the access tokens will be able to link the
   requests, or even expiration
   of a token MUST NOT use this token.

6.  Security Considerations

   Security considerations applicable to determine the client's identity.

   An unprotected response authentication and
   authorization in RESTful environments provided in OAuth 2.0 [RFC6749]
   apply to an unauthorized request (see Section 5.3)
   may disclose information about RS and/or its existing relationship
   with C.  It is advisable this work.  Furthermore [RFC6819] provides additional
   security considerations for OAuth which apply to include as little information IoT deployments as possible
   in an unencrypted response.  Even the absolute URI of the AS may
   reveal sensitive information about
   well.  If the service that RS provides.
   Developers must ensure that introspection endpoint is used, the RS does not disclose information that
   has an impact on security
   considerations from [RFC7662] also apply.

   The following subsections address issues specific to this document
   and it's use in constrained environments.

6.1.  Protecting Tokens

   A large range of threats can be mitigated by protecting the privacy contents
   of the stakeholders in access token by using a digital signature or a keyed message
   digest (MAC) or an Authenticated Encryption with Associated Data
   (AEAD) algorithm.  Consequently, the AS Request
   Creation Hints.  They may choose token integrity protection MUST
   be applied to use prevent the token from being modified, particularly
   since it contains a different mechanism for reference to the
   discovery of symmetric key or the AS if necessary. asymmetric
   key used for proof-of-possession.  If means of encrypting
   communication between C and RS already exist, more detailed
   information may the access token contains the
   symmetric key, this symmetric key MUST be included with encrypted by the
   authorization server so that only the resource server can decrypt it.
   Note that using an error response to provide C with
   sufficient information AEAD algorithm is preferable over using a MAC
   unless the token needs to react on be publicly readable.

   If the token is intended for multiple recipients (i.e. an audience
   that particular error.

8.  IANA Considerations

   This document creates several registries is a group), integrity protection of the token with a registration policy symmetric
   key, shared between the AS and the recipients, is not sufficient,
   since any of "Expert Review"; guidelines to the experts are given in
   Section 8.17.

8.1.  ACE Authorization Server Request Creation Hints

   This specification establishes recipients could modify the IANA "ACE Authorization Server
   Request Creation Hints" registry.  The registry has been created to
   use token undetected by the "Expert Review" registration procedure [RFC8126].
   other recipients.  Therefore a token with a multi-recipient audience
   MUST be protected with an asymmetric signature.

   It should
   be noted that, in addition is important for the authorization server to include the expert review, some portions identity
   of the
   registry require intended recipient (the audience), typically a specification, potentially single resource
   server (or a Standards Track RFC,
   be supplied as well.

   The columns list of resource servers), in the registry are:

   Name token.  The name of the parameter

   CBOR Key  CBOR map same
   shared secret MUST NOT be used as proof-of-possession key for with
   multiple resource servers since the parameter.  Different ranges of values
      use different registration policies [RFC8126].  Integer values benefit from -256 to 255 using the proof-of-
   possession concept is then significantly reduced.

   If clients are designated capable of doing so, they should frequently request
   fresh access tokens, as Standards Action.  Integer
      values from -65536 to -257 and from 256 this allows the AS to 65535 are designated as
      Specification Required.  Integer values greater than 65535 are
      designated as Expert Review.  Integer values less than -65536 are
      marked as Private Use.

   Value Type  The CBOR data types allowable for keep the values lifetime of this
      parameter.

   Reference
   the tokens short.  This contains a pointer allows the AS to use shorter proof-of-
   possession key sizes, which translate to a performance benefit for
   the public specification of client and for the
      request creation hint abbreviation, if one exists.

   This registry will resource server.  Shorter keys also lead to
   shorter messages (particularly with asymmetric keying material).

   When authorization servers bind symmetric keys to access tokens, they
   SHOULD scope these access tokens to a specific permission.

   In certain situations it may be initially populated by necessary to revoke an access token
   that is still valid.  Client-initiated revocation is specified in
   [RFC7009] for OAuth 2.0.  Other revocation mechanisms are currently
   not specified, as the values underlying assumption in Figure 2.
   The Reference column OAuth is that access
   tokens are issued with a relatively short lifetime.  This may not
   hold true for all disconnected constrained devices, needing access tokens
   with relatively long lifetimes, and would therefore necessitate
   further standardization work that is out of these entries will be scope for this document.

8.2.  CoRE Resource Type registry

   IANA

6.2.  Communication Security

   Communication with the authorization server MUST use confidentiality
   protection.  This step is requested to register a new Resource Type (rt=) Link Target
   Attribute in extremely important since the "Resource Type (rt=) Link Target Attribute Values"
   subregistry under client or the "Constrained RESTful Environments (CoRE)
   Parameters" [IANA.CoreParameters] registry:

   rt="ace.ai".  This resource type describes an ACE-OAuth authz-info
   endpoint resource.

   Specific ACE-OAuth profiles can
   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 common resource type for
   defining their profile-specific discovery processes.

8.3.  OAuth Extensions Error Registration

   This specification registers secret (and the following error values access token)
   to an eavesdropper thereby completely negating proof-of-possession
   security.  The requirements for communication security of profiles
   are specified in the OAuth
   Extensions Error registry [IANA.OAuthExtensionsErrorRegistry].

   o  Error name: "unsupported_pop_key"
   o  Error usage location: token error response
   o  Related protocol extension: [this document]
   o  Change Controller: IESG
   o  Specification document(s): Section 5.8.3 of [this document]

   o  Error name: "incompatible_ace_profiles"
   o  Error usage location: token error response
   o  Related protocol extension: [this document]
   o  Change Controller: IESG
   o  Specification document(s): 5.

   Additional protection for the access token can be applied by
   encrypting it, for example encryption of CWTs is specified in
   Section 5.8.3 5.1 of [this document]

8.4.  OAuth Error Code CBOR Mappings Registry

   This specification establishes [RFC8392].  Such additional protection can be
   necessary if the IANA "OAuth Error Code CBOR
   Mappings" registry.  The registry has been created token is later transferred over an insecure
   connection (e.g. when it is sent to use the "Expert
   Review" registration procedure [RFC8126], except for authz-info endpoint).

   Care must by taken by developers to prevent leakage of the PoP
   credentials (i.e., the value range
   designated for private use.

   The columns key or the symmetric key).  An
   adversary in possession of the registry are:

   Name  The OAuth Error Code name, refers PoP credentials bound to the name in Section 5.2.
      of [RFC6749], e.g., "invalid_request".
   CBOR Value  CBOR abbreviation for this error code.  Integer values
      less than -65536 are marked as "Private Use", all other values use access
   token will be able to impersonate the registration policy "Expert Review" [RFC8126].
   Reference  This contains client.  Be aware that this is
   a pointer real risk with many constrained environments, since adversaries may
   get physical access to the public specification of the
      error code abbreviation, if one exists. devices and can therefore use phyical
   extraction techniques to gain access to memory contents.  This registry will risk
   can be initially populated mitigated to some extent by making sure that keys are
   refreshed frequently, by using software isolation techniques and by
   using hardware security.

6.3.  Long-Term Credentials

   Both clients and RSs have long-term credentials that are used to
   secure communications, and authenticate to the values AS.  These credentials
   need to be protected against unauthorized access.  In constrained
   devices, deployed in Figure 10.
   The Reference column for all of these entries will publicly accessible places, such protection can
   be this document.

8.5.  OAuth Grant Type CBOR Mappings

   This specification establishes the IANA "OAuth Grant Type CBOR
   Mappings" registry.  The registry has been created difficult to use the "Expert
   Review" registration procedure [RFC8126], except for achieve without specialized hardware (e.g. secure key
   storage memory).

   If credentials are lost or compromised, the value range
   designated for private use.

   The columns operator of this registry are:

   Name the affected
   devices needs to have procedures to invalidate any access these
   credentials give and to revoke tokens linked to such credentials.
   The name loss of the grant type as specified in Section 1.3 a credential linked to a specific device MUST NOT lead to
   a compromise of
      [RFC6749].
   CBOR Value  CBOR abbreviation for this grant type.  Integer values
      less than -65536 are marked as "Private Use", all other values use
      the registration policy "Expert Review" [RFC8126].
   Reference  This contains a pointer credentials not linked to the public specification that device,
   therefore secret keys used for authentication MUST NOT be shared
   between more than two parties.

   Operators of the
      grant type abbreviation, if one exists.
   Original Specification  This contains a pointer clients or RS SHOULD have procedures in place to replace
   credentials that are suspected to have been compromised or that have
   been lost.

   Operators also SHOULD have procedures for decommissioning devices,
   that include securely erasing credentials and other security critical
   material in the public
      specification of devices being decommissioned.

6.4.  Unprotected AS Request Creation Hints

   Initially, no secure channel exists to protect the grant type, communication
   between C and RS.  Thus, C cannot determine if one exists.

   This registry will be initially populated by the values "AS Request
   Creation Hints" contained in Figure 11.
   The Reference column an unprotected response from RS to an
   unauthorized request (see Section 5.3) are authentic.  C therefore
   MUST determine if an AS is authorized to provide access tokens for all a
   certain RS.  How this determination is implemented is out of these entries will be scope
   for this document.

8.6.  OAuth Access Token Types document and left to the applications.

6.5.  Minimal Security Requirements for Communication

   This section registers summarizes the following new token type in minimal requirements for the "OAuth
   Access Token Types" registry [IANA.OAuthAccessTokenTypes].

   o  Type name: "PoP"
   o  Additional Token Endpoint Response Parameters: "cnf", "rs_cnf" see
      section 3.3
   communication security of [I-D.ietf-ace-oauth-params].
   o  HTTP Authentication Scheme(s): N/A
   o  Change Controller: IETF
   o  Specification document(s): [this document]

8.7.  OAuth Access Token Type CBOR Mappings

   This specification established the IANA "OAuth Access Token Type CBOR
   Mappings" registry.  The registry has been created to use the "Expert
   Review" registration procedure [RFC8126], except for different protocol interactions.

   C-AS  All communication between the value range
   designated for private use.

   The columns of this registry are:

   Name  The name of token type as registered in client and the OAuth Access Token
      Types registry, e.g., "Bearer".
   CBOR Value  CBOR abbreviation for this token type.  Integer values
      less than -65536 are marked as "Private Use", all other values use Authorization
      Server MUST be encrypted, integrity and replay protected.
      Furthermore responses from the registration policy "Expert Review" [RFC8126].
   Reference  This contains a pointer AS to the public specification of client MUST be bound to
      the
      OAuth token type abbreviation, if one exists.
   Original Specification  This contains a pointer client's request to avoid attacks where the public
      specification of attacker swaps the OAuth token type, if
      intended response for an older one exists.

8.7.1.  Initial Registry Contents

   o  Name: "Bearer"
   o  Value: 1
   o  Reference: [this document]
   o  Original Specification: [RFC6749]

   o  Name: "PoP"
   o  Value: 2
   o  Reference: [this document]
   o  Original Specification: [this document]

8.8.  ACE Profile Registry valid for a previous request.
      This specification establishes requires that the IANA "ACE Profile" registry.  The
   registry has been created to use client and the "Expert Review" registration
   procedure [RFC8126].  It should be noted that, Authorization Server have
      previously exchanged either a shared secret or their public keys
      in addition order to the
   expert review, some portions of the registry require a specification,
   potentially negotiate a Standards Track RFC, secure communication.  Furthermore the
      client MUST be supplied as well.

   The columns of this registry are:

   Name  The name of able to determine whether an AS has the profile, authority
      to issue access tokens for a certain RS.  This can for example be used as value of the profile
      attribute.
   Description  Text giving
      done through pre-configured lists, or through an overview of online lookup
      mechanism that in turn also must be secured.

   RS-AS  The communication between the profile Resource Server and the context
      it is developed for.
   CBOR Value  CBOR abbreviation for this profile name.  Different
      ranges of values use different registration policies [RFC8126].
      Integer values from -256 to 255 are designated as Standards
      Action.  Integer values from -65536 to -257 the
      Authorization Server via the introspection endpoint MUST be
      encrypted, integrity and replay protected.  Furthermore responses
      from 256 the AS to 65535
      are designated as Specification Required.  Integer values greater
      than 65535 are designated as "Expert Review".  Integer values less
      than -65536 are marked as Private Use.
   Reference the RS MUST be bound to the RS's request.  This contains
      requires that the RS and the Authorization Server have previously
      exchanged either a pointer shared secret, or their public keys in order to
      negotiate a secure communication.  Furthermore the public specification of RS MUST be able
      to determine whether an AS has the
      profile abbreviation, if one exists. authority to issue access
      tokens itself.  This registry will be initially empty and will is usually configured out of band, but could
      also be populated by performed through an online lookup mechanism provided that
      it is also secured in the
   registrations from same way.

   C-RS  The initial communication between the ACE framework profiles.

8.9.  OAuth Parameter Registration

   This specification registers client and the following parameter Resource
      Server can not be secured in general, since the "OAuth
   Parameters" registry [IANA.OAuthParameters]:

   o  Name: "ace_profile"
   o  Parameter Usage Location: token response
   o  Change Controller: IESG
   o  Reference: Section 5.8.2 and Section 5.8.4.3 RS is not in
      possession of [this document]

8.10.  OAuth Parameters CBOR Mappings Registry

   This specification establishes the IANA "OAuth Parameters CBOR
   Mappings" registry.  The registry has been created to use the "Expert
   Review" registration procedure [RFC8126], except on access token for that client, which would carry
      the value range
   designated for private use.

   The columns of this registry are:

   Name  The OAuth Parameter name, refers necessary parameters.  If both parties support DTLS without
      client authentication it is RECOMMEND to use this mechanism for
      protecting the name in initial communication.  After the OAuth
      parameter registry, e.g., "client_id".
   CBOR Key  CBOR map key for this parameter.  Integer values less than
      -65536 are marked as "Private Use", all other values use client has
      successfully transmitted the
      registration policy "Expert Review" [RFC8126].
   Value Type  The allowable CBOR data types access token to the RS, a secure
      communication protocol MUST be established between client and RS
      for values of this
      parameter.
   Reference the actual resource request.  This contains protocol MUST provide
      confidentiality, integrity and replay protection as well as a pointer to
      binding between requests and responses.  This requires that the
      client learned either the RS's public specification of key or received a symmetric
      proof-of-possession key bound to the
      OAuth parameter abbreviation, if one exists.

   This registry will be initially populated by access token from the values in Figure 12. AS.
      The Reference column for all of these entries will be this document.

8.11.  OAuth Introspection Response Parameter Registration

   This specification registers RS must have learned either the following parameters client's public key or a
      shared symmetric key from the claims in the OAuth
   Token Introspection Response registry
   [IANA.TokenIntrospectionResponse].

   o  Name: "ace_profile"
   o  Description: The token or an
      introspection request.  Since ACE does not provide profile used
      negotiation between client C and RS.
   o  Change Controller: IESG
   o  Reference: Section 5.9.2 of [this document]

   o  Name: "cnonce"
   o  Description: "client-nonce".  A nonce previously provided to RS, the
      AS by client MUST have learned what
      profile the RS via supports (e.g. from the client.  Used to verify token freshness when AS or pre-configured) and
      initiate the communication accordingly.

6.6.  Token Freshness and Expiration

   An RS that is offline faces the problem of clock drift.  Since it
   cannot synchronize its clock with the AS.
   o  Change Controller: IESG
   o  Reference: 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) defined in Section 5.9.2 5.3 to ensure freshness of [this document]

   o  Name: "exi"
   o  Description: "Expires in".  Lifetime an
   Access Token subsequently presented to this RS.

   Another problem with clock drift is that evaluating the standard
   token expiration claim "exp" can give unpredictable results.

   Acceptable ranges of clock drift are highly dependent on the concrete
   application.  Important factors are how long access tokens are valid,
   and how critical timely expiration of access token in seconds from is.

   The expiration mechanism implemented by the "exi" claim, based on the
   first time the RS first sees it.  Used the token was defined to implement provide a weaker from of
      token expiration for devices more
   predictable alternative.  The "exi" approach has some drawbacks that cannot synchronize
   need to be considered:

      A malicious client may hold back tokens with the "exi" claim in
      order to prolong their
      internal clocks.
   o  Change Controller: IESG
   o  Reference: Section 5.9.2 lifespan.

      If an RS loses state (e.g. due to an unscheduled reboot), it may
      lose the current values of [this document]

8.12.  OAuth Token Introspection Response CBOR Mappings Registry

   This specification establishes counters tracking the "exi" claims of
      tokens it is storing.

   The first drawback is inherent to the deployment scenario and the
   "exi" solution.  It can therefore not be mitigated without requiring
   the IANA "OAuth Token Introspection
   Response CBOR Mappings" registry. RS be online at times.  The registry has been created second drawback can be mitigated by
   regularly storing the value of "exi" counters to persistent memory.

6.7.  Combining Profiles

   There may be use cases were different profiles of this framework are
   combined.  For example, an MQTT-TLS profile is used between the "Expert Review" registration procedure [RFC8126], except for
   client and the value range designated RS in combination with a CoAP-DTLS profile for private use.
   interactions between the client and the AS.  The columns security of this registry are:

   Name  The OAuth Parameter name, refers to a
   profile MUST NOT depend on the name in assumption that the OAuth
      parameter registry, e.g., "client_id".
   CBOR Key  CBOR map key profile is used
   for this parameter.  Integer values less than
      -65536 are marked as "Private Use", all other values use the
      registration policy "Expert Review" [RFC8126].
   Value Type  The allowable CBOR data different types for values of interactions in this
      parameter.
   Reference  This contains a pointer to framework.

6.8.  Unprotected Information

   Communication with the public specification of authz-info endpoint, as well as the
      introspection response parameter abbreviation, if one exists.

   This registry will various
   error responses defined in this framework, all potentially include
   sending information over an unprotected channel.  These messages may
   leak information to an adversary, or may be initially populated manipulated by active
   attackers to induce incorrect behavior.  For example error responses
   for requests to the Authorization Information endpoint can reveal
   information about an otherwise opaque access token to an adversary
   who has intercepted this token.

   As far as error messages are concerned, this framework is written
   under the values assumption that, in Figure 16.
   The Reference column for all of these entries will be this document.

   Note that general, the mappings benefits of parameters corresponding to claim names
   intentionally coincide with detailed error
   messages outweigh the CWT claim name mappings from
   [RFC8392].

8.13.  JSON Web Token Claims

   This specification registers risk due to information leakage.  For
   particular use cases, where this assessment does not apply, detailed
   error messages can be replaced by more generic ones.

   In some scenarios it may be possible to protect the following new claims in communication
   with the JSON Web
   Token (JWT) registry of JSON Web Token Claims
   [IANA.JsonWebTokenClaims]:

   o  Claim Name: "ace_profile"
   o  Claim Description: The ACE profile a token authz-info endpoint (e.g. through DTLS with only server-side
   authentication).  In cases where this is supposed not possible, it is
   RECOMMENDED to use encrypted CWTs or tokens that are opaque
   references and need to be used
      with.
   o  Change Controller: IESG
   o  Reference: Section 5.10 of [this document]

   o  Claim Name: "cnonce"
   o  Claim Description: "client-nonce".  A nonce previously provided subjected to
      the AS introspection by the RS via RS.

   If the client.  Used to verify token freshness
      when initial unauthorized resource request message (see
   Section 5.2) is used, the RS cannot synchronize its clock with client MUST make sure that it is not
   sending sensitive content in this request.  While GET and DELETE
   requests only reveal the AS.
   o  Change Controller: IESG
   o  Reference: Section 5.10 target URI of [this document]

   o  Claim Name: "exi"
   o  Claim Description: "Expires in".  Lifetime the resource, POST and PUT
   requests would reveal the whole payload of the token in seconds
      from intended operation.

   Since the time 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 first sees it.  Used to implement use an
   obsolete profile that in turn specifies a weaker
      from of vulnerable security
   mechanism via the authz-info endpoint.  Such an attack would require
   a valid access token expiration for devices that cannot synchronize their
      internal clocks.
   o  Change Controller: IESG
   o  Reference: Section 5.10.3 containing an "ace_profile" claim requesting the
   use of [this document]

8.14.  CBOR Web Token Claims

   This specification registers said obsolete profile.  Resource Owners should update the following new claims
   configuration of their RS's to prevent them from using such obsolete
   profiles.

6.9.  Identifying Audiences

   The audience claim as defined in [RFC7519] and the "CBOR
   Web Token (CWT) Claims" registry [IANA.CborWebTokenClaims].

   o  Claim Name: "ace_profile"
   o  Claim Description: The ACE profile equivalent
   "audience" parameter from [RFC8693] are intentionally vague on how to
   match the audience value to a token specific RS.  This is supposed intended to allow
   application specific semantics to be used
      with.
   o  JWT Claim Name: ace_profile
   o  Claim Key: TBD (suggested: 38)
   o  Claim Value Type(s): integer
   o  Change Controller: IESG
   o  Specification Document(s): Section 5.10 of [this document]

   o  Claim Name: "cnonce"
   o  Claim Description: The client-nonce sent used.  This section attempts to
   give some general guidance for the use of audiences in constrained
   environments.

   URLs are not a good way of identifying mobile devices that can switch
   networks and thus be associated with new URLs.  If the AS by audience
   represents a single RS, and asymmetric keys are used, the RS via
      the client.
   o  JWT Claim Name: cnonce
   o  Claim Key: TBD (suggested: 39)
   o  Claim Value Type(s): byte string
   o  Change Controller: IESG
   o  Specification Document(s): Section 5.10 can be
   uniquely identified by a hash of [this document]

   o  Claim Name: "exi"
   o  Claim Description: The expiration time its public key.  If this approach is
   used it is RECOMMENDED to apply the procedure from section 3 of
   [RFC6920].

   If the audience addresses a token measured from group of resource servers, the mapping of
   group identifier to individual RS has to be provisioned to each RS
   before the group-audience is usable.  Managing dynamic groups could
   be an issue, if any RS is not always reachable when it was received at 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 seconds.
   o  JWT Claim Name: exi
   o  Claim Key: TBD (suggested: 40)
   o  Claim Value Type(s): integer
   o  Change Controller: IESG
   o  Specification Document(s): Section 5.10.3 of [this document]

   o  Claim Name: "scope"
   o  Claim Description: The scope possession of an the access token as defined in
      [RFC6749].
   o  JWT Claim Name: scope
   o  Claim Key: TBD (suggested: 9)
   o  Claim Value Type(s): byte string or text string
   o  Change Controller: IESG
   o  Specification Document(s): Section 4.2 can
   impersonate the client towards the other RSs that are part of [RFC8693]

8.15.  Media Type Registrations

   This specification registers the 'application/ace+cbor' media type
   group.  It is therefore NOT RECOMMENDED to issue access tokens bound
   to a group audience and symmetric proof-of possession keys.

   Even the client must be able to determine the correct values to put
   into the "audience" parameter, in order to obtain a token for messages of the protocols defined
   intended RS.  Errors in this document carrying
   parameters encoded in CBOR.  This registration follows process can lead to the procedures
   specified in [RFC6838].

   Type name: application

   Subtype name: ace+cbor

   Required parameters: N/A

   Optional parameters: N/A

   Encoding considerations: Must client
   inadvertently obtaining a token for the wrong RS.  The correct values
   for "audience" can either be encoded provisioned to the client as CBOR map containing part of its
   configuration, or dynamically looked up by the
   protocol parameters defined client in [this document].

   Security considerations: See Section 6 some
   directory.  In the latter case the integrity and correctness of [this document]

   Interoperability considerations: N/A

   Published specification: [this document]

   Applications the
   directory data must be assured.  Note that use this media type: The type the "audience" hint
   provided by the RS as part of the "AS Request Creation Hints"
   Section 5.3 is used not typically source authenticated and integrity
   protected, and should therefore not be treated a trusted value.

6.10.  Denial of Service Against or with Introspection

   The optional introspection mechanism provided by
   authorization servers, clients OAuth and resource servers that support supported
   in the ACE framework as specified in [this document].

   Fragment identifier considerations: N/A

   Additional information: N/A

   Person & email address to contact allows for further information:
   <iesg@ietf.org>

   Intended usage: COMMON

   Restrictions on usage: none

   Author: Ludwig Seitz <ludwig.seitz@combitech.se>

   Change controller: IESG

8.16.  CoAP Content-Format Registry

   This specification registers two types of attacks that need to be
   considered by implementers.

   First, an attacker could perform a denial of service attack against
   the following entry introspection endpoint at the AS in order to prevent validation
   of access tokens.  To maintain the "CoAP
   Content-Formats" registry:

   Media Type: application/ace+cbor

   Encoding: -

   ID: TBD (suggested: 19)

   Reference: [this document]

8.17.  Expert Review Instructions

   All security of the IANA registries established in this document are defined system, an RS that
   is configured to use introspection MUST NOT allow access based on a registration policy of Expert Review.  This section gives
   some general guidelines
   token for what which it couldn't reach the experts should be looking for,
   but introspection endpoint.

   Second, an attacker could use the fact that an RS performs
   introspection to perform a denial of service attack against that RS
   by repeatedly sending tokens to its authz-info endpoint that require
   an introspection call.  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 being designated as experts rejected for a reason, so they certain amount of time.  A
   general rate limit on the introspection requests should also be given substantial latitude.

   Expert reviewers
   considered, to mitigate distributed attacks.

7.  Privacy Considerations

   Implementers and users should take into consideration be aware of the privacy implications of
   the different possible deployments of this framework.

   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 following points:

   o  Point squatting should AS can track what kind of
   access the client intends to perform.  With other grants this can be discouraged.  Reviewers are encouraged
   prevented by the Resource Owner.  To do so, the resource owner needs
   to get sufficient information for registration requests bind the grants it issues to ensure anonymous, ephemeral credentials that the usage is
   do not going allow the AS to duplicate one that is already
      registered, link different grants and that thus different
   access token requests by the point is likely same client.

   The claims contained in a token can reveal privacy 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 AS SHOULD be used configured to minimize the
   information about clients and RSs disclosed in
      deployments.  The zones tagged as private use the tokens it issues.

   If tokens are intended for
      testing purposes only integrity protected and closed environments; code points in other
      ranges should not be assigned for testing.
   o  Specifications are needed for the first-come, first-serve range if encrypted, they are expected may
   reveal information to be used outside of closed environments attackers listening on the wire, or able to
   acquire the access tokens in an
      interoperable some other way.  When specifications are not provided,  In the
      description provided needs to have sufficient information to
      identify what case of CWTs the point is being
   token may, e.g., reveal the audience, the scope and the confirmation
   method used for.
   o  Experts should take into account by the client.  The latter may reveal the identity of the
   device or application running the expected usage client.  This may be linkable to
   the identity of fields when
      approving point assignment.  The fact that the person using the client (if there is a range for
      standards track documents does person and
   not mean that a standards track
      document cannot have points assigned outside of that range.  The
      length of the encoded value machine-to-machine interaction).

   Clients using asymmetric keys for proof-of-possession should be weighed against how many
      code points aware
   of that length are left, the size consequences of device it using the same key pair for proof-of-
   possession towards different RSs.  A set of colluding RSs or an
   attacker able to obtain the access tokens will be
      used on.
   o  Since a high degree of overlap is expected between these
      registries and able to link the contents of
   requests, or even to determine the OAuth parameters
      [IANA.OAuthParameters] registries, experts should require new
      registrations client's identity.

   An unprotected response to maintain alignment an unauthorized request (see Section 5.3)
   may disclose information about RS and/or its existing relationship
   with parameters from OAuth 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 have comparable functionality.  Deviation from this alignment
      should only be allowed if there are functional differences, RS provides.
   Developers must ensure that
      are motivated by the RS does not disclose information that
   has an impact on the privacy of the stakeholders in the "AS Request
   Creation Hints".  They may choose to use case a different mechanism for
   the discovery of the AS if necessary.  If means of encrypting
   communication between C and that cannot RS already exist, more detailed
   information may be easily or
      efficiently addressed by comparable OAuth parameters.

9.  Acknowledgments included with an error response to provide C with
   sufficient information to react on that particular error.

8.  IANA Considerations

   This document is creates several registries with a product registration policy
   of "Expert Review"; guidelines to the experts are given in
   Section 8.17.

8.1.  ACE working group of Authorization Server Request Creation Hints

   This specification establishes the IETF.

   Thanks to Eve Maler for her contributions IANA "ACE Authorization Server
   Request Creation Hints" registry.  The registry has been created to the
   use of OAuth 2.0 and
   UMA the "Expert Review" registration procedure [RFC8126].  It should
   be noted that, in IoT scenarios, Robert Taylor for his discussion input, and
   Malisa Vucinic for his input on addition to the predecessors expert review, some portions of this proposal.

   Thanks to the authors
   registry require a specification, potentially a Standards Track RFC,
   be supplied as well.

   The columns of draft-ietf-oauth-pop-key-distribution, from
   where large parts the registry are:

   Name  The name of the security considerations where copied.

   Thanks to Stefanie Gerdes, Olaf Bergmann, and Carsten Bormann parameter

   CBOR Key  CBOR map key for
   contributing their work on AS discovery the parameter.  Different ranges of values
      use different registration policies [RFC8126].  Integer values
      from draft-gerdes-ace-dcaf-
   authorize (see Section 5.1).

   Thanks -256 to Jim Schaad 255 are designated as Standards Action.  Integer
      values from -65536 to -257 and Mike Jones for their comprehensive reviews.

   Thanks from 256 to Benjamin Kaduk 65535 are designated as
      Specification Required.  Integer values greater than 65535 are
      designated as Expert Review.  Integer values less than -65536 are
      marked as Private Use.

   Value Type  The CBOR data types allowable for his input on various questions related
   to the values of this work.

   Thanks to Cigdem Sengul for some very useful review comments.

   Thanks
      parameter.

   Reference  This contains a pointer to Carsten Bormann for contributing the text for public specification of the
      request creation hint abbreviation, if one exists.

   This registry will be initially populated by the values in Figure 2.
   The Reference column for all of these entries will be this document.

8.2.  CoRE Resource Type registry.

   Ludwig Seitz and Goeran Selander worked on Registry

   IANA is requested to register 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" [IANA.CoreParameters] registry:

   o  Value: "ace.ai"
   o  Description: ACE-OAuth authz-info endpoint resource.
   o  Reference: [this document]

   Specific ACE-OAuth profiles can use this document as part common resource type for
   defining their profile-specific discovery processes.

8.3.  OAuth Extensions Error Registration

   This specification registers the following error values in the OAuth
   Extensions Error registry [IANA.OAuthExtensionsErrorRegistry].

   o  Error name: "unsupported_pop_key"
   o  Error usage location: token error response
   o  Related protocol extension: [this document]
   o  Change Controller: IESG
   o  Specification document(s): Section 5.8.3 of [this document]

   o  Error name: "incompatible_ace_profiles"
   o  Error usage location: token error response
   o  Related protocol extension: [this document]
   o  Change Controller: IESG
   o  Specification document(s): Section 5.8.3 of [this document]

8.4.  OAuth Error Code CBOR Mappings Registry

   This specification establishes the CelticPlus project CyberWI, with funding from Vinnova.  Ludwig
   Seitz was also received further funding IANA "OAuth Error Code CBOR
   Mappings" registry.  The registry has been created to use the "Expert
   Review" registration procedure [RFC8126], except for this work by Vinnova in the context value range
   designated for private use.

   The columns of the CelticNext project Critisec.

10.  References

10.1.  Normative References

   [I-D.ietf-ace-oauth-params]
              Seitz, L., "Additional registry are:

   Name  The OAuth Parameters for Authorization
              in Constrained Environments (ACE)", draft-ietf-ace-oauth-
              params-13 (work in progress), April 2020.

   [IANA.CborWebTokenClaims]
              IANA, "CBOR Web Token (CWT) Claims",
              <https://www.iana.org/assignments/cwt/cwt.xhtml#claims-
              registry>.

   [IANA.CoreParameters]
              IANA, "Constrained RESTful Environments (CoRE)
              Parameters", <https://www.iana.org/assignments/core-
              parameters/core-parameters.xhtml>.

   [IANA.JsonWebTokenClaims]
              IANA, "JSON Web Token Claims",
              <https://www.iana.org/assignments/jwt/jwt.xhtml#claims>.

   [IANA.OAuthAccessTokenTypes]
              IANA, "OAuth Access Token Types",
              <https://www.iana.org/assignments/oauth-parameters/oauth-
              parameters.xhtml#token-types>.

   [IANA.OAuthExtensionsErrorRegistry]
              IANA, "OAuth Extensions Error Registry",
              <https://www.iana.org/assignments/oauth-parameters/oauth-
              parameters.xhtml#extensions-error>.

   [IANA.OAuthParameters]
              IANA, "OAuth Parameters",
              <https://www.iana.org/assignments/oauth-parameters/oauth-
              parameters.xhtml#parameters>.

   [IANA.TokenIntrospectionResponse]
              IANA, "OAuth Token Introspection Response",
              <https://www.iana.org/assignments/oauth-parameters/oauth-
              parameters.xhtml#token-introspection-response>.

   [RFC2119]  Bradner, S., "Key words Code name, refers to the name in Section 5.2.
      of [RFC6749], e.g., "invalid_request".
   CBOR Value  CBOR abbreviation for this error code.  Integer values
      less than -65536 are marked as "Private Use", all other values use in RFCs
      the registration policy "Expert Review" [RFC8126].
   Reference  This contains a pointer to Indicate
              Requirement Levels", BCP 14, RFC 2119,
              DOI 10.17487/RFC2119, March 1997,
              <https://www.rfc-editor.org/info/rfc2119>.

   [RFC3986]  Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
              Resource Identifier (URI): Generic Syntax", STD 66,
              RFC 3986, DOI 10.17487/RFC3986, January 2005,
              <https://www.rfc-editor.org/info/rfc3986>.

   [RFC6347]  Rescorla, E. and N. Modadugu, "Datagram Transport Layer
              Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347,
              January 2012, <https://www.rfc-editor.org/info/rfc6347>.

   [RFC6749]  Hardt, D., Ed., "The OAuth 2.0 Authorization Framework",
              RFC 6749, DOI 10.17487/RFC6749, October 2012,
              <https://www.rfc-editor.org/info/rfc6749>.

   [RFC6750]  Jones, M. and D. Hardt, "The the public specification of the
      error code abbreviation, if one exists.

   This registry will be initially populated by the values in Figure 10.
   The Reference column for all of these entries will be this document.

8.5.  OAuth 2.0 Authorization
              Framework: Bearer Token Usage", RFC 6750,
              DOI 10.17487/RFC6750, October 2012,
              <https://www.rfc-editor.org/info/rfc6750>.

   [RFC6838]  Freed, N., Klensin, J., and T. Hansen, "Media Grant Type
              Specifications and Registration Procedures", BCP 13,
              RFC 6838, DOI 10.17487/RFC6838, January 2013,
              <https://www.rfc-editor.org/info/rfc6838>.

   [RFC6920]  Farrell, S., Kutscher, D., Dannewitz, C., Ohlman, B.,
              Keranen, A., and P. Hallam-Baker, "Naming Things with
              Hashes", RFC 6920, DOI 10.17487/RFC6920, April 2013,
              <https://www.rfc-editor.org/info/rfc6920>.

   [RFC7252]  Shelby, Z., Hartke, K., and C. Bormann, "The Constrained
              Application Protocol (CoAP)", RFC 7252,
              DOI 10.17487/RFC7252, June 2014,
              <https://www.rfc-editor.org/info/rfc7252>.

   [RFC7519]  Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token
              (JWT)", RFC 7519, DOI 10.17487/RFC7519, May 2015,
              <https://www.rfc-editor.org/info/rfc7519>.

   [RFC7662]  Richer, J., Ed., CBOR Mappings

   This specification establishes the IANA "OAuth 2.0 Token Introspection",
              RFC 7662, DOI 10.17487/RFC7662, October 2015,
              <https://www.rfc-editor.org/info/rfc7662>.

   [RFC8126]  Cotton, M., Leiba, B., and T. Narten, "Guidelines Grant Type CBOR
   Mappings" registry.  The registry has been created to use the "Expert
   Review" registration procedure [RFC8126], except for
              Writing an IANA Considerations the value range
   designated for private use.

   The columns of this registry are:

   Name  The name of the grant type as specified in Section 1.3 of
      [RFC6749].
   CBOR Value  CBOR abbreviation for this grant type.  Integer values
      less than -65536 are marked as "Private Use", all other values use
      the registration policy "Expert Review" [RFC8126].
   Reference  This contains a pointer to the public specification of the
      grant type abbreviation, if one exists.
   Original Specification  This contains a pointer to the public
      specification of the grant type, if one exists.

   This registry will be initially populated by the values in RFCs", BCP 26,
              RFC 8126, DOI 10.17487/RFC8126, June 2017,
              <https://www.rfc-editor.org/info/rfc8126>.

   [RFC8152]  Schaad, J., "CBOR Object Signing and Encryption (COSE)",
              RFC 8152, DOI 10.17487/RFC8152, July 2017,
              <https://www.rfc-editor.org/info/rfc8152>.

   [RFC8174]  Leiba, B., "Ambiguity Figure 11.
   The Reference column for all of Uppercase vs Lowercase these entries will be this document.

8.6.  OAuth Access Token Types

   This section registers the following new token type in RFC
              2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
              May 2017, <https://www.rfc-editor.org/info/rfc8174>.

   [RFC8392]  Jones, M., Wahlstroem, E., Erdtman, S., and H. Tschofenig,
              "CBOR Web the "OAuth
   Access Token (CWT)", RFC 8392, DOI 10.17487/RFC8392,
              May 2018, <https://www.rfc-editor.org/info/rfc8392>.

   [RFC8693]  Jones, M., Nadalin, A., Campbell, B., Ed., Bradley, J.,
              and C. Mortimore, Types" registry [IANA.OAuthAccessTokenTypes].

   o  Type name: "PoP"
   o  Additional Token Endpoint Response Parameters: "cnf", "rs_cnf" see
      section 3.3 of [I-D.ietf-ace-oauth-params].
   o  HTTP Authentication Scheme(s): N/A
   o  Change Controller: IETF
   o  Specification document(s): [this document]

8.7.  OAuth Access Token Type CBOR Mappings

   This specification established the IANA "OAuth 2.0 Access Token Exchange", RFC 8693,
              DOI 10.17487/RFC8693, January 2020,
              <https://www.rfc-editor.org/info/rfc8693>.

   [RFC8747]  Jones, M., Seitz, L., Selander, G., Erdtman, S., and H.
              Tschofenig, "Proof-of-Possession Key Semantics for Type CBOR
              Web Tokens (CWTs)", RFC 8747, DOI 10.17487/RFC8747, March
              2020, <https://www.rfc-editor.org/info/rfc8747>.

   [RFC8949]  Bormann, C. and P. Hoffman, "Concise Binary Object
              Representation (CBOR)", STD 94, RFC 8949,
              DOI 10.17487/RFC8949, December 2020,
              <https://www.rfc-editor.org/info/rfc8949>.

10.2.  Informative References

   [BLE]      Bluetooth SIG, "Bluetooth Core Specification v5.1",
              Section 4.4, January 2019,
              <https://www.bluetooth.com/specifications/bluetooth-core-
              specification/>.

   [I-D.erdtman-ace-rpcc]
              Seitz, L. and S. Erdtman, "Raw-Public-Key and Pre-Shared-
              Key
   Mappings" registry.  The registry has been created to use the "Expert
   Review" registration procedure [RFC8126], except for the value range
   designated for private use.

   The columns of this registry are:

   Name  The name of token type as OAuth client credentials", draft-erdtman-ace-
              rpcc-02 (work in progress), October 2017.

   [I-D.ietf-quic-transport]
              Iyengar, J. and M. Thomson, "QUIC: A UDP-Based Multiplexed
              and Secure Transport", draft-ietf-quic-transport-34 (work registered in progress), January 2021.

   [I-D.ietf-tls-dtls13]
              Rescorla, E., Tschofenig, H., and N. Modadugu, "The
              Datagram Transport Layer Security (DTLS) Protocol Version
              1.3", draft-ietf-tls-dtls13-40 (work the OAuth Access Token
      Types registry, e.g., "Bearer".

   CBOR Value  CBOR abbreviation for this token type.  Integer values
      less than -65536 are marked as "Private Use", all other values use
      the registration policy "Expert Review" [RFC8126].
   Reference  This contains a pointer to the public specification of the
      OAuth token type abbreviation, if one exists.
   Original Specification  This contains a pointer to the public
      specification of the OAuth token type, if one exists.

8.7.1.  Initial Registry Contents

   o  Name: "Bearer"
   o  Value: 1
   o  Reference: [this document]
   o  Original Specification: [RFC6749]

   o  Name: "PoP"
   o  Value: 2
   o  Reference: [this document]
   o  Original Specification: [this document]

8.8.  ACE Profile Registry

   This specification establishes the IANA "ACE Profile" registry.  The
   registry has been created to use the "Expert Review" registration
   procedure [RFC8126].  It should be noted that, in progress), January
              2021.

   [Margi10impact]
              Margi, C., de Oliveira, B., de Sousa, G., Simplicio Jr,
              M., Barreto, P., Carvalho, T., Naeslund, M., and R. Gold,
              "Impact addition to the
   expert review, some portions of the registry require a specification,
   potentially a Standards Track RFC, be supplied as well.

   The columns of Operating Systems on Wireless Sensor Networks
              (Security) Applications and Testbeds", Proceedings this registry are:

   Name  The name of the 19th International Conference on Computer
              Communications profile, to be used as value of the profile
      attribute.
   Description  Text giving an overview of the profile and Networks (ICCCN), August 2010.

   [MQTT5.0]  Banks, A., Briggs, E., Borgendale, K., the context
      it is developed for.
   CBOR Value  CBOR abbreviation for this profile name.  Different
      ranges of values use different registration policies [RFC8126].
      Integer values from -256 to 255 are designated as Standards
      Action.  Integer values from -65536 to -257 and R. Gupta, "MQTT
              Version 5.0", OASIS Standard, March 2019,
              <https://docs.oasis-open.org/mqtt/mqtt/v5.0/mqtt-
              v5.0.html>.

   [RFC4949]  Shirey, R., "Internet Security Glossary, Version 2",
              FYI 36, RFC 4949, DOI 10.17487/RFC4949, August 2007,
              <https://www.rfc-editor.org/info/rfc4949>.

   [RFC6690]  Shelby, Z., "Constrained RESTful Environments (CoRE) Link
              Format", RFC 6690, DOI 10.17487/RFC6690, August 2012,
              <https://www.rfc-editor.org/info/rfc6690>.

   [RFC6819]  Lodderstedt, T., Ed., McGloin, M., from 256 to 65535
      are designated as Specification Required.  Integer values greater
      than 65535 are designated as "Expert Review".  Integer values less
      than -65536 are marked as Private Use.
   Reference  This contains a pointer to the public specification of the
      profile abbreviation, if one exists.

   This registry will be initially empty and P. Hunt, will be populated by the
   registrations from the ACE framework profiles.

8.9.  OAuth Parameter Registration

   This specification registers the following parameter in the "OAuth 2.0
              Threat Model and Security Considerations", RFC 6819,
              DOI 10.17487/RFC6819, January 2013,
              <https://www.rfc-editor.org/info/rfc6819>.

   [RFC7009]  Lodderstedt, T., Ed., Dronia, S.,
   Parameters" registry [IANA.OAuthParameters]:

   o  Name: "ace_profile"
   o  Parameter Usage Location: token response
   o  Change Controller: IESG
   o  Reference: Section 5.8.2 and M. Scurtescu, Section 5.8.4.3 of [this document]

8.10.  OAuth Parameters CBOR Mappings Registry

   This specification establishes the IANA "OAuth
              2.0 Token Revocation", RFC 7009, DOI 10.17487/RFC7009,
              August 2013, <https://www.rfc-editor.org/info/rfc7009>.

   [RFC7228]  Bormann, C., Ersue, M., and A. Keranen, "Terminology Parameters CBOR
   Mappings" registry.  The registry has been created to use the "Expert
   Review" registration procedure [RFC8126], except for
              Constrained-Node Networks", RFC 7228,
              DOI 10.17487/RFC7228, May 2014,
              <https://www.rfc-editor.org/info/rfc7228>.

   [RFC7231]  Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
              Protocol (HTTP/1.1): Semantics and Content", RFC 7231,
              DOI 10.17487/RFC7231, June 2014,
              <https://www.rfc-editor.org/info/rfc7231>.

   [RFC7521]  Campbell, B., Mortimore, C., Jones, M., and Y. Goland,
              "Assertion Framework the value range
   designated for private use.

   The columns of this registry are:

   Name  The OAuth 2.0 Client Authentication
              and Authorization Grants", RFC 7521, DOI 10.17487/RFC7521,
              May 2015, <https://www.rfc-editor.org/info/rfc7521>.

   [RFC7540]  Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext
              Transfer Protocol Version 2 (HTTP/2)", RFC 7540,
              DOI 10.17487/RFC7540, May 2015,
              <https://www.rfc-editor.org/info/rfc7540>.

   [RFC7591]  Richer, J., Ed., Jones, M., Bradley, J., Machulak, M., and
              P. Hunt, "OAuth 2.0 Dynamic Client Registration Protocol",
              RFC 7591, DOI 10.17487/RFC7591, July 2015,
              <https://www.rfc-editor.org/info/rfc7591>.

   [RFC7641]  Hartke, K., "Observing Resources Parameter name, refers to the name in the Constrained
              Application Protocol (CoAP)", RFC 7641,
              DOI 10.17487/RFC7641, September 2015,
              <https://www.rfc-editor.org/info/rfc7641>.

   [RFC7744]  Seitz, L., Ed., Gerdes, S., Ed., Selander, G., Mani, M.,
              and S. Kumar, "Use Cases OAuth
      parameter registry, e.g., "client_id".
   CBOR Key  CBOR map key for this parameter.  Integer values less than
      -65536 are marked as "Private Use", all other values use the
      registration policy "Expert Review" [RFC8126].
   Value Type  The allowable CBOR data types for values of this
      parameter.
   Reference  This contains a pointer to the public specification of the
      OAuth parameter abbreviation, if one exists.

   This registry will be initially populated by the values in Figure 12.
   The Reference column for Authentication and
              Authorization all of these entries will be this document.

8.11.  OAuth Introspection Response Parameter Registration

   This specification registers the following parameters in Constrained Environments", RFC 7744,
              DOI 10.17487/RFC7744, January 2016,
              <https://www.rfc-editor.org/info/rfc7744>.

   [RFC7959]  Bormann, C. the OAuth
   Token Introspection Response registry
   [IANA.TokenIntrospectionResponse].

   o  Name: "ace_profile"
   o  Description: The ACE profile used between client and Z. Shelby, Ed., "Block-Wise Transfers RS.
   o  Change Controller: IESG
   o  Reference: Section 5.9.2 of [this document]

   o  Name: "cnonce"
   o  Description: "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 the AS.
   o  Change Controller: IESG
   o  Reference: Section 5.9.2 of [this document]

   o  Name: "exi"
   o  Description: "Expires in".  Lifetime of the token in seconds from
      the Constrained Application Protocol (CoAP)", RFC 7959,
              DOI 10.17487/RFC7959, August 2016,
              <https://www.rfc-editor.org/info/rfc7959>.

   [RFC8252]  Denniss, W. and J. Bradley, "OAuth 2.0 time the RS first sees it.  Used to implement a weaker from of
      token expiration for Native Apps",
              BCP 212, RFC 8252, DOI 10.17487/RFC8252, October 2017,
              <https://www.rfc-editor.org/info/rfc8252>.

   [RFC8259]  Bray, T., Ed., "The JavaScript Object Notation (JSON) Data
              Interchange Format", STD 90, RFC 8259,
              DOI 10.17487/RFC8259, December 2017,
              <https://www.rfc-editor.org/info/rfc8259>.

   [RFC8414]  Jones, M., Sakimura, N., and J. Bradley, devices that cannot synchronize their
      internal clocks.
   o  Change Controller: IESG
   o  Reference: Section 5.9.2 of [this document]

8.12.  OAuth Token Introspection Response CBOR Mappings Registry

   This specification establishes the IANA "OAuth 2.0
              Authorization Server Metadata", RFC 8414,
              DOI 10.17487/RFC8414, June 2018,
              <https://www.rfc-editor.org/info/rfc8414>.

   [RFC8446]  Rescorla, E., "The Transport Layer Security (TLS) Protocol
              Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018,
              <https://www.rfc-editor.org/info/rfc8446>.

   [RFC8516]  Keranen, A., ""Too Many Requests" Token Introspection
   Response Code CBOR Mappings" registry.  The registry has been created to
   use the "Expert Review" registration procedure [RFC8126], except for
   the
              Constrained Application Protocol", RFC 8516,
              DOI 10.17487/RFC8516, January 2019,
              <https://www.rfc-editor.org/info/rfc8516>.

   [RFC8613]  Selander, G., Mattsson, J., Palombini, F., and L. Seitz,
              "Object Security value range designated for Constrained RESTful Environments
              (OSCORE)", RFC 8613, DOI 10.17487/RFC8613, July 2019,
              <https://www.rfc-editor.org/info/rfc8613>.

   [RFC8628]  Denniss, W., Bradley, J., Jones, M., and H. Tschofenig,
              "OAuth 2.0 Device Authorization Grant", RFC 8628,
              DOI 10.17487/RFC8628, August 2019,
              <https://www.rfc-editor.org/info/rfc8628>.

Appendix A.  Design Justification private use.

   The columns of this registry are:

   Name  The OAuth Parameter name, refers to the name in the OAuth
      parameter registry, e.g., "client_id".
   CBOR Key  CBOR map key for this parameter.  Integer values less than
      -65536 are marked as "Private Use", all other values use the
      registration policy "Expert Review" [RFC8126].
   Value Type  The allowable CBOR data types for values of this
      parameter.
   Reference  This section provides further insight into contains a pointer to the design decisions public specification of the solution documented
      introspection response parameter abbreviation, if one exists.

   This registry will be initially populated by the values in this document.  Section 3 lists several
   building blocks and briefly summarizes their importance. Figure 16.
   The
   justification Reference column for offering some all of these entries will be this document.

   Note that the mappings of those building blocks, as opposed parameters corresponding to using OAuth 2.0 as is, is given below.

   Common IoT constraints are:

   Low Power Radio:

      Many IoT devices are equipped claim names
   intentionally coincide with a small battery which needs to
      last for a long time.  For many constrained wireless devices, the
      highest energy cost CWT claim name mappings from
   [RFC8392].

8.13.  JSON Web Token Claims

   This specification registers the following new claims in the JSON Web
   Token (JWT) registry of JSON Web Token Claims
   [IANA.JsonWebTokenClaims]:

   o  Claim Name: "ace_profile"
   o  Claim Description: The ACE profile a token is associated supposed to transmitting or receiving
      messages (roughly by a factor be used
      with.
   o  Change Controller: IESG
   o  Reference: Section 5.10 of 10 compared [this document]
   o  Claim Name: "cnonce"
   o  Claim Description: "client-nonce".  A nonce previously provided to AES)
      [Margi10impact].  It is therefore important
      the AS by the RS via the client.  Used to keep verify token freshness
      when the total
      communication overhead low, including minimizing RS cannot synchronize its clock with the number and
      size of messages sent and received, which has an impact AS.
   o  Change Controller: IESG
   o  Reference: Section 5.10 of choice
      on the message format and protocol.  By using CoAP over UDP and
      CBOR encoded messages, some [this document]

   o  Claim Name: "exi"
   o  Claim Description: "Expires in".  Lifetime 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, token in certain cases where security
      requirements allow, be replaced by provisioning of security
      context by seconds
      from the time the RS first sees it.  Used to implement a trusted third party, using transport or application
      layer security.

   Low CPU Speed:

      Some IoT weaker
      from of token expiration for devices are equipped with processors that are
      significantly slower than those found cannot synchronize their
      internal clocks.
   o  Change Controller: IESG
   o  Reference: Section 5.10.3 of [this document]

8.14.  CBOR Web Token Claims

   This specification registers the following new claims in most current devices on the Internet.  This typically has implications on what timely
      cryptographic operations "CBOR
   Web Token (CWT) Claims" registry [IANA.CborWebTokenClaims].

   o  Claim Name: "ace_profile"
   o  Claim Description: The ACE profile a device token is capable of performing, which
      in turn impacts, e.g., protocol latency.  Symmetric key
      cryptography may supposed to be used instead
      with.
   o  JWT Claim Name: ace_profile
   o  Claim Key: TBD (suggested: 38)
   o  Claim Value Type(s): integer
   o  Change Controller: IESG
   o  Specification Document(s): Section 5.10 of [this document]

   o  Claim Name: "cnonce"
   o  Claim Description: The client-nonce sent to the computationally more
      expensive public key cryptography where AS by the security requirements
      so allow, but this may also require support for trusted-third-
      party-assisted secret key establishment using transport- or
      application-layer security.
   Small Amount RS via
      the client.
   o  JWT Claim Name: cnonce
   o  Claim Key: TBD (suggested: 39)
   o  Claim Value Type(s): byte string
   o  Change Controller: IESG
   o  Specification Document(s): Section 5.10 of [this document]

   o  Claim Name: "exi"
   o  Claim Description: The expiration time of a token measured from
      when it was received at the RS in seconds.
   o  JWT Claim Name: exi
   o  Claim Key: TBD (suggested: 40)
   o  Claim Value Type(s): integer
   o  Change Controller: IESG
   o  Specification Document(s): Section 5.10.3 of Memory:

      Microcontrollers embedded in IoT devices are often equipped with
      only a small amount [this document]

   o  Claim Name: "scope"
   o  Claim Description: The scope of RAM and flash memory, which places
      limitations on what kind an access token as defined in
      [RFC6749].
   o  JWT Claim Name: scope
   o  Claim Key: TBD (suggested: 9)
   o  Claim Value Type(s): byte string or text string
   o  Change Controller: IESG
   o  Specification Document(s): Section 4.2 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 [RFC8693]

8.15.  Media Type Registrations

   This specification registers the firmware 'application/ace+cbor' media type
   for messages of
      such a device.  In the protocols defined in this case, CoAP may document carrying
   parameters encoded in CBOR.  This registration follows the procedures
   specified in [RFC6838].

   Type name: application

   Subtype name: ace+cbor

   Required parameters: N/A

   Optional parameters: N/A

   Encoding considerations: Must be used instead of HTTP,
      symmetric-key cryptography instead of public-key cryptography, and encoded as CBOR instead of JSON.  An authentication and key establishment
      protocol, e.g., map containing the DTLS handshake,
   protocol parameters defined in comparison with assisted
      key establishment, also has an impact on memory and code
      footprints.

   User Interface Limitations:

      Protecting access to resources [this document].

   Security considerations: See Section 6 of [this document]

   Interoperability considerations: N/A

   Published specification: [this document]

   Applications that use this media type: The type is both an important security as
      well as privacy feature.  End users used by
   authorization servers, clients and enterprise customers may
      not want to give access to resource servers that support the data collected by their IoT device
      or
   ACE framework with CBOR encoding as specified in [this document].

   Fragment identifier considerations: N/A

   Additional information: N/A

   Person & email address to functions it may offer contact for further information:
   <iesg@ietf.org>

   Intended usage: COMMON

   Restrictions on usage: none

   Author: Ludwig Seitz <ludwig.seitz@combitech.se>
   Change controller: IESG

8.16.  CoAP Content-Format Registry

   This specification registers the following entry to third parties.  Since the
      classical approach "CoAP
   Content-Formats" registry:

   Media Type: application/ace+cbor

   Encoding: -

   ID: TBD (suggested: 19)

   Reference: [this document]

8.17.  Expert Review Instructions

   All of requesting permissions from end users via a
      rich user interface does not work the IANA registries established in many IoT deployment
      scenarios, these functions need to be delegated to user-controlled
      devices that this document are better suitable for such tasks, such as smart
      phones and tablets.

   Communication Constraints:

      In certain constrained settings an IoT device may not be able defined
   to
      communicate with use a given device at all times.  Devices may be
      sleeping, or just disconnected from the Internet because registration policy of Expert Review.  This section gives
   some general lack of connectivity in guidelines for what the area, experts should be looking for,
   but they are being designated as experts for cost reasons, or a reason, so they should
   be given substantial latitude.

   Expert reviewers should take into consideration the following points:

   o  Point squatting should be discouraged.  Reviewers are encouraged
      to get sufficient information for
      security reasons, e.g., registration requests to avoid an entry ensure
      that the usage is not going to duplicate one that is already
      registered, and that the point for Denial-of-
      Service attacks.

      The communication interactions this framework builds upon (as
      shown graphically in Figure 1) may is likely to be accomplished using a variety
      of different protocols, used in
      deployments.  The zones tagged as private use are intended for
      testing purposes and closed environments; code points in other
      ranges should not all parts of be assigned for testing.
   o  Specifications are needed for the message flow first-come, first-serve range if
      they are expected to be used outside of closed environments in all applications due an
      interoperable way.  When specifications are not provided, the
      description provided needs to have sufficient information to
      identify what the communication constraints.
      Deployments making use point is being used for.
   o  Experts should take into account the expected usage of CoAP are expected, but this framework fields when
      approving point assignment.  The fact that there is a range for
      standards track documents does not limited to them.  Other protocols such as HTTP, or even
      protocols such as Bluetooth Smart communication mean that do not
      necessarily use IP, could also be used. a standards track
      document cannot have points assigned outside of that range.  The latter raises the
      need for application layer security over the various interfaces.

   In the light
      length of these constraints we have made the following design
   decisions:

   CBOR, COSE, CWT:

      This framework RECOMMENDS encoded value should be weighed against how many
      code points of that length are left, the use size of CBOR [RFC8949] as data
      format.  Where CBOR data needs to device it will be protected,
      used on.
   o  Since a high degree of overlap is expected between these
      registries and the use contents of COSE
      [RFC8152] is RECOMMENDED.  Furthermore, where self-contained
      tokens are needed, the OAuth parameters
      [IANA.OAuthParameters] registries, experts should require new
      registrations to maintain alignment with parameters from OAuth
      that have comparable functionality.  Deviation from this framework RECOMMENDS alignment
      should only be allowed if there are functional differences, that
      are motivated by the use case and that cannot be easily or
      efficiently addressed by comparable OAuth parameters.

9.  Acknowledgments

   This document is a product of CWT
      [RFC8392].  These measures aim at reducing the size ACE working group of messages
      sent over the wire, IETF.

   Thanks to Eve Maler for her contributions to the RAM size use of data objects that need to be
      kept OAuth 2.0 and
   UMA in memory IoT scenarios, Robert Taylor for his discussion input, and
   Malisa Vucinic for his input on the size predecessors of libraries that devices need this proposal.

   Thanks to
      support.

   CoAP:

      This framework RECOMMENDS the use authors of CoAP [RFC7252] instead draft-ietf-oauth-pop-key-distribution, from
   where large parts of
      HTTP.  This does not preclude the use of other protocols
      specifically aimed at constrained devices, like, e.g., Bluetooth
      Low Energy security considerations where copied.

   Thanks to Stefanie Gerdes, Olaf Bergmann, and Carsten Bormann for
   contributing their work on AS discovery from draft-gerdes-ace-dcaf-
   authorize (see Section 3.2).  This aims again at reducing the
      size of messages sent over the wire, the RAM size of data objects
      that need 5.1).

   Thanks to be kept in memory Jim Schaad and the size of libraries that
      devices need Mike Jones for their comprehensive reviews.

   Thanks to Benjamin Kaduk for his input on various questions related
   to this work.

   Thanks to Cigdem Sengul for some very useful review comments.

   Thanks to support.

   Access Information:

      This framework defines the name "Access Information" Carsten Bormann for data
      concerning the RS that contributing the AS returns to text for the client in an access
      token response (see Section 5.8.2).  This aims at enabling
      scenarios where a powerful client, supporting multiple profiles,
      needs CoRE
   Resource Type registry.

   Thanks to interact with an RS Roman Danyliw for which it does not know suggesting the
      supported profiles Appendix E (including its
   contents).

   Ludwig Seitz and the raw public key.

   Proof-of-Possession:

      This framework makes use Goeran Selander worked on this document as part of proof-of-possession tokens, using the
      "cnf" claim [RFC8747].  A request parameter "cnf" and a Response
      parameter "cnf", both having a value space semantically and
      syntactically identical to
   the "cnf" claim, are defined CelticPlus project CyberWI, with funding from Vinnova.  Ludwig
   Seitz was also received further funding for this work by Vinnova in
   the
      token endpoint, context of the CelticNext project Critisec.

10.  References

10.1.  Normative References

   [I-D.ietf-ace-oauth-params]
              Seitz, L., "Additional OAuth Parameters for Authorization
              in Constrained Environments (ACE)", draft-ietf-ace-oauth-
              params-14 (work in progress), March 2021.

   [IANA.CborWebTokenClaims]
              IANA, "CBOR Web Token (CWT) Claims",
              <https://www.iana.org/assignments/cwt/cwt.xhtml#claims-
              registry>.

   [IANA.CoreParameters]
              IANA, "Constrained RESTful Environments (CoRE)
              Parameters", <https://www.iana.org/assignments/core-
              parameters/core-parameters.xhtml>.

   [IANA.JsonWebTokenClaims]
              IANA, "JSON Web Token Claims",
              <https://www.iana.org/assignments/jwt/jwt.xhtml#claims>.

   [IANA.OAuthAccessTokenTypes]
              IANA, "OAuth Access Token Types",
              <https://www.iana.org/assignments/oauth-parameters/oauth-
              parameters.xhtml#token-types>.

   [IANA.OAuthExtensionsErrorRegistry]
              IANA, "OAuth Extensions Error Registry",
              <https://www.iana.org/assignments/oauth-parameters/oauth-
              parameters.xhtml#extensions-error>.

   [IANA.OAuthParameters]
              IANA, "OAuth Parameters",
              <https://www.iana.org/assignments/oauth-parameters/oauth-
              parameters.xhtml#parameters>.

   [IANA.TokenIntrospectionResponse]
              IANA, "OAuth Token Introspection Response",
              <https://www.iana.org/assignments/oauth-parameters/oauth-
              parameters.xhtml#token-introspection-response>.

   [RFC2119]  Bradner, S., "Key words for use in RFCs to allow requesting Indicate
              Requirement Levels", BCP 14, RFC 2119,
              DOI 10.17487/RFC2119, March 1997,
              <https://www.rfc-editor.org/info/rfc2119>.

   [RFC3986]  Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
              Resource Identifier (URI): Generic Syntax", STD 66,
              RFC 3986, DOI 10.17487/RFC3986, January 2005,
              <https://www.rfc-editor.org/info/rfc3986>.

   [RFC6347]  Rescorla, E. and stating confirmation keys.
      This aims at making token theft harder. N. Modadugu, "Datagram Transport Layer
              Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347,
              January 2012, <https://www.rfc-editor.org/info/rfc6347>.

   [RFC6749]  Hardt, D., Ed., "The OAuth 2.0 Authorization Framework",
              RFC 6749, DOI 10.17487/RFC6749, October 2012,
              <https://www.rfc-editor.org/info/rfc6749>.

   [RFC6750]  Jones, M. and D. Hardt, "The OAuth 2.0 Authorization
              Framework: Bearer Token theft is
      specifically relevant in constrained use cases, as communication
      often passes through middle-boxes, which could be able to steal
      bearer tokens Usage", RFC 6750,
              DOI 10.17487/RFC6750, October 2012,
              <https://www.rfc-editor.org/info/rfc6750>.

   [RFC6838]  Freed, N., Klensin, J., and use them to gain unauthorized access.

   Authz-Info endpoint:

      This framework introduces a new way of providing access tokens to
      an RS by exposing a authz-info endpoint, to which access tokens
      can be POSTed.  This aims at reducing the size of the request
      message T. Hansen, "Media Type
              Specifications 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 Registration Procedures", BCP 13,
              RFC 6838, DOI 10.17487/RFC6838, January 2013,
              <https://www.rfc-editor.org/info/rfc6838>.

   [RFC6920]  Farrell, S., Kutscher, D., Dannewitz, C., Ohlman, B.,
              Keranen, A., and P. Hallam-Baker, "Naming Things with the high rate of
      packet loss,
              Hashes", RFC 6920, DOI 10.17487/RFC6920, April 2013,
              <https://www.rfc-editor.org/info/rfc6920>.

   [RFC7252]  Shelby, Z., Hartke, K., and C. Bormann, "The Constrained
              Application Protocol (CoAP)", RFC 7252,
              DOI 10.17487/RFC7252, June 2014,
              <https://www.rfc-editor.org/info/rfc7252>.

   [RFC7519]  Jones, M., Bradley, J., and the need to retransmit the whole message if one
      packet gets lost.  Thus separating sending of the request N. Sakimura, "JSON Web Token
              (JWT)", RFC 7519, DOI 10.17487/RFC7519, May 2015,
              <https://www.rfc-editor.org/info/rfc7519>.

   [RFC7662]  Richer, J., Ed., "OAuth 2.0 Token Introspection",
              RFC 7662, DOI 10.17487/RFC7662, October 2015,
              <https://www.rfc-editor.org/info/rfc7662>.

   [RFC8126]  Cotton, M., Leiba, B., and
      sending of the access tokens helps to reduce fragmentation.

   Client Credentials Grant:

      This framework RECOMMENDS the use of the client credentials grant T. Narten, "Guidelines 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 instead
      pre-arrange authorization with the AS, based on the client's own
      credentials.  The client can then (without manual intervention)
      obtain access tokens from the AS.

   Introspection:

      This framework RECOMMENDS the use of access token introspection in
      cases where the client is constrained
              Writing an IANA Considerations Section in a way that it can not
      easily obtain new access tokens (i.e. it has connectivity issues
      that prevent it from communicating with the AS).  In that case
      this framework RECOMMENDS the use RFCs", BCP 26,
              RFC 8126, DOI 10.17487/RFC8126, June 2017,
              <https://www.rfc-editor.org/info/rfc8126>.

   [RFC8152]  Schaad, J., "CBOR Object Signing and Encryption (COSE)",
              RFC 8152, DOI 10.17487/RFC8152, July 2017,
              <https://www.rfc-editor.org/info/rfc8152>.

   [RFC8174]  Leiba, B., "Ambiguity of a long-term token, that could
      be a simple reference.  The RS is assumed to be able to
      communicate with the AS, Uppercase vs Lowercase in RFC
              2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
              May 2017, <https://www.rfc-editor.org/info/rfc8174>.

   [RFC8392]  Jones, M., Wahlstroem, E., Erdtman, S., and can therefore perform 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 H. Tschofenig,
              "CBOR Web Token (CWT)", RFC 8392, DOI 10.17487/RFC8392,
              May 2018, <https://www.rfc-editor.org/info/rfc8392>.

   [RFC8693]  Jones, M., Nadalin, A., Campbell, B., Ed., Bradley, J.,
              and C. Mortimore, "OAuth 2.0 Token Exchange", RFC 8693,
              DOI 10.17487/RFC8693, January 2020,
              <https://www.rfc-editor.org/info/rfc8693>.

   [RFC8747]  Jones, M., Seitz, L., Selander, G., Erdtman, S., and H.
              Tschofenig, "Proof-of-Possession Key Semantics for CBOR
              Web Tokens (CWTs)", RFC 8747, DOI 10.17487/RFC8747, March
              2020, <https://www.rfc-editor.org/info/rfc8747>.

   [RFC8949]  Bormann, C. and P. Hoffman, "Concise Binary Object
              Representation (CBOR)", STD 94, RFC 8949,
              DOI 10.17487/RFC8949, December 2020,
              <https://www.rfc-editor.org/info/rfc8949>.

10.2.  Informative References

   [BLE]      Bluetooth SIG, "Bluetooth Core Specification v5.1",
              Section 4.4, January 2019,
              <https://www.bluetooth.com/specifications/bluetooth-core-
              specification/>.

   [I-D.erdtman-ace-rpcc]
              Seitz, L. and S. Erdtman, "Raw-Public-Key and Pre-Shared-
              Key as OAuth client credentials", draft-erdtman-ace-
              rpcc-02 (work in contact with the client, thus granting or revoking access
      rights.

Appendix B.  Roles progress), October 2017.

   [I-D.ietf-ace-dtls-authorize]
              Gerdes, S., Bergmann, O., Bormann, C., Selander, G., and Responsibilities

   Resource Owner

      *  Make sure that the RS is registered at the AS.  This includes
         making known to the AS which profiles, token_type, scopes,
              L. Seitz, "Datagram Transport Layer Security (DTLS)
              Profile for Authentication and
         key types (symmetric/asymmetric) the RS supports.  Also making
         it known to the AS which audience(s) the RS identifies itself
         with.
      *  Make sure that clients can discover the AS that is Authorization for
              Constrained Environments (ACE)", draft-ietf-ace-dtls-
              authorize-16 (work in charge progress), March 2021.

   [I-D.ietf-ace-oscore-profile]
              Palombini, F., Seitz, L., Selander, G., and M. Gunnarsson,
              "OSCORE Profile of the RS.
      *  If the client-credentials grant is used, make sure that the AS
         has the necessary, up-to-date, access control policies Authentication and Authorization
              for the
         RS.

   Requesting Party

      *  Make sure that the client is provisioned the necessary
         credentials to authenticate to the AS.
      *  Make sure that the client is configured to follow the security
         requirements Constrained Environments Framework", draft-ietf-ace-
              oscore-profile-18 (work in progress), April 2021.

   [I-D.ietf-quic-transport]
              Iyengar, J. and M. Thomson, "QUIC: A UDP-Based Multiplexed
              and Secure Transport", draft-ietf-quic-transport-34 (work
              in progress), January 2021.

   [I-D.ietf-tls-dtls13]
              Rescorla, E., Tschofenig, H., and N. Modadugu, "The
              Datagram Transport Layer Security (DTLS) Protocol Version
              1.3", draft-ietf-tls-dtls13-41 (work in progress),
              February 2021.

   [Margi10impact]
              Margi, C., de Oliveira, B., de Sousa, G., Simplicio Jr,
              M., Barreto, P., Carvalho, T., Naeslund, M., and R. Gold,
              "Impact of Operating Systems on Wireless Sensor Networks
              (Security) Applications and Testbeds", Proceedings of
              the Requesting Party when issuing requests
         (e.g., minimum communication security requirements, trust
         anchors).
      *  Register the client at the AS.  This includes making known to
         the AS which profiles, token_types, 19th International Conference on Computer
              Communications and Networks (ICCCN), August 2010.

   [MQTT5.0]  Banks, A., Briggs, E., Borgendale, K., and R. Gupta, "MQTT
              Version 5.0", OASIS Standard, March 2019,
              <https://docs.oasis-open.org/mqtt/mqtt/v5.0/mqtt-
              v5.0.html>.

   [RFC4949]  Shirey, R., "Internet Security Glossary, Version 2",
              FYI 36, RFC 4949, DOI 10.17487/RFC4949, August 2007,
              <https://www.rfc-editor.org/info/rfc4949>.

   [RFC6690]  Shelby, Z., "Constrained RESTful Environments (CoRE) Link
              Format", RFC 6690, DOI 10.17487/RFC6690, August 2012,
              <https://www.rfc-editor.org/info/rfc6690>.

   [RFC6819]  Lodderstedt, T., Ed., McGloin, M., and P. Hunt, "OAuth 2.0
              Threat Model and Security Considerations", RFC 6819,
              DOI 10.17487/RFC6819, January 2013,
              <https://www.rfc-editor.org/info/rfc6819>.

   [RFC7009]  Lodderstedt, T., Ed., Dronia, S., and key types (symmetric/
         asymmetric) the client.

   Authorization Server

      *  Register the RS M. Scurtescu, "OAuth
              2.0 Token Revocation", RFC 7009, DOI 10.17487/RFC7009,
              August 2013, <https://www.rfc-editor.org/info/rfc7009>.

   [RFC7228]  Bormann, C., Ersue, M., and manage corresponding security contexts.
      *  Register clients A. Keranen, "Terminology for
              Constrained-Node Networks", RFC 7228,
              DOI 10.17487/RFC7228, May 2014,
              <https://www.rfc-editor.org/info/rfc7228>.

   [RFC7231]  Fielding, R., Ed. and authentication credentials.
      *  Allow Resource Owners to configure J. Reschke, Ed., "Hypertext Transfer
              Protocol (HTTP/1.1): Semantics and update access control
         policies related to their registered RSs.
      *  Expose the token endpoint to allow clients to request tokens.
      *  Authenticate clients that wish to request a token.
      *  Process a token request using the authorization policies
         configured Content", RFC 7231,
              DOI 10.17487/RFC7231, June 2014,
              <https://www.rfc-editor.org/info/rfc7231>.

   [RFC7521]  Campbell, B., Mortimore, C., Jones, M., and Y. Goland,
              "Assertion Framework for the RS.
      *  Optionally: Expose the introspection endpoint that allows RS's
         to submit token introspection requests.
      *  If providing an introspection endpoint: Authenticate RSs that
         wish to get an introspection response.
      *  If providing an introspection endpoint: Process token
         introspection requests.
      *  Optionally: Handle token revocation.
      *  Optionally: Provide discovery metadata.  See [RFC8414]
      *  Optionally: Handle refresh tokens. OAuth 2.0 Client

      *  Discover the AS Authentication
              and Authorization Grants", RFC 7521, DOI 10.17487/RFC7521,
              May 2015, <https://www.rfc-editor.org/info/rfc7521>.

   [RFC7540]  Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext
              Transfer Protocol Version 2 (HTTP/2)", RFC 7540,
              DOI 10.17487/RFC7540, May 2015,
              <https://www.rfc-editor.org/info/rfc7540>.

   [RFC7591]  Richer, J., Ed., Jones, M., Bradley, J., Machulak, M., and
              P. Hunt, "OAuth 2.0 Dynamic Client Registration Protocol",
              RFC 7591, DOI 10.17487/RFC7591, July 2015,
              <https://www.rfc-editor.org/info/rfc7591>.

   [RFC7641]  Hartke, K., "Observing Resources in charge of the RS that is to be targeted with
         a request.
      *  Submit the token request (see step (A) of Figure 1).

         +  Authenticate to the AS.
         +  Optionally (if not pre-configured): Specify which RS, which
            resource(s), Constrained
              Application Protocol (CoAP)", RFC 7641,
              DOI 10.17487/RFC7641, September 2015,
              <https://www.rfc-editor.org/info/rfc7641>.

   [RFC7744]  Seitz, L., Ed., Gerdes, S., Ed., Selander, G., Mani, M.,
              and which action(s) the request(s) will target.
         +  If raw public keys (rpk) or certificates are used, make sure
            the AS has the right rpk or certificate S. Kumar, "Use Cases for this client.
      *  Process the access token Authentication and Access Information (see step (B)
         of Figure 1).

         +  Check that the Access Information provides the necessary
            security parameters (e.g., PoP key, information on
            communication security protocols supported by the RS).
         +  Safely store the proof-of-possession key.
         +  If provided by the AS: Safely store
              Authorization in Constrained Environments", RFC 7744,
              DOI 10.17487/RFC7744, January 2016,
              <https://www.rfc-editor.org/info/rfc7744>.

   [RFC7959]  Bormann, C. and Z. Shelby, Ed., "Block-Wise Transfers in
              the refresh token.
      *  Send Constrained Application Protocol (CoAP)", RFC 7959,
              DOI 10.17487/RFC7959, August 2016,
              <https://www.rfc-editor.org/info/rfc7959>.

   [RFC8252]  Denniss, W. and J. Bradley, "OAuth 2.0 for Native Apps",
              BCP 212, RFC 8252, DOI 10.17487/RFC8252, October 2017,
              <https://www.rfc-editor.org/info/rfc8252>.

   [RFC8259]  Bray, T., Ed., "The JavaScript Object Notation (JSON) Data
              Interchange Format", STD 90, RFC 8259,
              DOI 10.17487/RFC8259, December 2017,
              <https://www.rfc-editor.org/info/rfc8259>.

   [RFC8414]  Jones, M., Sakimura, N., and J. Bradley, "OAuth 2.0
              Authorization Server Metadata", RFC 8414,
              DOI 10.17487/RFC8414, June 2018,
              <https://www.rfc-editor.org/info/rfc8414>.

   [RFC8446]  Rescorla, E., "The Transport Layer Security (TLS) Protocol
              Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018,
              <https://www.rfc-editor.org/info/rfc8446>.

   [RFC8516]  Keranen, A., ""Too Many Requests" Response Code for the token
              Constrained Application Protocol", RFC 8516,
              DOI 10.17487/RFC8516, January 2019,
              <https://www.rfc-editor.org/info/rfc8516>.

   [RFC8613]  Selander, G., Mattsson, J., Palombini, F., and request to L. Seitz,
              "Object Security for Constrained RESTful Environments
              (OSCORE)", RFC 8613, DOI 10.17487/RFC8613, July 2019,
              <https://www.rfc-editor.org/info/rfc8613>.

   [RFC8628]  Denniss, W., Bradley, J., Jones, M., and H. Tschofenig,
              "OAuth 2.0 Device Authorization Grant", RFC 8628,
              DOI 10.17487/RFC8628, August 2019,
              <https://www.rfc-editor.org/info/rfc8628>.

Appendix A.  Design Justification

   This section provides further insight into the RS (see step (C) design decisions of
         Figure 1).

         +  Authenticate towards
   the RS (this could coincide with the
            proof solution documented in this document.  Section 3 lists several
   building blocks and briefly summarizes their importance.  The
   justification for offering some of possession process).
         +  Transmit the token those building blocks, as specified by the AS (default is opposed
   to the
            authz-info endpoint, alternative options using OAuth 2.0 as is, is given below.

   Common IoT constraints are:

   Low Power Radio:

      Many IoT devices are specified by
            profiles).
         +  Perform equipped with a small battery which needs to
      last for a long time.  For many constrained wireless devices, the proof-of-possession procedure as specified
      highest energy cost is associated to transmitting or receiving
      messages (roughly by
            the profile in use (this may already have been taken care a factor of
            through 10 compared to AES)
      [Margi10impact].  It is therefore important to keep the authentication procedure).
      *  Process total
      communication overhead low, including minimizing the RS response (see step (F) number and
      size of Figure 1) messages sent and received, which has an impact of choice
      on the RS.

   Resource Server

      *  Expose a way to submit access tokens. message format and protocol.  By default this is the
         authz-info endpoint.
      *  Process an access token.

         +  Verify using CoAP over UDP and
      CBOR encoded messages, some of these aspects are addressed.
      Security protocols contribute to the token is from 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 provisioning of security
      context by a recognized AS.
         +  Check the token's integrity.
         +  Verify that the token applies to this RS.
         +  Check trusted third party, using transport or application-
      layer security.

   Low CPU Speed:

      Some IoT devices are equipped with processors that are
      significantly slower than those found in most current devices on
      the token Internet.  This typically has not expired (if 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 token provides
            expiration information).
         +  Store computationally more
      expensive public key cryptography where the token security requirements
      so that it allow, but this may also require support for trusted-third-
      party-assisted secret key establishment using transport- or
      application-layer security.
   Small Amount of Memory:

      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 retrieved in put on the context firmware of
      such a matching request.

         Note: The order proposed here is not normative, any process
         that arrives at an equivalent result can device.  In this case, CoAP may be used.  A noteworthy
         consideration is whether one can use cheap operations early used instead of HTTP,
      symmetric-key cryptography instead of public-key cryptography, and
      CBOR 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 code
      footprints.

   User Interface Limitations:

      Protecting access to quickly discard non-applicable or invalid tokens, before
         performing expensive cryptographic operations (e.g. doing resources is both an
         expiration check before verifying a signature).

      *  Process a request.

         +  Set up communication important security with the client.
         +  Authenticate the client.
         +  Match the client against existing tokens.
         +  Check that tokens belonging as
      well as privacy feature.  End users and enterprise customers may
      not want to give access to the client actually authorize data collected by their IoT device
      or to functions it may offer to third parties.  Since the requested action.
         +  Optionally: Check
      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 the matching tokens are still valid,
            using introspection (if this is possible.)
      *  Send a response following the agreed upon communication
         security mechanism(s).
      *  Safely store credentials better suitable for such tasks, such as raw public keys for
         authentication or proof-of-possession keys linked smart
      phones and tablets.

   Communication Constraints:

      In certain constrained settings an IoT device may not be able to access
         tokens.

Appendix C.  Requirements on Profiles

   This section lists
      communicate with a given device at all times.  Devices may be
      sleeping, or just disconnected from the requirements on profiles Internet because of this framework,
   for the convenience
      general lack of profile designers.

   o  Optionally define new methods for connectivity in the client area, for cost reasons, or for
      security reasons, e.g., to discover the
      necessary permissions and AS avoid an entry point for accessing Denial-of-
      Service attacks.

      The communication interactions this framework builds upon (as
      shown graphically in Figure 1) may be accomplished using a resource, variety
      of different
      from protocols, and not all parts of the one proposed message flow are
      used in Section 5.1.  Section 4
   o  Optionally specify new grant types.  Section 5.4
   o  Optionally define the use of client certificates as client
      credential type.  Section 5.5
   o  Specify all applications due to the communication protocol the client and RS the must use
      (e.g., CoAP).  Section 5 and Section 5.8.4.3
   o  Specify the security protocol the client and RS must constraints.
      Deployments making use to
      protect their communication (e.g., OSCORE or DTLS).  This must
      provide encryption, integrity and replay protection.
      Section 5.8.4.3
   o  Specify how the client and the RS mutually authenticate.
      Section 4
   o  Specify the proof-of-possession protocol(s) and how to select one,
      if several are available.  Also specify which key types (e.g.,
      symmetric/asymmetric) of CoAP are supported by a specific proof-of-
      possession protocol.  Section 5.8.4.2
   o  Specify a unique ace_profile identifier.  Section 5.8.4.3
   o  If introspection expected, but this framework is supported: Specify the
      not limited to them.  Other protocols such as HTTP, or even
      protocols such as Bluetooth Smart communication and
      security protocol for introspection.  Section 5.9
   o  Specify that do not
      necessarily use IP, could also be used.  The latter raises the communication and security protocol
      need for interactions
      between client and AS.  This must provide encryption, integrity
      protection, replay protection and a binding between requests and
      responses.  Section 5 and Section 5.8
   o  Specify how/if application-layer security over the authz-info endpoint various interfaces.

   In the light of these constraints we have made the following design
   decisions:

   CBOR, COSE, CWT:

      When using this framework, it is RECOMMENDED to use CBOR [RFC8949]
      as data format.  Where CBOR data needs to be protected, including how
      error responses the use of
      COSE [RFC8152] is RECOMMENDED.  Furthermore, where self-contained
      tokens are protected.  Section 5.10.1
   o  Optionally define other methods needed, it is RECOMMENDED to use of token transport than CWT [RFC8392].
      These measures aim at reducing the authz-
      info endpoint.  Section 5.10.1

Appendix D.  Assumptions on AS knowledge about C and RS

   This section lists size of messages sent over the assumptions on what an AS should know about a
   client and an RS in order
      wire, the RAM size of data objects that need to be able to respond kept in memory
      and the size of libraries that devices need to requests support.

   CoAP:

      When using this framework, it is RECOMMENDED to use of CoAP
      [RFC7252] instead of HTTP.  This does not preclude the use of
      other protocols specifically aimed at constrained devices, like,
      e.g., Bluetooth Low Energy (see Section 3.2).  This aims again at
      reducing the
   token and introspection endpoints.  How this information is
   established is out of scope for this document.

   o  The identifier size of messages sent over the client or RS.
   o  The profiles that the client or RS supports.
   o  The scopes that the RS supports.
   o  The audiences that wire, the RS identifies with.
   o  The key types (e.g., pre-shared symmetric key, raw public key, key
      length, other key parameters) RAM size of
      data objects that need to be kept in memory and the client or RS supports.

   o  The types size of access tokens the RS supports (e.g., CWT).
   o  If the RS supports CWTs,
      libraries that devices need to support.

   Access Information:

      This framework defines the COSE parameters name "Access Information" for data
      concerning the crypto
      wrapper (e.g., algorithm, key-wrap algorithm, key-length) RS that the
      RS supports.
   o  The expiration time for access tokens issued AS returns to this RS (unless
      the RS accepts a default time chosen by the AS).
   o  The symmetric key shared between client and AS (if any).
   o  The symmetric key shared between in an access
      token response (see Section 5.8.2).  This aims at enabling
      scenarios where a powerful client, supporting multiple profiles,
      needs to interact with an RS for which it does not know the
      supported profiles and AS (if any).
   o  The the raw public key key.

   Proof-of-Possession:

      This framework makes use of proof-of-possession tokens, using the client or RS (if any).
   o  Whether
      "cnf" claim [RFC8747].  A request parameter "cnf" and a Response
      parameter "cnf", both having a value space semantically and
      syntactically identical to the RS has synchronized time (and thus "cnf" claim, are defined for the
      token 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 through middle-boxes, which could be able to steal
      bearer tokens and use the
      'exp' claim) or not.

Appendix E.  Deployment Examples

   There is them to gain unauthorized access.

   Authz-Info endpoint:

      This framework introduces a large variety new way of IoT deployments, as is indicated in
   Appendix A, and this section highlights providing access tokens to
      an RS by exposing a few common variants.  This
   section is not normative but illustrates how the framework authz-info endpoint, to which access tokens
      can be
   applied.

   For each of POSTed.  This aims at reducing the deployment variants, there are a number size of possible
   security setups between clients, resource servers the request
      message and authorization
   servers.  The main focus in the following subsections is on how
   authorization code complexity at the RS.  The size of a client the
      request for a resource hosted by an RS message is
   performed.  This requires problematic, since many constrained protocols
      have severe message size limitations at the security of physical layer (e.g.,
      in the requests and responses
   between order of 100 bytes).  This means that larger packets get
      fragmented, which in turn combines badly with the clients high rate of
      packet loss, and the RS need to be considered.

   Note: CBOR diagnostic notation is used for examples retransmit the whole message if one
      packet gets lost.  Thus separating sending of requests the request and
   responses.

E.1.  Local Token Validation
      sending of the access tokens helps to reduce fragmentation.

   Client Credentials Grant:

      In this scenario, framework the case use of the client credentials grant is
      RECOMMENDED for machine-to-machine communication use cases, where
      manual intervention of the resource server is offline is
   considered, i.e., it owner to produce a grant token
      is not connected to feasible.  The intention is that the AS at resource owner would
      instead pre-arrange authorization with the time of AS, based on the
      client's own credentials.  The client can then (without manual
      intervention) obtain access request.  This access procedure involves steps A, B, C, and F
   of Figure 1.

   Since tokens from the resource server must be able to verify AS.

   Introspection:

      In this framework the use of access token
   locally, self-contained access tokens must be used.

   This example shows introspection is
      RECOMMENDED in cases where the interactions between client is constrained in a client, way that
      it can not easily obtain new access tokens (i.e. it has
      connectivity issues that prevent it from communicating with the
   authorization server and
      AS).  In that case it is RECOMMENDED to use a temperature sensor acting as long-term token,
      that could be a resource
   server.  Message exchanges A and B are shown in Figure 17.

      A: simple reference.  The client first generates a public-private key pair used for
      communication security RS is assumed to be able to
      communicate with the RS.
      The client sends a CoAP POST request AS, and can therefore perform introspection,
      in order to learn the token endpoint at claims associated with the
      AS. token reference.
      The security advantage of this request such an approach is that the resource owner can
      change the claims associated to the token reference without having
      to be transport in contact with the client, thus granting or application
      layer.  It is up revoking access
      rights.

Appendix B.  Roles and Responsibilities

   Resource Owner

      *  Make sure that the RS is registered at the communication security profile AS.  This includes
         making known to define.

      In the example it is assumed that both client and AS have
      performed mutual authentication e.g. via DTLS.  The request
      contains the public key of the client which profiles, token_type, scopes, and
         key types (symmetric/asymmetric) the Audience parameter
      set RS supports.  Also making
         it known to "tempSensorInLivingRoom", a value that the temperature
      sensor AS which audience(s) the RS identifies itself
         with.  The
      *  Make sure that clients can discover the AS evaluates that is in charge of
         the request and
      authorizes RS.
      *  If the client to access client-credentials grant is used, make sure that the resource.
      B: The AS responds with a 2.05 Content response containing the
      Access Information, including
         has the necessary, up-to-date, access token.  The PoP access
      token contains the public key of the client, and the Access
      Information contains the public key of control policies for the
         RS.  For communication
      security this example uses DTLS RawPublicKey between

   Requesting Party

      *  Make sure that the client
      and is provisioned the RS.  The issued token will have a short validity time,
      i.e., "exp" close necessary
         credentials to "iat", in order authenticate to mitigate attacks using
      stolen client credentials.  The token includes the claim such as
      "scope" with the authorized access AS.
      *  Make sure that an owner the client is configured to follow the security
         requirements of the
      temperature device can enjoy.  In this example, Requesting Party when issuing requests
         (e.g., minimum communication security requirements, trust
         anchors).
      *  Register the "scope" claim,
      issued by client at the AS, informs AS.  This includes making known to
         the AS which profiles, token_types, and key types (symmetric/
         asymmetric) the RS that client.

   Authorization Server

      *  Register the owner of RS and manage corresponding security contexts.
      *  Register clients and authentication credentials.
      *  Allow Resource Owners to configure and update access control
         policies related to their registered RSs.
      *  Expose the token, token endpoint to allow clients to request tokens.
      *  Authenticate clients that
      can prove the possession of a key is authorized wish to make a GET request against the /temperature resource and a POST token.
      *  Process a token request on using the /firmware resource.  Note that authorization policies
         configured for the syntax and semantics of RS.
      *  Optionally: Expose the
      scope claim are application specific.
      Note: In this example it is assumed introspection endpoint that the client knows what
      resource it wants allows RS's
         to access, and is therefore able submit token introspection requests.
      *  If providing an introspection endpoint: Authenticate RSs that
         wish to request
      specific audience and scope claims for the access token.

            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>
       |         |

      Figure 17: Token Request and Response Using get an introspection response.
      *  If providing an introspection endpoint: Process token
         introspection requests.
      *  Optionally: Handle token revocation.
      *  Optionally: Provide discovery metadata.  See [RFC8414]
      *  Optionally: Handle refresh tokens.

   Client Credentials.

   The information contained in the Request-Payload and

      *  Discover the Response-
   Payload is shown AS in Figure 18 Note charge of the RS that the parameter "rs_cnf" from
   [I-D.ietf-ace-oauth-params] is used to inform the client about be targeted with
         a request.
      *  Submit the
   resource server's public key.

   Request-Payload :
   {
     "audience" : "tempSensorInLivingRoom",
     "client_id" : "myclient",
     "req_cnf" : {
       "COSE_Key" : {
         "kid" : b64'1Bg8vub9tLe1gHMzV76e8',
         "kty" : "EC",
         "crv" : "P-256",
         "x" : b64'f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU',
         "y" : b64'x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0'
       }
     }
   }

   Response-Payload :
   {
     "access_token" : b64'0INDoQEKoQVNKkXfb7xaWqMTf6 ...',
     "rs_cnf" : {
       "COSE_Key" : {
         "kid" : b64'c29tZSBwdWJsaWMga2V5IGlk',
         "kty" : "EC",
         "crv" : "P-256",
         "x"   : b64'MKBCTNIcKUSDii11ySs3526iDZ8AiTo7Tu6KPAqv7D4',
         "y"   : b64'4Etl6SRW2YiLUrN5vfvVHuhp7x8PxltmWWlbbM4IFyM'
       }
     }
   } token request (see step (A) of Figure 18: Request 1).

         +  Authenticate to the AS.

         +  Optionally (if not pre-configured): Specify which RS, which
            resource(s), and Response Payload Details.

   The content of which action(s) the request(s) will target.
         +  If raw public keys (rpk) or certificates are used, make sure
            the AS has the right rpk or certificate for this client.
      *  Process the access token is shown in Figure 19.

   {
     "aud" : "tempSensorInLivingRoom",
     "iat" : "1563451500",
     "exp" : "1563453000",
     "scope" :  "temperature_g firmware_p",
     "cnf" : {
       "COSE_Key" : {
         "kid" : b64'1Bg8vub9tLe1gHMzV76e8',
         "kty" : "EC",
         "crv" : "P-256",
         "x" : b64'f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU',
         "y" : b64'x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0'
       }
     }
   }

        Figure 19: and Access Token including Public Key Information (see step (B)
         of Figure 1).

         +  Check that the Client.

   Messages C Access Information provides the necessary
            security parameters (e.g., PoP key, information on
            communication security protocols supported by the RS).
         +  Safely store the proof-of-possession key.
         +  If provided by the AS: Safely store the refresh token.
      *  Send the token and F are shown in Figure 20 - request to the RS (see step (C) of
         Figure 21.

      C: The client then sends 1).

         +  Authenticate towards the RS (this could coincide with the
            proof of possession process).
         +  Transmit the PoP access token as specified by the AS (default is to the
            authz-info
      endpoint at endpoint, alternative options are specified by
            profiles).
         +  Perform the proof-of-possession procedure as specified by
            the profile in use (this may already have been taken care of
            through the authentication procedure).
      *  Process the RS response (see step (F) of Figure 1) of the RS.  This is

   Resource Server

      *  Expose a plain CoAP POST request, i.e., no
      transport or application layer security way to submit access tokens.  By default this is used between client and
      RS since the
         authz-info endpoint.
      *  Process an access token.

         +  Verify the token is integrity protected between from a recognized AS.
         +  Check the AS and RS.
      The RS verifies token's integrity.
         +  Verify that the PoP access token was created by a known
      and trusted AS, that it applies to this RS, and RS.
         +  Check that the token has not expired (if the token provides
            expiration information).
         +  Store the token so that it is valid. can be retrieved in the context
            of a matching request.

         Note: The RS caches order proposed here is not 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 discard non-applicable or invalid tokens, before
         performing expensive cryptographic operations (e.g. doing an
         expiration check before verifying a signature).

      *  Process a request.

         +  Set up communication security with the client.
         +  Authenticate the security context together with authorization
      information about this client contained in client.
         +  Match the PoP access token.

              Resource
    Client     Server
       |         |
   C:  +-------->| Header: POST (Code=0.02)
       |  POST   | Uri-Path:"authz-info"
       |         | Payload: 0INDoQEKoQVN ...
       |         |
       |<--------+ Header: 2.04 Changed
       |  2.04   |
       |         |

                Figure 20: Access Token provisioning client against existing tokens.
         +  Check that tokens belonging to RS
      The the client and actually authorize
            the RS runs requested action.
         +  Optionally: Check that the DTLS handshake matching tokens are still valid,
            using introspection (if this is possible.)
      *  Send a response following the agreed upon communication
         security mechanism(s).
      *  Safely store credentials such as raw public keys established in step B and C.
      The client sends a CoAP GET request for
         authentication or proof-of-possession keys linked to /temperature access
         tokens.

Appendix C.  Requirements on RS over
      DTLS.  The RS verifies that Profiles

   This section lists the request is authorized, based requirements on
      previously established security context.

      F: The RS responds over the same DTLS channel with a CoAP 2.05
      Content response, containing a resource representation as payload.

              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>
       |         |

        Figure 21: Resource Request and Response protected by DTLS.

E.2.  Introspection Aided Token Validation

   In profiles of this deployment scenario it is assumed that a framework,
   for the convenience of profile designers.

   o  Optionally define new methods for the client is not able to access discover the
      necessary permissions and AS at for accessing a resource, different
      from the time one proposed in Section 5.1.  Section 4
   o  Optionally specify new grant types.  Section 5.4
   o  Optionally define the use of client certificates as client
      credential type.  Section 5.5
   o  Specify the access request, whereas communication protocol the client and RS is
   assumed to be connected to the back-end infrastructure.  Thus must use
      (e.g., CoAP).  Section 5 and Section 5.8.4.3
   o  Specify the security protocol the client and RS
   can make must use of token introspection. to
      protect their communication (e.g., OSCORE or DTLS).  This access procedure involves
   steps A-F of Figure 1, but assumes steps A must
      provide encryption, integrity and B have been carried
   out during a phase when replay protection.
      Section 5.8.4.3
   o  Specify how the client had connectivity to AS.

   Since and the client is assumed RS mutually authenticate.
      Section 4
   o  Specify the proof-of-possession protocol(s) and how to be offline, at least for select one,
      if several are available.  Also specify which key types (e.g.,
      symmetric/asymmetric) are supported by a certain
   period of time, specific proof-of-
      possession protocol.  Section 5.8.4.2
   o  Specify a pre-provisioned access token has to be long-lived.
   Since the client unique ace_profile identifier.  Section 5.8.4.3
   o  If introspection is constrained, supported: Specify the token will not be self contained
   (i.e. not a CWT) but instead just a reference.  The resource server
   uses its connectivity to learn about communication and
      security protocol for introspection.  Section 5.9
   o  Specify the claims associated to communication and security protocol for interactions
      between client and AS.  This must provide encryption, integrity
      protection, replay protection and a binding between requests and
      responses.  Section 5 and Section 5.8
   o  Specify how/if the
   access token by using introspection, which authz-info endpoint is shown in the example
   below.

   In protected, including how
      error responses are protected.  Section 5.10.1
   o  Optionally define other methods of token transport than the example interactions between an offline client (key fob), an
   RS (online lock), authz-
      info endpoint.  Section 5.10.1

Appendix D.  Assumptions on AS Knowledge about C and RS

   This section lists the assumptions on what an AS is shown.  It is assumed that there is should know about a
   provisioning step where the
   client has access to the AS.  This
   corresponds to message exchanges A and B which are shown an RS in
   Figure 22.

   Authorization consent from the resource owner can be pre-configured,
   but it can also order to be provided via an interactive flow with able to respond to requests to the resource
   owner.  An example of
   token and introspection endpoints.  How this information is
   established is out of scope for this document.

   o  The identifier of the key fob case could be that the
   resource owner has a connected car, he buys a generic key client or RS.
   o  The profiles that he
   wants to use with the car.  To authorize the key fob he connects it
   to his computer client or RS supports.
   o  The scopes that then provides the UI for the device.  After RS supports.
   o  The audiences that
   OAuth 2.0 implicit flow can used to authorize the RS identifies with.
   o  The key for his car at
   the the car manufacturers AS.

   Note: In this example types (e.g., pre-shared symmetric key, raw public key, key
      length, other key parameters) that the client does not know the exact door it will
   be used to or RS supports.
   o  The types of access since tokens the token request is not send at RS supports (e.g., CWT).
   o  If the time of
   access.  So RS supports CWTs, the scope and audience COSE parameters are set quite wide to
   start with, while tailored values narrowing down for the claims to crypto
      wrapper (e.g., algorithm, key-wrap algorithm, key-length) that the
   specific
      RS being accessed can be provided supports.
   o  The expiration time for access tokens issued to that this RS during an
   introspection step.

      A: The client sends (unless
      the RS accepts a CoAP POST request to default time chosen by the token endpoint at
      AS. AS).
   o  The request contains symmetric key shared between client and AS (if any).
   o  The symmetric key shared between RS and AS (if any).
   o  The raw public key of the Audience parameter set client or RS (if any).
   o  Whether the RS has synchronized time (and thus is able to "PACS1337"
      (PACS, Physical Access System), a value use the that identifies
      'exp' claim) or not.

Appendix E.  Differences to OAuth 2.0

   This document adapts OAuth 2.0 to be suitable for constrained
   environments.  This sections lists the
      physical access control system main differences from the
   normative requirements of OAuth 2.0.

   o  Use of TLS -- OAuth 2.0 requires the use of TLS both to which protect
      the individual doors are
      connected.  The communication between AS generates and client when requesting an access token as an opaque string,
      which it can match to the specific
      token; between client and the targeted
      audience.  It furthermore generates RS when accessing a symmetric proof-of-
      possession key.  The communication security resource and authentication between client and
      AS and RS if introspection is assumed to have been provided at
      transport layer (e.g. via DTLS) using a pre-shared used.  This framework requires
      similar security
      context (psk, rpk or certificate).
      B: The AS responds properties, but does not require that they be
      realized with a CoAP 2.05 Content response, containing TLS.  See Section 5.
   o  Cardinality of "grant_type" parameter -- In client-to-AS requests
      using OAuth 2.0, the "grant_type" parameter is required (per
      [RFC6749]).  In this framework, this parameter is optional.  See
      Section 5.8.1.
   o  Encoding of "scope" parameter -- In client-to-AS requests using
      OAuth 2.0, the "scope" parameter is string encoded (per
      [RFC6749]).  In this framework, this parameter may also be encoded
      as playload a byte string.  See Section 5.8.1.
   o  Cardinality of "token_type" parameter -- in AS-to-client responses
      using OAuth 2.0, the token_type parameter is required (per

      [RFC6749]).  In this framework, this parameter is optional.  See
      Section 5.8.2.
   o  Access Information, including token retention -- in OAuth 2.0, the access token and
      the symmetric proof-of-possession key.  Communication security
      between C and RS will be DTLS and PreSharedKey.  The PoP key is
      used as sent
      with each request to the PreSharedKey.

   Note: RS.  In this example we are using a symmetric key framework, the RS must be
      able to store these tokens for later use.  See Section 5.10.1.

Appendix F.  Deployment Examples

   There is a multi-RS
   audience, which large variety of IoT deployments, as is not recommended normally (see Section 6.9).
   However indicated in
   Appendix A, and this case section highlights a few common variants.  This
   section is not normative but illustrates how the framework can be
   applied.

   For each of the deployment variants, there are a number of possible
   security setups between clients, resource servers and authorization
   servers.  The main focus in the risk following subsections is deemed to be acceptable, since all on how
   authorization of a client request for a resource hosted by an RS is
   performed.  This requires the doors are part security of the same physical access control system, requests and
   therefore responses
   between the risk of a malicious RS impersonating clients and the client towards
   another RS to be considered.

   Note: CBOR diagnostic notation is low.

            Authorization
    Client     Server
       |         |
       |<=======>| DTLS Connection Establishment
       |         | used for examples of requests 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>
       |         |

      Figure 22:
   responses.

F.1.  Local Token Request and Response using Client Credentials.

   The information contained in Validation

   In this scenario, the Request-Payload and case where the Response-
   Payload resource server is shown in Figure 23.

   Request-Payload:
   {
     "client_id" : "keyfob",
     "audience" : "PACS1337"
   }

   Response-Payload:
   {
     "access_token" : b64'VGVzdCB0b2tlbg==',
     "cnf" : {
       "COSE_Key" : {
         "kid" : b64'c29tZSBwdWJsaWMga2V5IGlk',
         "kty" : "oct",
         "alg" : "HS256",
         "k": b64'ZoRSOrFzN_FzUA5XKMYoVHyzff5oRJxl-IXRtztJ6uE'
       }
     }
   }

           Figure 23: Request and Response Payload for C offline

   The access token in this case is just an opaque byte string
   referencing
   considered, i.e., it is not connected to the authorization information AS at the AS.

      C: Next, the client POSTs time of the
   access token to the authz-info
      endpoint in the RS. request.  This is a plain CoAP request, i.e., no DTLS
      between client access procedure involves steps A, B, C, and RS. F
   of Figure 1.

   Since the resource server must be able to verify the access token is an opaque string,
   locally, self-contained access tokens must be used.

   This example shows the
      RS cannot verify it on its own, and thus defers to respond interactions between a client, the
   authorization server and a temperature sensor acting as a resource
   server.  Message exchanges A and B are shown in Figure 17.

      A: The client with first generates a status code until after step E.
      D: public-private key pair used for
      communication security with the RS.
      The RS client sends the token a CoAP POST request to the introspection token endpoint on at the AS
      using a CoAP POST request.  In
      AS.  The security of this request can be transport or application
      layer.  It is up the communication security profile to define.  In
      the example RS it is assumed that both client and AS are assumed
      to have performed
      mutual authentication using e.g. via DTLS.  The request contains the
      public key of the client and the Audience parameter set to
      "tempSensorInLivingRoom", a pre shared
      security context (psk, rpk or certificate) with value that the RS acting as
      DTLS client.
      E: temperature sensor
      identifies itself with.  The AS provides evaluates the introspection request and
      authorizes the client to access the resource.

      B: The AS responds with a 2.05 Content response (2.05 Content) containing parameters about the
      Access Information, including the access token.  This  The PoP access
      token contains the public key of the client, and the Access
      Information contains the public key of the RS.  For communication
      security this example uses DTLS RawPublicKey between the client
      and the RS.  The issued token will have a short validity time,
      i.e., "exp" close to "iat", in order to mitigate attacks using
      stolen client credentials.  The token includes the
      confirmation key (cnf) parameter claim such as
      "scope" with the authorized access that allows an owner of the
      temperature device can enjoy.  In this example, the "scope" claim,
      issued by the AS, informs the RS to verify that the
      client's proof owner of possession in step F.  Note the token, that our example in
      Figure 25 assumes
      can prove the possession of a pre-established key (e.g. one used by is authorized to make a GET
      request against the
      client /temperature resource and the RS for a previous token) POST request on
      the /firmware resource.  Note that the syntax and semantics of the
      scope claim are application specific.
      Note: In this example it is now only
      referenced by its key-identifier 'kid'.
      After receiving message E, assumed that the RS responds client knows what
      resource it wants to access, and is therefore able to request
      specific audience and scope claims for the client's POST in
      step C with the CoAP response code 2.01 (Created).

              Resource access token.

            Authorization
     Client    Server
       |         |
   C:  +-------->| Header: POST (T=CON, Code=0.02)
       |  POST   | Uri-Path:"authz-info"
       |         | Payload: b64'VGVzdCB0b2tlbg=='
       |         |
       |         |     Authorization
       |         |       Server
       |<=======>| DTLS Connection Establishment
       |         |   and mutual authentication
       |         |      D: +--------->|
   A:  +-------->| Header: POST (Code=0.02)
       |         |  POST   | Uri-Path: "introspect"
       | Uri-Path:"token"
       |         | Content-Format: "application/ace+cbor"
       | application/ace+cbor
       |         | Payload: <Request-Payload>
       |         |          |
       |      E: |<---------+
   B:  |<--------+ Header: 2.05 Content
       |         |  2.05   | Content-Format: "application/ace+cbor"
       | application/ace+cbor
       |         | Payload: <Response-Payload>
       |         |          |
       |         |
       |<--------+ Header: 2.01 Created
       |  2.01   |
       |         |

      Figure 24: 17: Token Introspection for C offline Request and Response Using Client Credentials.

   The information contained in the Request-Payload and the Response- the Response-
   Payload is shown in Figure 18 Note that the parameter "rs_cnf" from
   [I-D.ietf-ace-oauth-params] is used to inform the client about the
   resource server's public key.

   Request-Payload :
   {
     "audience" : "tempSensorInLivingRoom",
     "client_id" : "myclient",
     "req_cnf" : {
       "COSE_Key" : {
         "kid" : b64'1Bg8vub9tLe1gHMzV76e8',
         "kty" : "EC",
         "crv" : "P-256",
         "x" : b64'f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU',
         "y" : b64'x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0'
       }
     }
   }

   Response-Payload :
   {
     "access_token" : b64'0INDoQEKoQVNKkXfb7xaWqMTf6 ...',
     "rs_cnf" : {
       "COSE_Key" : {
         "kid" : b64'c29tZSBwdWJsaWMga2V5IGlk',
         "kty" : "EC",
         "crv" : "P-256",
         "x"   : b64'MKBCTNIcKUSDii11ySs3526iDZ8AiTo7Tu6KPAqv7D4',
         "y"   : b64'4Etl6SRW2YiLUrN5vfvVHuhp7x8PxltmWWlbbM4IFyM'
       }
     }
   }

             Figure 18: Request and Response Payload Details.

   The content of the access token is shown in Figure 25.

   Request-Payload: 19.

   {
     "token" : b64'VGVzdCB0b2tlbg==',
     "client_id"
     "aud" : "FrontDoor",
   }

   Response-Payload:
   {
     "active" "tempSensorInLivingRoom",
     "iat" : true,
     "aud" "1563451500",
     "exp" : "lockOfDoor4711", "1563453000",
     "scope" : "open, close",
     "iat" : 1563454000,  "temperature_g firmware_p",
     "cnf" : {
       "COSE_Key" : {
         "kid" : b64'c29tZSBwdWJsaWMga2V5IGlk' b64'1Bg8vub9tLe1gHMzV76e8',
         "kty" : "EC",
         "crv" : "P-256",
         "x" : b64'f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU',
         "y" : b64'x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0'
       }
     }
   }

        Figure 25: Request 19: Access Token including Public Key of the client.

   Messages C and Response Payload for Introspection F are shown in Figure 20 - Figure 21.

      C: The client uses then sends the symmetric PoP key to establish a DTLS
      PreSharedKey secure connection access token to the authz-info
      endpoint at the RS.  The  This is a plain CoAP request PUT POST request, i.e., no
      transport or application-layer security is
      sent to the uri-path /state on used between client and
      RS since the RS, changing token is integrity protected between the state of AS and RS.
      The RS verifies that the
      door PoP access token was created by a known
      and trusted AS, that it applies to locked.
      F: this RS, and that it is valid.
      The RS responds caches the security context together with a appropriate over authorization
      information about this client contained in the secure DTLS
      channel. PoP access token.

              Resource
    Client     Server
       |         |
       |<=======>| DTLS Connection Establishment
       |         |   using Pre Shared Key
       |         |
   C:  +-------->| Header: PUT (Code=0.03) POST (Code=0.02)
       | PUT  POST   | Uri-Path: "state" Uri-Path:"authz-info"
       |         | Payload: <new state for the lock> 0INDoQEKoQVN ...
       |         |
   F:
       |<--------+ Header: 2.04 Changed
       |  2.04   | Payload: <new state for the lock>
       |         |

       Figure 26: Resource request and response protected by OSCORE

Appendix F.  Document Updates

   RFC EDITOR: PLEASE REMOVE THIS SECTION.

F.1.  Version -21 to 22

   o  Provided section numbers in references to OAuth RFC.
   o  Updated IANA mapping registries to only use "Private Use" and
      "Expert Review".
   o  Made error messages optional for RS at token submission since it
      may not be able to send them depending on the profile.
   o  Corrected errors in examples.

F.2.  Version -20 to 21

   o  Added text about expiration of RS keys.

F.3.  Version -19 to 20

   o  Replaced "req_aud" with "audience" from the OAuth token exchange
      draft.
   o  Updated examples to remove unnecessary elements.

F.4.  Version -18 to -19

   o  Added definition of "Authorization Information".
   o  Explicitly state that ACE allows encoding refresh tokens in binary
      format in addition to strings.
   o  Renamed "AS Information" to "AS Request Creation Hints" and added
      the possibility to specify req_aud and scope as hints.
   o  Added the "kid" parameter to AS Request Creation Hints.
   o  Added security considerations about the integrity protection of
      tokens with multi-RS audiences.
   o  Renamed IANA registries mapping OAuth parameters to reflect the
      mapped registry.
   o  Added JWT claim names to CWT claim registrations.
   o  Added expert review instructions.
   o  Updated references to TLS from 1.2 to 1.3.

F.5.  Version -17 to -18

   o  Added OSCORE options in examples involving OSCORE.
   o  Removed requirement for the client to send application/cwt, since
      the client has no way to know.
   o  Clarified verification of tokens by the RS.
   o  Added exi claim CWT registration.

F.6.  Version -16 to -17

   o  Added references to (D)TLS 1.3.
   o  Added requirement that responses are bound to requests.

   o  Specify that grant_type is OPTIONAL in C2AS requests (as opposed

                Figure 20: Access Token provisioning to REQUIRED in OAuth).
   o  Replaced examples with hypothetical COSE profile with OSCORE.
   o  Added requirement for content type application/ace+cbor in error
      responses for token RS
      The client and introspection requests the RS runs the DTLS handshake using the raw public
      keys established in step B and responses.
   o  Reworked abbreviation space for claims, C.
      The client sends a CoAP GET request and response
      parameters.
   o  Added text to /temperature on RS over
      DTLS.  The RS verifies that the request is authorized, based on
      previously established security context.

      F: The RS may indicate that responds over the same DTLS channel with a CoAP 2.05
      Content response, containing a resource representation as payload.

              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>
       |         |

        Figure 21: Resource Request and Response protected by DTLS.

F.2.  Introspection Aided Token Validation

   In this deployment scenario it is busy at the authz-
      info resource.
   o  Added section assumed that specifies how the RS verifies an a client is not able
   to access token.
   o  Added section on the protection AS at the time of the authz-info endpoint.
   o  Removed access request, whereas the expiration mechanism based on sequence numbers.
   o  Added reference RS is
   assumed to RFC7662 security considerations.
   o  Added considerations on minimal security requirements for
      communication.
   o  Added security considerations on unprotected information sent be connected to
      authz-info the back-end infrastructure.  Thus the RS
   can make use of token introspection.  This access procedure involves
   steps A-F of Figure 1, but assumes steps A and in B have been carried
   out during a phase when the error responses.

F.7.  Version -15 client had connectivity to -16

   o  Added text AS.

   Since the RS using RFC6750 error codes.
   o  Defined an error code client is assumed to be offline, at least for incompatible a certain
   period of time, a pre-provisioned access token request parameters.
   o  Removed references has to be long-lived.
   Since the actors draft.
   o  Fixed errors in examples.

F.8.  Version -14 client is constrained, the token will not be self contained
   (i.e. not a CWT) but instead just a reference.  The resource server
   uses its connectivity to -15

   o  Added text about refresh tokens.
   o  Added text learn about protection of credentials.
   o  Rephrased introspection so that other entities than RS can do it.
   o  Editorial improvements.

F.9.  Version -13 to -14

   o  Split out the 'aud', 'cnf' and 'rs_cnf' parameters claims associated to
      [I-D.ietf-ace-oauth-params]
   o  Introduced the "application/ace+cbor" Content-Type.
   o  Added claim registrations from 'profile'
   access token by using introspection, which is shown in the example
   below.

   In the example interactions between an offline client (key fob), an
   RS (online lock), and 'rs_cnf'.
   o  Added note on schema part of an AS Information Section 5.3
   o  Realigned is shown.  It is assumed that there is a
   provisioning step where the parameter abbreviations to push rarely used ones client has access to the 2-byte encoding size of CBOR integers.

F.10.  Version -12 to -13

   o  Changed "Resource Information" to "Access Information" to avoid
      confusion.
   o  Clarified section about AS discovery.
   o  Editorial changes

F.11.  Version -11 AS.  This
   corresponds to -12

   o  Moved message exchanges A and B which are shown in
   Figure 22.

   Authorization consent from the Request error handling to a section of its own.
   o  Require resource owner can be pre-configured,
   but it can also be provided via an interactive flow with the use resource
   owner.  An example of the abbreviation this for profile identifiers.
   o  Added rs_cnf parameter in the introspection response, to inform
      RS' with several RPKs on which key fob case could be that the
   resource owner has a connected car, he buys a generic key that he
   wants to use.
   o  Allowed use of rs_cnf as claim in the access token in order to
      inform an RS with several RPKs on which the car.  To authorize the key fob he connects it
   to use.
   o  Clarified his computer that profiles must specify if/how error responses are
      protected.
   o  Fixed label number range to align with COSE/CWT.
   o  Clarified then provides the requirements language in order to allow profiles UI for the device.  After that
   OAuth 2.0 implicit flow can used to
      specify other payload formats than CBOR if they do authorize the key for his car at
   the car manufacturers AS.

   Note: In this example the client does not use CoAP.

F.12.  Version -10 to -11

   o  Fixed some CBOR data type errors.
   o  Updated boilerplate text

F.13.  Version -09 know the exact door it will
   be used to -10

   o  Removed CBOR major type numbers.
   o  Removed access since the client token design.
   o  Rephrased to clarify that other protocols than CoAP can be used.
   o  Clarifications regarding request is not send at the use time of HTTP

F.14.  Version -08 to -09

   o  Allowed scope to be byte strings.
   o  Defined default names for endpoints.
   o  Refactored
   access.  So the IANA section for briefness and consistency.
   o  Refactored tables that define IANA registry contents for
      consistency.
   o  Created IANA registry for CBOR mappings of error codes, grant
      types scope and Authorization Server Information.
   o  Added references audience parameters are set quite wide to other document sections defining IANA entries
      in
   start with, while tailored values narrowing down the IANA section.

F.15.  Version -07 claims to -08

   o  Moved AS discovery from the DTLS profile
   specific RS being accessed can be provided to that RS during an
   introspection step.

      A: The client sends a CoAP POST request to the framework, see
      Section 5.1.
   o  Made token endpoint at
      AS.  The request contains the use of CBOR mandatory.  If you use JSON you can use
      vanilla OAuth.
   o  Made it mandatory for profiles Audience parameter set to specify C-AS security and RS-AS
      security (the latter only if introspection is supported).
   o  Made "PACS1337"
      (PACS, Physical Access System), a value the use of CBOR abbreviations mandatory.

   o  Added text that identifies the
      physical access control system to clarify which the use of individual doors are
      connected.  The AS generates an access token references as an
      alternative to CWTs.
   o  Added text opaque string,
      which it can match to clarify that introspection must not be delayed, in
      case the RS has to return a specific client token.
   o  Added and the targeted
      audience.  It furthermore generates a symmetric proof-of-
      possession key.  The communication security considerations about leakage through unprotected AS
      discovery information, combining profiles and leakage through
      error responses.
   o  Added privacy considerations about leakage through unprotected authentication
      between client and AS
      discovery.
   o  Added text that clarifies that introspection is optional.
   o  Made profile parameter optional since it can be implicit.
   o  Clarified that assumed to have been provided at
      transport layer (e.g. via DTLS) using a pre-shared security
      context (psk, rpk or certificate).
      B: The AS responds with a CoAP is not mandatory and other protocols can be
      used.
   o  Clarified the design justification for specific features of 2.05 Content response, containing
      as payload the
      framework in appendix A.
   o  Clarified appendix E.2.
   o  Removed specification of Access Information, including the "cnf" claim for CBOR/COSE, access token and
      replaced with references to [RFC8747]

F.16.  Version -06 to -07

   o  Various clarifications added.
   o  Fixed erroneous author email.

F.17.  Version -05 to -06

   o  Moved sections that define the ACE framework into a subsection of
      the framework Section 5.
   o  Split section on client credentials symmetric proof-of-possession key.  Communication security
      between C and grant into two separate
      sections, Section 5.4, RS will be DTLS and PreSharedKey.  The PoP key is
      used as the PreSharedKey.

   Note: In this example we are using a symmetric key for a multi-RS
   audience, which is not recommended normally (see Section 5.5.
   o  Added Section 5.6 on AS authentication.
   o  Added Section 5.7 on 6.9).
   However in this case the Authorization endpoint.

F.18.  Version -04 to -05

   o  Added RFC 2119 language risk is deemed to be acceptable, since all
   the specification doors are part of the required
      behavior same physical access control system, and
   therefore the risk of profile specifications.
   o  Added Section 5.5 on a malicious RS impersonating the relation to client towards
   another RS is low.

            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>
       |         |

      Figure 22: Token Request and Response using Client Credentials.

   The information contained in the OAuth2 grant types.
   o  Added CBOR abbreviations for error Request-Payload and the error codes defined Response-
   Payload is shown in
      OAuth2.
   o  Added clarification about token expiration Figure 23.

   Request-Payload:
   {
     "client_id" : "keyfob",
     "audience" : "PACS1337"
   }

   Response-Payload:
   {
     "access_token" : b64'VGVzdCB0b2tlbg==',
     "cnf" : {
       "COSE_Key" : {
         "kid" : b64'c29tZSBwdWJsaWMga2V5IGlk',
         "kty" : "oct",
         "alg" : "HS256",
         "k": b64'ZoRSOrFzN_FzUA5XKMYoVHyzff5oRJxl-IXRtztJ6uE'
       }
     }
   }

           Figure 23: Request and long-running
      requests in Section 5.10.3
   o  Added security considerations about tokens with symmetric PoP keys
      valid Response Payload for more than one RS.
   o  Added privacy considerations section.
   o  Added IANA registry mapping C offline

   The access token in this case is just an opaque byte string
   referencing the confirmation types from RFC 7800
      to equivalent COSE types.

   o  Added appendix D, describing assumptions about what authorization information at the AS knows
      about AS.

      C: Next, the client and the RS.

F.19.  Version -03 to -04

   o  Added a description of POSTs the terms "framework" and "profiles" as
      used in this document.
   o  Clarified protection of access tokens in section 3.1.
   o  Clarified uses of token to the "cnf" parameter in section 6.4.5.
   o  Clarified intended use of Client Token authz-info
      endpoint in section 7.4.

F.20.  Version -02 to -03

   o  Removed references to draft-ietf-oauth-pop-key-distribution since the status of this draft RS.  This is unclear.
   o  Copied a plain CoAP request, i.e., no DTLS
      between client and adapted security considerations from draft-ietf-oauth-
      pop-key-distribution.
   o  Renamed "client information" to "RS information" since it is
      information about the RS.
   o  Clarified the requirements on profiles of this framework.
   o  Clarified  Since the token endpoint protocol and removed negotiation of
      "profile" and "alg" (section 6).
   o  Renumbered is an opaque string, the abbreviations for claims
      RS cannot verify it on its own, and parameters thus defers to get respond the
      client with a
      consistent numbering across different endpoints.
   o  Clarified status code until after step E.
      D: The RS sends the introspection endpoint.
   o  Renamed token, introspection and authz-info to "endpoint" instead
      of "resource" token to mirror the OAuth 2.0 terminology.
   o  Updated the examples in introspection endpoint on the appendices.

F.21.  Version -01 to -02

   o  Restructured AS
      using a CoAP POST request.  In this example RS and AS are assumed
      to remove communication have performed mutual authentication using a pre shared
      security parts.  These shall
      now be defined in profiles.
   o  Restructured section 5 to create new sections on context (psk, rpk or certificate) with the RS acting as
      DTLS client.
      E: The AS provides the OAuth
      endpoints token, introspection and authz-info.
   o  Pulled in material from draft-ietf-oauth-pop-key-distribution in
      order to define proof-of-possession key distribution.
   o  Introduced response (2.05 Content)
      containing parameters about the "cnf" token.  This includes the
      confirmation key (cnf) parameter as defined in RFC7800 that allows the RS to reference
      or transport keys used for verify the
      client's proof of possession.
   o  Introduced possession in step F.  Note that our example in
      Figure 25 assumes a pre-established key (e.g. one used by the "client-token" to transport
      client information from
      the AS to and the client via RS for a previous token) that is now only
      referenced by its key-identifier 'kid'.
      After receiving message E, the RS responds to the client's POST in conjunction
      step C with introspection.
   o  Expanded the IANA section to define parameters CoAP response code 2.01 (Created).

              Resource
     Client    Server
       |         |
   C:  +-------->| Header: POST (T=CON, Code=0.02)
       |  POST   | Uri-Path:"authz-info"
       |         | Payload: b64'VGVzdCB0b2tlbg=='
       |         |
       |         |     Authorization
       |         |       Server
       |         |          |
       |      D: +--------->| Header: POST (Code=0.02)
       |         |  POST    | Uri-Path: "introspect"
       |         |          | Content-Format: "application/ace+cbor"
       |         |          | Payload: <Request-Payload>
       |         |          |
       |      E: |<---------+ Header: 2.05 Content
       |         |  2.05    | Content-Format: "application/ace+cbor"
       |         |          | Payload: <Response-Payload>
       |         |          |
       |         |
       |<--------+ Header: 2.01 Created
       |  2.01   |
       |         |

               Figure 24: Token Introspection for token request,
      introspection and CWT claims.
   o  Moved deployment scenarios to C offline
      The information contained in the appendix as examples.

F.22.  Version -00 to -01

   o  Changed 5.1. from "Communication Security Protocol" to "Client
      Information".
   o  Major rewrite of 5.1 to clarify Request-Payload and the information exchanged between
      C Response-
      Payload is shown in Figure 25.

   Request-Payload:
   {
     "token" : b64'VGVzdCB0b2tlbg==',
     "client_id" : "FrontDoor",
   }

   Response-Payload:
   {
     "active" : true,
     "aud" : "lockOfDoor4711",
     "scope" : "open, close",
     "iat" : 1563454000,
     "cnf" : {
       "kid" : b64'c29tZSBwdWJsaWMga2V5IGlk'
     }
   }

         Figure 25: Request and AS in the PoP access token request profile Response Payload for IoT.

      *  Allow the Introspection

      The client to indicate preferences for the communication
         security protocol.
      *  Defined the term "Client Information" for uses the additional
         information returned symmetric PoP key to the client in addition establish a DTLS
      PreSharedKey secure connection to the access
         token.
      *  Require that RS.  The CoAP request PUT is
      sent to the messages between AS and client are secured,
         either with (D)TLS or with COSE_Encrypted wrappers.
      *  Removed dependency uri-path /state on OSCOAP and added generic text about
         object security instead.
      *  Defined the "rpk" parameter in the client information to
         transmit RS, changing the raw public key state of the RS from AS
      door to client.
      *  (D)TLS MUST use the PoP key in the handshake (either as PSK or
         as client RPK locked.
      F: The RS responds with client authentication).
      *  Defined the use of x5c, x5t and x5tS256 parameters when a
         client certificate is used for proof of possession.
      *  Defined "tktn" parameter for signaling for how to transfer the
         access token.
   o  Added 5.2. appropriate over the CoAP Access-Token option secure DTLS
      channel.

              Resource
     Client    Server
       |         |
       |<=======>| DTLS Connection Establishment
       |         |   using Pre Shared Key
       |         |
       +-------->| Header: PUT (Code=0.03)
       | PUT     | Uri-Path: "state"
       |         | Payload: <new state for transferring access
      tokens in messages that do not have payload.
   o  5.3.2.  Defined success and error responses from the RS when
      receiving an access token.
   o  5.6.:Added section giving guidance on how to handle token
      expiration in the absence of reliable time.
   o  Appendix B Added list of roles and responsibilities lock>
       |         |
   F:  |<--------+ Header: 2.04 Changed
       | 2.04    | Payload: <new state for C, AS the lock>
       |         |

       Figure 26: Resource request and
      RS. response protected by OSCORE

Authors' Addresses
   Ludwig Seitz
   Combitech
   Djaeknegatan 31
   Malmoe  211 35
   Sweden

   Email: ludwig.seitz@combitech.se

   Goeran Selander
   Ericsson
   Faroegatan 6
   Kista  164 80
   Sweden

   Email: goran.selander@ericsson.com

   Erik Wahlstroem
   Sweden

   Email: erik@wahlstromstekniska.se

   Samuel Erdtman
   Spotify AB
   Birger Jarlsgatan 61, 4tr
   Stockholm  113 56
   Sweden

   Email: erdtman@spotify.com

   Hannes Tschofenig
   Arm Ltd.
   Absam  6067
   Austria

   Email: Hannes.Tschofenig@arm.com