idnits 2.17.00 (12 Aug 2021) /tmp/idnits21315/draft-ietf-ace-oauth-authz-10.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 (February 13, 2018) is 1557 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: draft-ietf-ace-cbor-web-token has been published as RFC 8392 -- No information found for draft-ietf-ace-cwt-proof-of-possession - is the name correct? -- Possible downref: Normative reference to a draft: ref. 'I-D.ietf-ace-cwt-proof-of-possession' ** Obsolete normative reference: RFC 6347 (Obsoleted by RFC 9147) -- No information found for draft-erdtman-ace-rpcc - is the name correct? -- No information found for draft-ietf-ace-actors - is the name correct? == Outdated reference: draft-ietf-core-object-security has been published as RFC 8613 == Outdated reference: draft-ietf-core-resource-directory has been published as RFC 9176 -- No information found for draft-ietf-oauth-device-flow - is the name correct? -- No information found for draft-ietf-oauth-discovery - is the name correct? -- Obsolete informational reference (is this intentional?): RFC 5246 (Obsoleted by RFC 8446) -- Obsolete informational reference (is this intentional?): RFC 7049 (Obsoleted by RFC 8949) -- Obsolete informational reference (is this intentional?): RFC 7159 (Obsoleted by RFC 8259) Summary: 1 error (**), 0 flaws (~~), 4 warnings (==), 10 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 ACE Working Group L. Seitz 3 Internet-Draft RISE SICS 4 Intended status: Standards Track G. Selander 5 Expires: August 17, 2018 Ericsson 6 E. Wahlstroem 8 S. Erdtman 9 Spotify AB 10 H. Tschofenig 11 ARM Ltd. 12 February 13, 2018 14 Authentication and Authorization for Constrained Environments (ACE) 15 draft-ietf-ace-oauth-authz-10 17 Abstract 19 This specification defines a framework for authentication and 20 authorization in Internet of Things (IoT) environments. The 21 framework is based on a set of building blocks including OAuth 2.0 22 and CoAP, thus making a well-known and widely used authorization 23 solution suitable for IoT devices. Existing specifications are used 24 where possible, but where the constraints of IoT devices require it, 25 extensions are added and profiles are defined. 27 Status of This Memo 29 This Internet-Draft is submitted in full conformance with the 30 provisions of BCP 78 and BCP 79. 32 Internet-Drafts are working documents of the Internet Engineering 33 Task Force (IETF). Note that other groups may also distribute 34 working documents as Internet-Drafts. The list of current Internet- 35 Drafts is at http://datatracker.ietf.org/drafts/current/. 37 Internet-Drafts are draft documents valid for a maximum of six months 38 and may be updated, replaced, or obsoleted by other documents at any 39 time. It is inappropriate to use Internet-Drafts as reference 40 material or to cite them other than as "work in progress." 42 This Internet-Draft will expire on August 17, 2018. 44 Copyright Notice 46 Copyright (c) 2018 IETF Trust and the persons identified as the 47 document authors. All rights reserved. 49 This document is subject to BCP 78 and the IETF Trust's Legal 50 Provisions Relating to IETF Documents 51 (http://trustee.ietf.org/license-info) in effect on the date of 52 publication of this document. Please review these documents 53 carefully, as they describe your rights and restrictions with respect 54 to this document. Code Components extracted from this document must 55 include Simplified BSD License text as described in Section 4.e of 56 the Trust Legal Provisions and are provided without warranty as 57 described in the Simplified BSD License. 59 Table of Contents 61 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 62 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 63 3. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 5 64 3.1. OAuth 2.0 . . . . . . . . . . . . . . . . . . . . . . . . 6 65 3.2. CoAP . . . . . . . . . . . . . . . . . . . . . . . . . . 9 66 4. Protocol Interactions . . . . . . . . . . . . . . . . . . . . 10 67 5. Framework . . . . . . . . . . . . . . . . . . . . . . . . . . 13 68 5.1. Discovering Authorization Servers . . . . . . . . . . . . 14 69 5.1.1. Unauthorized Resource Request Message . . . . . . . . 15 70 5.1.2. AS Information . . . . . . . . . . . . . . . . . . . 15 71 5.2. Authorization Grants . . . . . . . . . . . . . . . . . . 17 72 5.3. Client Credentials . . . . . . . . . . . . . . . . . . . 17 73 5.4. AS Authentication . . . . . . . . . . . . . . . . . . . . 18 74 5.5. The Authorization Endpoint . . . . . . . . . . . . . . . 18 75 5.6. The Token Endpoint . . . . . . . . . . . . . . . . . . . 18 76 5.6.1. Client-to-AS Request . . . . . . . . . . . . . . . . 19 77 5.6.2. AS-to-Client Response . . . . . . . . . . . . . . . . 22 78 5.6.3. Error Response . . . . . . . . . . . . . . . . . . . 24 79 5.6.4. Request and Response Parameters . . . . . . . . . . . 25 80 5.6.4.1. Audience . . . . . . . . . . . . . . . . . . . . 25 81 5.6.4.2. Grant Type . . . . . . . . . . . . . . . . . . . 25 82 5.6.4.3. Token Type . . . . . . . . . . . . . . . . . . . 26 83 5.6.4.4. Profile . . . . . . . . . . . . . . . . . . . . . 26 84 5.6.4.5. Confirmation . . . . . . . . . . . . . . . . . . 26 85 5.6.5. Mapping Parameters to CBOR . . . . . . . . . . . . . 27 86 5.7. The 'Introspect' Endpoint . . . . . . . . . . . . . . . . 28 87 5.7.1. RS-to-AS Request . . . . . . . . . . . . . . . . . . 29 88 5.7.2. AS-to-RS Response . . . . . . . . . . . . . . . . . . 29 89 5.7.3. Error Response . . . . . . . . . . . . . . . . . . . 30 90 5.7.4. Mapping Introspection parameters to CBOR . . . . . . 31 91 5.8. The Access Token . . . . . . . . . . . . . . . . . . . . 32 92 5.8.1. The 'Authorization Information' Endpoint . . . . . . 32 93 5.8.2. Token Expiration . . . . . . . . . . . . . . . . . . 33 94 6. Security Considerations . . . . . . . . . . . . . . . . . . . 34 95 6.1. Unprotected AS Information . . . . . . . . . . . . . . . 35 96 6.2. Use of Nonces for Replay Protection . . . . . . . . . . . 35 97 6.3. Combining profiles . . . . . . . . . . . . . . . . . . . 35 98 6.4. Error responses . . . . . . . . . . . . . . . . . . . . . 36 99 7. Privacy Considerations . . . . . . . . . . . . . . . . . . . 36 100 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 37 101 8.1. Authorization Server Information . . . . . . . . . . . . 37 102 8.2. OAuth Error Code CBOR Mappings Registry . . . . . . . . . 37 103 8.3. OAuth Grant Type CBOR Mappings . . . . . . . . . . . . . 38 104 8.4. OAuth Access Token Types . . . . . . . . . . . . . . . . 38 105 8.5. OAuth Token Type CBOR Mappings . . . . . . . . . . . . . 38 106 8.5.1. Initial Registry Contents . . . . . . . . . . . . . . 39 107 8.6. ACE OAuth Profile Registry . . . . . . . . . . . . . . . 39 108 8.7. OAuth Parameter Registration . . . . . . . . . . . . . . 39 109 8.8. OAuth CBOR Parameter Mappings Registry . . . . . . . . . 40 110 8.9. OAuth Introspection Response Parameter Registration . . . 41 111 8.10. Introspection Endpoint CBOR Mappings Registry . . . . . . 41 112 8.11. JSON Web Token Claims . . . . . . . . . . . . . . . . . . 42 113 8.12. CBOR Web Token Claims . . . . . . . . . . . . . . . . . . 42 114 8.13. CoAP Option Number Registration . . . . . . . . . . . . . 42 115 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 42 116 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 43 117 10.1. Normative References . . . . . . . . . . . . . . . . . . 43 118 10.2. Informative References . . . . . . . . . . . . . . . . . 44 119 Appendix A. Design Justification . . . . . . . . . . . . . . . . 46 120 Appendix B. Roles and Responsibilities . . . . . . . . . . . . . 50 121 Appendix C. Requirements on Profiles . . . . . . . . . . . . . . 52 122 Appendix D. Assumptions on AS knowledge about C and RS . . . . . 53 123 Appendix E. Deployment Examples . . . . . . . . . . . . . . . . 53 124 E.1. Local Token Validation . . . . . . . . . . . . . . . . . 53 125 E.2. Introspection Aided Token Validation . . . . . . . . . . 57 126 Appendix F. Document Updates . . . . . . . . . . . . . . . . . . 61 127 F.1. Version -09 to -10 . . . . . . . . . . . . . . . . . . . 61 128 F.2. Version -08 to -09 . . . . . . . . . . . . . . . . . . . 61 129 F.3. Version -07 to -08 . . . . . . . . . . . . . . . . . . . 62 130 F.4. Version -06 to -07 . . . . . . . . . . . . . . . . . . . 62 131 F.5. Version -05 to -06 . . . . . . . . . . . . . . . . . . . 62 132 F.6. Version -04 to -05 . . . . . . . . . . . . . . . . . . . 62 133 F.7. Version -03 to -04 . . . . . . . . . . . . . . . . . . . 63 134 F.8. Version -02 to -03 . . . . . . . . . . . . . . . . . . . 63 135 F.9. Version -01 to -02 . . . . . . . . . . . . . . . . . . . 63 136 F.10. Version -00 to -01 . . . . . . . . . . . . . . . . . . . 64 137 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 64 139 1. Introduction 141 Authorization is the process for granting approval to an entity to 142 access a resource [RFC4949]. The authorization task itself can best 143 be described as granting access to a requesting client, for a 144 resource hosted on a device, the resource server (RS). This exchange 145 is mediated by one or multiple authorization servers (AS). Managing 146 authorization for a large number of devices and users can be a 147 complex task. 149 While prior work on authorization solutions for the Web and for the 150 mobile environment also applies to the Internet of Things (IoT) 151 environment, many IoT devices are constrained, for example, in terms 152 of processing capabilities, available memory, etc. For web 153 applications on constrained nodes, this specification RECOMMENDS the 154 use of CoAP [RFC7252] as replacement for HTTP. 156 A detailed treatment of constraints can be found in [RFC7228], and 157 the different IoT deployments present a continuous range of device 158 and network capabilities. Taking energy consumption as an example: 159 At one end there are energy-harvesting or battery powered devices 160 which have a tight power budget, on the other end there are mains- 161 powered devices, and all levels in between. 163 Hence, IoT devices may be very different in terms of available 164 processing and message exchange capabilities and there is a need to 165 support many different authorization use cases [RFC7744]. 167 This specification describes a framework for authentication and 168 authorization in constrained environments (ACE) built on re-use of 169 OAuth 2.0 [RFC6749], thereby extending authorization to Internet of 170 Things devices. This specification contains the necessary building 171 blocks for adjusting OAuth 2.0 to IoT environments. 173 More detailed, interoperable specifications can be found in profiles. 174 Implementations may claim conformance with a specific profile, 175 whereby implementations utilizing the same profile interoperate while 176 implementations of different profiles are not expected to be 177 interoperable. Some devices, such as mobile phones and tablets, may 178 implement multiple profiles and will therefore be able to interact 179 with a wider range of low end devices. Requirements on profiles are 180 described at contextually appropriate places throughout this 181 specification, and also summarized in Appendix C. 183 2. Terminology 185 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 186 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 187 "OPTIONAL" in this document are to be interpreted as described in 188 [RFC2119]. 190 Certain security-related terms such as "authentication", 191 "authorization", "confidentiality", "(data) integrity", "message 192 authentication code", and "verify" are taken from [RFC4949]. 194 Since exchanges in this specification are described as RESTful 195 protocol interactions, HTTP [RFC7231] offers useful terminology. 197 Terminology for entities in the architecture is defined in OAuth 2.0 198 [RFC6749] and [I-D.ietf-ace-actors], such as client (C), resource 199 server (RS), and authorization server (AS). 201 Note that the term "endpoint" is used here following its OAuth 202 definition, which is to denote resources such as token and 203 introspection at the AS and authz-info at the RS (see Section 5.8.1 204 for a definition of the authz-info endpoint). The CoAP [RFC7252] 205 definition, which is "An entity participating in the CoAP protocol" 206 is not used in this specification. 208 Since this specification focuses on the problem of access control to 209 resources, the actors has been simplified by assuming that the client 210 authorization server (CAS) functionality is not stand-alone but 211 subsumed by either the authorization server or the client (see 212 Section 2.2 in [I-D.ietf-ace-actors]). 214 The specifications in this document is called the "framework" or "ACE 215 framework". When referring to "profiles of this framework" it refers 216 to additional specifications that define the use of this 217 specification with concrete transport, and communication security 218 protocols (e.g., CoAP over DTLS). 220 We use the term "RS Information" for parameters describing 221 characteristics of the RS (e.g. public key) that the AS provides to 222 the client. 224 3. Overview 226 This specification defines the ACE framework for authorization in the 227 Internet of Things environment. It consists of a set of building 228 blocks. 230 The basic block is the OAuth 2.0 [RFC6749] framework, which enjoys 231 widespread deployment. Many IoT devices can support OAuth 2.0 232 without any additional extensions, but for certain constrained 233 settings additional profiling is needed. 235 Another building block is the lightweight web transfer protocol CoAP 236 [RFC7252], for those communication environments where HTTP is not 237 appropriate. CoAP typically runs on top of UDP, which further 238 reduces overhead and message exchanges. While this specification 239 defines extensions for the use of OAuth over CoAP, other underlying 240 protocols are not prohibited from being supported in the future, such 241 as HTTP/2, MQTT, BLE and QUIC. 243 A third building block is CBOR [RFC7049], for encodings where JSON 244 [RFC7159] is not sufficiently compact. CBOR is a binary encoding 245 designed for small code and message size, which may be used for 246 encoding of self contained tokens, and also for encoding payload 247 transferred in protocol messages. 249 A fourth building block is the compact CBOR-based secure message 250 format COSE [RFC8152], which enables application layer security as an 251 alternative or complement to transport layer security (DTLS [RFC6347] 252 or TLS [RFC5246]). COSE is used to secure self-contained tokens such 253 as proof-of-possession (PoP) tokens, which is an extension to the 254 OAuth tokens. The default token format is defined in CBOR web token 255 (CWT) [I-D.ietf-ace-cbor-web-token]. Application layer security for 256 CoAP using COSE can be provided with OSCOAP 257 [I-D.ietf-core-object-security]. 259 With the building blocks listed above, solutions satisfying various 260 IoT device and network constraints are possible. A list of 261 constraints is described in detail in RFC 7228 [RFC7228] and a 262 description of how the building blocks mentioned above relate to the 263 various constraints can be found in Appendix A. 265 Luckily, not every IoT device suffers from all constraints. The ACE 266 framework nevertheless takes all these aspects into account and 267 allows several different deployment variants to co-exist, rather than 268 mandating a one-size-fits-all solution. It is important to cover the 269 wide range of possible interworking use cases and the different 270 requirements from a security point of view. Once IoT deployments 271 mature, popular deployment variants will be documented in the form of 272 ACE profiles. 274 3.1. OAuth 2.0 276 The OAuth 2.0 authorization framework enables a client to obtain 277 scoped access to a resource with the permission of a resource owner. 278 Authorization information, or references to it, is passed between the 279 nodes using access tokens. These access tokens are issued to clients 280 by an authorization server with the approval of the resource owner. 281 The client uses the access token to access the protected resources 282 hosted by the resource server. 284 A number of OAuth 2.0 terms are used within this specification: 286 The token and introspection Endpoints: 287 The AS hosts the token endpoint that allows a client to request 288 access tokens. The client makes a POST request to the token 289 endpoint on the AS and receives the access token in the response 290 (if the request was successful). 292 In some deployments, a token introspection endpoint is provided by 293 the AS, which can be used by the RS if it needs to request 294 additional information regarding a received access token. The RS 295 makes a POST request to the introspection endpoint on the AS and 296 receives information about the access token in the response. (See 297 "Introspection" below.) 299 Access Tokens: 300 Access tokens are credentials needed to access protected 301 resources. An access token is a data structure representing 302 authorization permissions issued by the AS to the client. Access 303 tokens are generated by the AS and consumed by the RS. The access 304 token content is opaque to the client. 306 Access tokens can have different formats, and various methods of 307 utilization (e.g., cryptographic properties) based on the security 308 requirements of the given deployment. 310 Proof of Possession Tokens: 311 An access token may be bound to a cryptographic key, which is then 312 used by an RS to authenticate requests from a client. Such tokens 313 are called proof-of-possession access tokens (or PoP access 314 tokens). 316 The proof-of-possession (PoP) security concept assumes that the AS 317 acts as a trusted third party that binds keys to access tokens. 318 These so called PoP keys are then used by the client to 319 demonstrate the possession of the secret to the RS when accessing 320 the resource. The RS, when receiving an access token, needs to 321 verify that the key used by the client matches the one bound to 322 the access token. When this specification uses the term "access 323 token" it is assumed to be a PoP access token token unless 324 specifically stated otherwise. 326 The key bound to the access token (the PoP key) may use either 327 symmetric or asymmetric cryptography. The appropriate choice of 328 the kind of cryptography depends on the constraints of the IoT 329 devices as well as on the security requirements of the use case. 331 Symmetric PoP key: 332 The AS generates a random symmetric PoP key. The key is either 333 stored to be returned on introspection calls or encrypted and 334 included in the access token. The PoP key is also encrypted 335 for the client and sent together with the access token to the 336 client. 338 Asymmetric PoP key: 339 An asymmetric key pair is generated on the client and the 340 public key is sent to the AS (if it does not already have 341 knowledge of the client's public key). Information about the 342 public key, which is the PoP key in this case, is either stored 343 to be returned on introspection calls or included inside the 344 access token and sent back to the requesting client. The RS 345 can identify the client's public key from the information in 346 the token, which allows the client to use the corresponding 347 private key for the proof of possession. 349 The access token is either a simple reference, or a structured 350 information object (e.g., CWT [I-D.ietf-ace-cbor-web-token]), 351 protected by a cryptographic wrapper (e.g., COSE [RFC8152]). The 352 choice of PoP key does not necessarily imply a specific credential 353 type for the integrity protection of the token. 355 Scopes and Permissions: 356 In OAuth 2.0, the client specifies the type of permissions it is 357 seeking to obtain (via the scope parameter) in the access token 358 request. In turn, the AS may use the scope response parameter to 359 inform the client of the scope of the access token issued. As the 360 client could be a constrained device as well, this specification 361 uses CBOR encoding as data format, defined in Section 5, to 362 request scopes and to be informed what scopes the access token 363 actually authorizes. 365 The values of the scope parameter in OAuth 2.0 are expressed as a 366 list of space-delimited, case-sensitive strings, with a semantic 367 that is well-known to the AS and the RS. More details about the 368 concept of scopes is found under Section 3.3 in [RFC6749]. 370 Claims: 371 Information carried in the access token or returned from 372 introspection, called claims, is in the form of name-value pairs. 373 An access token may, for example, include a claim identifying the 374 AS that issued the token (via the "iss" claim) and what audience 375 the access token is intended for (via the "aud" claim). The 376 audience of an access token can be a specific resource or one or 377 many resource servers. The resource owner policies influence what 378 claims are put into the access token by the authorization server. 380 While the structure and encoding of the access token varies 381 throughout deployments, a standardized format has been defined 382 with the JSON Web Token (JWT) [RFC7519] where claims are encoded 383 as a JSON object. In [I-D.ietf-ace-cbor-web-token], an equivalent 384 format using CBOR encoding (CWT) has been defined. 386 Introspection: 387 Introspection is a method for a resource server to query the 388 authorization server for the active state and content of a 389 received access token. This is particularly useful in those cases 390 where the authorization decisions are very dynamic and/or where 391 the received access token itself is an opaque reference rather 392 than a self-contained token. More information about introspection 393 in OAuth 2.0 can be found in [RFC7662]. 395 3.2. CoAP 397 CoAP is an application layer protocol similar to HTTP, but 398 specifically designed for constrained environments. CoAP typically 399 uses datagram-oriented transport, such as UDP, where reordering and 400 loss of packets can occur. A security solution needs to take the 401 latter aspects into account. 403 While HTTP uses headers and query strings to convey additional 404 information about a request, CoAP encodes such information into 405 header parameters called 'options'. 407 CoAP supports application-layer fragmentation of the CoAP payloads 408 through blockwise transfers [RFC7959]. However, blockwise transfer 409 does not increase the size limits of CoAP options, therefore data 410 encoded in options has to be kept small. 412 Transport layer security for CoAP can be provided by DTLS 1.2 413 [RFC6347] or TLS 1.2 [RFC5246]. CoAP defines a number of proxy 414 operations that require transport layer security to be terminated at 415 the proxy. One approach for protecting CoAP communication end-to-end 416 through proxies, and also to support security for CoAP over a 417 different transport in a uniform way, is to provide security at the 418 application layer using an object-based security mechanism such as 419 COSE [RFC8152]. 421 One application of COSE is OSCOAP [I-D.ietf-core-object-security], 422 which provides end-to-end confidentiality, integrity and replay 423 protection, and a secure binding between CoAP request and response 424 messages. In OSCOAP, the CoAP messages are wrapped in COSE objects 425 and sent using CoAP. 427 This framework RECOMMENDS the use of CoAP as replacement for HTTP. 429 4. Protocol Interactions 431 The ACE framework is based on the OAuth 2.0 protocol interactions 432 using the token endpoint and optionally the introspection endpoint. 433 A client obtains an access token from an AS using the token endpoint 434 and subsequently presents the access token to a RS to gain access to 435 a protected resource. In most deployments the RS can process the 436 access token locally, however in some cases the RS may present it to 437 the AS via the introspection endpoint to get fresh information. 438 These interactions are shown in Figure 1. An overview of various 439 OAuth concepts is provided in Section 3.1. 441 The OAuth 2.0 framework defines a number of "protocol flows" via 442 grant types, which have been extended further with extensions to 443 OAuth 2.0 (such as RFC 7521 [RFC7521] and 444 [I-D.ietf-oauth-device-flow]). What grant types works best depends 445 on the usage scenario and RFC 7744 [RFC7744] describes many different 446 IoT use cases but there are two preferred grant types, namely the 447 Authorization Code Grant (described in Section 4.1 of [RFC7521]) and 448 the Client Credentials Grant (described in Section 4.4 of [RFC7521]). 449 The Authorization Code Grant is a good fit for use with apps running 450 on smart phones and tablets that request access to IoT devices, a 451 common scenario in the smart home environment, where users need to go 452 through an authentication and authorization phase (at least during 453 the initial setup phase). The native apps guidelines described in 454 [RFC8252] are applicable to this use case. The Client Credential 455 Grant is a good fit for use with IoT devices where the OAuth client 456 itself is constrained. In such a case, the resource owner has pre- 457 arranged access rights for the client with the authorization server, 458 which is often accomplished using a commissioning tool. 460 The consent of the resource owner, for giving a client access to a 461 protected resource, can be provided dynamically as in the traditional 462 OAuth flows, or it could be pre-configured by the resource owner as 463 authorization policies at the AS, which the AS evaluates when a token 464 request arrives. The resource owner and the requesting party (i.e., 465 client owner) are not shown in Figure 1. 467 This framework supports a wide variety of communication security 468 mechanisms between the ACE entities, such as client, AS, and RS. It 469 is assumed that the client has been registered (also called enrolled 470 or onboarded) to an AS using a mechanism defined outside the scope of 471 this document. In practice, various techniques for onboarding have 472 been used, such as factory-based provisioning or the use of 473 commissioning tools. Regardless of the onboarding technique, this 474 provisioning procedure implies that the client and the AS exchange 475 credentials and configuration parameters. These credentials are used 476 to mutually authenticate each other and to protect messages exchanged 477 between the client and the AS. 479 It is also assumed that the RS has been registered with the AS, 480 potentially in a similar way as the client has been registered with 481 the AS. Established keying material between the AS and the RS allows 482 the AS to apply cryptographic protection to the access token to 483 ensure that its content cannot be modified, and if needed, that the 484 content is confidentiality protected. 486 The keying material necessary for establishing communication security 487 between C and RS is dynamically established as part of the protocol 488 described in this document. 490 At the start of the protocol, there is an optional discovery step 491 where the client discovers the resource server and the resources this 492 server hosts. In this step, the client might also determine what 493 permissions are needed to access the protected resource. A generic 494 procedure is described in Section 5.1, profiles MAY define other 495 procedures for discovery. 497 In Bluetooth Low Energy, for example, advertisements are broadcasted 498 by a peripheral, including information about the primary services. 499 In CoAP, as a second example, a client can make a request to "/.well- 500 known/core" to obtain information about available resources, which 501 are returned in a standardized format as described in [RFC6690]. 503 +--------+ +---------------+ 504 | |---(A)-- Token Request ------->| | 505 | | | Authorization | 506 | |<--(B)-- Access Token ---------| Server | 507 | | + RS Information | | 508 | | +---------------+ 509 | | ^ | 510 | | Introspection Request (D)| | 511 | Client | (optional) | | 512 | | Response | |(E) 513 | | (optional) | v 514 | | +--------------+ 515 | |---(C)-- Token + Request ----->| | 516 | | | Resource | 517 | |<--(F)-- Protected Resource ---| Server | 518 | | | | 519 +--------+ +--------------+ 521 Figure 1: Basic Protocol Flow. 523 Requesting an Access Token (A): 524 The client makes an access token request to the token endpoint at 525 the AS. This framework assumes the use of PoP access tokens (see 526 Section 3.1 for a short description) wherein the AS binds a key to 527 an access token. The client may include permissions it seeks to 528 obtain, and information about the credentials it wants to use 529 (e.g., symmetric/asymmetric cryptography or a reference to a 530 specific credential). 532 Access Token Response (B): 533 If the AS successfully processes the request from the client, it 534 returns an access token. It can also return additional 535 parameters, referred to as "RS Information". In addition to the 536 response parameters defined by OAuth 2.0 and the PoP access token 537 extension, this framework defines parameters that can be used to 538 inform the client about capabilities of the RS. More information 539 about these parameters can be found in Section 5.6.4. 541 Resource Request (C): 542 The client interacts with the RS to request access to the 543 protected resource and provides the access token. The protocol to 544 use between the client and the RS is not restricted to CoAP. 545 HTTP, HTTP/2, QUIC, MQTT, Bluetooth Low Energy, etc., are also 546 viable candidates. 548 Depending on the device limitations and the selected protocol, 549 this exchange may be split up into two parts: 551 (1) the client sends the access token containing, or 552 referencing, the authorization information to the RS, that may 553 be used for subsequent resource requests by the client, and 554 (2) the client makes the resource access request, using the 555 communication security protocol and other RS Information 556 obtained from the AS. 558 The Client and the RS mutually authenticate using the security 559 protocol specified in the profile (see step B) and the keys 560 obtained in the access token or the RS Information. The RS 561 verifies that the token is integrity protected by the AS and 562 compares the claims contained in the access token with the 563 resource request. If the RS is online, validation can be handed 564 over to the AS using token introspection (see messages D and E) 565 over HTTP or CoAP. 567 Token Introspection Request (D): 569 A resource server may be configured to introspect the access token 570 by including it in a request to the introspection endpoint at that 571 AS. Token introspection over CoAP is defined in Section 5.7 and 572 for HTTP in [RFC7662]. 574 Note that token introspection is an optional step and can be 575 omitted if the token is self-contained and the resource server is 576 prepared to perform the token validation on its own. 578 Token Introspection Response (E): 579 The AS validates the token and returns the most recent parameters, 580 such as scope, audience, validity etc. associated with it back to 581 the RS. The RS then uses the received parameters to process the 582 request to either accept or to deny it. 584 Protected Resource (F): 585 If the request from the client is authorized, the RS fulfills the 586 request and returns a response with the appropriate response code. 587 The RS uses the dynamically established keys to protect the 588 response, according to used communication security protocol. 590 5. Framework 592 The following sections detail the profiling and extensions of OAuth 593 2.0 for constrained environments, which constitutes the ACE 594 framework. 596 Credential Provisioning 597 For IoT, it cannot be assumed that the client and RS are part of a 598 common key infrastructure, so the AS provisions credentials or 599 associated information to allow mutual authentication. These 600 credentials need to be provided to the parties before or during 601 the authentication protocol is executed, and may be re-used for 602 subsequent token requests. 604 Proof-of-Possession 605 The ACE framework, by default, implements proof-of-possession for 606 access tokens, i.e., that the token holder can prove being a 607 holder of the key bound to the token. The binding is provided by 608 the "cnf" claim [I-D.ietf-ace-cwt-proof-of-possession] indicating 609 what key is used for proof-of-possession. If a client needs to 610 submit a new access token e.g., to obtain additional access 611 rights, they can request that the AS binds this token to the same 612 key as the previous one. 614 ACE Profiles 615 The client or RS may be limited in the encodings or protocols it 616 supports. To support a variety of different deployment settings, 617 specific interactions between client and RS are defined in an ACE 618 profile. In ACE framework the AS is expected to manage the 619 matching of compatible profile choices between a client and an RS. 620 The AS informs the client of the selected profile using the 621 "profile" parameter in the token response. 623 OAuth 2.0 requires the use of TLS both to protect the communication 624 between AS and client when requesting an access token; between client 625 and RS when accessing a resource and between AS and RS if 626 introspection is used. In constrained settings TLS is not always 627 feasible, or desirable. Nevertheless it is REQUIRED that the data 628 exchanged with the AS is encrypted and integrity protected. It is 629 furthermore REQUIRED that the AS and the endpoint communicating with 630 it (client or RS) perform mutual authentication. 632 Profiles MUST specify how mutual authentication is done, depending 633 e.g. on the communication protocol and the credentials used by the 634 client or the RS. 636 In OAuth 2.0 the communication with the Token and the Introspection 637 endpoints at the AS is assumed to be via HTTP and may use Uri-query 638 parameters. This framework RECOMMENDS to use CoAP instead and 639 RECOMMENDS the use of the following alternative instead of Uri-query 640 parameters: The sender (client or RS) encodes the parameters of its 641 request as a CBOR map and submits that map as the payload of the POST 642 request. The Content-format depends on the security applied to the 643 content and MUST be specified by the profile that is used. 645 The OAuth 2.0 AS uses a JSON structure in the payload of its 646 responses both to client and RS. This framework REQUIRES the use of 647 CBOR [RFC7049] instead. Depending on the profile, the CBOR payload 648 MAY be enclosed in a non-CBOR cryptographic wrapper. 650 5.1. Discovering Authorization Servers 652 In order to determine the AS in charge of a resource hosted at the 653 RS, C MAY send an initial Unauthorized Resource Request message to 654 RS. RS then denies the request and sends the address of its AS back 655 to C. 657 Instead of the initial Unauthorized Resource Request message, C MAY 658 look up the desired resource in a resource directory (cf. 659 [I-D.ietf-core-resource-directory]). 661 5.1.1. Unauthorized Resource Request Message 663 The optional Unauthorized Resource Request message is a request for a 664 resource hosted by RS for which no proper authorization is granted. 665 RS MUST treat any request for a protected resource as Unauthorized 666 Resource Request message when any of the following holds: 668 o The request has been received on an unprotected channel. 669 o RS has no valid access token for the sender of the request 670 regarding the requested action on that resource. 671 o RS has a valid access token for the sender of the request, but 672 this does not allow the requested action on the requested 673 resource. 675 Note: These conditions ensure that RS can handle requests 676 autonomously once access was granted and a secure channel has been 677 established between C and RS. The authz-info endpoint MUST NOT be 678 protected as specified above, in order to allow clients to upload 679 access tokens to RS (cf. Section 5.8.1). 681 Unauthorized Resource Request messages MUST be denied with a client 682 error response. In this response, the Resource Server SHOULD provide 683 proper AS Information to enable the Client to request an access token 684 from RS's AS as described in Section 5.1.2. 686 The response code MUST be 4.01 (Unauthorized) in case the sender of 687 the Unauthorized Resource Request message is not authenticated, or if 688 RS has no valid access token for C. If RS has an access token for C 689 but not for the resource that C has requested, RS MUST reject the 690 request with a 4.03 (Forbidden). If RS has an access token for C but 691 it does not cover the action C requested on the resource, RS MUST 692 reject the request with a 4.05 (Method Not Allowed). 694 Note: The use of the response codes 4.03 and 4.05 is intended to 695 prevent infinite loops where a dumb Client optimistically tries to 696 access a requested resource with any access token received from AS. 697 As malicious clients could pretend to be C to determine C's 698 privileges, these detailed response codes must be used only when a 699 certain level of security is already available which can be achieved 700 only when the Client is authenticated. 702 5.1.2. AS Information 704 The AS Information is sent by RS as a response to an Unauthorized 705 Resource Request message (see Section 5.1.1) to point the sender of 706 the Unauthorized Resource Request message to RS's AS. The AS 707 information is a set of attributes containing an absolute URI (see 708 Section 4.3 of [RFC3986]) that specifies the AS in charge of RS. 710 The message MAY also contain a nonce generated by RS to ensure 711 freshness in case that the RS and AS do not have synchronized clocks. 713 Figure 2 summarizes the parameters that may be part of the AS 714 Information. 716 /-------+----------+-------------\ 717 | Name | CBOR Key | Value Type | 718 |-------+----------+-------------| 719 | AS | 0 | text string | 720 | nonce | 5 | byte string | 721 \-------+----------+-------------/ 723 Figure 2: AS Information parameters 725 Figure 3 shows an example for an AS Information message payload using 726 CBOR [RFC7049] diagnostic notation, using the parameter names instead 727 of the CBOR keys for better human readability. 729 4.01 Unauthorized 730 Content-Format: application/ace+cbor 731 {AS: "coaps://as.example.com/token", 732 nonce: h'e0a156bb3f'} 734 Figure 3: AS Information payload example 736 In this example, the attribute AS points the receiver of this message 737 to the URI "coaps://as.example.com/token" to request access 738 permissions. The originator of the AS Information payload (i.e., RS) 739 uses a local clock that is loosely synchronized with a time scale 740 common between RS and AS (e.g., wall clock time). Therefore, it has 741 included a parameter "nonce" for replay attack prevention. 743 Note: There is an ongoing discussion how freshness of access 744 tokens 745 can be achieved in constrained environments. This specification 746 for now assumes that RS and AS do not have a common understanding 747 of time that allows RS to achieve its security objectives without 748 explicitly adding a nonce. 750 Figure 4 illustrates the mandatory to use binary encoding of the 751 message payload shown in Figure 3. 753 a2 # map(2) 754 00 # unsigned(0) (=AS) 755 78 1c # text(28) 756 636f6170733a2f2f61732e657861 757 6d706c652e636f6d2f746f6b656e # "coaps://as.example.com/token" 758 05 # unsigned(5) (=nonce) 759 45 # bytes(5) 760 e0a156bb3f 762 Figure 4: AS Information example encoded in CBOR 764 5.2. Authorization Grants 766 To request an access token, the client obtains authorization from the 767 resource owner or uses its client credentials as grant. The 768 authorization is expressed in the form of an authorization grant. 770 The OAuth framework defines four grant types. The grant types can be 771 split up into two groups, those granted on behalf of the resource 772 owner (password, authorization code, implicit) and those for the 773 client (client credentials). 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. 849 Profiles of this framework MUST specify how the AS authenticates the 850 client and how the communication between client and AS is protected. 852 The default name of this endpoint in an url-path is 'token', however 853 implementations are not required to use this name and can define 854 their own instead. 856 The figures of this section use CBOR diagnostic notation without the 857 integer abbreviations for the parameters or their values for 858 illustrative purposes. Note that implementations MUST use the 859 integer abbreviations and the binary CBOR encoding, if the CBOR 860 encoding is used. 862 5.6.1. Client-to-AS Request 864 The client sends a POST request to the token endpoint at the AS. The 865 profile MUST specify the Content-Type and wrapping of the payload. 866 The content of the request consists of the parameters specified in 867 Section 4 of the OAuth 2.0 specification [RFC6749]. 869 If CBOR is used then this parameter is encoded as a CBOR map, where 870 the "scope" parameter can additionally be formatted as a byte array, 871 in order to allow compact encoding of complex scope structures. 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, this framework defines the following 879 parameters for requesting an access token from a token endpoint: 881 aud: 882 OPTIONAL. Specifies the audience for which the client is 883 requesting an access token. If this parameter is missing, it is 884 assumed that the client and the AS have a pre-established 885 understanding of the audience that an access token should address. 886 If a client submits a request for an access token without 887 specifying an "aud" parameter, and the AS does not have an 888 implicit understanding of the "aud" value for this client, then 889 the AS MUST respond with an error message using a response code 890 equivalent to the CoAP response code 4.00 (Bad Request). 892 cnf: 893 OPTIONAL. This field contains information about the key the 894 client would like to bind to the access token for proof-of- 895 possession. It is RECOMMENDED that an AS reject a request 896 containing a symmetric key value in the 'cnf' field, since the AS 897 is expected to be able to generate better symmetric keys than a 898 potentially constrained client. See Section 5.6.4.5 for more 899 details on the formatting of the 'cnf' parameter. 901 The following examples illustrate different types of requests for 902 proof-of-possession tokens. 904 Figure 5 shows a request for a token with a symmetric proof-of- 905 possession key. Note that in this example it is assumed that 906 transport layer communication security is used with a CBOR payload, 907 therefore the Content-Type is "application/cbor". The content is 908 displayed in CBOR diagnostic notation, without abbreviations for 909 better readability. 911 Header: POST (Code=0.02) 912 Uri-Host: "as.example.com" 913 Uri-Path: "token" 914 Content-Type: "application/cbor" 915 Payload: 916 { 917 "grant_type" : "client_credentials", 918 "client_id" : "myclient", 919 "aud" : "tempSensor4711" 920 } 922 Figure 5: Example request for an access token bound to a symmetric 923 key. 925 Figure 6 shows a request for a token with an asymmetric proof-of- 926 possession key. Note that in this example COSE is used to provide 927 object-security, therefore the Content-Type is "application/cose". 929 Header: POST (Code=0.02) 930 Uri-Host: "as.example.com" 931 Uri-Path: "token" 932 Content-Type: "application/cose" 933 Payload: 934 16( # COSE_ENCRYPTED 935 [ h'a1010a', # protected header: {"alg" : "AES-CCM-16-64-128"} 936 {5 : b64'ifUvZaHFgJM7UmGnjA'}, # unprotected header, IV 937 b64'WXThuZo6TMCaZZqi6ef/8WHTjOdGk8kNzaIhIQ' # ciphertext 938 ] 939 ) 941 Decrypted payload: 942 { 943 "grant_type" : "client_credentials", 944 "client_id" : "myclient", 945 "cnf" : { 946 "COSE_Key" : { 947 "kty" : "EC", 948 "kid" : h'11', 949 "crv" : "P-256", 950 "x" : b64'usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8', 951 "y" : b64'IBOL+C3BttVivg+lSreASjpkttcsz+1rb7btKLv8EX4' 952 } 953 } 954 } 956 Figure 6: Example token request bound to an asymmetric key. 958 Figure 7 shows a request for a token where a previously communicated 959 proof-of-possession key is only referenced. Note that a transport 960 layer based communication security profile with a CBOR payload is 961 assumed in this example, therefore the Content-Type is "application/ 962 cbor". Also note that the client performs a password based 963 authentication in this example by submitting its client_secret (see 964 Section 2.3.1 of [RFC6749]). 966 Header: POST (Code=0.02) 967 Uri-Host: "as.example.com" 968 Uri-Path: "token" 969 Content-Type: "application/cbor" 970 Payload: 971 { 972 "grant_type" : "client_credentials", 973 "client_id" : "myclient", 974 "client_secret" : "mysecret234", 975 "aud" : "valve424", 976 "scope" : "read", 977 "cnf" : { 978 "kid" : b64'6kg0dXJM13U' 979 } 980 } 982 Figure 7: Example request for an access token bound to a key 983 reference. 985 5.6.2. AS-to-Client Response 987 If the access token request has been successfully verified by the AS 988 and the client is authorized to obtain an access token corresponding 989 to its access token request, the AS sends a response with the 990 response code equivalent to the CoAP response code 2.01 (Created). 991 If client request was invalid, or not authorized, the AS returns an 992 error response as described in Section 5.6.3. 994 Note that the AS decides which token type and profile to use when 995 issuing a successful response. It is assumed that the AS has prior 996 knowledge of the capabilities of the client and the RS (see 997 Appendix D. This prior knowledge may, for example, be set by the use 998 of a dynamic client registration protocol exchange [RFC7591]. 1000 The content of the successful reply is the RS Information. When 1001 using CBOR payloads, the content MUST be encoded as CBOR map, 1002 containing parameters as specified in Section 5.1 of [RFC6749]. In 1003 addition to these parameters, the following parameters are also part 1004 of a successful response: 1006 profile: 1007 OPTIONAL. This indicates the profile that the client MUST use 1008 towards the RS. See Section 5.6.4.4 for the formatting of this 1009 parameter. 1011 . If this parameter is absent, the AS assumes that the client 1012 implicitly knows which profile to use towards the RS. 1013 cnf: 1015 REQUIRED if the token type is "pop" and a symmetric key is used. 1016 MUST NOT be present otherwise. This field contains the symmetric 1017 proof-of-possession key the client is supposed to use. See 1018 Section 5.6.4.5 for details on the use of this parameter. 1019 rs_cnf: 1020 OPTIONAL if the token type is "pop" and asymmetric keys are used. 1021 MUST NOT be present otherwise. This field contains information 1022 about the public key used by the RS to authenticate. See 1023 Section 5.6.4.5 for details on the use of this parameter. If this 1024 parameter is absent, the AS assumes that the client already knows 1025 the public key of the RS. 1026 token_type: 1027 OPTIONAL. By default implementations of this framework SHOULD 1028 assume that the token_type is "pop". If a specific use case 1029 requires another token_type (e.g., "Bearer") to be used then this 1030 parameter is REQUIRED. 1032 Note that if CBOR Web Tokens [I-D.ietf-ace-cbor-web-token] are used, 1033 the access token can also contain a "cnf" claim 1034 [I-D.ietf-ace-cwt-proof-of-possession]. This claim is however 1035 consumed by a different party. The access token is created by the AS 1036 and processed by the RS (and opaque to the client) whereas the RS 1037 Information is created by the AS and processed by the client; it is 1038 never forwarded to the resource server. 1040 Figure 8 summarizes the parameters that may be part of the RS 1041 Information. 1043 /-------------------+-----------------\ 1044 | Parameter name | Specified in | 1045 |-------------------+-----------------| 1046 | access_token | RFC 6749 | 1047 | token_type | RFC 6749 | 1048 | expires_in | RFC 6749 | 1049 | refresh_token | RFC 6749 | 1050 | scope | RFC 6749 | 1051 | state | RFC 6749 | 1052 | error | RFC 6749 | 1053 | error_description | RFC 6749 | 1054 | error_uri | RFC 6749 | 1055 | profile | [this document] | 1056 | cnf | [this document] | 1057 | rs_cnf | [this document] | 1058 \-------------------+-----------------/ 1060 Figure 8: RS Information parameters 1062 Figure 9 shows a response containing a token and a "cnf" parameter 1063 with a symmetric proof-of-possession key. Note that transport layer 1064 security with CBOR encoding is assumed in this example, therefore the 1065 Content-Type is "application/cbor". 1067 Header: Created (Code=2.01) 1068 Content-Type: "application/cbor" 1069 Payload: 1070 { 1071 "access_token" : b64'SlAV32hkKG ... 1072 (remainder of CWT omitted for brevity; 1073 CWT contains COSE_Key in the "cnf" claim)', 1074 "profile" : "coap_dtls", 1075 "expires_in" : "3600", 1076 "cnf" : { 1077 "COSE_Key" : { 1078 "kty" : "Symmetric", 1079 "kid" : b64'39Gqlw', 1080 "k" : b64'hJtXhkV8FJG+Onbc6mxCcQh' 1081 } 1082 } 1083 } 1085 Figure 9: Example AS response with an access token bound to a 1086 symmetric key. 1088 5.6.3. Error Response 1090 The error responses for CoAP-based interactions with the AS are 1091 equivalent to the ones for HTTP-based interactions as defined in 1092 Section 5.2 of [RFC6749], with the following differences: 1094 o The Content-Type MUST be specified by the communication security 1095 profile used between client and AS. The raw payload before being 1096 processed by the communication security protocol MUST be encoded 1097 as a CBOR map. 1098 o A response code equivalent to the CoAP code 4.00 (Bad Request) 1099 MUST be used for all error responses, except for invalid_client 1100 where a response code equivalent to the CoAP code 4.01 1101 (Unauthorized) MAY be used under the same conditions as specified 1102 in Section 5.2 of [RFC6749]. 1103 o The parameters "error", "error_description" and "error_uri" MUST 1104 be abbreviated using the codes specified in Figure 12, when a CBOR 1105 encoding is used. 1106 o The error code (i.e., value of the "error" parameter) MUST be 1107 abbreviated as specified in Figure 10, when a CBOR encoding is 1108 used. 1110 /------------------------+----------\ 1111 | Name | CBOR Key | 1112 |------------------------+----------| 1113 | invalid_request | 0 | 1114 | invalid_client | 1 | 1115 | invalid_grant | 2 | 1116 | unauthorized_client | 3 | 1117 | unsupported_grant_type | 4 | 1118 | invalid_scope | 5 | 1119 | unsupported_pop_key | 6 | 1120 \------------------------+----------/ 1122 Figure 10: CBOR abbreviations for common error codes 1124 In addition to the error responses defined in OAuth 2.0, the 1125 following behavior MUST be implemented by the AS: If the client 1126 submits an asymmetric key in the token request that the RS cannot 1127 process, the AS MUST reject that request with a response code 1128 equivalent to the CoAP code 4.00 (Bad Request) including the error 1129 code "unsupported_pop_key" defined in Figure 10. 1131 5.6.4. Request and Response Parameters 1133 This section provides more detail about the new parameters that can 1134 be used in access token requests and responses, as well as 1135 abbreviations for more compact encoding of existing parameters and 1136 common parameter values. 1138 5.6.4.1. Audience 1140 This parameter specifies for which audience the client is requesting 1141 a token. The formatting and semantics of these strings are 1142 application specific. 1144 When encoded as a CBOR payload it is represented as a CBOR text 1145 string. 1147 5.6.4.2. Grant Type 1149 The abbreviations in Figure 11 MUST be used in CBOR encodings instead 1150 of the string values defined in [RFC6749], if CBOR payloads are used. 1152 /--------------------+----------+------------------------\ 1153 | Name | CBOR Key | Original Specification | 1154 |--------------------+----------+------------------------| 1155 | password | 0 | RFC6749 | 1156 | authorization_code | 1 | RFC6749 | 1157 | client_credentials | 2 | RFC6749 | 1158 | refresh_token | 3 | RFC6749 | 1159 \--------------------+----------+------------------------/ 1161 Figure 11: CBOR abbreviations for common grant types 1163 5.6.4.3. Token Type 1165 The token_type parameter is defined in [RFC6749], allowing the AS to 1166 indicate to the client which type of access token it is receiving 1167 (e.g., a bearer token). 1169 This document registers the new value "pop" for the OAuth Access 1170 Token Types registry, specifying a Proof-of-Possession token. How 1171 the proof-of-possession is performed MUST be specified by the 1172 profiles. 1174 The values in the "token_type" parameter MUST be CBOR text strings, 1175 if a CBOR encoding is used. 1177 In this framework token type "pop" MUST be assumed by default if the 1178 AS does not provide a different value. 1180 5.6.4.4. Profile 1182 Profiles of this framework MUST define the communication protocol and 1183 the communication security protocol between the client and the RS. 1184 The security protocol MUST provide encryption, integrity and replay 1185 protection. Furthermore profiles MUST define proof-of-possession 1186 methods, if they support proof-of-possession tokens. 1188 A profile MUST specify an identifier that can be used to uniquely 1189 identify itself in the "profile" parameter. 1191 Profiles MAY define additional parameters for both the token request 1192 and the RS Information in the access token response in order to 1193 support negotiation or signaling of profile specific parameters. 1195 5.6.4.5. Confirmation 1197 The "cnf" parameter identifies or provides the key used for proof-of- 1198 possession, while the "rs_cnf" parameter provides the raw public key 1199 of the RS. Both parameters use the same formatting and semantics as 1200 the "cnf" claim specified in [I-D.ietf-ace-cwt-proof-of-possession] 1201 when used with a CBOR encoding. When these parameters are used in 1202 JSON then the formatting and semantics of the "cnf" claim specified 1203 in RFC 7800 [RFC7800]. 1205 In addition to the use as a claim in a CWT, the "cnf" parameter is 1206 used in the following contexts with the following meaning: 1208 o In the token request C -> AS, to indicate the client's raw public 1209 key, or the key-identifier of a previously established key between 1210 C and RS. 1211 o In the token response AS -> C, to indicate the symmetric key 1212 generated by the AS for proof-of-possession. 1213 o In the introspection response AS -> RS, to indicate the proof-of- 1214 possession key bound to the introspected token. 1216 Note that the COSE_Key structure in a "cnf" claim or parameter may 1217 contain an "alg" or "key_ops" parameter. If such parameters are 1218 present, a client MUST NOT use a key that is not compatible with the 1219 profile or proof-of-possession algorithm according to those 1220 parameters. An RS MUST reject a proof-of-possession using such a 1221 key. 1223 5.6.5. Mapping Parameters to CBOR 1225 All OAuth parameters in access token requests and responses MUST be 1226 mapped to CBOR types as specified in Figure 12, using the given 1227 integer abbreviation for the key, if a CBOR encoding is used. 1229 Note that we have aligned these abbreviations with the claim 1230 abbreviations defined in [I-D.ietf-ace-cbor-web-token]. 1232 /-------------------+----------+---------------------\ 1233 | Name | CBOR Key | Value Type | 1234 |-------------------+----------+---------------------| 1235 | aud | 3 | text string | 1236 | client_id | 8 | text string | 1237 | client_secret | 9 | byte string | 1238 | response_type | 10 | text string | 1239 | redirect_uri | 11 | text string | 1240 | scope | 12 | text or byte string | 1241 | state | 13 | text string | 1242 | code | 14 | byte string | 1243 | error | 15 | text string | 1244 | error_description | 16 | text string | 1245 | error_uri | 17 | text string | 1246 | grant_type | 18 | unsigned integer | 1247 | access_token | 19 | text string | 1248 | token_type | 20 | unsigned integer | 1249 | expires_in | 21 | unsigned integer | 1250 | username | 22 | text string | 1251 | password | 23 | text string | 1252 | refresh_token | 24 | text string | 1253 | cnf | 25 | map | 1254 | profile | 26 | text string | 1255 | rs_cnf | 31 | map | 1256 \-------------------+----------+---------------------/ 1258 Figure 12: CBOR mappings used in token requests 1260 5.7. The 'Introspect' Endpoint 1262 Token introspection [RFC7662] can be OPTIONALLY provided by the AS, 1263 and is then used by the RS and potentially the client to query the AS 1264 for metadata about a given token e.g., validity or scope. Analogous 1265 to the protocol defined in RFC 7662 [RFC7662] for HTTP and JSON, this 1266 section defines adaptations to more constrained environments using 1267 CBOR and leaving the choice of the application protocol to the 1268 profile. 1270 Communication between the RS and the introspection endpoint at the AS 1271 MUST be integrity protected and encrypted. Furthermore AS and RS 1272 MUST perform mutual authentication. Finally the AS SHOULD verify 1273 that the RS has the right to access introspection information about 1274 the provided token. Profiles of this framework that support 1275 introspection MUST specify how authentication and communication 1276 security between RS and AS is implemented. 1278 The default name of this endpoint in an url-path is 'introspect', 1279 however implementations are not required to use this name and can 1280 define their own instead. 1282 The figures of this section uses CBOR diagnostic notation without the 1283 integer abbreviations for the parameters or their values for better 1284 readability. 1286 Note that supporting introspection is OPTIONAL for implementations of 1287 this framework. 1289 5.7.1. RS-to-AS Request 1291 The RS sends a POST request to the introspection endpoint at the AS, 1292 the profile MUST specify the Content-Type and wrapping of the 1293 payload. The payload MUST be encoded as a CBOR map with a "token" 1294 parameter containing either the access token or a reference to the 1295 token (e.g., the cti). Further optional parameters representing 1296 additional context that is known by the RS to aid the AS in its 1297 response MAY be included. 1299 The same parameters are required and optional as in Section 2.1 of 1300 RFC 7662 [RFC7662]. 1302 For example, Figure 13 shows a RS calling the token introspection 1303 endpoint at the AS to query about an OAuth 2.0 proof-of-possession 1304 token. Note that object security based on COSE is assumed in this 1305 example, therefore the Content-Type is "application/cose+cbor". 1307 Header: POST (Code=0.02) 1308 Uri-Host: "as.example.com" 1309 Uri-Path: "introspect" 1310 Content-Type: "application/cose+cbor" 1311 Payload: 1312 { 1313 "token" : b64'7gj0dXJQ43U', 1314 "token_type_hint" : "pop" 1315 } 1317 Figure 13: Example introspection request. 1319 5.7.2. AS-to-RS Response 1321 If the introspection request is authorized and successfully 1322 processed, the AS sends a response with the response code equivalent 1323 to the CoAP code 2.01 (Created). If the introspection request was 1324 invalid, not authorized or couldn't be processed the AS returns an 1325 error response as described in Section 5.7.3. 1327 In a successful response, the AS encodes the response parameters in a 1328 CBOR map including with the same required and optional parameters as 1329 in Section 2.2. of RFC 7662 [RFC7662] with the following additions: 1331 cnf OPTIONAL. This field contains information about the proof-of- 1332 possession key that binds the client to the access token. See 1333 Section 5.6.4.5 for more details on the use of the "cnf" 1334 parameter. 1335 profile OPTIONAL. This indicates the profile that the RS MUST use 1336 with the client. See Section 5.6.4.4 for more details on the 1337 formatting of this parameter. 1339 For example, Figure 14 shows an AS response to the introspection 1340 request in Figure 13. Note that transport layer security is assumed 1341 in this example, therefore the Content-Type is "application/cbor". 1343 Header: Created Code=2.01) 1344 Content-Type: "application/cbor" 1345 Payload: 1346 { 1347 "active" : true, 1348 "scope" : "read", 1349 "profile" : "coap_dtls", 1350 "cnf" : { 1351 "COSE_Key" : { 1352 "kty" : "Symmetric", 1353 "kid" : b64'39Gqlw', 1354 "k" : b64'hJtXhkV8FJG+Onbc6mxCcQh' 1355 } 1356 } 1357 } 1359 Figure 14: Example introspection response. 1361 5.7.3. Error Response 1363 The error responses for CoAP-based interactions with the AS are 1364 equivalent to the ones for HTTP-based interactions as defined in 1365 Section 2.3 of [RFC7662], with the following differences: 1367 o If content is sent, the Content-Type MUST be set according to the 1368 specification of the communication security profile, and the 1369 content payload MUST be encoded as a CBOR map. 1370 o If the credentials used by the RS are invalid the AS MUST respond 1371 with the response code equivalent to the CoAP code 4.01 1372 (Unauthorized) and use the required and optional parameters from 1373 Section 5.2 in RFC 6749 [RFC6749]. 1375 o If the RS does not have the right to perform this introspection 1376 request, the AS MUST respond with a response code equivalent to 1377 the CoAP code 4.03 (Forbidden). In this case no payload is 1378 returned. 1379 o The parameters "error", "error_description" and "error_uri" MUST 1380 be abbreviated using the codes specified in Figure 12. 1381 o The error codes MUST be abbreviated using the codes specified in 1382 Figure 10. 1384 Note that a properly formed and authorized query for an inactive or 1385 otherwise invalid token does not warrant an error response by this 1386 specification. In these cases, the authorization server MUST instead 1387 respond with an introspection response with the "active" field set to 1388 "false". 1390 5.7.4. Mapping Introspection parameters to CBOR 1392 The introspection request and response parameters MUST be mapped to 1393 CBOR types as specified in Figure 15, using the given integer 1394 abbreviation for the key. 1396 Note that we have aligned these abbreviations with the claim 1397 abbreviations defined in [I-D.ietf-ace-cbor-web-token]. 1399 /-----------------+----------+-----------------------\ 1400 | Parameter name | CBOR Key | Value Type | 1401 |-----------------+----------+-----------------------| 1402 | iss | 1 | text string | 1403 | sub | 2 | text string | 1404 | aud | 3 | text string | 1405 | exp | 4 | Epoch-based date/time | 1406 | nbf | 5 | Epoch-based date/time | 1407 | iat | 6 | Epoch-based date/time | 1408 | cti | 7 | byte string | 1409 | client_id | 8 | text string | 1410 | scope | 12 | text OR byte string | 1411 | token_type | 20 | text string | 1412 | username | 22 | text string | 1413 | cnf | 25 | map | 1414 | profile | 26 | unsigned integer | 1415 | token | 27 | text string | 1416 | token_type_hint | 28 | text string | 1417 | active | 29 | unsigned integer | 1418 | client_token | 30 | byte string | 1419 | rs_cnf | 31 | map | 1420 \-----------------+----------+-----------------------/ 1422 Figure 15: CBOR Mappings to Token Introspection Parameters. 1424 5.8. The Access Token 1426 This framework RECOMMENDS the use of CBOR web token (CWT) as 1427 specified in [I-D.ietf-ace-cbor-web-token]. 1429 In order to facilitate offline processing of access tokens, this 1430 draft uses the "cnf" claim from 1431 [I-D.ietf-ace-cwt-proof-of-possession] and specifies the "scope" 1432 claim for both JSON and CBOR web tokens. 1434 The "scope" claim explicitly encodes the scope of a given access 1435 token. This claim follows the same encoding rules as defined in 1436 Section 3.3 of [RFC6749], but in addition implementers MAY use byte 1437 arrays as scope values, to achieve compact encoding of large scope 1438 elements. The meaning of a specific scope value is application 1439 specific and expected to be known to the RS running that application. 1441 5.8.1. The 'Authorization Information' Endpoint 1443 The access token, containing authorization information and 1444 information about the key used by the client, needs to be transported 1445 to the RS so that the RS can authenticate and authorize the client 1446 request. 1448 This section defines a method for transporting the access token to 1449 the RS using a RESTful protocol such as CoAP. Profiles of this 1450 framework MAY define other methods for token transport. 1452 The method consists of an authz-info endpoint, implemented by the RS. 1453 A client using this method MUST make a POST request to the authz-info 1454 endpoint at the RS with the access token in the payload. The RS 1455 receiving the token MUST verify the validity of the token. If the 1456 token is valid, the RS MUST respond to the POST request with 2.01 1457 (Created). This response MAY contain an identifier of the token 1458 (e.g., the cti for a CWT) as a payload, in order to allow the client 1459 to refer to the token. 1461 The RS MUST be prepared to store at least one access token for future 1462 use. This is a difference to how access tokens are handled in OAuth 1463 2.0, where the access token is typically sent along with each 1464 request, and therefore not stored at the RS. 1466 If the token is not valid, the RS MUST respond with a response code 1467 equivalent to the CoAP code 4.01 (Unauthorized). If the token is 1468 valid but the audience of the token does not match the RS, the RS 1469 MUST respond with a response code equivalent to the CoAP code 4.03 1470 (Forbidden). If the token is valid but is associated to claims that 1471 the RS cannot process (e.g., an unknown scope) the RS MUST respond 1472 with a response code equivalent to the CoAP code 4.00 (Bad Request). 1473 In the latter case the RS MAY provide additional information in the 1474 error response, in order to clarify what went wrong. 1476 The RS MAY make an introspection request to validate the token before 1477 responding to the POST request to the authz-info endpoint. 1479 Profiles MUST specify how the authz-info endpoint is protected. Note 1480 that since the token contains information that allow the client and 1481 the RS to establish a security context in the first place, mutual 1482 authentication may not be possible at this point. 1484 The default name of this endpoint in an url-path is 'authz-info', 1485 however implementations are not required to use this name and can 1486 define their own instead. 1488 5.8.2. Token Expiration 1490 Depending on the capabilities of the RS, there are various ways in 1491 which it can verify the validity of a received access token. Here 1492 follows a list of the possibilities including what functionality they 1493 require of the RS. 1495 o The token is a CWT and includes an "exp" claim and possibly the 1496 "nbf" claim. The RS verifies these by comparing them to values 1497 from its internal clock as defined in [RFC7519]. In this case the 1498 RS's internal clock must reflect the current date and time, or at 1499 least be synchronized with the AS's clock. How this clock 1500 synchronization would be performed is out of scope for this 1501 specification. 1502 o The RS verifies the validity of the token by performing an 1503 introspection request as specified in Section 5.7. This requires 1504 the RS to have a reliable network connection to the AS and to be 1505 able to handle two secure sessions in parallel (C to RS and AS to 1506 RS). 1507 o The RS and the AS both store a sequence number linked to their 1508 common security association. The AS increments this number for 1509 each access token it issues and includes it in the access token, 1510 which is a CWT. The RS keeps track of the most recently received 1511 sequence number, and only accepts tokens as valid, that are in a 1512 certain range around this number. This method does only require 1513 the RS to keep track of the sequence number. The method does not 1514 provide timely expiration, but it makes sure that older tokens 1515 cease to be valid after a certain number of newer ones got issued. 1516 For a constrained RS with no network connectivity and no means of 1517 reliably measuring time, this is the best that can be achieved. 1519 If a token that authorizes a long running request such as a CoAP 1520 Observe [RFC7641] expires, the RS MUST send an error response with 1521 the response code 4.01 Unauthorized to the client and then terminate 1522 processing the long running request. 1524 6. Security Considerations 1526 Security considerations applicable to authentication and 1527 authorization in RESTful environments provided in OAuth 2.0 [RFC6749] 1528 apply to this work, as well as the security considerations from 1529 [I-D.ietf-ace-actors]. Furthermore [RFC6819] provides additional 1530 security considerations for OAuth which apply to IoT deployments as 1531 well. 1533 A large range of threats can be mitigated by protecting the contents 1534 of the access token by using a digital signature or a keyed message 1535 digest (MAC) or an Authenticated Encryption with Associated Data 1536 (AEAD) algorithm. Consequently, the token integrity protection MUST 1537 be applied to prevent the token from being modified, particularly 1538 since it contains a reference to the symmetric key or the asymmetric 1539 key. If the access token contains the symmetric key, this symmetric 1540 key MUST be encrypted by the authorization server so that only the 1541 resource server can decrypt it. Note that using an AEAD algorithm is 1542 preferable over using a MAC unless the message needs to be publicly 1543 readable. 1545 It is important for the authorization server to include the identity 1546 of the intended recipient (the audience), typically a single resource 1547 server (or a list of resource servers), in the token. Using a single 1548 shared secret with multiple resource servers to simplify key 1549 management is NOT RECOMMENDED since the benefit from using the proof- 1550 of-possession concept is significantly reduced. 1552 The authorization server MUST offer confidentiality protection for 1553 any interactions with the client. This step is extremely important 1554 since the client may obtain the proof-of-possession key from the 1555 authorization server for use with a specific access token. Not using 1556 confidentiality protection exposes this secret (and the access token) 1557 to an eavesdropper thereby completely negating proof-of-possession 1558 security. Profiles MUST specify how confidentiality protection is 1559 provided, and additional protection can be applied by encrypting the 1560 token, for example encryption of CWTs is specified in Section 5.1 of 1561 [I-D.ietf-ace-cbor-web-token]. 1563 Developers MUST ensure that the ephemeral credentials (i.e., the 1564 private key or the session key) are not leaked to third parties. An 1565 adversary in possession of the ephemeral credentials bound to the 1566 access token will be able to impersonate the client. Be aware that 1567 this is a real risk with many constrained environments, since 1568 adversaries can often easily get physical access to the devices. 1570 Clients can at any time request a new proof-of-possession capable 1571 access token. If clients have that capability, the AS can keep the 1572 lifetime of the access token and the associated proof-of-possession 1573 key short and therefore use shorter proof-of-possession key sizes, 1574 which translate to a performance benefit for the client and for the 1575 resource server. Shorter keys also lead to shorter messages 1576 (particularly with asymmetric keying material). 1578 When authorization servers bind symmetric keys to access tokens, they 1579 SHOULD scope these access tokens to a specific permissions. 1580 Furthermore access tokens using symmetric keys for proof-of- 1581 possession SHOULD NOT be targeted at an audience that contains more 1582 than one RS, since otherwise any RS in the audience that receives 1583 that access token can impersonate the client towards the other 1584 members of the audience. 1586 6.1. Unprotected AS Information 1588 Initially, no secure channel exists to protect the communication 1589 between C and RS. Thus, C cannot determine if the AS information 1590 contained in an unprotected response from RS to an unauthorized 1591 request (c.f. Section 5.1.2) is authentic. It is therefore 1592 advisable to provide C with a (possibly hard-coded) list of 1593 trustworthy authorization servers. AS information responses 1594 referring to a URI not listed there would be ignored. 1596 6.2. Use of Nonces for Replay Protection 1598 RS may add a nonce to the AS Information message sent as a response 1599 to an unauthorized request to ensure freshness of an Access Token 1600 subsequently presented to RS. While a timestamp of some granularity 1601 would be sufficient to protect against replay attacks, using 1602 randomized nonce is preferred to prevent disclosure of information 1603 about RS's internal clock characteristics. 1605 6.3. Combining profiles 1607 There may exist reasonable use cases where implementers want to 1608 combine different profiles of this framework, e.g., using an MQTT 1609 profile between client and RS, while using a DTLS profile for 1610 interactions between client and AS. Profiles should be designed in a 1611 way that the security of a protocol interaction does not depend on 1612 the specific security mechanisms used in other protocol interactions. 1614 6.4. Error responses 1616 The various error responses defined in this framework may leak 1617 information to an adversary. For example errors responses for 1618 requests to the Authorization Information endpoint can reveal 1619 information about an otherwise opaque access token to an adversary 1620 who has intercepted this token. This framework is written under the 1621 assumption that, in general, the benefits of detailed error messages 1622 outweigh the risk due to information leakage. For particular use 1623 cases, where this assessment does not apply, detailed error messages 1624 can be replaced by more generic ones. 1626 7. Privacy Considerations 1628 Implementers and users should be aware of the privacy implications of 1629 the different possible deployments of this framework. 1631 The AS is in a very central position and can potentially learn 1632 sensitive information about the clients requesting access tokens. If 1633 the client credentials grant is used, the AS can track what kind of 1634 access the client intends to perform. With other grants this can be 1635 prevented by the Resource Owner. To do so, the resource owner needs 1636 to bind the grants it issues to anonymous, ephemeral credentials that 1637 do not allow the AS to link different grants and thus different 1638 access token requests by the same client. 1640 If access tokens are only integrity protected and not encrypted, they 1641 may reveal information to attackers listening on the wire, or able to 1642 acquire the access tokens in some other way. In the case of CWTs the 1643 token may e.g., reveal the audience, the scope and the confirmation 1644 method used by the client. The latter may reveal the identity of the 1645 device or application running the client. This may be linkable to 1646 the identity of the person using the client (if there is a person and 1647 not a machine-to-machine interaction). 1649 Clients using asymmetric keys for proof-of-possession should be aware 1650 of the consequences of using the same key pair for proof-of- 1651 possession towards different RSs. A set of colluding RSs or an 1652 attacker able to obtain the access tokens will be able to link the 1653 requests, or even to determine the client's identity. 1655 An unprotected response to an unauthorized request (c.f. 1656 Section 5.1.2) may disclose information about RS and/or its existing 1657 relationship with C. It is advisable to include as little 1658 information as possible in an unencrypted response. Means of 1659 encrypting communication between C and RS already exist, more 1660 detailed information may be included with an error response to 1661 provide C with sufficient information to react on that particular 1662 error. 1664 8. IANA Considerations 1666 This specification registers new parameters for OAuth and establishes 1667 registries for mappings to CBOR abbreviations. 1669 8.1. Authorization Server Information 1671 A new registry will be requested from IANA, entitled "Authorization 1672 Server Information". The registry is to be created as Expert Review 1673 Required. 1675 The columns of this table are: 1677 Name The name of the parameter 1678 CBOR Key The unsigned integer value abbreviating this parameter 1679 name. Registration in the table is based on the value of the 1680 mapping requested. Integer values between 1 and 255 are 1681 designated as Standards Track Document required. Integer values 1682 from 256 to 65535 are designated as Specification Required. 1683 Integer values greater than 65535 are designated as private use. 1684 Value Type The CBOR data types allowable for the values of this 1685 parameter. 1686 Reference This contains a pointer to the public specification of the 1687 grant type abbreviation, if one exists. 1689 This registry will be initially populated by the values in Figure 2. 1690 The Reference column for all of these entries will be this document. 1692 8.2. OAuth Error Code CBOR Mappings Registry 1694 A new registry will be requested from IANA, entitled "OAuth Error 1695 Code CBOR Mappings Registry". The registry is to be created as 1696 Expert Review Required. 1698 The columns of this table are: 1700 Name The OAuth Error Code name, refers to the name in Section 5.2. 1701 of [RFC6749] e.g., "invalid_request". 1702 CBOR Key The unsigned integer value abbreviating this error code. 1703 Registration in the table is based on the value of the mapping 1704 requested. Integer values between 1 and 255 are designated as 1705 Standards Track Document required. Integer values from 256 to 1706 65535 are designated as Specification Required. Integer values 1707 greater than 65535 are designated as private use. 1709 Reference This contains a pointer to the public specification of the 1710 grant type abbreviation, if one exists. 1712 This registry will be initially populated by the values in Figure 10. 1713 The Reference column for all of these entries will be this document. 1715 8.3. OAuth Grant Type CBOR Mappings 1717 A new registry will be requested from IANA, entitled "OAuth Grant 1718 Type CBOR Mappings". The registry is to be created as Expert Review 1719 Required. 1721 The columns of this table are: 1723 Name The name of the grant type as specified in Section 1.3 of 1724 [RFC6749]. 1725 CBOR Key The unsigned integer value abbreviating this grant type. 1726 Registration in the table is based on the value of the mapping 1727 requested. Integer values between 1 and 255 are designated as 1728 Standards Track Document required. Integer values from 256 to 1729 65535 are designated as Specification Required. Integer values 1730 greater than 65535 are designated as private use. 1731 Reference This contains a pointer to the public specification of the 1732 grant type abbreviation, if one exists. 1733 Original Specification This contains a pointer to the public 1734 specification of the grant type, if one exists. 1736 This registry will be initially populated by the values in Figure 11. 1737 The Reference column for all of these entries will be this document. 1739 8.4. OAuth Access Token Types 1741 This specification registers the following new token type in the 1742 OAuth Access Token Types Registry 1744 o Name: "PoP" 1745 o Change Controller: IETF 1746 o Reference: [this document] 1748 8.5. OAuth Token Type CBOR Mappings 1750 A new registry will be requested from IANA, entitled "Token Type CBOR 1751 Mappings". The registry is to be created as Expert Review Required. 1753 The columns of this table are: 1755 Name The name of token type as registered in the OAuth Access Token 1756 Types registry e.g., "Bearer". 1758 CBOR Key The unsigned integer value abbreviating this access token 1759 type. Registration in the table is based on the value of the 1760 mapping requested. Integer values between 1 and 255 are 1761 designated as Standards Track Document required. Integer values 1762 from 256 to 65535 are designated as Specification Required. 1763 Integer values greater than 65535 are designated as private use. 1764 Reference This contains a pointer to the public specification of the 1765 OAuth token type abbreviation, if one exists. 1766 Original Specification This contains a pointer to the public 1767 specification of the grant type, if one exists. 1769 8.5.1. Initial Registry Contents 1771 o Name: "Bearer" 1772 o Value: 1 1773 o Reference: [this document] 1774 o Original Specification: [RFC6749] 1776 o Name: "pop" 1777 o Value: 2 1778 o Reference: [this document] 1779 o Original Specification: [this document] 1781 8.6. ACE OAuth Profile Registry 1783 A new registry will be requested from IANA, entitled "ACE Profile 1784 Registry". The registry is to be created as Expert Review Required. 1786 The columns of this table are: 1788 Name The name of the profile, to be used as value of the profile 1789 attribute. 1790 Description Text giving an overview of the profile and the context 1791 it is developed for. 1792 CBOR Key The unsigned integer value abbreviating this profile name. 1793 Registration in the table is based on the value of the mapping 1794 requested. Integer values between 1 and 255 are designated as 1795 Standards Track Document required. Integer values from 256 to 1796 65535 are designated as Specification Required. Integer values 1797 greater than 65535 are designated as private use. 1798 Reference This contains a pointer to the public specification of the 1799 profile abbreviation, if one exists. 1801 8.7. OAuth Parameter Registration 1803 This specification registers the following parameters in the OAuth 1804 Parameters Registry: 1806 o Name: "aud" 1807 o Parameter Usage Location: authorization request, token request 1808 o Change Controller: IESG 1809 o Reference: Section 5.6.1 of [this document] 1811 o Name: "profile" 1812 o Parameter Usage Location: token response 1813 o Change Controller: IESG 1814 o Reference: Section 5.6.4.4 of [this document] 1816 o Name: "cnf" 1817 o Parameter Usage Location: token request, token response 1818 o Change Controller: IESG 1819 o Reference: Section 5.6.4.5 of [this document] 1821 o Name: "rs_cnf" 1822 o Parameter Usage Location: token response 1823 o Change Controller: IESG 1824 o Reference: Section 5.6.4.5 of [this document] 1826 8.8. OAuth CBOR Parameter Mappings Registry 1828 A new registry will be requested from IANA, entitled "Token Endpoint 1829 CBOR Mappings Registry". The registry is to be created as Expert 1830 Review Required. 1832 The columns of this table are: 1834 Name The OAuth Parameter name, refers to the name in the OAuth 1835 parameter registry e.g., "client_id". 1836 CBOR Key The unsigned integer value abbreviating this parameter. 1837 Registration in the table is based on the value of the mapping 1838 requested. Integer values between 1 and 255 are designated as 1839 Standards Track Document required. Integer values from 256 to 1840 65535 are designated as Specification Required. Integer values 1841 greater than 65535 are designated as private use. 1842 Value Type The allowable CBOR data types for values of this 1843 parameter. 1844 Reference This contains a pointer to the public specification of the 1845 grant type abbreviation, if one exists. 1847 This registry will be initially populated by the values in Figure 12. 1848 The Reference column for all of these entries will be this document. 1850 Note that these mappings intentionally coincide with the CWT claim 1851 name mappings from [I-D.ietf-ace-cbor-web-token]. 1853 8.9. OAuth Introspection Response Parameter Registration 1855 This specification registers the following parameters in the OAuth 1856 Token Introspection Response registry. 1858 o Name: "cnf" 1859 o Description: Key to prove the right to use a PoP token. 1860 o Change Controller: IESG 1861 o Reference: Section 5.7.2 of [this document] 1863 o Name: "profile" 1864 o Description: The communication and communication security profile 1865 used between client and RS, as defined in ACE profiles. 1866 o Change Controller: IESG 1867 o Reference: Section 5.7.2 of [this document] 1869 o Name: "client_token" 1870 o Description: Information that the RS MUST pass to the client e.g., 1871 about the proof-of-possession keys. 1872 o Change Controller: IESG 1873 o Reference: Section 5.7.2 of [this document] 1875 8.10. Introspection Endpoint CBOR Mappings Registry 1877 A new registry will be requested from IANA, entitled "Introspection 1878 Endpoint CBOR Mappings Registry". The registry is to be created as 1879 Expert Review Required. 1881 The columns of this table are: 1883 Name The OAuth Parameter name, refers to the name in the OAuth 1884 parameter registry e.g., "client_id". 1885 CBOR Key The unsigned integer value abbreviating this parameter. 1886 Registration in the table is based on the value of the mapping 1887 requested. Integer values between 1 and 255 are designated as 1888 Standards Track Document required. Integer values from 256 to 1889 65535 are designated as Specification Required. Integer values 1890 greater than 65535 are designated as private use. 1891 Value Type The allowable CBOR data types for values of this 1892 parameter. 1893 Reference This contains a pointer to the public specification of the 1894 grant type abbreviation, if one exists. 1896 This registry will be initially populated by the values in Figure 15. 1897 The Reference column for all of these entries will be this document. 1899 8.11. JSON Web Token Claims 1901 This specification registers the following new claims in the JSON Web 1902 Token (JWT) registry of JSON Web Token Claims: 1904 o Claim Name: "scope" 1905 o Claim Description: The scope of an access token as defined in 1906 [RFC6749]. 1907 o Change Controller: IESG 1908 o Reference: Section 5.8 of [this document] 1910 8.12. CBOR Web Token Claims 1912 This specification registers the following new claims in the CBOR Web 1913 Token (CWT) registry of CBOR Web Token Claim:s 1915 o Claim Name: "scope" 1916 o Claim Description: The scope of an access token as defined in 1917 [RFC6749]. 1918 o JWT Claim Name: N/A 1919 o Claim Key: 12 1920 o Claim Value Type(s): 0 (uint), 2 (byte string), 3 (text string) 1921 o Change Controller: IESG 1922 o Specification Document(s): Section 5.8 of [this document] 1924 8.13. CoAP Option Number Registration 1926 This section registers the "Access-Token" CoAP Option Number in the 1927 "CoRE Parameters" sub-registry "CoAP Option Numbers" in the manner 1928 described in [RFC7252]. 1930 o Name: "Access-Token" 1931 o Number: TBD 1932 o Reference: [this document]. 1933 o Meaning in Request: Contains an Access Token according to [this 1934 document] containing access permissions of the client. 1935 o Meaning in Response: Not used in response. 1936 o Safe-to-Forward: Yes 1937 o Format: Based on the observer the format is perceived differently. 1938 Opaque data to the client and CWT or reference token to the RS. 1939 o Length: Less than 255 bytes 1941 9. Acknowledgments 1943 This document is a product of the ACE working group of the IETF. 1945 Thanks to Eve Maler for her contributions to the use of OAuth 2.0 and 1946 UMA in IoT scenarios, Robert Taylor for his discussion input, and 1947 Malisa Vucinic for his input on the predecessors of this proposal. 1949 Thanks to the authors of draft-ietf-oauth-pop-key-distribution, from 1950 where large parts of the security considerations where copied. 1952 Thanks to Stefanie Gerdes, Olaf Bergmann, and Carsten Bormann for 1953 contributing their work on AS discovery from draft-gerdes-ace-dcaf- 1954 authorize (see Section 5.1). 1956 Ludwig Seitz and Goeran Selander worked on this document as part of 1957 the CelticPlus project CyberWI, with funding from Vinnova. 1959 10. References 1961 10.1. Normative References 1963 [I-D.ietf-ace-cbor-web-token] 1964 Jones, M., Wahlstroem, E., Erdtman, S., and H. Tschofenig, 1965 "CBOR Web Token (CWT)", draft-ietf-ace-cbor-web-token-12 1966 (work in progress), February 2018. 1968 [I-D.ietf-ace-cwt-proof-of-possession] 1969 Jones, M., Seitz, L., Selander, G., Wahlstroem, E., 1970 Erdtman, S., and H. Tschofenig, "Proof-of-Possession Key 1971 Semantics for CBOR Web Tokens (CWTs)", draft-ietf-ace-cwt- 1972 proof-of-possession-01 (work in progress), October 2017. 1974 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1975 Requirement Levels", BCP 14, RFC 2119, 1976 DOI 10.17487/RFC2119, March 1997, . 1979 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 1980 Resource Identifier (URI): Generic Syntax", STD 66, 1981 RFC 3986, DOI 10.17487/RFC3986, January 2005, 1982 . 1984 [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer 1985 Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, 1986 January 2012, . 1988 [RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained 1989 Application Protocol (CoAP)", RFC 7252, 1990 DOI 10.17487/RFC7252, June 2014, . 1993 [RFC7662] Richer, J., Ed., "OAuth 2.0 Token Introspection", 1994 RFC 7662, DOI 10.17487/RFC7662, October 2015, 1995 . 1997 [RFC7800] Jones, M., Bradley, J., and H. Tschofenig, "Proof-of- 1998 Possession Key Semantics for JSON Web Tokens (JWTs)", 1999 RFC 7800, DOI 10.17487/RFC7800, April 2016, 2000 . 2002 [RFC8152] Schaad, J., "CBOR Object Signing and Encryption (COSE)", 2003 RFC 8152, DOI 10.17487/RFC8152, July 2017, 2004 . 2006 10.2. Informative References 2008 [I-D.erdtman-ace-rpcc] 2009 Seitz, L. and S. Erdtman, "Raw-Public-Key and Pre-Shared- 2010 Key as OAuth client credentials", draft-erdtman-ace- 2011 rpcc-02 (work in progress), October 2017. 2013 [I-D.ietf-ace-actors] 2014 Gerdes, S., Seitz, L., Selander, G., and C. Bormann, "An 2015 architecture for authorization in constrained 2016 environments", draft-ietf-ace-actors-06 (work in 2017 progress), November 2017. 2019 [I-D.ietf-core-object-security] 2020 Selander, G., Mattsson, J., Palombini, F., and L. Seitz, 2021 "Object Security for Constrained RESTful Environments 2022 (OSCORE)", draft-ietf-core-object-security-08 (work in 2023 progress), January 2018. 2025 [I-D.ietf-core-resource-directory] 2026 Shelby, Z., Koster, M., Bormann, C., Stok, P., and C. 2027 Amsuess, "CoRE Resource Directory", draft-ietf-core- 2028 resource-directory-12 (work in progress), October 2017. 2030 [I-D.ietf-oauth-device-flow] 2031 Denniss, W., Bradley, J., Jones, M., and H. Tschofenig, 2032 "OAuth 2.0 Device Flow for Browserless and Input 2033 Constrained Devices", draft-ietf-oauth-device-flow-07 2034 (work in progress), October 2017. 2036 [I-D.ietf-oauth-discovery] 2037 Jones, M., Sakimura, N., and J. Bradley, "OAuth 2.0 2038 Authorization Server Metadata", draft-ietf-oauth- 2039 discovery-08 (work in progress), November 2017. 2041 [Margi10impact] 2042 Margi, C., de Oliveira, B., de Sousa, G., Simplicio Jr, 2043 M., Barreto, P., Carvalho, T., Naeslund, M., and R. Gold, 2044 "Impact of Operating Systems on Wireless Sensor Networks 2045 (Security) Applications and Testbeds", Proceedings of 2046 the 19th International Conference on Computer 2047 Communications and Networks (ICCCN), 2010 August. 2049 [RFC4949] Shirey, R., "Internet Security Glossary, Version 2", 2050 FYI 36, RFC 4949, DOI 10.17487/RFC4949, August 2007, 2051 . 2053 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 2054 (TLS) Protocol Version 1.2", RFC 5246, 2055 DOI 10.17487/RFC5246, August 2008, . 2058 [RFC6690] Shelby, Z., "Constrained RESTful Environments (CoRE) Link 2059 Format", RFC 6690, DOI 10.17487/RFC6690, August 2012, 2060 . 2062 [RFC6749] Hardt, D., Ed., "The OAuth 2.0 Authorization Framework", 2063 RFC 6749, DOI 10.17487/RFC6749, October 2012, 2064 . 2066 [RFC6819] Lodderstedt, T., Ed., McGloin, M., and P. Hunt, "OAuth 2.0 2067 Threat Model and Security Considerations", RFC 6819, 2068 DOI 10.17487/RFC6819, January 2013, . 2071 [RFC7049] Bormann, C. and P. Hoffman, "Concise Binary Object 2072 Representation (CBOR)", RFC 7049, DOI 10.17487/RFC7049, 2073 October 2013, . 2075 [RFC7159] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data 2076 Interchange Format", RFC 7159, DOI 10.17487/RFC7159, March 2077 2014, . 2079 [RFC7228] Bormann, C., Ersue, M., and A. Keranen, "Terminology for 2080 Constrained-Node Networks", RFC 7228, 2081 DOI 10.17487/RFC7228, May 2014, . 2084 [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 2085 Protocol (HTTP/1.1): Semantics and Content", RFC 7231, 2086 DOI 10.17487/RFC7231, June 2014, . 2089 [RFC7519] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token 2090 (JWT)", RFC 7519, DOI 10.17487/RFC7519, May 2015, 2091 . 2093 [RFC7521] Campbell, B., Mortimore, C., Jones, M., and Y. Goland, 2094 "Assertion Framework for OAuth 2.0 Client Authentication 2095 and Authorization Grants", RFC 7521, DOI 10.17487/RFC7521, 2096 May 2015, . 2098 [RFC7591] Richer, J., Ed., Jones, M., Bradley, J., Machulak, M., and 2099 P. Hunt, "OAuth 2.0 Dynamic Client Registration Protocol", 2100 RFC 7591, DOI 10.17487/RFC7591, July 2015, 2101 . 2103 [RFC7641] Hartke, K., "Observing Resources in the Constrained 2104 Application Protocol (CoAP)", RFC 7641, 2105 DOI 10.17487/RFC7641, September 2015, . 2108 [RFC7744] Seitz, L., Ed., Gerdes, S., Ed., Selander, G., Mani, M., 2109 and S. Kumar, "Use Cases for Authentication and 2110 Authorization in Constrained Environments", RFC 7744, 2111 DOI 10.17487/RFC7744, January 2016, . 2114 [RFC7959] Bormann, C. and Z. Shelby, Ed., "Block-Wise Transfers in 2115 the Constrained Application Protocol (CoAP)", RFC 7959, 2116 DOI 10.17487/RFC7959, August 2016, . 2119 [RFC8252] Denniss, W. and J. Bradley, "OAuth 2.0 for Native Apps", 2120 BCP 212, RFC 8252, DOI 10.17487/RFC8252, October 2017, 2121 . 2123 Appendix A. Design Justification 2125 This section provides further insight into the design decisions of 2126 the solution documented in this document. Section 3 lists several 2127 building blocks and briefly summarizes their importance. The 2128 justification for offering some of those building blocks, as opposed 2129 to using OAuth 2.0 as is, is given below. 2131 Common IoT constraints are: 2133 Low Power Radio: 2135 Many IoT devices are equipped with a small battery which needs to 2136 last for a long time. For many constrained wireless devices, the 2137 highest energy cost is associated to transmitting or receiving 2138 messages (roughly by a factor of 10 compared to e.g. AES) 2139 [Margi10impact]. It is therefore important to keep the total 2140 communication overhead low, including minimizing the number and 2141 size of messages sent and received, which has an impact of choice 2142 on the message format and protocol. By using CoAP over UDP and 2143 CBOR encoded messages, some of these aspects are addressed. 2144 Security protocols contribute to the communication overhead and 2145 can, in some cases, be optimized. For example, authentication and 2146 key establishment may, in certain cases where security 2147 requirements allow, be replaced by provisioning of security 2148 context by a trusted third party, using transport or application 2149 layer security. 2151 Low CPU Speed: 2153 Some IoT devices are equipped with processors that are 2154 significantly slower than those found in most current devices on 2155 the Internet. This typically has implications on what timely 2156 cryptographic operations a device is capable of performing, which 2157 in turn impacts e.g., protocol latency. Symmetric key 2158 cryptography may be used instead of the computationally more 2159 expensive public key cryptography where the security requirements 2160 so allows, but this may also require support for trusted third 2161 party assisted secret key establishment using transport or 2162 application layer security. 2163 Small Amount of Memory: 2165 Microcontrollers embedded in IoT devices are often equipped with 2166 small amount of RAM and flash memory, which places limitations 2167 what kind of processing can be performed and how much code can be 2168 put on those devices. To reduce code size fewer and smaller 2169 protocol implementations can be put on the firmware of such a 2170 device. In this case, CoAP may be used instead of HTTP, symmetric 2171 key cryptography instead of public key cryptography, and CBOR 2172 instead of JSON. Authentication and key establishment protocol, 2173 e.g., the DTLS handshake, in comparison with assisted key 2174 establishment also has an impact on memory and code. 2176 User Interface Limitations: 2178 Protecting access to resources is both an important security as 2179 well as privacy feature. End users and enterprise customers may 2180 not want to give access to the data collected by their IoT device 2181 or to functions it may offer to third parties. Since the 2182 classical approach of requesting permissions from end users via a 2183 rich user interface does not work in many IoT deployment 2184 scenarios, these functions need to be delegated to user-controlled 2185 devices that are better suitable for such tasks, such as smart 2186 phones and tablets. 2188 Communication Constraints: 2190 In certain constrained settings an IoT device may not be able to 2191 communicate with a given device at all times. Devices may be 2192 sleeping, or just disconnected from the Internet because of 2193 general lack of connectivity in the area, for cost reasons, or for 2194 security reasons, e.g., to avoid an entry point for Denial-of- 2195 Service attacks. 2197 The communication interactions this framework builds upon (as 2198 shown graphically in Figure 1) may be accomplished using a variety 2199 of different protocols, and not all parts of the message flow are 2200 used in all applications due to the communication constraints. 2201 Deployments making use of CoAP are expected, but not limited to, 2202 other protocols such as HTTP, HTTP/2 or other specific protocols, 2203 such as Bluetooth Smart communication, that do not necessarily use 2204 IP could also be used. The latter raises the need for application 2205 layer security over the various interfaces. 2207 In the light of these constraints we have made the following design 2208 decisions: 2210 CBOR, COSE, CWT: 2212 This framework REQUIRES the use of CBOR [RFC7049] as data format. 2213 Where CBOR data needs to be protected, the use of COSE [RFC8152] 2214 is RECOMMENDED. Furthermore where self-contained tokens are 2215 needed, this framework RECOMMENDS the use of CWT 2216 [I-D.ietf-ace-cbor-web-token]. These measures aim at reducing the 2217 size of messages sent over the wire, the RAM size of data objects 2218 that need to be kept in memory and the size of libraries that 2219 devices need to support. 2221 CoAP: 2223 This framework RECOMMENDS the use of CoAP [RFC7252] instead of 2224 HTTP. This does not preclude the use of other protocols 2225 specifically aimed at constrained devices, like e.g. Bluetooth 2226 Low energy (see Section 3.2). This aims again at reducing the 2227 size of messages sent over the wire, the RAM size of data objects 2228 that need to be kept in memory and the size of libraries that 2229 devices need to support. 2231 RS Information: 2233 This framework defines the name "RS Information" for data 2234 concerning the RS that the AS returns to the client in an access 2235 token response (see Section 5.6.2). This includes the "profile" 2236 and the "rs_cnf" parameters. This aims at enabling scenarios, 2237 where a powerful client, supporting multiple profiles, needs to 2238 interact with a RS for which it does not know the supported 2239 profiles and the raw public key. 2241 Proof-of-Possession: 2243 This framework makes use of proof-of-possession tokens, using the 2244 "cnf" claim [I-D.ietf-ace-cwt-proof-of-possession]. A 2245 semantically and syntactically identical request and response 2246 parameter is defined for the token endpoint, to allow requesting 2247 and stating confirmation keys. This aims at making token theft 2248 harder. Token theft is specifically relevant in constrained use 2249 cases, as communication often passes through middle-boxes, which 2250 could be able to steal bearer tokens and use them to gain 2251 unauthorized access. 2253 Auth-Info endpoint: 2255 This framework introduces a new way of providing access tokens to 2256 a RS by exposing a authz-info endpoint, to which access tokens can 2257 be POSTed. This aims at reducing the size of the request message 2258 and the code complexity at the RS. The size of the request 2259 message is problematic, since many constrained protocols have 2260 severe message size limitations at the physical layer (e.g. in the 2261 order of 100 bytes). This means that larger packets get 2262 fragmented, which in turn combines badly with the high rate of 2263 packet loss, and the need to retransmit the whole message if one 2264 packet gets lost. Thus separating sending of the request and 2265 sending of the access tokens helps to reduce fragmentation. 2267 Client Credentials Grant: 2269 This framework RECOMMENDS the use of the client credentials grant 2270 for machine-to-machine communication use cases, where manual 2271 intervention of the resource owner to produce a grant token is not 2272 feasible. The intention is that the resource owner would instead 2273 pre-arrange authorization with the AS, based on the client's own 2274 credentials. The client can the (without manual intervention) 2275 obtain access tokens from the AS. 2277 Introspection: 2279 This framework RECOMMENDS the use of access token introspection in 2280 cases where the client is constrained in a way that it can not 2281 easily obtain new access tokens (i.e. it has connectivity issues 2282 that prevent it from communicating with the AS). In that case 2283 this framework RECOMMENDS the use of a long-term token, that could 2284 be a simple reference. The RS is assumed to be able to 2285 communicate with the AS, and can therefore perform introspection, 2286 in order to learn the claims associated with the token reference. 2287 The advantage of such an approach is that the resource owner can 2288 change the claims associated to the token reference without having 2289 to be in contact with the client, thus granting or revoking access 2290 rights. 2292 Appendix B. Roles and Responsibilities 2294 Resource Owner 2296 * Make sure that the RS is registered at the AS. This includes 2297 making known to the AS which profiles, token_types, scopes, and 2298 key types (symmetric/asymmetric) the RS supports. Also making 2299 it known to the AS which audience(s) the RS identifies itself 2300 with. 2301 * Make sure that clients can discover the AS that is in charge of 2302 the RS. 2303 * If the client-credentials grant is used, make sure that the AS 2304 has the necessary, up-to-date, access control policies for the 2305 RS. 2307 Requesting Party 2309 * Make sure that the client is provisioned the necessary 2310 credentials to authenticate to the AS. 2311 * Make sure that the client is configured to follow the security 2312 requirements of the Requesting Party when issuing requests 2313 (e.g., minimum communication security requirements, trust 2314 anchors). 2315 * Register the client at the AS. This includes making known to 2316 the AS which profiles, token_types, and key types (symmetric/ 2317 asymmetric) the client. 2319 Authorization Server 2321 * Register the RS and manage corresponding security contexts. 2322 * Register clients and authentication credentials. 2323 * Allow Resource Owners to configure and update access control 2324 policies related to their registered RSs. 2325 * Expose the token endpoint to allow clients to request tokens. 2327 * Authenticate clients that wish to request a token. 2328 * Process a token request using the authorization policies 2329 configured for the RS. 2330 * Optionally: Expose the introspection endpoint that allows RS's 2331 to submit token introspection requests. 2332 * If providing an introspection endpoint: Authenticate RSs that 2333 wish to get an introspection response. 2334 * If providing an introspection endpoint: Process token 2335 introspection requests. 2336 * Optionally: Handle token revocation. 2337 * Optionally: Provide discovery metadata. See 2338 [I-D.ietf-oauth-discovery] 2340 Client 2342 * Discover the AS in charge of the RS that is to be targeted with 2343 a request. 2344 * Submit the token request (see step (A) of Figure 1). 2346 + Authenticate to the AS. 2347 + Optionally (if not pre-configured): Specify which RS, which 2348 resource(s), and which action(s) the request(s) will target. 2349 + If raw public keys (rpk) or certificates are used, make sure 2350 the AS has the right rpk or certificate for this client. 2351 * Process the access token and RS Information (see step (B) of 2352 Figure 1). 2354 + Check that the RS Information provides the necessary 2355 security parameters (e.g., PoP key, information on 2356 communication security protocols supported by the RS). 2357 * Send the token and request to the RS (see step (C) of 2358 Figure 1). 2360 + Authenticate towards the RS (this could coincide with the 2361 proof of possession process). 2362 + Transmit the token as specified by the AS (default is to the 2363 authz-info endpoint, alternative options are specified by 2364 profiles). 2365 + Perform the proof-of-possession procedure as specified by 2366 the profile in use (this may already have been taken care of 2367 through the authentication procedure). 2368 * Process the RS response (see step (F) of Figure 1) of the RS. 2370 Resource Server 2372 * Expose a way to submit access tokens. By default this is the 2373 authz-info endpoint. 2374 * Process an access token. 2376 + Verify the token is from a recognized AS. 2377 + Verify that the token applies to this RS. 2378 + Check that the token has not expired (if the token provides 2379 expiration information). 2380 + Check the token's integrity. 2381 + Store the token so that it can be retrieved in the context 2382 of a matching request. 2383 * Process a request. 2385 + Set up communication security with the client. 2386 + Authenticate the client. 2387 + Match the client against existing tokens. 2388 + Check that tokens belonging to the client actually authorize 2389 the requested action. 2390 + Optionally: Check that the matching tokens are still valid, 2391 using introspection (if this is possible.) 2392 * Send a response following the agreed upon communication 2393 security. 2395 Appendix C. Requirements on Profiles 2397 This section lists the requirements on profiles of this framework, 2398 for the convenience of profile designers. 2400 o Specify the communication protocol the client and RS the must use 2401 (e.g., CoAP). Section 5 and Section 5.6.4.4 2402 o Specify the security protocol the client and RS must use to 2403 protect their communication (e.g., OSCOAP or DTLS over CoAP). 2404 This must provide encryption, integrity and replay protection. 2405 Section 5.6.4.4 2406 o Specify how the client and the RS mutually authenticate. 2407 Section 4 2408 o Specify the Content-format of the protocol messages (e.g., 2409 "application/cbor" or "application/cose+cbor"). Section 4 2410 o Specify the proof-of-possession protocol(s) and how to select one, 2411 if several are available. Also specify which key types (e.g., 2412 symmetric/asymmetric) are supported by a specific proof-of- 2413 possession protocol. Section 5.6.4.3 2414 o Specify a unique profile identifier. Section 5.6.4.4 2415 o If introspection is supported: Specify the communication and 2416 security protocol for introspection.Section 5.7 2417 o Specify the communication and security protocol for interactions 2418 between client and AS. Section 5.6 2419 o Specify how/if the authz-info endpoint is protected. 2420 Section 5.8.1 2421 o Optionally define other methods of token transport than the authz- 2422 info endpoint. Section 5.8.1 2424 Appendix D. Assumptions on AS knowledge about C and RS 2426 This section lists the assumptions on what an AS should know about a 2427 client and a RS in order to be able to respond to requests to the 2428 token and introspection endpoints. How this information is 2429 established is out of scope for this document. 2431 o The identifier of the client or RS. 2432 o The profiles that the client or RS supports. 2433 o The scopes that the RS supports. 2434 o The audiences that the RS identifies with. 2435 o The key types (e.g., pre-shared symmetric key, raw public key, key 2436 length, other key parameters) that the client or RS supports. 2437 o The types of access tokens the RS supports (e.g., CWT). 2438 o If the RS supports CWTs, the COSE parameters for the crypto 2439 wrapper (e.g., algorithm, key-wrap algorithm, key-length). 2440 o The expiration time for access tokens issued to this RS (unless 2441 the RS accepts a default time chosen by the AS). 2442 o The symmetric key shared between client or RS and AS (if any). 2443 o The raw public key of the client or RS (if any). 2445 Appendix E. Deployment Examples 2447 There is a large variety of IoT deployments, as is indicated in 2448 Appendix A, and this section highlights a few common variants. This 2449 section is not normative but illustrates how the framework can be 2450 applied. 2452 For each of the deployment variants, there are a number of possible 2453 security setups between clients, resource servers and authorization 2454 servers. The main focus in the following subsections is on how 2455 authorization of a client request for a resource hosted by a RS is 2456 performed. This requires the security of the requests and responses 2457 between the clients and the RS to consider. 2459 Note: CBOR diagnostic notation is used for examples of requests and 2460 responses. 2462 E.1. Local Token Validation 2464 In this scenario, the case where the resource server is offline is 2465 considered, i.e., it is not connected to the AS at the time of the 2466 access request. This access procedure involves steps A, B, C, and F 2467 of Figure 1. 2469 Since the resource server must be able to verify the access token 2470 locally, self-contained access tokens must be used. 2472 This example shows the interactions between a client, the 2473 authorization server and a temperature sensor acting as a resource 2474 server. Message exchanges A and B are shown in Figure 16. 2476 A: The client first generates a public-private key pair used for 2477 communication security with the RS. 2478 The client sends the POST request to the token endpoint at the AS. 2479 The security of this request can be transport or application 2480 layer. It is up the the communication security profile to define. 2481 In the example transport layer identification of the AS is done 2482 and the client identifies with client_id and client_secret as in 2483 classic OAuth. The request contains the public key of the client 2484 and the Audience parameter set to "tempSensorInLivingRoom", a 2485 value that the temperature sensor identifies itself with. The AS 2486 evaluates the request and authorizes the client to access the 2487 resource. 2488 B: The AS responds with a PoP access token and RS Information. 2489 The PoP access token contains the public key of the client, and 2490 the RS Information contains the public key of the RS. For 2491 communication security this example uses DTLS RawPublicKey between 2492 the client and the RS. The issued token will have a short 2493 validity time, i.e., "exp" close to "iat", to protect the RS from 2494 replay attacks. The token includes the claim such as "scope" with 2495 the authorized access that an owner of the temperature device can 2496 enjoy. In this example, the "scope" claim, issued by the AS, 2497 informs the RS that the owner of the token, that can prove the 2498 possession of a key is authorized to make a GET request against 2499 the /temperature resource and a POST request on the /firmware 2500 resource. Note that the syntax and semantics of the scope claim 2501 are application specific. 2502 Note: In this example it is assumed that the client knows what 2503 resource it wants to access, and is therefore able to request 2504 specific audience and scope claims for the access token. 2506 Authorization 2507 Client Server 2508 | | 2509 |<=======>| DTLS Connection Establishment 2510 | | to identify the AS 2511 | | 2512 A: +-------->| Header: POST (Code=0.02) 2513 | POST | Uri-Path:"token" 2514 | | Content-Type: application/cbor 2515 | | Payload: 2516 | | 2517 B: |<--------+ Header: 2.05 Content 2518 | 2.05 | Content-Type: application/cbor 2519 | | Payload: 2520 | | 2522 Figure 16: Token Request and Response Using Client Credentials. 2524 The information contained in the Request-Payload and the Response- 2525 Payload is shown in Figure 17. Note that a transport layer security 2526 based communication security profile is used in this example, 2527 therefore the Content-Type is "application/cbor". 2529 Request-Payload : 2530 { 2531 "grant_type" : "client_credentials", 2532 "aud" : "tempSensorInLivingRoom", 2533 "client_id" : "myclient", 2534 "client_secret" : "qwerty" 2535 } 2537 Response-Payload : 2538 { 2539 "access_token" : b64'SlAV32hkKG ...', 2540 "token_type" : "pop", 2541 "csp" : "DTLS", 2542 "rs_cnf" : { 2543 "COSE_Key" : { 2544 "kid" : b64'c29tZSBwdWJsaWMga2V5IGlk', 2545 "kty" : "EC", 2546 "crv" : "P-256", 2547 "x" : b64'MKBCTNIcKUSDii11ySs3526iDZ8AiTo7Tu6KPAqv7D4', 2548 "y" : b64'4Etl6SRW2YiLUrN5vfvVHuhp7x8PxltmWWlbbM4IFyM' 2549 } 2550 } 2551 } 2553 Figure 17: Request and Response Payload Details. 2555 The content of the access token is shown in Figure 18. 2557 { 2558 "aud" : "tempSensorInLivingRoom", 2559 "iat" : "1360189224", 2560 "exp" : "1360289224", 2561 "scope" : "temperature_g firmware_p", 2562 "cnf" : { 2563 "COSE_Key" : { 2564 "kid" : b64'1Bg8vub9tLe1gHMzV76e8', 2565 "kty" : "EC", 2566 "crv" : "P-256", 2567 "x" : b64'f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU', 2568 "y" : b64'x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0' 2569 } 2570 } 2571 } 2573 Figure 18: Access Token including Public Key of the Client. 2575 Messages C and F are shown in Figure 19 - Figure 20. 2577 C: The client then sends the PoP access token to the authz-info 2578 endpoint at the RS. This is a plain CoAP request, i.e., no 2579 transport or application layer security between client and RS, 2580 since the token is integrity protected between the AS and RS. The 2581 RS verifies that the PoP access token was created by a known and 2582 trusted AS, is valid, and responds to the client. The RS caches 2583 the security context together with authorization information about 2584 this client contained in the PoP access token. 2586 Resource 2587 Client Server 2588 | | 2589 C: +-------->| Header: POST (Code=0.02) 2590 | POST | Uri-Path:"authz-info" 2591 | | Payload: SlAV32hkKG ... 2592 | | 2593 |<--------+ Header: 2.04 Changed 2594 | 2.04 | 2595 | | 2597 Figure 19: Access Token provisioning to RS 2598 The client and the RS runs the DTLS handshake using the raw public 2599 keys established in step B and C. 2601 The client sends the CoAP request GET to /temperature on RS over 2602 DTLS. The RS verifies that the request is authorized, based on 2603 previously established security context. 2604 F: The RS responds with a resource representation over DTLS. 2606 Resource 2607 Client Server 2608 | | 2609 |<=======>| DTLS Connection Establishment 2610 | | using Raw Public Keys 2611 | | 2612 +-------->| Header: GET (Code=0.01) 2613 | GET | Uri-Path: "temperature" 2614 | | 2615 | | 2616 | | 2617 F: |<--------+ Header: 2.05 Content 2618 | 2.05 | Payload: 2619 | | 2621 Figure 20: Resource Request and Response protected by DTLS. 2623 E.2. Introspection Aided Token Validation 2625 In this deployment scenario it is assumed that a client is not able 2626 to access the AS at the time of the access request, whereas the RS is 2627 assumed to be connected to the back-end infrastructure. Thus the RS 2628 can make use of token introspection. This access procedure involves 2629 steps A-F of Figure 1, but assumes steps A and B have been carried 2630 out during a phase when the client had connectivity to AS. 2632 Since the client is assumed to be offline, at least for a certain 2633 period of time, a pre-provisioned access token has to be long-lived. 2634 Since the client is constrained, the token will not be self contained 2635 (i.e. not a CWT) but instead just a reference. The resource server 2636 uses its connectivity to learn about the claims associated to the 2637 access token by using introspection, which is shown in the example 2638 below. 2640 In the example interactions between an offline client (key fob), a RS 2641 (online lock), and an AS is shown. It is assumed that there is a 2642 provisioning step where the client has access to the AS. This 2643 corresponds to message exchanges A and B which are shown in 2644 Figure 21. 2646 Authorization consent from the resource owner can be pre-configured, 2647 but it can also be provided via an interactive flow with the resource 2648 owner. An example of this for the key fob case could be that the 2649 resource owner has a connected car, he buys a generic key that he 2650 wants to use with the car. To authorize the key fob he connects it 2651 to his computer that then provides the UI for the device. After that 2652 OAuth 2.0 implicit flow can used to authorize the key for his car at 2653 the the car manufacturers AS. 2655 Note: In this example the client does not know the exact door it will 2656 be used to access since the token request is not send at the time of 2657 access. So the scope and audience parameters are set quite wide to 2658 start with and new values different form the original once can be 2659 returned from introspection later on. 2661 A: The client sends the request using POST to the token endpoint 2662 at AS. The request contains the Audience parameter set to 2663 "PACS1337" (PACS, Physical Access System), a value the that the 2664 online door in question identifies itself with. The AS generates 2665 an access token as an opaque string, which it can match to the 2666 specific client, a targeted audience and a symmetric key. The 2667 security is provided by identifying the AS on transport layer 2668 using a pre shared security context (psk, rpk or certificate) and 2669 then the client is identified using client_id and client_secret as 2670 in classic OAuth. 2671 B: The AS responds with the an access token and RS Information, 2672 the latter containing a symmetric key. Communication security 2673 between C and RS will be DTLS and PreSharedKey. The PoP key is 2674 used as the PreSharedKey. 2676 Authorization 2677 Client Server 2678 | | 2679 | | 2680 A: +-------->| Header: POST (Code=0.02) 2681 | POST | Uri-Path:"token" 2682 | | Content-Type: application/cbor 2683 | | Payload: 2684 | | 2685 B: |<--------+ Header: 2.05 Content 2686 | | Content-Type: application/cbor 2687 | 2.05 | Payload: 2688 | | 2690 Figure 21: Token Request and Response using Client Credentials. 2692 The information contained in the Request-Payload and the Response- 2693 Payload is shown in Figure 22. 2695 Request-Payload: 2696 { 2697 "grant_type" : "client_credentials", 2698 "aud" : "lockOfDoor4711", 2699 "client_id" : "keyfob", 2700 "client_secret" : "qwerty" 2701 } 2703 Response-Payload: 2704 { 2705 "access_token" : b64'SlAV32hkKG ...' 2706 "token_type" : "pop", 2707 "csp" : "DTLS", 2708 "cnf" : { 2709 "COSE_Key" : { 2710 "kid" : b64'c29tZSBwdWJsaWMga2V5IGlk', 2711 "kty" : "oct", 2712 "alg" : "HS256", 2713 "k": b64'ZoRSOrFzN_FzUA5XKMYoVHyzff5oRJxl-IXRtztJ6uE' 2714 } 2715 } 2716 } 2718 Figure 22: Request and Response Payload for C offline 2720 The access token in this case is just an opaque string referencing 2721 the authorization information at the AS. 2723 C: Next, the client POSTs the access token to the authz-info 2724 endpoint in the RS. This is a plain CoAP request, i.e., no DTLS 2725 between client and RS. Since the token is an opaque string, the 2726 RS cannot verify it on its own, and thus defers to respond the 2727 client with a status code until after step E. 2728 D: The RS forwards the token to the introspection endpoint on the 2729 AS. Introspection assumes a secure connection between the AS and 2730 the RS, e.g., using transport of application layer security. In 2731 the example AS is identified using pre shared security context 2732 (psk, rpk or certificate) while RS is acting as client and is 2733 identified with client_id and client_secret. 2734 E: The AS provides the introspection response containing 2735 parameters about the token. This includes the confirmation key 2736 (cnf) parameter that allows the RS to verify the client's proof of 2737 possession in step F. 2738 After receiving message E, the RS responds to the client's POST in 2739 step C with the CoAP response code 2.01 (Created). 2741 Resource 2742 Client Server 2743 | | 2744 C: +-------->| Header: POST (T=CON, Code=0.02) 2745 | POST | Uri-Path:"authz-info" 2746 | | Content-Type: "application/cbor" 2747 | | Payload: b64'SlAV32hkKG ...'' 2748 | | 2749 | | Authorization 2750 | | Server 2751 | | | 2752 | D: +--------->| Header: POST (Code=0.02) 2753 | | POST | Uri-Path: "introspect" 2754 | | | Content-Type: "application/cbor" 2755 | | | Payload: 2756 | | | 2757 | E: |<---------+ Header: 2.05 Content 2758 | | 2.05 | Content-Type: "application/cbor" 2759 | | | Payload: 2760 | | | 2761 | | 2762 |<--------+ Header: 2.01 Created 2763 | 2.01 | 2764 | | 2766 Figure 23: Token Introspection for C offline 2767 The information contained in the Request-Payload and the Response- 2768 Payload is shown in Figure 24. 2770 Request-Payload: 2771 { 2772 "token" : b64'SlAV32hkKG...', 2773 "client_id" : "FrontDoor", 2774 "client_secret" : "ytrewq" 2775 } 2777 Response-Payload: 2778 { 2779 "active" : true, 2780 "aud" : "lockOfDoor4711", 2781 "scope" : "open, close", 2782 "iat" : 1311280970, 2783 "cnf" : { 2784 "kid" : b64'JDLUhTMjU2IiwiY3R5Ijoi ...' 2785 } 2786 } 2788 Figure 24: Request and Response Payload for Introspection 2790 The client uses the symmetric PoP key to establish a DTLS 2791 PreSharedKey secure connection to the RS. The CoAP request PUT is 2792 sent to the uri-path /state on the RS, changing the state of the 2793 door to locked. 2794 F: The RS responds with a appropriate over the secure DTLS 2795 channel. 2797 Resource 2798 Client Server 2799 | | 2800 |<=======>| DTLS Connection Establishment 2801 | | using Pre Shared Key 2802 | | 2803 +-------->| Header: PUT (Code=0.03) 2804 | PUT | Uri-Path: "state" 2805 | | Payload: 2806 | | 2807 F: |<--------+ Header: 2.04 Changed 2808 | 2.04 | Payload: 2809 | | 2811 Figure 25: Resource request and response protected by OSCOAP 2813 Appendix F. Document Updates 2815 F.1. Version -09 to -10 2817 o Removed CBOR major type numbers. 2818 o Removed the client token design. 2819 o Rephrased to clarify that other protocols than CoAP can be used. 2820 o Clarifications regarding the use of HTTP 2822 F.2. Version -08 to -09 2824 o Allowed scope to be byte arrays. 2825 o Defined default names for endpoints. 2826 o Refactored the IANA section for briefness and consistency. 2827 o Refactored tables that define IANA registry contents for 2828 consistency. 2829 o Created IANA registry for CBOR mappings of error codes, grant 2830 types and Authorization Server Information. 2831 o Added references to other document sections defining IANA entries 2832 in the IANA section. 2834 F.3. Version -07 to -08 2836 o Moved AS discovery from the DTLS profile to the framework, see 2837 Section 5.1. 2838 o Made the use of CBOR mandatory. If you use JSON you can use 2839 vanilla OAuth. 2840 o Made it mandatory for profiles to specify C-AS security and RS-AS 2841 security (the latter only if introspection is supported). 2842 o Made the use of CBOR abbreviations mandatory. 2843 o Added text to clarify the use of token references as an 2844 alternative to CWTs. 2845 o Added text to clarify that introspection must not be delayed, in 2846 case the RS has to return a client token. 2847 o Added security considerations about leakage through unprotected AS 2848 discovery information, combining profiles and leakage through 2849 error responses. 2850 o Added privacy considerations about leakage through unprotected AS 2851 discovery. 2852 o Added text that clarifies that introspection is optional. 2853 o Made profile parameter optional since it can be implicit. 2854 o Clarified that CoAP is not mandatory and other protocols can be 2855 used. 2856 o Clarified the design justification for specific features of the 2857 framework in appendix A. 2858 o Clarified appendix E.2. 2859 o Removed specification of the "cnf" claim for CBOR/COSE, and 2860 replaced with references to [I-D.ietf-ace-cwt-proof-of-possession] 2862 F.4. Version -06 to -07 2864 o Various clarifications added. 2865 o Fixed erroneous author email. 2867 F.5. Version -05 to -06 2869 o Moved sections that define the ACE framework into a subsection of 2870 the framework Section 5. 2871 o Split section on client credentials and grant into two separate 2872 sections, Section 5.2, and Section 5.3. 2873 o Added Section 5.4 on AS authentication. 2874 o Added Section 5.5 on the Authorization endpoint. 2876 F.6. Version -04 to -05 2878 o Added RFC 2119 language to the specification of the required 2879 behavior of profile specifications. 2880 o Added Section 5.3 on the relation to the OAuth2 grant types. 2882 o Added CBOR abbreviations for error and the error codes defined in 2883 OAuth2. 2884 o Added clarification about token expiration and long-running 2885 requests in Section 5.8.2 2886 o Added security considerations about tokens with symmetric pop keys 2887 valid for more than one RS. 2888 o Added privacy considerations section. 2889 o Added IANA registry mapping the confirmation types from RFC 7800 2890 to equivalent COSE types. 2891 o Added appendix D, describing assumptions about what the AS knows 2892 about the client and the RS. 2894 F.7. Version -03 to -04 2896 o Added a description of the terms "framework" and "profiles" as 2897 used in this document. 2898 o Clarified protection of access tokens in section 3.1. 2899 o Clarified uses of the "cnf" parameter in section 6.4.5. 2900 o Clarified intended use of Client Token in section 7.4. 2902 F.8. Version -02 to -03 2904 o Removed references to draft-ietf-oauth-pop-key-distribution since 2905 the status of this draft is unclear. 2906 o Copied and adapted security considerations from draft-ietf-oauth- 2907 pop-key-distribution. 2908 o Renamed "client information" to "RS information" since it is 2909 information about the RS. 2910 o Clarified the requirements on profiles of this framework. 2911 o Clarified the token endpoint protocol and removed negotiation of 2912 "profile" and "alg" (section 6). 2913 o Renumbered the abbreviations for claims and parameters to get a 2914 consistent numbering across different endpoints. 2915 o Clarified the introspection endpoint. 2916 o Renamed token, introspection and authz-info to "endpoint" instead 2917 of "resource" to mirror the OAuth 2.0 terminology. 2918 o Updated the examples in the appendices. 2920 F.9. Version -01 to -02 2922 o Restructured to remove communication security parts. These shall 2923 now be defined in profiles. 2924 o Restructured section 5 to create new sections on the OAuth 2925 endpoints token, introspection and authz-info. 2926 o Pulled in material from draft-ietf-oauth-pop-key-distribution in 2927 order to define proof-of-possession key distribution. 2928 o Introduced the "cnf" parameter as defined in RFC7800 to reference 2929 or transport keys used for proof of possession. 2931 o Introduced the "client-token" to transport client information from 2932 the AS to the client via the RS in conjunction with introspection. 2933 o Expanded the IANA section to define parameters for token request, 2934 introspection and CWT claims. 2935 o Moved deployment scenarios to the appendix as examples. 2937 F.10. Version -00 to -01 2939 o Changed 5.1. from "Communication Security Protocol" to "Client 2940 Information". 2941 o Major rewrite of 5.1 to clarify the information exchanged between 2942 C and AS in the PoP access token request profile for IoT. 2944 * Allow the client to indicate preferences for the communication 2945 security protocol. 2946 * Defined the term "Client Information" for the additional 2947 information returned to the client in addition to the access 2948 token. 2949 * Require that the messages between AS and client are secured, 2950 either with (D)TLS or with COSE_Encrypted wrappers. 2951 * Removed dependency on OSCOAP and added generic text about 2952 object security instead. 2953 * Defined the "rpk" parameter in the client information to 2954 transmit the raw public key of the RS from AS to client. 2955 * (D)TLS MUST use the PoP key in the handshake (either as PSK or 2956 as client RPK with client authentication). 2957 * Defined the use of x5c, x5t and x5tS256 parameters when a 2958 client certificate is used for proof of possession. 2959 * Defined "tktn" parameter for signaling for how to transfer the 2960 access token. 2961 o Added 5.2. the CoAP Access-Token option for transferring access 2962 tokens in messages that do not have payload. 2963 o 5.3.2. Defined success and error responses from the RS when 2964 receiving an access token. 2965 o 5.6.:Added section giving guidance on how to handle token 2966 expiration in the absence of reliable time. 2967 o Appendix B Added list of roles and responsibilities for C, AS and 2968 RS. 2970 Authors' Addresses 2972 Ludwig Seitz 2973 RISE SICS 2974 Scheelevaegen 17 2975 Lund 223 70 2976 Sweden 2978 Email: ludwig.seitz@ri.se 2979 Goeran Selander 2980 Ericsson 2981 Faroegatan 6 2982 Kista 164 80 2983 Sweden 2985 Email: goran.selander@ericsson.com 2987 Erik Wahlstroem 2988 Sweden 2990 Email: erik@wahlstromstekniska.se 2992 Samuel Erdtman 2993 Spotify AB 2994 Birger Jarlsgatan 61, 4tr 2995 Stockholm 113 56 2996 Sweden 2998 Email: erdtman@spotify.com 3000 Hannes Tschofenig 3001 ARM Ltd. 3002 Hall in Tirol 6060 3003 Austria 3005 Email: Hannes.Tschofenig@arm.com