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