idnits 2.17.1 draft-ietf-ace-oauth-authz-14.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 19, 2018) is 2039 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) == Outdated reference: A later version (-11) exists of draft-ietf-ace-cwt-proof-of-possession-03 == Outdated reference: A later version (-16) exists of draft-ietf-ace-oauth-params-00 ** Obsolete normative reference: RFC 6347 (Obsoleted by RFC 9147) ** Obsolete normative reference: RFC 8152 (Obsoleted by RFC 9052, RFC 9053) == Outdated reference: A later version (-07) exists of draft-ietf-ace-actors-06 == Outdated reference: A later version (-16) exists of draft-ietf-core-object-security-15 == Outdated reference: A later version (-15) exists of draft-ietf-oauth-device-flow-12 -- Obsolete informational reference (is this intentional?): RFC 5246 (Obsoleted by RFC 8446) -- Obsolete informational reference (is this intentional?): RFC 7049 (Obsoleted by RFC 8949) -- Obsolete informational reference (is this intentional?): RFC 7231 (Obsoleted by RFC 9110) Summary: 2 errors (**), 0 flaws (~~), 6 warnings (==), 4 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 SICS 4 Intended status: Standards Track G. Selander 5 Expires: March 23, 2019 Ericsson 6 E. Wahlstroem 8 S. Erdtman 9 Spotify AB 10 H. Tschofenig 11 Arm Ltd. 12 September 19, 2018 14 Authentication and Authorization for Constrained Environments (ACE) 15 using the OAuth 2.0 Framework (ACE-OAuth) 16 draft-ietf-ace-oauth-authz-14 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 23, 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 . . . . . . . . . . . . . . . . . . . . . . . . . . 9 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 'Introspect' Endpoint . . . . . . . . . . . . . . . . 27 87 5.7.1. RS-to-AS Request . . . . . . . . . . . . . . . . . . 28 88 5.7.2. AS-to-RS 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.13.1. Media Type Registration . . . . . . . . . . . . . . 43 117 8.14. CoAP Content-Format Registry . . . . . . . . . . . . . . 44 118 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 44 119 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 44 120 10.1. Normative References . . . . . . . . . . . . . . . . . . 44 121 10.2. Informative References . . . . . . . . . . . . . . . . . 46 122 Appendix A. Design Justification . . . . . . . . . . . . . . . . 49 123 Appendix B. Roles and Responsibilities . . . . . . . . . . . . . 52 124 Appendix C. Requirements on Profiles . . . . . . . . . . . . . . 54 125 Appendix D. Assumptions on AS knowledge about C and RS . . . . . 55 126 Appendix E. Deployment Examples . . . . . . . . . . . . . . . . 55 127 E.1. Local Token Validation . . . . . . . . . . . . . . . . . 56 128 E.2. Introspection Aided Token Validation . . . . . . . . . . 60 129 Appendix F. Document Updates . . . . . . . . . . . . . . . . . . 64 130 F.1. Version -13 to -14 . . . . . . . . . . . . . . . . . . . 64 131 F.2. Version -12 to -13 . . . . . . . . . . . . . . . . . . . 64 132 F.3. Version -11 to -12 . . . . . . . . . . . . . . . . . . . 65 133 F.4. Version -10 to -11 . . . . . . . . . . . . . . . . . . . 65 134 F.5. Version -09 to -10 . . . . . . . . . . . . . . . . . . . 65 135 F.6. Version -08 to -09 . . . . . . . . . . . . . . . . . . . 65 136 F.7. Version -07 to -08 . . . . . . . . . . . . . . . . . . . 65 137 F.8. Version -06 to -07 . . . . . . . . . . . . . . . . . . . 66 138 F.9. Version -05 to -06 . . . . . . . . . . . . . . . . . . . 66 139 F.10. Version -04 to -05 . . . . . . . . . . . . . . . . . . . 66 140 F.11. Version -03 to -04 . . . . . . . . . . . . . . . . . . . 67 141 F.12. Version -02 to -03 . . . . . . . . . . . . . . . . . . . 67 142 F.13. Version -01 to -02 . . . . . . . . . . . . . . . . . . . 67 143 F.14. 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 Proof of Possession Tokens: 317 An access token may be bound to a cryptographic key, which is then 318 used by an RS to authenticate requests from a client. Such tokens 319 are called proof-of-possession access tokens (or PoP access 320 tokens). 322 The proof-of-possession (PoP) security concept assumes that the AS 323 acts as a trusted third party that binds keys to access tokens. 324 These so called PoP keys are then used by the client to 325 demonstrate the possession of the secret to the RS when accessing 326 the resource. The RS, when receiving an access token, needs to 327 verify that the key used by the client matches the one bound to 328 the access token. When this specification uses the term "access 329 token" it is assumed to be a PoP access token token unless 330 specifically stated otherwise. 332 The key bound to the access token (the PoP key) may use either 333 symmetric or asymmetric cryptography. The appropriate choice of 334 the kind of cryptography depends on the constraints of the IoT 335 devices as well as on the security requirements of the use case. 337 Symmetric PoP key: 338 The AS generates a random symmetric PoP key. The key is either 339 stored to be returned on introspection calls or encrypted and 340 included in the access token. The PoP key is also encrypted 341 for the client and sent together with the access token to the 342 client. 344 Asymmetric PoP key: 345 An asymmetric key pair is generated on the client and the 346 public key is sent to the AS (if it does not already have 347 knowledge of the client's public key). Information about the 348 public key, which is the PoP key in this case, is either stored 349 to be returned on introspection calls or included inside the 350 access token and sent back to the requesting client. The RS 351 can identify the client's public key from the information in 352 the token, which allows the client to use the corresponding 353 private key for the proof of possession. 355 The access token is either a simple reference, or a structured 356 information object (e.g., CWT [RFC8392]) protected by a 357 cryptographic wrapper (e.g., COSE [RFC8152]). The choice of PoP 358 key does not necessarily imply a specific credential type for the 359 integrity protection of the token. 361 Scopes and Permissions: 362 In OAuth 2.0, the client specifies the type of permissions it is 363 seeking to obtain (via the scope parameter) in the access token 364 request. In turn, the AS may use the scope response parameter to 365 inform the client of the scope of the access token issued. As the 366 client could be a constrained device as well, this specification 367 defines the use of CBOR encoding as data format, see Section 5, to 368 request scopes and to be informed what scopes the access token 369 actually authorizes. 371 The values of the scope parameter in OAuth 2.0 are expressed as a 372 list of space-delimited, case-sensitive strings, with a semantic 373 that is well-known to the AS and the RS. More details about the 374 concept of scopes is found under Section 3.3 in [RFC6749]. 376 Claims: 377 Information carried in the access token or returned from 378 introspection, called claims, is in the form of name-value pairs. 379 An access token may, for example, include a claim identifying the 380 AS that issued the token (via the "iss" claim) and what audience 381 the access token is intended for (via the "aud" claim). The 382 audience of an access token can be a specific resource or one or 383 many resource servers. The resource owner policies influence what 384 claims are put into the access token by the authorization server. 386 While the structure and encoding of the access token varies 387 throughout deployments, a standardized format has been defined 388 with the JSON Web Token (JWT) [RFC7519] where claims are encoded 389 as a JSON object. In [RFC8392], an equivalent format using CBOR 390 encoding (CWT) has been defined. 392 Introspection: 393 Introspection is a method for a resource server to query the 394 authorization server for the active state and content of a 395 received access token. This is particularly useful in those cases 396 where the authorization decisions are very dynamic and/or where 397 the received access token itself is an opaque reference rather 398 than a self-contained token. More information about introspection 399 in OAuth 2.0 can be found in [RFC7662]. 401 3.2. CoAP 403 CoAP is an application layer protocol similar to HTTP, but 404 specifically designed for constrained environments. CoAP typically 405 uses datagram-oriented transport, such as UDP, where reordering and 406 loss of packets can occur. A security solution needs to take the 407 latter aspects into account. 409 While HTTP uses headers and query strings to convey additional 410 information about a request, CoAP encodes such information into 411 header parameters called 'options'. 413 CoAP supports application-layer fragmentation of the CoAP payloads 414 through blockwise transfers [RFC7959]. However, blockwise transfer 415 does not increase the size limits of CoAP options, therefore data 416 encoded in options has to be kept small. 418 Transport layer security for CoAP can be provided by DTLS 1.2 419 [RFC6347] or TLS 1.2 [RFC5246]. CoAP defines a number of proxy 420 operations that require transport layer security to be terminated at 421 the proxy. One approach for protecting CoAP communication end-to-end 422 through proxies, and also to support security for CoAP over a 423 different transport in a uniform way, is to provide security at the 424 application layer using an object-based security mechanism such as 425 COSE [RFC8152]. 427 One application of COSE is OSCORE [I-D.ietf-core-object-security], 428 which provides end-to-end confidentiality, integrity and replay 429 protection, and a secure binding between CoAP request and response 430 messages. In OSCORE, the CoAP messages are wrapped in COSE objects 431 and sent using CoAP. 433 This framework RECOMMENDS the use of CoAP as replacement for HTTP for 434 use in constrained environments. 436 4. Protocol Interactions 438 The ACE framework is based on the OAuth 2.0 protocol interactions 439 using the token endpoint and optionally the introspection endpoint. 440 A client obtains an access token from an AS using the token endpoint 441 and subsequently presents the access token to a RS to gain access to 442 a protected resource. In most deployments the RS can process the 443 access token locally, however in some cases the RS may present it to 444 the AS via the introspection endpoint to get fresh information. 445 These interactions are shown in Figure 1. An overview of various 446 OAuth concepts is provided in Section 3.1. 448 The OAuth 2.0 framework defines a number of "protocol flows" via 449 grant types, which have been extended further with extensions to 450 OAuth 2.0 (such as RFC 7521 [RFC7521] and 451 [I-D.ietf-oauth-device-flow]). What grant types works best depends 452 on the usage scenario and RFC 7744 [RFC7744] describes many different 453 IoT use cases but there are two preferred grant types, namely the 454 Authorization Code Grant (described in Section 4.1 of [RFC7521]) and 455 the Client Credentials Grant (described in Section 4.4 of [RFC7521]). 456 The Authorization Code Grant is a good fit for use with apps running 457 on smart phones and tablets that request access to IoT devices, a 458 common scenario in the smart home environment, where users need to go 459 through an authentication and authorization phase (at least during 460 the initial setup phase). The native apps guidelines described in 461 [RFC8252] are applicable to this use case. The Client Credential 462 Grant is a good fit for use with IoT devices where the OAuth client 463 itself is constrained. In such a case, the resource owner has pre- 464 arranged access rights for the client with the authorization server, 465 which is often accomplished using a commissioning tool. 467 The consent of the resource owner, for giving a client access to a 468 protected resource, can be provided dynamically as in the traditional 469 OAuth flows, or it could be pre-configured by the resource owner as 470 authorization policies at the AS, which the AS evaluates when a token 471 request arrives. The resource owner and the requesting party (i.e., 472 client owner) are not shown in Figure 1. 474 This framework supports a wide variety of communication security 475 mechanisms between the ACE entities, such as client, AS, and RS. It 476 is assumed that the client has been registered (also called enrolled 477 or onboarded) to an AS using a mechanism defined outside the scope of 478 this document. In practice, various techniques for onboarding have 479 been used, such as factory-based provisioning or the use of 480 commissioning tools. Regardless of the onboarding technique, this 481 provisioning procedure implies that the client and the AS exchange 482 credentials and configuration parameters. These credentials are used 483 to mutually authenticate each other and to protect messages exchanged 484 between the client and the AS. 486 It is also assumed that the RS has been registered with the AS, 487 potentially in a similar way as the client has been registered with 488 the AS. Established keying material between the AS and the RS allows 489 the AS to apply cryptographic protection to the access token to 490 ensure that its content cannot be modified, and if needed, that the 491 content is confidentiality protected. 493 The keying material necessary for establishing communication security 494 between C and RS is dynamically established as part of the protocol 495 described in this document. 497 At the start of the protocol, there is an optional discovery step 498 where the client discovers the resource server and the resources this 499 server hosts. In this step, the client might also determine what 500 permissions are needed to access the protected resource. A generic 501 procedure is described in Section 5.1, profiles MAY define other 502 procedures for discovery. 504 In Bluetooth Low Energy, for example, advertisements are broadcasted 505 by a peripheral, including information about the primary services. 506 In CoAP, as a second example, a client can make a request to "/.well- 507 known/core" to obtain information about available resources, which 508 are returned in a standardized format as described in [RFC6690]. 510 +--------+ +---------------+ 511 | |---(A)-- Token Request ------->| | 512 | | | Authorization | 513 | |<--(B)-- Access Token ---------| Server | 514 | | + Access Information | | 515 | | +---------------+ 516 | | ^ | 517 | | Introspection Request (D)| | 518 | Client | (optional) | | 519 | | Response | |(E) 520 | | (optional) | v 521 | | +--------------+ 522 | |---(C)-- Token + Request ----->| | 523 | | | Resource | 524 | |<--(F)-- Protected Resource ---| Server | 525 | | | | 526 +--------+ +--------------+ 528 Figure 1: Basic Protocol Flow. 530 Requesting an Access Token (A): 531 The client makes an access token request to the token endpoint at 532 the AS. This framework assumes the use of PoP access tokens (see 533 Section 3.1 for a short description) wherein the AS binds a key to 534 an access token. The client may include permissions it seeks to 535 obtain, and information about the credentials it wants to use 536 (e.g., symmetric/asymmetric cryptography or a reference to a 537 specific credential). 539 Access Token Response (B): 540 If the AS successfully processes the request from the client, it 541 returns an access token. It can also return additional 542 parameters, referred to as "Access Information". In addition to 543 the response parameters defined by OAuth 2.0 and the PoP access 544 token extension, this framework defines parameters that can be 545 used to inform the client about capabilities of the RS. More 546 information about these parameters can be found in Section 5.6.4. 548 Resource Request (C): 549 The client interacts with the RS to request access to the 550 protected resource and provides the access token. The protocol to 551 use between the client and the RS is not restricted to CoAP. 552 HTTP, HTTP/2, QUIC, MQTT, Bluetooth Low Energy, etc., are also 553 viable candidates. 555 Depending on the device limitations and the selected protocol, 556 this exchange may be split up into two parts: 558 (1) the client sends the access token containing, or 559 referencing, the authorization information to the RS, that may 560 be used for subsequent resource requests by the client, and 561 (2) the client makes the resource access request, using the 562 communication security protocol and other Access Information 563 obtained from the AS. 565 The Client and the RS mutually authenticate using the security 566 protocol specified in the profile (see step B) and the keys 567 obtained in the access token or the Access Information. The RS 568 verifies that the token is integrity protected by the AS and 569 compares the claims contained in the access token with the 570 resource request. If the RS is online, validation can be handed 571 over to the AS using token introspection (see messages D and E) 572 over HTTP or CoAP. 574 Token Introspection Request (D): 575 A resource server may be configured to introspect the access token 576 by including it in a request to the introspection endpoint at that 577 AS. Token introspection over CoAP is defined in Section 5.7 and 578 for HTTP in [RFC7662]. 580 Note that token introspection is an optional step and can be 581 omitted if the token is self-contained and the resource server is 582 prepared to perform the token validation on its own. 584 Token Introspection Response (E): 585 The AS validates the token and returns the most recent parameters, 586 such as scope, audience, validity etc. associated with it back to 587 the RS. The RS then uses the received parameters to process the 588 request to either accept or to deny it. 590 Protected Resource (F): 591 If the request from the client is authorized, the RS fulfills the 592 request and returns a response with the appropriate response code. 593 The RS uses the dynamically established keys to protect the 594 response, according to used communication security protocol. 596 5. Framework 598 The following sections detail the profiling and extensions of OAuth 599 2.0 for constrained environments, which constitutes the ACE 600 framework. 602 Credential Provisioning 603 For IoT, it cannot be assumed that the client and RS are part of a 604 common key infrastructure, so the AS provisions credentials or 605 associated information to allow mutual authentication. These 606 credentials need to be provided to the parties before or during 607 the authentication protocol is executed, and may be re-used for 608 subsequent token requests. 610 Proof-of-Possession 611 The ACE framework, by default, implements proof-of-possession for 612 access tokens, i.e., that the token holder can prove being a 613 holder of the key bound to the token. The binding is provided by 614 the "cnf" claim [I-D.ietf-ace-cwt-proof-of-possession] indicating 615 what key is used for proof-of-possession. If a client needs to 616 submit a new access token, e.g., to obtain additional access 617 rights, they can request that the AS binds this token to the same 618 key as the previous one. 620 ACE Profiles 621 The client or RS may be limited in the encodings or protocols it 622 supports. To support a variety of different deployment settings, 623 specific interactions between client and RS are defined in an ACE 624 profile. In ACE framework the AS is expected to manage the 625 matching of compatible profile choices between a client and an RS. 626 The AS informs the client of the selected profile using the 627 "profile" parameter in the token response. 629 OAuth 2.0 requires the use of TLS both to protect the communication 630 between AS and client when requesting an access token; between client 631 and RS when accessing a resource and between AS and RS if 632 introspection is used. In constrained settings TLS is not always 633 feasible, or desirable. Nevertheless it is REQUIRED that the data 634 exchanged with the AS is encrypted and integrity protected. It is 635 furthermore REQUIRED that the AS and the endpoint communicating with 636 it (client or RS) perform mutual authentication. 638 Profiles MUST specify how mutual authentication is done, depending 639 e.g. on the communication protocol and the credentials used by the 640 client or the RS. 642 In OAuth 2.0 the communication with the Token and the Introspection 643 endpoints at the AS is assumed to be via HTTP and may use Uri-query 644 parameters. When profiles of this framework use CoAP instead, this 645 framework REQUIRES the use of the following alternative instead of 646 Uri-query parameters: The sender (client or RS) encodes the 647 parameters of its request as a CBOR map and submits that map as the 648 payload of the POST request. Profiles that use CBOR encoding of 649 protocol message parameters MUST use the media format 'application/ 650 ace+cbor', unless the protocol message is wrapped in another Content- 651 Format (e.g. object security). If CoAP is used for communication, 652 the Content-Format MUST be abbreviated with the ID: 19 (see 653 Section 8.14. 655 The OAuth 2.0 AS uses a JSON structure in the payload of its 656 responses both to client and RS. If CoAP is used, this framework 657 REQUIRES the use of CBOR [RFC7049] instead of JSON. Depending on the 658 profile, the CBOR payload MAY be enclosed in a non-CBOR cryptographic 659 wrapper. 661 5.1. Discovering Authorization Servers 663 In order to determine the AS in charge of a resource hosted at the 664 RS, C MAY send an initial Unauthorized Resource Request message to 665 RS. RS then denies the request and sends the address of its AS back 666 to C. 668 Instead of the initial Unauthorized Resource Request message, other 669 discovery methods may be used, or the client may be pre-provisioned 670 with the address of the AS. 672 5.1.1. Unauthorized Resource Request Message 674 The optional Unauthorized Resource Request message is a request for a 675 resource hosted by RS for which no proper authorization is granted. 676 RS MUST treat any request for a protected resource as Unauthorized 677 Resource Request message when any of the following holds: 679 o The request has been received on an unprotected channel. 680 o RS has no valid access token for the sender of the request 681 regarding the requested action on that resource. 682 o RS has a valid access token for the sender of the request, but 683 this does not allow the requested action on the requested 684 resource. 686 Note: These conditions ensure that RS can handle requests 687 autonomously once access was granted and a secure channel has been 688 established between C and RS. The authz-info endpoint MUST NOT be 689 protected as specified above, in order to allow clients to upload 690 access tokens to RS (cf. Section 5.8.1). 692 Unauthorized Resource Request messages MUST be denied with a client 693 error response. In this response, the Resource Server SHOULD provide 694 proper AS Information to enable the Client to request an access token 695 from RS's AS as described in Section 5.1.2. 697 The handling of all client requests (including unauthorized ones) by 698 the RS is described in Section 5.8.2. 700 5.1.2. AS Information 702 The AS Information is sent by RS as a response to an Unauthorized 703 Resource Request message (see Section 5.1.1) to point the sender of 704 the Unauthorized Resource Request message to RS's AS. The AS 705 information is a set of attributes containing an absolute URI (see 706 Section 4.3 of [RFC3986]) that specifies the AS in charge of RS. 708 The message MAY also contain a nonce generated by RS to ensure 709 freshness in case that the RS and AS do not have synchronized clocks. 711 Figure 2 summarizes the parameters that may be part of the AS 712 Information. 714 /-------+----------+-------------\ 715 | Name | CBOR Key | Value Type | 716 |-------+----------+-------------| 717 | AS | 0 | text string | 718 | nonce | 5 | byte string | 719 \-------+----------+-------------/ 721 Figure 2: AS Information parameters 723 Note that the schema part of the AS parameter may need to be adapted 724 to the security protocol that is used between the client and the AS. 725 Thus the example AS value "coap://as.example.com/token" might need to 726 be transformed to "coaps://as.example.com/token". It is assumed that 727 the client can determine the correct schema part on its own depending 728 on the way it communicates with the AS. 730 Figure 3 shows an example for an AS Information message payload using 731 CBOR [RFC7049] diagnostic notation, using the parameter names instead 732 of the CBOR keys for better human readability. 734 4.01 Unauthorized 735 Content-Format: application/ace+cbor 736 {AS: "coaps://as.example.com/token", 737 nonce: h'e0a156bb3f'} 739 Figure 3: AS Information payload example 741 In this example, the attribute AS points the receiver of this message 742 to the URI "coaps://as.example.com/token" to request access 743 permissions. The originator of the AS Information payload (i.e., RS) 744 uses a local clock that is loosely synchronized with a time scale 745 common between RS and AS (e.g., wall clock time). Therefore, it has 746 included a parameter "nonce" for replay attack prevention. 748 Figure 4 illustrates the mandatory to use binary encoding of the 749 message payload shown in Figure 3. 751 a2 # map(2) 752 00 # unsigned(0) (=AS) 753 78 1c # text(28) 754 636f6170733a2f2f61732e657861 755 6d706c652e636f6d2f746f6b656e # "coaps://as.example.com/token" 756 05 # unsigned(5) (=nonce) 757 45 # bytes(5) 758 e0a156bb3f 760 Figure 4: AS Information example encoded in CBOR 762 5.2. Authorization Grants 764 To request an access token, the client obtains authorization from the 765 resource owner or uses its client credentials as grant. The 766 authorization is expressed in the form of an authorization grant. 768 The OAuth framework [RFC6749] defines four grant types. The grant 769 types can be split up into two groups, those granted on behalf of the 770 resource owner (password, authorization code, implicit) and those for 771 the client (client credentials). Further grant types have been added 772 later, such as [RFC7521] defining an assertion-based authorization 773 grant. 775 The grant type is selected depending on the use case. In cases where 776 the client acts on behalf of the resource owner, authorization code 777 grant is recommended. If the client acts on behalf of the resource 778 owner, but does not have any display or very limited interaction 779 possibilities it is recommended to use the device code grant defined 780 in [I-D.ietf-oauth-device-flow]. In cases where the client does not 781 act on behalf of the resource owner, client credentials grant is 782 recommended. 784 For details on the different grant types, see the OAuth 2.0 framework 785 [RFC6749]. The OAuth 2.0 framework provides an extension mechanism 786 for defining additional grant types so profiles of this framework MAY 787 define additional grant types, if needed. 789 5.3. Client Credentials 791 Authentication of the client is mandatory independent of the grant 792 type when requesting the access token from the token endpoint. In 793 the case of client credentials grant type, the authentication and 794 grant coincide. 796 Client registration and provisioning of client credentials to the 797 client is out of scope for this specification. 799 The OAuth framework [RFC6749] defines one client credential type, 800 client id and client secret. [I-D.erdtman-ace-rpcc] adds raw-public- 801 key and pre-shared-key to the client credentials types. Profiles of 802 this framework MAY extend with additional client credentials client 803 certificates. 805 5.4. AS Authentication 807 Client credential does not, by default, authenticate the AS that the 808 client connects to. In classic OAuth, the AS is authenticated with a 809 TLS server certificate. 811 Profiles of this framework MUST specify how clients authenticate the 812 AS and how communication security is implemented, otherwise server 813 side TLS certificates, as defined by OAuth 2.0, are required. 815 5.5. The Authorization Endpoint 817 The authorization endpoint is used to interact with the resource 818 owner and obtain an authorization grant in certain grant flows. 819 Since it requires the use of a user agent (i.e., browser), it is not 820 expected that these types of grant flow will be used by constrained 821 clients. This endpoint is therefore out of scope for this 822 specification. Implementations should use the definition and 823 recommendations of [RFC6749] and [RFC6819]. 825 If clients involved cannot support HTTP and TLS, profiles MAY define 826 mappings for the authorization endpoint. 828 5.6. The Token Endpoint 830 In standard OAuth 2.0, the AS provides the token endpoint for 831 submitting access token requests. This framework extends the 832 functionality of the token endpoint, giving the AS the possibility to 833 help the client and RS to establish shared keys or to exchange their 834 public keys. Furthermore, this framework defines encodings using 835 CBOR, as a substitute for JSON. 837 The endpoint may, however, be exposed over HTTPS as in classical 838 OAuth or even other transports. A profile MUST define the details of 839 the mapping between the fields described below, and these transports. 840 If HTTPS is used, JSON or CBOR payloads may be supported. If JSON 841 payloads are used, the semantics of Section 4 of the OAuth 2.0 842 specification MUST be followed (with additions as described below). 843 If CBOR payload is supported, the semantics described below MUST be 844 followed. 846 For the AS to be able to issue a token, the client MUST be 847 authenticated and present a valid grant for the scopes requested. 848 Profiles of this framework MUST specify how the AS authenticates the 849 client and how the communication between client and AS is protected. 851 The default name of this endpoint in an url-path is '/token', however 852 implementations are not required to use this name and can define 853 their own instead. 855 The figures of this section use CBOR diagnostic notation without the 856 integer abbreviations for the parameters or their values for 857 illustrative purposes. Note that implementations MUST use the 858 integer abbreviations and the binary CBOR encoding, if the CBOR 859 encoding is used. 861 5.6.1. Client-to-AS Request 863 The client sends a POST request to the token endpoint at the AS. The 864 profile MUST specify how the communication is protected. The content 865 of the request consists of the parameters specified in Section 4 of 866 the OAuth 2.0 specification [RFC6749]. 868 If CBOR is used then this parameter MUST be encoded as a CBOR map. 869 The "scope" parameter can be formatted as specified in [RFC6749] and 870 additionally as a byte array, in order to allow compact encoding of 871 complex scopes. 873 When HTTP is used as a transport then the client makes a request to 874 the token endpoint by sending the parameters using the "application/ 875 x-www-form-urlencoded" format with a character encoding of UTF-8 in 876 the HTTP request entity-body, as defined in RFC 6749. 878 In addition to these parameters the parameters from 879 [I-D.ietf-ace-oauth-params] can be used for requesting an access 880 token from a token endpoint. 882 The following examples illustrate different types of requests for 883 proof-of-possession tokens. 885 Figure 5 shows a request for a token with a symmetric proof-of- 886 possession key. The content is displayed in CBOR diagnostic 887 notation, without abbreviations for better readability. 889 Header: POST (Code=0.02) 890 Uri-Host: "as.example.com" 891 Uri-Path: "token" 892 Content-Format: "application/ace+cbor" 893 Payload: 894 { 895 "grant_type" : "client_credentials", 896 "client_id" : "myclient", 897 "aud" : "tempSensor4711" 898 } 900 Figure 5: Example request for an access token bound to a symmetric 901 key. 903 Figure 6 shows a request for a token with an asymmetric proof-of- 904 possession key. Note that in this example COSE is used to provide 905 object-security, therefore the Content-Format is "application/cose" 906 wrapping the "application/ace+cbor" type content. 908 Header: POST (Code=0.02) 909 Uri-Host: "as.example.com" 910 Uri-Path: "token" 911 Content-Format: "application/cose" 912 Payload: 913 16( # COSE_ENCRYPTED 914 [ h'a1010a', # protected header: {"alg" : "AES-CCM-16-64-128"} 915 {5 : b64'ifUvZaHFgJM7UmGnjA'}, # unprotected header, IV 916 b64'WXThuZo6TMCaZZqi6ef/8WHTjOdGk8kNzaIhIQ' # ciphertext 917 ] 918 ) 920 Decrypted payload: 921 { 922 "grant_type" : "client_credentials", 923 "client_id" : "myclient", 924 "cnf" : { 925 "COSE_Key" : { 926 "kty" : "EC", 927 "kid" : h'11', 928 "crv" : "P-256", 929 "x" : b64'usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8', 930 "y" : b64'IBOL+C3BttVivg+lSreASjpkttcsz+1rb7btKLv8EX4' 931 } 932 } 933 } 935 Figure 6: Example token request bound to an asymmetric key. 937 Figure 7 shows a request for a token where a previously communicated 938 proof-of-possession key is only referenced. Note that the client 939 performs a password based authentication in this example by 940 submitting its client_secret (see Section 2.3.1 of [RFC6749]). 942 Header: POST (Code=0.02) 943 Uri-Host: "as.example.com" 944 Uri-Path: "token" 945 Content-Format: "application/ace+cbor" 946 Payload: 947 { 948 "grant_type" : "client_credentials", 949 "client_id" : "myclient", 950 "client_secret" : "mysecret234", 951 "aud" : "valve424", 952 "scope" : "read", 953 "cnf" : { 954 "kid" : b64'6kg0dXJM13U' 955 } 956 } 958 Figure 7: Example request for an access token bound to a key 959 reference. 961 5.6.2. AS-to-Client Response 963 If the access token request has been successfully verified by the AS 964 and the client is authorized to obtain an access token corresponding 965 to its access token request, the AS sends a response with the 966 response code equivalent to the CoAP response code 2.01 (Created). 967 If client request was invalid, or not authorized, the AS returns an 968 error response as described in Section 5.6.3. 970 Note that the AS decides which token type and profile to use when 971 issuing a successful response. It is assumed that the AS has prior 972 knowledge of the capabilities of the client and the RS (see 973 Appendix D. This prior knowledge may, for example, be set by the use 974 of a dynamic client registration protocol exchange [RFC7591]. 976 The content of the successful reply is the Access Information. When 977 using CBOR payloads, the content MUST be encoded as CBOR map, 978 containing parameters as specified in Section 5.1 of [RFC6749], with 979 the following additions and changes: 981 profile: 982 OPTIONAL. This indicates the profile that the client MUST use 983 towards the RS. See Section 5.6.4.3 for the formatting of this 984 parameter. If this parameter is absent, the AS assumes that the 985 client implicitly knows which profile to use towards the RS. 986 token_type: 987 This parameter is OPTIONAL, as opposed to 'required' in [RFC6749]. 988 By default implementations of this framework SHOULD assume that 989 the token_type is "pop". If a specific use case requires another 990 token_type (e.g., "Bearer") to be used then this parameter is 991 REQUIRED. 993 Furthermore [I-D.ietf-ace-oauth-params] defines further parameters 994 the AS can use when responding to a request to the token endpoint. 996 Figure 8 summarizes the parameters that may be part of the Access 997 Information. 999 /-------------------+-------------------------------\ 1000 | Parameter name | Specified in | 1001 |-------------------+-------------------------------| 1002 | access_token | RFC 6749 | 1003 | token_type | RFC 6749 | 1004 | expires_in | RFC 6749 | 1005 | refresh_token | RFC 6749 | 1006 | scope | RFC 6749 | 1007 | state | RFC 6749 | 1008 | error | RFC 6749 | 1009 | error_description | RFC 6749 | 1010 | error_uri | RFC 6749 | 1011 | profile | [this document] | 1012 \-------------------+-------------------------------/ 1014 Figure 8: Access Information parameters 1016 Figure 9 shows a response containing a token and a "cnf" parameter 1017 with a symmetric proof-of-possession key. 1019 Header: Created (Code=2.01) 1020 Content-Format: "application/ace+cbor" 1021 Payload: 1022 { 1023 "access_token" : b64'SlAV32hkKG ... 1024 (remainder of CWT omitted for brevity; 1025 CWT contains COSE_Key in the "cnf" claim)', 1026 "profile" : "coap_dtls", 1027 "expires_in" : "3600", 1028 "cnf" : { 1029 "COSE_Key" : { 1030 "kty" : "Symmetric", 1031 "kid" : b64'39Gqlw', 1032 "k" : b64'hJtXhkV8FJG+Onbc6mxCcQh' 1033 } 1034 } 1035 } 1037 Figure 9: Example AS response with an access token bound to a 1038 symmetric key. 1040 5.6.3. Error Response 1042 The error responses for CoAP-based interactions with the AS are 1043 equivalent to the ones for HTTP-based interactions as defined in 1044 Section 5.2 of [RFC6749], with the following differences: 1046 o When using CBOR the raw payload before being processed by the 1047 communication security protocol MUST be encoded as a CBOR map. 1048 o A response code equivalent to the CoAP code 4.00 (Bad Request) 1049 MUST be used for all error responses, except for invalid_client 1050 where a response code equivalent to the CoAP code 4.01 1051 (Unauthorized) MAY be used under the same conditions as specified 1052 in Section 5.2 of [RFC6749]. 1053 o The parameters "error", "error_description" and "error_uri" MUST 1054 be abbreviated using the codes specified in Figure 12, when a CBOR 1055 encoding is used. 1056 o The error code (i.e., value of the "error" parameter) MUST be 1057 abbreviated as specified in Figure 10, when a CBOR encoding is 1058 used. 1060 /------------------------+-------------\ 1061 | Name | CBOR Values | 1062 |------------------------+-------------| 1063 | invalid_request | 1 | 1064 | invalid_client | 2 | 1065 | invalid_grant | 3 | 1066 | unauthorized_client | 4 | 1067 | unsupported_grant_type | 5 | 1068 | invalid_scope | 6 | 1069 | unsupported_pop_key | 7 | 1070 \------------------------+-------------/ 1072 Figure 10: CBOR abbreviations for common error codes 1074 In addition to the error responses defined in OAuth 2.0, the 1075 following behavior MUST be implemented by the AS: If the client 1076 submits an asymmetric key in the token request that the RS cannot 1077 process, the AS MUST reject that request with a response code 1078 equivalent to the CoAP code 4.00 (Bad Request) including the error 1079 code "unsupported_pop_key" defined in Figure 10. 1081 5.6.4. Request and Response Parameters 1083 This section provides more detail about the new parameters that can 1084 be used in access token requests and responses, as well as 1085 abbreviations for more compact encoding of existing parameters and 1086 common parameter values. 1088 5.6.4.1. Grant Type 1090 The abbreviations in Figure 11 MUST be used in CBOR encodings instead 1091 of the string values defined in [RFC6749], if CBOR payloads are used. 1093 /--------------------+------------+------------------------\ 1094 | Name | CBOR Value | Original Specification | 1095 |--------------------+------------+------------------------| 1096 | password | 0 | RFC6749 | 1097 | authorization_code | 1 | RFC6749 | 1098 | client_credentials | 2 | RFC6749 | 1099 | refresh_token | 3 | RFC6749 | 1100 \--------------------+------------+------------------------/ 1102 Figure 11: CBOR abbreviations for common grant types 1104 5.6.4.2. Token Type 1106 The "token_type" parameter, defined in [RFC6749], allows the AS to 1107 indicate to the client which type of access token it is receiving 1108 (e.g., a bearer token). 1110 This document registers the new value "pop" for the OAuth Access 1111 Token Types registry, specifying a proof-of-possession token. How 1112 the proof-of-possession by the client to the RS is performed MUST be 1113 specified by the profiles. 1115 The values in the "token_type" parameter MUST be CBOR text strings, 1116 if a CBOR encoding is used. 1118 In this framework the "pop" value for the "token_type" parameter is 1119 the default. The AS may, however, provide a different value. 1121 5.6.4.3. Profile 1123 Profiles of this framework MUST define the communication protocol and 1124 the communication security protocol between the client and the RS. 1125 The security protocol MUST provide encryption, integrity and replay 1126 protection. Furthermore profiles MUST define proof-of-possession 1127 methods, if they support proof-of-possession tokens. 1129 A profile MUST specify an identifier that MUST be used to uniquely 1130 identify itself in the "profile" parameter. The textual 1131 representation of the profile identifier is just intended for human 1132 readability and MUST NOT be used in parameters and claims. 1134 Profiles MAY define additional parameters for both the token request 1135 and the Access Information in the access token response in order to 1136 support negotiation or signaling of profile specific parameters. 1138 5.6.5. Mapping Parameters to CBOR 1140 If CBOR encoding is used, all OAuth parameters in access token 1141 requests and responses MUST be mapped to CBOR types as specified in 1142 Figure 12, using the given integer abbreviation for the map keys. 1144 Note that we have aligned these abbreviations with the claim 1145 abbreviations defined in [RFC8392]. 1147 /-------------------+----------+---------------------\ 1148 | Name | CBOR Key | Value Type | 1149 |-------------------+----------+---------------------| 1150 | scope | 9 | text or byte string | 1151 | profile | 10 | unsigned integer | 1152 | error | 11 | unsinged integer | 1153 | grant_type | 12 | unsigned integer | 1154 | access_token | 13 | byte string | 1155 | token_type | 14 | unsigned integer | 1156 | client_id | 24 | text string | 1157 | client_secret | 25 | byte string | 1158 | response_type | 26 | text string | 1159 | state | 27 | text string | 1160 | redirect_uri | 28 | text string | 1161 | error_description | 29 | text string | 1162 | error_uri | 30 | text string | 1163 | code | 31 | byte string | 1164 | expires_in | 32 | unsigned integer | 1165 | username | 33 | text string | 1166 | password | 34 | text string | 1167 | refresh_token | 35 | byte string | 1168 \-------------------+----------+---------------------/ 1170 Figure 12: CBOR mappings used in token requests 1172 5.7. The 'Introspect' Endpoint 1174 Token introspection [RFC7662] can be OPTIONALLY provided by the AS, 1175 and is then used by the RS and potentially the client to query the AS 1176 for metadata about a given token, e.g., validity or scope. Analogous 1177 to the protocol defined in RFC 7662 [RFC7662] for HTTP and JSON, this 1178 section defines adaptations to more constrained environments using 1179 CBOR and leaving the choice of the application protocol to the 1180 profile. 1182 Communication between the RS and the introspection endpoint at the AS 1183 MUST be integrity protected and encrypted. Furthermore AS and RS 1184 MUST perform mutual authentication. Finally the AS SHOULD verify 1185 that the RS has the right to access introspection information about 1186 the provided token. Profiles of this framework that support 1187 introspection MUST specify how authentication and communication 1188 security between RS and AS is implemented. 1190 The default name of this endpoint in an url-path is '/introspect', 1191 however implementations are not required to use this name and can 1192 define their own instead. 1194 The figures of this section uses CBOR diagnostic notation without the 1195 integer abbreviations for the parameters or their values for better 1196 readability. 1198 Note that supporting introspection is OPTIONAL for implementations of 1199 this framework. 1201 5.7.1. RS-to-AS Request 1203 The RS sends a POST request to the introspection endpoint at the AS, 1204 the profile MUST specify how the communication is protected. If CBOR 1205 is used, the payload MUST be encoded as a CBOR map with a "token" 1206 entry containing either the access token or a reference to the token 1207 (e.g., the cti). Further optional parameters representing additional 1208 context that is known by the RS to aid the AS in its response MAY be 1209 included. 1211 The same parameters are required and optional as in Section 2.1 of 1212 RFC 7662 [RFC7662]. 1214 For example, Figure 13 shows a RS calling the token introspection 1215 endpoint at the AS to query about an OAuth 2.0 proof-of-possession 1216 token. Note that object security based on COSE is assumed in this 1217 example, therefore the Content-Format is "application/cose". 1218 Figure 14 shows the decoded payload. 1220 Header: POST (Code=0.02) 1221 Uri-Host: "as.example.com" 1222 Uri-Path: "introspect" 1223 Content-Format: "application/cose" 1224 Payload: 1225 ... COSE content ... 1227 Figure 13: Example introspection request. 1229 { 1230 "token" : b64'7gj0dXJQ43U', 1231 "token_type_hint" : "pop" 1232 } 1234 Figure 14: Decoded token. 1236 5.7.2. AS-to-RS Response 1238 If the introspection request is authorized and successfully 1239 processed, the AS sends a response with the response code equivalent 1240 to the CoAP code 2.01 (Created). If the introspection request was 1241 invalid, not authorized or couldn't be processed the AS returns an 1242 error response as described in Section 5.7.3. 1244 In a successful response, the AS encodes the response parameters in a 1245 map including with the same required and optional parameters as in 1246 Section 2.2 of RFC 7662 [RFC7662] with the following addition: 1248 profile OPTIONAL. This indicates the profile that the RS MUST use 1249 with the client. See Section 5.6.4.3 for more details on the 1250 formatting of this parameter. 1252 Furthermore [I-D.ietf-ace-oauth-params] defines more parameters that 1253 the AS can use when responding to a request to the introspection 1254 endpoint. 1256 For example, Figure 15 shows an AS response to the introspection 1257 request in Figure 13. 1259 Header: Created Code=2.01) 1260 Content-Format: "application/ace+cbor" 1261 Payload: 1262 { 1263 "active" : true, 1264 "scope" : "read", 1265 "profile" : "coap_dtls", 1266 "cnf" : { 1267 "COSE_Key" : { 1268 "kty" : "Symmetric", 1269 "kid" : b64'39Gqlw', 1270 "k" : b64'hJtXhkV8FJG+Onbc6mxCcQh' 1271 } 1272 } 1273 } 1275 Figure 15: Example introspection response. 1277 5.7.3. Error Response 1279 The error responses for CoAP-based interactions with the AS are 1280 equivalent to the ones for HTTP-based interactions as defined in 1281 Section 2.3 of [RFC7662], with the following differences: 1283 o If content is sent and CBOR is used the payload MUST be encoded as 1284 a CBOR map and the Content-Format "application/ace+cbor" MUST be 1285 used. 1286 o If the credentials used by the RS are invalid the AS MUST respond 1287 with the response code equivalent to the CoAP code 4.01 1288 (Unauthorized) and use the required and optional parameters from 1289 Section 5.2 in RFC 6749 [RFC6749]. 1290 o If the RS does not have the right to perform this introspection 1291 request, the AS MUST respond with a response code equivalent to 1292 the CoAP code 4.03 (Forbidden). In this case no payload is 1293 returned. 1294 o The parameters "error", "error_description" and "error_uri" MUST 1295 be abbreviated using the codes specified in Figure 12. 1296 o The error codes MUST be abbreviated using the codes specified in 1297 Figure 10. 1299 Note that a properly formed and authorized query for an inactive or 1300 otherwise invalid token does not warrant an error response by this 1301 specification. In these cases, the authorization server MUST instead 1302 respond with an introspection response with the "active" field set to 1303 "false". 1305 5.7.4. Mapping Introspection parameters to CBOR 1307 If CBOR is used, the introspection request and response parameters 1308 MUST be mapped to CBOR types as specified in Figure 16, using the 1309 given integer abbreviation for the map key. 1311 Note that we have aligned these abbreviations with the claim 1312 abbreviations defined in [RFC8392]. 1314 /-----------------+----------+----------------------------------\ 1315 | Parameter name | CBOR Key | Value Type | 1316 |-----------------+----------+----------------------------------| 1317 | iss | 1 | text string | 1318 | sub | 2 | text string | 1319 | aud | 3 | text string | 1320 | exp | 4 | integer or floating-point number | 1321 | nbf | 5 | integer or floating-point number | 1322 | iat | 6 | integer or floating-point number | 1323 | cti | 7 | byte string | 1324 | scope | 9 | text OR byte string | 1325 | token_type | 13 | text string | 1326 | token | 14 | byte string | 1327 | active | 15 | True or False | 1328 | profile | 16 | unsigned integer | 1329 | client_id | 24 | text string | 1330 | username | 33 | text string | 1331 | token_type_hint | 36 | text string | 1332 \-----------------+----------+----------------------------------/ 1334 Figure 16: CBOR Mappings to Token Introspection Parameters. 1336 5.8. The Access Token 1338 This framework RECOMMENDS the use of CBOR web token (CWT) as 1339 specified in [RFC8392]. 1341 In order to facilitate offline processing of access tokens, this 1342 draft uses the "cnf" claim from 1343 [I-D.ietf-ace-cwt-proof-of-possession] and specifies the "scope" 1344 claim for both JSON and CBOR web tokens. 1346 The "scope" claim explicitly encodes the scope of a given access 1347 token. This claim follows the same encoding rules as defined in 1348 Section 3.3 of [RFC6749], but in addition implementers MAY use byte 1349 arrays as scope values, to achieve compact encoding of large scope 1350 elements. The meaning of a specific scope value is application 1351 specific and expected to be known to the RS running that application. 1353 If the AS needs to convey a hint to the RS about which key it should 1354 use to authenticate towards the client, the rs_cnf claim MAY be used 1355 with the same syntax and semantics as defined in 1356 [I-D.ietf-ace-oauth-params]. 1358 If the AS needs to convey a hint to the RS about which profile it 1359 should use to communicate with the client, the AS MAY include a 1360 "profile" claim in the access token, with the same syntax and 1361 semantics as defined in Section 5.6.4.3. 1363 5.8.1. The 'Authorization Information' Endpoint 1365 The access token, containing authorization information and 1366 information about the key used by the client, needs to be transported 1367 to the RS so that the RS can authenticate and authorize the client 1368 request. 1370 This section defines a method for transporting the access token to 1371 the RS using a RESTful protocol such as CoAP. Profiles of this 1372 framework MAY define other methods for token transport. 1374 The method consists of an authz-info endpoint, implemented by the RS. 1375 A client using this method MUST make a POST request to the authz-info 1376 endpoint at the RS with the access token in the payload. The RS 1377 receiving the token MUST verify the validity of the token. If the 1378 token is valid, the RS MUST respond to the POST request with 2.01 1379 (Created). This response MAY contain an identifier of the token 1380 (e.g., the cti for a CWT) as a payload, in order to allow the client 1381 to refer to the token. 1383 The RS MUST be prepared to store at least one access token for future 1384 use. This is a difference to how access tokens are handled in OAuth 1385 2.0, where the access token is typically sent along with each 1386 request, and therefore not stored at the RS. 1388 If the payload sent to the authz-info endpoint does not parse to a 1389 token, the RS MUST respond with a response code equivalent to the 1390 CoAP code 4.00 (Bad Request). If the token is not valid, the RS MUST 1391 respond with a response code equivalent to the CoAP code 4.01 1392 (Unauthorized). If the token is valid but the audience of the token 1393 does not match the RS, the RS MUST respond with a response code 1394 equivalent to the CoAP code 4.03 (Forbidden). If the token is valid 1395 but is associated to claims that the RS cannot process (e.g., an 1396 unknown scope) the RS MUST respond with a response code equivalent to 1397 the CoAP code 4.00 (Bad Request). In the latter case the RS MAY 1398 provide additional information in the error response, in order to 1399 clarify what went wrong. 1401 The RS MAY make an introspection request to validate the token before 1402 responding to the POST request to the authz-info endpoint. 1404 Profiles MUST specify whether the authz-info endpoint is protected, 1405 including wheter error responses from this endpoint are protected. 1406 Note that since the token contains information that allow the client 1407 and the RS to establish a security context in the first place, mutual 1408 authentication may not be possible at this point. 1410 The default name of this endpoint in an url-path is '/authz-info', 1411 however implementations are not required to use this name and can 1412 define their own instead. 1414 5.8.2. Client Requests to the RS 1416 If an RS receives a request from a client, and the target resource 1417 requires authorization, the RS MUST first verify that it has an 1418 access token that authorizes this request, and that the client has 1419 performed the proof-of-possession for that token. 1421 The response code MUST be 4.01 (Unauthorized) in case the client has 1422 not performed the proof-of-possession, or if RS has no valid access 1423 token for the client. If RS has an access token for the client but 1424 not for the resource that was requested, RS MUST reject the request 1425 with a 4.03 (Forbidden). If RS has an access token for the client 1426 but it does not cover the action that was requested on the resource, 1427 RS MUST reject the request with a 4.05 (Method Not Allowed). 1429 Note: The use of the response codes 4.03 and 4.05 is intended to 1430 prevent infinite loops where a dumb Client optimistically tries to 1431 access a requested resource with any access token received from AS. 1432 As malicious clients could pretend to be C to determine C's 1433 privileges, these detailed response codes must be used only when a 1434 certain level of security is already available which can be achieved 1435 only when the Client is authenticated. 1437 Note: The RS MAY use introspection for timely validation of an access 1438 token, at the time when a request is presented. 1440 Note: Matching the claims of the access token (e.g., scope) to a 1441 specific request is application specific. 1443 If the request matches a valid token and the client has performed the 1444 proof-of-possession for that token, the RS continues to process the 1445 request as specified by the underlying application. 1447 5.8.3. Token Expiration 1449 Depending on the capabilities of the RS, there are various ways in 1450 which it can verify the validity of a received access token. Here 1451 follows a list of the possibilities including what functionality they 1452 require of the RS. 1454 o The token is a CWT and includes an "exp" claim and possibly the 1455 "nbf" claim. The RS verifies these by comparing them to values 1456 from its internal clock as defined in [RFC7519]. In this case the 1457 RS's internal clock must reflect the current date and time, or at 1458 least be synchronized with the AS's clock. How this clock 1459 synchronization would be performed is out of scope for this 1460 specification. 1461 o The RS verifies the validity of the token by performing an 1462 introspection request as specified in Section 5.7. This requires 1463 the RS to have a reliable network connection to the AS and to be 1464 able to handle two secure sessions in parallel (C to RS and AS to 1465 RS). 1466 o The RS and the AS both store a sequence number linked to their 1467 common security association. The AS increments this number for 1468 each access token it issues and includes it in the access token, 1469 which is a CWT. The RS keeps track of the most recently received 1470 sequence number, and only accepts tokens as valid, that are in a 1471 certain range around this number. This method does only require 1472 the RS to keep track of the sequence number. The method does not 1473 provide timely expiration, but it makes sure that older tokens 1474 cease to be valid after a certain number of newer ones got issued. 1475 For a constrained RS with no network connectivity and no means of 1476 reliably measuring time, this is the best that can be achieved. 1478 If a token that authorizes a long running request such as a CoAP 1479 Observe [RFC7641] expires, the RS MUST send an error response with 1480 the response code equivalent to the CoAP code 4.01 (Unauthorized) to 1481 the client and then terminate processing the long running request. 1483 6. Security Considerations 1485 Security considerations applicable to authentication and 1486 authorization in RESTful environments provided in OAuth 2.0 [RFC6749] 1487 apply to this work, as well as the security considerations from 1488 [I-D.ietf-ace-actors]. Furthermore [RFC6819] provides additional 1489 security considerations for OAuth which apply to IoT deployments as 1490 well. 1492 A large range of threats can be mitigated by protecting the contents 1493 of the access token by using a digital signature or a keyed message 1494 digest (MAC) or an Authenticated Encryption with Associated Data 1495 (AEAD) algorithm. Consequently, the token integrity protection MUST 1496 be applied to prevent the token from being modified, particularly 1497 since it contains a reference to the symmetric key or the asymmetric 1498 key. If the access token contains the symmetric key, this symmetric 1499 key MUST be encrypted by the authorization server so that only the 1500 resource server can decrypt it. Note that using an AEAD algorithm is 1501 preferable over using a MAC unless the message needs to be publicly 1502 readable. 1504 It is important for the authorization server to include the identity 1505 of the intended recipient (the audience), typically a single resource 1506 server (or a list of resource servers), in the token. Using a single 1507 shared secret with multiple resource servers to simplify key 1508 management is NOT RECOMMENDED since the benefit from using the proof- 1509 of-possession concept is significantly reduced. 1511 The authorization server MUST offer confidentiality protection for 1512 any interactions with the client. This step is extremely important 1513 since the client may obtain the proof-of-possession key from the 1514 authorization server for use with a specific access token. Not using 1515 confidentiality protection exposes this secret (and the access token) 1516 to an eavesdropper thereby completely negating proof-of-possession 1517 security. Profiles MUST specify how confidentiality protection is 1518 provided, and additional protection can be applied by encrypting the 1519 token, for example encryption of CWTs is specified in Section 5.1 of 1520 [RFC8392]. 1522 Developers MUST ensure that the ephemeral credentials (i.e., the 1523 private key or the session key) are not leaked to third parties. An 1524 adversary in possession of the ephemeral credentials bound to the 1525 access token will be able to impersonate the client. Be aware that 1526 this is a real risk with many constrained environments, since 1527 adversaries can often easily get physical access to the devices. 1529 Clients can at any time request a new proof-of-possession capable 1530 access token. If clients have that capability, the AS can keep the 1531 lifetime of the access token and the associated proof-of-possession 1532 key short and therefore use shorter proof-of-possession key sizes, 1533 which translate to a performance benefit for the client and for the 1534 resource server. Shorter keys also lead to shorter messages 1535 (particularly with asymmetric keying material). 1537 When authorization servers bind symmetric keys to access tokens, they 1538 SHOULD scope these access tokens to a specific permissions. 1539 Furthermore access tokens using symmetric keys for proof-of- 1540 possession SHOULD NOT be targeted at an audience that contains more 1541 than one RS, since otherwise any RS in the audience that receives 1542 that access token can impersonate the client towards the other 1543 members of the audience. 1545 6.1. Unprotected AS Information 1547 Initially, no secure channel exists to protect the communication 1548 between C and RS. Thus, C cannot determine if the AS information 1549 contained in an unprotected response from RS to an unauthorized 1550 request (see Section 5.1.2) is authentic. It is therefore advisable 1551 to provide C with a (possibly hard-coded) list of trustworthy 1552 authorization servers. AS information responses referring to a URI 1553 not listed there would be ignored. 1555 6.2. Use of Nonces for Replay Protection 1557 The RS may add a nonce to the AS Information message sent as a 1558 response to an unauthorized request to ensure freshness of an Access 1559 Token subsequently presented to RS. While a time-stamp of some 1560 granularity would be sufficient to protect against replay attacks, 1561 using randomized nonce is preferred to prevent disclosure of 1562 information about RS's internal clock characteristics. 1564 6.3. Combining profiles 1566 There may be use cases were different profiles of this framework are 1567 combined. For example, an MQTT-TLS profile is used between the 1568 client and the RS in combination with a CoAP-DTLS profile for 1569 interactions between the client and the AS. Ideally, profiles should 1570 be designed in a way that the security of system should not depend on 1571 the specific security mechanisms used in individual protocol 1572 interactions. 1574 6.4. Error responses 1576 The various error responses defined in this framework may leak 1577 information to an adversary. For example errors responses for 1578 requests to the Authorization Information endpoint can reveal 1579 information about an otherwise opaque access token to an adversary 1580 who has intercepted this token. This framework is written under the 1581 assumption that, in general, the benefits of detailed error messages 1582 outweigh the risk due to information leakage. For particular use 1583 cases, where this assessment does not apply, detailed error messages 1584 can be replaced by more generic ones. 1586 7. Privacy Considerations 1588 Implementers and users should be aware of the privacy implications of 1589 the different possible deployments of this framework. 1591 The AS is in a very central position and can potentially learn 1592 sensitive information about the clients requesting access tokens. If 1593 the client credentials grant is used, the AS can track what kind of 1594 access the client intends to perform. With other grants this can be 1595 prevented by the Resource Owner. To do so, the resource owner needs 1596 to bind the grants it issues to anonymous, ephemeral credentials that 1597 do not allow the AS to link different grants and thus different 1598 access token requests by the same client. 1600 If access tokens are only integrity protected and not encrypted, they 1601 may reveal information to attackers listening on the wire, or able to 1602 acquire the access tokens in some other way. In the case of CWTs the 1603 token may, e.g., reveal the audience, the scope and the confirmation 1604 method used by the client. The latter may reveal the identity of the 1605 device or application running the client. This may be linkable to 1606 the identity of the person using the client (if there is a person and 1607 not a machine-to-machine interaction). 1609 Clients using asymmetric keys for proof-of-possession should be aware 1610 of the consequences of using the same key pair for proof-of- 1611 possession towards different RSs. A set of colluding RSs or an 1612 attacker able to obtain the access tokens will be able to link the 1613 requests, or even to determine the client's identity. 1615 An unprotected response to an unauthorized request (see 1616 Section 5.1.2) may disclose information about RS and/or its existing 1617 relationship with C. It is advisable to include as little 1618 information as possible in an unencrypted response. Means of 1619 encrypting communication between C and RS already exist, more 1620 detailed information may be included with an error response to 1621 provide C with sufficient information to react on that particular 1622 error. 1624 8. IANA Considerations 1626 8.1. Authorization Server Information 1628 This section establishes the IANA "ACE Authorization Server 1629 Information" registry. The registry has been created to use the 1630 "Expert Review Required" registration procedure [RFC8126]. It should 1631 be noted that, in addition to the expert review, some portions of the 1632 registry require a specification, potentially a Standards Track RFC, 1633 be supplied as well. 1635 The columns of the registry are: 1637 Name The name of the parameter 1638 CBOR Key CBOR map key for the parameter. Different ranges of values 1639 use different registration policies [RFC8126]. Integer values 1640 from -256 to 255 are designated as Standards Action. Integer 1641 values from -65536 to -257 and from 256 to 65535 are designated as 1642 Specification Required. Integer values greater than 65535 are 1643 designated as Expert Review. Integer values less than -65536 are 1644 marked as Private Use. 1645 Value Type The CBOR data types allowable for the values of this 1646 parameter. 1647 Reference This contains a pointer to the public specification of the 1648 grant type abbreviation, if one exists. 1650 This registry will be initially populated by the values in Figure 2. 1651 The Reference column for all of these entries will be this document. 1653 8.2. OAuth Error Code CBOR Mappings Registry 1655 This section establish the IANA "OAuth Error Code CBOR Mappings" 1656 registry. The registry has been created to use the "Expert Review 1657 Required" registration procedure [RFC8126]. It should be noted that, 1658 in addition to the expert review, some portions of the registry 1659 require a specification, potentially a Standards Track RFC, be 1660 supplied as well. 1662 The columns of the registry are: 1664 Name The OAuth Error Code name, refers to the name in Section 5.2. 1665 of [RFC6749], e.g., "invalid_request". 1666 CBOR Value CBOR abbreviation for this error code. Different ranges 1667 of values use different registration policies [RFC8126]. Integer 1668 values from -256 to 255 are designated as Standards Action. 1670 Integer values from -65536 to -257 and from 256 to 65535 are 1671 designated as Specification Required. Integer values greater than 1672 65535 are designated as Expert Review. Integer values less than 1673 -65536 are marked as Private Use. 1674 Reference This contains a pointer to the public specification of the 1675 grant type abbreviation, if one exists. 1677 This registry will be initially populated by the values in Figure 10. 1678 The Reference column for all of these entries will be this document. 1680 8.3. OAuth Grant Type CBOR Mappings 1682 This section establishes the IANA "OAuth Grant Type CBOR Mappings" 1683 registry. The registry has been created to use the "Expert Review 1684 Required" registration procedure [RFC8126]. It should be noted that, 1685 in addition to the expert review, some portions of the registry 1686 require a specification, potentially a Standards Track RFC, be 1687 supplied as well. 1689 The columns of this registry are: 1691 Name The name of the grant type as specified in Section 1.3 of 1692 [RFC6749]. 1693 CBOR Value CBOR abbreviation for this grant type. Different ranges 1694 of values use different registration policies [RFC8126]. Integer 1695 values from -256 to 255 are designated as Standards Action. 1696 Integer values from -65536 to -257 and from 256 to 65535 are 1697 designated as Specification Required. Integer values greater than 1698 65535 are designated as Expert Review. Integer values less than 1699 -65536 are marked as Private Use. 1700 Reference This contains a pointer to the public specification of the 1701 grant type abbreviation, if one exists. 1702 Original Specification This contains a pointer to the public 1703 specification of the grant type, if one exists. 1705 This registry will be initially populated by the values in Figure 11. 1706 The Reference column for all of these entries will be this document. 1708 8.4. OAuth Access Token Types 1710 This section registers the following new token type in the "OAuth 1711 Access Token Types" registry [IANA.OAuthAccessTokenTypes]. 1713 o Name: "PoP" 1714 o Change Controller: IETF 1715 o Reference: [this document] 1717 8.5. OAuth Token Type CBOR Mappings 1719 This section eatables the IANA "Token Type CBOR Mappings" registry. 1720 The registry has been created to use the "Expert Review Required" 1721 registration procedure [RFC8126]. It should be noted that, in 1722 addition to the expert review, some portions of the registry require 1723 a specification, potentially a Standards Track RFC, be supplied as 1724 well. 1726 The columns of this registry are: 1728 Name The name of token type as registered in the OAuth Access Token 1729 Types registry, e.g., "Bearer". 1730 CBOR Value CBOR abbreviation for this token type. Different ranges 1731 of values use different registration policies [RFC8126]. Integer 1732 values from -256 to 255 are designated as Standards Action. 1733 Integer values from -65536 to -257 and from 256 to 65535 are 1734 designated as Specification Required. Integer values greater than 1735 65535 are designated as Expert Review. Integer values less than 1736 -65536 are marked as Private Use. 1737 Reference This contains a pointer to the public specification of the 1738 OAuth token type abbreviation, if one exists. 1739 Original Specification This contains a pointer to the public 1740 specification of the grant type, if one exists. 1742 8.5.1. Initial Registry Contents 1744 o Name: "Bearer" 1745 o Value: 1 1746 o Reference: [this document] 1747 o Original Specification: [RFC6749] 1749 o Name: "pop" 1750 o Value: 2 1751 o Reference: [this document] 1752 o Original Specification: [this document] 1754 8.6. ACE Profile Registry 1756 This section establishes the IANA "ACE Profile" registry. The 1757 registry has been created to use the "Expert Review Required" 1758 registration procedure [RFC8126]. It should be noted that, in 1759 addition to the expert review, some portions of the registry require 1760 a specification, potentially a Standards Track RFC, be supplied as 1761 well. 1763 The columns of this registry are: 1765 Name The name of the profile, to be used as value of the profile 1766 attribute. 1767 Description Text giving an overview of the profile and the context 1768 it is developed for. 1769 CBOR Value CBOR abbreviation for this profile name. Different 1770 ranges of values use different registration policies [RFC8126]. 1771 Integer values from -256 to 255 are designated as Standards 1772 Action. Integer values from -65536 to -257 and from 256 to 65535 1773 are designated as Specification Required. Integer values greater 1774 than 65535 are designated as Expert Review. Integer values less 1775 than -65536 are marked as Private Use. 1776 Reference This contains a pointer to the public specification of the 1777 profile abbreviation, if one exists. 1779 8.7. OAuth Parameter Registration 1781 This section registers the following parameter in the "OAuth 1782 Parameters" registry [IANA.OAuthParameters]: 1784 o Name: "profile" 1785 o Parameter Usage Location: token response 1786 o Change Controller: IESG 1787 o Reference: Section 5.6.4.3 of [this document] 1789 8.8. OAuth CBOR Parameter Mappings Registry 1791 This section establishes the IANA "Token Endpoint CBOR Mappings" 1792 registry. The registry has been created to use the "Expert Review 1793 Required" registration procedure [RFC8126]. It should be noted that, 1794 in addition to the expert review, some portions of the registry 1795 require a specification, potentially a Standards Track RFC, be 1796 supplied as well. 1798 The columns of this registry are: 1800 Name The OAuth Parameter name, refers to the name in the OAuth 1801 parameter registry, e.g., "client_id". 1802 CBOR Key CBOR map key for this parameter. Different ranges of 1803 values use different registration policies [RFC8126]. Integer 1804 values from -256 to 255 are designated as Standards Action. 1805 Integer values from -65536 to -257 and from 256 to 65535 are 1806 designated as Specification Required. Integer values greater than 1807 65535 are designated as Expert Review. Integer values less than 1808 -65536 are marked as Private Use. 1809 Value Type The allowable CBOR data types for values of this 1810 parameter. 1811 Reference This contains a pointer to the public specification of the 1812 grant type abbreviation, if one exists. 1814 This registry will be initially populated by the values in Figure 12. 1815 The Reference column for all of these entries will be this document. 1817 Note that these mappings intentionally coincide with the CWT claim 1818 name mappings from [RFC8392]. 1820 8.9. OAuth Introspection Response Parameter Registration 1822 This section registers the following parameter in the OAuth Token 1823 Introspection Response registry [IANA.TokenIntrospectionResponse]. 1825 o Name: "profile" 1826 o Description: The communication and communication security profile 1827 used between client and RS, as defined in ACE profiles. 1828 o Change Controller: IESG 1829 o Reference: Section 5.7.2 of [this document] 1831 8.10. Introspection Endpoint CBOR Mappings Registry 1833 This section establishes the IANA "Introspection Endpoint CBOR 1834 Mappings" registry. The registry has been created to use the "Expert 1835 Review Required" registration procedure [RFC8126]. It should be 1836 noted that, in addition to the expert review, some portions of the 1837 registry require a specification, potentially a Standards Track RFC, 1838 be supplied as well. 1840 The columns of this registry are: 1842 Name The OAuth Parameter name, refers to the name in the OAuth 1843 parameter registry, e.g., "client_id". 1844 CBOR Key CBOR map key for this parameter. Different ranges of 1845 values use different registration policies [RFC8126]. Integer 1846 values from -256 to 255 are designated as Standards Action. 1847 Integer values from -65536 to -257 and from 256 to 65535 are 1848 designated as Specification Required. Integer values greater than 1849 65535 are designated as Expert Review. Integer values less than 1850 -65536 are marked as Private Use. 1851 Value Type The allowable CBOR data types for values of this 1852 parameter. 1853 Reference This contains a pointer to the public specification of the 1854 grant type abbreviation, if one exists. 1856 This registry will be initially populated by the values in Figure 16. 1857 The Reference column for all of these entries will be this document. 1859 8.11. JSON Web Token Claims 1861 This specification registers the following new claims in the JSON Web 1862 Token (JWT) registry of JSON Web Token Claims 1863 [IANA.JsonWebTokenClaims]: 1865 o Claim Name: "scope" 1866 o Claim Description: The scope of an access token as defined in 1867 [RFC6749]. 1868 o Change Controller: IESG 1869 o Reference: Section 5.8 of [this document] 1871 o Claim Name: "profile" 1872 o Claim Description: The profile a token is supposed to be used 1873 with. 1874 o Change Controller: IESG 1875 o Reference: Section 5.8 of [this document] 1877 o Claim Name: "rs_cnf" 1878 o Claim Description: The public key the RS is supposed to use to 1879 authenticate to the client wielding this token. 1880 o Change Controller: IESG 1881 o Reference: Section 5.8 of [this document] 1883 8.12. CBOR Web Token Claims 1885 This specification registers the following new claims in the "CBOR 1886 Web Token (CWT) Claims" registry [IANA.CborWebTokenClaims]. 1888 o Claim Name: "scope" 1889 o Claim Description: The scope of an access token as defined in 1890 [RFC6749]. 1891 o JWT Claim Name: N/A 1892 o Claim Key: 12 1893 o Claim Value Type(s): byte string or text string 1894 o Change Controller: IESG 1895 o Specification Document(s): Section 5.8 of [this document] 1897 o Claim Name: "profile" 1898 o Claim Description: The profile a token is supposed to be used 1899 with. 1900 o JWT Claim Name: N/A 1901 o Claim Key: 16 1902 o Claim Value Type(s): integer 1903 o Change Controller: IESG 1904 o Specification Document(s): Section 5.8 of [this document] 1906 o Claim Name: "rs_cnf" 1907 o Claim Description: The public key the RS is supposed to use to 1908 authenticate to the client wielding this token. 1909 o JWT Claim Name: N/A 1910 o Claim Key: 17 1911 o Claim Value Type(s): map 1912 o Change Controller: IESG 1913 o Specification Document(s): Section 5.8 of [this document] 1915 8.13. Media Type Registrations 1917 This document registres a media type for messages of the protocols 1918 defined in this document carrying parameters encoded in CBOR. This 1919 registration follows the procedures specified in [RFC6838]. 1921 8.13.1. Media Type Registration 1923 Type name: application 1925 Subtype name: ace+cbor 1927 Required parameters: none 1929 Optional parameters: none 1931 Encoding considerations: Must be encoded as CBOR map containg the 1932 protocol parameters defined in [this document]. 1934 Security considerations: See Section 6 of this document. 1936 Interoperability considerations: n/a 1938 Published specification: [this document] 1940 Applications that use this media type: The type is used by 1941 authorization servers, clients and resource servers that support the 1942 ACE framework as specified in [this document]. 1944 Additional information: 1946 Magic number(s): n/a 1948 File extension(s): .ace 1950 Macintosh file type code(s): n/a 1952 Person & email address to contact for further information: Ludwig 1953 Seitz 1954 Intended usage: COMMON 1956 Restrictions on usage: None 1958 Author: Ludwig Seitzs 1960 Change controller: IESG 1962 8.14. CoAP Content-Format Registry 1964 This document registers the following entry to the "CoAP Content- 1965 Formats" registry: 1967 Media Type: application/ace+cbor 1969 Encoding 1971 ID: 19 1973 Reference: [this document] 1975 9. Acknowledgments 1977 This document is a product of the ACE working group of the IETF. 1979 Thanks to Eve Maler for her contributions to the use of OAuth 2.0 and 1980 UMA in IoT scenarios, Robert Taylor for his discussion input, and 1981 Malisa Vucinic for his input on the predecessors of this proposal. 1983 Thanks to the authors of draft-ietf-oauth-pop-key-distribution, from 1984 where large parts of the security considerations where copied. 1986 Thanks to Stefanie Gerdes, Olaf Bergmann, and Carsten Bormann for 1987 contributing their work on AS discovery from draft-gerdes-ace-dcaf- 1988 authorize (see Section 5.1). 1990 Thanks to Jim Schaad and Mike Jones for their comprehensive reviews. 1992 Ludwig Seitz and Goeran Selander worked on this document as part of 1993 the CelticPlus project CyberWI, with funding from Vinnova. 1995 10. References 1997 10.1. Normative References 1999 [I-D.ietf-ace-cwt-proof-of-possession] 2000 Jones, M., Seitz, L., Selander, G., Erdtman, S., and H. 2001 Tschofenig, "Proof-of-Possession Key Semantics for CBOR 2002 Web Tokens (CWTs)", draft-ietf-ace-cwt-proof-of- 2003 possession-03 (work in progress), June 2018. 2005 [I-D.ietf-ace-oauth-params] 2006 Seitz, L., "Additional OAuth Parameters for Authorization 2007 in Constrained Environments (ACE)", draft-ietf-ace-oauth- 2008 params-00 (work in progress), September 2018. 2010 [IANA.CborWebTokenClaims] 2011 IANA, "CBOR Web Token (CWT) Claims", 2012 . 2015 [IANA.JsonWebTokenClaims] 2016 IANA, "JSON Web Token Claims", 2017 . 2019 [IANA.OAuthAccessTokenTypes] 2020 IANA, "OAuth Access Token Types", 2021 . 2024 [IANA.OAuthParameters] 2025 IANA, "OAuth Parameters", 2026 . 2029 [IANA.TokenIntrospectionResponse] 2030 IANA, "OAuth Token Introspection Response", 2031 . 2034 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2035 Requirement Levels", BCP 14, RFC 2119, 2036 DOI 10.17487/RFC2119, March 1997, . 2039 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 2040 Resource Identifier (URI): Generic Syntax", STD 66, 2041 RFC 3986, DOI 10.17487/RFC3986, January 2005, 2042 . 2044 [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer 2045 Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, 2046 January 2012, . 2048 [RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type 2049 Specifications and Registration Procedures", BCP 13, 2050 RFC 6838, DOI 10.17487/RFC6838, January 2013, 2051 . 2053 [RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained 2054 Application Protocol (CoAP)", RFC 7252, 2055 DOI 10.17487/RFC7252, June 2014, . 2058 [RFC7662] Richer, J., Ed., "OAuth 2.0 Token Introspection", 2059 RFC 7662, DOI 10.17487/RFC7662, October 2015, 2060 . 2062 [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for 2063 Writing an IANA Considerations Section in RFCs", BCP 26, 2064 RFC 8126, DOI 10.17487/RFC8126, June 2017, 2065 . 2067 [RFC8152] Schaad, J., "CBOR Object Signing and Encryption (COSE)", 2068 RFC 8152, DOI 10.17487/RFC8152, July 2017, 2069 . 2071 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2072 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2073 May 2017, . 2075 [RFC8392] Jones, M., Wahlstroem, E., Erdtman, S., and H. Tschofenig, 2076 "CBOR Web Token (CWT)", RFC 8392, DOI 10.17487/RFC8392, 2077 May 2018, . 2079 10.2. Informative References 2081 [I-D.erdtman-ace-rpcc] 2082 Seitz, L. and S. Erdtman, "Raw-Public-Key and Pre-Shared- 2083 Key as OAuth client credentials", draft-erdtman-ace- 2084 rpcc-02 (work in progress), October 2017. 2086 [I-D.ietf-ace-actors] 2087 Gerdes, S., Seitz, L., Selander, G., and C. Bormann, "An 2088 architecture for authorization in constrained 2089 environments", draft-ietf-ace-actors-06 (work in 2090 progress), November 2017. 2092 [I-D.ietf-core-object-security] 2093 Selander, G., Mattsson, J., Palombini, F., and L. Seitz, 2094 "Object Security for Constrained RESTful Environments 2095 (OSCORE)", draft-ietf-core-object-security-15 (work in 2096 progress), August 2018. 2098 [I-D.ietf-oauth-device-flow] 2099 Denniss, W., Bradley, J., Jones, M., and H. Tschofenig, 2100 "OAuth 2.0 Device Flow for Browserless and Input 2101 Constrained Devices", draft-ietf-oauth-device-flow-12 2102 (work in progress), August 2018. 2104 [Margi10impact] 2105 Margi, C., de Oliveira, B., de Sousa, G., Simplicio Jr, 2106 M., Barreto, P., Carvalho, T., Naeslund, M., and R. Gold, 2107 "Impact of Operating Systems on Wireless Sensor Networks 2108 (Security) Applications and Testbeds", Proceedings of 2109 the 19th International Conference on Computer 2110 Communications and Networks (ICCCN), 2010 August. 2112 [RFC4949] Shirey, R., "Internet Security Glossary, Version 2", 2113 FYI 36, RFC 4949, DOI 10.17487/RFC4949, August 2007, 2114 . 2116 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 2117 (TLS) Protocol Version 1.2", RFC 5246, 2118 DOI 10.17487/RFC5246, August 2008, . 2121 [RFC6690] Shelby, Z., "Constrained RESTful Environments (CoRE) Link 2122 Format", RFC 6690, DOI 10.17487/RFC6690, August 2012, 2123 . 2125 [RFC6749] Hardt, D., Ed., "The OAuth 2.0 Authorization Framework", 2126 RFC 6749, DOI 10.17487/RFC6749, October 2012, 2127 . 2129 [RFC6819] Lodderstedt, T., Ed., McGloin, M., and P. Hunt, "OAuth 2.0 2130 Threat Model and Security Considerations", RFC 6819, 2131 DOI 10.17487/RFC6819, January 2013, . 2134 [RFC7049] Bormann, C. and P. Hoffman, "Concise Binary Object 2135 Representation (CBOR)", RFC 7049, DOI 10.17487/RFC7049, 2136 October 2013, . 2138 [RFC7228] Bormann, C., Ersue, M., and A. Keranen, "Terminology for 2139 Constrained-Node Networks", RFC 7228, 2140 DOI 10.17487/RFC7228, May 2014, . 2143 [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 2144 Protocol (HTTP/1.1): Semantics and Content", RFC 7231, 2145 DOI 10.17487/RFC7231, June 2014, . 2148 [RFC7519] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token 2149 (JWT)", RFC 7519, DOI 10.17487/RFC7519, May 2015, 2150 . 2152 [RFC7521] Campbell, B., Mortimore, C., Jones, M., and Y. Goland, 2153 "Assertion Framework for OAuth 2.0 Client Authentication 2154 and Authorization Grants", RFC 7521, DOI 10.17487/RFC7521, 2155 May 2015, . 2157 [RFC7591] Richer, J., Ed., Jones, M., Bradley, J., Machulak, M., and 2158 P. Hunt, "OAuth 2.0 Dynamic Client Registration Protocol", 2159 RFC 7591, DOI 10.17487/RFC7591, July 2015, 2160 . 2162 [RFC7641] Hartke, K., "Observing Resources in the Constrained 2163 Application Protocol (CoAP)", RFC 7641, 2164 DOI 10.17487/RFC7641, September 2015, . 2167 [RFC7744] Seitz, L., Ed., Gerdes, S., Ed., Selander, G., Mani, M., 2168 and S. Kumar, "Use Cases for Authentication and 2169 Authorization in Constrained Environments", RFC 7744, 2170 DOI 10.17487/RFC7744, January 2016, . 2173 [RFC7959] Bormann, C. and Z. Shelby, Ed., "Block-Wise Transfers in 2174 the Constrained Application Protocol (CoAP)", RFC 7959, 2175 DOI 10.17487/RFC7959, August 2016, . 2178 [RFC8252] Denniss, W. and J. Bradley, "OAuth 2.0 for Native Apps", 2179 BCP 212, RFC 8252, DOI 10.17487/RFC8252, October 2017, 2180 . 2182 [RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data 2183 Interchange Format", STD 90, RFC 8259, 2184 DOI 10.17487/RFC8259, December 2017, . 2187 [RFC8414] Jones, M., Sakimura, N., and J. Bradley, "OAuth 2.0 2188 Authorization Server Metadata", RFC 8414, 2189 DOI 10.17487/RFC8414, June 2018, . 2192 Appendix A. Design Justification 2194 This section provides further insight into the design decisions of 2195 the solution documented in this document. Section 3 lists several 2196 building blocks and briefly summarizes their importance. The 2197 justification for offering some of those building blocks, as opposed 2198 to using OAuth 2.0 as is, is given below. 2200 Common IoT constraints are: 2202 Low Power Radio: 2204 Many IoT devices are equipped with a small battery which needs to 2205 last for a long time. For many constrained wireless devices, the 2206 highest energy cost is associated to transmitting or receiving 2207 messages (roughly by a factor of 10 compared to AES) 2208 [Margi10impact]. It is therefore important to keep the total 2209 communication overhead low, including minimizing the number and 2210 size of messages sent and received, which has an impact of choice 2211 on the message format and protocol. By using CoAP over UDP and 2212 CBOR encoded messages, some of these aspects are addressed. 2213 Security protocols contribute to the communication overhead and 2214 can, in some cases, be optimized. For example, authentication and 2215 key establishment may, in certain cases where security 2216 requirements allow, be replaced by provisioning of security 2217 context by a trusted third party, using transport or application 2218 layer security. 2220 Low CPU Speed: 2222 Some IoT devices are equipped with processors that are 2223 significantly slower than those found in most current devices on 2224 the Internet. This typically has implications on what timely 2225 cryptographic operations a device is capable of performing, which 2226 in turn impacts, e.g., protocol latency. Symmetric key 2227 cryptography may be used instead of the computationally more 2228 expensive public key cryptography where the security requirements 2229 so allows, but this may also require support for trusted third 2230 party assisted secret key establishment using transport or 2231 application layer security. 2232 Small Amount of Memory: 2234 Microcontrollers embedded in IoT devices are often equipped with 2235 small amount of RAM and flash memory, which places limitations 2236 what kind of processing can be performed and how much code can be 2237 put on those devices. To reduce code size fewer and smaller 2238 protocol implementations can be put on the firmware of such a 2239 device. In this case, CoAP may be used instead of HTTP, symmetric 2240 key cryptography instead of public key cryptography, and CBOR 2241 instead of JSON. Authentication and key establishment protocol, 2242 e.g., the DTLS handshake, in comparison with assisted key 2243 establishment also has an impact on memory and code. 2245 User Interface Limitations: 2247 Protecting access to resources is both an important security as 2248 well as privacy feature. End users and enterprise customers may 2249 not want to give access to the data collected by their IoT device 2250 or to functions it may offer to third parties. Since the 2251 classical approach of requesting permissions from end users via a 2252 rich user interface does not work in many IoT deployment 2253 scenarios, these functions need to be delegated to user-controlled 2254 devices that are better suitable for such tasks, such as smart 2255 phones and tablets. 2257 Communication Constraints: 2259 In certain constrained settings an IoT device may not be able to 2260 communicate with a given device at all times. Devices may be 2261 sleeping, or just disconnected from the Internet because of 2262 general lack of connectivity in the area, for cost reasons, or for 2263 security reasons, e.g., to avoid an entry point for Denial-of- 2264 Service attacks. 2266 The communication interactions this framework builds upon (as 2267 shown graphically in Figure 1) may be accomplished using a variety 2268 of different protocols, and not all parts of the message flow are 2269 used in all applications due to the communication constraints. 2270 Deployments making use of CoAP are expected, but not limited to, 2271 other protocols such as HTTP, HTTP/2 or other specific protocols, 2272 such as Bluetooth Smart communication, that do not necessarily use 2273 IP could also be used. The latter raises the need for application 2274 layer security over the various interfaces. 2276 In the light of these constraints we have made the following design 2277 decisions: 2279 CBOR, COSE, CWT: 2281 This framework REQUIRES the use of CBOR [RFC7049] as data format. 2282 Where CBOR data needs to be protected, the use of COSE [RFC8152] 2283 is RECOMMENDED. Furthermore where self-contained tokens are 2284 needed, this framework RECOMMENDS the use of CWT [RFC8392]. These 2285 measures aim at reducing the size of messages sent over the wire, 2286 the RAM size of data objects that need to be kept in memory and 2287 the size of libraries that devices need to support. 2289 CoAP: 2291 This framework RECOMMENDS the use of CoAP [RFC7252] instead of 2292 HTTP. This does not preclude the use of other protocols 2293 specifically aimed at constrained devices, like, e.g., Bluetooth 2294 Low Energy (see Section 3.2). This aims again at reducing the 2295 size of messages sent over the wire, the RAM size of data objects 2296 that need to be kept in memory and the size of libraries that 2297 devices need to support. 2299 Access Information: 2301 This framework defines the name "Access Information" for data 2302 concerning the RS that the AS returns to the client in an access 2303 token response (see Section 5.6.2). This includes the "profile" 2304 and the "rs_cnf" parameters. This aims at enabling scenarios, 2305 where a powerful client, supporting multiple profiles, needs to 2306 interact with a RS for which it does not know the supported 2307 profiles and the raw public key. 2309 Proof-of-Possession: 2311 This framework makes use of proof-of-possession tokens, using the 2312 "cnf" claim [I-D.ietf-ace-cwt-proof-of-possession]. A 2313 semantically and syntactically identical request and response 2314 parameter is defined for the token endpoint, to allow requesting 2315 and stating confirmation keys. This aims at making token theft 2316 harder. Token theft is specifically relevant in constrained use 2317 cases, as communication often passes through middle-boxes, which 2318 could be able to steal bearer tokens and use them to gain 2319 unauthorized access. 2321 Auth-Info endpoint: 2323 This framework introduces a new way of providing access tokens to 2324 a RS by exposing a authz-info endpoint, to which access tokens can 2325 be POSTed. This aims at reducing the size of the request message 2326 and the code complexity at the RS. The size of the request 2327 message is problematic, since many constrained protocols have 2328 severe message size limitations at the physical layer (e.g., in 2329 the order of 100 bytes). This means that larger packets get 2330 fragmented, which in turn combines badly with the high rate of 2331 packet loss, and the need to retransmit the whole message if one 2332 packet gets lost. Thus separating sending of the request and 2333 sending of the access tokens helps to reduce fragmentation. 2335 Client Credentials Grant: 2337 This framework RECOMMENDS the use of the client credentials grant 2338 for machine-to-machine communication use cases, where manual 2339 intervention of the resource owner to produce a grant token is not 2340 feasible. The intention is that the resource owner would instead 2341 pre-arrange authorization with the AS, based on the client's own 2342 credentials. The client can the (without manual intervention) 2343 obtain access tokens from the AS. 2345 Introspection: 2347 This framework RECOMMENDS the use of access token introspection in 2348 cases where the client is constrained in a way that it can not 2349 easily obtain new access tokens (i.e. it has connectivity issues 2350 that prevent it from communicating with the AS). In that case 2351 this framework RECOMMENDS the use of a long-term token, that could 2352 be a simple reference. The RS is assumed to be able to 2353 communicate with the AS, and can therefore perform introspection, 2354 in order to learn the claims associated with the token reference. 2355 The advantage of such an approach is that the resource owner can 2356 change the claims associated to the token reference without having 2357 to be in contact with the client, thus granting or revoking access 2358 rights. 2360 Appendix B. Roles and Responsibilities 2362 Resource Owner 2364 * Make sure that the RS is registered at the AS. This includes 2365 making known to the AS which profiles, token_types, scopes, and 2366 key types (symmetric/asymmetric) the RS supports. Also making 2367 it known to the AS which audience(s) the RS identifies itself 2368 with. 2369 * Make sure that clients can discover the AS that is in charge of 2370 the RS. 2371 * If the client-credentials grant is used, make sure that the AS 2372 has the necessary, up-to-date, access control policies for the 2373 RS. 2375 Requesting Party 2377 * Make sure that the client is provisioned the necessary 2378 credentials to authenticate to the AS. 2379 * Make sure that the client is configured to follow the security 2380 requirements of the Requesting Party when issuing requests 2381 (e.g., minimum communication security requirements, trust 2382 anchors). 2383 * Register the client at the AS. This includes making known to 2384 the AS which profiles, token_types, and key types (symmetric/ 2385 asymmetric) the client. 2387 Authorization Server 2389 * Register the RS and manage corresponding security contexts. 2390 * Register clients and authentication credentials. 2391 * Allow Resource Owners to configure and update access control 2392 policies related to their registered RSs. 2393 * Expose the token endpoint to allow clients to request tokens. 2394 * Authenticate clients that wish to request a token. 2395 * Process a token request using the authorization policies 2396 configured for the RS. 2397 * Optionally: Expose the introspection endpoint that allows RS's 2398 to submit token introspection requests. 2399 * If providing an introspection endpoint: Authenticate RSs that 2400 wish to get an introspection response. 2401 * If providing an introspection endpoint: Process token 2402 introspection requests. 2403 * Optionally: Handle token revocation. 2404 * Optionally: Provide discovery metadata. See [RFC8414] 2406 Client 2408 * Discover the AS in charge of the RS that is to be targeted with 2409 a request. 2410 * Submit the token request (see step (A) of Figure 1). 2412 + Authenticate to the AS. 2413 + Optionally (if not pre-configured): Specify which RS, which 2414 resource(s), and which action(s) the request(s) will target. 2415 + If raw public keys (rpk) or certificates are used, make sure 2416 the AS has the right rpk or certificate for this client. 2417 * Process the access token and Access Information (see step (B) 2418 of Figure 1). 2420 + Check that the Access Information provides the necessary 2421 security parameters (e.g., PoP key, information on 2422 communication security protocols supported by the RS). 2424 * Send the token and request to the RS (see step (C) of 2425 Figure 1). 2427 + Authenticate towards the RS (this could coincide with the 2428 proof of possession process). 2429 + Transmit the token as specified by the AS (default is to the 2430 authz-info endpoint, alternative options are specified by 2431 profiles). 2432 + Perform the proof-of-possession procedure as specified by 2433 the profile in use (this may already have been taken care of 2434 through the authentication procedure). 2435 * Process the RS response (see step (F) of Figure 1) of the RS. 2437 Resource Server 2439 * Expose a way to submit access tokens. By default this is the 2440 authz-info endpoint. 2441 * Process an access token. 2443 + Verify the token is from a recognized AS. 2444 + Verify that the token applies to this RS. 2445 + Check that the token has not expired (if the token provides 2446 expiration information). 2447 + Check the token's integrity. 2448 + Store the token so that it can be retrieved in the context 2449 of a matching request. 2450 * Process a request. 2452 + Set up communication security with the client. 2453 + Authenticate the client. 2454 + Match the client against existing tokens. 2455 + Check that tokens belonging to the client actually authorize 2456 the requested action. 2457 + Optionally: Check that the matching tokens are still valid, 2458 using introspection (if this is possible.) 2459 * Send a response following the agreed upon communication 2460 security. 2462 Appendix C. Requirements on Profiles 2464 This section lists the requirements on profiles of this framework, 2465 for the convenience of profile designers. 2467 o Specify the communication protocol the client and RS the must use 2468 (e.g., CoAP). Section 5 and Section 5.6.4.3 2469 o Specify the security protocol the client and RS must use to 2470 protect their communication (e.g., OSCORE or DTLS over CoAP). 2472 This must provide encryption, integrity and replay protection. 2473 Section 5.6.4.3 2474 o Specify how the client and the RS mutually authenticate. 2475 Section 4 2476 o Specify the proof-of-possession protocol(s) and how to select one, 2477 if several are available. Also specify which key types (e.g., 2478 symmetric/asymmetric) are supported by a specific proof-of- 2479 possession protocol. Section 5.6.4.2 2480 o Specify a unique profile identifier. Section 5.6.4.3 2481 o If introspection is supported: Specify the communication and 2482 security protocol for introspection.Section 5.7 2483 o Specify the communication and security protocol for interactions 2484 between client and AS. Section 5.6 2485 o Specify how/if the authz-info endpoint is protected, including how 2486 error responses are protected. Section 5.8.1 2487 o Optionally define other methods of token transport than the authz- 2488 info endpoint. Section 5.8.1 2490 Appendix D. Assumptions on AS knowledge about C and RS 2492 This section lists the assumptions on what an AS should know about a 2493 client and a RS in order to be able to respond to requests to the 2494 token and introspection endpoints. How this information is 2495 established is out of scope for this document. 2497 o The identifier of the client or RS. 2498 o The profiles that the client or RS supports. 2499 o The scopes that the RS supports. 2500 o The audiences that the RS identifies with. 2501 o The key types (e.g., pre-shared symmetric key, raw public key, key 2502 length, other key parameters) that the client or RS supports. 2503 o The types of access tokens the RS supports (e.g., CWT). 2504 o If the RS supports CWTs, the COSE parameters for the crypto 2505 wrapper (e.g., algorithm, key-wrap algorithm, key-length). 2506 o The expiration time for access tokens issued to this RS (unless 2507 the RS accepts a default time chosen by the AS). 2508 o The symmetric key shared between client or RS and AS (if any). 2509 o The raw public key of the client or RS (if any). 2511 Appendix E. Deployment Examples 2513 There is a large variety of IoT deployments, as is indicated in 2514 Appendix A, and this section highlights a few common variants. This 2515 section is not normative but illustrates how the framework can be 2516 applied. 2518 For each of the deployment variants, there are a number of possible 2519 security setups between clients, resource servers and authorization 2520 servers. The main focus in the following subsections is on how 2521 authorization of a client request for a resource hosted by a RS is 2522 performed. This requires the security of the requests and responses 2523 between the clients and the RS to consider. 2525 Note: CBOR diagnostic notation is used for examples of requests and 2526 responses. 2528 E.1. Local Token Validation 2530 In this scenario, the case where the resource server is offline is 2531 considered, i.e., it is not connected to the AS at the time of the 2532 access request. This access procedure involves steps A, B, C, and F 2533 of Figure 1. 2535 Since the resource server must be able to verify the access token 2536 locally, self-contained access tokens must be used. 2538 This example shows the interactions between a client, the 2539 authorization server and a temperature sensor acting as a resource 2540 server. Message exchanges A and B are shown in Figure 17. 2542 A: The client first generates a public-private key pair used for 2543 communication security with the RS. 2544 The client sends the POST request to the token endpoint at the AS. 2545 The security of this request can be transport or application 2546 layer. It is up the the communication security profile to define. 2547 In the example transport layer identification of the AS is done 2548 and the client identifies with client_id and client_secret as in 2549 classic OAuth. The request contains the public key of the client 2550 and the Audience parameter set to "tempSensorInLivingRoom", a 2551 value that the temperature sensor identifies itself with. The AS 2552 evaluates the request and authorizes the client to access the 2553 resource. 2554 B: The AS responds with a PoP access token and Access Information. 2555 The PoP access token contains the public key of the client, and 2556 the Access Information contains the public key of the RS. For 2557 communication security this example uses DTLS RawPublicKey between 2558 the client and the RS. The issued token will have a short 2559 validity time, i.e., "exp" close to "iat", to protect the RS from 2560 replay attacks. The token includes the claim such as "scope" with 2561 the authorized access that an owner of the temperature device can 2562 enjoy. In this example, the "scope" claim, issued by the AS, 2563 informs the RS that the owner of the token, that can prove the 2564 possession of a key is authorized to make a GET request against 2565 the /temperature resource and a POST request on the /firmware 2566 resource. Note that the syntax and semantics of the scope claim 2567 are application specific. 2569 Note: In this example it is assumed that the client knows what 2570 resource it wants to access, and is therefore able to request 2571 specific audience and scope claims for the access token. 2573 Authorization 2574 Client Server 2575 | | 2576 |<=======>| DTLS Connection Establishment 2577 | | to identify the AS 2578 | | 2579 A: +-------->| Header: POST (Code=0.02) 2580 | POST | Uri-Path:"token" 2581 | | Content-Format: application/ace+cbor 2582 | | Payload: 2583 | | 2584 B: |<--------+ Header: 2.05 Content 2585 | 2.05 | Content-Format: application/ace+cbor 2586 | | Payload: 2587 | | 2589 Figure 17: Token Request and Response Using Client Credentials. 2591 The information contained in the Request-Payload and the Response- 2592 Payload is shown in Figure 18. 2594 Request-Payload : 2595 { 2596 "grant_type" : "client_credentials", 2597 "aud" : "tempSensorInLivingRoom", 2598 "client_id" : "myclient", 2599 "client_secret" : "qwerty" 2600 "cnf" : { 2601 "COSE_Key" : { 2602 "kid" : b64'1Bg8vub9tLe1gHMzV76e8', 2603 "kty" : "EC", 2604 "crv" : "P-256", 2605 "x" : b64'f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU', 2606 "y" : b64'x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0' 2607 } 2608 } 2609 } 2611 Response-Payload : 2612 { 2613 "access_token" : b64'SlAV32hkKG ...', 2614 "token_type" : "pop", 2615 "csp" : "DTLS", 2616 "rs_cnf" : { 2617 "COSE_Key" : { 2618 "kid" : b64'c29tZSBwdWJsaWMga2V5IGlk', 2619 "kty" : "EC", 2620 "crv" : "P-256", 2621 "x" : b64'MKBCTNIcKUSDii11ySs3526iDZ8AiTo7Tu6KPAqv7D4', 2622 "y" : b64'4Etl6SRW2YiLUrN5vfvVHuhp7x8PxltmWWlbbM4IFyM' 2623 } 2624 } 2625 } 2627 Figure 18: Request and Response Payload Details. 2629 The content of the access token is shown in Figure 19. 2631 { 2632 "aud" : "tempSensorInLivingRoom", 2633 "iat" : "1360189224", 2634 "exp" : "1360289224", 2635 "scope" : "temperature_g firmware_p", 2636 "cnf" : { 2637 "COSE_Key" : { 2638 "kid" : b64'1Bg8vub9tLe1gHMzV76e8', 2639 "kty" : "EC", 2640 "crv" : "P-256", 2641 "x" : b64'f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU', 2642 "y" : b64'x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0' 2643 } 2644 } 2645 } 2647 Figure 19: Access Token including Public Key of the Client. 2649 Messages C and F are shown in Figure 20 - Figure 21. 2651 C: The client then sends the PoP access token to the authz-info 2652 endpoint at the RS. This is a plain CoAP request, i.e., no 2653 transport or application layer security is used between client and 2654 RS since the token is integrity protected between the AS and RS. 2655 The RS verifies that the PoP access token was created by a known 2656 and trusted AS, is valid, and has been issued to the client. The 2657 RS caches the security context together with authorization 2658 information about this client contained in the PoP access token. 2660 Resource 2661 Client Server 2662 | | 2663 C: +-------->| Header: POST (Code=0.02) 2664 | POST | Uri-Path:"authz-info" 2665 | | Payload: SlAV32hkKG ... 2666 | | 2667 |<--------+ Header: 2.04 Changed 2668 | 2.04 | 2669 | | 2671 Figure 20: Access Token provisioning to RS 2672 The client and the RS runs the DTLS handshake using the raw public 2673 keys established in step B and C. 2674 The client sends the CoAP request GET to /temperature on RS over 2675 DTLS. The RS verifies that the request is authorized, based on 2676 previously established security context. 2677 F: The RS responds with a resource representation over DTLS. 2679 Resource 2680 Client Server 2681 | | 2682 |<=======>| DTLS Connection Establishment 2683 | | using Raw Public Keys 2684 | | 2685 +-------->| Header: GET (Code=0.01) 2686 | GET | Uri-Path: "temperature" 2687 | | 2688 | | 2689 | | 2690 F: |<--------+ Header: 2.05 Content 2691 | 2.05 | Payload: 2692 | | 2694 Figure 21: Resource Request and Response protected by DTLS. 2696 E.2. Introspection Aided Token Validation 2698 In this deployment scenario it is assumed that a client is not able 2699 to access the AS at the time of the access request, whereas the RS is 2700 assumed to be connected to the back-end infrastructure. Thus the RS 2701 can make use of token introspection. This access procedure involves 2702 steps A-F of Figure 1, but assumes steps A and B have been carried 2703 out during a phase when the client had connectivity to AS. 2705 Since the client is assumed to be offline, at least for a certain 2706 period of time, a pre-provisioned access token has to be long-lived. 2707 Since the client is constrained, the token will not be self contained 2708 (i.e. not a CWT) but instead just a reference. The resource server 2709 uses its connectivity to learn about the claims associated to the 2710 access token by using introspection, which is shown in the example 2711 below. 2713 In the example interactions between an offline client (key fob), a RS 2714 (online lock), and an AS is shown. It is assumed that there is a 2715 provisioning step where the client has access to the AS. This 2716 corresponds to message exchanges A and B which are shown in 2717 Figure 22. 2719 Authorization consent from the resource owner can be pre-configured, 2720 but it can also be provided via an interactive flow with the resource 2721 owner. An example of this for the key fob case could be that the 2722 resource owner has a connected car, he buys a generic key that he 2723 wants to use with the car. To authorize the key fob he connects it 2724 to his computer that then provides the UI for the device. After that 2725 OAuth 2.0 implicit flow can used to authorize the key for his car at 2726 the the car manufacturers AS. 2728 Note: In this example the client does not know the exact door it will 2729 be used to access since the token request is not send at the time of 2730 access. So the scope and audience parameters are set quite wide to 2731 start with and new values different form the original once can be 2732 returned from introspection later on. 2734 A: The client sends the request using POST to the token endpoint 2735 at AS. The request contains the Audience parameter set to 2736 "PACS1337" (PACS, Physical Access System), a value the that the 2737 online door in question identifies itself with. The AS generates 2738 an access token as an opaque string, which it can match to the 2739 specific client, a targeted audience and a symmetric key. The 2740 security is provided by identifying the AS on transport layer 2741 using a pre shared security context (psk, rpk or certificate) and 2742 then the client is identified using client_id and client_secret as 2743 in classic OAuth. 2744 B: The AS responds with the an access token and Access 2745 Information, the latter containing a symmetric key. Communication 2746 security between C and RS will be DTLS and PreSharedKey. The PoP 2747 key is used as the PreSharedKey. 2749 Authorization 2750 Client Server 2751 | | 2752 | | 2753 A: +-------->| Header: POST (Code=0.02) 2754 | POST | Uri-Path:"token" 2755 | | Content-Format: application/ace+cbor 2756 | | Payload: 2757 | | 2758 B: |<--------+ Header: 2.05 Content 2759 | | Content-Format: application/ace+cbor 2760 | 2.05 | Payload: 2761 | | 2763 Figure 22: Token Request and Response using Client Credentials. 2765 The information contained in the Request-Payload and the Response- 2766 Payload is shown in Figure 23. 2768 Request-Payload: 2769 { 2770 "grant_type" : "client_credentials", 2771 "client_id" : "keyfob", 2772 "client_secret" : "qwerty" 2773 } 2775 Response-Payload: 2776 { 2777 "access_token" : b64'VGVzdCB0b2tlbg==', 2778 "token_type" : "pop", 2779 "csp" : "DTLS", 2780 "cnf" : { 2781 "COSE_Key" : { 2782 "kid" : b64'c29tZSBwdWJsaWMga2V5IGlk', 2783 "kty" : "oct", 2784 "alg" : "HS256", 2785 "k": b64'ZoRSOrFzN_FzUA5XKMYoVHyzff5oRJxl-IXRtztJ6uE' 2786 } 2787 } 2788 } 2790 Figure 23: Request and Response Payload for C offline 2792 The access token in this case is just an opaque byte string 2793 referencing the authorization information at the AS. 2795 C: Next, the client POSTs the access token to the authz-info 2796 endpoint in the RS. This is a plain CoAP request, i.e., no DTLS 2797 between client and RS. Since the token is an opaque string, the 2798 RS cannot verify it on its own, and thus defers to respond the 2799 client with a status code until after step E. 2800 D: The RS forwards the token to the introspection endpoint on the 2801 AS. Introspection assumes a secure connection between the AS and 2802 the RS, e.g., using transport of application layer security. In 2803 the example AS is identified using pre shared security context 2804 (psk, rpk or certificate) while RS is acting as client and is 2805 identified with client_id and client_secret. 2806 E: The AS provides the introspection response containing 2807 parameters about the token. This includes the confirmation key 2808 (cnf) parameter that allows the RS to verify the client's proof of 2809 possession in step F. 2810 After receiving message E, the RS responds to the client's POST in 2811 step C with the CoAP response code 2.01 (Created). 2813 Resource 2814 Client Server 2815 | | 2816 C: +-------->| Header: POST (T=CON, Code=0.02) 2817 | POST | Uri-Path:"authz-info" 2818 | | Content-Format: "application/ace+cbor" 2819 | | Payload: b64'VGVzdCB0b2tlbg==' 2820 | | 2821 | | Authorization 2822 | | Server 2823 | | | 2824 | D: +--------->| Header: POST (Code=0.02) 2825 | | POST | Uri-Path: "introspect" 2826 | | | Content-Format: "application/ace+cbor" 2827 | | | Payload: 2828 | | | 2829 | E: |<---------+ Header: 2.05 Content 2830 | | 2.05 | Content-Format: "application/ace+cbor" 2831 | | | Payload: 2832 | | | 2833 | | 2834 |<--------+ Header: 2.01 Created 2835 | 2.01 | 2836 | | 2838 Figure 24: Token Introspection for C offline 2839 The information contained in the Request-Payload and the Response- 2840 Payload is shown in Figure 25. 2842 Request-Payload: 2843 { 2844 "token" : b64'VGVzdCB0b2tlbg==', 2845 "client_id" : "FrontDoor", 2846 "client_secret" : "ytrewq" 2847 } 2849 Response-Payload: 2850 { 2851 "active" : true, 2852 "aud" : "lockOfDoor4711", 2853 "scope" : "open, close", 2854 "iat" : 1311280970, 2855 "cnf" : { 2856 "kid" : b64'c29tZSBwdWJsaWMga2V5IGlk' 2857 } 2858 } 2860 Figure 25: Request and Response Payload for Introspection 2862 The client uses the symmetric PoP key to establish a DTLS 2863 PreSharedKey secure connection to the RS. The CoAP request PUT is 2864 sent to the uri-path /state on the RS, changing the state of the 2865 door to locked. 2866 F: The RS responds with a appropriate over the secure DTLS 2867 channel. 2869 Resource 2870 Client Server 2871 | | 2872 |<=======>| DTLS Connection Establishment 2873 | | using Pre Shared Key 2874 | | 2875 +-------->| Header: PUT (Code=0.03) 2876 | PUT | Uri-Path: "state" 2877 | | Payload: 2878 | | 2879 F: |<--------+ Header: 2.04 Changed 2880 | 2.04 | Payload: 2881 | | 2883 Figure 26: Resource request and response protected by OSCORE 2885 Appendix F. Document Updates 2887 RFC EDITOR: PLEASE REMOVE THIS SECTION. 2889 F.1. Version -13 to -14 2891 o Split out the 'aud', 'cnf' and 'rs_cnf' parameters to 2892 [I-D.ietf-ace-oauth-params] 2893 o Introduced the "application/ace+cbor" Content-Type. 2894 o Added claim registrations from 'profile' and 'rs_cnf'. 2895 o Added note on schema part of AS Information Section 5.1.2 2896 o Realigned the parameter abbreviations to push rarely used ones to 2897 the 2-byte encoding size of CBOR integers. 2899 F.2. Version -12 to -13 2901 o Changed "Resource Information" to "Access Information" to avoid 2902 confusion. 2903 o Clarified section about AS discovery. 2904 o Editorial changes 2906 F.3. Version -11 to -12 2908 o Moved the Request error handling to a section of its own. 2909 o Require the use of the abbreviation for profile identifiers. 2910 o Added rs_cnf parameter in the introspection response, to inform 2911 RS' with several RPKs on which key to use. 2912 o Allowed use of rs_cnf as claim in the access token in order to 2913 inform an RS with several RPKs on which key to use. 2914 o Clarified that profiles must specify if/how error responses are 2915 protected. 2916 o Fixed label number range to align with COSE/CWT. 2917 o Clarified the requirements language in order to allow profiles to 2918 specify other payload formats than CBOR if they do not use CoAP. 2920 F.4. Version -10 to -11 2922 o Fixed some CBOR data type errors. 2923 o Updated boilerplate text 2925 F.5. Version -09 to -10 2927 o Removed CBOR major type numbers. 2928 o Removed the client token design. 2929 o Rephrased to clarify that other protocols than CoAP can be used. 2930 o Clarifications regarding the use of HTTP 2932 F.6. Version -08 to -09 2934 o Allowed scope to be byte arrays. 2935 o Defined default names for endpoints. 2936 o Refactored the IANA section for briefness and consistency. 2937 o Refactored tables that define IANA registry contents for 2938 consistency. 2939 o Created IANA registry for CBOR mappings of error codes, grant 2940 types and Authorization Server Information. 2941 o Added references to other document sections defining IANA entries 2942 in the IANA section. 2944 F.7. Version -07 to -08 2946 o Moved AS discovery from the DTLS profile to the framework, see 2947 Section 5.1. 2948 o Made the use of CBOR mandatory. If you use JSON you can use 2949 vanilla OAuth. 2950 o Made it mandatory for profiles to specify C-AS security and RS-AS 2951 security (the latter only if introspection is supported). 2952 o Made the use of CBOR abbreviations mandatory. 2954 o Added text to clarify the use of token references as an 2955 alternative to CWTs. 2956 o Added text to clarify that introspection must not be delayed, in 2957 case the RS has to return a client token. 2958 o Added security considerations about leakage through unprotected AS 2959 discovery information, combining profiles and leakage through 2960 error responses. 2961 o Added privacy considerations about leakage through unprotected AS 2962 discovery. 2963 o Added text that clarifies that introspection is optional. 2964 o Made profile parameter optional since it can be implicit. 2965 o Clarified that CoAP is not mandatory and other protocols can be 2966 used. 2967 o Clarified the design justification for specific features of the 2968 framework in appendix A. 2969 o Clarified appendix E.2. 2970 o Removed specification of the "cnf" claim for CBOR/COSE, and 2971 replaced with references to [I-D.ietf-ace-cwt-proof-of-possession] 2973 F.8. Version -06 to -07 2975 o Various clarifications added. 2976 o Fixed erroneous author email. 2978 F.9. Version -05 to -06 2980 o Moved sections that define the ACE framework into a subsection of 2981 the framework Section 5. 2982 o Split section on client credentials and grant into two separate 2983 sections, Section 5.2, and Section 5.3. 2984 o Added Section 5.4 on AS authentication. 2985 o Added Section 5.5 on the Authorization endpoint. 2987 F.10. Version -04 to -05 2989 o Added RFC 2119 language to the specification of the required 2990 behavior of profile specifications. 2991 o Added Section 5.3 on the relation to the OAuth2 grant types. 2992 o Added CBOR abbreviations for error and the error codes defined in 2993 OAuth2. 2994 o Added clarification about token expiration and long-running 2995 requests in Section 5.8.3 2996 o Added security considerations about tokens with symmetric pop keys 2997 valid for more than one RS. 2998 o Added privacy considerations section. 2999 o Added IANA registry mapping the confirmation types from RFC 7800 3000 to equivalent COSE types. 3002 o Added appendix D, describing assumptions about what the AS knows 3003 about the client and the RS. 3005 F.11. Version -03 to -04 3007 o Added a description of the terms "framework" and "profiles" as 3008 used in this document. 3009 o Clarified protection of access tokens in section 3.1. 3010 o Clarified uses of the "cnf" parameter in section 6.4.5. 3011 o Clarified intended use of Client Token in section 7.4. 3013 F.12. Version -02 to -03 3015 o Removed references to draft-ietf-oauth-pop-key-distribution since 3016 the status of this draft is unclear. 3017 o Copied and adapted security considerations from draft-ietf-oauth- 3018 pop-key-distribution. 3019 o Renamed "client information" to "RS information" since it is 3020 information about the RS. 3021 o Clarified the requirements on profiles of this framework. 3022 o Clarified the token endpoint protocol and removed negotiation of 3023 "profile" and "alg" (section 6). 3024 o Renumbered the abbreviations for claims and parameters to get a 3025 consistent numbering across different endpoints. 3026 o Clarified the introspection endpoint. 3027 o Renamed token, introspection and authz-info to "endpoint" instead 3028 of "resource" to mirror the OAuth 2.0 terminology. 3029 o Updated the examples in the appendices. 3031 F.13. Version -01 to -02 3033 o Restructured to remove communication security parts. These shall 3034 now be defined in profiles. 3035 o Restructured section 5 to create new sections on the OAuth 3036 endpoints token, introspection and authz-info. 3037 o Pulled in material from draft-ietf-oauth-pop-key-distribution in 3038 order to define proof-of-possession key distribution. 3039 o Introduced the "cnf" parameter as defined in RFC7800 to reference 3040 or transport keys used for proof of possession. 3041 o Introduced the "client-token" to transport client information from 3042 the AS to the client via the RS in conjunction with introspection. 3043 o Expanded the IANA section to define parameters for token request, 3044 introspection and CWT claims. 3045 o Moved deployment scenarios to the appendix as examples. 3047 F.14. Version -00 to -01 3049 o Changed 5.1. from "Communication Security Protocol" to "Client 3050 Information". 3051 o Major rewrite of 5.1 to clarify the information exchanged between 3052 C and AS in the PoP access token request profile for IoT. 3054 * Allow the client to indicate preferences for the communication 3055 security protocol. 3056 * Defined the term "Client Information" for the additional 3057 information returned to the client in addition to the access 3058 token. 3059 * Require that the messages between AS and client are secured, 3060 either with (D)TLS or with COSE_Encrypted wrappers. 3061 * Removed dependency on OSCOAP and added generic text about 3062 object security instead. 3063 * Defined the "rpk" parameter in the client information to 3064 transmit the raw public key of the RS from AS to client. 3065 * (D)TLS MUST use the PoP key in the handshake (either as PSK or 3066 as client RPK with client authentication). 3067 * Defined the use of x5c, x5t and x5tS256 parameters when a 3068 client certificate is used for proof of possession. 3069 * Defined "tktn" parameter for signaling for how to transfer the 3070 access token. 3071 o Added 5.2. the CoAP Access-Token option for transferring access 3072 tokens in messages that do not have payload. 3073 o 5.3.2. Defined success and error responses from the RS when 3074 receiving an access token. 3075 o 5.6.:Added section giving guidance on how to handle token 3076 expiration in the absence of reliable time. 3077 o Appendix B Added list of roles and responsibilities for C, AS and 3078 RS. 3080 Authors' Addresses 3082 Ludwig Seitz 3083 RISE SICS 3084 Scheelevaegen 17 3085 Lund 223 70 3086 Sweden 3088 Email: ludwig.seitz@ri.se 3089 Goeran Selander 3090 Ericsson 3091 Faroegatan 6 3092 Kista 164 80 3093 Sweden 3095 Email: goran.selander@ericsson.com 3097 Erik Wahlstroem 3098 Sweden 3100 Email: erik@wahlstromstekniska.se 3102 Samuel Erdtman 3103 Spotify AB 3104 Birger Jarlsgatan 61, 4tr 3105 Stockholm 113 56 3106 Sweden 3108 Email: erdtman@spotify.com 3110 Hannes Tschofenig 3111 Arm Ltd. 3112 Absam 6067 3113 Austria 3115 Email: Hannes.Tschofenig@arm.com