idnits 2.17.00 (12 Aug 2021) /tmp/idnits27429/draft-ietf-ace-oauth-authz-15.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 (September 27, 2018) is 1331 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' ** Obsolete normative reference: RFC 6347 (Obsoleted by RFC 9147) -- No information found for draft-erdtman-ace-rpcc - is the name correct? -- No information found for draft-ietf-ace-actors - 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? -- Obsolete informational reference (is this intentional?): RFC 5246 (Obsoleted by RFC 8446) -- Obsolete informational reference (is this intentional?): RFC 7049 (Obsoleted by RFC 8949) Summary: 1 error (**), 0 flaws (~~), 2 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: March 31, 2019 Ericsson 6 E. Wahlstroem 8 S. Erdtman 9 Spotify AB 10 H. Tschofenig 11 Arm Ltd. 12 September 27, 2018 14 Authentication and Authorization for Constrained Environments (ACE) 15 using the OAuth 2.0 Framework (ACE-OAuth) 16 draft-ietf-ace-oauth-authz-15 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 http://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 March 31, 2019. 46 Copyright Notice 48 Copyright (c) 2018 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 (http://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 . . . . . . . . . . . . . . . . . . . . . . . . . . 5 66 3.1. OAuth 2.0 . . . . . . . . . . . . . . . . . . . . . . . . 6 67 3.2. CoAP . . . . . . . . . . . . . . . . . . . . . . . . . . 10 68 4. Protocol Interactions . . . . . . . . . . . . . . . . . . . . 10 69 5. Framework . . . . . . . . . . . . . . . . . . . . . . . . . . 14 70 5.1. Discovering Authorization Servers . . . . . . . . . . . . 15 71 5.1.1. Unauthorized Resource Request Message . . . . . . . . 15 72 5.1.2. AS Information . . . . . . . . . . . . . . . . . . . 16 73 5.2. Authorization Grants . . . . . . . . . . . . . . . . . . 17 74 5.3. Client Credentials . . . . . . . . . . . . . . . . . . . 18 75 5.4. AS Authentication . . . . . . . . . . . . . . . . . . . . 18 76 5.5. The Authorization Endpoint . . . . . . . . . . . . . . . 18 77 5.6. The Token Endpoint . . . . . . . . . . . . . . . . . . . 19 78 5.6.1. Client-to-AS Request . . . . . . . . . . . . . . . . 19 79 5.6.2. AS-to-Client Response . . . . . . . . . . . . . . . . 22 80 5.6.3. Error Response . . . . . . . . . . . . . . . . . . . 24 81 5.6.4. Request and Response Parameters . . . . . . . . . . . 25 82 5.6.4.1. Grant Type . . . . . . . . . . . . . . . . . . . 25 83 5.6.4.2. Token Type . . . . . . . . . . . . . . . . . . . 26 84 5.6.4.3. Profile . . . . . . . . . . . . . . . . . . . . . 26 85 5.6.5. Mapping Parameters to CBOR . . . . . . . . . . . . . 26 86 5.7. The Introspection Endpoint . . . . . . . . . . . . . . . 27 87 5.7.1. Introspection Request . . . . . . . . . . . . . . . . 28 88 5.7.2. Introspection Response . . . . . . . . . . . . . . . 28 89 5.7.3. Error Response . . . . . . . . . . . . . . . . . . . 29 90 5.7.4. Mapping Introspection parameters to CBOR . . . . . . 30 91 5.8. The Access Token . . . . . . . . . . . . . . . . . . . . 31 92 5.8.1. The Authorization Information Endpoint . . . . . . . 31 93 5.8.2. Client Requests to the RS . . . . . . . . . . . . . . 32 94 5.8.3. Token Expiration . . . . . . . . . . . . . . . . . . 33 95 6. Security Considerations . . . . . . . . . . . . . . . . . . . 34 96 6.1. Unprotected AS Information . . . . . . . . . . . . . . . 35 97 6.2. Use of Nonces for Replay Protection . . . . . . . . . . . 35 98 6.3. Combining profiles . . . . . . . . . . . . . . . . . . . 35 99 6.4. Error responses . . . . . . . . . . . . . . . . . . . . . 36 100 7. Privacy Considerations . . . . . . . . . . . . . . . . . . . 36 101 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 37 102 8.1. Authorization Server Information . . . . . . . . . . . . 37 103 8.2. OAuth Error Code CBOR Mappings Registry . . . . . . . . . 37 104 8.3. OAuth Grant Type CBOR Mappings . . . . . . . . . . . . . 38 105 8.4. OAuth Access Token Types . . . . . . . . . . . . . . . . 38 106 8.5. OAuth Token Type CBOR Mappings . . . . . . . . . . . . . 39 107 8.5.1. Initial Registry Contents . . . . . . . . . . . . . . 39 108 8.6. ACE Profile Registry . . . . . . . . . . . . . . . . . . 39 109 8.7. OAuth Parameter Registration . . . . . . . . . . . . . . 40 110 8.8. OAuth CBOR Parameter Mappings Registry . . . . . . . . . 40 111 8.9. OAuth Introspection Response Parameter Registration . . . 41 112 8.10. Introspection Endpoint CBOR Mappings Registry . . . . . . 41 113 8.11. JSON Web Token Claims . . . . . . . . . . . . . . . . . . 42 114 8.12. CBOR Web Token Claims . . . . . . . . . . . . . . . . . . 42 115 8.13. Media Type Registrations . . . . . . . . . . . . . . . . 43 116 8.14. CoAP Content-Format Registry . . . . . . . . . . . . . . 44 117 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 44 118 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 44 119 10.1. Normative References . . . . . . . . . . . . . . . . . . 44 120 10.2. Informative References . . . . . . . . . . . . . . . . . 46 121 Appendix A. Design Justification . . . . . . . . . . . . . . . . 49 122 Appendix B. Roles and Responsibilities . . . . . . . . . . . . . 52 123 Appendix C. Requirements on Profiles . . . . . . . . . . . . . . 54 124 Appendix D. Assumptions on AS knowledge about C and RS . . . . . 55 125 Appendix E. Deployment Examples . . . . . . . . . . . . . . . . 55 126 E.1. Local Token Validation . . . . . . . . . . . . . . . . . 56 127 E.2. Introspection Aided Token Validation . . . . . . . . . . 60 128 Appendix F. Document Updates . . . . . . . . . . . . . . . . . . 64 129 F.1. Version -14 to -15 . . . . . . . . . . . . . . . . . . . 64 130 F.2. Version -13 to -14 . . . . . . . . . . . . . . . . . . . 64 131 F.3. Version -12 to -13 . . . . . . . . . . . . . . . . . . . 65 132 F.4. Version -11 to -12 . . . . . . . . . . . . . . . . . . . 65 133 F.5. Version -10 to -11 . . . . . . . . . . . . . . . . . . . 65 134 F.6. Version -09 to -10 . . . . . . . . . . . . . . . . . . . 65 135 F.7. Version -08 to -09 . . . . . . . . . . . . . . . . . . . 65 136 F.8. Version -07 to -08 . . . . . . . . . . . . . . . . . . . 66 137 F.9. Version -06 to -07 . . . . . . . . . . . . . . . . . . . 66 138 F.10. Version -05 to -06 . . . . . . . . . . . . . . . . . . . 66 139 F.11. Version -04 to -05 . . . . . . . . . . . . . . . . . . . 66 140 F.12. Version -03 to -04 . . . . . . . . . . . . . . . . . . . 67 141 F.13. Version -02 to -03 . . . . . . . . . . . . . . . . . . . 67 142 F.14. Version -01 to -02 . . . . . . . . . . . . . . . . . . . 67 143 F.15. Version -00 to -01 . . . . . . . . . . . . . . . . . . . 68 144 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 68 146 1. Introduction 148 Authorization is the process for granting approval to an entity to 149 access a resource [RFC4949]. The authorization task itself can best 150 be described as granting access to a requesting client, for a 151 resource hosted on a device, the resource server (RS). This exchange 152 is mediated by one or multiple authorization servers (AS). Managing 153 authorization for a large number of devices and users can be a 154 complex task. 156 While prior work on authorization solutions for the Web and for the 157 mobile environment also applies to the Internet of Things (IoT) 158 environment, many IoT devices are constrained, for example, in terms 159 of processing capabilities, available memory, etc. For web 160 applications on constrained nodes, this specification RECOMMENDS the 161 use of CoAP [RFC7252] as replacement for HTTP. 163 A detailed treatment of constraints can be found in [RFC7228], and 164 the different IoT deployments present a continuous range of device 165 and network capabilities. Taking energy consumption as an example: 166 At one end there are energy-harvesting or battery powered devices 167 which have a tight power budget, on the other end there are mains- 168 powered devices, and all levels in between. 170 Hence, IoT devices may be very different in terms of available 171 processing and message exchange capabilities and there is a need to 172 support many different authorization use cases [RFC7744]. 174 This specification describes a framework for authentication and 175 authorization in constrained environments (ACE) built on re-use of 176 OAuth 2.0 [RFC6749], thereby extending authorization to Internet of 177 Things devices. This specification contains the necessary building 178 blocks for adjusting OAuth 2.0 to IoT environments. 180 More detailed, interoperable specifications can be found in profiles. 181 Implementations may claim conformance with a specific profile, 182 whereby implementations utilizing the same profile interoperate while 183 implementations of different profiles are not expected to be 184 interoperable. Some devices, such as mobile phones and tablets, may 185 implement multiple profiles and will therefore be able to interact 186 with a wider range of low end devices. Requirements on profiles are 187 described at contextually appropriate places throughout this 188 specification, and also summarized in Appendix C. 190 2. Terminology 192 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 193 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 194 "OPTIONAL" in this document are to be interpreted as described in BCP 195 14 [RFC2119] [RFC8174] when, and only when, they appear in all 196 capitals, as shown here. 198 Certain security-related terms such as "authentication", 199 "authorization", "confidentiality", "(data) integrity", "message 200 authentication code", and "verify" are taken from [RFC4949]. 202 Since exchanges in this specification are described as RESTful 203 protocol interactions, HTTP [RFC7231] offers useful terminology. 205 Terminology for entities in the architecture is defined in OAuth 2.0 206 [RFC6749] and [I-D.ietf-ace-actors], such as client (C), resource 207 server (RS), and authorization server (AS). 209 Note that the term "endpoint" is used here following its OAuth 210 definition, which is to denote resources such as token and 211 introspection at the AS and authz-info at the RS (see Section 5.8.1 212 for a definition of the authz-info endpoint). The CoAP [RFC7252] 213 definition, which is "An entity participating in the CoAP protocol" 214 is not used in this specification. 216 Since this specification focuses on the problem of access control to 217 resources, the actors has been simplified by assuming that the client 218 authorization server (CAS) functionality is not stand-alone but 219 subsumed by either the authorization server or the client (see 220 Section 2.2 in [I-D.ietf-ace-actors]). 222 The specifications in this document is called the "framework" or "ACE 223 framework". When referring to "profiles of this framework" it refers 224 to additional specifications that define the use of this 225 specification with concrete transport, and communication security 226 protocols (e.g., CoAP over DTLS). 228 We use the term "Access Information" for parameters other than the 229 access token provided to the client by the AS to enable it to access 230 the RS (e.g. public key of the RS, profile supported by RS). 232 3. Overview 234 This specification defines the ACE framework for authorization in the 235 Internet of Things environment. It consists of a set of building 236 blocks. 238 The basic block is the OAuth 2.0 [RFC6749] framework, which enjoys 239 widespread deployment. Many IoT devices can support OAuth 2.0 240 without any additional extensions, but for certain constrained 241 settings additional profiling is needed. 243 Another building block is the lightweight web transfer protocol CoAP 244 [RFC7252], for those communication environments where HTTP is not 245 appropriate. CoAP typically runs on top of UDP, which further 246 reduces overhead and message exchanges. While this specification 247 defines extensions for the use of OAuth over CoAP, other underlying 248 protocols are not prohibited from being supported in the future, such 249 as HTTP/2, MQTT, BLE and QUIC. 251 A third building block is CBOR [RFC7049], for encodings where JSON 252 [RFC8259] is not sufficiently compact. CBOR is a binary encoding 253 designed for small code and message size, which may be used for 254 encoding of self contained tokens, and also for encoding payload 255 transferred in protocol messages. 257 A fourth building block is the compact CBOR-based secure message 258 format COSE [RFC8152], which enables application layer security as an 259 alternative or complement to transport layer security (DTLS [RFC6347] 260 or TLS [RFC5246]). COSE is used to secure self-contained tokens such 261 as proof-of-possession (PoP) tokens, which is an extension to the 262 OAuth tokens. The default token format is defined in CBOR web token 263 (CWT) [RFC8392]. Application layer security for CoAP using COSE can 264 be provided with OSCORE [I-D.ietf-core-object-security]. 266 With the building blocks listed above, solutions satisfying various 267 IoT device and network constraints are possible. A list of 268 constraints is described in detail in RFC 7228 [RFC7228] and a 269 description of how the building blocks mentioned above relate to the 270 various constraints can be found in Appendix A. 272 Luckily, not every IoT device suffers from all constraints. The ACE 273 framework nevertheless takes all these aspects into account and 274 allows several different deployment variants to co-exist, rather than 275 mandating a one-size-fits-all solution. It is important to cover the 276 wide range of possible interworking use cases and the different 277 requirements from a security point of view. Once IoT deployments 278 mature, popular deployment variants will be documented in the form of 279 ACE profiles. 281 3.1. OAuth 2.0 283 The OAuth 2.0 authorization framework enables a client to obtain 284 scoped access to a resource with the permission of a resource owner. 285 Authorization information, or references to it, is passed between the 286 nodes using access tokens. These access tokens are issued to clients 287 by an authorization server with the approval of the resource owner. 288 The client uses the access token to access the protected resources 289 hosted by the resource server. 291 A number of OAuth 2.0 terms are used within this specification: 293 The token and introspection Endpoints: 294 The AS hosts the token endpoint that allows a client to request 295 access tokens. The client makes a POST request to the token 296 endpoint on the AS and receives the access token in the response 297 (if the request was successful). 298 In some deployments, a token introspection endpoint is provided by 299 the AS, which can be used by the RS if it needs to request 300 additional information regarding a received access token. The RS 301 makes a POST request to the introspection endpoint on the AS and 302 receives information about the access token in the response. (See 303 "Introspection" below.) 305 Access Tokens: 306 Access tokens are credentials needed to access protected 307 resources. An access token is a data structure representing 308 authorization permissions issued by the AS to the client. Access 309 tokens are generated by the AS and consumed by the RS. The access 310 token content is opaque to the client. 312 Access tokens can have different formats, and various methods of 313 utilization (e.g., cryptographic properties) based on the security 314 requirements of the given deployment. 316 Refresh Tokens: 317 Refresh tokens are credentials used to obtain access tokens. 318 Refresh tokens are issued to the client by the authorization 319 server and are used to obtain a new access token when the current 320 access token becomes invalid or expires, or to obtain additional 321 access tokens with identical or narrower scope (access tokens may 322 have a shorter lifetime and fewer permissions than authorized by 323 the resource owner). Issuing a refresh token is optional at the 324 discretion of the authorization server. If the authorization 325 server issues a refresh token, it is included when issuing an 326 access token (i.e., step (B) in Figure 1). 328 A refresh token is a string representing the authorization granted 329 to the client by the resource owner. The string is usually opaque 330 to the client. The token denotes an identifier used to retrieve 331 the authorization information. Unlike access tokens, refresh 332 tokens are intended for use only with authorization servers and 333 are never sent to resource servers. 334 Proof of Possession Tokens: 335 An access token may be bound to a cryptographic key, which is then 336 used by an RS to authenticate requests from a client. Such tokens 337 are called proof-of-possession access tokens (or PoP access 338 tokens). 340 The proof-of-possession (PoP) security concept assumes that the AS 341 acts as a trusted third party that binds keys to access tokens. 342 These so called PoP keys are then used by the client to 343 demonstrate the possession of the secret to the RS when accessing 344 the resource. The RS, when receiving an access token, needs to 345 verify that the key used by the client matches the one bound to 346 the access token. When this specification uses the term "access 347 token" it is assumed to be a PoP access token token unless 348 specifically stated otherwise. 350 The key bound to the access token (the PoP key) may use either 351 symmetric or asymmetric cryptography. The appropriate choice of 352 the kind of cryptography depends on the constraints of the IoT 353 devices as well as on the security requirements of the use case. 355 Symmetric PoP key: 356 The AS generates a random symmetric PoP key. The key is either 357 stored to be returned on introspection calls or encrypted and 358 included in the access token. The PoP key is also encrypted 359 for the client and sent together with the access token to the 360 client. 362 Asymmetric PoP key: 363 An asymmetric key pair is generated on the client and the 364 public key is sent to the AS (if it does not already have 365 knowledge of the client's public key). Information about the 366 public key, which is the PoP key in this case, is either stored 367 to be returned on introspection calls or included inside the 368 access token and sent back to the requesting client. The RS 369 can identify the client's public key from the information in 370 the token, which allows the client to use the corresponding 371 private key for the proof of possession. 373 The access token is either a simple reference, or a structured 374 information object (e.g., CWT [RFC8392]) protected by a 375 cryptographic wrapper (e.g., COSE [RFC8152]). The choice of PoP 376 key does not necessarily imply a specific credential type for the 377 integrity protection of the token. 379 Scopes and Permissions: 380 In OAuth 2.0, the client specifies the type of permissions it is 381 seeking to obtain (via the scope parameter) in the access token 382 request. In turn, the AS may use the scope response parameter to 383 inform the client of the scope of the access token issued. As the 384 client could be a constrained device as well, this specification 385 defines the use of CBOR encoding as data format, see Section 5, to 386 request scopes and to be informed what scopes the access token 387 actually authorizes. 389 The values of the scope parameter in OAuth 2.0 are expressed as a 390 list of space-delimited, case-sensitive strings, with a semantic 391 that is well-known to the AS and the RS. More details about the 392 concept of scopes is found under Section 3.3 in [RFC6749]. 394 Claims: 395 Information carried in the access token or returned from 396 introspection, called claims, is in the form of name-value pairs. 397 An access token may, for example, include a claim identifying the 398 AS that issued the token (via the "iss" claim) and what audience 399 the access token is intended for (via the "aud" claim). The 400 audience of an access token can be a specific resource or one or 401 many resource servers. The resource owner policies influence what 402 claims are put into the access token by the authorization server. 404 While the structure and encoding of the access token varies 405 throughout deployments, a standardized format has been defined 406 with the JSON Web Token (JWT) [RFC7519] where claims are encoded 407 as a JSON object. In [RFC8392], an equivalent format using CBOR 408 encoding (CWT) has been defined. 410 Introspection: 411 Introspection is a method for a resource server to query the 412 authorization server for the active state and content of a 413 received access token. This is particularly useful in those cases 414 where the authorization decisions are very dynamic and/or where 415 the received access token itself is an opaque reference rather 416 than a self-contained token. More information about introspection 417 in OAuth 2.0 can be found in [RFC7662]. 419 3.2. CoAP 421 CoAP is an application layer protocol similar to HTTP, but 422 specifically designed for constrained environments. CoAP typically 423 uses datagram-oriented transport, such as UDP, where reordering and 424 loss of packets can occur. A security solution needs to take the 425 latter aspects into account. 427 While HTTP uses headers and query strings to convey additional 428 information about a request, CoAP encodes such information into 429 header parameters called 'options'. 431 CoAP supports application-layer fragmentation of the CoAP payloads 432 through blockwise transfers [RFC7959]. However, blockwise transfer 433 does not increase the size limits of CoAP options, therefore data 434 encoded in options has to be kept small. 436 Transport layer security for CoAP can be provided by DTLS 1.2 437 [RFC6347] or TLS 1.2 [RFC5246]. CoAP defines a number of proxy 438 operations that require transport layer security to be terminated at 439 the proxy. One approach for protecting CoAP communication end-to-end 440 through proxies, and also to support security for CoAP over a 441 different transport in a uniform way, is to provide security at the 442 application layer using an object-based security mechanism such as 443 COSE [RFC8152]. 445 One application of COSE is OSCORE [I-D.ietf-core-object-security], 446 which provides end-to-end confidentiality, integrity and replay 447 protection, and a secure binding between CoAP request and response 448 messages. In OSCORE, the CoAP messages are wrapped in COSE objects 449 and sent using CoAP. 451 This framework RECOMMENDS the use of CoAP as replacement for HTTP for 452 use in constrained environments. 454 4. Protocol Interactions 456 The ACE framework is based on the OAuth 2.0 protocol interactions 457 using the token endpoint and optionally the introspection endpoint. 458 A client obtains an access token, and optionally a refresh token, 459 from an AS using the token endpoint and subsequently presents the 460 access token to a RS to gain access to a protected resource. In most 461 deployments the RS can process the access token locally, however in 462 some cases the RS may present it to the AS via the introspection 463 endpoint to get fresh information. These interactions are shown in 464 Figure 1. An overview of various OAuth concepts is provided in 465 Section 3.1. 467 The OAuth 2.0 framework defines a number of "protocol flows" via 468 grant types, which have been extended further with extensions to 469 OAuth 2.0 (such as RFC 7521 [RFC7521] and 470 [I-D.ietf-oauth-device-flow]). What grant types works best depends 471 on the usage scenario and RFC 7744 [RFC7744] describes many different 472 IoT use cases but there are two preferred grant types, namely the 473 Authorization Code Grant (described in Section 4.1 of [RFC7521]) and 474 the Client Credentials Grant (described in Section 4.4 of [RFC7521]). 475 The Authorization Code Grant is a good fit for use with apps running 476 on smart phones and tablets that request access to IoT devices, a 477 common scenario in the smart home environment, where users need to go 478 through an authentication and authorization phase (at least during 479 the initial setup phase). The native apps guidelines described in 480 [RFC8252] are applicable to this use case. The Client Credential 481 Grant is a good fit for use with IoT devices where the OAuth client 482 itself is constrained. In such a case, the resource owner has pre- 483 arranged access rights for the client with the authorization server, 484 which is often accomplished using a commissioning tool. 486 The consent of the resource owner, for giving a client access to a 487 protected resource, can be provided dynamically as in the traditional 488 OAuth flows, or it could be pre-configured by the resource owner as 489 authorization policies at the AS, which the AS evaluates when a token 490 request arrives. The resource owner and the requesting party (i.e., 491 client owner) are not shown in Figure 1. 493 This framework supports a wide variety of communication security 494 mechanisms between the ACE entities, such as client, AS, and RS. It 495 is assumed that the client has been registered (also called enrolled 496 or onboarded) to an AS using a mechanism defined outside the scope of 497 this document. In practice, various techniques for onboarding have 498 been used, such as factory-based provisioning or the use of 499 commissioning tools. Regardless of the onboarding technique, this 500 provisioning procedure implies that the client and the AS exchange 501 credentials and configuration parameters. These credentials are used 502 to mutually authenticate each other and to protect messages exchanged 503 between the client and the AS. 505 It is also assumed that the RS has been registered with the AS, 506 potentially in a similar way as the client has been registered with 507 the AS. Established keying material between the AS and the RS allows 508 the AS to apply cryptographic protection to the access token to 509 ensure that its content cannot be modified, and if needed, that the 510 content is confidentiality protected. 512 The keying material necessary for establishing communication security 513 between C and RS is dynamically established as part of the protocol 514 described in this document. 516 At the start of the protocol, there is an optional discovery step 517 where the client discovers the resource server and the resources this 518 server hosts. In this step, the client might also determine what 519 permissions are needed to access the protected resource. A generic 520 procedure is described in Section 5.1, profiles MAY define other 521 procedures for discovery. 523 In Bluetooth Low Energy, for example, advertisements are broadcasted 524 by a peripheral, including information about the primary services. 525 In CoAP, as a second example, a client can make a request to "/.well- 526 known/core" to obtain information about available resources, which 527 are returned in a standardized format as described in [RFC6690]. 529 +--------+ +---------------+ 530 | |---(A)-- Token Request ------->| | 531 | | | Authorization | 532 | |<--(B)-- Access Token ---------| Server | 533 | | + Access Information | | 534 | | + Refresh Token (optional) +---------------+ 535 | | ^ | 536 | | Introspection Request (D)| | 537 | Client | (optional) | | 538 | | Response | |(E) 539 | | (optional) | v 540 | | +--------------+ 541 | |---(C)-- Token + Request ----->| | 542 | | | Resource | 543 | |<--(F)-- Protected Resource ---| Server | 544 | | | | 545 +--------+ +--------------+ 547 Figure 1: Basic Protocol Flow. 549 Requesting an Access Token (A): 550 The client makes an access token request to the token endpoint at 551 the AS. This framework assumes the use of PoP access tokens (see 552 Section 3.1 for a short description) wherein the AS binds a key to 553 an access token. The client may include permissions it seeks to 554 obtain, and information about the credentials it wants to use 555 (e.g., symmetric/asymmetric cryptography or a reference to a 556 specific credential). 558 Access Token Response (B): 559 If the AS successfully processes the request from the client, it 560 returns an access token and optionally a refresh token (note that 561 only certain grant types support refresh tokens). It can also 562 return additional parameters, referred to as "Access Information". 564 In addition to the response parameters defined by OAuth 2.0 and 565 the PoP access token extension, this framework defines parameters 566 that can be used to inform the client about capabilities of the 567 RS. More information about these parameters can be found in 568 Section 5.6.4. 570 Resource Request (C): 571 The client interacts with the RS to request access to the 572 protected resource and provides the access token. The protocol to 573 use between the client and the RS is not restricted to CoAP. 574 HTTP, HTTP/2, QUIC, MQTT, Bluetooth Low Energy, etc., are also 575 viable candidates. 577 Depending on the device limitations and the selected protocol, 578 this exchange may be split up into two parts: 580 (1) the client sends the access token containing, or 581 referencing, the authorization information to the RS, that may 582 be used for subsequent resource requests by the client, and 583 (2) the client makes the resource access request, using the 584 communication security protocol and other Access Information 585 obtained from the AS. 587 The Client and the RS mutually authenticate using the security 588 protocol specified in the profile (see step B) and the keys 589 obtained in the access token or the Access Information. The RS 590 verifies that the token is integrity protected by the AS and 591 compares the claims contained in the access token with the 592 resource request. If the RS is online, validation can be handed 593 over to the AS using token introspection (see messages D and E) 594 over HTTP or CoAP. 596 Token Introspection Request (D): 597 A resource server may be configured to introspect the access token 598 by including it in a request to the introspection endpoint at that 599 AS. Token introspection over CoAP is defined in Section 5.7 and 600 for HTTP in [RFC7662]. 602 Note that token introspection is an optional step and can be 603 omitted if the token is self-contained and the resource server is 604 prepared to perform the token validation on its own. 606 Token Introspection Response (E): 607 The AS validates the token and returns the most recent parameters, 608 such as scope, audience, validity etc. associated with it back to 609 the RS. The RS then uses the received parameters to process the 610 request to either accept or to deny it. 612 Protected Resource (F): 613 If the request from the client is authorized, the RS fulfills the 614 request and returns a response with the appropriate response code. 615 The RS uses the dynamically established keys to protect the 616 response, according to used communication security protocol. 618 5. Framework 620 The following sections detail the profiling and extensions of OAuth 621 2.0 for constrained environments, which constitutes the ACE 622 framework. 624 Credential Provisioning 625 For IoT, it cannot be assumed that the client and RS are part of a 626 common key infrastructure, so the AS provisions credentials or 627 associated information to allow mutual authentication. These 628 credentials need to be provided to the parties before or during 629 the authentication protocol is executed, and may be re-used for 630 subsequent token requests. 632 Proof-of-Possession 633 The ACE framework, by default, implements proof-of-possession for 634 access tokens, i.e., that the token holder can prove being a 635 holder of the key bound to the token. The binding is provided by 636 the "cnf" claim [I-D.ietf-ace-cwt-proof-of-possession] indicating 637 what key is used for proof-of-possession. If a client needs to 638 submit a new access token, e.g., to obtain additional access 639 rights, they can request that the AS binds this token to the same 640 key as the previous one. 642 ACE Profiles 643 The client or RS may be limited in the encodings or protocols it 644 supports. To support a variety of different deployment settings, 645 specific interactions between client and RS are defined in an ACE 646 profile. In ACE framework the AS is expected to manage the 647 matching of compatible profile choices between a client and an RS. 648 The AS informs the client of the selected profile using the 649 "profile" parameter in the token response. 651 OAuth 2.0 requires the use of TLS both to protect the communication 652 between AS and client when requesting an access token; between client 653 and RS when accessing a resource and between AS and RS if 654 introspection is used. In constrained settings TLS is not always 655 feasible, or desirable. Nevertheless it is REQUIRED that the data 656 exchanged with the AS is encrypted and integrity protected. It is 657 furthermore REQUIRED that the AS and the endpoint communicating with 658 it (client or RS) perform mutual authentication. 660 Profiles MUST specify how mutual authentication is done, depending 661 e.g. on the communication protocol and the credentials used by the 662 client or the RS. 664 In OAuth 2.0 the communication with the Token and the Introspection 665 endpoints at the AS is assumed to be via HTTP and may use Uri-query 666 parameters. When profiles of this framework use CoAP instead, this 667 framework REQUIRES the use of the following alternative instead of 668 Uri-query parameters: The sender (client or RS) encodes the 669 parameters of its request as a CBOR map and submits that map as the 670 payload of the POST request. Profiles that use CBOR encoding of 671 protocol message parameters MUST use the media format 'application/ 672 ace+cbor', unless the protocol message is wrapped in another Content- 673 Format (e.g. object security). If CoAP is used for communication, 674 the Content-Format MUST be abbreviated with the ID: 19 (see 675 Section 8.14. 677 The OAuth 2.0 AS uses a JSON structure in the payload of its 678 responses both to client and RS. If CoAP is used, this framework 679 REQUIRES the use of CBOR [RFC7049] instead of JSON. Depending on the 680 profile, the CBOR payload MAY be enclosed in a non-CBOR cryptographic 681 wrapper. 683 5.1. Discovering Authorization Servers 685 In order to determine the AS in charge of a resource hosted at the 686 RS, C MAY send an initial Unauthorized Resource Request message to 687 RS. RS then denies the request and sends the address of its AS back 688 to C. 690 Instead of the initial Unauthorized Resource Request message, other 691 discovery methods may be used, or the client may be pre-provisioned 692 with the address of the AS. 694 5.1.1. Unauthorized Resource Request Message 696 The optional Unauthorized Resource Request message is a request for a 697 resource hosted by RS for which no proper authorization is granted. 698 RS MUST treat any request for a protected resource as Unauthorized 699 Resource Request message when any of the following holds: 701 o The request has been received on an unprotected channel. 703 o RS has no valid access token for the sender of the request 704 regarding the requested action on that resource. 705 o RS has a valid access token for the sender of the request, but 706 this does not allow the requested action on the requested 707 resource. 709 Note: These conditions ensure that RS can handle requests 710 autonomously once access was granted and a secure channel has been 711 established between C and RS. The authz-info endpoint MUST NOT be 712 protected as specified above, in order to allow clients to upload 713 access tokens to RS (cf. Section 5.8.1). 715 Unauthorized Resource Request messages MUST be denied with a client 716 error response. In this response, the Resource Server SHOULD provide 717 proper AS Information to enable the Client to request an access token 718 from RS's AS as described in Section 5.1.2. 720 The handling of all client requests (including unauthorized ones) by 721 the RS is described in Section 5.8.2. 723 5.1.2. AS Information 725 The AS Information is sent by RS as a response to an Unauthorized 726 Resource Request message (see Section 5.1.1) to point the sender of 727 the Unauthorized Resource Request message to RS's AS. The AS 728 information is a set of attributes containing an absolute URI (see 729 Section 4.3 of [RFC3986]) that specifies the AS in charge of RS. 731 The message MAY also contain a nonce generated by RS to ensure 732 freshness in case that the RS and AS do not have synchronized clocks. 734 Figure 2 summarizes the parameters that may be part of the AS 735 Information. 737 /-------+----------+-------------\ 738 | Name | CBOR Key | Value Type | 739 |-------+----------+-------------| 740 | AS | 0 | text string | 741 | nonce | 5 | byte string | 742 \-------+----------+-------------/ 744 Figure 2: AS Information parameters 746 Note that the schema part of the AS parameter may need to be adapted 747 to the security protocol that is used between the client and the AS. 748 Thus the example AS value "coap://as.example.com/token" might need to 749 be transformed to "coaps://as.example.com/token". It is assumed that 750 the client can determine the correct schema part on its own depending 751 on the way it communicates with the AS. 753 Figure 3 shows an example for an AS Information message payload using 754 CBOR [RFC7049] diagnostic notation, using the parameter names instead 755 of the CBOR keys for better human readability. 757 4.01 Unauthorized 758 Content-Format: application/ace+cbor 759 {AS: "coaps://as.example.com/token", 760 nonce: h'e0a156bb3f'} 762 Figure 3: AS Information payload example 764 In this example, the attribute AS points the receiver of this message 765 to the URI "coaps://as.example.com/token" to request access 766 permissions. The originator of the AS Information payload (i.e., RS) 767 uses a local clock that is loosely synchronized with a time scale 768 common between RS and AS (e.g., wall clock time). Therefore, it has 769 included a parameter "nonce" for replay attack prevention. 771 Figure 4 illustrates the mandatory to use binary encoding of the 772 message payload shown in Figure 3. 774 a2 # map(2) 775 00 # unsigned(0) (=AS) 776 78 1c # text(28) 777 636f6170733a2f2f61732e657861 778 6d706c652e636f6d2f746f6b656e # "coaps://as.example.com/token" 779 05 # unsigned(5) (=nonce) 780 45 # bytes(5) 781 e0a156bb3f 783 Figure 4: AS Information example encoded in CBOR 785 5.2. Authorization Grants 787 To request an access token, the client obtains authorization from the 788 resource owner or uses its client credentials as grant. The 789 authorization is expressed in the form of an authorization grant. 791 The OAuth framework [RFC6749] defines four grant types. The grant 792 types can be split up into two groups, those granted on behalf of the 793 resource owner (password, authorization code, implicit) and those for 794 the client (client credentials). Further grant types have been added 795 later, such as [RFC7521] defining an assertion-based authorization 796 grant. 798 The grant type is selected depending on the use case. In cases where 799 the client acts on behalf of the resource owner, authorization code 800 grant is recommended. If the client acts on behalf of the resource 801 owner, but does not have any display or very limited interaction 802 possibilities it is recommended to use the device code grant defined 803 in [I-D.ietf-oauth-device-flow]. In cases where the client does not 804 act on behalf of the resource owner, client credentials grant is 805 recommended. 807 For details on the different grant types, see the OAuth 2.0 framework 808 [RFC6749]. The OAuth 2.0 framework provides an extension mechanism 809 for defining additional grant types so profiles of this framework MAY 810 define additional grant types, if needed. 812 5.3. Client Credentials 814 Authentication of the client is mandatory independent of the grant 815 type when requesting the access token from the token endpoint. In 816 the case of client credentials grant type, the authentication and 817 grant coincide. 819 Client registration and provisioning of client credentials to the 820 client is out of scope for this specification. 822 The OAuth framework [RFC6749] defines one client credential type, 823 client id and client secret. [I-D.erdtman-ace-rpcc] adds raw-public- 824 key and pre-shared-key to the client credentials types. Profiles of 825 this framework MAY extend with additional client credentials client 826 certificates. 828 5.4. AS Authentication 830 Client credential does not, by default, authenticate the AS that the 831 client connects to. In classic OAuth, the AS is authenticated with a 832 TLS server certificate. 834 Profiles of this framework MUST specify how clients authenticate the 835 AS and how communication security is implemented, otherwise server 836 side TLS certificates, as defined by OAuth 2.0, are required. 838 5.5. The Authorization Endpoint 840 The authorization endpoint is used to interact with the resource 841 owner and obtain an authorization grant in certain grant flows. 842 Since it requires the use of a user agent (i.e., browser), it is not 843 expected that these types of grant flow will be used by constrained 844 clients. This endpoint is therefore out of scope for this 845 specification. Implementations should use the definition and 846 recommendations of [RFC6749] and [RFC6819]. 848 If clients involved cannot support HTTP and TLS, profiles MAY define 849 mappings for the authorization endpoint. 851 5.6. The Token Endpoint 853 In standard OAuth 2.0, the AS provides the token endpoint for 854 submitting access token requests. This framework extends the 855 functionality of the token endpoint, giving the AS the possibility to 856 help the client and RS to establish shared keys or to exchange their 857 public keys. Furthermore, this framework defines encodings using 858 CBOR, as a substitute for JSON. 860 The endpoint may, however, be exposed over HTTPS as in classical 861 OAuth or even other transports. A profile MUST define the details of 862 the mapping between the fields described below, and these transports. 863 If HTTPS is used, JSON or CBOR payloads may be supported. If JSON 864 payloads are used, the semantics of Section 4 of the OAuth 2.0 865 specification MUST be followed (with additions as described below). 866 If CBOR payload is supported, the semantics described below MUST be 867 followed. 869 For the AS to be able to issue a token, the client MUST be 870 authenticated and present a valid grant for the scopes requested. 871 Profiles of this framework MUST specify how the AS authenticates the 872 client and how the communication between client and AS is protected. 874 The default name of this endpoint in an url-path is '/token', however 875 implementations are not required to use this name and can define 876 their own instead. 878 The figures of this section use CBOR diagnostic notation without the 879 integer abbreviations for the parameters or their values for 880 illustrative purposes. Note that implementations MUST use the 881 integer abbreviations and the binary CBOR encoding, if the CBOR 882 encoding is used. 884 5.6.1. Client-to-AS Request 886 The client sends a POST request to the token endpoint at the AS. The 887 profile MUST specify how the communication is protected. The content 888 of the request consists of the parameters specified in Section 4 of 889 the OAuth 2.0 specification [RFC6749]. 891 In addition to these parameters the parameters from 892 [I-D.ietf-ace-oauth-params] can be used for requesting an access 893 token from a token endpoint. 895 If CBOR is used then this parameter MUST be encoded as a CBOR map. 896 The "scope" parameter can be formatted as specified in [RFC6749] and 897 additionally as a byte array, in order to allow compact encoding of 898 complex scopes. 900 When HTTP is used as a transport then the client makes a request to 901 the token endpoint by sending the parameters using the "application/ 902 x-www-form-urlencoded" format with a character encoding of UTF-8 in 903 the HTTP request entity-body, as defined in RFC 6749. 905 The following examples illustrate different types of requests for 906 proof-of-possession tokens. 908 Figure 5 shows a request for a token with a symmetric proof-of- 909 possession key. The content is displayed in CBOR diagnostic 910 notation, without abbreviations for better readability. 912 Header: POST (Code=0.02) 913 Uri-Host: "as.example.com" 914 Uri-Path: "token" 915 Content-Format: "application/ace+cbor" 916 Payload: 917 { 918 "grant_type" : "client_credentials", 919 "client_id" : "myclient", 920 "aud" : "tempSensor4711" 921 } 923 Figure 5: Example request for an access token bound to a symmetric 924 key. 926 Figure 6 shows a request for a token with an asymmetric proof-of- 927 possession key. Note that in this example COSE is used to provide 928 object-security, therefore the Content-Format is "application/cose" 929 wrapping the "application/ace+cbor" type content. 931 Header: POST (Code=0.02) 932 Uri-Host: "as.example.com" 933 Uri-Path: "token" 934 Content-Format: "application/cose" 935 Payload: 936 16( # COSE_ENCRYPTED 937 [ h'a1010a', # protected header: {"alg" : "AES-CCM-16-64-128"} 938 {5 : b64'ifUvZaHFgJM7UmGnjA'}, # unprotected header, IV 939 b64'WXThuZo6TMCaZZqi6ef/8WHTjOdGk8kNzaIhIQ' # ciphertext 940 ] 941 ) 943 Decrypted payload: 944 { 945 "grant_type" : "client_credentials", 946 "client_id" : "myclient", 947 "cnf" : { 948 "COSE_Key" : { 949 "kty" : "EC", 950 "kid" : h'11', 951 "crv" : "P-256", 952 "x" : b64'usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8', 953 "y" : b64'IBOL+C3BttVivg+lSreASjpkttcsz+1rb7btKLv8EX4' 954 } 955 } 956 } 958 Figure 6: Example token request bound to an asymmetric key. 960 Figure 7 shows a request for a token where a previously communicated 961 proof-of-possession key is only referenced. Note that the client 962 performs a password based authentication in this example by 963 submitting its client_secret (see Section 2.3.1 of [RFC6749]). 965 Header: POST (Code=0.02) 966 Uri-Host: "as.example.com" 967 Uri-Path: "token" 968 Content-Format: "application/ace+cbor" 969 Payload: 970 { 971 "grant_type" : "client_credentials", 972 "client_id" : "myclient", 973 "client_secret" : "mysecret234", 974 "aud" : "valve424", 975 "scope" : "read", 976 "cnf" : { 977 "kid" : b64'6kg0dXJM13U' 978 } 979 } 981 Figure 7: Example request for an access token bound to a key 982 reference. 984 Refresh tokens are typically not stored as securely as proof-of- 985 possession keys in requesting clients. Proof-of-possession based 986 refresh token requests MUST NOT request different proof-of-possession 987 keys or different audiences in token requests. Refresh token 988 requests can only use to request access tokens bound to the same 989 proof-of-possession key and the same audience as access tokens issued 990 in the initial token request. 992 5.6.2. AS-to-Client Response 994 If the access token request has been successfully verified by the AS 995 and the client is authorized to obtain an access token corresponding 996 to its access token request, the AS sends a response with the 997 response code equivalent to the CoAP response code 2.01 (Created). 998 If client request was invalid, or not authorized, the AS returns an 999 error response as described in Section 5.6.3. 1001 Note that the AS decides which token type and profile to use when 1002 issuing a successful response. It is assumed that the AS has prior 1003 knowledge of the capabilities of the client and the RS (see 1004 Appendix D. This prior knowledge may, for example, be set by the use 1005 of a dynamic client registration protocol exchange [RFC7591]. 1007 The content of the successful reply is the Access Information. When 1008 using CBOR payloads, the content MUST be encoded as CBOR map, 1009 containing parameters as specified in Section 5.1 of [RFC6749], with 1010 the following additions and changes: 1012 profile: 1014 OPTIONAL. This indicates the profile that the client MUST use 1015 towards the RS. See Section 5.6.4.3 for the formatting of this 1016 parameter. If this parameter is absent, the AS assumes that the 1017 client implicitly knows which profile to use towards the RS. 1018 token_type: 1019 This parameter is OPTIONAL, as opposed to 'required' in [RFC6749]. 1020 By default implementations of this framework SHOULD assume that 1021 the token_type is "pop". If a specific use case requires another 1022 token_type (e.g., "Bearer") to be used then this parameter is 1023 REQUIRED. 1025 Furthermore [I-D.ietf-ace-oauth-params] defines further parameters 1026 the AS can use when responding to a request to the token endpoint. 1028 Figure 8 summarizes the parameters that may be part of the Access 1029 Information. This does not include the additional parameters 1030 specified in [I-D.ietf-ace-oauth-params]. 1032 /-------------------+-------------------------------\ 1033 | Parameter name | Specified in | 1034 |-------------------+-------------------------------| 1035 | access_token | RFC 6749 | 1036 | token_type | RFC 6749 | 1037 | expires_in | RFC 6749 | 1038 | refresh_token | RFC 6749 | 1039 | scope | RFC 6749 | 1040 | state | RFC 6749 | 1041 | error | RFC 6749 | 1042 | error_description | RFC 6749 | 1043 | error_uri | RFC 6749 | 1044 | profile | [this document] | 1045 \-------------------+-------------------------------/ 1047 Figure 8: Access Information parameters 1049 Figure 9 shows a response containing a token and a "cnf" parameter 1050 with a symmetric proof-of-possession key. 1052 Header: Created (Code=2.01) 1053 Content-Format: "application/ace+cbor" 1054 Payload: 1055 { 1056 "access_token" : b64'SlAV32hkKG ... 1057 (remainder of CWT omitted for brevity; 1058 CWT contains COSE_Key in the "cnf" claim)', 1059 "profile" : "coap_dtls", 1060 "expires_in" : "3600", 1061 "cnf" : { 1062 "COSE_Key" : { 1063 "kty" : "Symmetric", 1064 "kid" : b64'39Gqlw', 1065 "k" : b64'hJtXhkV8FJG+Onbc6mxCcQh' 1066 } 1067 } 1068 } 1070 Figure 9: Example AS response with an access token bound to a 1071 symmetric key. 1073 5.6.3. Error Response 1075 The error responses for CoAP-based interactions with the AS are 1076 equivalent to the ones for HTTP-based interactions as defined in 1077 Section 5.2 of [RFC6749], with the following differences: 1079 o When using CBOR the raw payload before being processed by the 1080 communication security protocol MUST be encoded as a CBOR map. 1081 o A response code equivalent to the CoAP code 4.00 (Bad Request) 1082 MUST be used for all error responses, except for invalid_client 1083 where a response code equivalent to the CoAP code 4.01 1084 (Unauthorized) MAY be used under the same conditions as specified 1085 in Section 5.2 of [RFC6749]. 1086 o The parameters "error", "error_description" and "error_uri" MUST 1087 be abbreviated using the codes specified in Figure 12, when a CBOR 1088 encoding is used. 1089 o The error code (i.e., value of the "error" parameter) MUST be 1090 abbreviated as specified in Figure 10, when a CBOR encoding is 1091 used. 1093 /------------------------+-------------\ 1094 | Name | CBOR Values | 1095 |------------------------+-------------| 1096 | invalid_request | 1 | 1097 | invalid_client | 2 | 1098 | invalid_grant | 3 | 1099 | unauthorized_client | 4 | 1100 | unsupported_grant_type | 5 | 1101 | invalid_scope | 6 | 1102 | unsupported_pop_key | 7 | 1103 \------------------------+-------------/ 1105 Figure 10: CBOR abbreviations for common error codes 1107 In addition to the error responses defined in OAuth 2.0, the 1108 following behavior MUST be implemented by the AS: If the client 1109 submits an asymmetric key in the token request that the RS cannot 1110 process, the AS MUST reject that request with a response code 1111 equivalent to the CoAP code 4.00 (Bad Request) including the error 1112 code "unsupported_pop_key" defined in Figure 10. 1114 5.6.4. Request and Response Parameters 1116 This section provides more detail about the new parameters that can 1117 be used in access token requests and responses, as well as 1118 abbreviations for more compact encoding of existing parameters and 1119 common parameter values. 1121 5.6.4.1. Grant Type 1123 The abbreviations in Figure 11 MUST be used in CBOR encodings instead 1124 of the string values defined in [RFC6749], if CBOR payloads are used. 1126 /--------------------+------------+------------------------\ 1127 | Name | CBOR Value | Original Specification | 1128 |--------------------+------------+------------------------| 1129 | password | 0 | RFC6749 | 1130 | authorization_code | 1 | RFC6749 | 1131 | client_credentials | 2 | RFC6749 | 1132 | refresh_token | 3 | RFC6749 | 1133 \--------------------+------------+------------------------/ 1135 Figure 11: CBOR abbreviations for common grant types 1137 5.6.4.2. Token Type 1139 The "token_type" parameter, defined in [RFC6749], allows the AS to 1140 indicate to the client which type of access token it is receiving 1141 (e.g., a bearer token). 1143 This document registers the new value "pop" for the OAuth Access 1144 Token Types registry, specifying a proof-of-possession token. How 1145 the proof-of-possession by the client to the RS is performed MUST be 1146 specified by the profiles. 1148 The values in the "token_type" parameter MUST be CBOR text strings, 1149 if a CBOR encoding is used. 1151 In this framework the "pop" value for the "token_type" parameter is 1152 the default. The AS may, however, provide a different value. 1154 5.6.4.3. Profile 1156 Profiles of this framework MUST define the communication protocol and 1157 the communication security protocol between the client and the RS. 1158 The security protocol MUST provide encryption, integrity and replay 1159 protection. Furthermore profiles MUST define proof-of-possession 1160 methods, if they support proof-of-possession tokens. 1162 A profile MUST specify an identifier that MUST be used to uniquely 1163 identify itself in the "profile" parameter. The textual 1164 representation of the profile identifier is just intended for human 1165 readability and MUST NOT be used in parameters and claims. 1167 Profiles MAY define additional parameters for both the token request 1168 and the Access Information in the access token response in order to 1169 support negotiation or signaling of profile specific parameters. 1171 5.6.5. Mapping Parameters to CBOR 1173 If CBOR encoding is used, all OAuth parameters in access token 1174 requests and responses MUST be mapped to CBOR types as specified in 1175 Figure 12, using the given integer abbreviation for the map keys. 1177 Note that we have aligned these abbreviations with the claim 1178 abbreviations defined in [RFC8392]. 1180 Note also that abbreviations from -24 to 23 have a 1 byte encoding 1181 size in CBOR. We have thus choosen to assign abbreviations in that 1182 range to parameters we expect to be used most frequently in 1183 constrained scenarios. 1185 /-------------------+----------+---------------------\ 1186 | Name | CBOR Key | Value Type | 1187 |-------------------+----------+---------------------| 1188 | scope | 9 | text or byte string | 1189 | profile | 10 | unsigned integer | 1190 | error | 11 | unsigned integer | 1191 | grant_type | 12 | unsigned integer | 1192 | access_token | 13 | byte string | 1193 | token_type | 14 | unsigned integer | 1194 | client_id | 24 | text string | 1195 | client_secret | 25 | byte string | 1196 | response_type | 26 | text string | 1197 | state | 27 | text string | 1198 | redirect_uri | 28 | text string | 1199 | error_description | 29 | text string | 1200 | error_uri | 30 | text string | 1201 | code | 31 | byte string | 1202 | expires_in | 32 | unsigned integer | 1203 | username | 33 | text string | 1204 | password | 34 | text string | 1205 | refresh_token | 35 | byte string | 1206 \-------------------+----------+---------------------/ 1208 Figure 12: CBOR mappings used in token requests 1210 5.7. The Introspection Endpoint 1212 Token introspection [RFC7662] can be OPTIONALLY provided by the AS, 1213 and is then used by the RS and potentially the client to query the AS 1214 for metadata about a given token, e.g., validity or scope. Analogous 1215 to the protocol defined in RFC 7662 [RFC7662] for HTTP and JSON, this 1216 section defines adaptations to more constrained environments using 1217 CBOR and leaving the choice of the application protocol to the 1218 profile. 1220 Communication between the requesting entity and the introspection 1221 endpoint at the AS MUST be integrity protected and encrypted. 1222 Furthermore the two MUST perform mutual authentication. Finally the 1223 AS SHOULD verify that the requesting entity has the right to access 1224 introspection information about the provided token. Profiles of this 1225 framework that support introspection MUST specify how authentication 1226 and communication security between the requesting entity and the AS 1227 is implemented. 1229 The default name of this endpoint in an url-path is '/introspect', 1230 however implementations are not required to use this name and can 1231 define their own instead. 1233 The figures of this section uses CBOR diagnostic notation without the 1234 integer abbreviations for the parameters or their values for better 1235 readability. 1237 Note that supporting introspection is OPTIONAL for implementations of 1238 this framework. 1240 5.7.1. Introspection Request 1242 The requesting entity sends a POST request to the introspection 1243 endpoint at the AS, the profile MUST specify how the communication is 1244 protected. If CBOR is used, the payload MUST be encoded as a CBOR 1245 map with a "token" entry containing either the access token or a 1246 reference to the token (e.g., the cti). Further optional parameters 1247 representing additional context that is known by the requesting 1248 entity to aid the AS in its response MAY be included. 1250 The same parameters are required and optional as in Section 2.1 of 1251 RFC 7662 [RFC7662]. 1253 For example, Figure 13 shows a RS calling the token introspection 1254 endpoint at the AS to query about an OAuth 2.0 proof-of-possession 1255 token. Note that object security based on COSE is assumed in this 1256 example, therefore the Content-Format is "application/cose". 1257 Figure 14 shows the decoded payload. 1259 Header: POST (Code=0.02) 1260 Uri-Host: "as.example.com" 1261 Uri-Path: "introspect" 1262 Content-Format: "application/cose" 1263 Payload: 1264 ... COSE content ... 1266 Figure 13: Example introspection request. 1268 { 1269 "token" : b64'7gj0dXJQ43U', 1270 "token_type_hint" : "pop" 1271 } 1273 Figure 14: Decoded token. 1275 5.7.2. Introspection Response 1277 If the introspection request is authorized and successfully 1278 processed, the AS sends a response with the response code equivalent 1279 to the CoAP code 2.01 (Created). If the introspection request was 1280 invalid, not authorized or couldn't be processed the AS returns an 1281 error response as described in Section 5.7.3. 1283 In a successful response, the AS encodes the response parameters in a 1284 map including with the same required and optional parameters as in 1285 Section 2.2 of RFC 7662 [RFC7662] with the following addition: 1287 profile OPTIONAL. This indicates the profile that the RS MUST use 1288 with the client. See Section 5.6.4.3 for more details on the 1289 formatting of this parameter. 1291 Furthermore [I-D.ietf-ace-oauth-params] defines more parameters that 1292 the AS can use when responding to a request to the introspection 1293 endpoint. 1295 For example, Figure 15 shows an AS response to the introspection 1296 request in Figure 13. 1298 Header: Created Code=2.01) 1299 Content-Format: "application/ace+cbor" 1300 Payload: 1301 { 1302 "active" : true, 1303 "scope" : "read", 1304 "profile" : "coap_dtls", 1305 "cnf" : { 1306 "COSE_Key" : { 1307 "kty" : "Symmetric", 1308 "kid" : b64'39Gqlw', 1309 "k" : b64'hJtXhkV8FJG+Onbc6mxCcQh' 1310 } 1311 } 1312 } 1314 Figure 15: Example introspection response. 1316 5.7.3. Error Response 1318 The error responses for CoAP-based interactions with the AS are 1319 equivalent to the ones for HTTP-based interactions as defined in 1320 Section 2.3 of [RFC7662], with the following differences: 1322 o If content is sent and CBOR is used the payload MUST be encoded as 1323 a CBOR map and the Content-Format "application/ace+cbor" MUST be 1324 used. 1325 o If the credentials used by the requesting entity (usually the RS) 1326 are invalid the AS MUST respond with the response code equivalent 1327 to the CoAP code 4.01 (Unauthorized) and use the required and 1328 optional parameters from Section 5.2 in RFC 6749 [RFC6749]. 1329 o If the requesting entity does not have the right to perform this 1330 introspection request, the AS MUST respond with a response code 1331 equivalent to the CoAP code 4.03 (Forbidden). In this case no 1332 payload is returned. 1333 o The parameters "error", "error_description" and "error_uri" MUST 1334 be abbreviated using the codes specified in Figure 12. 1335 o The error codes MUST be abbreviated using the codes specified in 1336 Figure 10. 1338 Note that a properly formed and authorized query for an inactive or 1339 otherwise invalid token does not warrant an error response by this 1340 specification. In these cases, the authorization server MUST instead 1341 respond with an introspection response with the "active" field set to 1342 "false". 1344 5.7.4. Mapping Introspection parameters to CBOR 1346 If CBOR is used, the introspection request and response parameters 1347 MUST be mapped to CBOR types as specified in Figure 16, using the 1348 given integer abbreviation for the map key. 1350 Note that we have aligned these abbreviations with the claim 1351 abbreviations defined in [RFC8392]. 1353 /-----------------+----------+----------------------------------\ 1354 | Parameter name | CBOR Key | Value Type | 1355 |-----------------+----------+----------------------------------| 1356 | iss | 1 | text string | 1357 | sub | 2 | text string | 1358 | aud | 3 | text string | 1359 | exp | 4 | integer or floating-point number | 1360 | nbf | 5 | integer or floating-point number | 1361 | iat | 6 | integer or floating-point number | 1362 | cti | 7 | byte string | 1363 | scope | 9 | text OR byte string | 1364 | token_type | 13 | text string | 1365 | token | 14 | byte string | 1366 | active | 15 | True or False | 1367 | profile | 16 | unsigned integer | 1368 | client_id | 24 | text string | 1369 | username | 33 | text string | 1370 | token_type_hint | 36 | text string | 1371 \-----------------+----------+----------------------------------/ 1373 Figure 16: CBOR Mappings to Token Introspection Parameters. 1375 5.8. The Access Token 1377 This framework RECOMMENDS the use of CBOR web token (CWT) as 1378 specified in [RFC8392]. 1380 In order to facilitate offline processing of access tokens, this 1381 draft uses the "cnf" claim from 1382 [I-D.ietf-ace-cwt-proof-of-possession] and specifies the "scope" 1383 claim for both JSON and CBOR web tokens. 1385 The "scope" claim explicitly encodes the scope of a given access 1386 token. This claim follows the same encoding rules as defined in 1387 Section 3.3 of [RFC6749], but in addition implementers MAY use byte 1388 arrays as scope values, to achieve compact encoding of large scope 1389 elements. The meaning of a specific scope value is application 1390 specific and expected to be known to the RS running that application. 1392 If the AS needs to convey a hint to the RS about which key it should 1393 use to authenticate towards the client, the rs_cnf claim MAY be used 1394 with the same syntax and semantics as defined in 1395 [I-D.ietf-ace-oauth-params]. 1397 If the AS needs to convey a hint to the RS about which profile it 1398 should use to communicate with the client, the AS MAY include a 1399 "profile" claim in the access token, with the same syntax and 1400 semantics as defined in Section 5.6.4.3. 1402 5.8.1. The Authorization Information Endpoint 1404 The access token, containing authorization information and 1405 information about the key used by the client, needs to be transported 1406 to the RS so that the RS can authenticate and authorize the client 1407 request. 1409 This section defines a method for transporting the access token to 1410 the RS using a RESTful protocol such as CoAP. Profiles of this 1411 framework MAY define other methods for token transport. 1413 The method consists of an authz-info endpoint, implemented by the RS. 1414 A client using this method MUST make a POST request to the authz-info 1415 endpoint at the RS with the access token in the payload. The RS 1416 receiving the token MUST verify the validity of the token. If the 1417 token is valid, the RS MUST respond to the POST request with 2.01 1418 (Created). This response MAY contain an identifier of the token 1419 (e.g., the cti for a CWT) as a payload, in order to allow the client 1420 to refer to the token. 1422 The RS MUST be prepared to store at least one access token for future 1423 use. This is a difference to how access tokens are handled in OAuth 1424 2.0, where the access token is typically sent along with each 1425 request, and therefore not stored at the RS. 1427 If the payload sent to the authz-info endpoint does not parse to a 1428 token, the RS MUST respond with a response code equivalent to the 1429 CoAP code 4.00 (Bad Request). If the token is not valid, the RS MUST 1430 respond with a response code equivalent to the CoAP code 4.01 1431 (Unauthorized). If the token is valid but the audience of the token 1432 does not match the RS, the RS MUST respond with a response code 1433 equivalent to the CoAP code 4.03 (Forbidden). If the token is valid 1434 but is associated to claims that the RS cannot process (e.g., an 1435 unknown scope) the RS MUST respond with a response code equivalent to 1436 the CoAP code 4.00 (Bad Request). In the latter case the RS MAY 1437 provide additional information in the error response, in order to 1438 clarify what went wrong. 1440 The RS MAY make an introspection request to validate the token before 1441 responding to the POST request to the authz-info endpoint. 1443 Profiles MUST specify whether the authz-info endpoint is protected, 1444 including whether error responses from this endpoint are protected. 1445 Note that since the token contains information that allow the client 1446 and the RS to establish a security context in the first place, mutual 1447 authentication may not be possible at this point. 1449 The default name of this endpoint in an url-path is '/authz-info', 1450 however implementations are not required to use this name and can 1451 define their own instead. 1453 5.8.2. Client Requests to the RS 1455 If an RS receives a request from a client, and the target resource 1456 requires authorization, the RS MUST first verify that it has an 1457 access token that authorizes this request, and that the client has 1458 performed the proof-of-possession for that token. 1460 The response code MUST be 4.01 (Unauthorized) in case the client has 1461 not performed the proof-of-possession, or if RS has no valid access 1462 token for the client. If RS has an access token for the client but 1463 not for the resource that was requested, RS MUST reject the request 1464 with a 4.03 (Forbidden). If RS has an access token for the client 1465 but it does not cover the action that was requested on the resource, 1466 RS MUST reject the request with a 4.05 (Method Not Allowed). 1468 Note: The use of the response codes 4.03 and 4.05 is intended to 1469 prevent infinite loops where a dumb Client optimistically tries to 1470 access a requested resource with any access token received from AS. 1471 As malicious clients could pretend to be C to determine C's 1472 privileges, these detailed response codes must be used only when a 1473 certain level of security is already available which can be achieved 1474 only when the Client is authenticated. 1476 Note: The RS MAY use introspection for timely validation of an access 1477 token, at the time when a request is presented. 1479 Note: Matching the claims of the access token (e.g., scope) to a 1480 specific request is application specific. 1482 If the request matches a valid token and the client has performed the 1483 proof-of-possession for that token, the RS continues to process the 1484 request as specified by the underlying application. 1486 5.8.3. Token Expiration 1488 Depending on the capabilities of the RS, there are various ways in 1489 which it can verify the validity of a received access token. Here 1490 follows a list of the possibilities including what functionality they 1491 require of the RS. 1493 o The token is a CWT and includes an "exp" claim and possibly the 1494 "nbf" claim. The RS verifies these by comparing them to values 1495 from its internal clock as defined in [RFC7519]. In this case the 1496 RS's internal clock must reflect the current date and time, or at 1497 least be synchronized with the AS's clock. How this clock 1498 synchronization would be performed is out of scope for this 1499 specification. 1500 o The RS verifies the validity of the token by performing an 1501 introspection request as specified in Section 5.7. This requires 1502 the RS to have a reliable network connection to the AS and to be 1503 able to handle two secure sessions in parallel (C to RS and AS to 1504 RS). 1505 o The RS and the AS both store a sequence number linked to their 1506 common security association. The AS increments this number for 1507 each access token it issues and includes it in the access token, 1508 which is a CWT. The RS keeps track of the most recently received 1509 sequence number, and only accepts tokens as valid, that are in a 1510 certain range around this number. This method does only require 1511 the RS to keep track of the sequence number. The method does not 1512 provide timely expiration, but it makes sure that older tokens 1513 cease to be valid after a certain number of newer ones got issued. 1514 For a constrained RS with no network connectivity and no means of 1515 reliably measuring time, this is the best that can be achieved. 1517 If a token that authorizes a long running request such as a CoAP 1518 Observe [RFC7641] expires, the RS MUST send an error response with 1519 the response code equivalent to the CoAP code 4.01 (Unauthorized) to 1520 the client and then terminate processing the long running request. 1522 6. Security Considerations 1524 Security considerations applicable to authentication and 1525 authorization in RESTful environments provided in OAuth 2.0 [RFC6749] 1526 apply to this work, as well as the security considerations from 1527 [I-D.ietf-ace-actors]. Furthermore [RFC6819] provides additional 1528 security considerations for OAuth which apply to IoT deployments as 1529 well. 1531 A large range of threats can be mitigated by protecting the contents 1532 of the access token by using a digital signature or a keyed message 1533 digest (MAC) or an Authenticated Encryption with Associated Data 1534 (AEAD) algorithm. Consequently, the token integrity protection MUST 1535 be applied to prevent the token from being modified, particularly 1536 since it contains a reference to the symmetric key or the asymmetric 1537 key. If the access token contains the symmetric key, this symmetric 1538 key MUST be encrypted by the authorization server so that only the 1539 resource server can decrypt it. Note that using an AEAD algorithm is 1540 preferable over using a MAC unless the message needs to be publicly 1541 readable. 1543 It is important for the authorization server to include the identity 1544 of the intended recipient (the audience), typically a single resource 1545 server (or a list of resource servers), in the token. Using a single 1546 shared secret with multiple resource servers to simplify key 1547 management is NOT RECOMMENDED since the benefit from using the proof- 1548 of-possession concept is significantly reduced. 1550 The authorization server MUST offer confidentiality protection for 1551 any interactions with the client. This step is extremely important 1552 since the client may obtain the proof-of-possession key from the 1553 authorization server for use with a specific access token. Not using 1554 confidentiality protection exposes this secret (and the access token) 1555 to an eavesdropper thereby completely negating proof-of-possession 1556 security. Profiles MUST specify how confidentiality protection is 1557 provided, and additional protection can be applied by encrypting the 1558 token, for example encryption of CWTs is specified in Section 5.1 of 1559 [RFC8392]. 1561 Developers MUST ensure that the ephemeral credentials (i.e., the 1562 private key or the session key) are not leaked to third parties. An 1563 adversary in possession of the ephemeral credentials bound to the 1564 access token will be able to impersonate the client. Be aware that 1565 this is a real risk with many constrained environments, since 1566 adversaries can often easily get physical access to the devices. 1568 If clients are capable of doing so, they should frequently request 1569 fresh access tokens, as this allows the AS to keep the lifetime of 1570 the tokens short. This allows the AS to use shorter proof-of- 1571 possession key sizes, which translate to a performance benefit for 1572 the client and for the resource server. Shorter keys also lead to 1573 shorter messages (particularly with asymmetric keying material). 1575 When authorization servers bind symmetric keys to access tokens, they 1576 SHOULD scope these access tokens to a specific permissions. 1577 Furthermore access tokens using symmetric keys for proof-of- 1578 possession SHOULD NOT be targeted at an audience that contains more 1579 than one RS, since otherwise any RS in the audience that receives 1580 that access token can impersonate the client towards the other 1581 members of the audience. 1583 6.1. Unprotected AS Information 1585 Initially, no secure channel exists to protect the communication 1586 between C and RS. Thus, C cannot determine if the AS information 1587 contained in an unprotected response from RS to an unauthorized 1588 request (see Section 5.1.2) is authentic. It is therefore advisable 1589 to provide C with a (possibly hard-coded) list of trustworthy 1590 authorization servers. AS information responses referring to a URI 1591 not listed there would be ignored. 1593 6.2. Use of Nonces for Replay Protection 1595 The RS may add a nonce to the AS Information message sent as a 1596 response to an unauthorized request to ensure freshness of an Access 1597 Token subsequently presented to RS. While a time-stamp of some 1598 granularity would be sufficient to protect against replay attacks, 1599 using randomized nonce is preferred to prevent disclosure of 1600 information about RS's internal clock characteristics. 1602 6.3. Combining profiles 1604 There may be use cases were different profiles of this framework are 1605 combined. For example, an MQTT-TLS profile is used between the 1606 client and the RS in combination with a CoAP-DTLS profile for 1607 interactions between the client and the AS. Ideally, profiles should 1608 be designed in a way that the security of system should not depend on 1609 the specific security mechanisms used in individual protocol 1610 interactions. 1612 6.4. Error responses 1614 The various error responses defined in this framework may leak 1615 information to an adversary. For example errors responses for 1616 requests to the Authorization Information endpoint can reveal 1617 information about an otherwise opaque access token to an adversary 1618 who has intercepted this token. This framework is written under the 1619 assumption that, in general, the benefits of detailed error messages 1620 outweigh the risk due to information leakage. For particular use 1621 cases, where this assessment does not apply, detailed error messages 1622 can be replaced by more generic ones. 1624 7. Privacy Considerations 1626 Implementers and users should be aware of the privacy implications of 1627 the different possible deployments of this framework. 1629 The AS is in a very central position and can potentially learn 1630 sensitive information about the clients requesting access tokens. If 1631 the client credentials grant is used, the AS can track what kind of 1632 access the client intends to perform. With other grants this can be 1633 prevented by the Resource Owner. To do so, the resource owner needs 1634 to bind the grants it issues to anonymous, ephemeral credentials that 1635 do not allow the AS to link different grants and thus different 1636 access token requests by the same client. 1638 If access tokens are only integrity protected and not encrypted, they 1639 may reveal information to attackers listening on the wire, or able to 1640 acquire the access tokens in some other way. In the case of CWTs the 1641 token may, e.g., reveal the audience, the scope and the confirmation 1642 method used by the client. The latter may reveal the identity of the 1643 device or application running the client. This may be linkable to 1644 the identity of the person using the client (if there is a person and 1645 not a machine-to-machine interaction). 1647 Clients using asymmetric keys for proof-of-possession should be aware 1648 of the consequences of using the same key pair for proof-of- 1649 possession towards different RSs. A set of colluding RSs or an 1650 attacker able to obtain the access tokens will be able to link the 1651 requests, or even to determine the client's identity. 1653 An unprotected response to an unauthorized request (see 1654 Section 5.1.2) may disclose information about RS and/or its existing 1655 relationship with C. It is advisable to include as little 1656 information as possible in an unencrypted response. Means of 1657 encrypting communication between C and RS already exist, more 1658 detailed information may be included with an error response to 1659 provide C with sufficient information to react on that particular 1660 error. 1662 8. IANA Considerations 1664 8.1. Authorization Server Information 1666 This section establishes the IANA "ACE Authorization Server 1667 Information" registry. The registry has been created to use the 1668 "Expert Review Required" registration procedure [RFC8126]. It should 1669 be noted that, in addition to the expert review, some portions of the 1670 registry require a specification, potentially a Standards Track RFC, 1671 be supplied as well. 1673 The columns of the registry are: 1675 Name The name of the parameter 1676 CBOR Key CBOR map key for the parameter. Different ranges of values 1677 use different registration policies [RFC8126]. Integer values 1678 from -256 to 255 are designated as Standards Action. Integer 1679 values from -65536 to -257 and from 256 to 65535 are designated as 1680 Specification Required. Integer values greater than 65535 are 1681 designated as Expert Review. Integer values less than -65536 are 1682 marked as Private Use. 1683 Value Type The CBOR data types allowable for the values of this 1684 parameter. 1685 Reference This contains a pointer to the public specification of the 1686 grant type abbreviation, if one exists. 1688 This registry will be initially populated by the values in Figure 2. 1689 The Reference column for all of these entries will be this document. 1691 8.2. OAuth Error Code CBOR Mappings Registry 1693 This section establish the IANA "OAuth Error Code CBOR Mappings" 1694 registry. The registry has been created to use the "Expert Review 1695 Required" registration procedure [RFC8126]. It should be noted that, 1696 in addition to the expert review, some portions of the registry 1697 require a specification, potentially a Standards Track RFC, be 1698 supplied as well. 1700 The columns of the registry are: 1702 Name The OAuth Error Code name, refers to the name in Section 5.2. 1703 of [RFC6749], e.g., "invalid_request". 1704 CBOR Value CBOR abbreviation for this error code. Different ranges 1705 of values use different registration policies [RFC8126]. Integer 1706 values from -256 to 255 are designated as Standards Action. 1708 Integer values from -65536 to -257 and from 256 to 65535 are 1709 designated as Specification Required. Integer values greater than 1710 65535 are designated as Expert Review. Integer values less than 1711 -65536 are marked as Private Use. 1712 Reference This contains a pointer to the public specification of the 1713 grant type abbreviation, if one exists. 1715 This registry will be initially populated by the values in Figure 10. 1716 The Reference column for all of these entries will be this document. 1718 8.3. OAuth Grant Type CBOR Mappings 1720 This section establishes the IANA "OAuth Grant Type CBOR Mappings" 1721 registry. The registry has been created to use the "Expert Review 1722 Required" registration procedure [RFC8126]. It should be noted that, 1723 in addition to the expert review, some portions of the registry 1724 require a specification, potentially a Standards Track RFC, be 1725 supplied as well. 1727 The columns of this registry are: 1729 Name The name of the grant type as specified in Section 1.3 of 1730 [RFC6749]. 1731 CBOR Value CBOR abbreviation for this grant type. Different ranges 1732 of values use different registration policies [RFC8126]. Integer 1733 values from -256 to 255 are designated as Standards Action. 1734 Integer values from -65536 to -257 and from 256 to 65535 are 1735 designated as Specification Required. Integer values greater than 1736 65535 are designated as Expert Review. Integer values less than 1737 -65536 are marked as Private Use. 1738 Reference This contains a pointer to the public specification of the 1739 grant type abbreviation, if one exists. 1740 Original Specification This contains a pointer to the public 1741 specification of the grant type, if one exists. 1743 This registry will be initially populated by the values in Figure 11. 1744 The Reference column for all of these entries will be this document. 1746 8.4. OAuth Access Token Types 1748 This section registers the following new token type in the "OAuth 1749 Access Token Types" registry [IANA.OAuthAccessTokenTypes]. 1751 o Name: "PoP" 1752 o Change Controller: IETF 1753 o Reference: [this document] 1755 8.5. OAuth Token Type CBOR Mappings 1757 This section eatables the IANA "Token Type CBOR Mappings" registry. 1758 The registry has been created to use the "Expert Review Required" 1759 registration procedure [RFC8126]. It should be noted that, in 1760 addition to the expert review, some portions of the registry require 1761 a specification, potentially a Standards Track RFC, be supplied as 1762 well. 1764 The columns of this registry are: 1766 Name The name of token type as registered in the OAuth Access Token 1767 Types registry, e.g., "Bearer". 1768 CBOR Value CBOR abbreviation for this token type. Different ranges 1769 of values use different registration policies [RFC8126]. Integer 1770 values from -256 to 255 are designated as Standards Action. 1771 Integer values from -65536 to -257 and from 256 to 65535 are 1772 designated as Specification Required. Integer values greater than 1773 65535 are designated as Expert Review. Integer values less than 1774 -65536 are marked as Private Use. 1775 Reference This contains a pointer to the public specification of the 1776 OAuth token type abbreviation, if one exists. 1777 Original Specification This contains a pointer to the public 1778 specification of the grant type, if one exists. 1780 8.5.1. Initial Registry Contents 1782 o Name: "Bearer" 1783 o Value: 1 1784 o Reference: [this document] 1785 o Original Specification: [RFC6749] 1787 o Name: "pop" 1788 o Value: 2 1789 o Reference: [this document] 1790 o Original Specification: [this document] 1792 8.6. ACE Profile Registry 1794 This section establishes the IANA "ACE Profile" registry. The 1795 registry has been created to use the "Expert Review Required" 1796 registration procedure [RFC8126]. It should be noted that, in 1797 addition to the expert review, some portions of the registry require 1798 a specification, potentially a Standards Track RFC, be supplied as 1799 well. 1801 The columns of this registry are: 1803 Name The name of the profile, to be used as value of the profile 1804 attribute. 1805 Description Text giving an overview of the profile and the context 1806 it is developed for. 1807 CBOR Value CBOR abbreviation for this profile name. Different 1808 ranges of values use different registration policies [RFC8126]. 1809 Integer values from -256 to 255 are designated as Standards 1810 Action. Integer values from -65536 to -257 and from 256 to 65535 1811 are designated as Specification Required. Integer values greater 1812 than 65535 are designated as Expert Review. Integer values less 1813 than -65536 are marked as Private Use. 1814 Reference This contains a pointer to the public specification of the 1815 profile abbreviation, if one exists. 1817 8.7. OAuth Parameter Registration 1819 This section registers the following parameter in the "OAuth 1820 Parameters" registry [IANA.OAuthParameters]: 1822 o Name: "profile" 1823 o Parameter Usage Location: token response 1824 o Change Controller: IESG 1825 o Reference: Section 5.6.4.3 of [this document] 1827 8.8. OAuth CBOR Parameter Mappings Registry 1829 This section establishes the IANA "Token Endpoint CBOR Mappings" 1830 registry. The registry has been created to use the "Expert Review 1831 Required" registration procedure [RFC8126]. It should be noted that, 1832 in addition to the expert review, some portions of the registry 1833 require a specification, potentially a Standards Track RFC, be 1834 supplied as well. 1836 The columns of this registry are: 1838 Name The OAuth Parameter name, refers to the name in the OAuth 1839 parameter registry, e.g., "client_id". 1840 CBOR Key CBOR map key for this parameter. Different ranges of 1841 values use different registration policies [RFC8126]. Integer 1842 values from -256 to 255 are designated as Standards Action. 1843 Integer values from -65536 to -257 and from 256 to 65535 are 1844 designated as Specification Required. Integer values greater than 1845 65535 are designated as Expert Review. Integer values less than 1846 -65536 are marked as Private Use. 1847 Value Type The allowable CBOR data types for values of this 1848 parameter. 1849 Reference This contains a pointer to the public specification of the 1850 grant type abbreviation, if one exists. 1852 This registry will be initially populated by the values in Figure 12. 1853 The Reference column for all of these entries will be this document. 1855 Note that these mappings intentionally coincide with the CWT claim 1856 name mappings from [RFC8392]. 1858 8.9. OAuth Introspection Response Parameter Registration 1860 This section registers the following parameter in the OAuth Token 1861 Introspection Response registry [IANA.TokenIntrospectionResponse]. 1863 o Name: "profile" 1864 o Description: The communication and communication security profile 1865 used between client and RS, as defined in ACE profiles. 1866 o Change Controller: IESG 1867 o Reference: Section 5.7.2 of [this document] 1869 8.10. Introspection Endpoint CBOR Mappings Registry 1871 This section establishes the IANA "Introspection Endpoint CBOR 1872 Mappings" registry. The registry has been created to use the "Expert 1873 Review Required" registration procedure [RFC8126]. It should be 1874 noted that, in addition to the expert review, some portions of the 1875 registry require a specification, potentially a Standards Track RFC, 1876 be supplied as well. 1878 The columns of this registry are: 1880 Name The OAuth Parameter name, refers to the name in the OAuth 1881 parameter registry, e.g., "client_id". 1882 CBOR Key CBOR map key for this parameter. Different ranges of 1883 values use different registration policies [RFC8126]. Integer 1884 values from -256 to 255 are designated as Standards Action. 1885 Integer values from -65536 to -257 and from 256 to 65535 are 1886 designated as Specification Required. Integer values greater than 1887 65535 are designated as Expert Review. Integer values less than 1888 -65536 are marked as Private Use. 1889 Value Type The allowable CBOR data types for values of this 1890 parameter. 1891 Reference This contains a pointer to the public specification of the 1892 grant type abbreviation, if one exists. 1894 This registry will be initially populated by the values in Figure 16. 1895 The Reference column for all of these entries will be this document. 1897 8.11. JSON Web Token Claims 1899 This specification registers the following new claims in the JSON Web 1900 Token (JWT) registry of JSON Web Token Claims 1901 [IANA.JsonWebTokenClaims]: 1903 o Claim Name: "scope" 1904 o Claim Description: The scope of an access token as defined in 1905 [RFC6749]. 1906 o Change Controller: IESG 1907 o Reference: Section 5.8 of [this document] 1909 o Claim Name: "profile" 1910 o Claim Description: The profile a token is supposed to be used 1911 with. 1912 o Change Controller: IESG 1913 o Reference: Section 5.8 of [this document] 1915 o Claim Name: "rs_cnf" 1916 o Claim Description: The public key the RS is supposed to use to 1917 authenticate to the client wielding this token. 1918 o Change Controller: IESG 1919 o Reference: Section 5.8 of [this document] 1921 8.12. CBOR Web Token Claims 1923 This specification registers the following new claims in the "CBOR 1924 Web Token (CWT) Claims" registry [IANA.CborWebTokenClaims]. 1926 o Claim Name: "scope" 1927 o Claim Description: The scope of an access token as defined in 1928 [RFC6749]. 1929 o JWT Claim Name: N/A 1930 o Claim Key: 12 1931 o Claim Value Type(s): byte string or text string 1932 o Change Controller: IESG 1933 o Specification Document(s): Section 5.8 of [this document] 1935 o Claim Name: "profile" 1936 o Claim Description: The profile a token is supposed to be used 1937 with. 1938 o JWT Claim Name: N/A 1939 o Claim Key: 16 1940 o Claim Value Type(s): integer 1941 o Change Controller: IESG 1942 o Specification Document(s): Section 5.8 of [this document] 1944 o Claim Name: "rs_cnf" 1945 o Claim Description: The public key the RS is supposed to use to 1946 authenticate to the client wielding this token. 1947 o JWT Claim Name: N/A 1948 o Claim Key: 17 1949 o Claim Value Type(s): map 1950 o Change Controller: IESG 1951 o Specification Document(s): Section 5.8 of [this document] 1953 8.13. Media Type Registrations 1955 This document registers the 'application/ace+cbor' media type for 1956 messages of the protocols defined in this document carrying 1957 parameters encoded in CBOR. This registration follows the procedures 1958 specified in [RFC6838]. 1960 Type name: application 1962 Subtype name: ace+cbor 1964 Required parameters: none 1966 Optional parameters: none 1968 Encoding considerations: Must be encoded as CBOR map containing the 1969 protocol parameters defined in [this document]. 1971 Security considerations: See Section 6 of this document. 1973 Interoperability considerations: n/a 1975 Published specification: [this document] 1977 Applications that use this media type: The type is used by 1978 authorization servers, clients and resource servers that support the 1979 ACE framework as specified in [this document]. 1981 Additional information: 1983 Magic number(s): n/a 1985 File extension(s): .ace 1987 Macintosh file type code(s): n/a 1989 Person & email address to contact for further information: Ludwig 1990 Seitz 1992 Intended usage: COMMON 1993 Restrictions on usage: None 1995 Author: Ludwig Seitz 1997 Change controller: IESG 1999 8.14. CoAP Content-Format Registry 2001 This document registers the following entry to the "CoAP Content- 2002 Formats" registry: 2004 Media Type: application/ace+cbor 2006 Encoding 2008 ID: 19 2010 Reference: [this document] 2012 9. Acknowledgments 2014 This document is a product of the ACE working group of the IETF. 2016 Thanks to Eve Maler for her contributions to the use of OAuth 2.0 and 2017 UMA in IoT scenarios, Robert Taylor for his discussion input, and 2018 Malisa Vucinic for his input on the predecessors of this proposal. 2020 Thanks to the authors of draft-ietf-oauth-pop-key-distribution, from 2021 where large parts of the security considerations where copied. 2023 Thanks to Stefanie Gerdes, Olaf Bergmann, and Carsten Bormann for 2024 contributing their work on AS discovery from draft-gerdes-ace-dcaf- 2025 authorize (see Section 5.1). 2027 Thanks to Jim Schaad and Mike Jones for their comprehensive reviews. 2029 Ludwig Seitz and Goeran Selander worked on this document as part of 2030 the CelticPlus project CyberWI, with funding from Vinnova. 2032 10. References 2034 10.1. Normative References 2036 [I-D.ietf-ace-cwt-proof-of-possession] 2037 Jones, M., Seitz, L., Selander, G., Erdtman, S., and H. 2038 Tschofenig, "Proof-of-Possession Key Semantics for CBOR 2039 Web Tokens (CWTs)", draft-ietf-ace-cwt-proof-of- 2040 possession-03 (work in progress), June 2018. 2042 [I-D.ietf-ace-oauth-params] 2043 Seitz, L., "Additional OAuth Parameters for Authorization 2044 in Constrained Environments (ACE)", draft-ietf-ace-oauth- 2045 params-00 (work in progress), September 2018. 2047 [IANA.CborWebTokenClaims] 2048 IANA, "CBOR Web Token (CWT) Claims", 2049 . 2052 [IANA.JsonWebTokenClaims] 2053 IANA, "JSON Web Token Claims", 2054 . 2056 [IANA.OAuthAccessTokenTypes] 2057 IANA, "OAuth Access Token Types", 2058 . 2061 [IANA.OAuthParameters] 2062 IANA, "OAuth Parameters", 2063 . 2066 [IANA.TokenIntrospectionResponse] 2067 IANA, "OAuth Token Introspection Response", 2068 . 2071 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2072 Requirement Levels", BCP 14, RFC 2119, 2073 DOI 10.17487/RFC2119, March 1997, . 2076 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 2077 Resource Identifier (URI): Generic Syntax", STD 66, 2078 RFC 3986, DOI 10.17487/RFC3986, January 2005, 2079 . 2081 [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer 2082 Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, 2083 January 2012, . 2085 [RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type 2086 Specifications and Registration Procedures", BCP 13, 2087 RFC 6838, DOI 10.17487/RFC6838, January 2013, 2088 . 2090 [RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained 2091 Application Protocol (CoAP)", RFC 7252, 2092 DOI 10.17487/RFC7252, June 2014, . 2095 [RFC7662] Richer, J., Ed., "OAuth 2.0 Token Introspection", 2096 RFC 7662, DOI 10.17487/RFC7662, October 2015, 2097 . 2099 [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for 2100 Writing an IANA Considerations Section in RFCs", BCP 26, 2101 RFC 8126, DOI 10.17487/RFC8126, June 2017, 2102 . 2104 [RFC8152] Schaad, J., "CBOR Object Signing and Encryption (COSE)", 2105 RFC 8152, DOI 10.17487/RFC8152, July 2017, 2106 . 2108 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2109 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2110 May 2017, . 2112 [RFC8392] Jones, M., Wahlstroem, E., Erdtman, S., and H. Tschofenig, 2113 "CBOR Web Token (CWT)", RFC 8392, DOI 10.17487/RFC8392, 2114 May 2018, . 2116 10.2. Informative References 2118 [I-D.erdtman-ace-rpcc] 2119 Seitz, L. and S. Erdtman, "Raw-Public-Key and Pre-Shared- 2120 Key as OAuth client credentials", draft-erdtman-ace- 2121 rpcc-02 (work in progress), October 2017. 2123 [I-D.ietf-ace-actors] 2124 Gerdes, S., Seitz, L., Selander, G., and C. Bormann, "An 2125 architecture for authorization in constrained 2126 environments", draft-ietf-ace-actors-06 (work in 2127 progress), November 2017. 2129 [I-D.ietf-core-object-security] 2130 Selander, G., Mattsson, J., Palombini, F., and L. Seitz, 2131 "Object Security for Constrained RESTful Environments 2132 (OSCORE)", draft-ietf-core-object-security-15 (work in 2133 progress), August 2018. 2135 [I-D.ietf-oauth-device-flow] 2136 Denniss, W., Bradley, J., Jones, M., and H. Tschofenig, 2137 "OAuth 2.0 Device Flow for Browserless and Input 2138 Constrained Devices", draft-ietf-oauth-device-flow-12 2139 (work in progress), August 2018. 2141 [Margi10impact] 2142 Margi, C., de Oliveira, B., de Sousa, G., Simplicio Jr, 2143 M., Barreto, P., Carvalho, T., Naeslund, M., and R. Gold, 2144 "Impact of Operating Systems on Wireless Sensor Networks 2145 (Security) Applications and Testbeds", Proceedings of 2146 the 19th International Conference on Computer 2147 Communications and Networks (ICCCN), 2010 August. 2149 [RFC4949] Shirey, R., "Internet Security Glossary, Version 2", 2150 FYI 36, RFC 4949, DOI 10.17487/RFC4949, August 2007, 2151 . 2153 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 2154 (TLS) Protocol Version 1.2", RFC 5246, 2155 DOI 10.17487/RFC5246, August 2008, . 2158 [RFC6690] Shelby, Z., "Constrained RESTful Environments (CoRE) Link 2159 Format", RFC 6690, DOI 10.17487/RFC6690, August 2012, 2160 . 2162 [RFC6749] Hardt, D., Ed., "The OAuth 2.0 Authorization Framework", 2163 RFC 6749, DOI 10.17487/RFC6749, October 2012, 2164 . 2166 [RFC6819] Lodderstedt, T., Ed., McGloin, M., and P. Hunt, "OAuth 2.0 2167 Threat Model and Security Considerations", RFC 6819, 2168 DOI 10.17487/RFC6819, January 2013, . 2171 [RFC7049] Bormann, C. and P. Hoffman, "Concise Binary Object 2172 Representation (CBOR)", RFC 7049, DOI 10.17487/RFC7049, 2173 October 2013, . 2175 [RFC7228] Bormann, C., Ersue, M., and A. Keranen, "Terminology for 2176 Constrained-Node Networks", RFC 7228, 2177 DOI 10.17487/RFC7228, May 2014, . 2180 [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 2181 Protocol (HTTP/1.1): Semantics and Content", RFC 7231, 2182 DOI 10.17487/RFC7231, June 2014, . 2185 [RFC7519] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token 2186 (JWT)", RFC 7519, DOI 10.17487/RFC7519, May 2015, 2187 . 2189 [RFC7521] Campbell, B., Mortimore, C., Jones, M., and Y. Goland, 2190 "Assertion Framework for OAuth 2.0 Client Authentication 2191 and Authorization Grants", RFC 7521, DOI 10.17487/RFC7521, 2192 May 2015, . 2194 [RFC7591] Richer, J., Ed., Jones, M., Bradley, J., Machulak, M., and 2195 P. Hunt, "OAuth 2.0 Dynamic Client Registration Protocol", 2196 RFC 7591, DOI 10.17487/RFC7591, July 2015, 2197 . 2199 [RFC7641] Hartke, K., "Observing Resources in the Constrained 2200 Application Protocol (CoAP)", RFC 7641, 2201 DOI 10.17487/RFC7641, September 2015, . 2204 [RFC7744] Seitz, L., Ed., Gerdes, S., Ed., Selander, G., Mani, M., 2205 and S. Kumar, "Use Cases for Authentication and 2206 Authorization in Constrained Environments", RFC 7744, 2207 DOI 10.17487/RFC7744, January 2016, . 2210 [RFC7959] Bormann, C. and Z. Shelby, Ed., "Block-Wise Transfers in 2211 the Constrained Application Protocol (CoAP)", RFC 7959, 2212 DOI 10.17487/RFC7959, August 2016, . 2215 [RFC8252] Denniss, W. and J. Bradley, "OAuth 2.0 for Native Apps", 2216 BCP 212, RFC 8252, DOI 10.17487/RFC8252, October 2017, 2217 . 2219 [RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data 2220 Interchange Format", STD 90, RFC 8259, 2221 DOI 10.17487/RFC8259, December 2017, . 2224 [RFC8414] Jones, M., Sakimura, N., and J. Bradley, "OAuth 2.0 2225 Authorization Server Metadata", RFC 8414, 2226 DOI 10.17487/RFC8414, June 2018, . 2229 Appendix A. Design Justification 2231 This section provides further insight into the design decisions of 2232 the solution documented in this document. Section 3 lists several 2233 building blocks and briefly summarizes their importance. The 2234 justification for offering some of those building blocks, as opposed 2235 to using OAuth 2.0 as is, is given below. 2237 Common IoT constraints are: 2239 Low Power Radio: 2241 Many IoT devices are equipped with a small battery which needs to 2242 last for a long time. For many constrained wireless devices, the 2243 highest energy cost is associated to transmitting or receiving 2244 messages (roughly by a factor of 10 compared to AES) 2245 [Margi10impact]. It is therefore important to keep the total 2246 communication overhead low, including minimizing the number and 2247 size of messages sent and received, which has an impact of choice 2248 on the message format and protocol. By using CoAP over UDP and 2249 CBOR encoded messages, some of these aspects are addressed. 2250 Security protocols contribute to the communication overhead and 2251 can, in some cases, be optimized. For example, authentication and 2252 key establishment may, in certain cases where security 2253 requirements allow, be replaced by provisioning of security 2254 context by a trusted third party, using transport or application 2255 layer security. 2257 Low CPU Speed: 2259 Some IoT devices are equipped with processors that are 2260 significantly slower than those found in most current devices on 2261 the Internet. This typically has implications on what timely 2262 cryptographic operations a device is capable of performing, which 2263 in turn impacts, e.g., protocol latency. Symmetric key 2264 cryptography may be used instead of the computationally more 2265 expensive public key cryptography where the security requirements 2266 so allows, but this may also require support for trusted third 2267 party assisted secret key establishment using transport or 2268 application layer security. 2269 Small Amount of Memory: 2271 Microcontrollers embedded in IoT devices are often equipped with 2272 small amount of RAM and flash memory, which places limitations 2273 what kind of processing can be performed and how much code can be 2274 put on those devices. To reduce code size fewer and smaller 2275 protocol implementations can be put on the firmware of such a 2276 device. In this case, CoAP may be used instead of HTTP, symmetric 2277 key cryptography instead of public key cryptography, and CBOR 2278 instead of JSON. Authentication and key establishment protocol, 2279 e.g., the DTLS handshake, in comparison with assisted key 2280 establishment also has an impact on memory and code. 2282 User Interface Limitations: 2284 Protecting access to resources is both an important security as 2285 well as privacy feature. End users and enterprise customers may 2286 not want to give access to the data collected by their IoT device 2287 or to functions it may offer to third parties. Since the 2288 classical approach of requesting permissions from end users via a 2289 rich user interface does not work in many IoT deployment 2290 scenarios, these functions need to be delegated to user-controlled 2291 devices that are better suitable for such tasks, such as smart 2292 phones and tablets. 2294 Communication Constraints: 2296 In certain constrained settings an IoT device may not be able to 2297 communicate with a given device at all times. Devices may be 2298 sleeping, or just disconnected from the Internet because of 2299 general lack of connectivity in the area, for cost reasons, or for 2300 security reasons, e.g., to avoid an entry point for Denial-of- 2301 Service attacks. 2303 The communication interactions this framework builds upon (as 2304 shown graphically in Figure 1) may be accomplished using a variety 2305 of different protocols, and not all parts of the message flow are 2306 used in all applications due to the communication constraints. 2307 Deployments making use of CoAP are expected, but not limited to, 2308 other protocols such as HTTP, HTTP/2 or other specific protocols, 2309 such as Bluetooth Smart communication, that do not necessarily use 2310 IP could also be used. The latter raises the need for application 2311 layer security over the various interfaces. 2313 In the light of these constraints we have made the following design 2314 decisions: 2316 CBOR, COSE, CWT: 2318 This framework REQUIRES the use of CBOR [RFC7049] as data format. 2319 Where CBOR data needs to be protected, the use of COSE [RFC8152] 2320 is RECOMMENDED. Furthermore where self-contained tokens are 2321 needed, this framework RECOMMENDS the use of CWT [RFC8392]. These 2322 measures aim at reducing the size of messages sent over the wire, 2323 the RAM size of data objects that need to be kept in memory and 2324 the size of libraries that devices need to support. 2326 CoAP: 2328 This framework RECOMMENDS the use of CoAP [RFC7252] instead of 2329 HTTP. This does not preclude the use of other protocols 2330 specifically aimed at constrained devices, like, e.g., Bluetooth 2331 Low Energy (see Section 3.2). This aims again at reducing the 2332 size of messages sent over the wire, the RAM size of data objects 2333 that need to be kept in memory and the size of libraries that 2334 devices need to support. 2336 Access Information: 2338 This framework defines the name "Access Information" for data 2339 concerning the RS that the AS returns to the client in an access 2340 token response (see Section 5.6.2). This includes the "profile" 2341 and the "rs_cnf" parameters. This aims at enabling scenarios, 2342 where a powerful client, supporting multiple profiles, needs to 2343 interact with a RS for which it does not know the supported 2344 profiles and the raw public key. 2346 Proof-of-Possession: 2348 This framework makes use of proof-of-possession tokens, using the 2349 "cnf" claim [I-D.ietf-ace-cwt-proof-of-possession]. A 2350 semantically and syntactically identical request and response 2351 parameter is defined for the token endpoint, to allow requesting 2352 and stating confirmation keys. This aims at making token theft 2353 harder. Token theft is specifically relevant in constrained use 2354 cases, as communication often passes through middle-boxes, which 2355 could be able to steal bearer tokens and use them to gain 2356 unauthorized access. 2358 Auth-Info endpoint: 2360 This framework introduces a new way of providing access tokens to 2361 a RS by exposing a authz-info endpoint, to which access tokens can 2362 be POSTed. This aims at reducing the size of the request message 2363 and the code complexity at the RS. The size of the request 2364 message is problematic, since many constrained protocols have 2365 severe message size limitations at the physical layer (e.g., in 2366 the order of 100 bytes). This means that larger packets get 2367 fragmented, which in turn combines badly with the high rate of 2368 packet loss, and the need to retransmit the whole message if one 2369 packet gets lost. Thus separating sending of the request and 2370 sending of the access tokens helps to reduce fragmentation. 2372 Client Credentials Grant: 2374 This framework RECOMMENDS the use of the client credentials grant 2375 for machine-to-machine communication use cases, where manual 2376 intervention of the resource owner to produce a grant token is not 2377 feasible. The intention is that the resource owner would instead 2378 pre-arrange authorization with the AS, based on the client's own 2379 credentials. The client can the (without manual intervention) 2380 obtain access tokens from the AS. 2382 Introspection: 2384 This framework RECOMMENDS the use of access token introspection in 2385 cases where the client is constrained in a way that it can not 2386 easily obtain new access tokens (i.e. it has connectivity issues 2387 that prevent it from communicating with the AS). In that case 2388 this framework RECOMMENDS the use of a long-term token, that could 2389 be a simple reference. The RS is assumed to be able to 2390 communicate with the AS, and can therefore perform introspection, 2391 in order to learn the claims associated with the token reference. 2392 The advantage of such an approach is that the resource owner can 2393 change the claims associated to the token reference without having 2394 to be in contact with the client, thus granting or revoking access 2395 rights. 2397 Appendix B. Roles and Responsibilities 2399 Resource Owner 2401 * Make sure that the RS is registered at the AS. This includes 2402 making known to the AS which profiles, token_types, scopes, and 2403 key types (symmetric/asymmetric) the RS supports. Also making 2404 it known to the AS which audience(s) the RS identifies itself 2405 with. 2406 * Make sure that clients can discover the AS that is in charge of 2407 the RS. 2408 * If the client-credentials grant is used, make sure that the AS 2409 has the necessary, up-to-date, access control policies for the 2410 RS. 2412 Requesting Party 2414 * Make sure that the client is provisioned the necessary 2415 credentials to authenticate to the AS. 2416 * Make sure that the client is configured to follow the security 2417 requirements of the Requesting Party when issuing requests 2418 (e.g., minimum communication security requirements, trust 2419 anchors). 2421 * Register the client at the AS. This includes making known to 2422 the AS which profiles, token_types, and key types (symmetric/ 2423 asymmetric) the client. 2425 Authorization Server 2427 * Register the RS and manage corresponding security contexts. 2428 * Register clients and authentication credentials. 2429 * Allow Resource Owners to configure and update access control 2430 policies related to their registered RSs. 2431 * Expose the token endpoint to allow clients to request tokens. 2432 * Authenticate clients that wish to request a token. 2433 * Process a token request using the authorization policies 2434 configured for the RS. 2435 * Optionally: Expose the introspection endpoint that allows RS's 2436 to submit token introspection requests. 2437 * If providing an introspection endpoint: Authenticate RSs that 2438 wish to get an introspection response. 2439 * If providing an introspection endpoint: Process token 2440 introspection requests. 2441 * Optionally: Handle token revocation. 2442 * Optionally: Provide discovery metadata. See [RFC8414] 2443 * Optionally: Handle refresh tokens. 2445 Client 2447 * Discover the AS in charge of the RS that is to be targeted with 2448 a request. 2449 * Submit the token request (see step (A) of Figure 1). 2451 + Authenticate to the AS. 2452 + Optionally (if not pre-configured): Specify which RS, which 2453 resource(s), and which action(s) the request(s) will target. 2454 + If raw public keys (rpk) or certificates are used, make sure 2455 the AS has the right rpk or certificate for this client. 2456 * Process the access token and Access Information (see step (B) 2457 of Figure 1). 2459 + Check that the Access Information provides the necessary 2460 security parameters (e.g., PoP key, information on 2461 communication security protocols supported by the RS). 2462 + Safely store the proof-of-possession key. 2463 + If provided by the AS: Safely store the refresh token. 2464 * Send the token and request to the RS (see step (C) of 2465 Figure 1). 2467 + Authenticate towards the RS (this could coincide with the 2468 proof of possession process). 2470 + Transmit the token as specified by the AS (default is to the 2471 authz-info endpoint, alternative options are specified by 2472 profiles). 2473 + Perform the proof-of-possession procedure as specified by 2474 the profile in use (this may already have been taken care of 2475 through the authentication procedure). 2476 * Process the RS response (see step (F) of Figure 1) of the RS. 2478 Resource Server 2480 * Expose a way to submit access tokens. By default this is the 2481 authz-info endpoint. 2482 * Process an access token. 2484 + Verify the token is from a recognized AS. 2485 + Verify that the token applies to this RS. 2486 + Check that the token has not expired (if the token provides 2487 expiration information). 2488 + Check the token's integrity. 2489 + Store the token so that it can be retrieved in the context 2490 of a matching request. 2491 * Process a request. 2493 + Set up communication security with the client. 2494 + Authenticate the client. 2495 + Match the client against existing tokens. 2496 + Check that tokens belonging to the client actually authorize 2497 the requested action. 2498 + Optionally: Check that the matching tokens are still valid, 2499 using introspection (if this is possible.) 2500 * Send a response following the agreed upon communication 2501 security. 2502 * Safely store credentials such as raw public keys for 2503 authentication or proof-of-possession keys linked to access 2504 tokens. 2506 Appendix C. Requirements on Profiles 2508 This section lists the requirements on profiles of this framework, 2509 for the convenience of profile designers. 2511 o Specify the communication protocol the client and RS the must use 2512 (e.g., CoAP). Section 5 and Section 5.6.4.3 2513 o Specify the security protocol the client and RS must use to 2514 protect their communication (e.g., OSCORE or DTLS over CoAP). 2515 This must provide encryption, integrity and replay protection. 2516 Section 5.6.4.3 2518 o Specify how the client and the RS mutually authenticate. 2519 Section 4 2520 o Specify the proof-of-possession protocol(s) and how to select one, 2521 if several are available. Also specify which key types (e.g., 2522 symmetric/asymmetric) are supported by a specific proof-of- 2523 possession protocol. Section 5.6.4.2 2524 o Specify a unique profile identifier. Section 5.6.4.3 2525 o If introspection is supported: Specify the communication and 2526 security protocol for introspection.Section 5.7 2527 o Specify the communication and security protocol for interactions 2528 between client and AS. Section 5.6 2529 o Specify how/if the authz-info endpoint is protected, including how 2530 error responses are protected. Section 5.8.1 2531 o Optionally define other methods of token transport than the authz- 2532 info endpoint. Section 5.8.1 2534 Appendix D. Assumptions on AS knowledge about C and RS 2536 This section lists the assumptions on what an AS should know about a 2537 client and a RS in order to be able to respond to requests to the 2538 token and introspection endpoints. How this information is 2539 established is out of scope for this document. 2541 o The identifier of the client or RS. 2542 o The profiles that the client or RS supports. 2543 o The scopes that the RS supports. 2544 o The audiences that the RS identifies with. 2545 o The key types (e.g., pre-shared symmetric key, raw public key, key 2546 length, other key parameters) that the client or RS supports. 2547 o The types of access tokens the RS supports (e.g., CWT). 2548 o If the RS supports CWTs, the COSE parameters for the crypto 2549 wrapper (e.g., algorithm, key-wrap algorithm, key-length). 2550 o The expiration time for access tokens issued to this RS (unless 2551 the RS accepts a default time chosen by the AS). 2552 o The symmetric key shared between client or RS and AS (if any). 2553 o The raw public key of the client or RS (if any). 2555 Appendix E. Deployment Examples 2557 There is a large variety of IoT deployments, as is indicated in 2558 Appendix A, and this section highlights a few common variants. This 2559 section is not normative but illustrates how the framework can be 2560 applied. 2562 For each of the deployment variants, there are a number of possible 2563 security setups between clients, resource servers and authorization 2564 servers. The main focus in the following subsections is on how 2565 authorization of a client request for a resource hosted by a RS is 2566 performed. This requires the security of the requests and responses 2567 between the clients and the RS to consider. 2569 Note: CBOR diagnostic notation is used for examples of requests and 2570 responses. 2572 E.1. Local Token Validation 2574 In this scenario, the case where the resource server is offline is 2575 considered, i.e., it is not connected to the AS at the time of the 2576 access request. This access procedure involves steps A, B, C, and F 2577 of Figure 1. 2579 Since the resource server must be able to verify the access token 2580 locally, self-contained access tokens must be used. 2582 This example shows the interactions between a client, the 2583 authorization server and a temperature sensor acting as a resource 2584 server. Message exchanges A and B are shown in Figure 17. 2586 A: The client first generates a public-private key pair used for 2587 communication security with the RS. 2588 The client sends the POST request to the token endpoint at the AS. 2589 The security of this request can be transport or application 2590 layer. It is up the the communication security profile to define. 2591 In the example transport layer identification of the AS is done 2592 and the client identifies with client_id and client_secret as in 2593 classic OAuth. The request contains the public key of the client 2594 and the Audience parameter set to "tempSensorInLivingRoom", a 2595 value that the temperature sensor identifies itself with. The AS 2596 evaluates the request and authorizes the client to access the 2597 resource. 2598 B: The AS responds with a PoP access token and Access Information. 2599 The PoP access token contains the public key of the client, and 2600 the Access Information contains the public key of the RS. For 2601 communication security this example uses DTLS RawPublicKey between 2602 the client and the RS. The issued token will have a short 2603 validity time, i.e., "exp" close to "iat", to protect the RS from 2604 replay attacks. The token includes the claim such as "scope" with 2605 the authorized access that an owner of the temperature device can 2606 enjoy. In this example, the "scope" claim, issued by the AS, 2607 informs the RS that the owner of the token, that can prove the 2608 possession of a key is authorized to make a GET request against 2609 the /temperature resource and a POST request on the /firmware 2610 resource. Note that the syntax and semantics of the scope claim 2611 are application specific. 2613 Note: In this example it is assumed that the client knows what 2614 resource it wants to access, and is therefore able to request 2615 specific audience and scope claims for the access token. 2617 Authorization 2618 Client Server 2619 | | 2620 |<=======>| DTLS Connection Establishment 2621 | | to identify the AS 2622 | | 2623 A: +-------->| Header: POST (Code=0.02) 2624 | POST | Uri-Path:"token" 2625 | | Content-Format: application/ace+cbor 2626 | | Payload: 2627 | | 2628 B: |<--------+ Header: 2.05 Content 2629 | 2.05 | Content-Format: application/ace+cbor 2630 | | Payload: 2631 | | 2633 Figure 17: Token Request and Response Using Client Credentials. 2635 The information contained in the Request-Payload and the Response- 2636 Payload is shown in Figure 18. 2638 Request-Payload : 2639 { 2640 "grant_type" : "client_credentials", 2641 "aud" : "tempSensorInLivingRoom", 2642 "client_id" : "myclient", 2643 "client_secret" : "qwerty" 2644 "cnf" : { 2645 "COSE_Key" : { 2646 "kid" : b64'1Bg8vub9tLe1gHMzV76e8', 2647 "kty" : "EC", 2648 "crv" : "P-256", 2649 "x" : b64'f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU', 2650 "y" : b64'x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0' 2651 } 2652 } 2653 } 2655 Response-Payload : 2656 { 2657 "access_token" : b64'SlAV32hkKG ...', 2658 "token_type" : "pop", 2659 "rs_cnf" : { 2660 "COSE_Key" : { 2661 "kid" : b64'c29tZSBwdWJsaWMga2V5IGlk', 2662 "kty" : "EC", 2663 "crv" : "P-256", 2664 "x" : b64'MKBCTNIcKUSDii11ySs3526iDZ8AiTo7Tu6KPAqv7D4', 2665 "y" : b64'4Etl6SRW2YiLUrN5vfvVHuhp7x8PxltmWWlbbM4IFyM' 2666 } 2667 } 2668 } 2670 Figure 18: Request and Response Payload Details. 2672 The content of the access token is shown in Figure 19. 2674 { 2675 "aud" : "tempSensorInLivingRoom", 2676 "iat" : "1360189224", 2677 "exp" : "1360289224", 2678 "scope" : "temperature_g firmware_p", 2679 "cnf" : { 2680 "COSE_Key" : { 2681 "kid" : b64'1Bg8vub9tLe1gHMzV76e8', 2682 "kty" : "EC", 2683 "crv" : "P-256", 2684 "x" : b64'f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU', 2685 "y" : b64'x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0' 2686 } 2687 } 2688 } 2690 Figure 19: Access Token including Public Key of the Client. 2692 Messages C and F are shown in Figure 20 - Figure 21. 2694 C: The client then sends the PoP access token to the authz-info 2695 endpoint at the RS. This is a plain CoAP request, i.e., no 2696 transport or application layer security is used between client and 2697 RS since the token is integrity protected between the AS and RS. 2698 The RS verifies that the PoP access token was created by a known 2699 and trusted AS, is valid, and has been issued to the client. The 2700 RS caches the security context together with authorization 2701 information about this client contained in the PoP access token. 2703 Resource 2704 Client Server 2705 | | 2706 C: +-------->| Header: POST (Code=0.02) 2707 | POST | Uri-Path:"authz-info" 2708 | | Payload: SlAV32hkKG ... 2709 | | 2710 |<--------+ Header: 2.04 Changed 2711 | 2.04 | 2712 | | 2714 Figure 20: Access Token provisioning to RS 2715 The client and the RS runs the DTLS handshake using the raw public 2716 keys established in step B and C. 2717 The client sends the CoAP request GET to /temperature on RS over 2718 DTLS. The RS verifies that the request is authorized, based on 2719 previously established security context. 2720 F: The RS responds with a resource representation over DTLS. 2722 Resource 2723 Client Server 2724 | | 2725 |<=======>| DTLS Connection Establishment 2726 | | using Raw Public Keys 2727 | | 2728 +-------->| Header: GET (Code=0.01) 2729 | GET | Uri-Path: "temperature" 2730 | | 2731 | | 2732 | | 2733 F: |<--------+ Header: 2.05 Content 2734 | 2.05 | Payload: 2735 | | 2737 Figure 21: Resource Request and Response protected by DTLS. 2739 E.2. Introspection Aided Token Validation 2741 In this deployment scenario it is assumed that a client is not able 2742 to access the AS at the time of the access request, whereas the RS is 2743 assumed to be connected to the back-end infrastructure. Thus the RS 2744 can make use of token introspection. This access procedure involves 2745 steps A-F of Figure 1, but assumes steps A and B have been carried 2746 out during a phase when the client had connectivity to AS. 2748 Since the client is assumed to be offline, at least for a certain 2749 period of time, a pre-provisioned access token has to be long-lived. 2750 Since the client is constrained, the token will not be self contained 2751 (i.e. not a CWT) but instead just a reference. The resource server 2752 uses its connectivity to learn about the claims associated to the 2753 access token by using introspection, which is shown in the example 2754 below. 2756 In the example interactions between an offline client (key fob), a RS 2757 (online lock), and an AS is shown. It is assumed that there is a 2758 provisioning step where the client has access to the AS. This 2759 corresponds to message exchanges A and B which are shown in 2760 Figure 22. 2762 Authorization consent from the resource owner can be pre-configured, 2763 but it can also be provided via an interactive flow with the resource 2764 owner. An example of this for the key fob case could be that the 2765 resource owner has a connected car, he buys a generic key that he 2766 wants to use with the car. To authorize the key fob he connects it 2767 to his computer that then provides the UI for the device. After that 2768 OAuth 2.0 implicit flow can used to authorize the key for his car at 2769 the the car manufacturers AS. 2771 Note: In this example the client does not know the exact door it will 2772 be used to access since the token request is not send at the time of 2773 access. So the scope and audience parameters are set quite wide to 2774 start with and new values different form the original once can be 2775 returned from introspection later on. 2777 A: The client sends the request using POST to the token endpoint 2778 at AS. The request contains the Audience parameter set to 2779 "PACS1337" (PACS, Physical Access System), a value the that the 2780 online door in question identifies itself with. The AS generates 2781 an access token as an opaque string, which it can match to the 2782 specific client, a targeted audience and a symmetric key. The 2783 security is provided by identifying the AS on transport layer 2784 using a pre shared security context (psk, rpk or certificate) and 2785 then the client is identified using client_id and client_secret as 2786 in classic OAuth. 2787 B: The AS responds with the an access token and Access 2788 Information, the latter containing a symmetric key. Communication 2789 security between C and RS will be DTLS and PreSharedKey. The PoP 2790 key is used as the PreSharedKey. 2792 Authorization 2793 Client Server 2794 | | 2795 | | 2796 A: +-------->| Header: POST (Code=0.02) 2797 | POST | Uri-Path:"token" 2798 | | Content-Format: application/ace+cbor 2799 | | Payload: 2800 | | 2801 B: |<--------+ Header: 2.05 Content 2802 | | Content-Format: application/ace+cbor 2803 | 2.05 | Payload: 2804 | | 2806 Figure 22: Token Request and Response using Client Credentials. 2808 The information contained in the Request-Payload and the Response- 2809 Payload is shown in Figure 23. 2811 Request-Payload: 2812 { 2813 "grant_type" : "client_credentials", 2814 "client_id" : "keyfob", 2815 "client_secret" : "qwerty" 2816 } 2818 Response-Payload: 2819 { 2820 "access_token" : b64'VGVzdCB0b2tlbg==', 2821 "token_type" : "pop", 2822 "cnf" : { 2823 "COSE_Key" : { 2824 "kid" : b64'c29tZSBwdWJsaWMga2V5IGlk', 2825 "kty" : "oct", 2826 "alg" : "HS256", 2827 "k": b64'ZoRSOrFzN_FzUA5XKMYoVHyzff5oRJxl-IXRtztJ6uE' 2828 } 2829 } 2830 } 2832 Figure 23: Request and Response Payload for C offline 2834 The access token in this case is just an opaque byte string 2835 referencing the authorization information at the AS. 2837 C: Next, the client POSTs the access token to the authz-info 2838 endpoint in the RS. This is a plain CoAP request, i.e., no DTLS 2839 between client and RS. Since the token is an opaque string, the 2840 RS cannot verify it on its own, and thus defers to respond the 2841 client with a status code until after step E. 2842 D: The RS forwards the token to the introspection endpoint on the 2843 AS. Introspection assumes a secure connection between the AS and 2844 the RS, e.g., using transport of application layer security. In 2845 the example AS is identified using pre shared security context 2846 (psk, rpk or certificate) while RS is acting as client and is 2847 identified with client_id and client_secret. 2848 E: The AS provides the introspection response containing 2849 parameters about the token. This includes the confirmation key 2850 (cnf) parameter that allows the RS to verify the client's proof of 2851 possession in step F. 2852 After receiving message E, the RS responds to the client's POST in 2853 step C with the CoAP response code 2.01 (Created). 2855 Resource 2856 Client Server 2857 | | 2858 C: +-------->| Header: POST (T=CON, Code=0.02) 2859 | POST | Uri-Path:"authz-info" 2860 | | Content-Format: "application/ace+cbor" 2861 | | Payload: b64'VGVzdCB0b2tlbg==' 2862 | | 2863 | | Authorization 2864 | | Server 2865 | | | 2866 | D: +--------->| Header: POST (Code=0.02) 2867 | | POST | Uri-Path: "introspect" 2868 | | | Content-Format: "application/ace+cbor" 2869 | | | Payload: 2870 | | | 2871 | E: |<---------+ Header: 2.05 Content 2872 | | 2.05 | Content-Format: "application/ace+cbor" 2873 | | | Payload: 2874 | | | 2875 | | 2876 |<--------+ Header: 2.01 Created 2877 | 2.01 | 2878 | | 2880 Figure 24: Token Introspection for C offline 2881 The information contained in the Request-Payload and the Response- 2882 Payload is shown in Figure 25. 2884 Request-Payload: 2885 { 2886 "token" : b64'VGVzdCB0b2tlbg==', 2887 "client_id" : "FrontDoor", 2888 "client_secret" : "ytrewq" 2889 } 2891 Response-Payload: 2892 { 2893 "active" : true, 2894 "aud" : "lockOfDoor4711", 2895 "scope" : "open, close", 2896 "iat" : 1311280970, 2897 "cnf" : { 2898 "kid" : b64'c29tZSBwdWJsaWMga2V5IGlk' 2899 } 2900 } 2902 Figure 25: Request and Response Payload for Introspection 2904 The client uses the symmetric PoP key to establish a DTLS 2905 PreSharedKey secure connection to the RS. The CoAP request PUT is 2906 sent to the uri-path /state on the RS, changing the state of the 2907 door to locked. 2908 F: The RS responds with a appropriate over the secure DTLS 2909 channel. 2911 Resource 2912 Client Server 2913 | | 2914 |<=======>| DTLS Connection Establishment 2915 | | using Pre Shared Key 2916 | | 2917 +-------->| Header: PUT (Code=0.03) 2918 | PUT | Uri-Path: "state" 2919 | | Payload: 2920 | | 2921 F: |<--------+ Header: 2.04 Changed 2922 | 2.04 | Payload: 2923 | | 2925 Figure 26: Resource request and response protected by OSCORE 2927 Appendix F. Document Updates 2929 RFC EDITOR: PLEASE REMOVE THIS SECTION. 2931 F.1. Version -14 to -15 2933 o Added text about refresh tokens. 2934 o Added text about protection of credentials. 2935 o Rephrased introspection so that other entities than RS can do it. 2936 o Editorial improvements. 2938 F.2. Version -13 to -14 2940 o Split out the 'aud', 'cnf' and 'rs_cnf' parameters to 2941 [I-D.ietf-ace-oauth-params] 2942 o Introduced the "application/ace+cbor" Content-Type. 2943 o Added claim registrations from 'profile' and 'rs_cnf'. 2944 o Added note on schema part of AS Information Section 5.1.2 2945 o Realigned the parameter abbreviations to push rarely used ones to 2946 the 2-byte encoding size of CBOR integers. 2948 F.3. Version -12 to -13 2950 o Changed "Resource Information" to "Access Information" to avoid 2951 confusion. 2952 o Clarified section about AS discovery. 2953 o Editorial changes 2955 F.4. Version -11 to -12 2957 o Moved the Request error handling to a section of its own. 2958 o Require the use of the abbreviation for profile identifiers. 2959 o Added rs_cnf parameter in the introspection response, to inform 2960 RS' with several RPKs on which key to use. 2961 o Allowed use of rs_cnf as claim in the access token in order to 2962 inform an RS with several RPKs on which key to use. 2963 o Clarified that profiles must specify if/how error responses are 2964 protected. 2965 o Fixed label number range to align with COSE/CWT. 2966 o Clarified the requirements language in order to allow profiles to 2967 specify other payload formats than CBOR if they do not use CoAP. 2969 F.5. Version -10 to -11 2971 o Fixed some CBOR data type errors. 2972 o Updated boilerplate text 2974 F.6. Version -09 to -10 2976 o Removed CBOR major type numbers. 2977 o Removed the client token design. 2978 o Rephrased to clarify that other protocols than CoAP can be used. 2979 o Clarifications regarding the use of HTTP 2981 F.7. Version -08 to -09 2983 o Allowed scope to be byte arrays. 2984 o Defined default names for endpoints. 2985 o Refactored the IANA section for briefness and consistency. 2986 o Refactored tables that define IANA registry contents for 2987 consistency. 2988 o Created IANA registry for CBOR mappings of error codes, grant 2989 types and Authorization Server Information. 2990 o Added references to other document sections defining IANA entries 2991 in the IANA section. 2993 F.8. Version -07 to -08 2995 o Moved AS discovery from the DTLS profile to the framework, see 2996 Section 5.1. 2997 o Made the use of CBOR mandatory. If you use JSON you can use 2998 vanilla OAuth. 2999 o Made it mandatory for profiles to specify C-AS security and RS-AS 3000 security (the latter only if introspection is supported). 3001 o Made the use of CBOR abbreviations mandatory. 3002 o Added text to clarify the use of token references as an 3003 alternative to CWTs. 3004 o Added text to clarify that introspection must not be delayed, in 3005 case the RS has to return a client token. 3006 o Added security considerations about leakage through unprotected AS 3007 discovery information, combining profiles and leakage through 3008 error responses. 3009 o Added privacy considerations about leakage through unprotected AS 3010 discovery. 3011 o Added text that clarifies that introspection is optional. 3012 o Made profile parameter optional since it can be implicit. 3013 o Clarified that CoAP is not mandatory and other protocols can be 3014 used. 3015 o Clarified the design justification for specific features of the 3016 framework in appendix A. 3017 o Clarified appendix E.2. 3018 o Removed specification of the "cnf" claim for CBOR/COSE, and 3019 replaced with references to [I-D.ietf-ace-cwt-proof-of-possession] 3021 F.9. Version -06 to -07 3023 o Various clarifications added. 3024 o Fixed erroneous author email. 3026 F.10. Version -05 to -06 3028 o Moved sections that define the ACE framework into a subsection of 3029 the framework Section 5. 3030 o Split section on client credentials and grant into two separate 3031 sections, Section 5.2, and Section 5.3. 3032 o Added Section 5.4 on AS authentication. 3033 o Added Section 5.5 on the Authorization endpoint. 3035 F.11. Version -04 to -05 3037 o Added RFC 2119 language to the specification of the required 3038 behavior of profile specifications. 3039 o Added Section 5.3 on the relation to the OAuth2 grant types. 3041 o Added CBOR abbreviations for error and the error codes defined in 3042 OAuth2. 3043 o Added clarification about token expiration and long-running 3044 requests in Section 5.8.3 3045 o Added security considerations about tokens with symmetric pop keys 3046 valid for more than one RS. 3047 o Added privacy considerations section. 3048 o Added IANA registry mapping the confirmation types from RFC 7800 3049 to equivalent COSE types. 3050 o Added appendix D, describing assumptions about what the AS knows 3051 about the client and the RS. 3053 F.12. Version -03 to -04 3055 o Added a description of the terms "framework" and "profiles" as 3056 used in this document. 3057 o Clarified protection of access tokens in section 3.1. 3058 o Clarified uses of the "cnf" parameter in section 6.4.5. 3059 o Clarified intended use of Client Token in section 7.4. 3061 F.13. Version -02 to -03 3063 o Removed references to draft-ietf-oauth-pop-key-distribution since 3064 the status of this draft is unclear. 3065 o Copied and adapted security considerations from draft-ietf-oauth- 3066 pop-key-distribution. 3067 o Renamed "client information" to "RS information" since it is 3068 information about the RS. 3069 o Clarified the requirements on profiles of this framework. 3070 o Clarified the token endpoint protocol and removed negotiation of 3071 "profile" and "alg" (section 6). 3072 o Renumbered the abbreviations for claims and parameters to get a 3073 consistent numbering across different endpoints. 3074 o Clarified the introspection endpoint. 3075 o Renamed token, introspection and authz-info to "endpoint" instead 3076 of "resource" to mirror the OAuth 2.0 terminology. 3077 o Updated the examples in the appendices. 3079 F.14. Version -01 to -02 3081 o Restructured to remove communication security parts. These shall 3082 now be defined in profiles. 3083 o Restructured section 5 to create new sections on the OAuth 3084 endpoints token, introspection and authz-info. 3085 o Pulled in material from draft-ietf-oauth-pop-key-distribution in 3086 order to define proof-of-possession key distribution. 3087 o Introduced the "cnf" parameter as defined in RFC7800 to reference 3088 or transport keys used for proof of possession. 3090 o Introduced the "client-token" to transport client information from 3091 the AS to the client via the RS in conjunction with introspection. 3092 o Expanded the IANA section to define parameters for token request, 3093 introspection and CWT claims. 3094 o Moved deployment scenarios to the appendix as examples. 3096 F.15. Version -00 to -01 3098 o Changed 5.1. from "Communication Security Protocol" to "Client 3099 Information". 3100 o Major rewrite of 5.1 to clarify the information exchanged between 3101 C and AS in the PoP access token request profile for IoT. 3103 * Allow the client to indicate preferences for the communication 3104 security protocol. 3105 * Defined the term "Client Information" for the additional 3106 information returned to the client in addition to the access 3107 token. 3108 * Require that the messages between AS and client are secured, 3109 either with (D)TLS or with COSE_Encrypted wrappers. 3110 * Removed dependency on OSCOAP and added generic text about 3111 object security instead. 3112 * Defined the "rpk" parameter in the client information to 3113 transmit the raw public key of the RS from AS to client. 3114 * (D)TLS MUST use the PoP key in the handshake (either as PSK or 3115 as client RPK with client authentication). 3116 * Defined the use of x5c, x5t and x5tS256 parameters when a 3117 client certificate is used for proof of possession. 3118 * Defined "tktn" parameter for signaling for how to transfer the 3119 access token. 3120 o Added 5.2. the CoAP Access-Token option for transferring access 3121 tokens in messages that do not have payload. 3122 o 5.3.2. Defined success and error responses from the RS when 3123 receiving an access token. 3124 o 5.6.:Added section giving guidance on how to handle token 3125 expiration in the absence of reliable time. 3126 o Appendix B Added list of roles and responsibilities for C, AS and 3127 RS. 3129 Authors' Addresses 3131 Ludwig Seitz 3132 RISE 3133 Scheelevaegen 17 3134 Lund 223 70 3135 Sweden 3137 Email: ludwig.seitz@ri.se 3138 Goeran Selander 3139 Ericsson 3140 Faroegatan 6 3141 Kista 164 80 3142 Sweden 3144 Email: goran.selander@ericsson.com 3146 Erik Wahlstroem 3147 Sweden 3149 Email: erik@wahlstromstekniska.se 3151 Samuel Erdtman 3152 Spotify AB 3153 Birger Jarlsgatan 61, 4tr 3154 Stockholm 113 56 3155 Sweden 3157 Email: erdtman@spotify.com 3159 Hannes Tschofenig 3160 Arm Ltd. 3161 Absam 6067 3162 Austria 3164 Email: Hannes.Tschofenig@arm.com