idnits 2.17.1 draft-ietf-ace-oauth-authz-12.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 (May 21, 2018) is 2157 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: A later version (-11) exists of draft-ietf-ace-cwt-proof-of-possession-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-12 == 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-09 -- Obsolete informational reference (is this intentional?): RFC 5246 (Obsoleted by RFC 8446) -- Obsolete informational reference (is this intentional?): RFC 7049 (Obsoleted by RFC 8949) -- Obsolete informational reference (is this intentional?): RFC 7231 (Obsoleted by RFC 9110) Summary: 2 errors (**), 0 flaws (~~), 6 warnings (==), 4 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 ACE Working Group L. Seitz 3 Internet-Draft RISE SICS 4 Intended status: Standards Track G. Selander 5 Expires: November 22, 2018 Ericsson 6 E. Wahlstroem 8 S. Erdtman 9 Spotify AB 10 H. Tschofenig 11 ARM Ltd. 12 May 21, 2018 14 Authentication and Authorization for Constrained Environments (ACE) 15 using the OAuth 2.0 Framework (ACE-OAuth) 16 draft-ietf-ace-oauth-authz-12 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 November 22, 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 . . . . . . . . . . . . . . . . . . . . . . . . 6 67 3.2. CoAP . . . . . . . . . . . . . . . . . . . . . . . . . . 9 68 4. Protocol Interactions . . . . . . . . . . . . . . . . . . . . 10 69 5. Framework . . . . . . . . . . . . . . . . . . . . . . . . . . 14 70 5.1. Discovering Authorization Servers . . . . . . . . . . . . 15 71 5.1.1. Unauthorized Resource Request Message . . . . . . . . 15 72 5.1.2. AS Information . . . . . . . . . . . . . . . . . . . 16 73 5.2. Authorization Grants . . . . . . . . . . . . . . . . . . 17 74 5.3. Client Credentials . . . . . . . . . . . . . . . . . . . 18 75 5.4. AS Authentication . . . . . . . . . . . . . . . . . . . . 18 76 5.5. The Authorization Endpoint . . . . . . . . . . . . . . . 18 77 5.6. The Token Endpoint . . . . . . . . . . . . . . . . . . . 18 78 5.6.1. Client-to-AS Request . . . . . . . . . . . . . . . . 19 79 5.6.2. AS-to-Client Response . . . . . . . . . . . . . . . . 22 80 5.6.3. Error Response . . . . . . . . . . . . . . . . . . . 24 81 5.6.4. Request and Response Parameters . . . . . . . . . . . 25 82 5.6.4.1. Audience . . . . . . . . . . . . . . . . . . . . 25 83 5.6.4.2. Grant Type . . . . . . . . . . . . . . . . . . . 25 84 5.6.4.3. Token Type . . . . . . . . . . . . . . . . . . . 26 85 5.6.4.4. Profile . . . . . . . . . . . . . . . . . . . . . 26 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 . . . . . . 33 95 5.8.2. Client Requests to the RS . . . . . . . . . . . . . . 34 96 5.8.3. Token Expiration . . . . . . . . . . . . . . . . . . 34 97 6. Security Considerations . . . . . . . . . . . . . . . . . . . 35 98 6.1. Unprotected AS Information . . . . . . . . . . . . . . . 36 99 6.2. Use of Nonces for Replay Protection . . . . . . . . . . . 37 100 6.3. Combining profiles . . . . . . . . . . . . . . . . . . . 37 101 6.4. Error responses . . . . . . . . . . . . . . . . . . . . . 37 102 7. Privacy Considerations . . . . . . . . . . . . . . . . . . . 37 103 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 38 104 8.1. Authorization Server Information . . . . . . . . . . . . 38 105 8.2. OAuth Error Code CBOR Mappings Registry . . . . . . . . . 39 106 8.3. OAuth Grant Type CBOR Mappings . . . . . . . . . . . . . 39 107 8.4. OAuth Access Token Types . . . . . . . . . . . . . . . . 40 108 8.5. OAuth Token Type CBOR Mappings . . . . . . . . . . . . . 40 109 8.5.1. Initial Registry Contents . . . . . . . . . . . . . . 40 110 8.6. ACE Profile Registry . . . . . . . . . . . . . . . . . . 41 111 8.7. OAuth Parameter Registration . . . . . . . . . . . . . . 41 112 8.8. OAuth CBOR Parameter Mappings Registry . . . . . . . . . 42 113 8.9. OAuth Introspection Response Parameter Registration . . . 42 114 8.10. Introspection Endpoint CBOR Mappings Registry . . . . . . 43 115 8.11. JSON Web Token Claims . . . . . . . . . . . . . . . . . . 43 116 8.12. CBOR Web Token Claims . . . . . . . . . . . . . . . . . . 44 117 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 44 118 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 44 119 10.1. Normative References . . . . . . . . . . . . . . . . . . 44 120 10.2. Informative References . . . . . . . . . . . . . . . . . 46 121 Appendix A. Design Justification . . . . . . . . . . . . . . . . 48 122 Appendix B. Roles and Responsibilities . . . . . . . . . . . . . 52 123 Appendix C. Requirements on Profiles . . . . . . . . . . . . . . 54 124 Appendix D. Assumptions on AS knowledge about C and RS . . . . . 55 125 Appendix E. Deployment Examples . . . . . . . . . . . . . . . . 55 126 E.1. Local Token Validation . . . . . . . . . . . . . . . . . 55 127 E.2. Introspection Aided Token Validation . . . . . . . . . . 59 128 Appendix F. Document Updates . . . . . . . . . . . . . . . . . . 63 129 F.1. Version -11 to -12 . . . . . . . . . . . . . . . . . . . 63 130 F.2. Version -10 to -11 . . . . . . . . . . . . . . . . . . . 63 131 F.3. Version -09 to -10 . . . . . . . . . . . . . . . . . . . 64 132 F.4. Version -08 to -09 . . . . . . . . . . . . . . . . . . . 64 133 F.5. Version -07 to -08 . . . . . . . . . . . . . . . . . . . 64 134 F.6. Version -06 to -07 . . . . . . . . . . . . . . . . . . . 65 135 F.7. Version -05 to -06 . . . . . . . . . . . . . . . . . . . 65 136 F.8. Version -04 to -05 . . . . . . . . . . . . . . . . . . . 65 137 F.9. Version -03 to -04 . . . . . . . . . . . . . . . . . . . 65 138 F.10. Version -02 to -03 . . . . . . . . . . . . . . . . . . . 65 139 F.11. Version -01 to -02 . . . . . . . . . . . . . . . . . . . 66 140 F.12. Version -00 to -01 . . . . . . . . . . . . . . . . . . . 66 141 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 67 143 1. Introduction 145 Authorization is the process for granting approval to an entity to 146 access a resource [RFC4949]. The authorization task itself can best 147 be described as granting access to a requesting client, for a 148 resource hosted on a device, the resource server (RS). This exchange 149 is mediated by one or multiple authorization servers (AS). Managing 150 authorization for a large number of devices and users can be a 151 complex task. 153 While prior work on authorization solutions for the Web and for the 154 mobile environment also applies to the Internet of Things (IoT) 155 environment, many IoT devices are constrained, for example, in terms 156 of processing capabilities, available memory, etc. For web 157 applications on constrained nodes, this specification RECOMMENDS the 158 use of CoAP [RFC7252] as replacement for HTTP. 160 A detailed treatment of constraints can be found in [RFC7228], and 161 the different IoT deployments present a continuous range of device 162 and network capabilities. Taking energy consumption as an example: 163 At one end there are energy-harvesting or battery powered devices 164 which have a tight power budget, on the other end there are mains- 165 powered devices, and all levels in between. 167 Hence, IoT devices may be very different in terms of available 168 processing and message exchange capabilities and there is a need to 169 support many different authorization use cases [RFC7744]. 171 This specification describes a framework for authentication and 172 authorization in constrained environments (ACE) built on re-use of 173 OAuth 2.0 [RFC6749], thereby extending authorization to Internet of 174 Things devices. This specification contains the necessary building 175 blocks for adjusting OAuth 2.0 to IoT environments. 177 More detailed, interoperable specifications can be found in profiles. 178 Implementations may claim conformance with a specific profile, 179 whereby implementations utilizing the same profile interoperate while 180 implementations of different profiles are not expected to be 181 interoperable. Some devices, such as mobile phones and tablets, may 182 implement multiple profiles and will therefore be able to interact 183 with a wider range of low end devices. Requirements on profiles are 184 described at contextually appropriate places throughout this 185 specification, and also summarized in Appendix C. 187 2. Terminology 189 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 190 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 191 "OPTIONAL" in this document are to be interpreted as described in BCP 192 14 [RFC2119] [RFC8174] when, and only when, they appear in all 193 capitals, as shown here. 195 Certain security-related terms such as "authentication", 196 "authorization", "confidentiality", "(data) integrity", "message 197 authentication code", and "verify" are taken from [RFC4949]. 199 Since exchanges in this specification are described as RESTful 200 protocol interactions, HTTP [RFC7231] offers useful terminology. 202 Terminology for entities in the architecture is defined in OAuth 2.0 203 [RFC6749] and [I-D.ietf-ace-actors], such as client (C), resource 204 server (RS), and authorization server (AS). 206 Note that the term "endpoint" is used here following its OAuth 207 definition, which is to denote resources such as token and 208 introspection at the AS and authz-info at the RS (see Section 5.8.1 209 for a definition of the authz-info endpoint). The CoAP [RFC7252] 210 definition, which is "An entity participating in the CoAP protocol" 211 is not used in this specification. 213 Since this specification focuses on the problem of access control to 214 resources, the actors has been simplified by assuming that the client 215 authorization server (CAS) functionality is not stand-alone but 216 subsumed by either the authorization server or the client (see 217 Section 2.2 in [I-D.ietf-ace-actors]). 219 The specifications in this document is called the "framework" or "ACE 220 framework". When referring to "profiles of this framework" it refers 221 to additional specifications that define the use of this 222 specification with concrete transport, and communication security 223 protocols (e.g., CoAP over DTLS). 225 We use the term "RS Information" for parameters describing 226 characteristics of the RS (e.g. public key) that the AS provides to 227 the client. 229 3. Overview 231 This specification defines the ACE framework for authorization in the 232 Internet of Things environment. It consists of a set of building 233 blocks. 235 The basic block is the OAuth 2.0 [RFC6749] framework, which enjoys 236 widespread deployment. Many IoT devices can support OAuth 2.0 237 without any additional extensions, but for certain constrained 238 settings additional profiling is needed. 240 Another building block is the lightweight web transfer protocol CoAP 241 [RFC7252], for those communication environments where HTTP is not 242 appropriate. CoAP typically runs on top of UDP, which further 243 reduces overhead and message exchanges. While this specification 244 defines extensions for the use of OAuth over CoAP, other underlying 245 protocols are not prohibited from being supported in the future, such 246 as HTTP/2, MQTT, BLE and QUIC. 248 A third building block is CBOR [RFC7049], for encodings where JSON 249 [RFC8259] is not sufficiently compact. CBOR is a binary encoding 250 designed for small code and message size, which may be used for 251 encoding of self contained tokens, and also for encoding payload 252 transferred in protocol messages. 254 A fourth building block is the compact CBOR-based secure message 255 format COSE [RFC8152], which enables application layer security as an 256 alternative or complement to transport layer security (DTLS [RFC6347] 257 or TLS [RFC5246]). COSE is used to secure self-contained tokens such 258 as proof-of-possession (PoP) tokens, which is an extension to the 259 OAuth tokens. The default token format is defined in CBOR web token 260 (CWT) [RFC8392]. Application layer security for CoAP using COSE can 261 be provided with OSCORE [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 [RFC8392]), protected by a 354 cryptographic wrapper (e.g., COSE [RFC8152]). The choice of PoP 355 key does not necessarily imply a specific credential type for the 356 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 defines the use of CBOR encoding as data format, see 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 [RFC8392], an equivalent format using CBOR 387 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 OSCORE [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 OSCORE, 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. When profiles of this framework use CoAP instead, this 641 framework REQUIRES the use of the following alternative instead of 642 Uri-query parameters: The sender (client or RS) encodes the 643 parameters of its request as a CBOR map and submits that map as the 644 payload of the POST request. The Content-format depends on the 645 security applied to the content and MUST be specified by the profile 646 that is used. 648 The OAuth 2.0 AS uses a JSON structure in the payload of its 649 responses both to client and RS. If CoAP is used, this framework 650 REQUIRES the use of CBOR [RFC7049] instead of JSON. Depending on the 651 profile, the CBOR payload MAY be enclosed in a non-CBOR cryptographic 652 wrapper. 654 5.1. Discovering Authorization Servers 656 In order to determine the AS in charge of a resource hosted at the 657 RS, C MAY send an initial Unauthorized Resource Request message to 658 RS. RS then denies the request and sends the address of its AS back 659 to C. 661 Instead of the initial Unauthorized Resource Request message, C MAY 662 look up the desired resource in a resource directory (cf. 663 [I-D.ietf-core-resource-directory]). 665 5.1.1. Unauthorized Resource Request Message 667 The optional Unauthorized Resource Request message is a request for a 668 resource hosted by RS for which no proper authorization is granted. 669 RS MUST treat any request for a protected resource as Unauthorized 670 Resource Request message when any of the following holds: 672 o The request has been received on an unprotected channel. 673 o RS has no valid access token for the sender of the request 674 regarding the requested action on that resource. 675 o RS has a valid access token for the sender of the request, but 676 this does not allow the requested action on the requested 677 resource. 679 Note: These conditions ensure that RS can handle requests 680 autonomously once access was granted and a secure channel has been 681 established between C and RS. The authz-info endpoint MUST NOT be 682 protected as specified above, in order to allow clients to upload 683 access tokens to RS (cf. Section 5.8.1). 685 Unauthorized Resource Request messages MUST be denied with a client 686 error response. In this response, the Resource Server SHOULD provide 687 proper AS Information to enable the Client to request an access token 688 from RS's AS as described in Section 5.1.2. 690 The handling of all client requests (including unauthorized ones) by 691 the RS is described in Section 5.8.2. 693 5.1.2. AS Information 695 The AS Information is sent by RS as a response to an Unauthorized 696 Resource Request message (see Section 5.1.1) to point the sender of 697 the Unauthorized Resource Request message to RS's AS. The AS 698 information is a set of attributes containing an absolute URI (see 699 Section 4.3 of [RFC3986]) that specifies the AS in charge of RS. 701 The message MAY also contain a nonce generated by RS to ensure 702 freshness in case that the RS and AS do not have synchronized clocks. 704 Figure 2 summarizes the parameters that may be part of the AS 705 Information. 707 /-------+----------+-------------\ 708 | Name | CBOR Key | Value Type | 709 |-------+----------+-------------| 710 | AS | 0 | text string | 711 | nonce | 5 | byte string | 712 \-------+----------+-------------/ 714 Figure 2: AS Information parameters 716 Figure 3 shows an example for an AS Information message payload using 717 CBOR [RFC7049] diagnostic notation, using the parameter names instead 718 of the CBOR keys for better human readability. 720 4.01 Unauthorized 721 Content-Format: application/ace+cbor 722 {AS: "coaps://as.example.com/token", 723 nonce: h'e0a156bb3f'} 725 Figure 3: AS Information payload example 727 In this example, the attribute AS points the receiver of this message 728 to the URI "coaps://as.example.com/token" to request access 729 permissions. The originator of the AS Information payload (i.e., RS) 730 uses a local clock that is loosely synchronized with a time scale 731 common between RS and AS (e.g., wall clock time). Therefore, it has 732 included a parameter "nonce" for replay attack prevention. 734 Note: There is an ongoing discussion how freshness of access 735 tokens 736 can be achieved in constrained environments. This specification 737 for now assumes that RS and AS do not have a common understanding 738 of time that allows RS to achieve its security objectives without 739 explicitly adding a nonce. 741 Figure 4 illustrates the mandatory to use binary encoding of the 742 message payload shown in Figure 3. 744 a2 # map(2) 745 00 # unsigned(0) (=AS) 746 78 1c # text(28) 747 636f6170733a2f2f61732e657861 748 6d706c652e636f6d2f746f6b656e # "coaps://as.example.com/token" 749 05 # unsigned(5) (=nonce) 750 45 # bytes(5) 751 e0a156bb3f 753 Figure 4: AS Information example encoded in CBOR 755 5.2. Authorization Grants 757 To request an access token, the client obtains authorization from the 758 resource owner or uses its client credentials as grant. The 759 authorization is expressed in the form of an authorization grant. 761 The OAuth framework defines four grant types. The grant types can be 762 split up into two groups, those granted on behalf of the resource 763 owner (password, authorization code, implicit) and those for the 764 client (client credentials). 766 The grant type is selected depending on the use case. In cases where 767 the client acts on behalf of the resource owner, authorization code 768 grant is recommended. If the client acts on behalf of the resource 769 owner, but does not have any display or very limited interaction 770 possibilities it is recommended to use the device code grant defined 771 in [I-D.ietf-oauth-device-flow]. In cases where the client does not 772 act on behalf of the resource owner, client credentials grant is 773 recommended. 775 For details on the different grant types, see the OAuth 2.0 framework 776 [RFC6749]. The OAuth 2.0 framework provides an extension mechanism 777 for defining additional grant types so profiles of this framework MAY 778 define additional grant types, if needed. 780 5.3. Client Credentials 782 Authentication of the client is mandatory independent of the grant 783 type when requesting the access token from the token endpoint. In 784 the case of client credentials grant type, the authentication and 785 grant coincide. 787 Client registration and provisioning of client credentials to the 788 client is out of scope for this specification. 790 The OAuth framework [RFC6749] defines one client credential type, 791 client id and client secret. [I-D.erdtman-ace-rpcc] adds raw-public- 792 key and pre-shared-key to the client credentials types. Profiles of 793 this framework MAY extend with additional client credentials client 794 certificates. 796 5.4. AS Authentication 798 Client credential does not, by default, authenticate the AS that the 799 client connects to. In classic OAuth, the AS is authenticated with a 800 TLS server certificate. 802 Profiles of this framework MUST specify how clients authenticate the 803 AS and how communication security is implemented, otherwise server 804 side TLS certificates, as defined by OAuth 2.0, are required. 806 5.5. The Authorization Endpoint 808 The authorization endpoint is used to interact with the resource 809 owner and obtain an authorization grant in certain grant flows. 810 Since it requires the use of a user agent (i.e., browser), it is not 811 expected that these types of grant flow will be used by constrained 812 clients. This endpoint is therefore out of scope for this 813 specification. Implementations should use the definition and 814 recommendations of [RFC6749] and [RFC6819]. 816 If clients involved cannot support HTTP and TLS, profiles MAY define 817 mappings for the authorization endpoint. 819 5.6. The Token Endpoint 821 In standard OAuth 2.0, the AS provides the token endpoint for 822 submitting access token requests. This framework extends the 823 functionality of the token endpoint, giving the AS the possibility to 824 help the client and RS to establish shared keys or to exchange their 825 public keys. Furthermore, this framework defines encodings using 826 CBOR, as a substitute for JSON. 828 The endpoint may, however, be exposed over HTTPS as in classical 829 OAuth or even other transports. A profile MUST define the details of 830 the mapping between the fields described below, and these transports. 831 If HTTPS is used, JSON or CBOR payloads may be supported. If JSON 832 payloads are used, the semantics of Section 4 of the OAuth 2.0 833 specification MUST be followed (with additions as described below). 834 If CBOR payload is supported, the semantics described below MUST be 835 followed. 837 For the AS to be able to issue a token, the client MUST be 838 authenticated and present a valid grant for the scopes requested. 839 Profiles of this framework MUST specify how the AS authenticates the 840 client and how the communication between client and AS is protected. 842 The default name of this endpoint in an url-path is 'token', however 843 implementations are not required to use this name and can define 844 their own instead. 846 The figures of this section use CBOR diagnostic notation without the 847 integer abbreviations for the parameters or their values for 848 illustrative purposes. Note that implementations MUST use the 849 integer abbreviations and the binary CBOR encoding, if the CBOR 850 encoding is used. 852 5.6.1. Client-to-AS Request 854 The client sends a POST request to the token endpoint at the AS. The 855 profile MUST specify the Content-Type and wrapping of the payload. 856 The content of the request consists of the parameters specified in 857 Section 4 of the OAuth 2.0 specification [RFC6749]. 859 If CBOR is used then this parameter MUST be encoded as a CBOR map, 860 where the "scope" parameter can additionally be formatted as a byte 861 array, in order to allow compact encoding of complex scope 862 structures. 864 When HTTP is used as a transport then the client makes a request to 865 the token endpoint by sending the parameters using the "application/ 866 x-www-form-urlencoded" format with a character encoding of UTF-8 in 867 the HTTP request entity-body, as defined in RFC 6749. 869 In addition to these parameters, this framework defines the following 870 parameters for requesting an access token from a token endpoint: 872 aud: 873 OPTIONAL. Specifies the audience for which the client is 874 requesting an access token. If this parameter is missing, it is 875 assumed that the client and the AS have a pre-established 876 understanding of the audience that an access token should address. 877 If a client submits a request for an access token without 878 specifying an "aud" parameter, and the AS does not have an 879 implicit understanding of the "aud" value for this client, then 880 the AS MUST respond with an error message using a response code 881 equivalent to the CoAP response code 4.00 (Bad Request). 883 cnf: 884 OPTIONAL. This field contains information about the key the 885 client would like to bind to the access token for proof-of- 886 possession. It is RECOMMENDED that an AS reject a request 887 containing a symmetric key value in the 'cnf' field, since the AS 888 is expected to be able to generate better symmetric keys than a 889 potentially constrained client. See Section 5.6.4.5 for more 890 details on the formatting of the 'cnf' parameter. 892 The following examples illustrate different types of requests for 893 proof-of-possession tokens. 895 Figure 5 shows a request for a token with a symmetric proof-of- 896 possession key. Note that in this example it is assumed that 897 transport layer communication security is used with a CBOR payload, 898 therefore the Content-Type is "application/cbor". The content is 899 displayed in CBOR diagnostic notation, without abbreviations for 900 better readability. 902 Header: POST (Code=0.02) 903 Uri-Host: "as.example.com" 904 Uri-Path: "token" 905 Content-Type: "application/cbor" 906 Payload: 907 { 908 "grant_type" : "client_credentials", 909 "client_id" : "myclient", 910 "aud" : "tempSensor4711" 911 } 913 Figure 5: Example request for an access token bound to a symmetric 914 key. 916 Figure 6 shows a request for a token with an asymmetric proof-of- 917 possession key. Note that in this example COSE is used to provide 918 object-security, therefore the Content-Type is "application/cose". 920 Header: POST (Code=0.02) 921 Uri-Host: "as.example.com" 922 Uri-Path: "token" 923 Content-Type: "application/cose" 924 Payload: 925 16( # COSE_ENCRYPTED 926 [ h'a1010a', # protected header: {"alg" : "AES-CCM-16-64-128"} 927 {5 : b64'ifUvZaHFgJM7UmGnjA'}, # unprotected header, IV 928 b64'WXThuZo6TMCaZZqi6ef/8WHTjOdGk8kNzaIhIQ' # ciphertext 929 ] 930 ) 932 Decrypted payload: 933 { 934 "grant_type" : "client_credentials", 935 "client_id" : "myclient", 936 "cnf" : { 937 "COSE_Key" : { 938 "kty" : "EC", 939 "kid" : h'11', 940 "crv" : "P-256", 941 "x" : b64'usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8', 942 "y" : b64'IBOL+C3BttVivg+lSreASjpkttcsz+1rb7btKLv8EX4' 943 } 944 } 945 } 947 Figure 6: Example token request bound to an asymmetric key. 949 Figure 7 shows a request for a token where a previously communicated 950 proof-of-possession key is only referenced. Note that a transport 951 layer based communication security profile with a CBOR payload is 952 assumed in this example, therefore the Content-Type is "application/ 953 cbor". Also note that the client performs a password based 954 authentication in this example by submitting its client_secret (see 955 Section 2.3.1 of [RFC6749]). 957 Header: POST (Code=0.02) 958 Uri-Host: "as.example.com" 959 Uri-Path: "token" 960 Content-Type: "application/cbor" 961 Payload: 962 { 963 "grant_type" : "client_credentials", 964 "client_id" : "myclient", 965 "client_secret" : "mysecret234", 966 "aud" : "valve424", 967 "scope" : "read", 968 "cnf" : { 969 "kid" : b64'6kg0dXJM13U' 970 } 971 } 973 Figure 7: Example request for an access token bound to a key 974 reference. 976 5.6.2. AS-to-Client Response 978 If the access token request has been successfully verified by the AS 979 and the client is authorized to obtain an access token corresponding 980 to its access token request, the AS sends a response with the 981 response code equivalent to the CoAP response code 2.01 (Created). 982 If client request was invalid, or not authorized, the AS returns an 983 error response as described in Section 5.6.3. 985 Note that the AS decides which token type and profile to use when 986 issuing a successful response. It is assumed that the AS has prior 987 knowledge of the capabilities of the client and the RS (see 988 Appendix D. This prior knowledge may, for example, be set by the use 989 of a dynamic client registration protocol exchange [RFC7591]. 991 The content of the successful reply is the RS Information. When 992 using CBOR payloads, the content MUST be encoded as CBOR map, 993 containing parameters as specified in Section 5.1 of [RFC6749]. In 994 addition to these parameters, the following parameters are also part 995 of a successful response: 997 profile: 998 OPTIONAL. This indicates the profile that the client MUST use 999 towards the RS. See Section 5.6.4.4 for the formatting of this 1000 parameter. If this parameter is absent, the AS assumes that the 1001 client implicitly knows which profile to use towards the RS. 1002 cnf: 1003 REQUIRED if the token type is "pop" and a symmetric key is used. 1004 MUST NOT be present otherwise. This field contains the symmetric 1005 proof-of-possession key the client is supposed to use. See 1006 Section 5.6.4.5 for details on the use of this parameter. 1007 rs_cnf: 1008 OPTIONAL if the token type is "pop" and asymmetric keys are used. 1009 MUST NOT be present otherwise. This field contains information 1010 about the public key used by the RS to authenticate. See 1011 Section 5.6.4.5 for details on the use of this parameter. If this 1012 parameter is absent, the AS assumes that the client already knows 1013 the public key of the RS. 1014 token_type: 1015 OPTIONAL. By default implementations of this framework SHOULD 1016 assume that the token_type is "pop". If a specific use case 1017 requires another token_type (e.g., "Bearer") to be used then this 1018 parameter is REQUIRED. 1020 Note that if CBOR Web Tokens [RFC8392] are used, the access token 1021 also contains a "cnf" claim [I-D.ietf-ace-cwt-proof-of-possession]. 1022 This claim is however consumed by a different party. The access 1023 token is created by the AS and processed by the RS (and opaque to the 1024 client) whereas the RS Information is created by the AS and processed 1025 by the client; it is never forwarded to the resource server. 1027 Figure 8 summarizes the parameters that may be part of the RS 1028 Information. 1030 /-------------------+-----------------\ 1031 | Parameter name | Specified in | 1032 |-------------------+-----------------| 1033 | access_token | RFC 6749 | 1034 | token_type | RFC 6749 | 1035 | expires_in | RFC 6749 | 1036 | refresh_token | RFC 6749 | 1037 | scope | RFC 6749 | 1038 | state | RFC 6749 | 1039 | error | RFC 6749 | 1040 | error_description | RFC 6749 | 1041 | error_uri | RFC 6749 | 1042 | profile | [this document] | 1043 | cnf | [this document] | 1044 | rs_cnf | [this document] | 1045 \-------------------+-----------------/ 1047 Figure 8: RS Information parameters 1049 Figure 9 shows a response containing a token and a "cnf" parameter 1050 with a symmetric proof-of-possession key. Note that transport layer 1051 security with CBOR encoding is assumed in this example, therefore the 1052 Content-Type is "application/cbor". 1054 Header: Created (Code=2.01) 1055 Content-Type: "application/cbor" 1056 Payload: 1057 { 1058 "access_token" : b64'SlAV32hkKG ... 1059 (remainder of CWT omitted for brevity; 1060 CWT contains COSE_Key in the "cnf" claim)', 1061 "profile" : "coap_dtls", 1062 "expires_in" : "3600", 1063 "cnf" : { 1064 "COSE_Key" : { 1065 "kty" : "Symmetric", 1066 "kid" : b64'39Gqlw', 1067 "k" : b64'hJtXhkV8FJG+Onbc6mxCcQh' 1068 } 1069 } 1070 } 1072 Figure 9: Example AS response with an access token bound to a 1073 symmetric key. 1075 5.6.3. Error Response 1077 The error responses for CoAP-based interactions with the AS are 1078 equivalent to the ones for HTTP-based interactions as defined in 1079 Section 5.2 of [RFC6749], with the following differences: 1081 o The Content-Type MUST be specified by the communication security 1082 profile used between client and AS. When using CoAP the raw 1083 payload before being processed by the communication security 1084 protocol MUST be encoded as a CBOR map. 1085 o A response code equivalent to the CoAP code 4.00 (Bad Request) 1086 MUST be used for all error responses, except for invalid_client 1087 where a response code equivalent to the CoAP code 4.01 1088 (Unauthorized) MAY be used under the same conditions as specified 1089 in Section 5.2 of [RFC6749]. 1090 o The parameters "error", "error_description" and "error_uri" MUST 1091 be abbreviated using the codes specified in Figure 12, when a CBOR 1092 encoding is used. 1093 o The error code (i.e., value of the "error" parameter) MUST be 1094 abbreviated as specified in Figure 10, when a CBOR encoding is 1095 used. 1097 /------------------------+-------------\ 1098 | Name | CBOR Values | 1099 |------------------------+-------------| 1100 | invalid_request | 0 | 1101 | invalid_client | 1 | 1102 | invalid_grant | 2 | 1103 | unauthorized_client | 3 | 1104 | unsupported_grant_type | 4 | 1105 | invalid_scope | 5 | 1106 | unsupported_pop_key | 6 | 1107 \------------------------+-------------/ 1109 Figure 10: CBOR abbreviations for common error codes 1111 In addition to the error responses defined in OAuth 2.0, the 1112 following behavior MUST be implemented by the AS: If the client 1113 submits an asymmetric key in the token request that the RS cannot 1114 process, the AS MUST reject that request with a response code 1115 equivalent to the CoAP code 4.00 (Bad Request) including the error 1116 code "unsupported_pop_key" defined in Figure 10. 1118 5.6.4. Request and Response Parameters 1120 This section provides more detail about the new parameters that can 1121 be used in access token requests and responses, as well as 1122 abbreviations for more compact encoding of existing parameters and 1123 common parameter values. 1125 5.6.4.1. Audience 1127 This parameter specifies for which audience the client is requesting 1128 a token. The formatting and semantics of these strings are 1129 application specific. 1131 When encoded as a CBOR payload it is represented as a CBOR text 1132 string. 1134 5.6.4.2. Grant Type 1136 The abbreviations in Figure 11 MUST be used in CBOR encodings instead 1137 of the string values defined in [RFC6749], if CBOR payloads are used. 1139 /--------------------+------------+------------------------\ 1140 | Name | CBOR Value | Original Specification | 1141 |--------------------+------------+------------------------| 1142 | password | 0 | RFC6749 | 1143 | authorization_code | 1 | RFC6749 | 1144 | client_credentials | 2 | RFC6749 | 1145 | refresh_token | 3 | RFC6749 | 1146 \--------------------+------------+------------------------/ 1148 Figure 11: CBOR abbreviations for common grant types 1150 5.6.4.3. Token Type 1152 The token_type parameter is defined in [RFC6749], allowing the AS to 1153 indicate to the client which type of access token it is receiving 1154 (e.g., a bearer token). 1156 This document registers the new value "pop" for the OAuth Access 1157 Token Types registry, specifying a Proof-of-Possession token. How 1158 the proof-of-possession is performed MUST be specified by the 1159 profiles. 1161 The values in the "token_type" parameter MUST be CBOR text strings, 1162 if a CBOR encoding is used. 1164 In this framework token type "pop" MUST be assumed by default if the 1165 AS does not provide a different value. 1167 5.6.4.4. Profile 1169 Profiles of this framework MUST define the communication protocol and 1170 the communication security protocol between the client and the RS. 1171 The security protocol MUST provide encryption, integrity and replay 1172 protection. Furthermore profiles MUST define proof-of-possession 1173 methods, if they support proof-of-possession tokens. 1175 A profile MUST specify an identifier that MUST be used to uniquely 1176 identify itself in the "profile" parameter. The textual 1177 representation of the profile identifier is just intended for human 1178 readability and MUST NOT be used in parameters and claims.. 1180 Profiles MAY define additional parameters for both the token request 1181 and the RS Information in the access token response in order to 1182 support negotiation or signaling of profile specific parameters. 1184 5.6.4.5. Confirmation 1186 The "cnf" parameter identifies or provides the key used for proof-of- 1187 possession, while the "rs_cnf" parameter provides the raw public key 1188 of the RS. Both parameters use the same formatting and semantics as 1189 the "cnf" claim specified in [I-D.ietf-ace-cwt-proof-of-possession] 1190 when used with a CBOR encoding. When these parameters are used in 1191 JSON then the formatting and semantics of the "cnf" claim specified 1192 in RFC 7800 [RFC7800]. 1194 In addition to the use as a claim in a CWT, the "cnf" parameter is 1195 used in the following contexts with the following meaning: 1197 o In the token request C -> AS, to indicate the client's raw public 1198 key, or the key-identifier of a previously established key between 1199 C and RS. 1200 o In the token response AS -> C, to indicate the symmetric key 1201 generated by the AS for proof-of-possession. 1202 o In the introspection response AS -> RS, to indicate the proof-of- 1203 possession key bound to the introspected token. 1205 Note that the COSE_Key structure in a "cnf" claim or parameter may 1206 contain an "alg" or "key_ops" parameter. If such parameters are 1207 present, a client MUST NOT use a key that is not compatible with the 1208 profile or proof-of-possession algorithm according to those 1209 parameters. An RS MUST reject a proof-of-possession using such a 1210 key. 1212 Also note that the "rs_cnf" parameter is supposed to indicate the key 1213 that the RS uses to authenticate. If the access token is issued for 1214 an audience that includes several RS, this parameter MUST NOT be 1215 used, since it is them impossible to determine for which RS the key 1216 applies. This framework recommends to specify a different endpoint 1217 that the client can use to acquire RS authentication keys in such 1218 cases. The specification of such an endpoint is out of scope for 1219 this framework. 1221 5.6.5. Mapping Parameters to CBOR 1223 If CBOR encoding is used, all OAuth parameters in access token 1224 requests and responses MUST be mapped to CBOR types as specified in 1225 Figure 12, using the given integer abbreviation for the map keys. 1227 Note that we have aligned these abbreviations with the claim 1228 abbreviations defined in [RFC8392]. 1230 /-------------------+----------+---------------------\ 1231 | Name | CBOR Key | Value Type | 1232 |-------------------+----------+---------------------| 1233 | aud | 3 | text string | 1234 | client_id | 8 | text string | 1235 | client_secret | 9 | byte string | 1236 | response_type | 10 | text string | 1237 | redirect_uri | 11 | text string | 1238 | scope | 12 | text or byte string | 1239 | state | 13 | text string | 1240 | code | 14 | byte string | 1241 | error | 15 | unsinged integer | 1242 | error_description | 16 | text string | 1243 | error_uri | 17 | text string | 1244 | grant_type | 18 | unsigned integer | 1245 | access_token | 19 | byte string | 1246 | token_type | 20 | unsigned integer | 1247 | expires_in | 21 | unsigned integer | 1248 | username | 22 | text string | 1249 | password | 23 | text string | 1250 | refresh_token | 24 | byte string | 1251 | cnf | 25 | map | 1252 | profile | 26 | unsigned integer | 1253 | rs_cnf | 31 | map | 1254 \-------------------+----------+---------------------/ 1256 Figure 12: CBOR mappings used in token requests 1258 5.7. The 'Introspect' Endpoint 1260 Token introspection [RFC7662] can be OPTIONALLY provided by the AS, 1261 and is then used by the RS and potentially the client to query the AS 1262 for metadata about a given token e.g., validity or scope. Analogous 1263 to the protocol defined in RFC 7662 [RFC7662] for HTTP and JSON, this 1264 section defines adaptations to more constrained environments using 1265 CBOR and leaving the choice of the application protocol to the 1266 profile. 1268 Communication between the RS and the introspection endpoint at the AS 1269 MUST be integrity protected and encrypted. Furthermore AS and RS 1270 MUST perform mutual authentication. Finally the AS SHOULD verify 1271 that the RS has the right to access introspection information about 1272 the provided token. Profiles of this framework that support 1273 introspection MUST specify how authentication and communication 1274 security between RS and AS is implemented. 1276 The default name of this endpoint in an url-path is 'introspect', 1277 however implementations are not required to use this name and can 1278 define their own instead. 1280 The figures of this section uses CBOR diagnostic notation without the 1281 integer abbreviations for the parameters or their values for better 1282 readability. 1284 Note that supporting introspection is OPTIONAL for implementations of 1285 this framework. 1287 5.7.1. RS-to-AS Request 1289 The RS sends a POST request to the introspection endpoint at the AS, 1290 the profile MUST specify the Content-Type and wrapping of the 1291 payload. If CBOR is used, the payload MUST be encoded as a CBOR map 1292 with a "token" entry containing either the access token or a 1293 reference to the token (e.g., the cti). Further optional parameters 1294 representing additional context that is known by the RS to aid the AS 1295 in its response MAY be included. 1297 The same parameters are required and optional as in Section 2.1 of 1298 RFC 7662 [RFC7662]. 1300 For example, Figure 13 shows a RS calling the token introspection 1301 endpoint at the AS to query about an OAuth 2.0 proof-of-possession 1302 token. Note that object security based on COSE is assumed in this 1303 example, therefore the Content-Type is "application/cose+cbor". 1305 Header: POST (Code=0.02) 1306 Uri-Host: "as.example.com" 1307 Uri-Path: "introspect" 1308 Content-Type: "application/cose+cbor" 1309 Payload: 1310 { 1311 "token" : b64'7gj0dXJQ43U', 1312 "token_type_hint" : "pop" 1313 } 1315 Figure 13: Example introspection request. 1317 5.7.2. AS-to-RS Response 1319 If the introspection request is authorized and successfully 1320 processed, the AS sends a response with the response code equivalent 1321 to the CoAP code 2.01 (Created). If the introspection request was 1322 invalid, not authorized or couldn't be processed the AS returns an 1323 error response as described in Section 5.7.3. 1325 In a successful response, the AS encodes the response parameters in a 1326 map including with the same required and optional parameters as in 1327 Section 2.2. of RFC 7662 [RFC7662] with the following additions: 1329 cnf OPTIONAL. This field contains information about the proof-of- 1330 possession key that binds the client to the access token. See 1331 Section 5.6.4.5 for more details on the use of the "cnf" 1332 parameter. 1333 profile OPTIONAL. This indicates the profile that the RS MUST use 1334 with the client. See Section 5.6.4.4 for more details on the 1335 formatting of this parameter. 1336 rs_cnf OPTIONAL. If the RS has several keys it can use to 1337 authenticate towards the client, the AS can give the RS a hint 1338 using this parameter, as to which key it should use (e.g. if the 1339 AS previously informed the client about a public key the RS is 1340 holding). See Section 5.6.4.5 for more details on the use of this 1341 parameter. 1343 For example, Figure 14 shows an AS response to the introspection 1344 request in Figure 13. Note that transport layer security is assumed 1345 in this example, therefore the Content-Type is "application/cbor". 1347 Header: Created Code=2.01) 1348 Content-Type: "application/cbor" 1349 Payload: 1350 { 1351 "active" : true, 1352 "scope" : "read", 1353 "profile" : "coap_dtls", 1354 "cnf" : { 1355 "COSE_Key" : { 1356 "kty" : "Symmetric", 1357 "kid" : b64'39Gqlw', 1358 "k" : b64'hJtXhkV8FJG+Onbc6mxCcQh' 1359 } 1360 } 1361 } 1363 Figure 14: Example introspection response. 1365 5.7.3. Error Response 1367 The error responses for CoAP-based interactions with the AS are 1368 equivalent to the ones for HTTP-based interactions as defined in 1369 Section 2.3 of [RFC7662], with the following differences: 1371 o If content is sent, the Content-Type MUST be set according to the 1372 specification of the communication security profile. If CoAP is 1373 used the payload MUST be encoded as a CBOR map. 1374 o If the credentials used by the RS are invalid the AS MUST respond 1375 with the response code equivalent to the CoAP code 4.01 1376 (Unauthorized) and use the required and optional parameters from 1377 Section 5.2 in RFC 6749 [RFC6749]. 1378 o If the RS does not have the right to perform this introspection 1379 request, the AS MUST respond with a response code equivalent to 1380 the CoAP code 4.03 (Forbidden). In this case no payload is 1381 returned. 1382 o The parameters "error", "error_description" and "error_uri" MUST 1383 be abbreviated using the codes specified in Figure 12. 1384 o The error codes MUST be abbreviated using the codes specified in 1385 Figure 10. 1387 Note that a properly formed and authorized query for an inactive or 1388 otherwise invalid token does not warrant an error response by this 1389 specification. In these cases, the authorization server MUST instead 1390 respond with an introspection response with the "active" field set to 1391 "false". 1393 5.7.4. Mapping Introspection parameters to CBOR 1395 If CBOR is used, the introspection request and response parameters 1396 MUST be mapped to CBOR types as specified in Figure 15, using the 1397 given integer abbreviation for the map key. 1399 Note that we have aligned these abbreviations with the claim 1400 abbreviations defined in [RFC8392]. 1402 /-----------------+----------+----------------------------------\ 1403 | Parameter name | CBOR Key | Value Type | 1404 |-----------------+----------+----------------------------------| 1405 | iss | 1 | text string | 1406 | sub | 2 | text string | 1407 | aud | 3 | text string | 1408 | exp | 4 | integer or floating-point number | 1409 | nbf | 5 | integer or floating-point number | 1410 | iat | 6 | integer or floating-point number | 1411 | cti | 7 | byte string | 1412 | client_id | 8 | text string | 1413 | scope | 12 | text OR byte string | 1414 | token_type | 20 | text string | 1415 | username | 22 | text string | 1416 | cnf | 25 | map | 1417 | profile | 26 | unsigned integer | 1418 | token | 27 | byte string | 1419 | token_type_hint | 28 | text string | 1420 | active | 29 | True or False | 1421 | rs_cnf | 30 | map | 1422 \-----------------+----------+----------------------------------/ 1424 Figure 15: CBOR Mappings to Token Introspection Parameters. 1426 5.8. The Access Token 1428 This framework RECOMMENDS the use of CBOR web token (CWT) as 1429 specified in [RFC8392]. 1431 In order to facilitate offline processing of access tokens, this 1432 draft uses the "cnf" claim from 1433 [I-D.ietf-ace-cwt-proof-of-possession] and specifies the "scope" 1434 claim for both JSON and CBOR web tokens. 1436 The "scope" claim explicitly encodes the scope of a given access 1437 token. This claim follows the same encoding rules as defined in 1438 Section 3.3 of [RFC6749], but in addition implementers MAY use byte 1439 arrays as scope values, to achieve compact encoding of large scope 1440 elements. The meaning of a specific scope value is application 1441 specific and expected to be known to the RS running that application. 1443 If the AS needs to convey a hint to the RS about which key it should 1444 use to authenticate towards the client, the rs_cnf claim MAY be used 1445 with the same syntax and semantics as defined in Section 5.6.4.5. 1447 If the AS needs to convey a hint to the RS about which profile it 1448 should use to communicate with the client, the AS MAY include a 1449 "profile" claim in the access token, with the same syntax and 1450 semantics as defined in Section 5.6.4.4. 1452 5.8.1. The 'Authorization Information' Endpoint 1454 The access token, containing authorization information and 1455 information about the key used by the client, needs to be transported 1456 to the RS so that the RS can authenticate and authorize the client 1457 request. 1459 This section defines a method for transporting the access token to 1460 the RS using a RESTful protocol such as CoAP. Profiles of this 1461 framework MAY define other methods for token transport. 1463 The method consists of an authz-info endpoint, implemented by the RS. 1464 A client using this method MUST make a POST request to the authz-info 1465 endpoint at the RS with the access token in the payload. The RS 1466 receiving the token MUST verify the validity of the token. If the 1467 token is valid, the RS MUST respond to the POST request with 2.01 1468 (Created). This response MAY contain an identifier of the token 1469 (e.g., the cti for a CWT) as a payload, in order to allow the client 1470 to refer to the token. 1472 The RS MUST be prepared to store at least one access token for future 1473 use. This is a difference to how access tokens are handled in OAuth 1474 2.0, where the access token is typically sent along with each 1475 request, and therefore not stored at the RS. 1477 If the token is not valid, the RS MUST respond with a response code 1478 equivalent to the CoAP code 4.01 (Unauthorized). If the token is 1479 valid but the audience of the token does not match the RS, the RS 1480 MUST respond with a response code equivalent to the CoAP code 4.03 1481 (Forbidden). If the token is valid but is associated to claims that 1482 the RS cannot process (e.g., an unknown scope) the RS MUST respond 1483 with a response code equivalent to the CoAP code 4.00 (Bad Request). 1484 In the latter case the RS MAY provide additional information in the 1485 error response, in order to clarify what went wrong. 1487 The RS MAY make an introspection request to validate the token before 1488 responding to the POST request to the authz-info endpoint. 1490 Profiles MUST specify how the authz-info endpoint is protected, 1491 including how error responses from this endpoint are protected. Note 1492 that since the token contains information that allow the client and 1493 the RS to establish a security context in the first place, mutual 1494 authentication may not be possible at this point. 1496 The default name of this endpoint in an url-path is 'authz-info', 1497 however implementations are not required to use this name and can 1498 define their own instead. 1500 5.8.2. Client Requests to the RS 1502 A RS receiving a client request MUST first verify that it has an 1503 access token that authorizes this request, and that the client has 1504 performed the proof-of-possession for that token. 1506 The response code MUST be 4.01 (Unauthorized) in case the client has 1507 not performed the proof-of-possession, or if RS has no valid access 1508 token for the client. If RS has an access token for the client but 1509 not for the resource that was requested, RS MUST reject the request 1510 with a 4.03 (Forbidden). If RS has an access token for the client 1511 but it does not cover the action that was requested on the resource, 1512 RS MUST reject the request with a 4.05 (Method Not Allowed). 1514 Note: The use of the response codes 4.03 and 4.05 is intended to 1515 prevent infinite loops where a dumb Client optimistically tries to 1516 access a requested resource with any access token received from AS. 1517 As malicious clients could pretend to be C to determine C's 1518 privileges, these detailed response codes must be used only when a 1519 certain level of security is already available which can be achieved 1520 only when the Client is authenticated. 1522 Note: The RS MAY use introspection for timely validation of an access 1523 token, at the time when a request is presented. 1525 Note: Matching the claims of the access token (e.g. scope) to a 1526 specific request is application specific. 1528 If the request matches a valid token and the client has performed the 1529 proof-of-possession for that token, the RS continues to process the 1530 request as specified by the underlying application. 1532 5.8.3. Token Expiration 1534 Depending on the capabilities of the RS, there are various ways in 1535 which it can verify the validity of a received access token. Here 1536 follows a list of the possibilities including what functionality they 1537 require of the RS. 1539 o The token is a CWT and includes an "exp" claim and possibly the 1540 "nbf" claim. The RS verifies these by comparing them to values 1541 from its internal clock as defined in [RFC7519]. In this case the 1542 RS's internal clock must reflect the current date and time, or at 1543 least be synchronized with the AS's clock. How this clock 1544 synchronization would be performed is out of scope for this 1545 specification. 1546 o The RS verifies the validity of the token by performing an 1547 introspection request as specified in Section 5.7. This requires 1548 the RS to have a reliable network connection to the AS and to be 1549 able to handle two secure sessions in parallel (C to RS and AS to 1550 RS). 1551 o The RS and the AS both store a sequence number linked to their 1552 common security association. The AS increments this number for 1553 each access token it issues and includes it in the access token, 1554 which is a CWT. The RS keeps track of the most recently received 1555 sequence number, and only accepts tokens as valid, that are in a 1556 certain range around this number. This method does only require 1557 the RS to keep track of the sequence number. The method does not 1558 provide timely expiration, but it makes sure that older tokens 1559 cease to be valid after a certain number of newer ones got issued. 1560 For a constrained RS with no network connectivity and no means of 1561 reliably measuring time, this is the best that can be achieved. 1563 If a token that authorizes a long running request such as a CoAP 1564 Observe [RFC7641] expires, the RS MUST send an error response with 1565 the response code equivalent to the CoAP code 4.01 (Unauthorized) to 1566 the client and then terminate processing the long running request. 1568 6. Security Considerations 1570 Security considerations applicable to authentication and 1571 authorization in RESTful environments provided in OAuth 2.0 [RFC6749] 1572 apply to this work, as well as the security considerations from 1573 [I-D.ietf-ace-actors]. Furthermore [RFC6819] provides additional 1574 security considerations for OAuth which apply to IoT deployments as 1575 well. 1577 A large range of threats can be mitigated by protecting the contents 1578 of the access token by using a digital signature or a keyed message 1579 digest (MAC) or an Authenticated Encryption with Associated Data 1580 (AEAD) algorithm. Consequently, the token integrity protection MUST 1581 be applied to prevent the token from being modified, particularly 1582 since it contains a reference to the symmetric key or the asymmetric 1583 key. If the access token contains the symmetric key, this symmetric 1584 key MUST be encrypted by the authorization server so that only the 1585 resource server can decrypt it. Note that using an AEAD algorithm is 1586 preferable over using a MAC unless the message needs to be publicly 1587 readable. 1589 It is important for the authorization server to include the identity 1590 of the intended recipient (the audience), typically a single resource 1591 server (or a list of resource servers), in the token. Using a single 1592 shared secret with multiple resource servers to simplify key 1593 management is NOT RECOMMENDED since the benefit from using the proof- 1594 of-possession concept is significantly reduced. 1596 The authorization server MUST offer confidentiality protection for 1597 any interactions with the client. This step is extremely important 1598 since the client may obtain the proof-of-possession key from the 1599 authorization server for use with a specific access token. Not using 1600 confidentiality protection exposes this secret (and the access token) 1601 to an eavesdropper thereby completely negating proof-of-possession 1602 security. Profiles MUST specify how confidentiality protection is 1603 provided, and additional protection can be applied by encrypting the 1604 token, for example encryption of CWTs is specified in Section 5.1 of 1605 [RFC8392]. 1607 Developers MUST ensure that the ephemeral credentials (i.e., the 1608 private key or the session key) are not leaked to third parties. An 1609 adversary in possession of the ephemeral credentials bound to the 1610 access token will be able to impersonate the client. Be aware that 1611 this is a real risk with many constrained environments, since 1612 adversaries can often easily get physical access to the devices. 1614 Clients can at any time request a new proof-of-possession capable 1615 access token. If clients have that capability, the AS can keep the 1616 lifetime of the access token and the associated proof-of-possession 1617 key short and therefore use shorter proof-of-possession key sizes, 1618 which translate to a performance benefit for the client and for the 1619 resource server. Shorter keys also lead to shorter messages 1620 (particularly with asymmetric keying material). 1622 When authorization servers bind symmetric keys to access tokens, they 1623 SHOULD scope these access tokens to a specific permissions. 1624 Furthermore access tokens using symmetric keys for proof-of- 1625 possession SHOULD NOT be targeted at an audience that contains more 1626 than one RS, since otherwise any RS in the audience that receives 1627 that access token can impersonate the client towards the other 1628 members of the audience. 1630 6.1. Unprotected AS Information 1632 Initially, no secure channel exists to protect the communication 1633 between C and RS. Thus, C cannot determine if the AS information 1634 contained in an unprotected response from RS to an unauthorized 1635 request (c.f. Section 5.1.2) is authentic. It is therefore 1636 advisable to provide C with a (possibly hard-coded) list of 1637 trustworthy authorization servers. AS information responses 1638 referring to a URI not listed there would be ignored. 1640 6.2. Use of Nonces for Replay Protection 1642 RS may add a nonce to the AS Information message sent as a response 1643 to an unauthorized request to ensure freshness of an Access Token 1644 subsequently presented to RS. While a time-stamp of some granularity 1645 would be sufficient to protect against replay attacks, using 1646 randomized nonce is preferred to prevent disclosure of information 1647 about RS's internal clock characteristics. 1649 6.3. Combining profiles 1651 There may exist reasonable use cases where implementers want to 1652 combine different profiles of this framework, e.g., using an MQTT 1653 profile between client and RS, while using a DTLS profile for 1654 interactions between client and AS. Profiles should be designed in a 1655 way that the security of a protocol interaction does not depend on 1656 the specific security mechanisms used in other protocol interactions. 1658 6.4. Error responses 1660 The various error responses defined in this framework may leak 1661 information to an adversary. For example errors responses for 1662 requests to the Authorization Information endpoint can reveal 1663 information about an otherwise opaque access token to an adversary 1664 who has intercepted this token. This framework is written under the 1665 assumption that, in general, the benefits of detailed error messages 1666 outweigh the risk due to information leakage. For particular use 1667 cases, where this assessment does not apply, detailed error messages 1668 can be replaced by more generic ones. 1670 7. Privacy Considerations 1672 Implementers and users should be aware of the privacy implications of 1673 the different possible deployments of this framework. 1675 The AS is in a very central position and can potentially learn 1676 sensitive information about the clients requesting access tokens. If 1677 the client credentials grant is used, the AS can track what kind of 1678 access the client intends to perform. With other grants this can be 1679 prevented by the Resource Owner. To do so, the resource owner needs 1680 to bind the grants it issues to anonymous, ephemeral credentials that 1681 do not allow the AS to link different grants and thus different 1682 access token requests by the same client. 1684 If access tokens are only integrity protected and not encrypted, they 1685 may reveal information to attackers listening on the wire, or able to 1686 acquire the access tokens in some other way. In the case of CWTs the 1687 token may e.g., reveal the audience, the scope and the confirmation 1688 method used by the client. The latter may reveal the identity of the 1689 device or application running the client. This may be linkable to 1690 the identity of the person using the client (if there is a person and 1691 not a machine-to-machine interaction). 1693 Clients using asymmetric keys for proof-of-possession should be aware 1694 of the consequences of using the same key pair for proof-of- 1695 possession towards different RSs. A set of colluding RSs or an 1696 attacker able to obtain the access tokens will be able to link the 1697 requests, or even to determine the client's identity. 1699 An unprotected response to an unauthorized request (c.f. 1700 Section 5.1.2) may disclose information about RS and/or its existing 1701 relationship with C. It is advisable to include as little 1702 information as possible in an unencrypted response. Means of 1703 encrypting communication between C and RS already exist, more 1704 detailed information may be included with an error response to 1705 provide C with sufficient information to react on that particular 1706 error. 1708 8. IANA Considerations 1710 8.1. Authorization Server Information 1712 This section establishes the IANA "ACE Authorization Server 1713 Information" registry. The registry has been created to use the 1714 "Expert Review Required" registration procedure [RFC8126]. It should 1715 be noted that, in addition to the expert review, some portions of the 1716 registry require a specification, potentially a Standards Track RFC, 1717 be supplied as well. 1719 The columns of the registry are: 1721 Name The name of the parameter 1722 CBOR Key CBOR map key for the parameter. Different ranges of values 1723 use different registration policies [RFC8126]. Integer values 1724 from -256 to 255 are designated as Standards Action. Integer 1725 values from -65536 to -257 and from 256 to 65535 are designated as 1726 Specification Required. Integer values greater than 65535 are 1727 designated as Expert Review. Integer values less than -65536 are 1728 marked as Private Use. 1729 Value Type The CBOR data types allowable for the values of this 1730 parameter. 1731 Reference This contains a pointer to the public specification of the 1732 grant type abbreviation, if one exists. 1734 This registry will be initially populated by the values in Figure 2. 1735 The Reference column for all of these entries will be this document. 1737 8.2. OAuth Error Code CBOR Mappings Registry 1739 This section establish the IANA "OAuth Error Code CBOR Mappings" 1740 registry. The registry has been created to use the "Expert Review 1741 Required" registration procedure [RFC8126]. It should be noted that, 1742 in addition to the expert review, some portions of the registry 1743 require a specification, potentially a Standards Track RFC, be 1744 supplied as well. 1746 The columns of the registry are: 1748 Name The OAuth Error Code name, refers to the name in Section 5.2. 1749 of [RFC6749] e.g., "invalid_request". 1750 CBOR Value CBOR abbreviation for this error code. Different ranges 1751 of values use different registration policies [RFC8126]. Integer 1752 values from -256 to 255 are designated as Standards Action. 1753 Integer values from -65536 to -257 and from 256 to 65535 are 1754 designated as Specification Required. Integer values greater than 1755 65535 are designated as Expert Review. Integer values less than 1756 -65536 are marked as Private Use. 1757 Reference This contains a pointer to the public specification of the 1758 grant type abbreviation, if one exists. 1760 This registry will be initially populated by the values in Figure 10. 1761 The Reference column for all of these entries will be this document. 1763 8.3. OAuth Grant Type CBOR Mappings 1765 This section establishes the IANA "OAuth Grant Type CBOR Mappings" 1766 registry. The registry has been created to use the "Expert Review 1767 Required" registration procedure [RFC8126]. It should be noted that, 1768 in addition to the expert review, some portions of the registry 1769 require a specification, potentially a Standards Track RFC, be 1770 supplied as well. 1772 The columns of this registry are: 1774 Name The name of the grant type as specified in Section 1.3 of 1775 [RFC6749]. 1776 CBOR Value CBOR abbreviation for this grant type. Different ranges 1777 of values use different registration policies [RFC8126]. Integer 1778 values from -256 to 255 are designated as Standards Action. 1779 Integer values from -65536 to -257 and from 256 to 65535 are 1780 designated as Specification Required. Integer values greater than 1781 65535 are designated as Expert Review. Integer values less than 1782 -65536 are marked as Private Use. 1783 Reference This contains a pointer to the public specification of the 1784 grant type abbreviation, if one exists. 1786 Original Specification This contains a pointer to the public 1787 specification of the grant type, if one exists. 1789 This registry will be initially populated by the values in Figure 11. 1790 The Reference column for all of these entries will be this document. 1792 8.4. OAuth Access Token Types 1794 This section registers the following new token type in the "OAuth 1795 Access Token Types" registry [IANA.OAuthAccessTokenTypes]. 1797 o Name: "PoP" 1798 o Change Controller: IETF 1799 o Reference: [this document] 1801 8.5. OAuth Token Type CBOR Mappings 1803 This section eatables the IANA "Token Type CBOR Mappings" registry. 1804 The registry has been created to use the "Expert Review Required" 1805 registration procedure [RFC8126]. It should be noted that, in 1806 addition to the expert review, some portions of the registry require 1807 a specification, potentially a Standards Track RFC, be supplied as 1808 well. 1810 The columns of this registry are: 1812 Name The name of token type as registered in the OAuth Access Token 1813 Types registry e.g., "Bearer". 1814 CBOR Value CBOR abbreviation for this token type. Different ranges 1815 of values use different registration policies [RFC8126]. Integer 1816 values from -256 to 255 are designated as Standards Action. 1817 Integer values from -65536 to -257 and from 256 to 65535 are 1818 designated as Specification Required. Integer values greater than 1819 65535 are designated as Expert Review. Integer values less than 1820 -65536 are marked as Private Use. 1821 Reference This contains a pointer to the public specification of the 1822 OAuth token type abbreviation, if one exists. 1823 Original Specification This contains a pointer to the public 1824 specification of the grant type, if one exists. 1826 8.5.1. Initial Registry Contents 1828 o Name: "Bearer" 1829 o Value: 1 1830 o Reference: [this document] 1831 o Original Specification: [RFC6749] 1833 o Name: "pop" 1834 o Value: 2 1835 o Reference: [this document] 1836 o Original Specification: [this document] 1838 8.6. ACE Profile Registry 1840 This section establishes the IANA "ACE Profile" registry. The 1841 registry has been created to use the "Expert Review Required" 1842 registration procedure [RFC8126]. It should be noted that, in 1843 addition to the expert review, some portions of the registry require 1844 a specification, potentially a Standards Track RFC, be supplied as 1845 well. 1847 The columns of this registry are: 1849 Name The name of the profile, to be used as value of the profile 1850 attribute. 1851 Description Text giving an overview of the profile and the context 1852 it is developed for. 1853 CBOR Value CBOR abbreviation for this profile name. Different 1854 ranges of values use different registration policies [RFC8126]. 1855 Integer values from -256 to 255 are designated as Standards 1856 Action. Integer values from -65536 to -257 and from 256 to 65535 1857 are designated as Specification Required. Integer values greater 1858 than 65535 are designated as Expert Review. Integer values less 1859 than -65536 are marked as Private Use. 1860 Reference This contains a pointer to the public specification of the 1861 profile abbreviation, if one exists. 1863 8.7. OAuth Parameter Registration 1865 This section registers the following parameters in the "OAuth 1866 Parameters" registry [IANA.OAuthParameters]: 1868 o Name: "aud" 1869 o Parameter Usage Location: authorization request, token request 1870 o Change Controller: IESG 1871 o Reference: Section 5.6.1 of [this document] 1873 o Name: "profile" 1874 o Parameter Usage Location: token response 1875 o Change Controller: IESG 1876 o Reference: Section 5.6.4.4 of [this document] 1878 o Name: "cnf" 1879 o Parameter Usage Location: token request, token response 1880 o Change Controller: IESG 1881 o Reference: Section 5.6.4.5 of [this document] 1882 o Name: "rs_cnf" 1883 o Parameter Usage Location: token response 1884 o Change Controller: IESG 1885 o Reference: Section 5.6.4.5 of [this document] 1887 8.8. OAuth CBOR Parameter Mappings Registry 1889 This section establishes the IANA "Token Endpoint CBOR Mappings" 1890 registry. The registry has been created to use the "Expert Review 1891 Required" registration procedure [RFC8126]. It should be noted that, 1892 in addition to the expert review, some portions of the registry 1893 require a specification, potentially a Standards Track RFC, be 1894 supplied as well. 1896 The columns of this registry are: 1898 Name The OAuth Parameter name, refers to the name in the OAuth 1899 parameter registry e.g., "client_id". 1900 CBOR Key CBOR map key for this parameter. Different ranges of 1901 values use different registration policies [RFC8126]. Integer 1902 values from -256 to 255 are designated as Standards Action. 1903 Integer values from -65536 to -257 and from 256 to 65535 are 1904 designated as Specification Required. Integer values greater than 1905 65535 are designated as Expert Review. Integer values less than 1906 -65536 are marked as Private Use. 1907 Value Type The allowable CBOR data types for values of this 1908 parameter. 1909 Reference This contains a pointer to the public specification of the 1910 grant type abbreviation, if one exists. 1912 This registry will be initially populated by the values in Figure 12. 1913 The Reference column for all of these entries will be this document. 1915 Note that these mappings intentionally coincide with the CWT claim 1916 name mappings from [RFC8392]. 1918 8.9. OAuth Introspection Response Parameter Registration 1920 This section registers the following parameters in the OAuth Token 1921 Introspection Response registry [IANA.TokenIntrospectionResponse]. 1923 o Name: "cnf" 1924 o Description: Key to prove the right to use a PoP token. 1925 o Change Controller: IESG 1926 o Reference: Section 5.7.2 of [this document] 1928 o Name: "profile" 1929 o Description: The communication and communication security profile 1930 used between client and RS, as defined in ACE profiles. 1931 o Change Controller: IESG 1932 o Reference: Section 5.7.2 of [this document] 1934 8.10. Introspection Endpoint CBOR Mappings Registry 1936 This section establishes the IANA "Introspection Endpoint CBOR 1937 Mappings" registry. The registry has been created to use the "Expert 1938 Review Required" registration procedure [RFC8126]. It should be 1939 noted that, in addition to the expert review, some portions of the 1940 registry require a specification, potentially a Standards Track RFC, 1941 be supplied as well. 1943 The columns of this registry are: 1945 Name The OAuth Parameter name, refers to the name in the OAuth 1946 parameter registry e.g., "client_id". 1947 CBOR Key CBOR map key for this parameter. Different ranges of 1948 values use different registration policies [RFC8126]. Integer 1949 values from -256 to 255 are designated as Standards Action. 1950 Integer values from -65536 to -257 and from 256 to 65535 are 1951 designated as Specification Required. Integer values greater than 1952 65535 are designated as Expert Review. Integer values less than 1953 -65536 are marked as Private Use. 1954 Value Type The allowable CBOR data types for values of this 1955 parameter. 1956 Reference This contains a pointer to the public specification of the 1957 grant type abbreviation, if one exists. 1959 This registry will be initially populated by the values in Figure 15. 1960 The Reference column for all of these entries will be this document. 1962 8.11. JSON Web Token Claims 1964 This specification registers the following new claims in the JSON Web 1965 Token (JWT) registry of JSON Web Token Claims 1966 [IANA.JsonWebTokenClaims]: 1968 o Claim Name: "scope" 1969 o Claim Description: The scope of an access token as defined in 1970 [RFC6749]. 1971 o Change Controller: IESG 1972 o Reference: Section 5.8 of [this document] 1974 8.12. CBOR Web Token Claims 1976 This specification registers the following new claims in the "CBOR 1977 Web Token (CWT) Claims" registry [IANA.CborWebTokenClaims]. 1979 o Claim Name: "scope" 1980 o Claim Description: The scope of an access token as defined in 1981 [RFC6749]. 1982 o JWT Claim Name: N/A 1983 o Claim Key: 12 1984 o Claim Value Type(s): 0 (uint), 2 (byte string), 3 (text string) 1985 o Change Controller: IESG 1986 o Specification Document(s): Section 5.8 of [this document] 1988 9. Acknowledgments 1990 This document is a product of the ACE working group of the IETF. 1992 Thanks to Eve Maler for her contributions to the use of OAuth 2.0 and 1993 UMA in IoT scenarios, Robert Taylor for his discussion input, and 1994 Malisa Vucinic for his input on the predecessors of this proposal. 1996 Thanks to the authors of draft-ietf-oauth-pop-key-distribution, from 1997 where large parts of the security considerations where copied. 1999 Thanks to Stefanie Gerdes, Olaf Bergmann, and Carsten Bormann for 2000 contributing their work on AS discovery from draft-gerdes-ace-dcaf- 2001 authorize (see Section 5.1). 2003 Thanks to Jim Schaad and Mike Jones for their comprehensive reviews. 2005 Ludwig Seitz and Goeran Selander worked on this document as part of 2006 the CelticPlus project CyberWI, with funding from Vinnova. 2008 10. References 2010 10.1. Normative References 2012 [I-D.ietf-ace-cwt-proof-of-possession] 2013 Jones, M., Seitz, L., Selander, G., Wahlstroem, E., 2014 Erdtman, S., and H. Tschofenig, "Proof-of-Possession Key 2015 Semantics for CBOR Web Tokens (CWTs)", draft-ietf-ace-cwt- 2016 proof-of-possession-02 (work in progress), March 2018. 2018 [IANA.CborWebTokenClaims] 2019 IANA, "CBOR Web Token (CWT) Claims", 2020 . 2023 [IANA.JsonWebTokenClaims] 2024 IANA, "JSON Web Token Claims", 2025 . 2027 [IANA.OAuthAccessTokenTypes] 2028 IANA, "OAuth Access Token Types", 2029 . 2032 [IANA.OAuthParameters] 2033 IANA, "OAuth Parameters", 2034 . 2037 [IANA.TokenIntrospectionResponse] 2038 IANA, "OAuth Token Introspection Response", 2039 . 2042 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2043 Requirement Levels", BCP 14, RFC 2119, 2044 DOI 10.17487/RFC2119, March 1997, . 2047 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 2048 Resource Identifier (URI): Generic Syntax", STD 66, 2049 RFC 3986, DOI 10.17487/RFC3986, January 2005, 2050 . 2052 [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer 2053 Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, 2054 January 2012, . 2056 [RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained 2057 Application Protocol (CoAP)", RFC 7252, 2058 DOI 10.17487/RFC7252, June 2014, . 2061 [RFC7662] Richer, J., Ed., "OAuth 2.0 Token Introspection", 2062 RFC 7662, DOI 10.17487/RFC7662, October 2015, 2063 . 2065 [RFC7800] Jones, M., Bradley, J., and H. Tschofenig, "Proof-of- 2066 Possession Key Semantics for JSON Web Tokens (JWTs)", 2067 RFC 7800, DOI 10.17487/RFC7800, April 2016, 2068 . 2070 [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for 2071 Writing an IANA Considerations Section in RFCs", BCP 26, 2072 RFC 8126, DOI 10.17487/RFC8126, June 2017, 2073 . 2075 [RFC8152] Schaad, J., "CBOR Object Signing and Encryption (COSE)", 2076 RFC 8152, DOI 10.17487/RFC8152, July 2017, 2077 . 2079 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2080 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2081 May 2017, . 2083 [RFC8392] Jones, M., Wahlstroem, E., Erdtman, S., and H. Tschofenig, 2084 "CBOR Web Token (CWT)", RFC 8392, DOI 10.17487/RFC8392, 2085 May 2018, . 2087 10.2. Informative References 2089 [I-D.erdtman-ace-rpcc] 2090 Seitz, L. and S. Erdtman, "Raw-Public-Key and Pre-Shared- 2091 Key as OAuth client credentials", draft-erdtman-ace- 2092 rpcc-02 (work in progress), October 2017. 2094 [I-D.ietf-ace-actors] 2095 Gerdes, S., Seitz, L., Selander, G., and C. Bormann, "An 2096 architecture for authorization in constrained 2097 environments", draft-ietf-ace-actors-06 (work in 2098 progress), November 2017. 2100 [I-D.ietf-core-object-security] 2101 Selander, G., Mattsson, J., Palombini, F., and L. Seitz, 2102 "Object Security for Constrained RESTful Environments 2103 (OSCORE)", draft-ietf-core-object-security-12 (work in 2104 progress), March 2018. 2106 [I-D.ietf-core-resource-directory] 2107 Shelby, Z., Koster, M., Bormann, C., Stok, P., and C. 2108 Amsuess, "CoRE Resource Directory", draft-ietf-core- 2109 resource-directory-13 (work in progress), March 2018. 2111 [I-D.ietf-oauth-device-flow] 2112 Denniss, W., Bradley, J., Jones, M., and H. Tschofenig, 2113 "OAuth 2.0 Device Flow for Browserless and Input 2114 Constrained Devices", draft-ietf-oauth-device-flow-09 2115 (work in progress), April 2018. 2117 [I-D.ietf-oauth-discovery] 2118 Jones, M., Sakimura, N., and J. Bradley, "OAuth 2.0 2119 Authorization Server Metadata", draft-ietf-oauth- 2120 discovery-10 (work in progress), March 2018. 2122 [Margi10impact] 2123 Margi, C., de Oliveira, B., de Sousa, G., Simplicio Jr, 2124 M., Barreto, P., Carvalho, T., Naeslund, M., and R. Gold, 2125 "Impact of Operating Systems on Wireless Sensor Networks 2126 (Security) Applications and Testbeds", Proceedings of 2127 the 19th International Conference on Computer 2128 Communications and Networks (ICCCN), 2010 August. 2130 [RFC4949] Shirey, R., "Internet Security Glossary, Version 2", 2131 FYI 36, RFC 4949, DOI 10.17487/RFC4949, August 2007, 2132 . 2134 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 2135 (TLS) Protocol Version 1.2", RFC 5246, 2136 DOI 10.17487/RFC5246, August 2008, . 2139 [RFC6690] Shelby, Z., "Constrained RESTful Environments (CoRE) Link 2140 Format", RFC 6690, DOI 10.17487/RFC6690, August 2012, 2141 . 2143 [RFC6749] Hardt, D., Ed., "The OAuth 2.0 Authorization Framework", 2144 RFC 6749, DOI 10.17487/RFC6749, October 2012, 2145 . 2147 [RFC6819] Lodderstedt, T., Ed., McGloin, M., and P. Hunt, "OAuth 2.0 2148 Threat Model and Security Considerations", RFC 6819, 2149 DOI 10.17487/RFC6819, January 2013, . 2152 [RFC7049] Bormann, C. and P. Hoffman, "Concise Binary Object 2153 Representation (CBOR)", RFC 7049, DOI 10.17487/RFC7049, 2154 October 2013, . 2156 [RFC7228] Bormann, C., Ersue, M., and A. Keranen, "Terminology for 2157 Constrained-Node Networks", RFC 7228, 2158 DOI 10.17487/RFC7228, May 2014, . 2161 [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 2162 Protocol (HTTP/1.1): Semantics and Content", RFC 7231, 2163 DOI 10.17487/RFC7231, June 2014, . 2166 [RFC7519] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token 2167 (JWT)", RFC 7519, DOI 10.17487/RFC7519, May 2015, 2168 . 2170 [RFC7521] Campbell, B., Mortimore, C., Jones, M., and Y. Goland, 2171 "Assertion Framework for OAuth 2.0 Client Authentication 2172 and Authorization Grants", RFC 7521, DOI 10.17487/RFC7521, 2173 May 2015, . 2175 [RFC7591] Richer, J., Ed., Jones, M., Bradley, J., Machulak, M., and 2176 P. Hunt, "OAuth 2.0 Dynamic Client Registration Protocol", 2177 RFC 7591, DOI 10.17487/RFC7591, July 2015, 2178 . 2180 [RFC7641] Hartke, K., "Observing Resources in the Constrained 2181 Application Protocol (CoAP)", RFC 7641, 2182 DOI 10.17487/RFC7641, September 2015, . 2185 [RFC7744] Seitz, L., Ed., Gerdes, S., Ed., Selander, G., Mani, M., 2186 and S. Kumar, "Use Cases for Authentication and 2187 Authorization in Constrained Environments", RFC 7744, 2188 DOI 10.17487/RFC7744, January 2016, . 2191 [RFC7959] Bormann, C. and Z. Shelby, Ed., "Block-Wise Transfers in 2192 the Constrained Application Protocol (CoAP)", RFC 7959, 2193 DOI 10.17487/RFC7959, August 2016, . 2196 [RFC8252] Denniss, W. and J. Bradley, "OAuth 2.0 for Native Apps", 2197 BCP 212, RFC 8252, DOI 10.17487/RFC8252, October 2017, 2198 . 2200 [RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data 2201 Interchange Format", STD 90, RFC 8259, 2202 DOI 10.17487/RFC8259, December 2017, . 2205 Appendix A. Design Justification 2207 This section provides further insight into the design decisions of 2208 the solution documented in this document. Section 3 lists several 2209 building blocks and briefly summarizes their importance. The 2210 justification for offering some of those building blocks, as opposed 2211 to using OAuth 2.0 as is, is given below. 2213 Common IoT constraints are: 2215 Low Power Radio: 2217 Many IoT devices are equipped with a small battery which needs to 2218 last for a long time. For many constrained wireless devices, the 2219 highest energy cost is associated to transmitting or receiving 2220 messages (roughly by a factor of 10 compared to e.g. AES) 2221 [Margi10impact]. It is therefore important to keep the total 2222 communication overhead low, including minimizing the number and 2223 size of messages sent and received, which has an impact of choice 2224 on the message format and protocol. By using CoAP over UDP and 2225 CBOR encoded messages, some of these aspects are addressed. 2226 Security protocols contribute to the communication overhead and 2227 can, in some cases, be optimized. For example, authentication and 2228 key establishment may, in certain cases where security 2229 requirements allow, be replaced by provisioning of security 2230 context by a trusted third party, using transport or application 2231 layer security. 2233 Low CPU Speed: 2235 Some IoT devices are equipped with processors that are 2236 significantly slower than those found in most current devices on 2237 the Internet. This typically has implications on what timely 2238 cryptographic operations a device is capable of performing, which 2239 in turn impacts e.g., protocol latency. Symmetric key 2240 cryptography may be used instead of the computationally more 2241 expensive public key cryptography where the security requirements 2242 so allows, but this may also require support for trusted third 2243 party assisted secret key establishment using transport or 2244 application layer security. 2245 Small Amount of Memory: 2247 Microcontrollers embedded in IoT devices are often equipped with 2248 small amount of RAM and flash memory, which places limitations 2249 what kind of processing can be performed and how much code can be 2250 put on those devices. To reduce code size fewer and smaller 2251 protocol implementations can be put on the firmware of such a 2252 device. In this case, CoAP may be used instead of HTTP, symmetric 2253 key cryptography instead of public key cryptography, and CBOR 2254 instead of JSON. Authentication and key establishment protocol, 2255 e.g., the DTLS handshake, in comparison with assisted key 2256 establishment also has an impact on memory and code. 2258 User Interface Limitations: 2260 Protecting access to resources is both an important security as 2261 well as privacy feature. End users and enterprise customers may 2262 not want to give access to the data collected by their IoT device 2263 or to functions it may offer to third parties. Since the 2264 classical approach of requesting permissions from end users via a 2265 rich user interface does not work in many IoT deployment 2266 scenarios, these functions need to be delegated to user-controlled 2267 devices that are better suitable for such tasks, such as smart 2268 phones and tablets. 2270 Communication Constraints: 2272 In certain constrained settings an IoT device may not be able to 2273 communicate with a given device at all times. Devices may be 2274 sleeping, or just disconnected from the Internet because of 2275 general lack of connectivity in the area, for cost reasons, or for 2276 security reasons, e.g., to avoid an entry point for Denial-of- 2277 Service attacks. 2279 The communication interactions this framework builds upon (as 2280 shown graphically in Figure 1) may be accomplished using a variety 2281 of different protocols, and not all parts of the message flow are 2282 used in all applications due to the communication constraints. 2283 Deployments making use of CoAP are expected, but not limited to, 2284 other protocols such as HTTP, HTTP/2 or other specific protocols, 2285 such as Bluetooth Smart communication, that do not necessarily use 2286 IP could also be used. The latter raises the need for application 2287 layer security over the various interfaces. 2289 In the light of these constraints we have made the following design 2290 decisions: 2292 CBOR, COSE, CWT: 2294 This framework REQUIRES the use of CBOR [RFC7049] as data format. 2295 Where CBOR data needs to be protected, the use of COSE [RFC8152] 2296 is RECOMMENDED. Furthermore where self-contained tokens are 2297 needed, this framework RECOMMENDS the use of CWT [RFC8392]. These 2298 measures aim at reducing the size of messages sent over the wire, 2299 the RAM size of data objects that need to be kept in memory and 2300 the size of libraries that devices need to support. 2302 CoAP: 2304 This framework RECOMMENDS the use of CoAP [RFC7252] instead of 2305 HTTP. This does not preclude the use of other protocols 2306 specifically aimed at constrained devices, like e.g. Bluetooth 2307 Low energy (see Section 3.2). This aims again at reducing the 2308 size of messages sent over the wire, the RAM size of data objects 2309 that need to be kept in memory and the size of libraries that 2310 devices need to support. 2312 RS Information: 2314 This framework defines the name "RS Information" for data 2315 concerning the RS that the AS returns to the client in an access 2316 token response (see Section 5.6.2). This includes the "profile" 2317 and the "rs_cnf" parameters. This aims at enabling scenarios, 2318 where a powerful client, supporting multiple profiles, needs to 2319 interact with a RS for which it does not know the supported 2320 profiles and the raw public key. 2322 Proof-of-Possession: 2324 This framework makes use of proof-of-possession tokens, using the 2325 "cnf" claim [I-D.ietf-ace-cwt-proof-of-possession]. A 2326 semantically and syntactically identical request and response 2327 parameter is defined for the token endpoint, to allow requesting 2328 and stating confirmation keys. This aims at making token theft 2329 harder. Token theft is specifically relevant in constrained use 2330 cases, as communication often passes through middle-boxes, which 2331 could be able to steal bearer tokens and use them to gain 2332 unauthorized access. 2334 Auth-Info endpoint: 2336 This framework introduces a new way of providing access tokens to 2337 a RS by exposing a authz-info endpoint, to which access tokens can 2338 be POSTed. This aims at reducing the size of the request message 2339 and the code complexity at the RS. The size of the request 2340 message is problematic, since many constrained protocols have 2341 severe message size limitations at the physical layer (e.g. in the 2342 order of 100 bytes). This means that larger packets get 2343 fragmented, which in turn combines badly with the high rate of 2344 packet loss, and the need to retransmit the whole message if one 2345 packet gets lost. Thus separating sending of the request and 2346 sending of the access tokens helps to reduce fragmentation. 2348 Client Credentials Grant: 2350 This framework RECOMMENDS the use of the client credentials grant 2351 for machine-to-machine communication use cases, where manual 2352 intervention of the resource owner to produce a grant token is not 2353 feasible. The intention is that the resource owner would instead 2354 pre-arrange authorization with the AS, based on the client's own 2355 credentials. The client can the (without manual intervention) 2356 obtain access tokens from the AS. 2358 Introspection: 2360 This framework RECOMMENDS the use of access token introspection in 2361 cases where the client is constrained in a way that it can not 2362 easily obtain new access tokens (i.e. it has connectivity issues 2363 that prevent it from communicating with the AS). In that case 2364 this framework RECOMMENDS the use of a long-term token, that could 2365 be a simple reference. The RS is assumed to be able to 2366 communicate with the AS, and can therefore perform introspection, 2367 in order to learn the claims associated with the token reference. 2368 The advantage of such an approach is that the resource owner can 2369 change the claims associated to the token reference without having 2370 to be in contact with the client, thus granting or revoking access 2371 rights. 2373 Appendix B. Roles and Responsibilities 2375 Resource Owner 2377 * Make sure that the RS is registered at the AS. This includes 2378 making known to the AS which profiles, token_types, scopes, and 2379 key types (symmetric/asymmetric) the RS supports. Also making 2380 it known to the AS which audience(s) the RS identifies itself 2381 with. 2382 * Make sure that clients can discover the AS that is in charge of 2383 the RS. 2384 * If the client-credentials grant is used, make sure that the AS 2385 has the necessary, up-to-date, access control policies for the 2386 RS. 2388 Requesting Party 2390 * Make sure that the client is provisioned the necessary 2391 credentials to authenticate to the AS. 2392 * Make sure that the client is configured to follow the security 2393 requirements of the Requesting Party when issuing requests 2394 (e.g., minimum communication security requirements, trust 2395 anchors). 2396 * Register the client at the AS. This includes making known to 2397 the AS which profiles, token_types, and key types (symmetric/ 2398 asymmetric) the client. 2400 Authorization Server 2402 * Register the RS and manage corresponding security contexts. 2403 * Register clients and authentication credentials. 2404 * Allow Resource Owners to configure and update access control 2405 policies related to their registered RSs. 2406 * Expose the token endpoint to allow clients to request tokens. 2408 * Authenticate clients that wish to request a token. 2409 * Process a token request using the authorization policies 2410 configured for the RS. 2411 * Optionally: Expose the introspection endpoint that allows RS's 2412 to submit token introspection requests. 2413 * If providing an introspection endpoint: Authenticate RSs that 2414 wish to get an introspection response. 2415 * If providing an introspection endpoint: Process token 2416 introspection requests. 2417 * Optionally: Handle token revocation. 2418 * Optionally: Provide discovery metadata. See 2419 [I-D.ietf-oauth-discovery] 2421 Client 2423 * Discover the AS in charge of the RS that is to be targeted with 2424 a request. 2425 * Submit the token request (see step (A) of Figure 1). 2427 + Authenticate to the AS. 2428 + Optionally (if not pre-configured): Specify which RS, which 2429 resource(s), and which action(s) the request(s) will target. 2430 + If raw public keys (rpk) or certificates are used, make sure 2431 the AS has the right rpk or certificate for this client. 2432 * Process the access token and RS Information (see step (B) of 2433 Figure 1). 2435 + Check that the RS Information provides the necessary 2436 security parameters (e.g., PoP key, information on 2437 communication security protocols supported by the RS). 2438 * Send the token and request to the RS (see step (C) of 2439 Figure 1). 2441 + Authenticate towards the RS (this could coincide with the 2442 proof of possession process). 2443 + Transmit the token as specified by the AS (default is to the 2444 authz-info endpoint, alternative options are specified by 2445 profiles). 2446 + Perform the proof-of-possession procedure as specified by 2447 the profile in use (this may already have been taken care of 2448 through the authentication procedure). 2449 * Process the RS response (see step (F) of Figure 1) of the RS. 2451 Resource Server 2453 * Expose a way to submit access tokens. By default this is the 2454 authz-info endpoint. 2455 * Process an access token. 2457 + Verify the token is from a recognized AS. 2458 + Verify that the token applies to this RS. 2459 + Check that the token has not expired (if the token provides 2460 expiration information). 2461 + Check the token's integrity. 2462 + Store the token so that it can be retrieved in the context 2463 of a matching request. 2464 * Process a request. 2466 + Set up communication security with the client. 2467 + Authenticate the client. 2468 + Match the client against existing tokens. 2469 + Check that tokens belonging to the client actually authorize 2470 the requested action. 2471 + Optionally: Check that the matching tokens are still valid, 2472 using introspection (if this is possible.) 2473 * Send a response following the agreed upon communication 2474 security. 2476 Appendix C. Requirements on Profiles 2478 This section lists the requirements on profiles of this framework, 2479 for the convenience of profile designers. 2481 o Specify the communication protocol the client and RS the must use 2482 (e.g., CoAP). Section 5 and Section 5.6.4.4 2483 o Specify the security protocol the client and RS must use to 2484 protect their communication (e.g., OSCORE or DTLS over CoAP). 2485 This must provide encryption, integrity and replay protection. 2486 Section 5.6.4.4 2487 o Specify how the client and the RS mutually authenticate. 2488 Section 4 2489 o Specify the Content-format of the protocol messages (e.g., 2490 "application/cbor" or "application/cose+cbor"). Section 4 2491 o Specify the proof-of-possession protocol(s) and how to select one, 2492 if several are available. Also specify which key types (e.g., 2493 symmetric/asymmetric) are supported by a specific proof-of- 2494 possession protocol. Section 5.6.4.3 2495 o Specify a unique profile identifier. Section 5.6.4.4 2496 o If introspection is supported: Specify the communication and 2497 security protocol for introspection.Section 5.7 2498 o Specify the communication and security protocol for interactions 2499 between client and AS. Section 5.6 2500 o Specify how/if the authz-info endpoint is protected, including how 2501 error responses are protected. Section 5.8.1 2502 o Optionally define other methods of token transport than the authz- 2503 info endpoint. Section 5.8.1 2505 Appendix D. Assumptions on AS knowledge about C and RS 2507 This section lists the assumptions on what an AS should know about a 2508 client and a RS in order to be able to respond to requests to the 2509 token and introspection endpoints. How this information is 2510 established is out of scope for this document. 2512 o The identifier of the client or RS. 2513 o The profiles that the client or RS supports. 2514 o The scopes that the RS supports. 2515 o The audiences that the RS identifies with. 2516 o The key types (e.g., pre-shared symmetric key, raw public key, key 2517 length, other key parameters) that the client or RS supports. 2518 o The types of access tokens the RS supports (e.g., CWT). 2519 o If the RS supports CWTs, the COSE parameters for the crypto 2520 wrapper (e.g., algorithm, key-wrap algorithm, key-length). 2521 o The expiration time for access tokens issued to this RS (unless 2522 the RS accepts a default time chosen by the AS). 2523 o The symmetric key shared between client or RS and AS (if any). 2524 o The raw public key of the client or RS (if any). 2526 Appendix E. Deployment Examples 2528 There is a large variety of IoT deployments, as is indicated in 2529 Appendix A, and this section highlights a few common variants. This 2530 section is not normative but illustrates how the framework can be 2531 applied. 2533 For each of the deployment variants, there are a number of possible 2534 security setups between clients, resource servers and authorization 2535 servers. The main focus in the following subsections is on how 2536 authorization of a client request for a resource hosted by a RS is 2537 performed. This requires the security of the requests and responses 2538 between the clients and the RS to consider. 2540 Note: CBOR diagnostic notation is used for examples of requests and 2541 responses. 2543 E.1. Local Token Validation 2545 In this scenario, the case where the resource server is offline is 2546 considered, i.e., it is not connected to the AS at the time of the 2547 access request. This access procedure involves steps A, B, C, and F 2548 of Figure 1. 2550 Since the resource server must be able to verify the access token 2551 locally, self-contained access tokens must be used. 2553 This example shows the interactions between a client, the 2554 authorization server and a temperature sensor acting as a resource 2555 server. Message exchanges A and B are shown in Figure 16. 2557 A: The client first generates a public-private key pair used for 2558 communication security with the RS. 2559 The client sends the POST request to the token endpoint at the AS. 2560 The security of this request can be transport or application 2561 layer. It is up the the communication security profile to define. 2562 In the example transport layer identification of the AS is done 2563 and the client identifies with client_id and client_secret as in 2564 classic OAuth. The request contains the public key of the client 2565 and the Audience parameter set to "tempSensorInLivingRoom", a 2566 value that the temperature sensor identifies itself with. The AS 2567 evaluates the request and authorizes the client to access the 2568 resource. 2569 B: The AS responds with a PoP access token and RS Information. 2570 The PoP access token contains the public key of the client, and 2571 the RS Information contains the public key of the RS. For 2572 communication security this example uses DTLS RawPublicKey between 2573 the client and the RS. The issued token will have a short 2574 validity time, i.e., "exp" close to "iat", to protect the RS from 2575 replay attacks. The token includes the claim such as "scope" with 2576 the authorized access that an owner of the temperature device can 2577 enjoy. In this example, the "scope" claim, issued by the AS, 2578 informs the RS that the owner of the token, that can prove the 2579 possession of a key is authorized to make a GET request against 2580 the /temperature resource and a POST request on the /firmware 2581 resource. Note that the syntax and semantics of the scope claim 2582 are application specific. 2583 Note: In this example it is assumed that the client knows what 2584 resource it wants to access, and is therefore able to request 2585 specific audience and scope claims for the access token. 2587 Authorization 2588 Client Server 2589 | | 2590 |<=======>| DTLS Connection Establishment 2591 | | to identify the AS 2592 | | 2593 A: +-------->| Header: POST (Code=0.02) 2594 | POST | Uri-Path:"token" 2595 | | Content-Type: application/cbor 2596 | | Payload: 2597 | | 2598 B: |<--------+ Header: 2.05 Content 2599 | 2.05 | Content-Type: application/cbor 2600 | | Payload: 2601 | | 2603 Figure 16: Token Request and Response Using Client Credentials. 2605 The information contained in the Request-Payload and the Response- 2606 Payload is shown in Figure 17. Note that a transport layer security 2607 based communication security profile is used in this example, 2608 therefore the Content-Type is "application/cbor". 2610 Request-Payload : 2611 { 2612 "grant_type" : "client_credentials", 2613 "aud" : "tempSensorInLivingRoom", 2614 "client_id" : "myclient", 2615 "client_secret" : "qwerty" 2616 } 2618 Response-Payload : 2619 { 2620 "access_token" : b64'SlAV32hkKG ...', 2621 "token_type" : "pop", 2622 "csp" : "DTLS", 2623 "rs_cnf" : { 2624 "COSE_Key" : { 2625 "kid" : b64'c29tZSBwdWJsaWMga2V5IGlk', 2626 "kty" : "EC", 2627 "crv" : "P-256", 2628 "x" : b64'MKBCTNIcKUSDii11ySs3526iDZ8AiTo7Tu6KPAqv7D4', 2629 "y" : b64'4Etl6SRW2YiLUrN5vfvVHuhp7x8PxltmWWlbbM4IFyM' 2630 } 2631 } 2632 } 2634 Figure 17: Request and Response Payload Details. 2636 The content of the access token is shown in Figure 18. 2638 { 2639 "aud" : "tempSensorInLivingRoom", 2640 "iat" : "1360189224", 2641 "exp" : "1360289224", 2642 "scope" : "temperature_g firmware_p", 2643 "cnf" : { 2644 "COSE_Key" : { 2645 "kid" : b64'1Bg8vub9tLe1gHMzV76e8', 2646 "kty" : "EC", 2647 "crv" : "P-256", 2648 "x" : b64'f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU', 2649 "y" : b64'x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0' 2650 } 2651 } 2652 } 2654 Figure 18: Access Token including Public Key of the Client. 2656 Messages C and F are shown in Figure 19 - Figure 20. 2658 C: The client then sends the PoP access token to the authz-info 2659 endpoint at the RS. This is a plain CoAP request, i.e., no 2660 transport or application layer security between client and RS, 2661 since the token is integrity protected between the AS and RS. The 2662 RS verifies that the PoP access token was created by a known and 2663 trusted AS, is valid, and responds to the client. The RS caches 2664 the security context together with authorization information about 2665 this client contained in the PoP access token. 2667 Resource 2668 Client Server 2669 | | 2670 C: +-------->| Header: POST (Code=0.02) 2671 | POST | Uri-Path:"authz-info" 2672 | | Payload: SlAV32hkKG ... 2673 | | 2674 |<--------+ Header: 2.04 Changed 2675 | 2.04 | 2676 | | 2678 Figure 19: Access Token provisioning to RS 2679 The client and the RS runs the DTLS handshake using the raw public 2680 keys established in step B and C. 2682 The client sends the CoAP request GET to /temperature on RS over 2683 DTLS. The RS verifies that the request is authorized, based on 2684 previously established security context. 2685 F: The RS responds with a resource representation over DTLS. 2687 Resource 2688 Client Server 2689 | | 2690 |<=======>| DTLS Connection Establishment 2691 | | using Raw Public Keys 2692 | | 2693 +-------->| Header: GET (Code=0.01) 2694 | GET | Uri-Path: "temperature" 2695 | | 2696 | | 2697 | | 2698 F: |<--------+ Header: 2.05 Content 2699 | 2.05 | Payload: 2700 | | 2702 Figure 20: Resource Request and Response protected by DTLS. 2704 E.2. Introspection Aided Token Validation 2706 In this deployment scenario it is assumed that a client is not able 2707 to access the AS at the time of the access request, whereas the RS is 2708 assumed to be connected to the back-end infrastructure. Thus the RS 2709 can make use of token introspection. This access procedure involves 2710 steps A-F of Figure 1, but assumes steps A and B have been carried 2711 out during a phase when the client had connectivity to AS. 2713 Since the client is assumed to be offline, at least for a certain 2714 period of time, a pre-provisioned access token has to be long-lived. 2715 Since the client is constrained, the token will not be self contained 2716 (i.e. not a CWT) but instead just a reference. The resource server 2717 uses its connectivity to learn about the claims associated to the 2718 access token by using introspection, which is shown in the example 2719 below. 2721 In the example interactions between an offline client (key fob), a RS 2722 (online lock), and an AS is shown. It is assumed that there is a 2723 provisioning step where the client has access to the AS. This 2724 corresponds to message exchanges A and B which are shown in 2725 Figure 21. 2727 Authorization consent from the resource owner can be pre-configured, 2728 but it can also be provided via an interactive flow with the resource 2729 owner. An example of this for the key fob case could be that the 2730 resource owner has a connected car, he buys a generic key that he 2731 wants to use with the car. To authorize the key fob he connects it 2732 to his computer that then provides the UI for the device. After that 2733 OAuth 2.0 implicit flow can used to authorize the key for his car at 2734 the the car manufacturers AS. 2736 Note: In this example the client does not know the exact door it will 2737 be used to access since the token request is not send at the time of 2738 access. So the scope and audience parameters are set quite wide to 2739 start with and new values different form the original once can be 2740 returned from introspection later on. 2742 A: The client sends the request using POST to the token endpoint 2743 at AS. The request contains the Audience parameter set to 2744 "PACS1337" (PACS, Physical Access System), a value the that the 2745 online door in question identifies itself with. The AS generates 2746 an access token as an opaque string, which it can match to the 2747 specific client, a targeted audience and a symmetric key. The 2748 security is provided by identifying the AS on transport layer 2749 using a pre shared security context (psk, rpk or certificate) and 2750 then the client is identified using client_id and client_secret as 2751 in classic OAuth. 2752 B: The AS responds with the an access token and RS Information, 2753 the latter containing a symmetric key. Communication security 2754 between C and RS will be DTLS and PreSharedKey. The PoP key is 2755 used as the PreSharedKey. 2757 Authorization 2758 Client Server 2759 | | 2760 | | 2761 A: +-------->| Header: POST (Code=0.02) 2762 | POST | Uri-Path:"token" 2763 | | Content-Type: application/cbor 2764 | | Payload: 2765 | | 2766 B: |<--------+ Header: 2.05 Content 2767 | | Content-Type: application/cbor 2768 | 2.05 | Payload: 2769 | | 2771 Figure 21: Token Request and Response using Client Credentials. 2773 The information contained in the Request-Payload and the Response- 2774 Payload is shown in Figure 22. 2776 Request-Payload: 2777 { 2778 "grant_type" : "client_credentials", 2779 "aud" : "lockOfDoor4711", 2780 "client_id" : "keyfob", 2781 "client_secret" : "qwerty" 2782 } 2784 Response-Payload: 2785 { 2786 "access_token" : b64'SlAV32hkKG ...' 2787 "token_type" : "pop", 2788 "csp" : "DTLS", 2789 "cnf" : { 2790 "COSE_Key" : { 2791 "kid" : b64'c29tZSBwdWJsaWMga2V5IGlk', 2792 "kty" : "oct", 2793 "alg" : "HS256", 2794 "k": b64'ZoRSOrFzN_FzUA5XKMYoVHyzff5oRJxl-IXRtztJ6uE' 2795 } 2796 } 2797 } 2799 Figure 22: Request and Response Payload for C offline 2801 The access token in this case is just an opaque string referencing 2802 the authorization information at the AS. 2804 C: Next, the client POSTs the access token to the authz-info 2805 endpoint in the RS. This is a plain CoAP request, i.e., no DTLS 2806 between client and RS. Since the token is an opaque string, the 2807 RS cannot verify it on its own, and thus defers to respond the 2808 client with a status code until after step E. 2809 D: The RS forwards the token to the introspection endpoint on the 2810 AS. Introspection assumes a secure connection between the AS and 2811 the RS, e.g., using transport of application layer security. In 2812 the example AS is identified using pre shared security context 2813 (psk, rpk or certificate) while RS is acting as client and is 2814 identified with client_id and client_secret. 2815 E: The AS provides the introspection response containing 2816 parameters about the token. This includes the confirmation key 2817 (cnf) parameter that allows the RS to verify the client's proof of 2818 possession in step F. 2819 After receiving message E, the RS responds to the client's POST in 2820 step C with the CoAP response code 2.01 (Created). 2822 Resource 2823 Client Server 2824 | | 2825 C: +-------->| Header: POST (T=CON, Code=0.02) 2826 | POST | Uri-Path:"authz-info" 2827 | | Content-Type: "application/cbor" 2828 | | Payload: b64'SlAV32hkKG ...'' 2829 | | 2830 | | Authorization 2831 | | Server 2832 | | | 2833 | D: +--------->| Header: POST (Code=0.02) 2834 | | POST | Uri-Path: "introspect" 2835 | | | Content-Type: "application/cbor" 2836 | | | Payload: 2837 | | | 2838 | E: |<---------+ Header: 2.05 Content 2839 | | 2.05 | Content-Type: "application/cbor" 2840 | | | Payload: 2841 | | | 2842 | | 2843 |<--------+ Header: 2.01 Created 2844 | 2.01 | 2845 | | 2847 Figure 23: Token Introspection for C offline 2848 The information contained in the Request-Payload and the Response- 2849 Payload is shown in Figure 24. 2851 Request-Payload: 2852 { 2853 "token" : b64'SlAV32hkKG...', 2854 "client_id" : "FrontDoor", 2855 "client_secret" : "ytrewq" 2856 } 2858 Response-Payload: 2859 { 2860 "active" : true, 2861 "aud" : "lockOfDoor4711", 2862 "scope" : "open, close", 2863 "iat" : 1311280970, 2864 "cnf" : { 2865 "kid" : b64'JDLUhTMjU2IiwiY3R5Ijoi ...' 2866 } 2867 } 2869 Figure 24: Request and Response Payload for Introspection 2871 The client uses the symmetric PoP key to establish a DTLS 2872 PreSharedKey secure connection to the RS. The CoAP request PUT is 2873 sent to the uri-path /state on the RS, changing the state of the 2874 door to locked. 2875 F: The RS responds with a appropriate over the secure DTLS 2876 channel. 2878 Resource 2879 Client Server 2880 | | 2881 |<=======>| DTLS Connection Establishment 2882 | | using Pre Shared Key 2883 | | 2884 +-------->| Header: PUT (Code=0.03) 2885 | PUT | Uri-Path: "state" 2886 | | Payload: 2887 | | 2888 F: |<--------+ Header: 2.04 Changed 2889 | 2.04 | Payload: 2890 | | 2892 Figure 25: Resource request and response protected by OSCORE 2894 Appendix F. Document Updates 2896 RFC EDITOR: PLEASE REMOVE THIS SECTION. 2898 F.1. Version -11 to -12 2900 o Moved the Request error handling to a section of its own. 2901 o Require the use of the abbreviation for profile identifiers. 2902 o Added rs_cnf parameter in the introspection response, to inform 2903 RS' with several RPKs on which key to use. 2904 o Allowed use of rs_cnf as claim in the access token in order to 2905 inform an RS with several RPKs on which key to use. 2906 o Clarified that profiles must specify if/how error responses are 2907 protected. 2908 o Fixed label number range to align with COSE/CWT. 2909 o Clarified the requirements language in order to allow profiles to 2910 specify other payload formats than CBOR if they do not use CoAP. 2912 F.2. Version -10 to -11 2914 o Fixed some CBOR data type errors. 2915 o Updated boilerplate text 2917 F.3. Version -09 to -10 2919 o Removed CBOR major type numbers. 2920 o Removed the client token design. 2921 o Rephrased to clarify that other protocols than CoAP can be used. 2922 o Clarifications regarding the use of HTTP 2924 F.4. Version -08 to -09 2926 o Allowed scope to be byte arrays. 2927 o Defined default names for endpoints. 2928 o Refactored the IANA section for briefness and consistency. 2929 o Refactored tables that define IANA registry contents for 2930 consistency. 2931 o Created IANA registry for CBOR mappings of error codes, grant 2932 types and Authorization Server Information. 2933 o Added references to other document sections defining IANA entries 2934 in the IANA section. 2936 F.5. Version -07 to -08 2938 o Moved AS discovery from the DTLS profile to the framework, see 2939 Section 5.1. 2940 o Made the use of CBOR mandatory. If you use JSON you can use 2941 vanilla OAuth. 2942 o Made it mandatory for profiles to specify C-AS security and RS-AS 2943 security (the latter only if introspection is supported). 2944 o Made the use of CBOR abbreviations mandatory. 2945 o Added text to clarify the use of token references as an 2946 alternative to CWTs. 2947 o Added text to clarify that introspection must not be delayed, in 2948 case the RS has to return a client token. 2949 o Added security considerations about leakage through unprotected AS 2950 discovery information, combining profiles and leakage through 2951 error responses. 2952 o Added privacy considerations about leakage through unprotected AS 2953 discovery. 2954 o Added text that clarifies that introspection is optional. 2955 o Made profile parameter optional since it can be implicit. 2956 o Clarified that CoAP is not mandatory and other protocols can be 2957 used. 2958 o Clarified the design justification for specific features of the 2959 framework in appendix A. 2960 o Clarified appendix E.2. 2961 o Removed specification of the "cnf" claim for CBOR/COSE, and 2962 replaced with references to [I-D.ietf-ace-cwt-proof-of-possession] 2964 F.6. Version -06 to -07 2966 o Various clarifications added. 2967 o Fixed erroneous author email. 2969 F.7. Version -05 to -06 2971 o Moved sections that define the ACE framework into a subsection of 2972 the framework Section 5. 2973 o Split section on client credentials and grant into two separate 2974 sections, Section 5.2, and Section 5.3. 2975 o Added Section 5.4 on AS authentication. 2976 o Added Section 5.5 on the Authorization endpoint. 2978 F.8. Version -04 to -05 2980 o Added RFC 2119 language to the specification of the required 2981 behavior of profile specifications. 2982 o Added Section 5.3 on the relation to the OAuth2 grant types. 2983 o Added CBOR abbreviations for error and the error codes defined in 2984 OAuth2. 2985 o Added clarification about token expiration and long-running 2986 requests in Section 5.8.3 2987 o Added security considerations about tokens with symmetric pop keys 2988 valid for more than one RS. 2989 o Added privacy considerations section. 2990 o Added IANA registry mapping the confirmation types from RFC 7800 2991 to equivalent COSE types. 2992 o Added appendix D, describing assumptions about what the AS knows 2993 about the client and the RS. 2995 F.9. Version -03 to -04 2997 o Added a description of the terms "framework" and "profiles" as 2998 used in this document. 2999 o Clarified protection of access tokens in section 3.1. 3000 o Clarified uses of the "cnf" parameter in section 6.4.5. 3001 o Clarified intended use of Client Token in section 7.4. 3003 F.10. Version -02 to -03 3005 o Removed references to draft-ietf-oauth-pop-key-distribution since 3006 the status of this draft is unclear. 3007 o Copied and adapted security considerations from draft-ietf-oauth- 3008 pop-key-distribution. 3009 o Renamed "client information" to "RS information" since it is 3010 information about the RS. 3011 o Clarified the requirements on profiles of this framework. 3013 o Clarified the token endpoint protocol and removed negotiation of 3014 "profile" and "alg" (section 6). 3015 o Renumbered the abbreviations for claims and parameters to get a 3016 consistent numbering across different endpoints. 3017 o Clarified the introspection endpoint. 3018 o Renamed token, introspection and authz-info to "endpoint" instead 3019 of "resource" to mirror the OAuth 2.0 terminology. 3020 o Updated the examples in the appendices. 3022 F.11. Version -01 to -02 3024 o Restructured to remove communication security parts. These shall 3025 now be defined in profiles. 3026 o Restructured section 5 to create new sections on the OAuth 3027 endpoints token, introspection and authz-info. 3028 o Pulled in material from draft-ietf-oauth-pop-key-distribution in 3029 order to define proof-of-possession key distribution. 3030 o Introduced the "cnf" parameter as defined in RFC7800 to reference 3031 or transport keys used for proof of possession. 3032 o Introduced the "client-token" to transport client information from 3033 the AS to the client via the RS in conjunction with introspection. 3034 o Expanded the IANA section to define parameters for token request, 3035 introspection and CWT claims. 3036 o Moved deployment scenarios to the appendix as examples. 3038 F.12. Version -00 to -01 3040 o Changed 5.1. from "Communication Security Protocol" to "Client 3041 Information". 3042 o Major rewrite of 5.1 to clarify the information exchanged between 3043 C and AS in the PoP access token request profile for IoT. 3045 * Allow the client to indicate preferences for the communication 3046 security protocol. 3047 * Defined the term "Client Information" for the additional 3048 information returned to the client in addition to the access 3049 token. 3050 * Require that the messages between AS and client are secured, 3051 either with (D)TLS or with COSE_Encrypted wrappers. 3052 * Removed dependency on OSCOAP and added generic text about 3053 object security instead. 3054 * Defined the "rpk" parameter in the client information to 3055 transmit the raw public key of the RS from AS to client. 3056 * (D)TLS MUST use the PoP key in the handshake (either as PSK or 3057 as client RPK with client authentication). 3058 * Defined the use of x5c, x5t and x5tS256 parameters when a 3059 client certificate is used for proof of possession. 3061 * Defined "tktn" parameter for signaling for how to transfer the 3062 access token. 3063 o Added 5.2. the CoAP Access-Token option for transferring access 3064 tokens in messages that do not have payload. 3065 o 5.3.2. Defined success and error responses from the RS when 3066 receiving an access token. 3067 o 5.6.:Added section giving guidance on how to handle token 3068 expiration in the absence of reliable time. 3069 o Appendix B Added list of roles and responsibilities for C, AS and 3070 RS. 3072 Authors' Addresses 3074 Ludwig Seitz 3075 RISE SICS 3076 Scheelevaegen 17 3077 Lund 223 70 3078 Sweden 3080 Email: ludwig.seitz@ri.se 3082 Goeran Selander 3083 Ericsson 3084 Faroegatan 6 3085 Kista 164 80 3086 Sweden 3088 Email: goran.selander@ericsson.com 3090 Erik Wahlstroem 3091 Sweden 3093 Email: erik@wahlstromstekniska.se 3095 Samuel Erdtman 3096 Spotify AB 3097 Birger Jarlsgatan 61, 4tr 3098 Stockholm 113 56 3099 Sweden 3101 Email: erdtman@spotify.com 3102 Hannes Tschofenig 3103 ARM Ltd. 3104 Hall in Tirol 6060 3105 Austria 3107 Email: Hannes.Tschofenig@arm.com