idnits 2.17.1 draft-ietf-ace-oauth-authz-11.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (March 19, 2018) is 2224 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: A later version (-15) exists of draft-ietf-ace-cbor-web-token-14 == Outdated reference: A later version (-11) exists of draft-ietf-ace-cwt-proof-of-possession-02 ** Obsolete normative reference: RFC 6347 (Obsoleted by RFC 9147) ** Obsolete normative reference: RFC 8152 (Obsoleted by RFC 9052, RFC 9053) == Outdated reference: A later version (-07) exists of draft-ietf-ace-actors-06 == Outdated reference: A later version (-16) exists of draft-ietf-core-object-security-10 == Outdated reference: A later version (-28) exists of draft-ietf-core-resource-directory-13 == Outdated reference: A later version (-15) exists of draft-ietf-oauth-device-flow-07 -- Obsolete informational reference (is this intentional?): RFC 5246 (Obsoleted by RFC 8446) -- Obsolete informational reference (is this intentional?): RFC 7049 (Obsoleted by RFC 8949) -- Obsolete informational reference (is this intentional?): RFC 7231 (Obsoleted by RFC 9110) Summary: 2 errors (**), 0 flaws (~~), 7 warnings (==), 4 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 ACE Working Group L. Seitz 3 Internet-Draft RISE SICS 4 Intended status: Standards Track G. Selander 5 Expires: September 20, 2018 Ericsson 6 E. Wahlstroem 8 S. Erdtman 9 Spotify AB 10 H. Tschofenig 11 ARM Ltd. 12 March 19, 2018 14 Authentication and Authorization for Constrained Environments (ACE) 15 using the OAuth 2.0 Framework (ACE-OAuth) 16 draft-ietf-ace-oauth-authz-11 18 Abstract 20 This specification defines a framework for authentication and 21 authorization in Internet of Things (IoT) environments called ACE- 22 OAuth. The framework is based on a set of building blocks including 23 OAuth 2.0 and CoAP, thus making a well-known and widely used 24 authorization solution suitable for IoT devices. Existing 25 specifications are used where possible, but where the constraints of 26 IoT devices require it, extensions are added and profiles are 27 defined. 29 Status of This Memo 31 This Internet-Draft is submitted in full conformance with the 32 provisions of BCP 78 and BCP 79. 34 Internet-Drafts are working documents of the Internet Engineering 35 Task Force (IETF). Note that other groups may also distribute 36 working documents as Internet-Drafts. The list of current Internet- 37 Drafts is at http://datatracker.ietf.org/drafts/current/. 39 Internet-Drafts are draft documents valid for a maximum of six months 40 and may be updated, replaced, or obsoleted by other documents at any 41 time. It is inappropriate to use Internet-Drafts as reference 42 material or to cite them other than as "work in progress." 44 This Internet-Draft will expire on September 20, 2018. 46 Copyright Notice 48 Copyright (c) 2018 IETF Trust and the persons identified as the 49 document authors. All rights reserved. 51 This document is subject to BCP 78 and the IETF Trust's Legal 52 Provisions Relating to IETF Documents 53 (http://trustee.ietf.org/license-info) in effect on the date of 54 publication of this document. Please review these documents 55 carefully, as they describe your rights and restrictions with respect 56 to this document. Code Components extracted from this document must 57 include Simplified BSD License text as described in Section 4.e of 58 the Trust Legal Provisions and are provided without warranty as 59 described in the Simplified BSD License. 61 Table of Contents 63 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 64 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5 65 3. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 5 66 3.1. OAuth 2.0 . . . . . . . . . . . . . . . . . . . . . . . . 7 67 3.2. CoAP . . . . . . . . . . . . . . . . . . . . . . . . . . 9 68 4. Protocol Interactions . . . . . . . . . . . . . . . . . . . . 10 69 5. Framework . . . . . . . . . . . . . . . . . . . . . . . . . . 14 70 5.1. Discovering Authorization Servers . . . . . . . . . . . . 15 71 5.1.1. Unauthorized Resource Request Message . . . . . . . . 15 72 5.1.2. AS Information . . . . . . . . . . . . . . . . . . . 16 73 5.2. Authorization Grants . . . . . . . . . . . . . . . . . . 17 74 5.3. Client Credentials . . . . . . . . . . . . . . . . . . . 18 75 5.4. AS Authentication . . . . . . . . . . . . . . . . . . . . 18 76 5.5. The Authorization Endpoint . . . . . . . . . . . . . . . 18 77 5.6. The Token Endpoint . . . . . . . . . . . . . . . . . . . 19 78 5.6.1. Client-to-AS Request . . . . . . . . . . . . . . . . 19 79 5.6.2. AS-to-Client Response . . . . . . . . . . . . . . . . 22 80 5.6.3. Error Response . . . . . . . . . . . . . . . . . . . 25 81 5.6.4. Request and Response Parameters . . . . . . . . . . . 25 82 5.6.4.1. Audience . . . . . . . . . . . . . . . . . . . . 26 83 5.6.4.2. Grant Type . . . . . . . . . . . . . . . . . . . 26 84 5.6.4.3. Token Type . . . . . . . . . . . . . . . . . . . 26 85 5.6.4.4. Profile . . . . . . . . . . . . . . . . . . . . . 27 86 5.6.4.5. Confirmation . . . . . . . . . . . . . . . . . . 27 87 5.6.5. Mapping Parameters to CBOR . . . . . . . . . . . . . 27 88 5.7. The 'Introspect' Endpoint . . . . . . . . . . . . . . . . 28 89 5.7.1. RS-to-AS Request . . . . . . . . . . . . . . . . . . 29 90 5.7.2. AS-to-RS Response . . . . . . . . . . . . . . . . . . 29 91 5.7.3. Error Response . . . . . . . . . . . . . . . . . . . 30 92 5.7.4. Mapping Introspection parameters to CBOR . . . . . . 31 93 5.8. The Access Token . . . . . . . . . . . . . . . . . . . . 32 94 5.8.1. The 'Authorization Information' Endpoint . . . . . . 32 95 5.8.2. Token Expiration . . . . . . . . . . . . . . . . . . 33 96 6. Security Considerations . . . . . . . . . . . . . . . . . . . 34 97 6.1. Unprotected AS Information . . . . . . . . . . . . . . . 35 98 6.2. Use of Nonces for Replay Protection . . . . . . . . . . . 35 99 6.3. Combining profiles . . . . . . . . . . . . . . . . . . . 35 100 6.4. Error responses . . . . . . . . . . . . . . . . . . . . . 36 101 7. Privacy Considerations . . . . . . . . . . . . . . . . . . . 36 102 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 37 103 8.1. Authorization Server Information . . . . . . . . . . . . 37 104 8.2. OAuth Error Code CBOR Mappings Registry . . . . . . . . . 37 105 8.3. OAuth Grant Type CBOR Mappings . . . . . . . . . . . . . 38 106 8.4. OAuth Access Token Types . . . . . . . . . . . . . . . . 38 107 8.5. OAuth Token Type CBOR Mappings . . . . . . . . . . . . . 38 108 8.5.1. Initial Registry Contents . . . . . . . . . . . . . . 39 109 8.6. ACE OAuth Profile Registry . . . . . . . . . . . . . . . 39 110 8.7. OAuth Parameter Registration . . . . . . . . . . . . . . 39 111 8.8. OAuth CBOR Parameter Mappings Registry . . . . . . . . . 40 112 8.9. OAuth Introspection Response Parameter Registration . . . 41 113 8.10. Introspection Endpoint CBOR Mappings Registry . . . . . . 41 114 8.11. JSON Web Token Claims . . . . . . . . . . . . . . . . . . 41 115 8.12. CBOR Web Token Claims . . . . . . . . . . . . . . . . . . 42 116 8.13. CoAP Option Number Registration . . . . . . . . . . . . . 42 117 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 42 118 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 43 119 10.1. Normative References . . . . . . . . . . . . . . . . . . 43 120 10.2. Informative References . . . . . . . . . . . . . . . . . 44 121 Appendix A. Design Justification . . . . . . . . . . . . . . . . 46 122 Appendix B. Roles and Responsibilities . . . . . . . . . . . . . 50 123 Appendix C. Requirements on Profiles . . . . . . . . . . . . . . 52 124 Appendix D. Assumptions on AS knowledge about C and RS . . . . . 53 125 Appendix E. Deployment Examples . . . . . . . . . . . . . . . . 53 126 E.1. Local Token Validation . . . . . . . . . . . . . . . . . 53 127 E.2. Introspection Aided Token Validation . . . . . . . . . . 57 128 Appendix F. Document Updates . . . . . . . . . . . . . . . . . . 61 129 F.1. Version -10 to -11 . . . . . . . . . . . . . . . . . . . 61 130 F.2. Version -09 to -10 . . . . . . . . . . . . . . . . . . . 61 131 F.3. Version -08 to -09 . . . . . . . . . . . . . . . . . . . 61 132 F.4. Version -07 to -08 . . . . . . . . . . . . . . . . . . . 62 133 F.5. Version -06 to -07 . . . . . . . . . . . . . . . . . . . 62 134 F.6. Version -05 to -06 . . . . . . . . . . . . . . . . . . . 62 135 F.7. Version -04 to -05 . . . . . . . . . . . . . . . . . . . 63 136 F.8. Version -03 to -04 . . . . . . . . . . . . . . . . . . . 63 137 F.9. Version -02 to -03 . . . . . . . . . . . . . . . . . . . 63 138 F.10. Version -01 to -02 . . . . . . . . . . . . . . . . . . . 63 139 F.11. Version -00 to -01 . . . . . . . . . . . . . . . . . . . 64 140 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 65 142 1. Introduction 144 Authorization is the process for granting approval to an entity to 145 access a resource [RFC4949]. The authorization task itself can best 146 be described as granting access to a requesting client, for a 147 resource hosted on a device, the resource server (RS). This exchange 148 is mediated by one or multiple authorization servers (AS). Managing 149 authorization for a large number of devices and users can be a 150 complex task. 152 While prior work on authorization solutions for the Web and for the 153 mobile environment also applies to the Internet of Things (IoT) 154 environment, many IoT devices are constrained, for example, in terms 155 of processing capabilities, available memory, etc. For web 156 applications on constrained nodes, this specification RECOMMENDS the 157 use of CoAP [RFC7252] as replacement for HTTP. 159 A detailed treatment of constraints can be found in [RFC7228], and 160 the different IoT deployments present a continuous range of device 161 and network capabilities. Taking energy consumption as an example: 162 At one end there are energy-harvesting or battery powered devices 163 which have a tight power budget, on the other end there are mains- 164 powered devices, and all levels in between. 166 Hence, IoT devices may be very different in terms of available 167 processing and message exchange capabilities and there is a need to 168 support many different authorization use cases [RFC7744]. 170 This specification describes a framework for authentication and 171 authorization in constrained environments (ACE) built on re-use of 172 OAuth 2.0 [RFC6749], thereby extending authorization to Internet of 173 Things devices. This specification contains the necessary building 174 blocks for adjusting OAuth 2.0 to IoT environments. 176 More detailed, interoperable specifications can be found in profiles. 177 Implementations may claim conformance with a specific profile, 178 whereby implementations utilizing the same profile interoperate while 179 implementations of different profiles are not expected to be 180 interoperable. Some devices, such as mobile phones and tablets, may 181 implement multiple profiles and will therefore be able to interact 182 with a wider range of low end devices. Requirements on profiles are 183 described at contextually appropriate places throughout this 184 specification, and also summarized in Appendix C. 186 2. Terminology 188 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 189 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 190 "OPTIONAL" in this document are to be interpreted as described in BCP 191 14 [RFC2119] [RFC8174] when, and only when, they appear in all 192 capitals, as shown here. 194 Certain security-related terms such as "authentication", 195 "authorization", "confidentiality", "(data) integrity", "message 196 authentication code", and "verify" are taken from [RFC4949]. 198 Since exchanges in this specification are described as RESTful 199 protocol interactions, HTTP [RFC7231] offers useful terminology. 201 Terminology for entities in the architecture is defined in OAuth 2.0 202 [RFC6749] and [I-D.ietf-ace-actors], such as client (C), resource 203 server (RS), and authorization server (AS). 205 Note that the term "endpoint" is used here following its OAuth 206 definition, which is to denote resources such as token and 207 introspection at the AS and authz-info at the RS (see Section 5.8.1 208 for a definition of the authz-info endpoint). The CoAP [RFC7252] 209 definition, which is "An entity participating in the CoAP protocol" 210 is not used in this specification. 212 Since this specification focuses on the problem of access control to 213 resources, the actors has been simplified by assuming that the client 214 authorization server (CAS) functionality is not stand-alone but 215 subsumed by either the authorization server or the client (see 216 Section 2.2 in [I-D.ietf-ace-actors]). 218 The specifications in this document is called the "framework" or "ACE 219 framework". When referring to "profiles of this framework" it refers 220 to additional specifications that define the use of this 221 specification with concrete transport, and communication security 222 protocols (e.g., CoAP over DTLS). 224 We use the term "RS Information" for parameters describing 225 characteristics of the RS (e.g. public key) that the AS provides to 226 the client. 228 3. Overview 230 This specification defines the ACE framework for authorization in the 231 Internet of Things environment. It consists of a set of building 232 blocks. 234 The basic block is the OAuth 2.0 [RFC6749] framework, which enjoys 235 widespread deployment. Many IoT devices can support OAuth 2.0 236 without any additional extensions, but for certain constrained 237 settings additional profiling is needed. 239 Another building block is the lightweight web transfer protocol CoAP 240 [RFC7252], for those communication environments where HTTP is not 241 appropriate. CoAP typically runs on top of UDP, which further 242 reduces overhead and message exchanges. While this specification 243 defines extensions for the use of OAuth over CoAP, other underlying 244 protocols are not prohibited from being supported in the future, such 245 as HTTP/2, MQTT, BLE and QUIC. 247 A third building block is CBOR [RFC7049], for encodings where JSON 248 [RFC8259] is not sufficiently compact. CBOR is a binary encoding 249 designed for small code and message size, which may be used for 250 encoding of self contained tokens, and also for encoding payload 251 transferred in protocol messages. 253 A fourth building block is the compact CBOR-based secure message 254 format COSE [RFC8152], which enables application layer security as an 255 alternative or complement to transport layer security (DTLS [RFC6347] 256 or TLS [RFC5246]). COSE is used to secure self-contained tokens such 257 as proof-of-possession (PoP) tokens, which is an extension to the 258 OAuth tokens. The default token format is defined in CBOR web token 259 (CWT) [I-D.ietf-ace-cbor-web-token]. Application layer security for 260 CoAP using COSE can be provided with OSCOAP 261 [I-D.ietf-core-object-security]. 263 With the building blocks listed above, solutions satisfying various 264 IoT device and network constraints are possible. A list of 265 constraints is described in detail in RFC 7228 [RFC7228] and a 266 description of how the building blocks mentioned above relate to the 267 various constraints can be found in Appendix A. 269 Luckily, not every IoT device suffers from all constraints. The ACE 270 framework nevertheless takes all these aspects into account and 271 allows several different deployment variants to co-exist, rather than 272 mandating a one-size-fits-all solution. It is important to cover the 273 wide range of possible interworking use cases and the different 274 requirements from a security point of view. Once IoT deployments 275 mature, popular deployment variants will be documented in the form of 276 ACE profiles. 278 3.1. OAuth 2.0 280 The OAuth 2.0 authorization framework enables a client to obtain 281 scoped access to a resource with the permission of a resource owner. 282 Authorization information, or references to it, is passed between the 283 nodes using access tokens. These access tokens are issued to clients 284 by an authorization server with the approval of the resource owner. 285 The client uses the access token to access the protected resources 286 hosted by the resource server. 288 A number of OAuth 2.0 terms are used within this specification: 290 The token and introspection Endpoints: 291 The AS hosts the token endpoint that allows a client to request 292 access tokens. The client makes a POST request to the token 293 endpoint on the AS and receives the access token in the response 294 (if the request was successful). 295 In some deployments, a token introspection endpoint is provided by 296 the AS, which can be used by the RS if it needs to request 297 additional information regarding a received access token. The RS 298 makes a POST request to the introspection endpoint on the AS and 299 receives information about the access token in the response. (See 300 "Introspection" below.) 302 Access Tokens: 303 Access tokens are credentials needed to access protected 304 resources. An access token is a data structure representing 305 authorization permissions issued by the AS to the client. Access 306 tokens are generated by the AS and consumed by the RS. The access 307 token content is opaque to the client. 309 Access tokens can have different formats, and various methods of 310 utilization (e.g., cryptographic properties) based on the security 311 requirements of the given deployment. 313 Proof of Possession Tokens: 314 An access token may be bound to a cryptographic key, which is then 315 used by an RS to authenticate requests from a client. Such tokens 316 are called proof-of-possession access tokens (or PoP access 317 tokens). 319 The proof-of-possession (PoP) security concept assumes that the AS 320 acts as a trusted third party that binds keys to access tokens. 321 These so called PoP keys are then used by the client to 322 demonstrate the possession of the secret to the RS when accessing 323 the resource. The RS, when receiving an access token, needs to 324 verify that the key used by the client matches the one bound to 325 the access token. When this specification uses the term "access 326 token" it is assumed to be a PoP access token token unless 327 specifically stated otherwise. 329 The key bound to the access token (the PoP key) may use either 330 symmetric or asymmetric cryptography. The appropriate choice of 331 the kind of cryptography depends on the constraints of the IoT 332 devices as well as on the security requirements of the use case. 334 Symmetric PoP key: 335 The AS generates a random symmetric PoP key. The key is either 336 stored to be returned on introspection calls or encrypted and 337 included in the access token. The PoP key is also encrypted 338 for the client and sent together with the access token to the 339 client. 341 Asymmetric PoP key: 342 An asymmetric key pair is generated on the client and the 343 public key is sent to the AS (if it does not already have 344 knowledge of the client's public key). Information about the 345 public key, which is the PoP key in this case, is either stored 346 to be returned on introspection calls or included inside the 347 access token and sent back to the requesting client. The RS 348 can identify the client's public key from the information in 349 the token, which allows the client to use the corresponding 350 private key for the proof of possession. 352 The access token is either a simple reference, or a structured 353 information object (e.g., CWT [I-D.ietf-ace-cbor-web-token]), 354 protected by a cryptographic wrapper (e.g., COSE [RFC8152]). The 355 choice of PoP key does not necessarily imply a specific credential 356 type for the integrity protection of the token. 358 Scopes and Permissions: 359 In OAuth 2.0, the client specifies the type of permissions it is 360 seeking to obtain (via the scope parameter) in the access token 361 request. In turn, the AS may use the scope response parameter to 362 inform the client of the scope of the access token issued. As the 363 client could be a constrained device as well, this specification 364 uses CBOR encoding as data format, defined in Section 5, to 365 request scopes and to be informed what scopes the access token 366 actually authorizes. 368 The values of the scope parameter in OAuth 2.0 are expressed as a 369 list of space-delimited, case-sensitive strings, with a semantic 370 that is well-known to the AS and the RS. More details about the 371 concept of scopes is found under Section 3.3 in [RFC6749]. 373 Claims: 374 Information carried in the access token or returned from 375 introspection, called claims, is in the form of name-value pairs. 376 An access token may, for example, include a claim identifying the 377 AS that issued the token (via the "iss" claim) and what audience 378 the access token is intended for (via the "aud" claim). The 379 audience of an access token can be a specific resource or one or 380 many resource servers. The resource owner policies influence what 381 claims are put into the access token by the authorization server. 383 While the structure and encoding of the access token varies 384 throughout deployments, a standardized format has been defined 385 with the JSON Web Token (JWT) [RFC7519] where claims are encoded 386 as a JSON object. In [I-D.ietf-ace-cbor-web-token], an equivalent 387 format using CBOR encoding (CWT) has been defined. 389 Introspection: 390 Introspection is a method for a resource server to query the 391 authorization server for the active state and content of a 392 received access token. This is particularly useful in those cases 393 where the authorization decisions are very dynamic and/or where 394 the received access token itself is an opaque reference rather 395 than a self-contained token. More information about introspection 396 in OAuth 2.0 can be found in [RFC7662]. 398 3.2. CoAP 400 CoAP is an application layer protocol similar to HTTP, but 401 specifically designed for constrained environments. CoAP typically 402 uses datagram-oriented transport, such as UDP, where reordering and 403 loss of packets can occur. A security solution needs to take the 404 latter aspects into account. 406 While HTTP uses headers and query strings to convey additional 407 information about a request, CoAP encodes such information into 408 header parameters called 'options'. 410 CoAP supports application-layer fragmentation of the CoAP payloads 411 through blockwise transfers [RFC7959]. However, blockwise transfer 412 does not increase the size limits of CoAP options, therefore data 413 encoded in options has to be kept small. 415 Transport layer security for CoAP can be provided by DTLS 1.2 416 [RFC6347] or TLS 1.2 [RFC5246]. CoAP defines a number of proxy 417 operations that require transport layer security to be terminated at 418 the proxy. One approach for protecting CoAP communication end-to-end 419 through proxies, and also to support security for CoAP over a 420 different transport in a uniform way, is to provide security at the 421 application layer using an object-based security mechanism such as 422 COSE [RFC8152]. 424 One application of COSE is OSCOAP [I-D.ietf-core-object-security], 425 which provides end-to-end confidentiality, integrity and replay 426 protection, and a secure binding between CoAP request and response 427 messages. In OSCOAP, the CoAP messages are wrapped in COSE objects 428 and sent using CoAP. 430 This framework RECOMMENDS the use of CoAP as replacement for HTTP. 432 4. Protocol Interactions 434 The ACE framework is based on the OAuth 2.0 protocol interactions 435 using the token endpoint and optionally the introspection endpoint. 436 A client obtains an access token from an AS using the token endpoint 437 and subsequently presents the access token to a RS to gain access to 438 a protected resource. In most deployments the RS can process the 439 access token locally, however in some cases the RS may present it to 440 the AS via the introspection endpoint to get fresh information. 441 These interactions are shown in Figure 1. An overview of various 442 OAuth concepts is provided in Section 3.1. 444 The OAuth 2.0 framework defines a number of "protocol flows" via 445 grant types, which have been extended further with extensions to 446 OAuth 2.0 (such as RFC 7521 [RFC7521] and 447 [I-D.ietf-oauth-device-flow]). What grant types works best depends 448 on the usage scenario and RFC 7744 [RFC7744] describes many different 449 IoT use cases but there are two preferred grant types, namely the 450 Authorization Code Grant (described in Section 4.1 of [RFC7521]) and 451 the Client Credentials Grant (described in Section 4.4 of [RFC7521]). 452 The Authorization Code Grant is a good fit for use with apps running 453 on smart phones and tablets that request access to IoT devices, a 454 common scenario in the smart home environment, where users need to go 455 through an authentication and authorization phase (at least during 456 the initial setup phase). The native apps guidelines described in 457 [RFC8252] are applicable to this use case. The Client Credential 458 Grant is a good fit for use with IoT devices where the OAuth client 459 itself is constrained. In such a case, the resource owner has pre- 460 arranged access rights for the client with the authorization server, 461 which is often accomplished using a commissioning tool. 463 The consent of the resource owner, for giving a client access to a 464 protected resource, can be provided dynamically as in the traditional 465 OAuth flows, or it could be pre-configured by the resource owner as 466 authorization policies at the AS, which the AS evaluates when a token 467 request arrives. The resource owner and the requesting party (i.e., 468 client owner) are not shown in Figure 1. 470 This framework supports a wide variety of communication security 471 mechanisms between the ACE entities, such as client, AS, and RS. It 472 is assumed that the client has been registered (also called enrolled 473 or onboarded) to an AS using a mechanism defined outside the scope of 474 this document. In practice, various techniques for onboarding have 475 been used, such as factory-based provisioning or the use of 476 commissioning tools. Regardless of the onboarding technique, this 477 provisioning procedure implies that the client and the AS exchange 478 credentials and configuration parameters. These credentials are used 479 to mutually authenticate each other and to protect messages exchanged 480 between the client and the AS. 482 It is also assumed that the RS has been registered with the AS, 483 potentially in a similar way as the client has been registered with 484 the AS. Established keying material between the AS and the RS allows 485 the AS to apply cryptographic protection to the access token to 486 ensure that its content cannot be modified, and if needed, that the 487 content is confidentiality protected. 489 The keying material necessary for establishing communication security 490 between C and RS is dynamically established as part of the protocol 491 described in this document. 493 At the start of the protocol, there is an optional discovery step 494 where the client discovers the resource server and the resources this 495 server hosts. In this step, the client might also determine what 496 permissions are needed to access the protected resource. A generic 497 procedure is described in Section 5.1, profiles MAY define other 498 procedures for discovery. 500 In Bluetooth Low Energy, for example, advertisements are broadcasted 501 by a peripheral, including information about the primary services. 502 In CoAP, as a second example, a client can make a request to "/.well- 503 known/core" to obtain information about available resources, which 504 are returned in a standardized format as described in [RFC6690]. 506 +--------+ +---------------+ 507 | |---(A)-- Token Request ------->| | 508 | | | Authorization | 509 | |<--(B)-- Access Token ---------| Server | 510 | | + RS Information | | 511 | | +---------------+ 512 | | ^ | 513 | | Introspection Request (D)| | 514 | Client | (optional) | | 515 | | Response | |(E) 516 | | (optional) | v 517 | | +--------------+ 518 | |---(C)-- Token + Request ----->| | 519 | | | Resource | 520 | |<--(F)-- Protected Resource ---| Server | 521 | | | | 522 +--------+ +--------------+ 524 Figure 1: Basic Protocol Flow. 526 Requesting an Access Token (A): 527 The client makes an access token request to the token endpoint at 528 the AS. This framework assumes the use of PoP access tokens (see 529 Section 3.1 for a short description) wherein the AS binds a key to 530 an access token. The client may include permissions it seeks to 531 obtain, and information about the credentials it wants to use 532 (e.g., symmetric/asymmetric cryptography or a reference to a 533 specific credential). 535 Access Token Response (B): 536 If the AS successfully processes the request from the client, it 537 returns an access token. It can also return additional 538 parameters, referred to as "RS Information". In addition to the 539 response parameters defined by OAuth 2.0 and the PoP access token 540 extension, this framework defines parameters that can be used to 541 inform the client about capabilities of the RS. More information 542 about these parameters can be found in Section 5.6.4. 544 Resource Request (C): 545 The client interacts with the RS to request access to the 546 protected resource and provides the access token. The protocol to 547 use between the client and the RS is not restricted to CoAP. 548 HTTP, HTTP/2, QUIC, MQTT, Bluetooth Low Energy, etc., are also 549 viable candidates. 551 Depending on the device limitations and the selected protocol, 552 this exchange may be split up into two parts: 554 (1) the client sends the access token containing, or 555 referencing, the authorization information to the RS, that may 556 be used for subsequent resource requests by the client, and 557 (2) the client makes the resource access request, using the 558 communication security protocol and other RS Information 559 obtained from the AS. 561 The Client and the RS mutually authenticate using the security 562 protocol specified in the profile (see step B) and the keys 563 obtained in the access token or the RS Information. The RS 564 verifies that the token is integrity protected by the AS and 565 compares the claims contained in the access token with the 566 resource request. If the RS is online, validation can be handed 567 over to the AS using token introspection (see messages D and E) 568 over HTTP or CoAP. 570 Token Introspection Request (D): 571 A resource server may be configured to introspect the access token 572 by including it in a request to the introspection endpoint at that 573 AS. Token introspection over CoAP is defined in Section 5.7 and 574 for HTTP in [RFC7662]. 576 Note that token introspection is an optional step and can be 577 omitted if the token is self-contained and the resource server is 578 prepared to perform the token validation on its own. 580 Token Introspection Response (E): 581 The AS validates the token and returns the most recent parameters, 582 such as scope, audience, validity etc. associated with it back to 583 the RS. The RS then uses the received parameters to process the 584 request to either accept or to deny it. 586 Protected Resource (F): 587 If the request from the client is authorized, the RS fulfills the 588 request and returns a response with the appropriate response code. 589 The RS uses the dynamically established keys to protect the 590 response, according to used communication security protocol. 592 5. Framework 594 The following sections detail the profiling and extensions of OAuth 595 2.0 for constrained environments, which constitutes the ACE 596 framework. 598 Credential Provisioning 599 For IoT, it cannot be assumed that the client and RS are part of a 600 common key infrastructure, so the AS provisions credentials or 601 associated information to allow mutual authentication. These 602 credentials need to be provided to the parties before or during 603 the authentication protocol is executed, and may be re-used for 604 subsequent token requests. 606 Proof-of-Possession 607 The ACE framework, by default, implements proof-of-possession for 608 access tokens, i.e., that the token holder can prove being a 609 holder of the key bound to the token. The binding is provided by 610 the "cnf" claim [I-D.ietf-ace-cwt-proof-of-possession] indicating 611 what key is used for proof-of-possession. If a client needs to 612 submit a new access token e.g., to obtain additional access 613 rights, they can request that the AS binds this token to the same 614 key as the previous one. 616 ACE Profiles 617 The client or RS may be limited in the encodings or protocols it 618 supports. To support a variety of different deployment settings, 619 specific interactions between client and RS are defined in an ACE 620 profile. In ACE framework the AS is expected to manage the 621 matching of compatible profile choices between a client and an RS. 622 The AS informs the client of the selected profile using the 623 "profile" parameter in the token response. 625 OAuth 2.0 requires the use of TLS both to protect the communication 626 between AS and client when requesting an access token; between client 627 and RS when accessing a resource and between AS and RS if 628 introspection is used. In constrained settings TLS is not always 629 feasible, or desirable. Nevertheless it is REQUIRED that the data 630 exchanged with the AS is encrypted and integrity protected. It is 631 furthermore REQUIRED that the AS and the endpoint communicating with 632 it (client or RS) perform mutual authentication. 634 Profiles MUST specify how mutual authentication is done, depending 635 e.g. on the communication protocol and the credentials used by the 636 client or the RS. 638 In OAuth 2.0 the communication with the Token and the Introspection 639 endpoints at the AS is assumed to be via HTTP and may use Uri-query 640 parameters. This framework RECOMMENDS to use CoAP instead and 641 RECOMMENDS the use of the following alternative instead of Uri-query 642 parameters: The sender (client or RS) encodes the parameters of its 643 request as a CBOR map and submits that map as the payload of the POST 644 request. The Content-format depends on the security applied to the 645 content and MUST be specified by the profile that is used. 647 The OAuth 2.0 AS uses a JSON structure in the payload of its 648 responses both to client and RS. This framework REQUIRES the use of 649 CBOR [RFC7049] instead. Depending on the profile, the CBOR payload 650 MAY be enclosed in a non-CBOR cryptographic wrapper. 652 5.1. Discovering Authorization Servers 654 In order to determine the AS in charge of a resource hosted at the 655 RS, C MAY send an initial Unauthorized Resource Request message to 656 RS. RS then denies the request and sends the address of its AS back 657 to C. 659 Instead of the initial Unauthorized Resource Request message, C MAY 660 look up the desired resource in a resource directory (cf. 661 [I-D.ietf-core-resource-directory]). 663 5.1.1. Unauthorized Resource Request Message 665 The optional Unauthorized Resource Request message is a request for a 666 resource hosted by RS for which no proper authorization is granted. 667 RS MUST treat any request for a protected resource as Unauthorized 668 Resource Request message when any of the following holds: 670 o The request has been received on an unprotected channel. 671 o RS has no valid access token for the sender of the request 672 regarding the requested action on that resource. 673 o RS has a valid access token for the sender of the request, but 674 this does not allow the requested action on the requested 675 resource. 677 Note: These conditions ensure that RS can handle requests 678 autonomously once access was granted and a secure channel has been 679 established between C and RS. The authz-info endpoint MUST NOT be 680 protected as specified above, in order to allow clients to upload 681 access tokens to RS (cf. Section 5.8.1). 683 Unauthorized Resource Request messages MUST be denied with a client 684 error response. In this response, the Resource Server SHOULD provide 685 proper AS Information to enable the Client to request an access token 686 from RS's AS as described in Section 5.1.2. 688 The response code MUST be 4.01 (Unauthorized) in case the sender of 689 the Unauthorized Resource Request message is not authenticated, or if 690 RS has no valid access token for C. If RS has an access token for C 691 but not for the resource that C has requested, RS MUST reject the 692 request with a 4.03 (Forbidden). If RS has an access token for C but 693 it does not cover the action C requested on the resource, RS MUST 694 reject the request with a 4.05 (Method Not Allowed). 696 Note: The use of the response codes 4.03 and 4.05 is intended to 697 prevent infinite loops where a dumb Client optimistically tries to 698 access a requested resource with any access token received from AS. 699 As malicious clients could pretend to be C to determine C's 700 privileges, these detailed response codes must be used only when a 701 certain level of security is already available which can be achieved 702 only when the Client is authenticated. 704 5.1.2. AS Information 706 The AS Information is sent by RS as a response to an Unauthorized 707 Resource Request message (see Section 5.1.1) to point the sender of 708 the Unauthorized Resource Request message to RS's AS. The AS 709 information is a set of attributes containing an absolute URI (see 710 Section 4.3 of [RFC3986]) that specifies the AS in charge of RS. 712 The message MAY also contain a nonce generated by RS to ensure 713 freshness in case that the RS and AS do not have synchronized clocks. 715 Figure 2 summarizes the parameters that may be part of the AS 716 Information. 718 /-------+----------+-------------\ 719 | Name | CBOR Key | Value Type | 720 |-------+----------+-------------| 721 | AS | 0 | text string | 722 | nonce | 5 | byte string | 723 \-------+----------+-------------/ 725 Figure 2: AS Information parameters 727 Figure 3 shows an example for an AS Information message payload using 728 CBOR [RFC7049] diagnostic notation, using the parameter names instead 729 of the CBOR keys for better human readability. 731 4.01 Unauthorized 732 Content-Format: application/ace+cbor 733 {AS: "coaps://as.example.com/token", 734 nonce: h'e0a156bb3f'} 736 Figure 3: AS Information payload example 738 In this example, the attribute AS points the receiver of this message 739 to the URI "coaps://as.example.com/token" to request access 740 permissions. The originator of the AS Information payload (i.e., RS) 741 uses a local clock that is loosely synchronized with a time scale 742 common between RS and AS (e.g., wall clock time). Therefore, it has 743 included a parameter "nonce" for replay attack prevention. 745 Note: There is an ongoing discussion how freshness of access 746 tokens 747 can be achieved in constrained environments. This specification 748 for now assumes that RS and AS do not have a common understanding 749 of time that allows RS to achieve its security objectives without 750 explicitly adding a nonce. 752 Figure 4 illustrates the mandatory to use binary encoding of the 753 message payload shown in Figure 3. 755 a2 # map(2) 756 00 # unsigned(0) (=AS) 757 78 1c # text(28) 758 636f6170733a2f2f61732e657861 759 6d706c652e636f6d2f746f6b656e # "coaps://as.example.com/token" 760 05 # unsigned(5) (=nonce) 761 45 # bytes(5) 762 e0a156bb3f 764 Figure 4: AS Information example encoded in CBOR 766 5.2. Authorization Grants 768 To request an access token, the client obtains authorization from the 769 resource owner or uses its client credentials as grant. The 770 authorization is expressed in the form of an authorization grant. 772 The OAuth framework defines four grant types. The grant types can be 773 split up into two groups, those granted on behalf of the resource 774 owner (password, authorization code, implicit) and those for the 775 client (client credentials). 777 The grant type is selected depending on the use case. In cases where 778 the client acts on behalf of the resource owner, authorization code 779 grant is recommended. If the client acts on behalf of the resource 780 owner, but does not have any display or very limited interaction 781 possibilities it is recommended to use the device code grant defined 782 in [I-D.ietf-oauth-device-flow]. In cases where the client does not 783 act on behalf of the resource owner, client credentials grant is 784 recommended. 786 For details on the different grant types, see the OAuth 2.0 framework 787 [RFC6749]. The OAuth 2.0 framework provides an extension mechanism 788 for defining additional grant types so profiles of this framework MAY 789 define additional grant types, if needed. 791 5.3. Client Credentials 793 Authentication of the client is mandatory independent of the grant 794 type when requesting the access token from the token endpoint. In 795 the case of client credentials grant type, the authentication and 796 grant coincide. 798 Client registration and provisioning of client credentials to the 799 client is out of scope for this specification. 801 The OAuth framework [RFC6749] defines one client credential type, 802 client id and client secret. [I-D.erdtman-ace-rpcc] adds raw-public- 803 key and pre-shared-key to the client credentials types. Profiles of 804 this framework MAY extend with additional client credentials client 805 certificates. 807 5.4. AS Authentication 809 Client credential does not, by default, authenticate the AS that the 810 client connects to. In classic OAuth, the AS is authenticated with a 811 TLS server certificate. 813 Profiles of this framework MUST specify how clients authenticate the 814 AS and how communication security is implemented, otherwise server 815 side TLS certificates, as defined by OAuth 2.0, are required. 817 5.5. The Authorization Endpoint 819 The authorization endpoint is used to interact with the resource 820 owner and obtain an authorization grant in certain grant flows. 821 Since it requires the use of a user agent (i.e., browser), it is not 822 expected that these types of grant flow will be used by constrained 823 clients. This endpoint is therefore out of scope for this 824 specification. Implementations should use the definition and 825 recommendations of [RFC6749] and [RFC6819]. 827 If clients involved cannot support HTTP and TLS, profiles MAY define 828 mappings for the authorization endpoint. 830 5.6. The Token Endpoint 832 In standard OAuth 2.0, the AS provides the token endpoint for 833 submitting access token requests. This framework extends the 834 functionality of the token endpoint, giving the AS the possibility to 835 help the client and RS to establish shared keys or to exchange their 836 public keys. Furthermore, this framework defines encodings using 837 CBOR, as a substitute for JSON. 839 The endpoint may, however, be exposed over HTTPS as in classical 840 OAuth or even other transports. A profile MUST define the details of 841 the mapping between the fields described below, and these transports. 842 If HTTPS is used, JSON or CBOR payloads may be supported. If JSON 843 payloads are used, the semantics of Section 4 of the OAuth 2.0 844 specification MUST be followed (with additions as described below). 845 If CBOR payload is supported, the semantics described below MUST be 846 followed. 848 For the AS to be able to issue a token, the client MUST be 849 authenticated and present a valid grant for the scopes requested. 850 Profiles of this framework MUST specify how the AS authenticates the 851 client and how the communication between client and AS is protected. 853 The default name of this endpoint in an url-path is 'token', however 854 implementations are not required to use this name and can define 855 their own instead. 857 The figures of this section use CBOR diagnostic notation without the 858 integer abbreviations for the parameters or their values for 859 illustrative purposes. Note that implementations MUST use the 860 integer abbreviations and the binary CBOR encoding, if the CBOR 861 encoding is used. 863 5.6.1. Client-to-AS Request 865 The client sends a POST request to the token endpoint at the AS. The 866 profile MUST specify the Content-Type and wrapping of the payload. 867 The content of the request consists of the parameters specified in 868 Section 4 of the OAuth 2.0 specification [RFC6749]. 870 If CBOR is used then this parameter is encoded as a CBOR map, where 871 the "scope" parameter can additionally be formatted as a byte array, 872 in order to allow compact encoding of complex scope structures. 874 When HTTP is used as a transport then the client makes a request to 875 the token endpoint by sending the parameters using the "application/ 876 x-www-form-urlencoded" format with a character encoding of UTF-8 in 877 the HTTP request entity-body, as defined in RFC 6749. 879 In addition to these parameters, this framework defines the following 880 parameters for requesting an access token from a token endpoint: 882 aud: 883 OPTIONAL. Specifies the audience for which the client is 884 requesting an access token. If this parameter is missing, it is 885 assumed that the client and the AS have a pre-established 886 understanding of the audience that an access token should address. 887 If a client submits a request for an access token without 888 specifying an "aud" parameter, and the AS does not have an 889 implicit understanding of the "aud" value for this client, then 890 the AS MUST respond with an error message using a response code 891 equivalent to the CoAP response code 4.00 (Bad Request). 893 cnf: 894 OPTIONAL. This field contains information about the key the 895 client would like to bind to the access token for proof-of- 896 possession. It is RECOMMENDED that an AS reject a request 897 containing a symmetric key value in the 'cnf' field, since the AS 898 is expected to be able to generate better symmetric keys than a 899 potentially constrained client. See Section 5.6.4.5 for more 900 details on the formatting of the 'cnf' parameter. 902 The following examples illustrate different types of requests for 903 proof-of-possession tokens. 905 Figure 5 shows a request for a token with a symmetric proof-of- 906 possession key. Note that in this example it is assumed that 907 transport layer communication security is used with a CBOR payload, 908 therefore the Content-Type is "application/cbor". The content is 909 displayed in CBOR diagnostic notation, without abbreviations for 910 better readability. 912 Header: POST (Code=0.02) 913 Uri-Host: "as.example.com" 914 Uri-Path: "token" 915 Content-Type: "application/cbor" 916 Payload: 917 { 918 "grant_type" : "client_credentials", 919 "client_id" : "myclient", 920 "aud" : "tempSensor4711" 921 } 923 Figure 5: Example request for an access token bound to a symmetric 924 key. 926 Figure 6 shows a request for a token with an asymmetric proof-of- 927 possession key. Note that in this example COSE is used to provide 928 object-security, therefore the Content-Type is "application/cose". 930 Header: POST (Code=0.02) 931 Uri-Host: "as.example.com" 932 Uri-Path: "token" 933 Content-Type: "application/cose" 934 Payload: 935 16( # COSE_ENCRYPTED 936 [ h'a1010a', # protected header: {"alg" : "AES-CCM-16-64-128"} 937 {5 : b64'ifUvZaHFgJM7UmGnjA'}, # unprotected header, IV 938 b64'WXThuZo6TMCaZZqi6ef/8WHTjOdGk8kNzaIhIQ' # ciphertext 939 ] 940 ) 942 Decrypted payload: 943 { 944 "grant_type" : "client_credentials", 945 "client_id" : "myclient", 946 "cnf" : { 947 "COSE_Key" : { 948 "kty" : "EC", 949 "kid" : h'11', 950 "crv" : "P-256", 951 "x" : b64'usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8', 952 "y" : b64'IBOL+C3BttVivg+lSreASjpkttcsz+1rb7btKLv8EX4' 953 } 954 } 955 } 957 Figure 6: Example token request bound to an asymmetric key. 959 Figure 7 shows a request for a token where a previously communicated 960 proof-of-possession key is only referenced. Note that a transport 961 layer based communication security profile with a CBOR payload is 962 assumed in this example, therefore the Content-Type is "application/ 963 cbor". Also note that the client performs a password based 964 authentication in this example by submitting its client_secret (see 965 Section 2.3.1 of [RFC6749]). 967 Header: POST (Code=0.02) 968 Uri-Host: "as.example.com" 969 Uri-Path: "token" 970 Content-Type: "application/cbor" 971 Payload: 972 { 973 "grant_type" : "client_credentials", 974 "client_id" : "myclient", 975 "client_secret" : "mysecret234", 976 "aud" : "valve424", 977 "scope" : "read", 978 "cnf" : { 979 "kid" : b64'6kg0dXJM13U' 980 } 981 } 983 Figure 7: Example request for an access token bound to a key 984 reference. 986 5.6.2. AS-to-Client Response 988 If the access token request has been successfully verified by the AS 989 and the client is authorized to obtain an access token corresponding 990 to its access token request, the AS sends a response with the 991 response code equivalent to the CoAP response code 2.01 (Created). 992 If client request was invalid, or not authorized, the AS returns an 993 error response as described in Section 5.6.3. 995 Note that the AS decides which token type and profile to use when 996 issuing a successful response. It is assumed that the AS has prior 997 knowledge of the capabilities of the client and the RS (see 998 Appendix D. This prior knowledge may, for example, be set by the use 999 of a dynamic client registration protocol exchange [RFC7591]. 1001 The content of the successful reply is the RS Information. When 1002 using CBOR payloads, the content MUST be encoded as CBOR map, 1003 containing parameters as specified in Section 5.1 of [RFC6749]. In 1004 addition to these parameters, the following parameters are also part 1005 of a successful response: 1007 profile: 1008 OPTIONAL. This indicates the profile that the client MUST use 1009 towards the RS. See Section 5.6.4.4 for the formatting of this 1010 parameter. 1012 . If this parameter is absent, the AS assumes that the client 1013 implicitly knows which profile to use towards the RS. 1014 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 Values | 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 Value | 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 | unsinged integer | 1244 | error_description | 16 | text string | 1245 | error_uri | 17 | text string | 1246 | grant_type | 18 | unsigned integer | 1247 | access_token | 19 | byte 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 | byte string | 1253 | cnf | 25 | map | 1254 | profile | 26 | unsigned integer | 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 | integer or floating-point number | 1406 | nbf | 5 | integer or floating-point number | 1407 | iat | 6 | integer or floating-point number | 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 | byte string | 1416 | token_type_hint | 28 | text string | 1417 | active | 29 | True or False | 1418 | rs_cnf | 30 | map | 1419 \-----------------+----------+----------------------------------/ 1421 Figure 15: CBOR Mappings to Token Introspection Parameters. 1423 5.8. The Access Token 1425 This framework RECOMMENDS the use of CBOR web token (CWT) as 1426 specified in [I-D.ietf-ace-cbor-web-token]. 1428 In order to facilitate offline processing of access tokens, this 1429 draft uses the "cnf" claim from 1430 [I-D.ietf-ace-cwt-proof-of-possession] and specifies the "scope" 1431 claim for both JSON and CBOR web tokens. 1433 The "scope" claim explicitly encodes the scope of a given access 1434 token. This claim follows the same encoding rules as defined in 1435 Section 3.3 of [RFC6749], but in addition implementers MAY use byte 1436 arrays as scope values, to achieve compact encoding of large scope 1437 elements. The meaning of a specific scope value is application 1438 specific and expected to be known to the RS running that application. 1440 5.8.1. The 'Authorization Information' Endpoint 1442 The access token, containing authorization information and 1443 information about the key used by the client, needs to be transported 1444 to the RS so that the RS can authenticate and authorize the client 1445 request. 1447 This section defines a method for transporting the access token to 1448 the RS using a RESTful protocol such as CoAP. Profiles of this 1449 framework MAY define other methods for token transport. 1451 The method consists of an authz-info endpoint, implemented by the RS. 1452 A client using this method MUST make a POST request to the authz-info 1453 endpoint at the RS with the access token in the payload. The RS 1454 receiving the token MUST verify the validity of the token. If the 1455 token is valid, the RS MUST respond to the POST request with 2.01 1456 (Created). This response MAY contain an identifier of the token 1457 (e.g., the cti for a CWT) as a payload, in order to allow the client 1458 to refer to the token. 1460 The RS MUST be prepared to store at least one access token for future 1461 use. This is a difference to how access tokens are handled in OAuth 1462 2.0, where the access token is typically sent along with each 1463 request, and therefore not stored at the RS. 1465 If the token is not valid, the RS MUST respond with a response code 1466 equivalent to the CoAP code 4.01 (Unauthorized). If the token is 1467 valid but the audience of the token does not match the RS, the RS 1468 MUST respond with a response code equivalent to the CoAP code 4.03 1469 (Forbidden). If the token is valid but is associated to claims that 1470 the RS cannot process (e.g., an unknown scope) the RS MUST respond 1471 with a response code equivalent to the CoAP code 4.00 (Bad Request). 1472 In the latter case the RS MAY provide additional information in the 1473 error response, in order to clarify what went wrong. 1475 The RS MAY make an introspection request to validate the token before 1476 responding to the POST request to the authz-info endpoint. 1478 Profiles MUST specify how the authz-info endpoint is protected. Note 1479 that since the token contains information that allow the client and 1480 the RS to establish a security context in the first place, mutual 1481 authentication may not be possible at this point. 1483 The default name of this endpoint in an url-path is 'authz-info', 1484 however implementations are not required to use this name and can 1485 define their own instead. 1487 5.8.2. Token Expiration 1489 Depending on the capabilities of the RS, there are various ways in 1490 which it can verify the validity of a received access token. Here 1491 follows a list of the possibilities including what functionality they 1492 require of the RS. 1494 o The token is a CWT and includes an "exp" claim and possibly the 1495 "nbf" claim. The RS verifies these by comparing them to values 1496 from its internal clock as defined in [RFC7519]. In this case the 1497 RS's internal clock must reflect the current date and time, or at 1498 least be synchronized with the AS's clock. How this clock 1499 synchronization would be performed is out of scope for this 1500 specification. 1501 o The RS verifies the validity of the token by performing an 1502 introspection request as specified in Section 5.7. This requires 1503 the RS to have a reliable network connection to the AS and to be 1504 able to handle two secure sessions in parallel (C to RS and AS to 1505 RS). 1506 o The RS and the AS both store a sequence number linked to their 1507 common security association. The AS increments this number for 1508 each access token it issues and includes it in the access token, 1509 which is a CWT. The RS keeps track of the most recently received 1510 sequence number, and only accepts tokens as valid, that are in a 1511 certain range around this number. This method does only require 1512 the RS to keep track of the sequence number. The method does not 1513 provide timely expiration, but it makes sure that older tokens 1514 cease to be valid after a certain number of newer ones got issued. 1515 For a constrained RS with no network connectivity and no means of 1516 reliably measuring time, this is the best that can be achieved. 1518 If a token that authorizes a long running request such as a CoAP 1519 Observe [RFC7641] expires, the RS MUST send an error response with 1520 the response code 4.01 Unauthorized to the client and then terminate 1521 processing the long running request. 1523 6. Security Considerations 1525 Security considerations applicable to authentication and 1526 authorization in RESTful environments provided in OAuth 2.0 [RFC6749] 1527 apply to this work, as well as the security considerations from 1528 [I-D.ietf-ace-actors]. Furthermore [RFC6819] provides additional 1529 security considerations for OAuth which apply to IoT deployments as 1530 well. 1532 A large range of threats can be mitigated by protecting the contents 1533 of the access token by using a digital signature or a keyed message 1534 digest (MAC) or an Authenticated Encryption with Associated Data 1535 (AEAD) algorithm. Consequently, the token integrity protection MUST 1536 be applied to prevent the token from being modified, particularly 1537 since it contains a reference to the symmetric key or the asymmetric 1538 key. If the access token contains the symmetric key, this symmetric 1539 key MUST be encrypted by the authorization server so that only the 1540 resource server can decrypt it. Note that using an AEAD algorithm is 1541 preferable over using a MAC unless the message needs to be publicly 1542 readable. 1544 It is important for the authorization server to include the identity 1545 of the intended recipient (the audience), typically a single resource 1546 server (or a list of resource servers), in the token. Using a single 1547 shared secret with multiple resource servers to simplify key 1548 management is NOT RECOMMENDED since the benefit from using the proof- 1549 of-possession concept is significantly reduced. 1551 The authorization server MUST offer confidentiality protection for 1552 any interactions with the client. This step is extremely important 1553 since the client may obtain the proof-of-possession key from the 1554 authorization server for use with a specific access token. Not using 1555 confidentiality protection exposes this secret (and the access token) 1556 to an eavesdropper thereby completely negating proof-of-possession 1557 security. Profiles MUST specify how confidentiality protection is 1558 provided, and additional protection can be applied by encrypting the 1559 token, for example encryption of CWTs is specified in Section 5.1 of 1560 [I-D.ietf-ace-cbor-web-token]. 1562 Developers MUST ensure that the ephemeral credentials (i.e., the 1563 private key or the session key) are not leaked to third parties. An 1564 adversary in possession of the ephemeral credentials bound to the 1565 access token will be able to impersonate the client. Be aware that 1566 this is a real risk with many constrained environments, since 1567 adversaries can often easily get physical access to the devices. 1569 Clients can at any time request a new proof-of-possession capable 1570 access token. If clients have that capability, the AS can keep the 1571 lifetime of the access token and the associated proof-of-possession 1572 key short and therefore use shorter proof-of-possession key sizes, 1573 which translate to a performance benefit for the client and for the 1574 resource server. Shorter keys also lead to shorter messages 1575 (particularly with asymmetric keying material). 1577 When authorization servers bind symmetric keys to access tokens, they 1578 SHOULD scope these access tokens to a specific permissions. 1579 Furthermore access tokens using symmetric keys for proof-of- 1580 possession SHOULD NOT be targeted at an audience that contains more 1581 than one RS, since otherwise any RS in the audience that receives 1582 that access token can impersonate the client towards the other 1583 members of the audience. 1585 6.1. Unprotected AS Information 1587 Initially, no secure channel exists to protect the communication 1588 between C and RS. Thus, C cannot determine if the AS information 1589 contained in an unprotected response from RS to an unauthorized 1590 request (c.f. Section 5.1.2) is authentic. It is therefore 1591 advisable to provide C with a (possibly hard-coded) list of 1592 trustworthy authorization servers. AS information responses 1593 referring to a URI not listed there would be ignored. 1595 6.2. Use of Nonces for Replay Protection 1597 RS may add a nonce to the AS Information message sent as a response 1598 to an unauthorized request to ensure freshness of an Access Token 1599 subsequently presented to RS. While a timestamp of some granularity 1600 would be sufficient to protect against replay attacks, using 1601 randomized nonce is preferred to prevent disclosure of information 1602 about RS's internal clock characteristics. 1604 6.3. Combining profiles 1606 There may exist reasonable use cases where implementers want to 1607 combine different profiles of this framework, e.g., using an MQTT 1608 profile between client and RS, while using a DTLS profile for 1609 interactions between client and AS. Profiles should be designed in a 1610 way that the security of a protocol interaction does not depend on 1611 the specific security mechanisms used in other protocol interactions. 1613 6.4. Error responses 1615 The various error responses defined in this framework may leak 1616 information to an adversary. For example errors responses for 1617 requests to the Authorization Information endpoint can reveal 1618 information about an otherwise opaque access token to an adversary 1619 who has intercepted this token. This framework is written under the 1620 assumption that, in general, the benefits of detailed error messages 1621 outweigh the risk due to information leakage. For particular use 1622 cases, where this assessment does not apply, detailed error messages 1623 can be replaced by more generic ones. 1625 7. Privacy Considerations 1627 Implementers and users should be aware of the privacy implications of 1628 the different possible deployments of this framework. 1630 The AS is in a very central position and can potentially learn 1631 sensitive information about the clients requesting access tokens. If 1632 the client credentials grant is used, the AS can track what kind of 1633 access the client intends to perform. With other grants this can be 1634 prevented by the Resource Owner. To do so, the resource owner needs 1635 to bind the grants it issues to anonymous, ephemeral credentials that 1636 do not allow the AS to link different grants and thus different 1637 access token requests by the same client. 1639 If access tokens are only integrity protected and not encrypted, they 1640 may reveal information to attackers listening on the wire, or able to 1641 acquire the access tokens in some other way. In the case of CWTs the 1642 token may e.g., reveal the audience, the scope and the confirmation 1643 method used by the client. The latter may reveal the identity of the 1644 device or application running the client. This may be linkable to 1645 the identity of the person using the client (if there is a person and 1646 not a machine-to-machine interaction). 1648 Clients using asymmetric keys for proof-of-possession should be aware 1649 of the consequences of using the same key pair for proof-of- 1650 possession towards different RSs. A set of colluding RSs or an 1651 attacker able to obtain the access tokens will be able to link the 1652 requests, or even to determine the client's identity. 1654 An unprotected response to an unauthorized request (c.f. 1655 Section 5.1.2) may disclose information about RS and/or its existing 1656 relationship with C. It is advisable to include as little 1657 information as possible in an unencrypted response. Means of 1658 encrypting communication between C and RS already exist, more 1659 detailed information may be included with an error response to 1660 provide C with sufficient information to react on that particular 1661 error. 1663 8. IANA Considerations 1665 This specification registers new parameters for OAuth and establishes 1666 registries for mappings to CBOR abbreviations. 1668 8.1. Authorization Server Information 1670 A new registry will be requested from IANA, entitled "Authorization 1671 Server Information". The registry is to be created as Expert Review 1672 Required. 1674 The columns of this table are: 1676 Name The name of the parameter 1677 CBOR Key The unsigned integer value abbreviating this parameter 1678 name. Registration in the table is based on the value of the 1679 mapping requested. Integer values between 1 and 255 are 1680 designated as Standards Track Document required. Integer values 1681 from 256 to 65535 are designated as Specification Required. 1682 Integer values greater than 65535 are designated as private use. 1683 Value Type The CBOR data types allowable for the values of this 1684 parameter. 1685 Reference This contains a pointer to the public specification of the 1686 grant type abbreviation, if one exists. 1688 This registry will be initially populated by the values in Figure 2. 1689 The Reference column for all of these entries will be this document. 1691 8.2. OAuth Error Code CBOR Mappings Registry 1693 A new registry will be requested from IANA, entitled "OAuth Error 1694 Code CBOR Mappings Registry". The registry is to be created as 1695 Expert Review Required. 1697 The columns of this table are: 1699 Name The OAuth Error Code name, refers to the name in Section 5.2. 1700 of [RFC6749] e.g., "invalid_request". 1701 CBOR Value The unsigned integer value abbreviating this error code. 1702 Registration in the table is based on the value of the mapping 1703 requested. Integer values between 1 and 255 are designated as 1704 Standards Track Document required. Integer values from 256 to 1705 65535 are designated as Specification Required. Integer values 1706 greater than 65535 are designated as private use. 1708 Reference This contains a pointer to the public specification of the 1709 grant type abbreviation, if one exists. 1711 This registry will be initially populated by the values in Figure 10. 1712 The Reference column for all of these entries will be this document. 1714 8.3. OAuth Grant Type CBOR Mappings 1716 A new registry will be requested from IANA, entitled "OAuth Grant 1717 Type CBOR Mappings". The registry is to be created as Expert Review 1718 Required. 1720 The columns of this table are: 1722 Name The name of the grant type as specified in Section 1.3 of 1723 [RFC6749]. 1724 CBOR Value The unsigned integer value abbreviating this grant type. 1725 Registration in the table is based on the value of the mapping 1726 requested. Integer values between 1 and 255 are designated as 1727 Standards Track Document required. Integer values from 256 to 1728 65535 are designated as Specification Required. Integer values 1729 greater than 65535 are designated as private use. 1730 Reference This contains a pointer to the public specification of the 1731 grant type abbreviation, if one exists. 1732 Original Specification This contains a pointer to the public 1733 specification of the grant type, if one exists. 1735 This registry will be initially populated by the values in Figure 11. 1736 The Reference column for all of these entries will be this document. 1738 8.4. OAuth Access Token Types 1740 This specification registers the following new token type in the 1741 OAuth Access Token Types Registry 1743 o Name: "PoP" 1744 o Change Controller: IETF 1745 o Reference: [this document] 1747 8.5. OAuth Token Type CBOR Mappings 1749 A new registry will be requested from IANA, entitled "Token Type CBOR 1750 Mappings". The registry is to be created as Expert Review Required. 1752 The columns of this table are: 1754 Name The name of token type as registered in the OAuth Access Token 1755 Types registry e.g., "Bearer". 1757 CBOR Value The unsigned integer value abbreviating this access token 1758 type. Registration in the table is based on the value of the 1759 mapping requested. Integer values between 1 and 255 are 1760 designated as Standards Track Document required. Integer values 1761 from 256 to 65535 are designated as Specification Required. 1762 Integer values greater than 65535 are designated as private use. 1763 Reference This contains a pointer to the public specification of the 1764 OAuth token type abbreviation, if one exists. 1765 Original Specification This contains a pointer to the public 1766 specification of the grant type, if one exists. 1768 8.5.1. Initial Registry Contents 1770 o Name: "Bearer" 1771 o Value: 1 1772 o Reference: [this document] 1773 o Original Specification: [RFC6749] 1775 o Name: "pop" 1776 o Value: 2 1777 o Reference: [this document] 1778 o Original Specification: [this document] 1780 8.6. ACE OAuth Profile Registry 1782 A new registry will be requested from IANA, entitled "ACE Profile 1783 Registry". The registry is to be created as Expert Review Required. 1785 The columns of this table are: 1787 Name The name of the profile, to be used as value of the profile 1788 attribute. 1789 Description Text giving an overview of the profile and the context 1790 it is developed for. 1791 CBOR Value The unsigned integer value abbreviating this profile 1792 name. Registration in the table is based on the value of the 1793 mapping requested. Integer values between 1 and 255 are 1794 designated as Standards Track Document required. Integer values 1795 from 256 to 65535 are designated as Specification Required. 1796 Integer values greater than 65535 are designated as private use. 1797 Reference This contains a pointer to the public specification of the 1798 profile abbreviation, if one exists. 1800 8.7. OAuth Parameter Registration 1802 This specification registers the following parameters in the OAuth 1803 Parameters Registry: 1805 o Name: "aud" 1806 o Parameter Usage Location: authorization request, token request 1807 o Change Controller: IESG 1808 o Reference: Section 5.6.1 of [this document] 1810 o Name: "profile" 1811 o Parameter Usage Location: token response 1812 o Change Controller: IESG 1813 o Reference: Section 5.6.4.4 of [this document] 1815 o Name: "cnf" 1816 o Parameter Usage Location: token request, token response 1817 o Change Controller: IESG 1818 o Reference: Section 5.6.4.5 of [this document] 1820 o Name: "rs_cnf" 1821 o Parameter Usage Location: token response 1822 o Change Controller: IESG 1823 o Reference: Section 5.6.4.5 of [this document] 1825 8.8. OAuth CBOR Parameter Mappings Registry 1827 A new registry will be requested from IANA, entitled "Token Endpoint 1828 CBOR Mappings Registry". The registry is to be created as Expert 1829 Review Required. 1831 The columns of this table are: 1833 Name The OAuth Parameter name, refers to the name in the OAuth 1834 parameter registry e.g., "client_id". 1835 CBOR Key The unsigned integer value abbreviating this parameter. 1836 Registration in the table is based on the value of the mapping 1837 requested. Integer values between 1 and 255 are designated as 1838 Standards Track Document required. Integer values from 256 to 1839 65535 are designated as Specification Required. Integer values 1840 greater than 65535 are designated as private use. 1841 Value Type The allowable CBOR data types for values of this 1842 parameter. 1843 Reference This contains a pointer to the public specification of the 1844 grant type abbreviation, if one exists. 1846 This registry will be initially populated by the values in Figure 12. 1847 The Reference column for all of these entries will be this document. 1849 Note that these mappings intentionally coincide with the CWT claim 1850 name mappings from [I-D.ietf-ace-cbor-web-token]. 1852 8.9. OAuth Introspection Response Parameter Registration 1854 This specification registers the following parameters in the OAuth 1855 Token Introspection Response registry. 1857 o Name: "cnf" 1858 o Description: Key to prove the right to use a PoP token. 1859 o Change Controller: IESG 1860 o Reference: Section 5.7.2 of [this document] 1862 o Name: "profile" 1863 o Description: The communication and communication security profile 1864 used between client and RS, as defined in ACE profiles. 1865 o Change Controller: IESG 1866 o Reference: Section 5.7.2 of [this document] 1868 8.10. Introspection Endpoint CBOR Mappings Registry 1870 A new registry will be requested from IANA, entitled "Introspection 1871 Endpoint CBOR Mappings Registry". The registry is to be created as 1872 Expert Review Required. 1874 The columns of this table are: 1876 Name The OAuth Parameter name, refers to the name in the OAuth 1877 parameter registry e.g., "client_id". 1878 CBOR Key The unsigned integer value abbreviating this parameter. 1879 Registration in the table is based on the value of the mapping 1880 requested. Integer values between 1 and 255 are designated as 1881 Standards Track Document required. Integer values from 256 to 1882 65535 are designated as Specification Required. Integer values 1883 greater than 65535 are designated as private use. 1884 Value Type The allowable CBOR data types for values of this 1885 parameter. 1886 Reference This contains a pointer to the public specification of the 1887 grant type abbreviation, if one exists. 1889 This registry will be initially populated by the values in Figure 15. 1890 The Reference column for all of these entries will be this document. 1892 8.11. JSON Web Token Claims 1894 This specification registers the following new claims in the JSON Web 1895 Token (JWT) registry of JSON Web Token Claims: 1897 o Claim Name: "scope" 1898 o Claim Description: The scope of an access token as defined in 1899 [RFC6749]. 1901 o Change Controller: IESG 1902 o Reference: Section 5.8 of [this document] 1904 8.12. CBOR Web Token Claims 1906 This specification registers the following new claims in the CBOR Web 1907 Token (CWT) registry of CBOR Web Token Claim:s 1909 o Claim Name: "scope" 1910 o Claim Description: The scope of an access token as defined in 1911 [RFC6749]. 1912 o JWT Claim Name: N/A 1913 o Claim Key: 12 1914 o Claim Value Type(s): 0 (uint), 2 (byte string), 3 (text string) 1915 o Change Controller: IESG 1916 o Specification Document(s): Section 5.8 of [this document] 1918 8.13. CoAP Option Number Registration 1920 This section registers the "Access-Token" CoAP Option Number in the 1921 "CoRE Parameters" sub-registry "CoAP Option Numbers" in the manner 1922 described in [RFC7252]. 1924 o Name: "Access-Token" 1925 o Number: TBD 1926 o Reference: [this document]. 1927 o Meaning in Request: Contains an Access Token according to [this 1928 document] containing access permissions of the client. 1929 o Meaning in Response: Not used in response. 1930 o Safe-to-Forward: Yes 1931 o Format: Based on the observer the format is perceived differently. 1932 Opaque data to the client and CWT or reference token to the RS. 1933 o Length: Less than 255 bytes 1935 9. Acknowledgments 1937 This document is a product of the ACE working group of the IETF. 1939 Thanks to Eve Maler for her contributions to the use of OAuth 2.0 and 1940 UMA in IoT scenarios, Robert Taylor for his discussion input, and 1941 Malisa Vucinic for his input on the predecessors of this proposal. 1943 Thanks to the authors of draft-ietf-oauth-pop-key-distribution, from 1944 where large parts of the security considerations where copied. 1946 Thanks to Stefanie Gerdes, Olaf Bergmann, and Carsten Bormann for 1947 contributing their work on AS discovery from draft-gerdes-ace-dcaf- 1948 authorize (see Section 5.1). 1950 Ludwig Seitz and Goeran Selander worked on this document as part of 1951 the CelticPlus project CyberWI, with funding from Vinnova. 1953 10. References 1955 10.1. Normative References 1957 [I-D.ietf-ace-cbor-web-token] 1958 Jones, M., Wahlstroem, E., Erdtman, S., and H. Tschofenig, 1959 "CBOR Web Token (CWT)", draft-ietf-ace-cbor-web-token-14 1960 (work in progress), March 2018. 1962 [I-D.ietf-ace-cwt-proof-of-possession] 1963 Jones, M., Seitz, L., Selander, G., Wahlstroem, E., 1964 Erdtman, S., and H. Tschofenig, "Proof-of-Possession Key 1965 Semantics for CBOR Web Tokens (CWTs)", draft-ietf-ace-cwt- 1966 proof-of-possession-02 (work in progress), March 2018. 1968 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1969 Requirement Levels", BCP 14, RFC 2119, 1970 DOI 10.17487/RFC2119, March 1997, . 1973 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 1974 Resource Identifier (URI): Generic Syntax", STD 66, 1975 RFC 3986, DOI 10.17487/RFC3986, January 2005, 1976 . 1978 [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer 1979 Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, 1980 January 2012, . 1982 [RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained 1983 Application Protocol (CoAP)", RFC 7252, 1984 DOI 10.17487/RFC7252, June 2014, . 1987 [RFC7662] Richer, J., Ed., "OAuth 2.0 Token Introspection", 1988 RFC 7662, DOI 10.17487/RFC7662, October 2015, 1989 . 1991 [RFC7800] Jones, M., Bradley, J., and H. Tschofenig, "Proof-of- 1992 Possession Key Semantics for JSON Web Tokens (JWTs)", 1993 RFC 7800, DOI 10.17487/RFC7800, April 2016, 1994 . 1996 [RFC8152] Schaad, J., "CBOR Object Signing and Encryption (COSE)", 1997 RFC 8152, DOI 10.17487/RFC8152, July 2017, 1998 . 2000 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2001 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2002 May 2017, . 2004 10.2. Informative References 2006 [I-D.erdtman-ace-rpcc] 2007 Seitz, L. and S. Erdtman, "Raw-Public-Key and Pre-Shared- 2008 Key as OAuth client credentials", draft-erdtman-ace- 2009 rpcc-02 (work in progress), October 2017. 2011 [I-D.ietf-ace-actors] 2012 Gerdes, S., Seitz, L., Selander, G., and C. Bormann, "An 2013 architecture for authorization in constrained 2014 environments", draft-ietf-ace-actors-06 (work in 2015 progress), November 2017. 2017 [I-D.ietf-core-object-security] 2018 Selander, G., Mattsson, J., Palombini, F., and L. Seitz, 2019 "Object Security for Constrained RESTful Environments 2020 (OSCORE)", draft-ietf-core-object-security-10 (work in 2021 progress), March 2018. 2023 [I-D.ietf-core-resource-directory] 2024 Shelby, Z., Koster, M., Bormann, C., Stok, P., and C. 2025 Amsuess, "CoRE Resource Directory", draft-ietf-core- 2026 resource-directory-13 (work in progress), March 2018. 2028 [I-D.ietf-oauth-device-flow] 2029 Denniss, W., Bradley, J., Jones, M., and H. Tschofenig, 2030 "OAuth 2.0 Device Flow for Browserless and Input 2031 Constrained Devices", draft-ietf-oauth-device-flow-07 2032 (work in progress), October 2017. 2034 [I-D.ietf-oauth-discovery] 2035 Jones, M., Sakimura, N., and J. Bradley, "OAuth 2.0 2036 Authorization Server Metadata", draft-ietf-oauth- 2037 discovery-10 (work in progress), March 2018. 2039 [Margi10impact] 2040 Margi, C., de Oliveira, B., de Sousa, G., Simplicio Jr, 2041 M., Barreto, P., Carvalho, T., Naeslund, M., and R. Gold, 2042 "Impact of Operating Systems on Wireless Sensor Networks 2043 (Security) Applications and Testbeds", Proceedings of 2044 the 19th International Conference on Computer 2045 Communications and Networks (ICCCN), 2010 August. 2047 [RFC4949] Shirey, R., "Internet Security Glossary, Version 2", 2048 FYI 36, RFC 4949, DOI 10.17487/RFC4949, August 2007, 2049 . 2051 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 2052 (TLS) Protocol Version 1.2", RFC 5246, 2053 DOI 10.17487/RFC5246, August 2008, . 2056 [RFC6690] Shelby, Z., "Constrained RESTful Environments (CoRE) Link 2057 Format", RFC 6690, DOI 10.17487/RFC6690, August 2012, 2058 . 2060 [RFC6749] Hardt, D., Ed., "The OAuth 2.0 Authorization Framework", 2061 RFC 6749, DOI 10.17487/RFC6749, October 2012, 2062 . 2064 [RFC6819] Lodderstedt, T., Ed., McGloin, M., and P. Hunt, "OAuth 2.0 2065 Threat Model and Security Considerations", RFC 6819, 2066 DOI 10.17487/RFC6819, January 2013, . 2069 [RFC7049] Bormann, C. and P. Hoffman, "Concise Binary Object 2070 Representation (CBOR)", RFC 7049, DOI 10.17487/RFC7049, 2071 October 2013, . 2073 [RFC7228] Bormann, C., Ersue, M., and A. Keranen, "Terminology for 2074 Constrained-Node Networks", RFC 7228, 2075 DOI 10.17487/RFC7228, May 2014, . 2078 [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 2079 Protocol (HTTP/1.1): Semantics and Content", RFC 7231, 2080 DOI 10.17487/RFC7231, June 2014, . 2083 [RFC7519] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token 2084 (JWT)", RFC 7519, DOI 10.17487/RFC7519, May 2015, 2085 . 2087 [RFC7521] Campbell, B., Mortimore, C., Jones, M., and Y. Goland, 2088 "Assertion Framework for OAuth 2.0 Client Authentication 2089 and Authorization Grants", RFC 7521, DOI 10.17487/RFC7521, 2090 May 2015, . 2092 [RFC7591] Richer, J., Ed., Jones, M., Bradley, J., Machulak, M., and 2093 P. Hunt, "OAuth 2.0 Dynamic Client Registration Protocol", 2094 RFC 7591, DOI 10.17487/RFC7591, July 2015, 2095 . 2097 [RFC7641] Hartke, K., "Observing Resources in the Constrained 2098 Application Protocol (CoAP)", RFC 7641, 2099 DOI 10.17487/RFC7641, September 2015, . 2102 [RFC7744] Seitz, L., Ed., Gerdes, S., Ed., Selander, G., Mani, M., 2103 and S. Kumar, "Use Cases for Authentication and 2104 Authorization in Constrained Environments", RFC 7744, 2105 DOI 10.17487/RFC7744, January 2016, . 2108 [RFC7959] Bormann, C. and Z. Shelby, Ed., "Block-Wise Transfers in 2109 the Constrained Application Protocol (CoAP)", RFC 7959, 2110 DOI 10.17487/RFC7959, August 2016, . 2113 [RFC8252] Denniss, W. and J. Bradley, "OAuth 2.0 for Native Apps", 2114 BCP 212, RFC 8252, DOI 10.17487/RFC8252, October 2017, 2115 . 2117 [RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data 2118 Interchange Format", STD 90, RFC 8259, 2119 DOI 10.17487/RFC8259, December 2017, . 2122 Appendix A. Design Justification 2124 This section provides further insight into the design decisions of 2125 the solution documented in this document. Section 3 lists several 2126 building blocks and briefly summarizes their importance. The 2127 justification for offering some of those building blocks, as opposed 2128 to using OAuth 2.0 as is, is given below. 2130 Common IoT constraints are: 2132 Low Power Radio: 2134 Many IoT devices are equipped with a small battery which needs to 2135 last for a long time. For many constrained wireless devices, the 2136 highest energy cost is associated to transmitting or receiving 2137 messages (roughly by a factor of 10 compared to e.g. AES) 2138 [Margi10impact]. It is therefore important to keep the total 2139 communication overhead low, including minimizing the number and 2140 size of messages sent and received, which has an impact of choice 2141 on the message format and protocol. By using CoAP over UDP and 2142 CBOR encoded messages, some of these aspects are addressed. 2143 Security protocols contribute to the communication overhead and 2144 can, in some cases, be optimized. For example, authentication and 2145 key establishment may, in certain cases where security 2146 requirements allow, be replaced by provisioning of security 2147 context by a trusted third party, using transport or application 2148 layer security. 2150 Low CPU Speed: 2152 Some IoT devices are equipped with processors that are 2153 significantly slower than those found in most current devices on 2154 the Internet. This typically has implications on what timely 2155 cryptographic operations a device is capable of performing, which 2156 in turn impacts e.g., protocol latency. Symmetric key 2157 cryptography may be used instead of the computationally more 2158 expensive public key cryptography where the security requirements 2159 so allows, but this may also require support for trusted third 2160 party assisted secret key establishment using transport or 2161 application layer security. 2162 Small Amount of Memory: 2164 Microcontrollers embedded in IoT devices are often equipped with 2165 small amount of RAM and flash memory, which places limitations 2166 what kind of processing can be performed and how much code can be 2167 put on those devices. To reduce code size fewer and smaller 2168 protocol implementations can be put on the firmware of such a 2169 device. In this case, CoAP may be used instead of HTTP, symmetric 2170 key cryptography instead of public key cryptography, and CBOR 2171 instead of JSON. Authentication and key establishment protocol, 2172 e.g., the DTLS handshake, in comparison with assisted key 2173 establishment also has an impact on memory and code. 2175 User Interface Limitations: 2177 Protecting access to resources is both an important security as 2178 well as privacy feature. End users and enterprise customers may 2179 not want to give access to the data collected by their IoT device 2180 or to functions it may offer to third parties. Since the 2181 classical approach of requesting permissions from end users via a 2182 rich user interface does not work in many IoT deployment 2183 scenarios, these functions need to be delegated to user-controlled 2184 devices that are better suitable for such tasks, such as smart 2185 phones and tablets. 2187 Communication Constraints: 2189 In certain constrained settings an IoT device may not be able to 2190 communicate with a given device at all times. Devices may be 2191 sleeping, or just disconnected from the Internet because of 2192 general lack of connectivity in the area, for cost reasons, or for 2193 security reasons, e.g., to avoid an entry point for Denial-of- 2194 Service attacks. 2196 The communication interactions this framework builds upon (as 2197 shown graphically in Figure 1) may be accomplished using a variety 2198 of different protocols, and not all parts of the message flow are 2199 used in all applications due to the communication constraints. 2200 Deployments making use of CoAP are expected, but not limited to, 2201 other protocols such as HTTP, HTTP/2 or other specific protocols, 2202 such as Bluetooth Smart communication, that do not necessarily use 2203 IP could also be used. The latter raises the need for application 2204 layer security over the various interfaces. 2206 In the light of these constraints we have made the following design 2207 decisions: 2209 CBOR, COSE, CWT: 2211 This framework REQUIRES the use of CBOR [RFC7049] as data format. 2212 Where CBOR data needs to be protected, the use of COSE [RFC8152] 2213 is RECOMMENDED. Furthermore where self-contained tokens are 2214 needed, this framework RECOMMENDS the use of CWT 2215 [I-D.ietf-ace-cbor-web-token]. These measures aim at reducing the 2216 size of messages sent over the wire, the RAM size of data objects 2217 that need to be kept in memory and the size of libraries that 2218 devices need to support. 2220 CoAP: 2222 This framework RECOMMENDS the use of CoAP [RFC7252] instead of 2223 HTTP. This does not preclude the use of other protocols 2224 specifically aimed at constrained devices, like e.g. Bluetooth 2225 Low energy (see Section 3.2). This aims again at reducing the 2226 size of messages sent over the wire, the RAM size of data objects 2227 that need to be kept in memory and the size of libraries that 2228 devices need to support. 2230 RS Information: 2232 This framework defines the name "RS Information" for data 2233 concerning the RS that the AS returns to the client in an access 2234 token response (see Section 5.6.2). This includes the "profile" 2235 and the "rs_cnf" parameters. This aims at enabling scenarios, 2236 where a powerful client, supporting multiple profiles, needs to 2237 interact with a RS for which it does not know the supported 2238 profiles and the raw public key. 2240 Proof-of-Possession: 2242 This framework makes use of proof-of-possession tokens, using the 2243 "cnf" claim [I-D.ietf-ace-cwt-proof-of-possession]. A 2244 semantically and syntactically identical request and response 2245 parameter is defined for the token endpoint, to allow requesting 2246 and stating confirmation keys. This aims at making token theft 2247 harder. Token theft is specifically relevant in constrained use 2248 cases, as communication often passes through middle-boxes, which 2249 could be able to steal bearer tokens and use them to gain 2250 unauthorized access. 2252 Auth-Info endpoint: 2254 This framework introduces a new way of providing access tokens to 2255 a RS by exposing a authz-info endpoint, to which access tokens can 2256 be POSTed. This aims at reducing the size of the request message 2257 and the code complexity at the RS. The size of the request 2258 message is problematic, since many constrained protocols have 2259 severe message size limitations at the physical layer (e.g. in the 2260 order of 100 bytes). This means that larger packets get 2261 fragmented, which in turn combines badly with the high rate of 2262 packet loss, and the need to retransmit the whole message if one 2263 packet gets lost. Thus separating sending of the request and 2264 sending of the access tokens helps to reduce fragmentation. 2266 Client Credentials Grant: 2268 This framework RECOMMENDS the use of the client credentials grant 2269 for machine-to-machine communication use cases, where manual 2270 intervention of the resource owner to produce a grant token is not 2271 feasible. The intention is that the resource owner would instead 2272 pre-arrange authorization with the AS, based on the client's own 2273 credentials. The client can the (without manual intervention) 2274 obtain access tokens from the AS. 2276 Introspection: 2278 This framework RECOMMENDS the use of access token introspection in 2279 cases where the client is constrained in a way that it can not 2280 easily obtain new access tokens (i.e. it has connectivity issues 2281 that prevent it from communicating with the AS). In that case 2282 this framework RECOMMENDS the use of a long-term token, that could 2283 be a simple reference. The RS is assumed to be able to 2284 communicate with the AS, and can therefore perform introspection, 2285 in order to learn the claims associated with the token reference. 2286 The advantage of such an approach is that the resource owner can 2287 change the claims associated to the token reference without having 2288 to be in contact with the client, thus granting or revoking access 2289 rights. 2291 Appendix B. Roles and Responsibilities 2293 Resource Owner 2295 * Make sure that the RS is registered at the AS. This includes 2296 making known to the AS which profiles, token_types, scopes, and 2297 key types (symmetric/asymmetric) the RS supports. Also making 2298 it known to the AS which audience(s) the RS identifies itself 2299 with. 2300 * Make sure that clients can discover the AS that is in charge of 2301 the RS. 2302 * If the client-credentials grant is used, make sure that the AS 2303 has the necessary, up-to-date, access control policies for the 2304 RS. 2306 Requesting Party 2308 * Make sure that the client is provisioned the necessary 2309 credentials to authenticate to the AS. 2310 * Make sure that the client is configured to follow the security 2311 requirements of the Requesting Party when issuing requests 2312 (e.g., minimum communication security requirements, trust 2313 anchors). 2314 * Register the client at the AS. This includes making known to 2315 the AS which profiles, token_types, and key types (symmetric/ 2316 asymmetric) the client. 2318 Authorization Server 2320 * Register the RS and manage corresponding security contexts. 2321 * Register clients and authentication credentials. 2322 * Allow Resource Owners to configure and update access control 2323 policies related to their registered RSs. 2324 * Expose the token endpoint to allow clients to request tokens. 2326 * Authenticate clients that wish to request a token. 2327 * Process a token request using the authorization policies 2328 configured for the RS. 2329 * Optionally: Expose the introspection endpoint that allows RS's 2330 to submit token introspection requests. 2331 * If providing an introspection endpoint: Authenticate RSs that 2332 wish to get an introspection response. 2333 * If providing an introspection endpoint: Process token 2334 introspection requests. 2335 * Optionally: Handle token revocation. 2336 * Optionally: Provide discovery metadata. See 2337 [I-D.ietf-oauth-discovery] 2339 Client 2341 * Discover the AS in charge of the RS that is to be targeted with 2342 a request. 2343 * Submit the token request (see step (A) of Figure 1). 2345 + Authenticate to the AS. 2346 + Optionally (if not pre-configured): Specify which RS, which 2347 resource(s), and which action(s) the request(s) will target. 2348 + If raw public keys (rpk) or certificates are used, make sure 2349 the AS has the right rpk or certificate for this client. 2350 * Process the access token and RS Information (see step (B) of 2351 Figure 1). 2353 + Check that the RS Information provides the necessary 2354 security parameters (e.g., PoP key, information on 2355 communication security protocols supported by the RS). 2356 * Send the token and request to the RS (see step (C) of 2357 Figure 1). 2359 + Authenticate towards the RS (this could coincide with the 2360 proof of possession process). 2361 + Transmit the token as specified by the AS (default is to the 2362 authz-info endpoint, alternative options are specified by 2363 profiles). 2364 + Perform the proof-of-possession procedure as specified by 2365 the profile in use (this may already have been taken care of 2366 through the authentication procedure). 2367 * Process the RS response (see step (F) of Figure 1) of the RS. 2369 Resource Server 2371 * Expose a way to submit access tokens. By default this is the 2372 authz-info endpoint. 2373 * Process an access token. 2375 + Verify the token is from a recognized AS. 2376 + Verify that the token applies to this RS. 2377 + Check that the token has not expired (if the token provides 2378 expiration information). 2379 + Check the token's integrity. 2380 + Store the token so that it can be retrieved in the context 2381 of a matching request. 2382 * Process a request. 2384 + Set up communication security with the client. 2385 + Authenticate the client. 2386 + Match the client against existing tokens. 2387 + Check that tokens belonging to the client actually authorize 2388 the requested action. 2389 + Optionally: Check that the matching tokens are still valid, 2390 using introspection (if this is possible.) 2391 * Send a response following the agreed upon communication 2392 security. 2394 Appendix C. Requirements on Profiles 2396 This section lists the requirements on profiles of this framework, 2397 for the convenience of profile designers. 2399 o Specify the communication protocol the client and RS the must use 2400 (e.g., CoAP). Section 5 and Section 5.6.4.4 2401 o Specify the security protocol the client and RS must use to 2402 protect their communication (e.g., OSCOAP or DTLS over CoAP). 2403 This must provide encryption, integrity and replay protection. 2404 Section 5.6.4.4 2405 o Specify how the client and the RS mutually authenticate. 2406 Section 4 2407 o Specify the Content-format of the protocol messages (e.g., 2408 "application/cbor" or "application/cose+cbor"). Section 4 2409 o Specify the proof-of-possession protocol(s) and how to select one, 2410 if several are available. Also specify which key types (e.g., 2411 symmetric/asymmetric) are supported by a specific proof-of- 2412 possession protocol. Section 5.6.4.3 2413 o Specify a unique profile identifier. Section 5.6.4.4 2414 o If introspection is supported: Specify the communication and 2415 security protocol for introspection.Section 5.7 2416 o Specify the communication and security protocol for interactions 2417 between client and AS. Section 5.6 2418 o Specify how/if the authz-info endpoint is protected. 2419 Section 5.8.1 2420 o Optionally define other methods of token transport than the authz- 2421 info endpoint. Section 5.8.1 2423 Appendix D. Assumptions on AS knowledge about C and RS 2425 This section lists the assumptions on what an AS should know about a 2426 client and a RS in order to be able to respond to requests to the 2427 token and introspection endpoints. How this information is 2428 established is out of scope for this document. 2430 o The identifier of the client or RS. 2431 o The profiles that the client or RS supports. 2432 o The scopes that the RS supports. 2433 o The audiences that the RS identifies with. 2434 o The key types (e.g., pre-shared symmetric key, raw public key, key 2435 length, other key parameters) that the client or RS supports. 2436 o The types of access tokens the RS supports (e.g., CWT). 2437 o If the RS supports CWTs, the COSE parameters for the crypto 2438 wrapper (e.g., algorithm, key-wrap algorithm, key-length). 2439 o The expiration time for access tokens issued to this RS (unless 2440 the RS accepts a default time chosen by the AS). 2441 o The symmetric key shared between client or RS and AS (if any). 2442 o The raw public key of the client or RS (if any). 2444 Appendix E. Deployment Examples 2446 There is a large variety of IoT deployments, as is indicated in 2447 Appendix A, and this section highlights a few common variants. This 2448 section is not normative but illustrates how the framework can be 2449 applied. 2451 For each of the deployment variants, there are a number of possible 2452 security setups between clients, resource servers and authorization 2453 servers. The main focus in the following subsections is on how 2454 authorization of a client request for a resource hosted by a RS is 2455 performed. This requires the security of the requests and responses 2456 between the clients and the RS to consider. 2458 Note: CBOR diagnostic notation is used for examples of requests and 2459 responses. 2461 E.1. Local Token Validation 2463 In this scenario, the case where the resource server is offline is 2464 considered, i.e., it is not connected to the AS at the time of the 2465 access request. This access procedure involves steps A, B, C, and F 2466 of Figure 1. 2468 Since the resource server must be able to verify the access token 2469 locally, self-contained access tokens must be used. 2471 This example shows the interactions between a client, the 2472 authorization server and a temperature sensor acting as a resource 2473 server. Message exchanges A and B are shown in Figure 16. 2475 A: The client first generates a public-private key pair used for 2476 communication security with the RS. 2477 The client sends the POST request to the token endpoint at the AS. 2478 The security of this request can be transport or application 2479 layer. It is up the the communication security profile to define. 2480 In the example transport layer identification of the AS is done 2481 and the client identifies with client_id and client_secret as in 2482 classic OAuth. The request contains the public key of the client 2483 and the Audience parameter set to "tempSensorInLivingRoom", a 2484 value that the temperature sensor identifies itself with. The AS 2485 evaluates the request and authorizes the client to access the 2486 resource. 2487 B: The AS responds with a PoP access token and RS Information. 2488 The PoP access token contains the public key of the client, and 2489 the RS Information contains the public key of the RS. For 2490 communication security this example uses DTLS RawPublicKey between 2491 the client and the RS. The issued token will have a short 2492 validity time, i.e., "exp" close to "iat", to protect the RS from 2493 replay attacks. The token includes the claim such as "scope" with 2494 the authorized access that an owner of the temperature device can 2495 enjoy. In this example, the "scope" claim, issued by the AS, 2496 informs the RS that the owner of the token, that can prove the 2497 possession of a key is authorized to make a GET request against 2498 the /temperature resource and a POST request on the /firmware 2499 resource. Note that the syntax and semantics of the scope claim 2500 are application specific. 2501 Note: In this example it is assumed that the client knows what 2502 resource it wants to access, and is therefore able to request 2503 specific audience and scope claims for the access token. 2505 Authorization 2506 Client Server 2507 | | 2508 |<=======>| DTLS Connection Establishment 2509 | | to identify the AS 2510 | | 2511 A: +-------->| Header: POST (Code=0.02) 2512 | POST | Uri-Path:"token" 2513 | | Content-Type: application/cbor 2514 | | Payload: 2515 | | 2516 B: |<--------+ Header: 2.05 Content 2517 | 2.05 | Content-Type: application/cbor 2518 | | Payload: 2519 | | 2521 Figure 16: Token Request and Response Using Client Credentials. 2523 The information contained in the Request-Payload and the Response- 2524 Payload is shown in Figure 17. Note that a transport layer security 2525 based communication security profile is used in this example, 2526 therefore the Content-Type is "application/cbor". 2528 Request-Payload : 2529 { 2530 "grant_type" : "client_credentials", 2531 "aud" : "tempSensorInLivingRoom", 2532 "client_id" : "myclient", 2533 "client_secret" : "qwerty" 2534 } 2536 Response-Payload : 2537 { 2538 "access_token" : b64'SlAV32hkKG ...', 2539 "token_type" : "pop", 2540 "csp" : "DTLS", 2541 "rs_cnf" : { 2542 "COSE_Key" : { 2543 "kid" : b64'c29tZSBwdWJsaWMga2V5IGlk', 2544 "kty" : "EC", 2545 "crv" : "P-256", 2546 "x" : b64'MKBCTNIcKUSDii11ySs3526iDZ8AiTo7Tu6KPAqv7D4', 2547 "y" : b64'4Etl6SRW2YiLUrN5vfvVHuhp7x8PxltmWWlbbM4IFyM' 2548 } 2549 } 2550 } 2552 Figure 17: Request and Response Payload Details. 2554 The content of the access token is shown in Figure 18. 2556 { 2557 "aud" : "tempSensorInLivingRoom", 2558 "iat" : "1360189224", 2559 "exp" : "1360289224", 2560 "scope" : "temperature_g firmware_p", 2561 "cnf" : { 2562 "COSE_Key" : { 2563 "kid" : b64'1Bg8vub9tLe1gHMzV76e8', 2564 "kty" : "EC", 2565 "crv" : "P-256", 2566 "x" : b64'f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU', 2567 "y" : b64'x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0' 2568 } 2569 } 2570 } 2572 Figure 18: Access Token including Public Key of the Client. 2574 Messages C and F are shown in Figure 19 - Figure 20. 2576 C: The client then sends the PoP access token to the authz-info 2577 endpoint at the RS. This is a plain CoAP request, i.e., no 2578 transport or application layer security between client and RS, 2579 since the token is integrity protected between the AS and RS. The 2580 RS verifies that the PoP access token was created by a known and 2581 trusted AS, is valid, and responds to the client. The RS caches 2582 the security context together with authorization information about 2583 this client contained in the PoP access token. 2585 Resource 2586 Client Server 2587 | | 2588 C: +-------->| Header: POST (Code=0.02) 2589 | POST | Uri-Path:"authz-info" 2590 | | Payload: SlAV32hkKG ... 2591 | | 2592 |<--------+ Header: 2.04 Changed 2593 | 2.04 | 2594 | | 2596 Figure 19: Access Token provisioning to RS 2597 The client and the RS runs the DTLS handshake using the raw public 2598 keys established in step B and C. 2600 The client sends the CoAP request GET to /temperature on RS over 2601 DTLS. The RS verifies that the request is authorized, based on 2602 previously established security context. 2603 F: The RS responds with a resource representation over DTLS. 2605 Resource 2606 Client Server 2607 | | 2608 |<=======>| DTLS Connection Establishment 2609 | | using Raw Public Keys 2610 | | 2611 +-------->| Header: GET (Code=0.01) 2612 | GET | Uri-Path: "temperature" 2613 | | 2614 | | 2615 | | 2616 F: |<--------+ Header: 2.05 Content 2617 | 2.05 | Payload: 2618 | | 2620 Figure 20: Resource Request and Response protected by DTLS. 2622 E.2. Introspection Aided Token Validation 2624 In this deployment scenario it is assumed that a client is not able 2625 to access the AS at the time of the access request, whereas the RS is 2626 assumed to be connected to the back-end infrastructure. Thus the RS 2627 can make use of token introspection. This access procedure involves 2628 steps A-F of Figure 1, but assumes steps A and B have been carried 2629 out during a phase when the client had connectivity to AS. 2631 Since the client is assumed to be offline, at least for a certain 2632 period of time, a pre-provisioned access token has to be long-lived. 2633 Since the client is constrained, the token will not be self contained 2634 (i.e. not a CWT) but instead just a reference. The resource server 2635 uses its connectivity to learn about the claims associated to the 2636 access token by using introspection, which is shown in the example 2637 below. 2639 In the example interactions between an offline client (key fob), a RS 2640 (online lock), and an AS is shown. It is assumed that there is a 2641 provisioning step where the client has access to the AS. This 2642 corresponds to message exchanges A and B which are shown in 2643 Figure 21. 2645 Authorization consent from the resource owner can be pre-configured, 2646 but it can also be provided via an interactive flow with the resource 2647 owner. An example of this for the key fob case could be that the 2648 resource owner has a connected car, he buys a generic key that he 2649 wants to use with the car. To authorize the key fob he connects it 2650 to his computer that then provides the UI for the device. After that 2651 OAuth 2.0 implicit flow can used to authorize the key for his car at 2652 the the car manufacturers AS. 2654 Note: In this example the client does not know the exact door it will 2655 be used to access since the token request is not send at the time of 2656 access. So the scope and audience parameters are set quite wide to 2657 start with and new values different form the original once can be 2658 returned from introspection later on. 2660 A: The client sends the request using POST to the token endpoint 2661 at AS. The request contains the Audience parameter set to 2662 "PACS1337" (PACS, Physical Access System), a value the that the 2663 online door in question identifies itself with. The AS generates 2664 an access token as an opaque string, which it can match to the 2665 specific client, a targeted audience and a symmetric key. The 2666 security is provided by identifying the AS on transport layer 2667 using a pre shared security context (psk, rpk or certificate) and 2668 then the client is identified using client_id and client_secret as 2669 in classic OAuth. 2670 B: The AS responds with the an access token and RS Information, 2671 the latter containing a symmetric key. Communication security 2672 between C and RS will be DTLS and PreSharedKey. The PoP key is 2673 used as the PreSharedKey. 2675 Authorization 2676 Client Server 2677 | | 2678 | | 2679 A: +-------->| Header: POST (Code=0.02) 2680 | POST | Uri-Path:"token" 2681 | | Content-Type: application/cbor 2682 | | Payload: 2683 | | 2684 B: |<--------+ Header: 2.05 Content 2685 | | Content-Type: application/cbor 2686 | 2.05 | Payload: 2687 | | 2689 Figure 21: Token Request and Response using Client Credentials. 2691 The information contained in the Request-Payload and the Response- 2692 Payload is shown in Figure 22. 2694 Request-Payload: 2695 { 2696 "grant_type" : "client_credentials", 2697 "aud" : "lockOfDoor4711", 2698 "client_id" : "keyfob", 2699 "client_secret" : "qwerty" 2700 } 2702 Response-Payload: 2703 { 2704 "access_token" : b64'SlAV32hkKG ...' 2705 "token_type" : "pop", 2706 "csp" : "DTLS", 2707 "cnf" : { 2708 "COSE_Key" : { 2709 "kid" : b64'c29tZSBwdWJsaWMga2V5IGlk', 2710 "kty" : "oct", 2711 "alg" : "HS256", 2712 "k": b64'ZoRSOrFzN_FzUA5XKMYoVHyzff5oRJxl-IXRtztJ6uE' 2713 } 2714 } 2715 } 2717 Figure 22: Request and Response Payload for C offline 2719 The access token in this case is just an opaque string referencing 2720 the authorization information at the AS. 2722 C: Next, the client POSTs the access token to the authz-info 2723 endpoint in the RS. This is a plain CoAP request, i.e., no DTLS 2724 between client and RS. Since the token is an opaque string, the 2725 RS cannot verify it on its own, and thus defers to respond the 2726 client with a status code until after step E. 2727 D: The RS forwards the token to the introspection endpoint on the 2728 AS. Introspection assumes a secure connection between the AS and 2729 the RS, e.g., using transport of application layer security. In 2730 the example AS is identified using pre shared security context 2731 (psk, rpk or certificate) while RS is acting as client and is 2732 identified with client_id and client_secret. 2733 E: The AS provides the introspection response containing 2734 parameters about the token. This includes the confirmation key 2735 (cnf) parameter that allows the RS to verify the client's proof of 2736 possession in step F. 2737 After receiving message E, the RS responds to the client's POST in 2738 step C with the CoAP response code 2.01 (Created). 2740 Resource 2741 Client Server 2742 | | 2743 C: +-------->| Header: POST (T=CON, Code=0.02) 2744 | POST | Uri-Path:"authz-info" 2745 | | Content-Type: "application/cbor" 2746 | | Payload: b64'SlAV32hkKG ...'' 2747 | | 2748 | | Authorization 2749 | | Server 2750 | | | 2751 | D: +--------->| Header: POST (Code=0.02) 2752 | | POST | Uri-Path: "introspect" 2753 | | | Content-Type: "application/cbor" 2754 | | | Payload: 2755 | | | 2756 | E: |<---------+ Header: 2.05 Content 2757 | | 2.05 | Content-Type: "application/cbor" 2758 | | | Payload: 2759 | | | 2760 | | 2761 |<--------+ Header: 2.01 Created 2762 | 2.01 | 2763 | | 2765 Figure 23: Token Introspection for C offline 2766 The information contained in the Request-Payload and the Response- 2767 Payload is shown in Figure 24. 2769 Request-Payload: 2770 { 2771 "token" : b64'SlAV32hkKG...', 2772 "client_id" : "FrontDoor", 2773 "client_secret" : "ytrewq" 2774 } 2776 Response-Payload: 2777 { 2778 "active" : true, 2779 "aud" : "lockOfDoor4711", 2780 "scope" : "open, close", 2781 "iat" : 1311280970, 2782 "cnf" : { 2783 "kid" : b64'JDLUhTMjU2IiwiY3R5Ijoi ...' 2784 } 2785 } 2787 Figure 24: Request and Response Payload for Introspection 2789 The client uses the symmetric PoP key to establish a DTLS 2790 PreSharedKey secure connection to the RS. The CoAP request PUT is 2791 sent to the uri-path /state on the RS, changing the state of the 2792 door to locked. 2793 F: The RS responds with a appropriate over the secure DTLS 2794 channel. 2796 Resource 2797 Client Server 2798 | | 2799 |<=======>| DTLS Connection Establishment 2800 | | using Pre Shared Key 2801 | | 2802 +-------->| Header: PUT (Code=0.03) 2803 | PUT | Uri-Path: "state" 2804 | | Payload: 2805 | | 2806 F: |<--------+ Header: 2.04 Changed 2807 | 2.04 | Payload: 2808 | | 2810 Figure 25: Resource request and response protected by OSCOAP 2812 Appendix F. Document Updates 2814 RFC EDITOR: PLEASE REMOVE THIS SECTION. 2816 F.1. Version -10 to -11 2818 o Fixed some CBOR data type errors. 2819 o Updated boilerplate text 2821 F.2. Version -09 to -10 2823 o Removed CBOR major type numbers. 2824 o Removed the client token design. 2825 o Rephrased to clarify that other protocols than CoAP can be used. 2826 o Clarifications regarding the use of HTTP 2828 F.3. Version -08 to -09 2830 o Allowed scope to be byte arrays. 2831 o Defined default names for endpoints. 2832 o Refactored the IANA section for briefness and consistency. 2833 o Refactored tables that define IANA registry contents for 2834 consistency. 2835 o Created IANA registry for CBOR mappings of error codes, grant 2836 types and Authorization Server Information. 2838 o Added references to other document sections defining IANA entries 2839 in the IANA section. 2841 F.4. Version -07 to -08 2843 o Moved AS discovery from the DTLS profile to the framework, see 2844 Section 5.1. 2845 o Made the use of CBOR mandatory. If you use JSON you can use 2846 vanilla OAuth. 2847 o Made it mandatory for profiles to specify C-AS security and RS-AS 2848 security (the latter only if introspection is supported). 2849 o Made the use of CBOR abbreviations mandatory. 2850 o Added text to clarify the use of token references as an 2851 alternative to CWTs. 2852 o Added text to clarify that introspection must not be delayed, in 2853 case the RS has to return a client token. 2854 o Added security considerations about leakage through unprotected AS 2855 discovery information, combining profiles and leakage through 2856 error responses. 2857 o Added privacy considerations about leakage through unprotected AS 2858 discovery. 2859 o Added text that clarifies that introspection is optional. 2860 o Made profile parameter optional since it can be implicit. 2861 o Clarified that CoAP is not mandatory and other protocols can be 2862 used. 2863 o Clarified the design justification for specific features of the 2864 framework in appendix A. 2865 o Clarified appendix E.2. 2866 o Removed specification of the "cnf" claim for CBOR/COSE, and 2867 replaced with references to [I-D.ietf-ace-cwt-proof-of-possession] 2869 F.5. Version -06 to -07 2871 o Various clarifications added. 2872 o Fixed erroneous author email. 2874 F.6. Version -05 to -06 2876 o Moved sections that define the ACE framework into a subsection of 2877 the framework Section 5. 2878 o Split section on client credentials and grant into two separate 2879 sections, Section 5.2, and Section 5.3. 2880 o Added Section 5.4 on AS authentication. 2881 o Added Section 5.5 on the Authorization endpoint. 2883 F.7. Version -04 to -05 2885 o Added RFC 2119 language to the specification of the required 2886 behavior of profile specifications. 2887 o Added Section 5.3 on the relation to the OAuth2 grant types. 2888 o Added CBOR abbreviations for error and the error codes defined in 2889 OAuth2. 2890 o Added clarification about token expiration and long-running 2891 requests in Section 5.8.2 2892 o Added security considerations about tokens with symmetric pop keys 2893 valid for more than one RS. 2894 o Added privacy considerations section. 2895 o Added IANA registry mapping the confirmation types from RFC 7800 2896 to equivalent COSE types. 2897 o Added appendix D, describing assumptions about what the AS knows 2898 about the client and the RS. 2900 F.8. Version -03 to -04 2902 o Added a description of the terms "framework" and "profiles" as 2903 used in this document. 2904 o Clarified protection of access tokens in section 3.1. 2905 o Clarified uses of the "cnf" parameter in section 6.4.5. 2906 o Clarified intended use of Client Token in section 7.4. 2908 F.9. Version -02 to -03 2910 o Removed references to draft-ietf-oauth-pop-key-distribution since 2911 the status of this draft is unclear. 2912 o Copied and adapted security considerations from draft-ietf-oauth- 2913 pop-key-distribution. 2914 o Renamed "client information" to "RS information" since it is 2915 information about the RS. 2916 o Clarified the requirements on profiles of this framework. 2917 o Clarified the token endpoint protocol and removed negotiation of 2918 "profile" and "alg" (section 6). 2919 o Renumbered the abbreviations for claims and parameters to get a 2920 consistent numbering across different endpoints. 2921 o Clarified the introspection endpoint. 2922 o Renamed token, introspection and authz-info to "endpoint" instead 2923 of "resource" to mirror the OAuth 2.0 terminology. 2924 o Updated the examples in the appendices. 2926 F.10. Version -01 to -02 2928 o Restructured to remove communication security parts. These shall 2929 now be defined in profiles. 2931 o Restructured section 5 to create new sections on the OAuth 2932 endpoints token, introspection and authz-info. 2933 o Pulled in material from draft-ietf-oauth-pop-key-distribution in 2934 order to define proof-of-possession key distribution. 2935 o Introduced the "cnf" parameter as defined in RFC7800 to reference 2936 or transport keys used for proof of possession. 2937 o Introduced the "client-token" to transport client information from 2938 the AS to the client via the RS in conjunction with introspection. 2939 o Expanded the IANA section to define parameters for token request, 2940 introspection and CWT claims. 2941 o Moved deployment scenarios to the appendix as examples. 2943 F.11. Version -00 to -01 2945 o Changed 5.1. from "Communication Security Protocol" to "Client 2946 Information". 2947 o Major rewrite of 5.1 to clarify the information exchanged between 2948 C and AS in the PoP access token request profile for IoT. 2950 * Allow the client to indicate preferences for the communication 2951 security protocol. 2952 * Defined the term "Client Information" for the additional 2953 information returned to the client in addition to the access 2954 token. 2955 * Require that the messages between AS and client are secured, 2956 either with (D)TLS or with COSE_Encrypted wrappers. 2957 * Removed dependency on OSCOAP and added generic text about 2958 object security instead. 2959 * Defined the "rpk" parameter in the client information to 2960 transmit the raw public key of the RS from AS to client. 2961 * (D)TLS MUST use the PoP key in the handshake (either as PSK or 2962 as client RPK with client authentication). 2963 * Defined the use of x5c, x5t and x5tS256 parameters when a 2964 client certificate is used for proof of possession. 2965 * Defined "tktn" parameter for signaling for how to transfer the 2966 access token. 2967 o Added 5.2. the CoAP Access-Token option for transferring access 2968 tokens in messages that do not have payload. 2969 o 5.3.2. Defined success and error responses from the RS when 2970 receiving an access token. 2971 o 5.6.:Added section giving guidance on how to handle token 2972 expiration in the absence of reliable time. 2973 o Appendix B Added list of roles and responsibilities for C, AS and 2974 RS. 2976 Authors' Addresses 2978 Ludwig Seitz 2979 RISE SICS 2980 Scheelevaegen 17 2981 Lund 223 70 2982 Sweden 2984 Email: ludwig.seitz@ri.se 2986 Goeran Selander 2987 Ericsson 2988 Faroegatan 6 2989 Kista 164 80 2990 Sweden 2992 Email: goran.selander@ericsson.com 2994 Erik Wahlstroem 2995 Sweden 2997 Email: erik@wahlstromstekniska.se 2999 Samuel Erdtman 3000 Spotify AB 3001 Birger Jarlsgatan 61, 4tr 3002 Stockholm 113 56 3003 Sweden 3005 Email: erdtman@spotify.com 3007 Hannes Tschofenig 3008 ARM Ltd. 3009 Hall in Tirol 6060 3010 Austria 3012 Email: Hannes.Tschofenig@arm.com