idnits 2.17.00 (12 Aug 2021) /tmp/idnits15549/draft-ietf-ace-oauth-authz-23.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (March 25, 2019) is 1152 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- No information found for draft-ietf-ace-cwt-proof-of-possession - is the name correct? -- Possible downref: Normative reference to a draft: ref. 'I-D.ietf-ace-cwt-proof-of-possession' -- No information found for draft-ietf-ace-oauth-params - is the name correct? -- Possible downref: Normative reference to a draft: ref. 'I-D.ietf-ace-oauth-params' -- No information found for draft-ietf-oauth-token-exchange - is the name correct? -- Possible downref: Normative reference to a draft: ref. 'I-D.ietf-oauth-token-exchange' ** Obsolete normative reference: RFC 6347 (Obsoleted by RFC 9147) -- No information found for draft-erdtman-ace-rpcc - is the name correct? == Outdated reference: draft-ietf-core-object-security has been published as RFC 8613 -- No information found for draft-ietf-oauth-device-flow - is the name correct? == Outdated reference: draft-ietf-tls-dtls13 has been published as RFC 9147 -- Obsolete informational reference (is this intentional?): RFC 7049 (Obsoleted by RFC 8949) Summary: 1 error (**), 0 flaws (~~), 3 warnings (==), 10 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 ACE Working Group L. Seitz 3 Internet-Draft RISE 4 Intended status: Standards Track G. Selander 5 Expires: September 26, 2019 Ericsson 6 E. Wahlstroem 8 S. Erdtman 9 Spotify AB 10 H. Tschofenig 11 Arm Ltd. 12 March 25, 2019 14 Authentication and Authorization for Constrained Environments (ACE) 15 using the OAuth 2.0 Framework (ACE-OAuth) 16 draft-ietf-ace-oauth-authz-23 18 Abstract 20 This specification defines a framework for authentication and 21 authorization in Internet of Things (IoT) environments called ACE- 22 OAuth. The framework is based on a set of building blocks including 23 OAuth 2.0 and CoAP, thus making a well-known and widely used 24 authorization solution suitable for IoT devices. Existing 25 specifications are used where possible, but where the constraints of 26 IoT devices require it, extensions are added and profiles are 27 defined. 29 Status of This Memo 31 This Internet-Draft is submitted in full conformance with the 32 provisions of BCP 78 and BCP 79. 34 Internet-Drafts are working documents of the Internet Engineering 35 Task Force (IETF). Note that other groups may also distribute 36 working documents as Internet-Drafts. The list of current Internet- 37 Drafts is at https://datatracker.ietf.org/drafts/current/. 39 Internet-Drafts are draft documents valid for a maximum of six months 40 and may be updated, replaced, or obsoleted by other documents at any 41 time. It is inappropriate to use Internet-Drafts as reference 42 material or to cite them other than as "work in progress." 44 This Internet-Draft will expire on September 26, 2019. 46 Copyright Notice 48 Copyright (c) 2019 IETF Trust and the persons identified as the 49 document authors. All rights reserved. 51 This document is subject to BCP 78 and the IETF Trust's Legal 52 Provisions Relating to IETF Documents 53 (https://trustee.ietf.org/license-info) in effect on the date of 54 publication of this document. Please review these documents 55 carefully, as they describe your rights and restrictions with respect 56 to this document. Code Components extracted from this document must 57 include Simplified BSD License text as described in Section 4.e of 58 the Trust Legal Provisions and are provided without warranty as 59 described in the Simplified BSD License. 61 Table of Contents 63 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 64 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5 65 3. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 6 66 3.1. OAuth 2.0 . . . . . . . . . . . . . . . . . . . . . . . . 7 67 3.2. CoAP . . . . . . . . . . . . . . . . . . . . . . . . . . 10 68 4. Protocol Interactions . . . . . . . . . . . . . . . . . . . . 11 69 5. Framework . . . . . . . . . . . . . . . . . . . . . . . . . . 15 70 5.1. Discovering Authorization Servers . . . . . . . . . . . . 16 71 5.1.1. Unauthorized Resource Request Message . . . . . . . . 16 72 5.1.2. AS Request Creation Hints . . . . . . . . . . . . . . 17 73 5.1.2.1. The Client-Nonce Parameter . . . . . . . . . . . 19 74 5.2. Authorization Grants . . . . . . . . . . . . . . . . . . 20 75 5.3. Client Credentials . . . . . . . . . . . . . . . . . . . 20 76 5.4. AS Authentication . . . . . . . . . . . . . . . . . . . . 21 77 5.5. The Authorization Endpoint . . . . . . . . . . . . . . . 21 78 5.6. The Token Endpoint . . . . . . . . . . . . . . . . . . . 21 79 5.6.1. Client-to-AS Request . . . . . . . . . . . . . . . . 22 80 5.6.2. AS-to-Client Response . . . . . . . . . . . . . . . . 24 81 5.6.3. Error Response . . . . . . . . . . . . . . . . . . . 26 82 5.6.4. Request and Response Parameters . . . . . . . . . . . 27 83 5.6.4.1. Grant Type . . . . . . . . . . . . . . . . . . . 27 84 5.6.4.2. Token Type . . . . . . . . . . . . . . . . . . . 28 85 5.6.4.3. Profile . . . . . . . . . . . . . . . . . . . . . 28 86 5.6.4.4. Client-Nonce . . . . . . . . . . . . . . . . . . 29 87 5.6.5. Mapping Parameters to CBOR . . . . . . . . . . . . . 29 88 5.7. The Introspection Endpoint . . . . . . . . . . . . . . . 30 89 5.7.1. Introspection Request . . . . . . . . . . . . . . . . 30 90 5.7.2. Introspection Response . . . . . . . . . . . . . . . 31 91 5.7.3. Error Response . . . . . . . . . . . . . . . . . . . 32 92 5.7.4. Mapping Introspection parameters to CBOR . . . . . . 33 93 5.8. The Access Token . . . . . . . . . . . . . . . . . . . . 34 94 5.8.1. The Authorization Information Endpoint . . . . . . . 34 95 5.8.1.1. Verifying an Access Token . . . . . . . . . . . . 35 96 5.8.1.2. Protecting the Authorization Information 97 Endpoint . . . . . . . . . . . . . . . . . . . . 37 98 5.8.2. Client Requests to the RS . . . . . . . . . . . . . . 38 99 5.8.3. Token Expiration . . . . . . . . . . . . . . . . . . 38 100 5.8.4. Key Expiration . . . . . . . . . . . . . . . . . . . 39 101 6. Security Considerations . . . . . . . . . . . . . . . . . . . 40 102 6.1. Unprotected AS Request Creation Hints . . . . . . . . . . 41 103 6.2. Minimal security requirements for communication . 41 104 6.3. Use of Nonces for Token Freshness . . . . . . . . . . . . 42 105 6.4. Combining profiles . . . . . . . . . . . . . . . . . . . 43 106 6.5. Unprotected Information . . . . . . . . . . . . . . . . . 43 107 6.6. Identifying audiences . . . . . . . . . . . . . . . . . . 43 108 6.7. Denial of service against or with Introspection . . 44 109 7. Privacy Considerations . . . . . . . . . . . . . . . . . . . 45 110 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 45 111 8.1. ACE Authorization Server Request Creation Hints . . . . . 45 112 8.2. OAuth Extensions Error Registration . . . . . . . . . . . 46 113 8.3. OAuth Error Code CBOR Mappings Registry . . . . . . . . . 46 114 8.4. OAuth Grant Type CBOR Mappings . . . . . . . . . . . . . 47 115 8.5. OAuth Access Token Types . . . . . . . . . . . . . . . . 47 116 8.6. OAuth Access Token Type CBOR Mappings . . . . . . . . . . 48 117 8.6.1. Initial Registry Contents . . . . . . . . . . . . . . 48 118 8.7. ACE Profile Registry . . . . . . . . . . . . . . . . . . 48 119 8.8. OAuth Parameter Registration . . . . . . . . . . . . . . 49 120 8.9. OAuth Parameters CBOR Mappings Registry . . . . . . . . . 49 121 8.10. OAuth Introspection Response Parameter Registration . . . 50 122 8.11. OAuth Token Introspection Response CBOR Mappings Registry 50 123 8.12. JSON Web Token Claims . . . . . . . . . . . . . . . . . . 50 124 8.13. CBOR Web Token Claims . . . . . . . . . . . . . . . . . . 51 125 8.14. Media Type Registrations . . . . . . . . . . . . . . . . 52 126 8.15. CoAP Content-Format Registry . . . . . . . . . . . . . . 53 127 8.16. Expert Review Instructions . . . . . . . . . . . . . . . 53 128 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 54 129 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 55 130 10.1. Normative References . . . . . . . . . . . . . . . . . . 55 131 10.2. Informative References . . . . . . . . . . . . . . . . . 57 132 Appendix A. Design Justification . . . . . . . . . . . . . . . . 59 133 Appendix B. Roles and Responsibilities . . . . . . . . . . . . . 63 134 Appendix C. Requirements on Profiles . . . . . . . . . . . . . . 65 135 Appendix D. Assumptions on AS knowledge about C and RS . . . . . 66 136 Appendix E. Deployment Examples . . . . . . . . . . . . . . . . 66 137 E.1. Local Token Validation . . . . . . . . . . . . . . . . . 66 138 E.2. Introspection Aided Token Validation . . . . . . . . . . 71 139 Appendix F. Document Updates . . . . . . . . . . . . . . . . . . 75 140 F.1. Version -21 to 22 . . . . . . . . . . . . . . . . . . . . 75 141 F.2. Version -20 to 21 . . . . . . . . . . . . . . . . . . . . 75 142 F.3. Version -19 to 20 . . . . . . . . . . . . . . . . . . . . 75 143 F.4. Version -18 to -19 . . . . . . . . . . . . . . . . . . . 76 144 F.5. Version -17 to -18 . . . . . . . . . . . . . . . . . . . 76 145 F.6. Version -16 to -17 . . . . . . . . . . . . . . . . . . . 76 146 F.7. Version -15 to -16 . . . . . . . . . . . . . . . . . . . 77 147 F.8. Version -14 to -15 . . . . . . . . . . . . . . . . . . . 77 148 F.9. Version -13 to -14 . . . . . . . . . . . . . . . . . . . 77 149 F.10. Version -12 to -13 . . . . . . . . . . . . . . . . . . . 77 150 F.11. Version -11 to -12 . . . . . . . . . . . . . . . . . . . 77 151 F.12. Version -10 to -11 . . . . . . . . . . . . . . . . . . . 78 152 F.13. Version -09 to -10 . . . . . . . . . . . . . . . . . . . 78 153 F.14. Version -08 to -09 . . . . . . . . . . . . . . . . . . . 78 154 F.15. Version -07 to -08 . . . . . . . . . . . . . . . . . . . 78 155 F.16. Version -06 to -07 . . . . . . . . . . . . . . . . . . . 79 156 F.17. Version -05 to -06 . . . . . . . . . . . . . . . . . . . 79 157 F.18. Version -04 to -05 . . . . . . . . . . . . . . . . . . . 79 158 F.19. Version -03 to -04 . . . . . . . . . . . . . . . . . . . 79 159 F.20. Version -02 to -03 . . . . . . . . . . . . . . . . . . . 79 160 F.21. Version -01 to -02 . . . . . . . . . . . . . . . . . . . 80 161 F.22. Version -00 to -01 . . . . . . . . . . . . . . . . . . . 80 162 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 81 164 1. Introduction 166 Authorization is the process for granting approval to an entity to 167 access a resource [RFC4949]. The authorization task itself can best 168 be described as granting access to a requesting client, for a 169 resource hosted on a device, the resource server (RS). This exchange 170 is mediated by one or multiple authorization servers (AS). Managing 171 authorization for a large number of devices and users can be a 172 complex task. 174 While prior work on authorization solutions for the Web and for the 175 mobile environment also applies to the Internet of Things (IoT) 176 environment, many IoT devices are constrained, for example, in terms 177 of processing capabilities, available memory, etc. For web 178 applications on constrained nodes, this specification RECOMMENDS the 179 use of CoAP [RFC7252] as replacement for HTTP. 181 A detailed treatment of constraints can be found in [RFC7228], and 182 the different IoT deployments present a continuous range of device 183 and network capabilities. Taking energy consumption as an example: 184 At one end there are energy-harvesting or battery powered devices 185 which have a tight power budget, on the other end there are mains- 186 powered devices, and all levels in between. 188 Hence, IoT devices may be very different in terms of available 189 processing and message exchange capabilities and there is a need to 190 support many different authorization use cases [RFC7744]. 192 This specification describes a framework for authentication and 193 authorization in constrained environments (ACE) built on re-use of 194 OAuth 2.0 [RFC6749], thereby extending authorization to Internet of 195 Things devices. This specification contains the necessary building 196 blocks for adjusting OAuth 2.0 to IoT environments. 198 More detailed, interoperable specifications can be found in profiles. 199 Implementations may claim conformance with a specific profile, 200 whereby implementations utilizing the same profile interoperate while 201 implementations of different profiles are not expected to be 202 interoperable. Some devices, such as mobile phones and tablets, may 203 implement multiple profiles and will therefore be able to interact 204 with a wider range of low end devices. Requirements on profiles are 205 described at contextually appropriate places throughout this 206 specification, and also summarized in Appendix C. 208 2. Terminology 210 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 211 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 212 "OPTIONAL" in this document are to be interpreted as described in BCP 213 14 [RFC2119] [RFC8174] when, and only when, they appear in all 214 capitals, as shown here. 216 Certain security-related terms such as "authentication", 217 "authorization", "confidentiality", "(data) integrity", "message 218 authentication code", and "verify" are taken from [RFC4949]. 220 Since exchanges in this specification are described as RESTful 221 protocol interactions, HTTP [RFC7231] offers useful terminology. 223 Terminology for entities in the architecture is defined in OAuth 2.0 224 [RFC6749] such as client (C), resource server (RS), and authorization 225 server (AS). 227 Note that the term "endpoint" is used here following its OAuth 228 definition, which is to denote resources such as token and 229 introspection at the AS and authz-info at the RS (see Section 5.8.1 230 for a definition of the authz-info endpoint). The CoAP [RFC7252] 231 definition, which is "An entity participating in the CoAP protocol" 232 is not used in this specification. 234 The specifications in this document is called the "framework" or "ACE 235 framework". When referring to "profiles of this framework" it refers 236 to additional specifications that define the use of this 237 specification with concrete transport, and communication security 238 protocols (e.g., CoAP over DTLS). 240 We use the term "Access Information" for parameters other than the 241 access token provided to the client by the AS to enable it to access 242 the RS (e.g. public key of the RS, profile supported by RS). 244 We use the term "Authorization Information" to denote all 245 information, including the claims of relevant access tokens, that an 246 RS uses to determine whether an access request should be granted. 248 3. Overview 250 This specification defines the ACE framework for authorization in the 251 Internet of Things environment. It consists of a set of building 252 blocks. 254 The basic block is the OAuth 2.0 [RFC6749] framework, which enjoys 255 widespread deployment. Many IoT devices can support OAuth 2.0 256 without any additional extensions, but for certain constrained 257 settings additional profiling is needed. 259 Another building block is the lightweight web transfer protocol CoAP 260 [RFC7252], for those communication environments where HTTP is not 261 appropriate. CoAP typically runs on top of UDP, which further 262 reduces overhead and message exchanges. While this specification 263 defines extensions for the use of OAuth over CoAP, other underlying 264 protocols are not prohibited from being supported in the future, such 265 as HTTP/2, MQTT, BLE and QUIC. 267 A third building block is CBOR [RFC7049], for encodings where JSON 268 [RFC8259] is not sufficiently compact. CBOR is a binary encoding 269 designed for small code and message size, which may be used for 270 encoding of self contained tokens, and also for encoding payload 271 transferred in protocol messages. 273 A fourth building block is the compact CBOR-based secure message 274 format COSE [RFC8152], which enables application layer security as an 275 alternative or complement to transport layer security (DTLS [RFC6347] 276 or TLS [RFC8446]). COSE is used to secure self-contained tokens such 277 as proof-of-possession (PoP) tokens, which is an extension to the 278 OAuth tokens. The default token format is defined in CBOR web token 279 (CWT) [RFC8392]. Application layer security for CoAP using COSE can 280 be provided with OSCORE [I-D.ietf-core-object-security]. 282 With the building blocks listed above, solutions satisfying various 283 IoT device and network constraints are possible. A list of 284 constraints is described in detail in [RFC7228] and a description of 285 how the building blocks mentioned above relate to the various 286 constraints can be found in Appendix A. 288 Luckily, not every IoT device suffers from all constraints. The ACE 289 framework nevertheless takes all these aspects into account and 290 allows several different deployment variants to co-exist, rather than 291 mandating a one-size-fits-all solution. It is important to cover the 292 wide range of possible interworking use cases and the different 293 requirements from a security point of view. Once IoT deployments 294 mature, popular deployment variants will be documented in the form of 295 ACE profiles. 297 3.1. OAuth 2.0 299 The OAuth 2.0 authorization framework enables a client to obtain 300 scoped access to a resource with the permission of a resource owner. 301 Authorization information, or references to it, is passed between the 302 nodes using access tokens. These access tokens are issued to clients 303 by an authorization server with the approval of the resource owner. 304 The client uses the access token to access the protected resources 305 hosted by the resource server. 307 A number of OAuth 2.0 terms are used within this specification: 309 The token and introspection Endpoints: 310 The AS hosts the token endpoint that allows a client to request 311 access tokens. The client makes a POST request to the token 312 endpoint on the AS and receives the access token in the response 313 (if the request was successful). 314 In some deployments, a token introspection endpoint is provided by 315 the AS, which can be used by the RS if it needs to request 316 additional information regarding a received access token. The RS 317 makes a POST request to the introspection endpoint on the AS and 318 receives information about the access token in the response. (See 319 "Introspection" below.) 321 Access Tokens: 322 Access tokens are credentials needed to access protected 323 resources. An access token is a data structure representing 324 authorization permissions issued by the AS to the client. Access 325 tokens are generated by the AS and consumed by the RS. The access 326 token content is opaque to the client. 328 Access tokens can have different formats, and various methods of 329 utilization (e.g., cryptographic properties) based on the security 330 requirements of the given deployment. 332 Refresh Tokens: 333 Refresh tokens are credentials used to obtain access tokens. 334 Refresh tokens are issued to the client by the authorization 335 server and are used to obtain a new access token when the current 336 access token becomes invalid or expires, or to obtain additional 337 access tokens with identical or narrower scope (access tokens may 338 have a shorter lifetime and fewer permissions than authorized by 339 the resource owner). Issuing a refresh token is optional at the 340 discretion of the authorization server. If the authorization 341 server issues a refresh token, it is included when issuing an 342 access token (i.e., step (B) in Figure 1). 344 A refresh token in OAuth 2.0 is a string representing the 345 authorization granted to the client by the resource owner. The 346 string is usually opaque to the client. The token denotes an 347 identifier used to retrieve the authorization information. Unlike 348 access tokens, refresh tokens are intended for use only with 349 authorization servers and are never sent to resource servers. In 350 this framework, refresh tokens are encoded in binary instead of 351 strings, if used. 353 Proof of Possession Tokens: 354 An access token may be bound to a cryptographic key, which is then 355 used by an RS to authenticate requests from a client. Such tokens 356 are called proof-of-possession access tokens (or PoP access 357 tokens). 359 The proof-of-possession (PoP) security concept assumes that the AS 360 acts as a trusted third party that binds keys to access tokens. 361 These so called PoP keys are then used by the client to 362 demonstrate the possession of the secret to the RS when accessing 363 the resource. The RS, when receiving an access token, needs to 364 verify that the key used by the client matches the one bound to 365 the access token. When this specification uses the term "access 366 token" it is assumed to be a PoP access token token unless 367 specifically stated otherwise. 369 The key bound to the access token (the PoP key) may use either 370 symmetric or asymmetric cryptography. The appropriate choice of 371 the kind of cryptography depends on the constraints of the IoT 372 devices as well as on the security requirements of the use case. 374 Symmetric PoP key: 375 The AS generates a random symmetric PoP key. The key is either 376 stored to be returned on introspection calls or encrypted and 377 included in the access token. The PoP key is also encrypted 378 for the client and sent together with the access token to the 379 client. 381 Asymmetric PoP key: 382 An asymmetric key pair is generated on the client and the 383 public key is sent to the AS (if it does not already have 384 knowledge of the client's public key). Information about the 385 public key, which is the PoP key in this case, is either stored 386 to be returned on introspection calls or included inside the 387 access token and sent back to the requesting client. The RS 388 can identify the client's public key from the information in 389 the token, which allows the client to use the corresponding 390 private key for the proof of possession. 392 The access token is either a simple reference, or a structured 393 information object (e.g., CWT [RFC8392]) protected by a 394 cryptographic wrapper (e.g., COSE [RFC8152]). The choice of PoP 395 key does not necessarily imply a specific credential type for the 396 integrity protection of the token. 398 Scopes and Permissions: 399 In OAuth 2.0, the client specifies the type of permissions it is 400 seeking to obtain (via the scope parameter) in the access token 401 request. In turn, the AS may use the scope response parameter to 402 inform the client of the scope of the access token issued. As the 403 client could be a constrained device as well, this specification 404 defines the use of CBOR encoding as data format, see Section 5, to 405 request scopes and to be informed what scopes the access token 406 actually authorizes. 408 The values of the scope parameter in OAuth 2.0 are expressed as a 409 list of space-delimited, case-sensitive strings, with a semantic 410 that is well-known to the AS and the RS. More details about the 411 concept of scopes is found under Section 3.3 in [RFC6749]. 413 Claims: 414 Information carried in the access token or returned from 415 introspection, called claims, is in the form of name-value pairs. 417 An access token may, for example, include a claim identifying the 418 AS that issued the token (via the "iss" claim) and what audience 419 the access token is intended for (via the "aud" claim). The 420 audience of an access token can be a specific resource or one or 421 many resource servers. The resource owner policies influence what 422 claims are put into the access token by the authorization server. 424 While the structure and encoding of the access token varies 425 throughout deployments, a standardized format has been defined 426 with the JSON Web Token (JWT) [RFC7519] where claims are encoded 427 as a JSON object. In [RFC8392], an equivalent format using CBOR 428 encoding (CWT) has been defined. 430 Introspection: 431 Introspection is a method for a resource server to query the 432 authorization server for the active state and content of a 433 received access token. This is particularly useful in those cases 434 where the authorization decisions are very dynamic and/or where 435 the received access token itself is an opaque reference rather 436 than a self-contained token. More information about introspection 437 in OAuth 2.0 can be found in [RFC7662]. 439 3.2. CoAP 441 CoAP is an application layer protocol similar to HTTP, but 442 specifically designed for constrained environments. CoAP typically 443 uses datagram-oriented transport, such as UDP, where reordering and 444 loss of packets can occur. A security solution needs to take the 445 latter aspects into account. 447 While HTTP uses headers and query strings to convey additional 448 information about a request, CoAP encodes such information into 449 header parameters called 'options'. 451 CoAP supports application-layer fragmentation of the CoAP payloads 452 through blockwise transfers [RFC7959]. However, blockwise transfer 453 does not increase the size limits of CoAP options, therefore data 454 encoded in options has to be kept small. 456 Transport layer security for CoAP can be provided by DTLS or TLS 457 [RFC6347][RFC8446] [I-D.ietf-tls-dtls13]. CoAP defines a number of 458 proxy operations that require transport layer security to be 459 terminated at the proxy. One approach for protecting CoAP 460 communication end-to-end through proxies, and also to support 461 security for CoAP over a different transport in a uniform way, is to 462 provide security at the application layer using an object-based 463 security mechanism such as COSE [RFC8152]. 465 One application of COSE is OSCORE [I-D.ietf-core-object-security], 466 which provides end-to-end confidentiality, integrity and replay 467 protection, and a secure binding between CoAP request and response 468 messages. In OSCORE, the CoAP messages are wrapped in COSE objects 469 and sent using CoAP. 471 This framework RECOMMENDS the use of CoAP as replacement for HTTP for 472 use in constrained environments. 474 4. Protocol Interactions 476 The ACE framework is based on the OAuth 2.0 protocol interactions 477 using the token endpoint and optionally the introspection endpoint. 478 A client obtains an access token, and optionally a refresh token, 479 from an AS using the token endpoint and subsequently presents the 480 access token to a RS to gain access to a protected resource. In most 481 deployments the RS can process the access token locally, however in 482 some cases the RS may present it to the AS via the introspection 483 endpoint to get fresh information. These interactions are shown in 484 Figure 1. An overview of various OAuth concepts is provided in 485 Section 3.1. 487 The OAuth 2.0 framework defines a number of "protocol flows" via 488 grant types, which have been extended further with extensions to 489 OAuth 2.0 (such as [RFC7521] and [I-D.ietf-oauth-device-flow]). What 490 grant types works best depends on the usage scenario and [RFC7744] 491 describes many different IoT use cases but there are two preferred 492 grant types, namely the Authorization Code Grant (described in 493 Section 4.1 of [RFC7521]) and the Client Credentials Grant (described 494 in Section 4.4 of [RFC7521]). The Authorization Code Grant is a good 495 fit for use with apps running on smart phones and tablets that 496 request access to IoT devices, a common scenario in the smart home 497 environment, where users need to go through an authentication and 498 authorization phase (at least during the initial setup phase). The 499 native apps guidelines described in [RFC8252] are applicable to this 500 use case. The Client Credential Grant is a good fit for use with IoT 501 devices where the OAuth client itself is constrained. In such a 502 case, the resource owner has pre-arranged access rights for the 503 client with the authorization server, which is often accomplished 504 using a commissioning tool. 506 The consent of the resource owner, for giving a client access to a 507 protected resource, can be provided dynamically as in the traditional 508 OAuth flows, or it could be pre-configured by the resource owner as 509 authorization policies at the AS, which the AS evaluates when a token 510 request arrives. The resource owner and the requesting party (i.e., 511 client owner) are not shown in Figure 1. 513 This framework supports a wide variety of communication security 514 mechanisms between the ACE entities, such as client, AS, and RS. It 515 is assumed that the client has been registered (also called enrolled 516 or onboarded) to an AS using a mechanism defined outside the scope of 517 this document. In practice, various techniques for onboarding have 518 been used, such as factory-based provisioning or the use of 519 commissioning tools. Regardless of the onboarding technique, this 520 provisioning procedure implies that the client and the AS exchange 521 credentials and configuration parameters. These credentials are used 522 to mutually authenticate each other and to protect messages exchanged 523 between the client and the AS. 525 It is also assumed that the RS has been registered with the AS, 526 potentially in a similar way as the client has been registered with 527 the AS. Established keying material between the AS and the RS allows 528 the AS to apply cryptographic protection to the access token to 529 ensure that its content cannot be modified, and if needed, that the 530 content is confidentiality protected. 532 The keying material necessary for establishing communication security 533 between C and RS is dynamically established as part of the protocol 534 described in this document. 536 At the start of the protocol, there is an optional discovery step 537 where the client discovers the resource server and the resources this 538 server hosts. In this step, the client might also determine what 539 permissions are needed to access the protected resource. A generic 540 procedure is described in Section 5.1, profiles MAY define other 541 procedures for discovery. 543 In Bluetooth Low Energy, for example, advertisements are broadcasted 544 by a peripheral, including information about the primary services. 545 In CoAP, as a second example, a client can make a request to "/.well- 546 known/core" to obtain information about available resources, which 547 are returned in a standardized format as described in [RFC6690]. 549 +--------+ +---------------+ 550 | |---(A)-- Token Request ------->| | 551 | | | Authorization | 552 | |<--(B)-- Access Token ---------| Server | 553 | | + Access Information | | 554 | | + Refresh Token (optional) +---------------+ 555 | | ^ | 556 | | Introspection Request (D)| | 557 | Client | (optional) | | 558 | | Response | |(E) 559 | | (optional) | v 560 | | +--------------+ 561 | |---(C)-- Token + Request ----->| | 562 | | | Resource | 563 | |<--(F)-- Protected Resource ---| Server | 564 | | | | 565 +--------+ +--------------+ 567 Figure 1: Basic Protocol Flow. 569 Requesting an Access Token (A): 570 The client makes an access token request to the token endpoint at 571 the AS. This framework assumes the use of PoP access tokens (see 572 Section 3.1 for a short description) wherein the AS binds a key to 573 an access token. The client may include permissions it seeks to 574 obtain, and information about the credentials it wants to use 575 (e.g., symmetric/asymmetric cryptography or a reference to a 576 specific credential). 578 Access Token Response (B): 579 If the AS successfully processes the request from the client, it 580 returns an access token and optionally a refresh token (note that 581 only certain grant types support refresh tokens). It can also 582 return additional parameters, referred to as "Access Information". 583 In addition to the response parameters defined by OAuth 2.0 and 584 the PoP access token extension, this framework defines parameters 585 that can be used to inform the client about capabilities of the 586 RS. More information about these parameters can be found in 587 Section 5.6.4. 589 Resource Request (C): 590 The client interacts with the RS to request access to the 591 protected resource and provides the access token. The protocol to 592 use between the client and the RS is not restricted to CoAP. 594 HTTP, HTTP/2, QUIC, MQTT, Bluetooth Low Energy, etc., are also 595 viable candidates. 597 Depending on the device limitations and the selected protocol, 598 this exchange may be split up into two parts: 600 (1) the client sends the access token containing, or 601 referencing, the authorization information to the RS, that may 602 be used for subsequent resource requests by the client, and 604 (2) the client makes the resource access request, using the 605 communication security protocol and other Access Information 606 obtained from the AS. 608 The Client and the RS mutually authenticate using the security 609 protocol specified in the profile (see step B) and the keys 610 obtained in the access token or the Access Information. The RS 611 verifies that the token is integrity protected by the AS and 612 compares the claims contained in the access token with the 613 resource request. If the RS is online, validation can be handed 614 over to the AS using token introspection (see messages D and E) 615 over HTTP or CoAP. 617 Token Introspection Request (D): 618 A resource server may be configured to introspect the access token 619 by including it in a request to the introspection endpoint at that 620 AS. Token introspection over CoAP is defined in Section 5.7 and 621 for HTTP in [RFC7662]. 623 Note that token introspection is an optional step and can be 624 omitted if the token is self-contained and the resource server is 625 prepared to perform the token validation on its own. 627 Token Introspection Response (E): 628 The AS validates the token and returns the most recent parameters, 629 such as scope, audience, validity etc. associated with it back to 630 the RS. The RS then uses the received parameters to process the 631 request to either accept or to deny it. 633 Protected Resource (F): 634 If the request from the client is authorized, the RS fulfills the 635 request and returns a response with the appropriate response code. 637 The RS uses the dynamically established keys to protect the 638 response, according to used communication security protocol. 640 5. Framework 642 The following sections detail the profiling and extensions of OAuth 643 2.0 for constrained environments, which constitutes the ACE 644 framework. 646 Credential Provisioning 647 For IoT, it cannot be assumed that the client and RS are part of a 648 common key infrastructure, so the AS provisions credentials or 649 associated information to allow mutual authentication. These 650 credentials need to be provided to the parties before or during 651 the authentication protocol is executed, and may be re-used for 652 subsequent token requests. 654 Proof-of-Possession 655 The ACE framework, by default, implements proof-of-possession for 656 access tokens, i.e., that the token holder can prove being a 657 holder of the key bound to the token. The binding is provided by 658 the "cnf" claim [I-D.ietf-ace-cwt-proof-of-possession] indicating 659 what key is used for proof-of-possession. If a client needs to 660 submit a new access token, e.g., to obtain additional access 661 rights, they can request that the AS binds this token to the same 662 key as the previous one. 664 ACE Profiles 665 The client or RS may be limited in the encodings or protocols it 666 supports. To support a variety of different deployment settings, 667 specific interactions between client and RS are defined in an ACE 668 profile. In ACE framework the AS is expected to manage the 669 matching of compatible profile choices between a client and an RS. 670 The AS informs the client of the selected profile using the 671 "profile" parameter in the token response. 673 OAuth 2.0 requires the use of TLS both to protect the communication 674 between AS and client when requesting an access token; between client 675 and RS when accessing a resource and between AS and RS if 676 introspection is used. In constrained settings TLS is not always 677 feasible, or desirable. Nevertheless it is REQUIRED that the data 678 exchanged with the AS is encrypted, integrity protected and protected 679 against message replay. It is also REQUIRED that the AS and the 680 endpoint communicating with it (client or RS) perform mutual 681 authentication. Furthermore it MUST be assured that responses are 682 bound to the requests in the sense that the receiver of a response 683 can be certain that the response actually belongs to a certain 684 request. 686 Profiles MUST specify a communication security protocol that provides 687 the features required above. 689 In OAuth 2.0 the communication with the Token and the Introspection 690 endpoints at the AS is assumed to be via HTTP and may use Uri-query 691 parameters. When profiles of this framework use CoAP instead, this 692 framework REQUIRES the use of the following alternative instead of 693 Uri-query parameters: The sender (client or RS) encodes the 694 parameters of its request as a CBOR map and submits that map as the 695 payload of the POST request. Profiles that use CBOR encoding of 696 protocol message parameters MUST use the media format 'application/ 697 ace+cbor', unless the protocol message is wrapped in another Content- 698 Format (e.g. object security). If CoAP is used for communication, 699 the Content-Format MUST be abbreviated with the ID: 19 (see 700 Section 8.15). 702 The OAuth 2.0 AS uses a JSON structure in the payload of its 703 responses both to client and RS. If CoAP is used, this framework 704 REQUIRES the use of CBOR [RFC7049] instead of JSON. Depending on the 705 profile, the CBOR payload MAY be enclosed in a non-CBOR cryptographic 706 wrapper. 708 5.1. Discovering Authorization Servers 710 In order to determine the AS in charge of a resource hosted at the 711 RS, C MAY send an initial Unauthorized Resource Request message to 712 RS. RS then denies the request and sends the address of its AS back 713 to C. 715 Instead of the initial Unauthorized Resource Request message, other 716 discovery methods may be used, or the client may be pre-provisioned 717 with the address of the AS. 719 5.1.1. Unauthorized Resource Request Message 721 The optional Unauthorized Resource Request message is a request for a 722 resource hosted by RS for which no proper authorization is granted. 723 RS MUST treat any request for a protected resource as Unauthorized 724 Resource Request message when any of the following holds: 726 o The request has been received on an unprotected channel. 728 o RS has no valid access token for the sender of the request 729 regarding the requested action on that resource. 731 o RS has a valid access token for the sender of the request, but 732 this does not allow the requested action on the requested 733 resource. 735 Note: These conditions ensure that RS can handle requests 736 autonomously once access was granted and a secure channel has been 737 established between C and RS. The authz-info endpoint MUST NOT be 738 protected as specified above, in order to allow clients to upload 739 access tokens to RS (cf. Section 5.8.1). 741 Unauthorized Resource Request messages MUST be denied with a client 742 error response. In this response, the Resource Server SHOULD provide 743 proper AS Request Creation Hints to enable the Client to request an 744 access token from RS's AS as described in Section 5.1.2. 746 The handling of all client requests (including unauthorized ones) by 747 the RS is described in Section 5.8.2. 749 5.1.2. AS Request Creation Hints 751 The AS Request Creation Hints message is sent by RS as a response to 752 an Unauthorized Resource Request message (see Section 5.1.1) to help 753 the sender of the Unauthorized Resource Request message in acquiring 754 a valid access token. The AS Request Creation Hints message is CBOR 755 map, with a MANDATORY element "AS" specifying an absolute URI (see 756 Section 4.3 of [RFC3986]) that identifies the AS in charge of RS. 758 The message can also contain the following OPTIONAL parameters: 760 o A "audience" element containing a suggested audience that the 761 client should request towards the AS. 763 o A "kid" element containing the key identifier of a key used in an 764 existing security association between the client and the RS. The 765 RS expects the client to request an access token bound to this 766 key, in order to avoid having to re-establish the security 767 association. 769 o A "cnonce" element containing a client-nonce. See 770 Section 5.1.2.1. 772 o A "scope" element containing the suggested scope that the client 773 should request towards the AS. 775 Figure 2 summarizes the parameters that may be part of the AS Request 776 Creation Hints. 778 /-----------+----------+---------------------\ 779 | Name | CBOR Key | Value Type | 780 |-----------+----------+---------------------| 781 | AS | 1 | text string | 782 | kid | 2 | byte string | 783 | audience | 5 | text string | 784 | scope | 9 | text or byte string | 785 | cnonce | 39 | byte string | 786 \-----------+----------+---------------------/ 788 Figure 2: AS Request Creation Hints 790 Note that the schema part of the AS parameter may need to be adapted 791 to the security protocol that is used between the client and the AS. 792 Thus the example AS value "coap://as.example.com/token" might need to 793 be transformed to "coaps://as.example.com/token". It is assumed that 794 the client can determine the correct schema part on its own depending 795 on the way it communicates with the AS. 797 Figure 3 shows an example for an AS Request Creation Hints message 798 payload using CBOR [RFC7049] diagnostic notation, using the parameter 799 names instead of the CBOR keys for better human readability. 801 4.01 Unauthorized 802 Content-Format: application/ace+cbor 803 Payload : 804 { 805 "AS" : "coaps://as.example.com/token", 806 "audience" : "coaps://rs.example.com" 807 "scope" : "rTempC", 808 "cnonce" : h'e0a156bb3f' 809 } 811 Figure 3: AS Request Creation Hints payload example 813 In this example, the attribute AS points the receiver of this message 814 to the URI "coaps://as.example.com/token" to request access 815 permissions. The originator of the AS Request Creation Hints payload 816 (i.e., RS) uses a local clock that is loosely synchronized with a 817 time scale common between RS and AS (e.g., wall clock time). 818 Therefore, it has included a parameter "nonce" (see Section 5.1.2.1). 820 Figure 4 illustrates the mandatory to use binary encoding of the 821 message payload shown in Figure 3. 823 a4 # map(4) 824 01 # unsigned(1) (=AS) 825 78 1c # text(28) 826 636f6170733a2f2f61732e657861 827 6d706c652e636f6d2f746f6b656e # "coaps://as.example.com/token" 828 05 # unsigned(5) (=audience) 829 76 # text(22) 830 636f6170733a2f2f72732e657861 831 6d706c652e636f6d # "coaps://rs.example.com" 832 09 # unsigned(9) (=scope) 833 66 # text(6) 834 7254656d7043 # "rTempC" 835 18 27 # unsigned(39) (=cnonce) 836 45 # bytes(5) 837 e0a156bb3f # "\xE0\xA1V\xBB?" 839 Figure 4: AS Request Creation Hints example encoded in CBOR 841 5.1.2.1. The Client-Nonce Parameter 843 If the RS does not synchronize its clock with the AS, it could be 844 tricked into accepting old access tokens, that are either expired or 845 have been compromised. In order to ensure some level of token 846 freshness in that case, the RS can use the "cnonce" (client-nonce) 847 parameter. The processing requirements for this parameter are as 848 follows: 850 o A RS sending a "cnonce" parameter in an an AS Request Creation 851 Hints message MUST store information to validate that a given 852 cnonce is fresh. How this is implemented internally is out of 853 scope for this specification. Expiration of client-nonces should 854 be based roughly on the time it would take a client to obtain an 855 access token after receiving the AS Request Creation Hints 856 message. 858 o A client receiving a "cnonce" parameter in an AS Request Creation 859 Hints message MUST include this in the parameters when requesting 860 an access token at the AS, using the "cnonce" parameter from 861 Section 5.6.4.4. 863 o If an AS grants an access token request containing a "cnonce" 864 parameter, it MUST include this value in the access token, using 865 the "cnonce" claim specified in Section 5.8. 867 o A RS that is using the client-nonce mechanism and that receives an 868 access token MUST verify that this token contains a cnonce claim, 869 with a client-nonce value that is fresh according to the 870 information stored at the first step above. If the cnonce claim 871 is not present or if the cnonce claim value is not fresh, it MUST 872 discard the access token. If this was an interaction with the 873 authz-info endpoint the RS MUST also respond with an error message 874 using a response code equivalent to the CoAP code 4.01 875 (Unauthorized). 877 5.2. Authorization Grants 879 To request an access token, the client obtains authorization from the 880 resource owner or uses its client credentials as grant. The 881 authorization is expressed in the form of an authorization grant. 883 The OAuth framework [RFC6749] defines four grant types. The grant 884 types can be split up into two groups, those granted on behalf of the 885 resource owner (password, authorization code, implicit) and those for 886 the client (client credentials). Further grant types have been added 887 later, such as [RFC7521] defining an assertion-based authorization 888 grant. 890 The grant type is selected depending on the use case. In cases where 891 the client acts on behalf of the resource owner, authorization code 892 grant is recommended. If the client acts on behalf of the resource 893 owner, but does not have any display or very limited interaction 894 possibilities it is recommended to use the device code grant defined 895 in [I-D.ietf-oauth-device-flow]. In cases where the client does not 896 acts autonomously the client credentials grant is recommended. 898 For details on the different grant types, see section 1.3 of 899 [RFC6749]. The OAuth 2.0 framework provides an extension mechanism 900 for defining additional grant types so profiles of this framework MAY 901 define additional grant types, if needed. 903 5.3. Client Credentials 905 Authentication of the client is mandatory independent of the grant 906 type when requesting the access token from the token endpoint. In 907 the case of client credentials grant type, the authentication and 908 grant coincide. 910 Client registration and provisioning of client credentials to the 911 client is out of scope for this specification. 913 The OAuth framework defines one client credential type in section 914 2.3.1 of [RFC6749]: client id and client secret. 915 [I-D.erdtman-ace-rpcc] adds raw-public-key and pre-shared-key to the 916 client credentials types. Profiles of this framework MAY extend with 917 additional client credentials client certificates. 919 5.4. AS Authentication 921 Client credential does not, by default, authenticate the AS that the 922 client connects to. In classic OAuth, the AS is authenticated with a 923 TLS server certificate. 925 Profiles of this framework MUST specify how clients authenticate the 926 AS and how communication security is implemented, otherwise server 927 side TLS certificates, as defined by OAuth 2.0, are required. 929 5.5. The Authorization Endpoint 931 The authorization endpoint is used to interact with the resource 932 owner and obtain an authorization grant in certain grant flows. The 933 primary use case for this framework is machine-to-machine 934 interactions, not involving the resource owner in the authorization 935 flow, therefore this endpoint is out of scope here. Future profiles 936 may define constrained adaptation mechanisms for this endpoint as 937 well. Non-constrained clients interacting with constrained resource 938 servers can use the specifications in section 3.1 of [RFC6749] and of 939 section 4.2 of [RFC6819]. 941 5.6. The Token Endpoint 943 In standard OAuth 2.0, the AS provides the token endpoint for 944 submitting access token requests. This framework extends the 945 functionality of the token endpoint, giving the AS the possibility to 946 help the client and RS to establish shared keys or to exchange their 947 public keys. Furthermore, this framework defines encodings using 948 CBOR, as a substitute for JSON. 950 The endpoint may, however, be exposed over HTTPS as in classical 951 OAuth or even other transports. A profile MUST define the details of 952 the mapping between the fields described below, and these transports. 953 If HTTPS is used, JSON or CBOR payloads may be supported. If JSON 954 payloads are used, the semantics of Section 4 of the OAuth 2.0 955 specification MUST be followed (with additions as described below). 956 If CBOR payload is supported, the semantics described below MUST be 957 followed. 959 For the AS to be able to issue a token, the client MUST be 960 authenticated and present a valid grant for the scopes requested. 961 Profiles of this framework MUST specify how the AS authenticates the 962 client and how the communication between client and AS is protected. 964 The default name of this endpoint in an url-path is '/token', however 965 implementations are not required to use this name and can define 966 their own instead. 968 The figures of this section use CBOR diagnostic notation without the 969 integer abbreviations for the parameters or their values for 970 illustrative purposes. Note that implementations MUST use the 971 integer abbreviations and the binary CBOR encoding, if the CBOR 972 encoding is used. 974 5.6.1. Client-to-AS Request 976 The client sends a POST request to the token endpoint at the AS. The 977 profile MUST specify how the communication is protected. The content 978 of the request consists of the parameters specified in the relevant 979 subsection of section 4 of the OAuth 2.0 specification [RFC6749], 980 depending on the grant type with the following exceptions and 981 additions: 983 o The parameter "grant_type" is OPTIONAL in the context of this 984 framework (as opposed to REQUIRED in RFC6749). If that parameter 985 is missing, the default value "client_credentials" is implied. 987 o The "audience" parameter from [I-D.ietf-oauth-token-exchange] is 988 OPTIONAL to request an access token bound to a specific audience. 990 o The "cnonce" parameter defined in Section 5.6.4.4 is REQUIRED if 991 the RS provided a client-nonce in the "AS Request Creation Hints" 992 message Section 5.1.2 994 o The "scope" parameter MAY be encoded as a byte string instead of 995 the string encoding specified in section 3.3 of [RFC6749], in 996 order allow compact encoding of complex scopes. 998 o A client MUST be able to use the parameters from 999 [I-D.ietf-ace-oauth-params] in an access token request to the 1000 token endpoint and the AS MUST be able to process these additional 1001 parameters. 1003 If CBOR is used then these parameters MUST be encoded as a CBOR map. 1005 When HTTP is used as a transport then the client makes a request to 1006 the token endpoint by sending the parameters using the "application/ 1007 x-www-form-urlencoded" format with a character encoding of UTF-8 in 1008 the HTTP request entity-body, as defined in section 3.2 of [RFC6749]. 1010 The following examples illustrate different types of requests for 1011 proof-of-possession tokens. 1013 Figure 5 shows a request for a token with a symmetric proof-of- 1014 possession key. The content is displayed in CBOR diagnostic 1015 notation, without abbreviations for better readability. 1017 Header: POST (Code=0.02) 1018 Uri-Host: "as.example.com" 1019 Uri-Path: "token" 1020 Content-Format: "application/ace+cbor" 1021 Payload: 1022 { 1023 "client_id" : "myclient", 1024 "audience" : "tempSensor4711" 1025 } 1027 Figure 5: Example request for an access token bound to a symmetric 1028 key. 1030 Figure 6 shows a request for a token with an asymmetric proof-of- 1031 possession key. Note that in this example OSCORE 1032 [I-D.ietf-core-object-security] is used to provide object-security, 1033 therefore the Content-Format is "application/oscore" wrapping the 1034 "application/ace+cbor" type content. Also note that in this example 1035 the audience is implicitly known by both client and AS. Furthermore 1036 note that this example uses the "req_cnf" parameter from 1037 [I-D.ietf-ace-oauth-params]. 1039 Header: POST (Code=0.02) 1040 Uri-Host: "as.example.com" 1041 Uri-Path: "token" 1042 OSCORE: 0x19, 0x05, 0x05, 0x44, 0x61, 0x6c, 0x65, 0x6b 1043 Content-Format: "application/oscore" 1044 Payload: 1045 0x44025d1 ... (full payload omitted for brevity) ... 68b3825e 1047 Decrypted payload: 1048 { 1049 "client_id" : "myclient", 1050 "req_cnf" : { 1051 "COSE_Key" : { 1052 "kty" : "EC", 1053 "kid" : h'11', 1054 "crv" : "P-256", 1055 "x" : b64'usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8', 1056 "y" : b64'IBOL+C3BttVivg+lSreASjpkttcsz+1rb7btKLv8EX4' 1057 } 1058 } 1059 } 1061 Figure 6: Example token request bound to an asymmetric key. 1063 Figure 7 shows a request for a token where a previously communicated 1064 proof-of-possession key is only referenced. Note that the client 1065 performs a password based authentication in this example by 1066 submitting its client_secret (see Section 2.3.1 of [RFC6749]). Note 1067 that this example uses the "req_cnf" parameter from 1068 [I-D.ietf-ace-oauth-params]. 1070 Header: POST (Code=0.02) 1071 Uri-Host: "as.example.com" 1072 Uri-Path: "token" 1073 Content-Format: "application/ace+cbor" 1074 Payload: 1075 { 1076 "client_id" : "myclient", 1077 "client_secret" : "mysecret234", 1078 "audience" : "valve424", 1079 "scope" : "read", 1080 "req_cnf" : { 1081 "kid" : b64'6kg0dXJM13U' 1082 } 1083 } 1085 Figure 7: Example request for an access token bound to a key 1086 reference. 1088 Refresh tokens are typically not stored as securely as proof-of- 1089 possession keys in requesting clients. Proof-of-possession based 1090 refresh token requests MUST NOT request different proof-of-possession 1091 keys or different audiences in token requests. Refresh token 1092 requests can only use to request access tokens bound to the same 1093 proof-of-possession key and the same audience as access tokens issued 1094 in the initial token request. 1096 5.6.2. AS-to-Client Response 1098 If the access token request has been successfully verified by the AS 1099 and the client is authorized to obtain an access token corresponding 1100 to its access token request, the AS sends a response with the 1101 response code equivalent to the CoAP response code 2.01 (Created). 1102 If client request was invalid, or not authorized, the AS returns an 1103 error response as described in Section 5.6.3. 1105 Note that the AS decides which token type and profile to use when 1106 issuing a successful response. It is assumed that the AS has prior 1107 knowledge of the capabilities of the client and the RS (see 1108 Appendix D). This prior knowledge may, for example, be set by the 1109 use of a dynamic client registration protocol exchange [RFC7591]. 1111 The content of the successful reply is the Access Information. When 1112 using CBOR payloads, the content MUST be encoded as CBOR map, 1113 containing parameters as specified in Section 5.1 of [RFC6749], with 1114 the following additions and changes: 1116 profile: 1117 OPTIONAL. This indicates the profile that the client MUST use 1118 towards the RS. See Section 5.6.4.3 for the formatting of this 1119 parameter. If this parameter is absent, the AS assumes that the 1120 client implicitly knows which profile to use towards the RS. 1122 token_type: 1123 This parameter is OPTIONAL, as opposed to 'required' in [RFC6749]. 1124 By default implementations of this framework SHOULD assume that 1125 the token_type is "pop". If a specific use case requires another 1126 token_type (e.g., "Bearer") to be used then this parameter is 1127 REQUIRED. 1129 Furthermore [I-D.ietf-ace-oauth-params] defines additional parameters 1130 that the AS MUST be able to use when responding to a request to the 1131 token endpoint. 1133 Figure 8 summarizes the parameters that may be part of the Access 1134 Information. This does not include the additional parameters 1135 specified in [I-D.ietf-ace-oauth-params]. 1137 /-------------------+-------------------------------\ 1138 | Parameter name | Specified in | 1139 |-------------------+-------------------------------| 1140 | access_token | RFC 6749 | 1141 | token_type | RFC 6749 | 1142 | expires_in | RFC 6749 | 1143 | refresh_token | RFC 6749 | 1144 | scope | RFC 6749 | 1145 | state | RFC 6749 | 1146 | error | RFC 6749 | 1147 | error_description | RFC 6749 | 1148 | error_uri | RFC 6749 | 1149 | profile | [this document] | 1150 \-------------------+-------------------------------/ 1152 Figure 8: Access Information parameters 1154 Figure 9 shows a response containing a token and a "cnf" parameter 1155 with a symmetric proof-of-possession key, which is defined in 1156 [I-D.ietf-ace-oauth-params]. 1158 Header: Created (Code=2.01) 1159 Content-Format: "application/ace+cbor" 1160 Payload: 1161 { 1162 "access_token" : b64'SlAV32hkKG ... 1163 (remainder of CWT omitted for brevity; 1164 CWT contains COSE_Key in the "cnf" claim)', 1165 "profile" : "coap_dtls", 1166 "expires_in" : "3600", 1167 "cnf" : { 1168 "COSE_Key" : { 1169 "kty" : "Symmetric", 1170 "kid" : b64'39Gqlw', 1171 "k" : b64'hJtXhkV8FJG+Onbc6mxCcQh' 1172 } 1173 } 1174 } 1176 Figure 9: Example AS response with an access token bound to a 1177 symmetric key. 1179 5.6.3. Error Response 1181 The error responses for CoAP-based interactions with the AS are 1182 equivalent to the ones for HTTP-based interactions as defined in 1183 Section 5.2 of [RFC6749], with the following differences: 1185 o When using CBOR the raw payload before being processed by the 1186 communication security protocol MUST be encoded as a CBOR map. 1188 o A response code equivalent to the CoAP code 4.00 (Bad Request) 1189 MUST be used for all error responses, except for invalid_client 1190 where a response code equivalent to the CoAP code 4.01 1191 (Unauthorized) MAY be used under the same conditions as specified 1192 in Section 5.2 of [RFC6749]. 1194 o The content type (for CoAP-based interactions) or media type (for 1195 HTTP-based interactions) "application/ace+cbor" MUST be used for 1196 the error response. 1198 o The parameters "error", "error_description" and "error_uri" MUST 1199 be abbreviated using the codes specified in Figure 12, when a CBOR 1200 encoding is used. 1202 o The error code (i.e., value of the "error" parameter) MUST be 1203 abbreviated as specified in Figure 10, when a CBOR encoding is 1204 used. 1206 /------------------------+-------------\ 1207 | Name | CBOR Values | 1208 |------------------------+-------------| 1209 | invalid_request | 1 | 1210 | invalid_client | 2 | 1211 | invalid_grant | 3 | 1212 | unauthorized_client | 4 | 1213 | unsupported_grant_type | 5 | 1214 | invalid_scope | 6 | 1215 | unsupported_pop_key | 7 | 1216 | incompatible_profiles | 8 | 1217 \------------------------+-------------/ 1219 Figure 10: CBOR abbreviations for common error codes 1221 In addition to the error responses defined in OAuth 2.0, the 1222 following behavior MUST be implemented by the AS: 1224 o If the client submits an asymmetric key in the token request that 1225 the RS cannot process, the AS MUST reject that request with a 1226 response code equivalent to the CoAP code 4.00 (Bad Request) 1227 including the error code "unsupported_pop_key" defined in 1228 Figure 10. 1230 o If the client and the RS it has requested an access token for do 1231 not share a common profile, the AS MUST reject that request with a 1232 response code equivalent to the CoAP code 4.00 (Bad Request) 1233 including the error code "incompatible_profiles" defined in 1234 Figure 10. 1236 5.6.4. Request and Response Parameters 1238 This section provides more detail about the new parameters that can 1239 be used in access token requests and responses, as well as 1240 abbreviations for more compact encoding of existing parameters and 1241 common parameter values. 1243 5.6.4.1. Grant Type 1245 The abbreviations in Figure 11 MUST be used in CBOR encodings instead 1246 of the string values defined in [RFC6749], if CBOR payloads are used. 1248 /--------------------+------------+------------------------\ 1249 | Name | CBOR Value | Original Specification | 1250 |--------------------+------------+------------------------| 1251 | password | 0 | RFC6749 | 1252 | authorization_code | 1 | RFC6749 | 1253 | client_credentials | 2 | RFC6749 | 1254 | refresh_token | 3 | RFC6749 | 1255 \--------------------+------------+------------------------/ 1257 Figure 11: CBOR abbreviations for common grant types 1259 5.6.4.2. Token Type 1261 The "token_type" parameter, defined in section 5.1 of [RFC6749], 1262 allows the AS to indicate to the client which type of access token it 1263 is receiving (e.g., a bearer token). 1265 This document registers the new value "pop" for the OAuth Access 1266 Token Types registry, specifying a proof-of-possession token. How 1267 the proof-of-possession by the client to the RS is performed MUST be 1268 specified by the profiles. 1270 The values in the "token_type" parameter MUST be CBOR text strings, 1271 if a CBOR encoding is used. 1273 In this framework the "pop" value for the "token_type" parameter is 1274 the default. The AS may, however, provide a different value. 1276 5.6.4.3. Profile 1278 Profiles of this framework MUST define the communication protocol and 1279 the communication security protocol between the client and the RS. 1280 The security protocol MUST provide encryption, integrity and replay 1281 protection. It MUST also provide a binding between requests and 1282 responses. Furthermore profiles MUST define proof-of-possession 1283 methods, if they support proof-of-possession tokens. 1285 A profile MUST specify an identifier that MUST be used to uniquely 1286 identify itself in the "profile" parameter. The textual 1287 representation of the profile identifier is just intended for human 1288 readability and MUST NOT be used in parameters and claims. 1290 Profiles MAY define additional parameters for both the token request 1291 and the Access Information in the access token response in order to 1292 support negotiation or signaling of profile specific parameters. 1294 5.6.4.4. Client-Nonce 1296 This parameter MUST be sent from the client to the AS, if it 1297 previously received a "cnonce" parameter in the AS Request Creation 1298 Hints Section 5.1.2. The parameter is encoded as a byte string and 1299 copies the value from the cnonce parameter in the AS Request Creation 1300 Hints. 1302 5.6.5. Mapping Parameters to CBOR 1304 If CBOR encoding is used, all OAuth parameters in access token 1305 requests and responses MUST be mapped to CBOR types as specified in 1306 Figure 12, using the given integer abbreviation for the map keys. 1308 Note that we have aligned the abbreviations corresponding to claims 1309 with the abbreviations defined in [RFC8392]. 1311 Note also that abbreviations from -24 to 23 have a 1 byte encoding 1312 size in CBOR. We have thus chosen to assign abbreviations in that 1313 range to parameters we expect to be used most frequently in 1314 constrained scenarios. 1316 /-------------------+----------+---------------------\ 1317 | Name | CBOR Key | Value Type | 1318 |-------------------+----------+---------------------| 1319 | access_token | 1 | byte string | 1320 | expires_in | 2 | unsigned integer | 1321 | audience | 5 | text string | 1322 | scope | 9 | text or byte string | 1323 | client_id | 24 | text string | 1324 | client_secret | 25 | byte string | 1325 | response_type | 26 | text string | 1326 | redirect_uri | 27 | text string | 1327 | state | 28 | text string | 1328 | code | 29 | byte string | 1329 | error | 30 | unsigned integer | 1330 | error_description | 31 | text string | 1331 | error_uri | 32 | text string | 1332 | grant_type | 33 | unsigned integer | 1333 | token_type | 34 | unsigned integer | 1334 | username | 35 | text string | 1335 | password | 36 | text string | 1336 | refresh_token | 37 | byte string | 1337 | profile | 38 | unsigned integer | 1338 | cnonce | 39 | byte string | 1339 \-------------------+----------+---------------------/ 1341 Figure 12: CBOR mappings used in token requests 1343 5.7. The Introspection Endpoint 1345 Token introspection [RFC7662] can be OPTIONALLY provided by the AS, 1346 and is then used by the RS and potentially the client to query the AS 1347 for metadata about a given token, e.g., validity or scope. Analogous 1348 to the protocol defined in [RFC7662] for HTTP and JSON, this section 1349 defines adaptations to more constrained environments using CBOR and 1350 leaving the choice of the application protocol to the profile. 1352 Communication between the requesting entity and the introspection 1353 endpoint at the AS MUST be integrity protected and encrypted. The 1354 communication security protocol MUST also provide a binding between 1355 requests and responses. Furthermore the two interacting parties MUST 1356 perform mutual authentication. Finally the AS SHOULD verify that the 1357 requesting entity has the right to access introspection information 1358 about the provided token. Profiles of this framework that support 1359 introspection MUST specify how authentication and communication 1360 security between the requesting entity and the AS is implemented. 1362 The default name of this endpoint in an url-path is '/introspect', 1363 however implementations are not required to use this name and can 1364 define their own instead. 1366 The figures of this section uses CBOR diagnostic notation without the 1367 integer abbreviations for the parameters or their values for better 1368 readability. 1370 Note that supporting introspection is OPTIONAL for implementations of 1371 this framework. 1373 5.7.1. Introspection Request 1375 The requesting entity sends a POST request to the introspection 1376 endpoint at the AS, the profile MUST specify how the communication is 1377 protected. If CBOR is used, the payload MUST be encoded as a CBOR 1378 map with a "token" entry containing either the access token or a 1379 reference to the token (e.g., the cti). Further optional parameters 1380 representing additional context that is known by the requesting 1381 entity to aid the AS in its response MAY be included. 1383 For CoAP-based interaction, all messages MUST use the content type 1384 "application/ace+cbor", while for HTTP-based interactions the 1385 equivalent media type "application/ace+cbor" MUST be used. 1387 The same parameters are required and optional as in Section 2.1 of 1388 [RFC7662]. 1390 For example, Figure 13 shows a RS calling the token introspection 1391 endpoint at the AS to query about an OAuth 2.0 proof-of-possession 1392 token. Note that object security based on OSCORE 1393 [I-D.ietf-core-object-security] is assumed in this example, therefore 1394 the Content-Format is "application/oscore". Figure 14 shows the 1395 decoded payload. 1397 Header: POST (Code=0.02) 1398 Uri-Host: "as.example.com" 1399 Uri-Path: "introspect" 1400 OSCORE: 0x09, 0x05, 0x25 1401 Content-Format: "application/oscore" 1402 Payload: 1403 ... COSE content ... 1405 Figure 13: Example introspection request. 1407 { 1408 "token" : b64'7gj0dXJQ43U', 1409 "token_type_hint" : "pop" 1410 } 1412 Figure 14: Decoded token. 1414 5.7.2. Introspection Response 1416 If the introspection request is authorized and successfully 1417 processed, the AS sends a response with the response code equivalent 1418 to the CoAP code 2.01 (Created). If the introspection request was 1419 invalid, not authorized or couldn't be processed the AS returns an 1420 error response as described in Section 5.7.3. 1422 In a successful response, the AS encodes the response parameters in a 1423 map including with the same required and optional parameters as in 1424 Section 2.2 of [RFC7662] with the following addition: 1426 profile OPTIONAL. This indicates the profile that the RS MUST use 1427 with the client. See Section 5.6.4.3 for more details on the 1428 formatting of this parameter. 1430 cnonce OPTIONAL. A client-nonce previously provided to the AS by 1431 the RS via the client. See Section 5.6.4.4. 1433 exi OPTIONAL. The "expires-in" claim associated to this access 1434 token. See Section 5.8.3. 1436 Furthermore [I-D.ietf-ace-oauth-params] defines more parameters that 1437 the AS MUST be able to use when responding to a request to the 1438 introspection endpoint. 1440 For example, Figure 15 shows an AS response to the introspection 1441 request in Figure 13. Note that this example contains the "cnf" 1442 parameter defined in [I-D.ietf-ace-oauth-params]. 1444 Header: Created (Code=2.01) 1445 Content-Format: "application/ace+cbor" 1446 Payload: 1447 { 1448 "active" : true, 1449 "scope" : "read", 1450 "profile" : "coap_dtls", 1451 "cnf" : { 1452 "COSE_Key" : { 1453 "kty" : "Symmetric", 1454 "kid" : b64'39Gqlw', 1455 "k" : b64'hJtXhkV8FJG+Onbc6mxCcQh' 1456 } 1457 } 1458 } 1460 Figure 15: Example introspection response. 1462 5.7.3. Error Response 1464 The error responses for CoAP-based interactions with the AS are 1465 equivalent to the ones for HTTP-based interactions as defined in 1466 Section 2.3 of [RFC7662], with the following differences: 1468 o If content is sent and CBOR is used the payload MUST be encoded as 1469 a CBOR map and the Content-Format "application/ace+cbor" MUST be 1470 used. 1472 o If the credentials used by the requesting entity (usually the RS) 1473 are invalid the AS MUST respond with the response code equivalent 1474 to the CoAP code 4.01 (Unauthorized) and use the required and 1475 optional parameters from Section 5.2 in [RFC6749]. 1477 o If the requesting entity does not have the right to perform this 1478 introspection request, the AS MUST respond with a response code 1479 equivalent to the CoAP code 4.03 (Forbidden). In this case no 1480 payload is returned. 1482 o The parameters "error", "error_description" and "error_uri" MUST 1483 be abbreviated using the codes specified in Figure 12. 1485 o The error codes MUST be abbreviated using the codes specified in 1486 Figure 10. 1488 Note that a properly formed and authorized query for an inactive or 1489 otherwise invalid token does not warrant an error response by this 1490 specification. In these cases, the authorization server MUST instead 1491 respond with an introspection response with the "active" field set to 1492 "false". 1494 5.7.4. Mapping Introspection parameters to CBOR 1496 If CBOR is used, the introspection request and response parameters 1497 MUST be mapped to CBOR types as specified in Figure 16, using the 1498 given integer abbreviation for the map key. 1500 Note that we have aligned abbreviations that correspond to a claim 1501 with the abbreviations defined in [RFC8392] and the abbreviations of 1502 parameters with the same name from Section 5.6.5. 1504 /-------------------+----------+-------------------------\ 1505 | Parameter name | CBOR Key | Value Type | 1506 |-------------------+----------+-------------------------| 1507 | iss | 1 | text string | 1508 | sub | 2 | text string | 1509 | aud | 3 | text string | 1510 | exp | 4 | integer or | 1511 | | | floating-point number | 1512 | nbf | 5 | integer or | 1513 | | | floating-point number | 1514 | iat | 6 | integer or | 1515 | | | floating-point number | 1516 | cti | 7 | byte string | 1517 | scope | 9 | text or byte string | 1518 | active | 10 | True or False | 1519 | token | 11 | byte string | 1520 | client_id | 24 | text string | 1521 | error | 30 | unsigned integer | 1522 | error_description | 31 | text string | 1523 | error_uri | 32 | text string | 1524 | token_type_hint | 33 | text string | 1525 | token_type | 34 | text string | 1526 | username | 35 | text string | 1527 | profile | 38 | unsigned integer | 1528 | cnonce | 39 | byte string | 1529 | exi | 40 | unsigned integer | 1530 \-------------------+----------+-------------------------/ 1532 Figure 16: CBOR Mappings to Token Introspection Parameters. 1534 5.8. The Access Token 1536 This framework RECOMMENDS the use of CBOR web token (CWT) as 1537 specified in [RFC8392]. 1539 In order to facilitate offline processing of access tokens, this 1540 document uses the "cnf" claim from 1541 [I-D.ietf-ace-cwt-proof-of-possession] and specifies the "scope" 1542 claim for JWT- and CWT-encoded tokens. 1544 The "scope" claim explicitly encodes the scope of a given access 1545 token. This claim follows the same encoding rules as defined in 1546 Section 3.3 of [RFC6749], but in addition implementers MAY use byte 1547 strings as scope values, to achieve compact encoding of large scope 1548 elements. The meaning of a specific scope value is application 1549 specific and expected to be known to the RS running that application. 1551 If the AS needs to convey a hint to the RS about which profile it 1552 should use to communicate with the client, the AS MAY include a 1553 "profile" claim in the access token, with the same syntax and 1554 semantics as defined in Section 5.6.4.3. 1556 If the client submitted a client-nonce parameter in the access token 1557 request Section 5.6.4.4, the AS MUST include the value of this 1558 parameter in the "cnonce" claim specified here. The "cnonce" claim 1559 uses binary encoding. 1561 5.8.1. The Authorization Information Endpoint 1563 The access token, containing authorization information and 1564 information about the key used by the client, needs to be transported 1565 to the RS so that the RS can authenticate and authorize the client 1566 request. 1568 This section defines a method for transporting the access token to 1569 the RS using a RESTful protocol such as CoAP. Profiles of this 1570 framework MAY define other methods for token transport. 1572 The method consists of an authz-info endpoint, implemented by the RS. 1573 A client using this method MUST make a POST request to the authz-info 1574 endpoint at the RS with the access token in the payload. The RS 1575 receiving the token MUST verify the validity of the token. If the 1576 token is valid, the RS MUST respond to the POST request with 2.01 1577 (Created). Section Section 5.8.1.1 outlines how an RS MUST proceed 1578 to verify the validity of an access token. 1580 The RS MUST be prepared to store at least one access token for future 1581 use. This is a difference to how access tokens are handled in OAuth 1582 2.0, where the access token is typically sent along with each 1583 request, and therefore not stored at the RS. 1585 This specification RECOMMENDS that an RS stores only one token per 1586 proof-of-possession key, meaning that an additional token linked to 1587 the same key will overwrite any existing token at the RS. 1589 If the payload sent to the authz-info endpoint does not parse to a 1590 token, the RS MUST respond with a response code equivalent to the 1591 CoAP code 4.00 (Bad Request). 1593 The RS MAY make an introspection request to validate the token before 1594 responding to the POST request to the authz-info endpoint. 1596 Profiles MUST specify whether the authz-info endpoint is protected, 1597 including whether error responses from this endpoint are protected. 1598 Note that since the token contains information that allow the client 1599 and the RS to establish a security context in the first place, mutual 1600 authentication may not be possible at this point. 1602 The default name of this endpoint in an url-path is '/authz-info', 1603 however implementations are not required to use this name and can 1604 define their own instead. 1606 A RS MAY use introspection on a token received through the authz-info 1607 endpoint, e.g. if the token is an opaque reference. Some transport 1608 protocols may provide a way to indicate that the RS is busy and the 1609 client should retry after an interval; this type of status update 1610 would be appropriate while the RS is waiting for an introspection 1611 response. 1613 5.8.1.1. Verifying an Access Token 1615 When an RS receives an access token, it MUST verify it before storing 1616 it. The details of token verification depends on various aspects, 1617 including the token encoding, the type of token, the security 1618 protection applied to the token, and the claims. The token encoding 1619 matters since the security wrapper differs between the token 1620 encodings. For example, a CWT token uses COSE while a JWT token uses 1621 JOSE. The type of token also has an influence on the verification 1622 procedure since tokens may be self-contained whereby token 1623 verification may happen locally at the RS while a token-by-reference 1624 requires further interaction with the authorization server, for 1625 example using token introspection, to obtain the claims associated 1626 with the token reference. Self-contained token MUST, at a minimum, 1627 be integrity protected but they MAY also be encrypted. 1629 For self-contained tokens the RS MUST process the security protection 1630 of the token first, as specified by the respective token format. For 1631 CWT the description can be found in [RFC8392] and for JWT the 1632 relevant specification is [RFC7519]. This MUST include a 1633 verification that security protection (and thus the token) was 1634 generated by an AS that has the right to issue access tokens for this 1635 RS. 1637 In case the token is communicated by reference the RS needs to obtain 1638 the claims first. When the RS uses token introspection the relevant 1639 specification is [RFC7662] with CoAP transport specified in 1640 Section 5.7. 1642 Errors may happen during this initial processing stage: 1644 o If token or claim verification fails, the RS MUST discard the 1645 token and, if this was an interaction with authz-info, return an 1646 error message with a response code equivalent to the CoAP code 1647 4.01 (Unauthorized). 1649 o If the claims cannot be obtained the RS MUST discard the token 1650 and, in case of an interaction via the authz-info endpoint, return 1651 an error message with a response code equivalent to the CoAP code 1652 4.00 (Bad Request). 1654 Next, the RS MUST verify claims, if present, contained in the access 1655 token. Errors are returned when claim checks fail, in the order of 1656 priority of this list: 1658 iss The issuer claim must identify an AS that has the authority to 1659 issue access tokens for the receiving RS. If that is not the case 1660 the RS MUST discard the token. If this was an interaction with 1661 authz-info, the RS MUST also respond with a response code 1662 equivalent to the CoAP code 4.01 (Unauthorized). 1664 exp The expiration date must be in the future. If that is not the 1665 case the RS MUST discard the token. If this was an interaction 1666 with authz-info the RS MUST also respond with a response code 1667 equivalent to the CoAP code 4.01 (Unauthorized). Note that the RS 1668 has to terminate access rights to the protected resources at the 1669 time when the tokens expire. 1671 aud The audience claim must refer to an audience that the RS 1672 identifies with. If that is not the case the RS MUST discard the 1673 token. If this was an interaction with authz-info, the RS MUST 1674 also respond with a response code equivalent to the CoAP code 4.03 1675 (Forbidden). 1677 scope The RS must recognize value of the scope claim. If that is 1678 not the case the RS MUST discard the token. If this was an 1679 interaction with authz-info, the RS MUST also respond with a 1680 response code equivalent to the CoAP code 4.00 (Bad Request). The 1681 RS MAY provide additional information in the error response, to 1682 clarify what went wrong. 1684 If the access token contains any other claims that the RS cannot 1685 process the RS MUST discard the token. If this was an interaction 1686 with authz-info, the RS MUST also respond with a response code 1687 equivalent to the CoAP code 4.00 (Bad Request). The RS MAY provide 1688 additional detail in the error response to clarify which claim 1689 couldn't be processed. 1691 Note that the Subject (sub) claim cannot always be verified when the 1692 token is submitted to the RS since the client may not have 1693 authenticated yet. Also note that a counter for the expires_in (exi) 1694 claim MUST be initialized when the RS first verifies this token. 1696 Also note that profiles of this framework may define access token 1697 transport mechanisms that do not allow for error responses. 1698 Therefore the error messages specified here only apply if the token 1699 was POSTed to the authz-info endpoint. 1701 When sending error responses, the RS MAY use the error codes from 1702 Section 3.1 of [RFC6750], to provide additional details to the 1703 client. 1705 5.8.1.2. Protecting the Authorization Information Endpoint 1707 As this framework can be used in RESTful environments, it is 1708 important to make sure that attackers cannot perform unauthorized 1709 requests on the auth-info endpoints, other than submitting access 1710 tokens. 1712 Specifically it SHOULD NOT be possible to perform GET, DELETE or PUT 1713 on the authz-info endpoint and on it's children (if any). 1715 The POST method SHOULD NOT be allowed on children of the authz-info 1716 endpoint. 1718 The RS SHOULD implement rate limiting measures to mitigate attacks 1719 aiming to overload the processing capacity of the RS by repeatedly 1720 submitting tokens. For CoAP-based communication the RS could use the 1721 mechanisms from [RFC8516] to indicate that it is overloaded. 1723 5.8.2. Client Requests to the RS 1725 Before sending a request to a RS, the client MUST verify that the 1726 keys used to protect this communication are still valid. See 1727 Section 5.8.4 for details on how the client determines the validity 1728 of the keys used. 1730 If an RS receives a request from a client, and the target resource 1731 requires authorization, the RS MUST first verify that it has an 1732 access token that authorizes this request, and that the client has 1733 performed the proof-of-possession for that token. 1735 The response code MUST be 4.01 (Unauthorized) in case the client has 1736 not performed the proof-of-possession, or if RS has no valid access 1737 token for the client. If RS has an access token for the client but 1738 not for the resource that was requested, RS MUST reject the request 1739 with a 4.03 (Forbidden). If RS has an access token for the client 1740 but it does not cover the action that was requested on the resource, 1741 RS MUST reject the request with a 4.05 (Method Not Allowed). 1743 Note: The use of the response codes 4.03 and 4.05 is intended to 1744 prevent infinite loops where a dumb Client optimistically tries to 1745 access a requested resource with any access token received from AS. 1746 As malicious clients could pretend to be C to determine C's 1747 privileges, these detailed response codes must be used only when a 1748 certain level of security is already available which can be achieved 1749 only when the Client is authenticated. 1751 Note: The RS MAY use introspection for timely validation of an access 1752 token, at the time when a request is presented. 1754 Note: Matching the claims of the access token (e.g., scope) to a 1755 specific request is application specific. 1757 If the request matches a valid token and the client has performed the 1758 proof-of-possession for that token, the RS continues to process the 1759 request as specified by the underlying application. 1761 5.8.3. Token Expiration 1763 Depending on the capabilities of the RS, there are various ways in 1764 which it can verify the expiration of a received access token. Here 1765 follows a list of the possibilities including what functionality they 1766 require of the RS. 1768 o The token is a CWT and includes an "exp" claim and possibly the 1769 "nbf" claim. The RS verifies these by comparing them to values 1770 from its internal clock as defined in [RFC7519]. In this case the 1771 RS's internal clock must reflect the current date and time, or at 1772 least be synchronized with the AS's clock. How this clock 1773 synchronization would be performed is out of scope for this 1774 specification. 1776 o The RS verifies the validity of the token by performing an 1777 introspection request as specified in Section 5.7. This requires 1778 the RS to have a reliable network connection to the AS and to be 1779 able to handle two secure sessions in parallel (C to RS and AS to 1780 RS). 1782 o In order to support token expiration for devices that have no 1783 reliable way of synchronizing their internal clocks, this 1784 specification defines the following approach: The claim "exi" 1785 ("expires in") can be used, to provide the RS with the lifetime of 1786 the token in seconds from the time the RS first receives the 1787 token. This approach is of course vulnerable to malicious clients 1788 holding back tokens they do not want to expire. Such an attack 1789 can only be prevented if the RS is able to communicate with the AS 1790 in some regular intervals, so that the can AS provide the RS with 1791 a list of expired tokens. The drawback of this mitigation is that 1792 the RS might as well use the communication with the AS to 1793 synchronize its internal clock. 1795 If a token that authorizes a long running request such as a CoAP 1796 Observe [RFC7641] expires, the RS MUST send an error response with 1797 the response code equivalent to the CoAP code 4.01 (Unauthorized) to 1798 the client and then terminate processing the long running request. 1800 5.8.4. Key Expiration 1802 The AS provides the client with key material that the RS uses. This 1803 can either be a common symmetric pop-key, or an asymmetric key used 1804 by the RS to authenticate towards the client. Since there is no 1805 metadata associated to those keys, the client has no way of knowing 1806 if these keys are still valid. This may lead to situations where the 1807 client sends requests containing sensitive information to the RS 1808 using a key that is expired and possibly in the hands of an attacker, 1809 or accepts responses from the RS that are not properly protected and 1810 could possibly have been forged by an attacker. 1812 In order to prevent this, the client must assume that those keys are 1813 only valid as long as the related access token is. Since the access 1814 token is opaque to the client, one of the following methods MUST be 1815 used to inform the client about the validity of an access token: 1817 o The client knows a default validity period for all tokens it is 1818 using. This information could be provisioned to the client when 1819 it is registered at the AS, or published by the AS in a way that 1820 the client can query. 1822 o The AS informs the client about the token validity using the 1823 "expires_in" parameter in the Access Information. 1825 o The client performs an introspection of the token. Although this 1826 is not explicitly forbidden, how exactly a client does 1827 introspection is not currently specified for OAuth. 1829 A client that is not able to obtain information about the expiration 1830 of a token MUST NOT use this token. 1832 6. Security Considerations 1834 Security considerations applicable to authentication and 1835 authorization in RESTful environments provided in OAuth 2.0 [RFC6749] 1836 apply to this work. Furthermore [RFC6819] provides additional 1837 security considerations for OAuth which apply to IoT deployments as 1838 well. If the introspection endpoint is used, the security 1839 considerations from [RFC7662] also apply. 1841 A large range of threats can be mitigated by protecting the contents 1842 of the access token by using a digital signature or a keyed message 1843 digest (MAC) or an Authenticated Encryption with Associated Data 1844 (AEAD) algorithm. Consequently, the token integrity protection MUST 1845 be applied to prevent the token from being modified, particularly 1846 since it contains a reference to the symmetric key or the asymmetric 1847 key. If the access token contains the symmetric key, this symmetric 1848 key MUST be encrypted by the authorization server so that only the 1849 resource server can decrypt it. Note that using an AEAD algorithm is 1850 preferable over using a MAC unless the message needs to be publicly 1851 readable. 1853 If the token is intended for multiple recipients (i.e. an audience 1854 that is a group), integrity protection of the token with a symmetric 1855 key is not sufficient, since any of the recipients could modify the 1856 token undetected by the other recipients. Therefore a token with a 1857 multi-recipient audience MUST be protected with an asymmetric 1858 signature. 1860 It is important for the authorization server to include the identity 1861 of the intended recipient (the audience), typically a single resource 1862 server (or a list of resource servers), in the token. Using a single 1863 shared secret with multiple resource servers to simplify key 1864 management is NOT RECOMMENDED since the benefit from using the proof- 1865 of-possession concept is significantly reduced. 1867 The authorization server MUST offer confidentiality protection for 1868 any interactions with the client. This step is extremely important 1869 since the client may obtain the proof-of-possession key from the 1870 authorization server for use with a specific access token. Not using 1871 confidentiality protection exposes this secret (and the access token) 1872 to an eavesdropper thereby completely negating proof-of-possession 1873 security. Profiles MUST specify how confidentiality protection is 1874 provided, and additional protection can be applied by encrypting the 1875 token, for example encryption of CWTs is specified in Section 5.1 of 1876 [RFC8392]. 1878 Developers MUST ensure that the ephemeral credentials (i.e., the 1879 private key or the session key) are not leaked to third parties. An 1880 adversary in possession of the ephemeral credentials bound to the 1881 access token will be able to impersonate the client. Be aware that 1882 this is a real risk with many constrained environments, since 1883 adversaries can often easily get physical access to the devices. 1884 This risk can also be mitigated to some extent by making sure that 1885 keys are refreshed more frequently. 1887 If clients are capable of doing so, they should frequently request 1888 fresh access tokens, as this allows the AS to keep the lifetime of 1889 the tokens short. This allows the AS to use shorter proof-of- 1890 possession key sizes, which translate to a performance benefit for 1891 the client and for the resource server. Shorter keys also lead to 1892 shorter messages (particularly with asymmetric keying material). 1894 When authorization servers bind symmetric keys to access tokens, they 1895 SHOULD scope these access tokens to a specific permission. 1897 6.1. Unprotected AS Request Creation Hints 1899 Initially, no secure channel exists to protect the communication 1900 between C and RS. Thus, C cannot determine if the AS Request 1901 Creation Hints contained in an unprotected response from RS to an 1902 unauthorized request (see Section 5.1.2) are authentic. It is 1903 therefore advisable to provide C with a (possibly hard-coded) list of 1904 trustworthy authorization servers. AS Request Creation Hints 1905 referring to a URI not listed there would be ignored. 1907 6.2. Minimal security requirements for communication 1909 This section summarizes the minimal requirements for the 1910 communication security of the different protocol interactions. 1912 C-AS All communication between the client and the Authorization 1913 Server MUST be encrypted, integrity and replay protected. 1914 Furthermore responses from the AS to the client MUST be bound to 1915 the client's request to avoid attacks where the attacker swaps the 1916 intended response for an older one valid for a previous request. 1917 This requires that the client and the Authorization Server have 1918 previously exchanged either a shared secret, or their public keys 1919 in order to negotiate a secure communication. Furthermore the 1920 client MUST be able to determine whether an AS has the authority 1921 to issue access tokens for a certain RS. This can be done through 1922 pre-configured lists, or through an online lookup mechanism that 1923 in turn also must be secured. 1925 RS-AS The communication between the Resource Server and the 1926 Authorization Server via the introspection endpoint MUST be 1927 encrypted, integrity and replay protected. Furthermore responses 1928 from the AS to the RS MUST be bound to the RS's request. This 1929 requires that the client and the Authorization Server have 1930 previously exchanged either a shared secret, or their public keys 1931 in order to negotiate a secure communication. Furthermore the RS 1932 MUST be able to determine whether an AS has the authority to issue 1933 access tokens itself. This is usually configured out of band, but 1934 could also be performed through an online lookup mechanism 1935 provided that it is also secured in the same way. 1937 C-RS The initial communication between the client and the Resource 1938 Server can not be secured in general, since the RS is not in 1939 possession of on access token for that client, which would carry 1940 the necessary parameters. Certain security mechanisms (e.g. DTLS 1941 with server-side authentication via a certificate or a raw public 1942 key) can be possible and are RECOMMEND if supported by both 1943 parties. After the client has successfully transmitted the access 1944 token to the RS, a secure communication protocol MUST be 1945 established between client and RS for the actual resource request. 1946 This protocol MUST provide encryption, integrity and replay 1947 protection as well as a binding between requests and responses. 1948 This requires that the client learned either the RS's public key 1949 or received a symmetric proof-of-possession key bound to the 1950 access token from the AS. The RS must have learned either the 1951 client's public key or a shared symmetric key from the claims in 1952 the token or an introspection request. Since ACE does not provide 1953 profile negotiation between C and RS, the client MUST have learned 1954 what profile the RS supports (e.g. from the AS or pre-configured) 1955 and initiate the communication accordingly. 1957 6.3. Use of Nonces for Token Freshness 1959 An RS that does not synchronize its clock with the AS may be tricked 1960 into accepting old access tokens that are no longer valid or have 1961 been compromised. In order to prevent this, an RS may use the nonce- 1962 based mechanism defined in Section 5.1.2 to ensure freshness of an 1963 Access Token subsequently presented to this RS. 1965 6.4. Combining profiles 1967 There may be use cases were different profiles of this framework are 1968 combined. For example, an MQTT-TLS profile is used between the 1969 client and the RS in combination with a CoAP-DTLS profile for 1970 interactions between the client and the AS. Ideally, profiles should 1971 be designed in a way that the security of system should not depend on 1972 the specific security mechanisms used in individual protocol 1973 interactions. 1975 6.5. Unprotected Information 1977 Communication with the authz-info endpoint, as well as the various 1978 error responses defined in this framework all potentially include 1979 sending information over an unprotected channel. These messages may 1980 leak information to an adversary. For example errors responses for 1981 requests to the Authorization Information endpoint can reveal 1982 information about an otherwise opaque access token to an adversary 1983 who has intercepted this token. 1985 As far as error messages are concerned, this framework is written 1986 under the assumption that, in general, the benefits of detailed error 1987 messages outweigh the risk due to information leakage. For 1988 particular use cases, where this assessment does not apply, detailed 1989 error messages can be replaced by more generic ones. 1991 In some scenarios it may be possible to protect the communication 1992 with the authz-info endpoint (e.g. through DTLS with only server-side 1993 authentication). In cases where this is not possible this framework 1994 RECOMMENDS to use encrypted CWTs or opaque references and need to be 1995 subjected to introspection by the RS. 1997 If the initial unauthorized resource request message (see 1998 Section 5.1.1) is used, the client MUST make sure that it is not 1999 sending sensitive content in this request. While GET and DELETE 2000 requests only reveal the target URI of the resource, while POST and 2001 PUT requests would reveal the whole payload of the intended 2002 operation. 2004 6.6. Identifying audiences 2006 The audience claim as defined in [RFC7519] and the equivalent 2007 "audience" parameter from [I-D.ietf-oauth-token-exchange] are 2008 intentionally vague on how to match the audience value to a specific 2009 RS. This is intended to allow application specific semantics to be 2010 used. This section attempts to give some general guidance for the 2011 use of audiences in constrained environments. 2013 URLs are not a good way of identifying mobile devices that can switch 2014 networks and thus be associated with new URLs. If the audience 2015 represents a single RS, and asymmetric keys are used, the RS can be 2016 uniquely identified by a hash of its public key. If this approach is 2017 used this framework RECOMMENDS to apply the procedure from section 3 2018 of [RFC6920]. 2020 If the audience addresses a group of resource servers, the mapping of 2021 group identifier to individual RS has to be provisioned to each RS 2022 before the group-audience is usable. Managing dynamic groups could 2023 be an issue, if the RS is not always reachable when the group 2024 memberships change. Furthermore issuing access tokens bound to 2025 symmetric proof-of-possession keys that apply to a group-audience is 2026 problematic, as an RS that is in possession of the access token can 2027 impersonate the client towards the other RSs that are part of the 2028 group. It is therefore NOT RECOMMENDED to issue access tokens bound 2029 to a group audience and symmetric proof-of possession keys. 2031 Even the client must be able to determine the correct values to put 2032 into the "audience" parameter, in order to obtain a token for the 2033 intended RS. Errors in this process can lead to the client 2034 inadvertently communicating with the wrong RS. The correct values 2035 for "audience" can either be provisioned to the client as part of its 2036 configuration, or provided by the RS as part of the "AS Request 2037 Creation Hints" Section 5.1.2 or dynamically looked up by the client 2038 in some directory. In the latter case the integrity and correctness 2039 of the directory data must be assured. 2041 6.7. Denial of service against or with Introspection 2043 The optional introspection mechanism provided by OAuth and supported 2044 in the ACE framework allows for two types of attacks that need to be 2045 considered by implementers. 2047 First an attacker could perform a denial of service attack against 2048 the introspection endpoint at the AS in order to prevent validation 2049 of access tokens. To mitigate this attack, an RS that is configured 2050 to use introspection MUST NOT allow access based on a token for which 2051 it couldn't reach the introspection endpoint. 2053 Second an attacker could use the fact that an RS performs 2054 introspection to perform a denial of service attack against that RS 2055 by repeatedly sending tokens to its authz-info endpoint that require 2056 an introspection call. RS can mitigate such attacks by implementing 2057 a rate limit on how many introspection requests they perform in a 2058 given time interval and rejecting incoming requests to authz-info for 2059 a certain amount of time, when that rate limit has been reached. 2061 7. Privacy Considerations 2063 Implementers and users should be aware of the privacy implications of 2064 the different possible deployments of this framework. 2066 The AS is in a very central position and can potentially learn 2067 sensitive information about the clients requesting access tokens. If 2068 the client credentials grant is used, the AS can track what kind of 2069 access the client intends to perform. With other grants this can be 2070 prevented by the Resource Owner. To do so, the resource owner needs 2071 to bind the grants it issues to anonymous, ephemeral credentials that 2072 do not allow the AS to link different grants and thus different 2073 access token requests by the same client. 2075 If access tokens are only integrity protected and not encrypted, they 2076 may reveal information to attackers listening on the wire, or able to 2077 acquire the access tokens in some other way. In the case of CWTs the 2078 token may, e.g., reveal the audience, the scope and the confirmation 2079 method used by the client. The latter may reveal the identity of the 2080 device or application running the client. This may be linkable to 2081 the identity of the person using the client (if there is a person and 2082 not a machine-to-machine interaction). 2084 Clients using asymmetric keys for proof-of-possession should be aware 2085 of the consequences of using the same key pair for proof-of- 2086 possession towards different RSs. A set of colluding RSs or an 2087 attacker able to obtain the access tokens will be able to link the 2088 requests, or even to determine the client's identity. 2090 An unprotected response to an unauthorized request (see 2091 Section 5.1.2) may disclose information about RS and/or its existing 2092 relationship with C. It is advisable to include as little 2093 information as possible in an unencrypted response. Means of 2094 encrypting communication between C and RS already exist, more 2095 detailed information may be included with an error response to 2096 provide C with sufficient information to react on that particular 2097 error. 2099 8. IANA Considerations 2101 8.1. ACE Authorization Server Request Creation Hints 2103 This specification establishes the IANA "ACE Authorization Server 2104 Request Creation Hints" registry. The registry has been created to 2105 use the "Expert Review" registration procedure [RFC8126]. It should 2106 be noted that, in addition to the expert review, some portions of the 2107 registry require a specification, potentially a Standards Track RFC, 2108 be supplied as well. 2110 The columns of the registry are: 2112 Name The name of the parameter 2114 CBOR Key CBOR map key for the parameter. Different ranges of values 2115 use different registration policies [RFC8126]. Integer values 2116 from -256 to 255 are designated as Standards Action. Integer 2117 values from -65536 to -257 and from 256 to 65535 are designated as 2118 Specification Required. Integer values greater than 65535 are 2119 designated as Expert Review. Integer values less than -65536 are 2120 marked as Private Use. 2122 Value Type The CBOR data types allowable for the values of this 2123 parameter. 2125 Reference This contains a pointer to the public specification of the 2126 grant type abbreviation, if one exists. 2128 This registry will be initially populated by the values in Figure 2. 2129 The Reference column for all of these entries will be this document. 2131 8.2. OAuth Extensions Error Registration 2133 This specification registers the following error values in the OAuth 2134 Extensions Error registry defined in [RFC6749]. 2136 o Error name: "unsupported_pop_key" 2137 o Error usage location: token error response 2138 o Related protocol extension: The ACE framework [this document] 2139 o Change Controller: IESG 2140 o Specification document(s): Section 5.6.3 of [this document] 2142 o Error name: "incompatible_profiles" 2143 o Error usage location: token error response 2144 o Related protocol extension: The ACE framework [this document] 2145 o Change Controller: IESG 2146 o Specification document(s): Section 5.6.3 of [this document] 2148 8.3. OAuth Error Code CBOR Mappings Registry 2150 This specification establishes the IANA "OAuth Error Code CBOR 2151 Mappings" registry. The registry has been created to use the "Expert 2152 Review" registration procedure [RFC8126], except for the value range 2153 designated for private use. 2155 The columns of the registry are: 2157 Name The OAuth Error Code name, refers to the name in Section 5.2. 2158 of [RFC6749], e.g., "invalid_request". 2159 CBOR Value CBOR abbreviation for this error code. Integer values 2160 less than -65536 are marked as "Private Use", all other values use 2161 the registration policy "Expert Review" [RFC8126]. 2162 Reference This contains a pointer to the public specification of the 2163 grant type abbreviation, if one exists. 2165 This registry will be initially populated by the values in Figure 10. 2166 The Reference column for all of these entries will be this document. 2168 8.4. OAuth Grant Type CBOR Mappings 2170 This specification establishes the IANA "OAuth Grant Type CBOR 2171 Mappings" registry. The registry has been created to use the "Expert 2172 Review" registration procedure [RFC8126], except for the value range 2173 designated for private use. 2175 The columns of this registry are: 2177 Name The name of the grant type as specified in Section 1.3 of 2178 [RFC6749]. 2179 CBOR Value CBOR abbreviation for this grant type. Integer values 2180 less than -65536 are marked as "Private Use", all other values use 2181 the registration policy "Expert Review" [RFC8126]. 2182 Reference This contains a pointer to the public specification of the 2183 grant type abbreviation, if one exists. 2184 Original Specification This contains a pointer to the public 2185 specification of the grant type, if one exists. 2187 This registry will be initially populated by the values in Figure 11. 2188 The Reference column for all of these entries will be this document. 2190 8.5. OAuth Access Token Types 2192 This section registers the following new token type in the "OAuth 2193 Access Token Types" registry [IANA.OAuthAccessTokenTypes]. 2195 o Type name: "PoP" 2196 o Additional Token Endpoint Response Parameters: "cnf", "rs_cnf" see 2197 section 3.3 of [I-D.ietf-ace-oauth-params]. 2198 o HTTP Authentication Scheme(s): N/A 2199 o Change Controller: IETF 2200 o Specification document(s): [this document] 2202 8.6. OAuth Access Token Type CBOR Mappings 2204 This specification established the IANA "OAuth Access Token Type CBOR 2205 Mappings" registry. The registry has been created to use the "Expert 2206 Review" registration procedure [RFC8126], except for the value range 2207 designated for private use. 2209 The columns of this registry are: 2211 Name The name of token type as registered in the OAuth Access Token 2212 Types registry, e.g., "Bearer". 2213 CBOR Value CBOR abbreviation for this token type. Integer values 2214 less than -65536 are marked as "Private Use", all other values use 2215 the registration policy "Expert Review" [RFC8126]. 2216 Reference This contains a pointer to the public specification of the 2217 OAuth token type abbreviation, if one exists. 2218 Original Specification This contains a pointer to the public 2219 specification of the grant type, if one exists. 2221 8.6.1. Initial Registry Contents 2223 o Name: "Bearer" 2224 o Value: 1 2225 o Reference: [this document] 2226 o Original Specification: [RFC6749] 2228 o Name: "pop" 2229 o Value: 2 2230 o Reference: [this document] 2231 o Original Specification: [this document] 2233 8.7. ACE Profile Registry 2235 This specification establishes the IANA "ACE Profile" registry. The 2236 registry has been created to use the "Expert Review" registration 2237 procedure [RFC8126]. It should be noted that, in addition to the 2238 expert review, some portions of the registry require a specification, 2239 potentially a Standards Track RFC, be supplied as well. 2241 The columns of this registry are: 2243 Name The name of the profile, to be used as value of the profile 2244 attribute. 2245 Description Text giving an overview of the profile and the context 2246 it is developed for. 2247 CBOR Value CBOR abbreviation for this profile name. Different 2248 ranges of values use different registration policies [RFC8126]. 2249 Integer values from -256 to 255 are designated as Standards 2250 Action. Integer values from -65536 to -257 and from 256 to 65535 2251 are designated as Specification Required. Integer values greater 2252 than 65535 are designated as "Expert Review". Integer values less 2253 than -65536 are marked as Private Use. 2254 Reference This contains a pointer to the public specification of the 2255 profile abbreviation, if one exists. 2257 This registry will be initially empty and will be populated by the 2258 registrations from the ACE framework profiles. 2260 8.8. OAuth Parameter Registration 2262 This specification registers the following parameter in the "OAuth 2263 Parameters" registry [IANA.OAuthParameters]: 2265 o Name: "profile" 2266 o Parameter Usage Location: token response 2267 o Change Controller: IESG 2268 o Reference: Section 5.6.4.3 of [this document] 2270 8.9. OAuth Parameters CBOR Mappings Registry 2272 This specification establishes the IANA "OAuth Parameters CBOR 2273 Mappings" registry. The registry has been created to use the "Expert 2274 Review" registration procedure [RFC8126], except for the value range 2275 designated for private use. 2277 The columns of this registry are: 2279 Name The OAuth Parameter name, refers to the name in the OAuth 2280 parameter registry, e.g., "client_id". 2281 CBOR Key CBOR map key for this parameter. Integer values less than 2282 -65536 are marked as "Private Use", all other values use the 2283 registration policy "Expert Review" [RFC8126]. 2284 Value Type The allowable CBOR data types for values of this 2285 parameter. 2286 Reference This contains a pointer to the public specification of the 2287 parameter abbreviation, if one exists. 2289 This registry will be initially populated by the values in Figure 12. 2290 The Reference column for all of these entries will be this document. 2292 Note that the mappings of parameters corresponding to claim names 2293 intentionally coincide with the CWT claim name mappings from 2294 [RFC8392]. 2296 8.10. OAuth Introspection Response Parameter Registration 2298 This specification registers the following parameter in the OAuth 2299 Token Introspection Response registry 2300 [IANA.TokenIntrospectionResponse]. 2302 o Name: "profile" 2303 o Description: The communication and communication security profile 2304 used between client and RS, as defined in ACE profiles. 2305 o Change Controller: IESG 2306 o Reference: Section 5.7.2 of [this document] 2308 8.11. OAuth Token Introspection Response CBOR Mappings Registry 2310 This specification establishes the IANA "OAuth Token Introspection 2311 Response CBOR Mappings" registry. The registry has been created to 2312 use the "Expert Review" registration procedure [RFC8126], except for 2313 the value range designated for private use. 2315 The columns of this registry are: 2317 Name The OAuth Parameter name, refers to the name in the OAuth 2318 parameter registry, e.g., "client_id". 2319 CBOR Key CBOR map key for this parameter. Integer values less than 2320 -65536 are marked as "Private Use", all other values use the 2321 registration policy "Expert Review" [RFC8126]. 2322 Value Type The allowable CBOR data types for values of this 2323 parameter. 2324 Reference This contains a pointer to the public specification of the 2325 grant type abbreviation, if one exists. 2327 This registry will be initially populated by the values in Figure 16. 2328 The Reference column for all of these entries will be this document. 2330 Note that the mappings of parameters corresponding to claim names 2331 intentionally coincide with the CWT claim name mappings from 2332 [RFC8392]. 2334 8.12. JSON Web Token Claims 2336 This specification registers the following new claims in the JSON Web 2337 Token (JWT) registry of JSON Web Token Claims 2338 [IANA.JsonWebTokenClaims]: 2340 o Claim Name: "scope" 2341 o Claim Description: The scope of an access token as defined in 2342 [RFC6749]. 2343 o Change Controller: IESG 2344 o Reference: Section 5.8 of [this document] 2346 o Claim Name: "profile" 2347 o Claim Description: The profile a token is supposed to be used 2348 with. 2349 o Change Controller: IESG 2350 o Reference: Section 5.8 of [this document] 2352 o Claim Name: "exi" 2353 o Claim Description: "Expires in". Lifetime of the token in seconds 2354 from the time the RS first sees it. Used to implement a weaker 2355 from of token expiration for devices that cannot synchronize their 2356 internal clocks. 2357 o Change Controller: IESG 2358 o Reference: Section 5.8.3 of [this document] 2360 o Claim Name: "cnonce" 2361 o Claim Description: "client-nonce". A nonce previously provided to 2362 the AS by the RS via the client. Used verify token freshness when 2363 the RS cannot synchronize its clock with the AS. 2364 o Change Controller: IESG 2365 o Reference: Section 5.8 of [this document] 2367 8.13. CBOR Web Token Claims 2369 This specification registers the following new claims in the "CBOR 2370 Web Token (CWT) Claims" registry [IANA.CborWebTokenClaims]. 2372 o Claim Name: "scope" 2373 o Claim Description: The scope of an access token as defined in 2374 [RFC6749]. 2375 o JWT Claim Name: scope 2376 o Claim Key: TBD (suggested: 9) 2377 o Claim Value Type(s): byte string or text string 2378 o Change Controller: IESG 2379 o Specification Document(s): Section 5.8 of [this document] 2381 o Claim Name: "profile" 2382 o Claim Description: The profile a token is supposed to be used 2383 with. 2384 o JWT Claim Name: profile 2385 o Claim Key: TBD (suggested: 38) 2386 o Claim Value Type(s): integer 2387 o Change Controller: IESG 2388 o Specification Document(s): Section 5.8 of [this document] 2390 o Claim Name: "exi" 2391 o Claim Description: The expiration time of a token measured from 2392 when it was received at the RS in seconds. 2393 o JWT Claim Name: exi 2394 o Claim Key: TBD (suggested: 40) 2395 o Claim Value Type(s): integer 2396 o Change Controller: IESG 2397 o Specification Document(s): Section 5.8.3 of [this document] 2399 o Claim Name: "cnonce" 2400 o Claim Description: The client-nonce sent to the AS by the RS via 2401 the client. 2402 o JWT Claim Name: cnonce 2403 o Claim Key: TBD (suggested: 39) 2404 o Claim Value Type(s): byte string 2405 o Change Controller: IESG 2406 o Specification Document(s): Section 5.8 of [this document] 2408 8.14. Media Type Registrations 2410 This specification registers the 'application/ace+cbor' media type 2411 for messages of the protocols defined in this document carrying 2412 parameters encoded in CBOR. This registration follows the procedures 2413 specified in [RFC6838]. 2415 Type name: application 2417 Subtype name: ace+cbor 2419 Required parameters: none 2421 Optional parameters: none 2423 Encoding considerations: Must be encoded as CBOR map containing the 2424 protocol parameters defined in [this document]. 2426 Security considerations: See Section 6 of this document. 2428 Interoperability considerations: n/a 2430 Published specification: [this document] 2432 Applications that use this media type: The type is used by 2433 authorization servers, clients and resource servers that support the 2434 ACE framework as specified in [this document]. 2436 Additional information: 2438 Magic number(s): n/a 2439 File extension(s): .ace 2441 Macintosh file type code(s): n/a 2443 Person & email address to contact for further information: Ludwig 2444 Seitz 2446 Intended usage: COMMON 2448 Restrictions on usage: None 2450 Author: Ludwig Seitz 2452 Change controller: IESG 2454 8.15. CoAP Content-Format Registry 2456 This specification registers the following entry to the "CoAP 2457 Content-Formats" registry: 2459 Media Type: application/ace+cbor 2461 Encoding 2463 ID: 19 2465 Reference: [this document] 2467 8.16. Expert Review Instructions 2469 All of the IANA registries established in this document are defined 2470 as expert review. This section gives some general guidelines for 2471 what the experts should be looking for, but they are being designated 2472 as experts for a reason, so they should be given substantial 2473 latitude. 2475 Expert reviewers should take into consideration the following points: 2477 o Point squatting should be discouraged. Reviewers are encouraged 2478 to get sufficient information for registration requests to ensure 2479 that the usage is not going to duplicate one that is already 2480 registered, and that the point is likely to be used in 2481 deployments. The zones tagged as private use are intended for 2482 testing purposes and closed environments; code points in other 2483 ranges should not be assigned for testing. 2484 o Specifications are required for the standards track range of point 2485 assignment. Specifications should exist for specification 2486 required ranges, but early assignment before a specification is 2487 available is considered to be permissible. Specifications are 2488 needed for the first-come, first-serve range if they are expected 2489 to be used outside of closed environments in an interoperable way. 2490 When specifications are not provided, the description provided 2491 needs to have sufficient information to identify what the point is 2492 being used for. 2493 o Experts should take into account the expected usage of fields when 2494 approving point assignment. The fact that there is a range for 2495 standards track documents does not mean that a standards track 2496 document cannot have points assigned outside of that range. The 2497 length of the encoded value should be weighed against how many 2498 code points of that length are left, the size of device it will be 2499 used on, and the number of code points left that encode to that 2500 size. 2501 o Since a high degree of overlap is expected between these 2502 registries and the contents of the OAuth parameters 2503 [IANA.OAuthParameters] registries, experts should require new 2504 registrations to maintain alignment with parameters from OAuth 2505 that have comparable functionality. Deviation from this alignment 2506 should only be allowed if there are functional differences, that 2507 are motivated by the use case and that cannot be easily or 2508 efficiently addressed by comparable OAuth parameters. 2510 9. Acknowledgments 2512 This document is a product of the ACE working group of the IETF. 2514 Thanks to Eve Maler for her contributions to the use of OAuth 2.0 and 2515 UMA in IoT scenarios, Robert Taylor for his discussion input, and 2516 Malisa Vucinic for his input on the predecessors of this proposal. 2518 Thanks to the authors of draft-ietf-oauth-pop-key-distribution, from 2519 where large parts of the security considerations where copied. 2521 Thanks to Stefanie Gerdes, Olaf Bergmann, and Carsten Bormann for 2522 contributing their work on AS discovery from draft-gerdes-ace-dcaf- 2523 authorize (see Section 5.1). 2525 Thanks to Jim Schaad and Mike Jones for their comprehensive reviews. 2527 Thanks to Benjamin Kaduk for his input on various questions related 2528 to this work. 2530 Thanks to Cigdem Sengul for some very useful review comments. 2532 Ludwig Seitz and Goeran Selander worked on this document as part of 2533 the CelticPlus project CyberWI, with funding from Vinnova. Ludwig 2534 Seitz was also received further funding for this work by Vinnova in 2535 the context of the CelticNext project Critisec. 2537 10. References 2539 10.1. Normative References 2541 [I-D.ietf-ace-cwt-proof-of-possession] 2542 Jones, M., Seitz, L., Selander, G., Erdtman, S., and H. 2543 Tschofenig, "Proof-of-Possession Key Semantics for CBOR 2544 Web Tokens (CWTs)", draft-ietf-ace-cwt-proof-of- 2545 possession-06 (work in progress), February 2019. 2547 [I-D.ietf-ace-oauth-params] 2548 Seitz, L., "Additional OAuth Parameters for Authorization 2549 in Constrained Environments (ACE)", draft-ietf-ace-oauth- 2550 params-04 (work in progress), February 2019. 2552 [I-D.ietf-oauth-token-exchange] 2553 Jones, M., Nadalin, A., Campbell, B., Bradley, J., and C. 2554 Mortimore, "OAuth 2.0 Token Exchange", draft-ietf-oauth- 2555 token-exchange-16 (work in progress), October 2018. 2557 [IANA.CborWebTokenClaims] 2558 IANA, "CBOR Web Token (CWT) Claims", 2559 . 2562 [IANA.JsonWebTokenClaims] 2563 IANA, "JSON Web Token Claims", 2564 . 2566 [IANA.OAuthAccessTokenTypes] 2567 IANA, "OAuth Access Token Types", 2568 . 2571 [IANA.OAuthParameters] 2572 IANA, "OAuth Parameters", 2573 . 2576 [IANA.TokenIntrospectionResponse] 2577 IANA, "OAuth Token Introspection Response", 2578 . 2581 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2582 Requirement Levels", BCP 14, RFC 2119, 2583 DOI 10.17487/RFC2119, March 1997, 2584 . 2586 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 2587 Resource Identifier (URI): Generic Syntax", STD 66, 2588 RFC 3986, DOI 10.17487/RFC3986, January 2005, 2589 . 2591 [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer 2592 Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, 2593 January 2012, . 2595 [RFC6749] Hardt, D., Ed., "The OAuth 2.0 Authorization Framework", 2596 RFC 6749, DOI 10.17487/RFC6749, October 2012, 2597 . 2599 [RFC6750] Jones, M. and D. Hardt, "The OAuth 2.0 Authorization 2600 Framework: Bearer Token Usage", RFC 6750, 2601 DOI 10.17487/RFC6750, October 2012, 2602 . 2604 [RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type 2605 Specifications and Registration Procedures", BCP 13, 2606 RFC 6838, DOI 10.17487/RFC6838, January 2013, 2607 . 2609 [RFC6920] Farrell, S., Kutscher, D., Dannewitz, C., Ohlman, B., 2610 Keranen, A., and P. Hallam-Baker, "Naming Things with 2611 Hashes", RFC 6920, DOI 10.17487/RFC6920, April 2013, 2612 . 2614 [RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained 2615 Application Protocol (CoAP)", RFC 7252, 2616 DOI 10.17487/RFC7252, June 2014, 2617 . 2619 [RFC7662] Richer, J., Ed., "OAuth 2.0 Token Introspection", 2620 RFC 7662, DOI 10.17487/RFC7662, October 2015, 2621 . 2623 [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for 2624 Writing an IANA Considerations Section in RFCs", BCP 26, 2625 RFC 8126, DOI 10.17487/RFC8126, June 2017, 2626 . 2628 [RFC8152] Schaad, J., "CBOR Object Signing and Encryption (COSE)", 2629 RFC 8152, DOI 10.17487/RFC8152, July 2017, 2630 . 2632 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2633 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2634 May 2017, . 2636 [RFC8392] Jones, M., Wahlstroem, E., Erdtman, S., and H. Tschofenig, 2637 "CBOR Web Token (CWT)", RFC 8392, DOI 10.17487/RFC8392, 2638 May 2018, . 2640 10.2. Informative References 2642 [I-D.erdtman-ace-rpcc] 2643 Seitz, L. and S. Erdtman, "Raw-Public-Key and Pre-Shared- 2644 Key as OAuth client credentials", draft-erdtman-ace- 2645 rpcc-02 (work in progress), October 2017. 2647 [I-D.ietf-core-object-security] 2648 Selander, G., Mattsson, J., Palombini, F., and L. Seitz, 2649 "Object Security for Constrained RESTful Environments 2650 (OSCORE)", draft-ietf-core-object-security-16 (work in 2651 progress), March 2019. 2653 [I-D.ietf-oauth-device-flow] 2654 Denniss, W., Bradley, J., Jones, M., and H. Tschofenig, 2655 "OAuth 2.0 Device Authorization Grant", draft-ietf-oauth- 2656 device-flow-15 (work in progress), March 2019. 2658 [I-D.ietf-tls-dtls13] 2659 Rescorla, E., Tschofenig, H., and N. Modadugu, "The 2660 Datagram Transport Layer Security (DTLS) Protocol Version 2661 1.3", draft-ietf-tls-dtls13-30 (work in progress), 2662 November 2018. 2664 [Margi10impact] 2665 Margi, C., de Oliveira, B., de Sousa, G., Simplicio Jr, 2666 M., Barreto, P., Carvalho, T., Naeslund, M., and R. Gold, 2667 "Impact of Operating Systems on Wireless Sensor Networks 2668 (Security) Applications and Testbeds", Proceedings of 2669 the 19th International Conference on Computer 2670 Communications and Networks (ICCCN), August 2010. 2672 [RFC4949] Shirey, R., "Internet Security Glossary, Version 2", 2673 FYI 36, RFC 4949, DOI 10.17487/RFC4949, August 2007, 2674 . 2676 [RFC6690] Shelby, Z., "Constrained RESTful Environments (CoRE) Link 2677 Format", RFC 6690, DOI 10.17487/RFC6690, August 2012, 2678 . 2680 [RFC6819] Lodderstedt, T., Ed., McGloin, M., and P. Hunt, "OAuth 2.0 2681 Threat Model and Security Considerations", RFC 6819, 2682 DOI 10.17487/RFC6819, January 2013, 2683 . 2685 [RFC7049] Bormann, C. and P. Hoffman, "Concise Binary Object 2686 Representation (CBOR)", RFC 7049, DOI 10.17487/RFC7049, 2687 October 2013, . 2689 [RFC7228] Bormann, C., Ersue, M., and A. Keranen, "Terminology for 2690 Constrained-Node Networks", RFC 7228, 2691 DOI 10.17487/RFC7228, May 2014, 2692 . 2694 [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 2695 Protocol (HTTP/1.1): Semantics and Content", RFC 7231, 2696 DOI 10.17487/RFC7231, June 2014, 2697 . 2699 [RFC7519] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token 2700 (JWT)", RFC 7519, DOI 10.17487/RFC7519, May 2015, 2701 . 2703 [RFC7521] Campbell, B., Mortimore, C., Jones, M., and Y. Goland, 2704 "Assertion Framework for OAuth 2.0 Client Authentication 2705 and Authorization Grants", RFC 7521, DOI 10.17487/RFC7521, 2706 May 2015, . 2708 [RFC7591] Richer, J., Ed., Jones, M., Bradley, J., Machulak, M., and 2709 P. Hunt, "OAuth 2.0 Dynamic Client Registration Protocol", 2710 RFC 7591, DOI 10.17487/RFC7591, July 2015, 2711 . 2713 [RFC7641] Hartke, K., "Observing Resources in the Constrained 2714 Application Protocol (CoAP)", RFC 7641, 2715 DOI 10.17487/RFC7641, September 2015, 2716 . 2718 [RFC7744] Seitz, L., Ed., Gerdes, S., Ed., Selander, G., Mani, M., 2719 and S. Kumar, "Use Cases for Authentication and 2720 Authorization in Constrained Environments", RFC 7744, 2721 DOI 10.17487/RFC7744, January 2016, 2722 . 2724 [RFC7959] Bormann, C. and Z. Shelby, Ed., "Block-Wise Transfers in 2725 the Constrained Application Protocol (CoAP)", RFC 7959, 2726 DOI 10.17487/RFC7959, August 2016, 2727 . 2729 [RFC8252] Denniss, W. and J. Bradley, "OAuth 2.0 for Native Apps", 2730 BCP 212, RFC 8252, DOI 10.17487/RFC8252, October 2017, 2731 . 2733 [RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data 2734 Interchange Format", STD 90, RFC 8259, 2735 DOI 10.17487/RFC8259, December 2017, 2736 . 2738 [RFC8414] Jones, M., Sakimura, N., and J. Bradley, "OAuth 2.0 2739 Authorization Server Metadata", RFC 8414, 2740 DOI 10.17487/RFC8414, June 2018, 2741 . 2743 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 2744 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 2745 . 2747 [RFC8516] Keranen, A., ""Too Many Requests" Response Code for the 2748 Constrained Application Protocol", RFC 8516, 2749 DOI 10.17487/RFC8516, January 2019, 2750 . 2752 Appendix A. Design Justification 2754 This section provides further insight into the design decisions of 2755 the solution documented in this document. Section 3 lists several 2756 building blocks and briefly summarizes their importance. The 2757 justification for offering some of those building blocks, as opposed 2758 to using OAuth 2.0 as is, is given below. 2760 Common IoT constraints are: 2762 Low Power Radio: 2764 Many IoT devices are equipped with a small battery which needs to 2765 last for a long time. For many constrained wireless devices, the 2766 highest energy cost is associated to transmitting or receiving 2767 messages (roughly by a factor of 10 compared to AES) 2768 [Margi10impact]. It is therefore important to keep the total 2769 communication overhead low, including minimizing the number and 2770 size of messages sent and received, which has an impact of choice 2771 on the message format and protocol. By using CoAP over UDP and 2772 CBOR encoded messages, some of these aspects are addressed. 2773 Security protocols contribute to the communication overhead and 2774 can, in some cases, be optimized. For example, authentication and 2775 key establishment may, in certain cases where security 2776 requirements allow, be replaced by provisioning of security 2777 context by a trusted third party, using transport or application 2778 layer security. 2780 Low CPU Speed: 2782 Some IoT devices are equipped with processors that are 2783 significantly slower than those found in most current devices on 2784 the Internet. This typically has implications on what timely 2785 cryptographic operations a device is capable of performing, which 2786 in turn impacts, e.g., protocol latency. Symmetric key 2787 cryptography may be used instead of the computationally more 2788 expensive public key cryptography where the security requirements 2789 so allows, but this may also require support for trusted third 2790 party assisted secret key establishment using transport or 2791 application layer security. 2792 Small Amount of Memory: 2794 Microcontrollers embedded in IoT devices are often equipped with 2795 small amount of RAM and flash memory, which places limitations 2796 what kind of processing can be performed and how much code can be 2797 put on those devices. To reduce code size fewer and smaller 2798 protocol implementations can be put on the firmware of such a 2799 device. In this case, CoAP may be used instead of HTTP, symmetric 2800 key cryptography instead of public key cryptography, and CBOR 2801 instead of JSON. Authentication and key establishment protocol, 2802 e.g., the DTLS handshake, in comparison with assisted key 2803 establishment also has an impact on memory and code. 2805 User Interface Limitations: 2807 Protecting access to resources is both an important security as 2808 well as privacy feature. End users and enterprise customers may 2809 not want to give access to the data collected by their IoT device 2810 or to functions it may offer to third parties. Since the 2811 classical approach of requesting permissions from end users via a 2812 rich user interface does not work in many IoT deployment 2813 scenarios, these functions need to be delegated to user-controlled 2814 devices that are better suitable for such tasks, such as smart 2815 phones and tablets. 2817 Communication Constraints: 2819 In certain constrained settings an IoT device may not be able to 2820 communicate with a given device at all times. Devices may be 2821 sleeping, or just disconnected from the Internet because of 2822 general lack of connectivity in the area, for cost reasons, or for 2823 security reasons, e.g., to avoid an entry point for Denial-of- 2824 Service attacks. 2826 The communication interactions this framework builds upon (as 2827 shown graphically in Figure 1) may be accomplished using a variety 2828 of different protocols, and not all parts of the message flow are 2829 used in all applications due to the communication constraints. 2830 Deployments making use of CoAP are expected, but not limited to, 2831 other protocols such as HTTP, HTTP/2 or other specific protocols, 2832 such as Bluetooth Smart communication, that do not necessarily use 2833 IP could also be used. The latter raises the need for application 2834 layer security over the various interfaces. 2836 In the light of these constraints we have made the following design 2837 decisions: 2839 CBOR, COSE, CWT: 2841 This framework RECOMMENDS the use of CBOR [RFC7049] as data 2842 format. Where CBOR data needs to be protected, the use of COSE 2843 [RFC8152] is RECOMMENDED. Furthermore where self-contained tokens 2844 are needed, this framework RECOMMENDS the use of CWT [RFC8392]. 2845 These measures aim at reducing the size of messages sent over the 2846 wire, the RAM size of data objects that need to be kept in memory 2847 and the size of libraries that devices need to support. 2849 CoAP: 2851 This framework RECOMMENDS the use of CoAP [RFC7252] instead of 2852 HTTP. This does not preclude the use of other protocols 2853 specifically aimed at constrained devices, like, e.g., Bluetooth 2854 Low Energy (see Section 3.2). This aims again at reducing the 2855 size of messages sent over the wire, the RAM size of data objects 2856 that need to be kept in memory and the size of libraries that 2857 devices need to support. 2859 Access Information: 2861 This framework defines the name "Access Information" for data 2862 concerning the RS that the AS returns to the client in an access 2863 token response (see Section 5.6.2). This aims at enabling 2864 scenarios, where a powerful client, supporting multiple profiles, 2865 needs to interact with a RS for which it does not know the 2866 supported profiles and the raw public key. 2868 Proof-of-Possession: 2870 This framework makes use of proof-of-possession tokens, using the 2871 "cnf" claim [I-D.ietf-ace-cwt-proof-of-possession]. A 2872 semantically and syntactically identical request and response 2873 parameter is defined for the token endpoint, to allow requesting 2874 and stating confirmation keys. This aims at making token theft 2875 harder. Token theft is specifically relevant in constrained use 2876 cases, as communication often passes through middle-boxes, which 2877 could be able to steal bearer tokens and use them to gain 2878 unauthorized access. 2880 Auth-Info endpoint: 2882 This framework introduces a new way of providing access tokens to 2883 a RS by exposing a authz-info endpoint, to which access tokens can 2884 be POSTed. This aims at reducing the size of the request message 2885 and the code complexity at the RS. The size of the request 2886 message is problematic, since many constrained protocols have 2887 severe message size limitations at the physical layer (e.g., in 2888 the order of 100 bytes). This means that larger packets get 2889 fragmented, which in turn combines badly with the high rate of 2890 packet loss, and the need to retransmit the whole message if one 2891 packet gets lost. Thus separating sending of the request and 2892 sending of the access tokens helps to reduce fragmentation. 2894 Client Credentials Grant: 2896 This framework RECOMMENDS the use of the client credentials grant 2897 for machine-to-machine communication use cases, where manual 2898 intervention of the resource owner to produce a grant token is not 2899 feasible. The intention is that the resource owner would instead 2900 pre-arrange authorization with the AS, based on the client's own 2901 credentials. The client can then (without manual intervention) 2902 obtain access tokens from the AS. 2904 Introspection: 2906 This framework RECOMMENDS the use of access token introspection in 2907 cases where the client is constrained in a way that it can not 2908 easily obtain new access tokens (i.e. it has connectivity issues 2909 that prevent it from communicating with the AS). In that case 2910 this framework RECOMMENDS the use of a long-term token, that could 2911 be a simple reference. The RS is assumed to be able to 2912 communicate with the AS, and can therefore perform introspection, 2913 in order to learn the claims associated with the token reference. 2914 The advantage of such an approach is that the resource owner can 2915 change the claims associated to the token reference without having 2916 to be in contact with the client, thus granting or revoking access 2917 rights. 2919 Appendix B. Roles and Responsibilities 2921 Resource Owner 2923 * Make sure that the RS is registered at the AS. This includes 2924 making known to the AS which profiles, token_types, scopes, and 2925 key types (symmetric/asymmetric) the RS supports. Also making 2926 it known to the AS which audience(s) the RS identifies itself 2927 with. 2928 * Make sure that clients can discover the AS that is in charge of 2929 the RS. 2930 * If the client-credentials grant is used, make sure that the AS 2931 has the necessary, up-to-date, access control policies for the 2932 RS. 2934 Requesting Party 2936 * Make sure that the client is provisioned the necessary 2937 credentials to authenticate to the AS. 2938 * Make sure that the client is configured to follow the security 2939 requirements of the Requesting Party when issuing requests 2940 (e.g., minimum communication security requirements, trust 2941 anchors). 2942 * Register the client at the AS. This includes making known to 2943 the AS which profiles, token_types, and key types (symmetric/ 2944 asymmetric) the client. 2946 Authorization Server 2948 * Register the RS and manage corresponding security contexts. 2949 * Register clients and authentication credentials. 2950 * Allow Resource Owners to configure and update access control 2951 policies related to their registered RSs. 2952 * Expose the token endpoint to allow clients to request tokens. 2953 * Authenticate clients that wish to request a token. 2954 * Process a token request using the authorization policies 2955 configured for the RS. 2956 * Optionally: Expose the introspection endpoint that allows RS's 2957 to submit token introspection requests. 2958 * If providing an introspection endpoint: Authenticate RSs that 2959 wish to get an introspection response. 2960 * If providing an introspection endpoint: Process token 2961 introspection requests. 2963 * Optionally: Handle token revocation. 2964 * Optionally: Provide discovery metadata. See [RFC8414] 2965 * Optionally: Handle refresh tokens. 2967 Client 2969 * Discover the AS in charge of the RS that is to be targeted with 2970 a request. 2971 * Submit the token request (see step (A) of Figure 1). 2973 + Authenticate to the AS. 2974 + Optionally (if not pre-configured): Specify which RS, which 2975 resource(s), and which action(s) the request(s) will target. 2976 + If raw public keys (rpk) or certificates are used, make sure 2977 the AS has the right rpk or certificate for this client. 2978 * Process the access token and Access Information (see step (B) 2979 of Figure 1). 2981 + Check that the Access Information provides the necessary 2982 security parameters (e.g., PoP key, information on 2983 communication security protocols supported by the RS). 2984 + Safely store the proof-of-possession key. 2985 + If provided by the AS: Safely store the refresh token. 2986 * Send the token and request to the RS (see step (C) of 2987 Figure 1). 2989 + Authenticate towards the RS (this could coincide with the 2990 proof of possession process). 2991 + Transmit the token as specified by the AS (default is to the 2992 authz-info endpoint, alternative options are specified by 2993 profiles). 2994 + Perform the proof-of-possession procedure as specified by 2995 the profile in use (this may already have been taken care of 2996 through the authentication procedure). 2997 * Process the RS response (see step (F) of Figure 1) of the RS. 2999 Resource Server 3001 * Expose a way to submit access tokens. By default this is the 3002 authz-info endpoint. 3003 * Process an access token. 3005 + Verify the token is from a recognized AS. 3006 + Verify that the token applies to this RS. 3007 + Check that the token has not expired (if the token provides 3008 expiration information). 3009 + Check the token's integrity. 3011 + Store the token so that it can be retrieved in the context 3012 of a matching request. 3013 * Process a request. 3015 + Set up communication security with the client. 3016 + Authenticate the client. 3017 + Match the client against existing tokens. 3018 + Check that tokens belonging to the client actually authorize 3019 the requested action. 3020 + Optionally: Check that the matching tokens are still valid, 3021 using introspection (if this is possible.) 3022 * Send a response following the agreed upon communication 3023 security. 3024 * Safely store credentials such as raw public keys for 3025 authentication or proof-of-possession keys linked to access 3026 tokens. 3028 Appendix C. Requirements on Profiles 3030 This section lists the requirements on profiles of this framework, 3031 for the convenience of profile designers. 3033 o Specify the communication protocol the client and RS the must use 3034 (e.g., CoAP). Section 5 and Section 5.6.4.3 3035 o Specify the security protocol the client and RS must use to 3036 protect their communication (e.g., OSCORE or DTLS over CoAP). 3037 This must provide encryption, integrity and replay protection. 3038 Section 5.6.4.3 3039 o Specify how the client and the RS mutually authenticate. 3040 Section 4 3041 o Specify the proof-of-possession protocol(s) and how to select one, 3042 if several are available. Also specify which key types (e.g., 3043 symmetric/asymmetric) are supported by a specific proof-of- 3044 possession protocol. Section 5.6.4.2 3045 o Specify a unique profile identifier. Section 5.6.4.3 3046 o If introspection is supported: Specify the communication and 3047 security protocol for introspection. Section 5.7 3048 o Specify the communication and security protocol for interactions 3049 between client and AS. This must provide encryption, integrity 3050 protection, replay protection and a binding between requests and 3051 responses. Section 5 and Section 5.6 3052 o Specify how/if the authz-info endpoint is protected, including how 3053 error responses are protected. Section 5.8.1 3054 o Optionally define other methods of token transport than the authz- 3055 info endpoint. Section 5.8.1 3057 Appendix D. Assumptions on AS knowledge about C and RS 3059 This section lists the assumptions on what an AS should know about a 3060 client and a RS in order to be able to respond to requests to the 3061 token and introspection endpoints. How this information is 3062 established is out of scope for this document. 3064 o The identifier of the client or RS. 3065 o The profiles that the client or RS supports. 3066 o The scopes that the RS supports. 3067 o The audiences that the RS identifies with. 3068 o The key types (e.g., pre-shared symmetric key, raw public key, key 3069 length, other key parameters) that the client or RS supports. 3070 o The types of access tokens the RS supports (e.g., CWT). 3071 o If the RS supports CWTs, the COSE parameters for the crypto 3072 wrapper (e.g., algorithm, key-wrap algorithm, key-length). 3073 o The expiration time for access tokens issued to this RS (unless 3074 the RS accepts a default time chosen by the AS). 3075 o The symmetric key shared between client or RS and AS (if any). 3076 o The raw public key of the client or RS (if any). 3077 o Whether the RS has synchronized time (and thus is able to use the 3078 'exp' claim) or not. 3080 Appendix E. Deployment Examples 3082 There is a large variety of IoT deployments, as is indicated in 3083 Appendix A, and this section highlights a few common variants. This 3084 section is not normative but illustrates how the framework can be 3085 applied. 3087 For each of the deployment variants, there are a number of possible 3088 security setups between clients, resource servers and authorization 3089 servers. The main focus in the following subsections is on how 3090 authorization of a client request for a resource hosted by a RS is 3091 performed. This requires the security of the requests and responses 3092 between the clients and the RS to consider. 3094 Note: CBOR diagnostic notation is used for examples of requests and 3095 responses. 3097 E.1. Local Token Validation 3099 In this scenario, the case where the resource server is offline is 3100 considered, i.e., it is not connected to the AS at the time of the 3101 access request. This access procedure involves steps A, B, C, and F 3102 of Figure 1. 3104 Since the resource server must be able to verify the access token 3105 locally, self-contained access tokens must be used. 3107 This example shows the interactions between a client, the 3108 authorization server and a temperature sensor acting as a resource 3109 server. Message exchanges A and B are shown in Figure 17. 3111 A: The client first generates a public-private key pair used for 3112 communication security with the RS. 3113 The client sends the POST request to the token endpoint at the AS. 3114 The security of this request can be transport or application 3115 layer. It is up the the communication security profile to define. 3116 In the example transport layer identification of the AS is done 3117 and the client identifies with client_id and client_secret as in 3118 classic OAuth. The request contains the public key of the client 3119 and the Audience parameter set to "tempSensorInLivingRoom", a 3120 value that the temperature sensor identifies itself with. The AS 3121 evaluates the request and authorizes the client to access the 3122 resource. 3123 B: The AS responds with a PoP access token and Access Information. 3124 The PoP access token contains the public key of the client, and 3125 the Access Information contains the public key of the RS. For 3126 communication security this example uses DTLS RawPublicKey between 3127 the client and the RS. The issued token will have a short 3128 validity time, i.e., "exp" close to "iat", to protect the RS from 3129 replay attacks. The token includes the claim such as "scope" with 3130 the authorized access that an owner of the temperature device can 3131 enjoy. In this example, the "scope" claim, issued by the AS, 3132 informs the RS that the owner of the token, that can prove the 3133 possession of a key is authorized to make a GET request against 3134 the /temperature resource and a POST request on the /firmware 3135 resource. Note that the syntax and semantics of the scope claim 3136 are application specific. 3137 Note: In this example it is assumed that the client knows what 3138 resource it wants to access, and is therefore able to request 3139 specific audience and scope claims for the access token. 3141 Authorization 3142 Client Server 3143 | | 3144 |<=======>| DTLS Connection Establishment 3145 | | to identify the AS 3146 | | 3147 A: +-------->| Header: POST (Code=0.02) 3148 | POST | Uri-Path:"token" 3149 | | Content-Format: application/ace+cbor 3150 | | Payload: 3151 | | 3152 B: |<--------+ Header: 2.05 Content 3153 | 2.05 | Content-Format: application/ace+cbor 3154 | | Payload: 3155 | | 3157 Figure 17: Token Request and Response Using Client Credentials. 3159 The information contained in the Request-Payload and the Response- 3160 Payload is shown in Figure 18 Note that the parameter "rs_cnf" from 3161 [I-D.ietf-ace-oauth-params] is used to inform the client about the 3162 resource server's public key. 3164 Request-Payload : 3165 { 3166 "audience" : "tempSensorInLivingRoom", 3167 "client_id" : "myclient", 3168 "client_secret" : "qwerty" 3169 "req_cnf" : { 3170 "COSE_Key" : { 3171 "kid" : b64'1Bg8vub9tLe1gHMzV76e8', 3172 "kty" : "EC", 3173 "crv" : "P-256", 3174 "x" : b64'f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU', 3175 "y" : b64'x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0' 3176 } 3177 } 3178 } 3180 Response-Payload : 3181 { 3182 "access_token" : b64'SlAV32hkKG ...', 3183 "rs_cnf" : { 3184 "COSE_Key" : { 3185 "kid" : b64'c29tZSBwdWJsaWMga2V5IGlk', 3186 "kty" : "EC", 3187 "crv" : "P-256", 3188 "x" : b64'MKBCTNIcKUSDii11ySs3526iDZ8AiTo7Tu6KPAqv7D4', 3189 "y" : b64'4Etl6SRW2YiLUrN5vfvVHuhp7x8PxltmWWlbbM4IFyM' 3190 } 3191 } 3192 } 3194 Figure 18: Request and Response Payload Details. 3196 The content of the access token is shown in Figure 19. 3198 { 3199 "aud" : "tempSensorInLivingRoom", 3200 "iat" : "1360189224", 3201 "exp" : "1360289224", 3202 "scope" : "temperature_g firmware_p", 3203 "cnf" : { 3204 "COSE_Key" : { 3205 "kid" : b64'1Bg8vub9tLe1gHMzV76e8', 3206 "kty" : "EC", 3207 "crv" : "P-256", 3208 "x" : b64'f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU', 3209 "y" : b64'x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0' 3210 } 3211 } 3212 } 3214 Figure 19: Access Token including Public Key of the Client. 3216 Messages C and F are shown in Figure 20 - Figure 21. 3218 C: The client then sends the PoP access token to the authz-info 3219 endpoint at the RS. This is a plain CoAP request, i.e., no 3220 transport or application layer security is used between client and 3221 RS since the token is integrity protected between the AS and RS. 3222 The RS verifies that the PoP access token was created by a known 3223 and trusted AS, is valid, and has been issued to the client. The 3224 RS caches the security context together with authorization 3225 information about this client contained in the PoP access token. 3227 Resource 3228 Client Server 3229 | | 3230 C: +-------->| Header: POST (Code=0.02) 3231 | POST | Uri-Path:"authz-info" 3232 | | Payload: SlAV32hkKG ... 3233 | | 3234 |<--------+ Header: 2.04 Changed 3235 | 2.04 | 3236 | | 3238 Figure 20: Access Token provisioning to RS 3239 The client and the RS runs the DTLS handshake using the raw public 3240 keys established in step B and C. 3241 The client sends the CoAP request GET to /temperature on RS over 3242 DTLS. The RS verifies that the request is authorized, based on 3243 previously established security context. 3244 F: The RS responds with a resource representation over DTLS. 3246 Resource 3247 Client Server 3248 | | 3249 |<=======>| DTLS Connection Establishment 3250 | | using Raw Public Keys 3251 | | 3252 +-------->| Header: GET (Code=0.01) 3253 | GET | Uri-Path: "temperature" 3254 | | 3255 | | 3256 | | 3257 F: |<--------+ Header: 2.05 Content 3258 | 2.05 | Payload: 3259 | | 3261 Figure 21: Resource Request and Response protected by DTLS. 3263 E.2. Introspection Aided Token Validation 3265 In this deployment scenario it is assumed that a client is not able 3266 to access the AS at the time of the access request, whereas the RS is 3267 assumed to be connected to the back-end infrastructure. Thus the RS 3268 can make use of token introspection. This access procedure involves 3269 steps A-F of Figure 1, but assumes steps A and B have been carried 3270 out during a phase when the client had connectivity to AS. 3272 Since the client is assumed to be offline, at least for a certain 3273 period of time, a pre-provisioned access token has to be long-lived. 3274 Since the client is constrained, the token will not be self contained 3275 (i.e. not a CWT) but instead just a reference. The resource server 3276 uses its connectivity to learn about the claims associated to the 3277 access token by using introspection, which is shown in the example 3278 below. 3280 In the example interactions between an offline client (key fob), a RS 3281 (online lock), and an AS is shown. It is assumed that there is a 3282 provisioning step where the client has access to the AS. This 3283 corresponds to message exchanges A and B which are shown in 3284 Figure 22. 3286 Authorization consent from the resource owner can be pre-configured, 3287 but it can also be provided via an interactive flow with the resource 3288 owner. An example of this for the key fob case could be that the 3289 resource owner has a connected car, he buys a generic key that he 3290 wants to use with the car. To authorize the key fob he connects it 3291 to his computer that then provides the UI for the device. After that 3292 OAuth 2.0 implicit flow can used to authorize the key for his car at 3293 the the car manufacturers AS. 3295 Note: In this example the client does not know the exact door it will 3296 be used to access since the token request is not send at the time of 3297 access. So the scope and audience parameters are set quite wide to 3298 start with and new values different form the original once can be 3299 returned from introspection later on. 3301 A: The client sends the request using POST to the token endpoint 3302 at AS. The request contains the Audience parameter set to 3303 "PACS1337" (PACS, Physical Access System), a value the that the 3304 online door in question identifies itself with. The AS generates 3305 an access token as an opaque string, which it can match to the 3306 specific client, a targeted audience and a symmetric key. The 3307 security is provided by identifying the AS on transport layer 3308 using a pre shared security context (psk, rpk or certificate) and 3309 then the client is identified using client_id and client_secret as 3310 in classic OAuth. 3311 B: The AS responds with the an access token and Access 3312 Information, the latter containing a symmetric key. Communication 3313 security between C and RS will be DTLS and PreSharedKey. The PoP 3314 key is used as the PreSharedKey. 3316 Authorization 3317 Client Server 3318 | | 3319 | | 3320 A: +-------->| Header: POST (Code=0.02) 3321 | POST | Uri-Path:"token" 3322 | | Content-Format: application/ace+cbor 3323 | | Payload: 3324 | | 3325 B: |<--------+ Header: 2.05 Content 3326 | | Content-Format: application/ace+cbor 3327 | 2.05 | Payload: 3328 | | 3330 Figure 22: Token Request and Response using Client Credentials. 3332 The information contained in the Request-Payload and the Response- 3333 Payload is shown in Figure 23. 3335 Request-Payload: 3336 { 3337 "client_id" : "keyfob", 3338 "client_secret" : "qwerty" 3339 } 3341 Response-Payload: 3342 { 3343 "access_token" : b64'VGVzdCB0b2tlbg==', 3344 "cnf" : { 3345 "COSE_Key" : { 3346 "kid" : b64'c29tZSBwdWJsaWMga2V5IGlk', 3347 "kty" : "oct", 3348 "alg" : "HS256", 3349 "k": b64'ZoRSOrFzN_FzUA5XKMYoVHyzff5oRJxl-IXRtztJ6uE' 3350 } 3351 } 3352 } 3354 Figure 23: Request and Response Payload for C offline 3356 The access token in this case is just an opaque byte string 3357 referencing the authorization information at the AS. 3359 C: Next, the client POSTs the access token to the authz-info 3360 endpoint in the RS. This is a plain CoAP request, i.e., no DTLS 3361 between client and RS. Since the token is an opaque string, the 3362 RS cannot verify it on its own, and thus defers to respond the 3363 client with a status code until after step E. 3364 D: The RS forwards the token to the introspection endpoint on the 3365 AS. Introspection assumes a secure connection between the AS and 3366 the RS, e.g., using transport of application layer security. In 3367 the example AS is identified using pre shared security context 3368 (psk, rpk or certificate) while RS is acting as client and is 3369 identified with client_id and client_secret. 3370 E: The AS provides the introspection response containing 3371 parameters about the token. This includes the confirmation key 3372 (cnf) parameter that allows the RS to verify the client's proof of 3373 possession in step F. 3374 After receiving message E, the RS responds to the client's POST in 3375 step C with the CoAP response code 2.01 (Created). 3377 Resource 3378 Client Server 3379 | | 3380 C: +-------->| Header: POST (T=CON, Code=0.02) 3381 | POST | Uri-Path:"authz-info" 3382 | | Payload: b64'VGVzdCB0b2tlbg==' 3383 | | 3384 | | Authorization 3385 | | Server 3386 | | | 3387 | D: +--------->| Header: POST (Code=0.02) 3388 | | POST | Uri-Path: "introspect" 3389 | | | Content-Format: "application/ace+cbor" 3390 | | | Payload: 3391 | | | 3392 | E: |<---------+ Header: 2.05 Content 3393 | | 2.05 | Content-Format: "application/ace+cbor" 3394 | | | Payload: 3395 | | | 3396 | | 3397 |<--------+ Header: 2.01 Created 3398 | 2.01 | 3399 | | 3401 Figure 24: Token Introspection for C offline 3402 The information contained in the Request-Payload and the Response- 3403 Payload is shown in Figure 25. 3405 Request-Payload: 3406 { 3407 "token" : b64'VGVzdCB0b2tlbg==', 3408 "client_id" : "FrontDoor", 3409 "client_secret" : "ytrewq" 3410 } 3412 Response-Payload: 3413 { 3414 "active" : true, 3415 "aud" : "lockOfDoor4711", 3416 "scope" : "open, close", 3417 "iat" : 1311280970, 3418 "cnf" : { 3419 "kid" : b64'c29tZSBwdWJsaWMga2V5IGlk' 3420 } 3421 } 3423 Figure 25: Request and Response Payload for Introspection 3425 The client uses the symmetric PoP key to establish a DTLS 3426 PreSharedKey secure connection to the RS. The CoAP request PUT is 3427 sent to the uri-path /state on the RS, changing the state of the 3428 door to locked. 3429 F: The RS responds with a appropriate over the secure DTLS 3430 channel. 3432 Resource 3433 Client Server 3434 | | 3435 |<=======>| DTLS Connection Establishment 3436 | | using Pre Shared Key 3437 | | 3438 +-------->| Header: PUT (Code=0.03) 3439 | PUT | Uri-Path: "state" 3440 | | Payload: 3441 | | 3442 F: |<--------+ Header: 2.04 Changed 3443 | 2.04 | Payload: 3444 | | 3446 Figure 26: Resource request and response protected by OSCORE 3448 Appendix F. Document Updates 3450 RFC EDITOR: PLEASE REMOVE THIS SECTION. 3452 F.1. Version -21 to 22 3454 o Provided section numbers in references to OAuth RFC. 3455 o Updated IANA mapping registries to only use "Private Use" and 3456 "Expert Review". 3457 o Made error messages optional for RS at token submission since it 3458 may not be able to send them depending on the profile. 3459 o Corrected errors in examples. 3461 F.2. Version -20 to 21 3463 o Added text about expiration of RS keys. 3465 F.3. Version -19 to 20 3467 o Replaced "req_aud" with "audience" from the OAuth token exchange 3468 draft. 3469 o Updated examples to remove unnecessary elements. 3471 F.4. Version -18 to -19 3473 o Added definition of "Authorization Information". 3474 o Explicitly state that ACE allows encoding refresh tokens in binary 3475 format in addition to strings. 3476 o Renamed "AS Information" to "AS Request Creation Hints" and added 3477 the possibility to specify req_aud and scope as hints. 3478 o Added the "kid" parameter to AS Request Creation Hints. 3479 o Added security considerations about the integrity protection of 3480 tokens with multi-RS audiences. 3481 o Renamed IANA registries mapping OAuth parameters to reflect the 3482 mapped registry. 3483 o Added JWT claim names to CWT claim registrations. 3484 o Added expert review instructions. 3485 o Updated references to TLS from 1.2 to 1.3. 3487 F.5. Version -17 to -18 3489 o Added OSCORE options in examples involving OSCORE. 3490 o Removed requirement for the client to send application/cwt, since 3491 the client has no way to know. 3492 o Clarified verification of tokens by the RS. 3493 o Added exi claim CWT registration. 3495 F.6. Version -16 to -17 3497 o Added references to (D)TLS 1.3. 3498 o Added requirement that responses are bound to requests. 3499 o Specify that grant_type is OPTIONAL in C2AS requests (as opposed 3500 to REQUIRED in OAuth). 3501 o Replaced examples with hypothetical COSE profile with OSCORE. 3502 o Added requirement for content type application/ace+cbor in error 3503 responses for token and introspection requests and responses. 3504 o Reworked abbreviation space for claims, request and response 3505 parameters. 3506 o Added text that the RS may indicate that it is busy at the authz- 3507 info resource. 3508 o Added section that specifies how the RS verifies an access token. 3509 o Added section on the protection of the authz-info endpoint. 3510 o Removed the expiration mechanism based on sequence numbers. 3511 o Added reference to RFC7662 security considerations. 3512 o Added considerations on minimal security requirements for 3513 communication. 3514 o Added security considerations on unprotected information sent to 3515 authz-info and in the error responses. 3517 F.7. Version -15 to -16 3519 o Added text the RS using RFC6750 error codes. 3520 o Defined an error code for incompatible token request parameters. 3521 o Removed references to the actors draft. 3522 o Fixed errors in examples. 3524 F.8. Version -14 to -15 3526 o Added text about refresh tokens. 3527 o Added text about protection of credentials. 3528 o Rephrased introspection so that other entities than RS can do it. 3529 o Editorial improvements. 3531 F.9. Version -13 to -14 3533 o Split out the 'aud', 'cnf' and 'rs_cnf' parameters to 3534 [I-D.ietf-ace-oauth-params] 3535 o Introduced the "application/ace+cbor" Content-Type. 3536 o Added claim registrations from 'profile' and 'rs_cnf'. 3537 o Added note on schema part of AS Information Section 5.1.2 3538 o Realigned the parameter abbreviations to push rarely used ones to 3539 the 2-byte encoding size of CBOR integers. 3541 F.10. Version -12 to -13 3543 o Changed "Resource Information" to "Access Information" to avoid 3544 confusion. 3545 o Clarified section about AS discovery. 3546 o Editorial changes 3548 F.11. Version -11 to -12 3550 o Moved the Request error handling to a section of its own. 3551 o Require the use of the abbreviation for profile identifiers. 3552 o Added rs_cnf parameter in the introspection response, to inform 3553 RS' with several RPKs on which key to use. 3554 o Allowed use of rs_cnf as claim in the access token in order to 3555 inform an RS with several RPKs on which key to use. 3556 o Clarified that profiles must specify if/how error responses are 3557 protected. 3558 o Fixed label number range to align with COSE/CWT. 3559 o Clarified the requirements language in order to allow profiles to 3560 specify other payload formats than CBOR if they do not use CoAP. 3562 F.12. Version -10 to -11 3564 o Fixed some CBOR data type errors. 3565 o Updated boilerplate text 3567 F.13. Version -09 to -10 3569 o Removed CBOR major type numbers. 3570 o Removed the client token design. 3571 o Rephrased to clarify that other protocols than CoAP can be used. 3572 o Clarifications regarding the use of HTTP 3574 F.14. Version -08 to -09 3576 o Allowed scope to be byte strings. 3577 o Defined default names for endpoints. 3578 o Refactored the IANA section for briefness and consistency. 3579 o Refactored tables that define IANA registry contents for 3580 consistency. 3581 o Created IANA registry for CBOR mappings of error codes, grant 3582 types and Authorization Server Information. 3583 o Added references to other document sections defining IANA entries 3584 in the IANA section. 3586 F.15. Version -07 to -08 3588 o Moved AS discovery from the DTLS profile to the framework, see 3589 Section 5.1. 3590 o Made the use of CBOR mandatory. If you use JSON you can use 3591 vanilla OAuth. 3592 o Made it mandatory for profiles to specify C-AS security and RS-AS 3593 security (the latter only if introspection is supported). 3594 o Made the use of CBOR abbreviations mandatory. 3595 o Added text to clarify the use of token references as an 3596 alternative to CWTs. 3597 o Added text to clarify that introspection must not be delayed, in 3598 case the RS has to return a client token. 3599 o Added security considerations about leakage through unprotected AS 3600 discovery information, combining profiles and leakage through 3601 error responses. 3602 o Added privacy considerations about leakage through unprotected AS 3603 discovery. 3604 o Added text that clarifies that introspection is optional. 3605 o Made profile parameter optional since it can be implicit. 3606 o Clarified that CoAP is not mandatory and other protocols can be 3607 used. 3608 o Clarified the design justification for specific features of the 3609 framework in appendix A. 3611 o Clarified appendix E.2. 3612 o Removed specification of the "cnf" claim for CBOR/COSE, and 3613 replaced with references to [I-D.ietf-ace-cwt-proof-of-possession] 3615 F.16. Version -06 to -07 3617 o Various clarifications added. 3618 o Fixed erroneous author email. 3620 F.17. Version -05 to -06 3622 o Moved sections that define the ACE framework into a subsection of 3623 the framework Section 5. 3624 o Split section on client credentials and grant into two separate 3625 sections, Section 5.2, and Section 5.3. 3626 o Added Section 5.4 on AS authentication. 3627 o Added Section 5.5 on the Authorization endpoint. 3629 F.18. Version -04 to -05 3631 o Added RFC 2119 language to the specification of the required 3632 behavior of profile specifications. 3633 o Added Section 5.3 on the relation to the OAuth2 grant types. 3634 o Added CBOR abbreviations for error and the error codes defined in 3635 OAuth2. 3636 o Added clarification about token expiration and long-running 3637 requests in Section 5.8.3 3638 o Added security considerations about tokens with symmetric pop keys 3639 valid for more than one RS. 3640 o Added privacy considerations section. 3641 o Added IANA registry mapping the confirmation types from RFC 7800 3642 to equivalent COSE types. 3643 o Added appendix D, describing assumptions about what the AS knows 3644 about the client and the RS. 3646 F.19. Version -03 to -04 3648 o Added a description of the terms "framework" and "profiles" as 3649 used in this document. 3650 o Clarified protection of access tokens in section 3.1. 3651 o Clarified uses of the "cnf" parameter in section 6.4.5. 3652 o Clarified intended use of Client Token in section 7.4. 3654 F.20. Version -02 to -03 3656 o Removed references to draft-ietf-oauth-pop-key-distribution since 3657 the status of this draft is unclear. 3659 o Copied and adapted security considerations from draft-ietf-oauth- 3660 pop-key-distribution. 3661 o Renamed "client information" to "RS information" since it is 3662 information about the RS. 3663 o Clarified the requirements on profiles of this framework. 3664 o Clarified the token endpoint protocol and removed negotiation of 3665 "profile" and "alg" (section 6). 3666 o Renumbered the abbreviations for claims and parameters to get a 3667 consistent numbering across different endpoints. 3668 o Clarified the introspection endpoint. 3669 o Renamed token, introspection and authz-info to "endpoint" instead 3670 of "resource" to mirror the OAuth 2.0 terminology. 3671 o Updated the examples in the appendices. 3673 F.21. Version -01 to -02 3675 o Restructured to remove communication security parts. These shall 3676 now be defined in profiles. 3677 o Restructured section 5 to create new sections on the OAuth 3678 endpoints token, introspection and authz-info. 3679 o Pulled in material from draft-ietf-oauth-pop-key-distribution in 3680 order to define proof-of-possession key distribution. 3681 o Introduced the "cnf" parameter as defined in RFC7800 to reference 3682 or transport keys used for proof of possession. 3683 o Introduced the "client-token" to transport client information from 3684 the AS to the client via the RS in conjunction with introspection. 3685 o Expanded the IANA section to define parameters for token request, 3686 introspection and CWT claims. 3687 o Moved deployment scenarios to the appendix as examples. 3689 F.22. Version -00 to -01 3691 o Changed 5.1. from "Communication Security Protocol" to "Client 3692 Information". 3693 o Major rewrite of 5.1 to clarify the information exchanged between 3694 C and AS in the PoP access token request profile for IoT. 3696 * Allow the client to indicate preferences for the communication 3697 security protocol. 3698 * Defined the term "Client Information" for the additional 3699 information returned to the client in addition to the access 3700 token. 3701 * Require that the messages between AS and client are secured, 3702 either with (D)TLS or with COSE_Encrypted wrappers. 3703 * Removed dependency on OSCOAP and added generic text about 3704 object security instead. 3705 * Defined the "rpk" parameter in the client information to 3706 transmit the raw public key of the RS from AS to client. 3708 * (D)TLS MUST use the PoP key in the handshake (either as PSK or 3709 as client RPK with client authentication). 3710 * Defined the use of x5c, x5t and x5tS256 parameters when a 3711 client certificate is used for proof of possession. 3712 * Defined "tktn" parameter for signaling for how to transfer the 3713 access token. 3714 o Added 5.2. the CoAP Access-Token option for transferring access 3715 tokens in messages that do not have payload. 3716 o 5.3.2. Defined success and error responses from the RS when 3717 receiving an access token. 3718 o 5.6.:Added section giving guidance on how to handle token 3719 expiration in the absence of reliable time. 3720 o Appendix B Added list of roles and responsibilities for C, AS and 3721 RS. 3723 Authors' Addresses 3725 Ludwig Seitz 3726 RISE 3727 Scheelevaegen 17 3728 Lund 223 70 3729 Sweden 3731 Email: ludwig.seitz@ri.se 3733 Goeran Selander 3734 Ericsson 3735 Faroegatan 6 3736 Kista 164 80 3737 Sweden 3739 Email: goran.selander@ericsson.com 3741 Erik Wahlstroem 3742 Sweden 3744 Email: erik@wahlstromstekniska.se 3746 Samuel Erdtman 3747 Spotify AB 3748 Birger Jarlsgatan 61, 4tr 3749 Stockholm 113 56 3750 Sweden 3752 Email: erdtman@spotify.com 3753 Hannes Tschofenig 3754 Arm Ltd. 3755 Absam 6067 3756 Austria 3758 Email: Hannes.Tschofenig@arm.com