idnits 2.17.1 draft-ietf-ace-oauth-authz-22.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (March 5, 2019) is 1871 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: A later version (-11) exists of draft-ietf-ace-cwt-proof-of-possession-06 == Outdated reference: A later version (-16) exists of draft-ietf-ace-oauth-params-04 == Outdated reference: A later version (-19) exists of draft-ietf-oauth-token-exchange-16 ** 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 (-16) exists of draft-ietf-core-object-security-15 == Outdated reference: A later version (-15) exists of draft-ietf-oauth-device-flow-14 == Outdated reference: A later version (-43) exists of draft-ietf-tls-dtls13-30 -- Obsolete informational reference (is this intentional?): RFC 7049 (Obsoleted by RFC 8949) -- Obsolete informational reference (is this intentional?): RFC 7231 (Obsoleted by RFC 9110) Summary: 2 errors (**), 0 flaws (~~), 7 warnings (==), 3 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 4 Intended status: Standards Track G. Selander 5 Expires: September 6, 2019 Ericsson 6 E. Wahlstroem 8 S. Erdtman 9 Spotify AB 10 H. Tschofenig 11 Arm Ltd. 12 March 5, 2019 14 Authentication and Authorization for Constrained Environments (ACE) 15 using the OAuth 2.0 Framework (ACE-OAuth) 16 draft-ietf-ace-oauth-authz-22 18 Abstract 20 This specification defines a framework for authentication and 21 authorization in Internet of Things (IoT) environments called ACE- 22 OAuth. The framework is based on a set of building blocks including 23 OAuth 2.0 and CoAP, thus making a well-known and widely used 24 authorization solution suitable for IoT devices. Existing 25 specifications are used where possible, but where the constraints of 26 IoT devices require it, extensions are added and profiles are 27 defined. 29 Status of This Memo 31 This Internet-Draft is submitted in full conformance with the 32 provisions of BCP 78 and BCP 79. 34 Internet-Drafts are working documents of the Internet Engineering 35 Task Force (IETF). Note that other groups may also distribute 36 working documents as Internet-Drafts. The list of current Internet- 37 Drafts is at https://datatracker.ietf.org/drafts/current/. 39 Internet-Drafts are draft documents valid for a maximum of six months 40 and may be updated, replaced, or obsoleted by other documents at any 41 time. It is inappropriate to use Internet-Drafts as reference 42 material or to cite them other than as "work in progress." 44 This Internet-Draft will expire on September 6, 2019. 46 Copyright Notice 48 Copyright (c) 2019 IETF Trust and the persons identified as the 49 document authors. All rights reserved. 51 This document is subject to BCP 78 and the IETF Trust's Legal 52 Provisions Relating to IETF Documents 53 (https://trustee.ietf.org/license-info) in effect on the date of 54 publication of this document. Please review these documents 55 carefully, as they describe your rights and restrictions with respect 56 to this document. Code Components extracted from this document must 57 include Simplified BSD License text as described in Section 4.e of 58 the Trust Legal Provisions and are provided without warranty as 59 described in the Simplified BSD License. 61 Table of Contents 63 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 64 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5 65 3. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 6 66 3.1. OAuth 2.0 . . . . . . . . . . . . . . . . . . . . . . . . 7 67 3.2. CoAP . . . . . . . . . . . . . . . . . . . . . . . . . . 10 68 4. Protocol Interactions . . . . . . . . . . . . . . . . . . . . 11 69 5. Framework . . . . . . . . . . . . . . . . . . . . . . . . . . 15 70 5.1. Discovering Authorization Servers . . . . . . . . . . . . 16 71 5.1.1. Unauthorized Resource Request Message . . . . . . . . 16 72 5.1.2. AS Request Creation Hints . . . . . . . . . . . . . . 17 73 5.2. Authorization Grants . . . . . . . . . . . . . . . . . . 19 74 5.3. Client Credentials . . . . . . . . . . . . . . . . . . . 20 75 5.4. AS Authentication . . . . . . . . . . . . . . . . . . . . 20 76 5.5. The Authorization Endpoint . . . . . . . . . . . . . . . 20 77 5.6. The Token Endpoint . . . . . . . . . . . . . . . . . . . 20 78 5.6.1. Client-to-AS Request . . . . . . . . . . . . . . . . 21 79 5.6.2. AS-to-Client Response . . . . . . . . . . . . . . . . 24 80 5.6.3. Error Response . . . . . . . . . . . . . . . . . . . 26 81 5.6.4. Request and Response Parameters . . . . . . . . . . . 27 82 5.6.4.1. Grant Type . . . . . . . . . . . . . . . . . . . 27 83 5.6.4.2. Token Type . . . . . . . . . . . . . . . . . . . 28 84 5.6.4.3. Profile . . . . . . . . . . . . . . . . . . . . . 28 85 5.6.5. Mapping Parameters to CBOR . . . . . . . . . . . . . 29 86 5.7. The Introspection Endpoint . . . . . . . . . . . . . . . 29 87 5.7.1. Introspection Request . . . . . . . . . . . . . . . . 30 88 5.7.2. Introspection Response . . . . . . . . . . . . . . . 31 89 5.7.3. Error Response . . . . . . . . . . . . . . . . . . . 32 90 5.7.4. Mapping Introspection parameters to CBOR . . . . . . 33 91 5.8. The Access Token . . . . . . . . . . . . . . . . . . . . 33 92 5.8.1. The Authorization Information Endpoint . . . . . . . 34 93 5.8.1.1. Verifying an Access Token . . . . . . . . . . . . 35 94 5.8.1.2. Protecting the Authorization Information 95 Endpoint . . . . . . . . . . . . . . . . . . . . 37 96 5.8.2. Client Requests to the RS . . . . . . . . . . . . . . 37 97 5.8.3. Token Expiration . . . . . . . . . . . . . . . . . . 38 98 5.8.4. Key Expiration . . . . . . . . . . . . . . . . . . . 39 99 6. Security Considerations . . . . . . . . . . . . . . . . . . . 39 100 6.1. Unprotected AS Request Creation Hints . . . . . . . . . . 41 101 6.2. Minimal security requirements for communication . 41 102 6.3. Use of Nonces for Replay Protection . . . . . . . . . . . 42 103 6.4. Combining profiles . . . . . . . . . . . . . . . . . . . 42 104 6.5. Unprotected Information . . . . . . . . . . . . . . . . . 42 105 6.6. Identifying audiences . . . . . . . . . . . . . . . . . . 43 106 6.7. Denial of service against or with Introspection . . 44 107 7. Privacy Considerations . . . . . . . . . . . . . . . . . . . 44 108 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 45 109 8.1. ACE Authorization Server Request Creation Hints . . . . . 45 110 8.2. OAuth Extensions Error Registration . . . . . . . . . . . 46 111 8.3. OAuth Error Code CBOR Mappings Registry . . . . . . . . . 46 112 8.4. OAuth Grant Type CBOR Mappings . . . . . . . . . . . . . 47 113 8.5. OAuth Access Token Types . . . . . . . . . . . . . . . . 47 114 8.6. OAuth Access Token Type CBOR Mappings . . . . . . . . . . 47 115 8.6.1. Initial Registry Contents . . . . . . . . . . . . . . 48 116 8.7. ACE Profile Registry . . . . . . . . . . . . . . . . . . 48 117 8.8. OAuth Parameter Registration . . . . . . . . . . . . . . 49 118 8.9. OAuth Parameters CBOR Mappings Registry . . . . . . . . . 49 119 8.10. OAuth Introspection Response Parameter Registration . . . 49 120 8.11. OAuth Token Introspection Response CBOR Mappings Registry 50 121 8.12. JSON Web Token Claims . . . . . . . . . . . . . . . . . . 50 122 8.13. CBOR Web Token Claims . . . . . . . . . . . . . . . . . . 51 123 8.14. Media Type Registrations . . . . . . . . . . . . . . . . 51 124 8.15. CoAP Content-Format Registry . . . . . . . . . . . . . . 52 125 8.16. Expert Review Instructions . . . . . . . . . . . . . . . 53 126 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 53 127 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 54 128 10.1. Normative References . . . . . . . . . . . . . . . . . . 54 129 10.2. Informative References . . . . . . . . . . . . . . . . . 56 130 Appendix A. Design Justification . . . . . . . . . . . . . . . . 59 131 Appendix B. Roles and Responsibilities . . . . . . . . . . . . . 62 132 Appendix C. Requirements on Profiles . . . . . . . . . . . . . . 64 133 Appendix D. Assumptions on AS knowledge about C and RS . . . . . 65 134 Appendix E. Deployment Examples . . . . . . . . . . . . . . . . 65 135 E.1. Local Token Validation . . . . . . . . . . . . . . . . . 66 136 E.2. Introspection Aided Token Validation . . . . . . . . . . 70 137 Appendix F. Document Updates . . . . . . . . . . . . . . . . . . 74 138 F.1. Version -21 to 22 . . . . . . . . . . . . . . . . . . . . 74 139 F.2. Version -20 to 21 . . . . . . . . . . . . . . . . . . . . 74 140 F.3. Version -19 to 20 . . . . . . . . . . . . . . . . . . . . 74 141 F.4. Version -18 to -19 . . . . . . . . . . . . . . . . . . . 75 142 F.5. Version -17 to -18 . . . . . . . . . . . . . . . . . . . 75 143 F.6. Version -16 to -17 . . . . . . . . . . . . . . . . . . . 75 144 F.7. Version -15 to -16 . . . . . . . . . . . . . . . . . . . 76 145 F.8. Version -14 to -15 . . . . . . . . . . . . . . . . . . . 76 146 F.9. Version -13 to -14 . . . . . . . . . . . . . . . . . . . 76 147 F.10. Version -12 to -13 . . . . . . . . . . . . . . . . . . . 76 148 F.11. Version -11 to -12 . . . . . . . . . . . . . . . . . . . 76 149 F.12. Version -10 to -11 . . . . . . . . . . . . . . . . . . . 77 150 F.13. Version -09 to -10 . . . . . . . . . . . . . . . . . . . 77 151 F.14. Version -08 to -09 . . . . . . . . . . . . . . . . . . . 77 152 F.15. Version -07 to -08 . . . . . . . . . . . . . . . . . . . 77 153 F.16. Version -06 to -07 . . . . . . . . . . . . . . . . . . . 78 154 F.17. Version -05 to -06 . . . . . . . . . . . . . . . . . . . 78 155 F.18. Version -04 to -05 . . . . . . . . . . . . . . . . . . . 78 156 F.19. Version -03 to -04 . . . . . . . . . . . . . . . . . . . 78 157 F.20. Version -02 to -03 . . . . . . . . . . . . . . . . . . . 78 158 F.21. Version -01 to -02 . . . . . . . . . . . . . . . . . . . 79 159 F.22. Version -00 to -01 . . . . . . . . . . . . . . . . . . . 79 160 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 80 162 1. Introduction 164 Authorization is the process for granting approval to an entity to 165 access a resource [RFC4949]. The authorization task itself can best 166 be described as granting access to a requesting client, for a 167 resource hosted on a device, the resource server (RS). This exchange 168 is mediated by one or multiple authorization servers (AS). Managing 169 authorization for a large number of devices and users can be a 170 complex task. 172 While prior work on authorization solutions for the Web and for the 173 mobile environment also applies to the Internet of Things (IoT) 174 environment, many IoT devices are constrained, for example, in terms 175 of processing capabilities, available memory, etc. For web 176 applications on constrained nodes, this specification RECOMMENDS the 177 use of CoAP [RFC7252] as replacement for HTTP. 179 A detailed treatment of constraints can be found in [RFC7228], and 180 the different IoT deployments present a continuous range of device 181 and network capabilities. Taking energy consumption as an example: 182 At one end there are energy-harvesting or battery powered devices 183 which have a tight power budget, on the other end there are mains- 184 powered devices, and all levels in between. 186 Hence, IoT devices may be very different in terms of available 187 processing and message exchange capabilities and there is a need to 188 support many different authorization use cases [RFC7744]. 190 This specification describes a framework for authentication and 191 authorization in constrained environments (ACE) built on re-use of 192 OAuth 2.0 [RFC6749], thereby extending authorization to Internet of 193 Things devices. This specification contains the necessary building 194 blocks for adjusting OAuth 2.0 to IoT environments. 196 More detailed, interoperable specifications can be found in profiles. 197 Implementations may claim conformance with a specific profile, 198 whereby implementations utilizing the same profile interoperate while 199 implementations of different profiles are not expected to be 200 interoperable. Some devices, such as mobile phones and tablets, may 201 implement multiple profiles and will therefore be able to interact 202 with a wider range of low end devices. Requirements on profiles are 203 described at contextually appropriate places throughout this 204 specification, and also summarized in Appendix C. 206 2. Terminology 208 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 209 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 210 "OPTIONAL" in this document are to be interpreted as described in BCP 211 14 [RFC2119] [RFC8174] when, and only when, they appear in all 212 capitals, as shown here. 214 Certain security-related terms such as "authentication", 215 "authorization", "confidentiality", "(data) integrity", "message 216 authentication code", and "verify" are taken from [RFC4949]. 218 Since exchanges in this specification are described as RESTful 219 protocol interactions, HTTP [RFC7231] offers useful terminology. 221 Terminology for entities in the architecture is defined in OAuth 2.0 222 [RFC6749] such as client (C), resource server (RS), and authorization 223 server (AS). 225 Note that the term "endpoint" is used here following its OAuth 226 definition, which is to denote resources such as token and 227 introspection at the AS and authz-info at the RS (see Section 5.8.1 228 for a definition of the authz-info endpoint). The CoAP [RFC7252] 229 definition, which is "An entity participating in the CoAP protocol" 230 is not used in this specification. 232 The specifications in this document is called the "framework" or "ACE 233 framework". When referring to "profiles of this framework" it refers 234 to additional specifications that define the use of this 235 specification with concrete transport, and communication security 236 protocols (e.g., CoAP over DTLS). 238 We use the term "Access Information" for parameters other than the 239 access token provided to the client by the AS to enable it to access 240 the RS (e.g. public key of the RS, profile supported by RS). 242 We use the term "Authorization Information" to denote all 243 information, including the claims of relevant access tokens, that an 244 RS uses to determine whether an access request should be granted. 246 3. Overview 248 This specification defines the ACE framework for authorization in the 249 Internet of Things environment. It consists of a set of building 250 blocks. 252 The basic block is the OAuth 2.0 [RFC6749] framework, which enjoys 253 widespread deployment. Many IoT devices can support OAuth 2.0 254 without any additional extensions, but for certain constrained 255 settings additional profiling is needed. 257 Another building block is the lightweight web transfer protocol CoAP 258 [RFC7252], for those communication environments where HTTP is not 259 appropriate. CoAP typically runs on top of UDP, which further 260 reduces overhead and message exchanges. While this specification 261 defines extensions for the use of OAuth over CoAP, other underlying 262 protocols are not prohibited from being supported in the future, such 263 as HTTP/2, MQTT, BLE and QUIC. 265 A third building block is CBOR [RFC7049], for encodings where JSON 266 [RFC8259] is not sufficiently compact. CBOR is a binary encoding 267 designed for small code and message size, which may be used for 268 encoding of self contained tokens, and also for encoding payload 269 transferred in protocol messages. 271 A fourth building block is the compact CBOR-based secure message 272 format COSE [RFC8152], which enables application layer security as an 273 alternative or complement to transport layer security (DTLS [RFC6347] 274 or TLS [RFC8446]). COSE is used to secure self-contained tokens such 275 as proof-of-possession (PoP) tokens, which is an extension to the 276 OAuth tokens. The default token format is defined in CBOR web token 277 (CWT) [RFC8392]. Application layer security for CoAP using COSE can 278 be provided with OSCORE [I-D.ietf-core-object-security]. 280 With the building blocks listed above, solutions satisfying various 281 IoT device and network constraints are possible. A list of 282 constraints is described in detail in [RFC7228] and a description of 283 how the building blocks mentioned above relate to the various 284 constraints can be found in Appendix A. 286 Luckily, not every IoT device suffers from all constraints. The ACE 287 framework nevertheless takes all these aspects into account and 288 allows several different deployment variants to co-exist, rather than 289 mandating a one-size-fits-all solution. It is important to cover the 290 wide range of possible interworking use cases and the different 291 requirements from a security point of view. Once IoT deployments 292 mature, popular deployment variants will be documented in the form of 293 ACE profiles. 295 3.1. OAuth 2.0 297 The OAuth 2.0 authorization framework enables a client to obtain 298 scoped access to a resource with the permission of a resource owner. 299 Authorization information, or references to it, is passed between the 300 nodes using access tokens. These access tokens are issued to clients 301 by an authorization server with the approval of the resource owner. 302 The client uses the access token to access the protected resources 303 hosted by the resource server. 305 A number of OAuth 2.0 terms are used within this specification: 307 The token and introspection Endpoints: 308 The AS hosts the token endpoint that allows a client to request 309 access tokens. The client makes a POST request to the token 310 endpoint on the AS and receives the access token in the response 311 (if the request was successful). 312 In some deployments, a token introspection endpoint is provided by 313 the AS, which can be used by the RS if it needs to request 314 additional information regarding a received access token. The RS 315 makes a POST request to the introspection endpoint on the AS and 316 receives information about the access token in the response. (See 317 "Introspection" below.) 319 Access Tokens: 320 Access tokens are credentials needed to access protected 321 resources. An access token is a data structure representing 322 authorization permissions issued by the AS to the client. Access 323 tokens are generated by the AS and consumed by the RS. The access 324 token content is opaque to the client. 326 Access tokens can have different formats, and various methods of 327 utilization (e.g., cryptographic properties) based on the security 328 requirements of the given deployment. 330 Refresh Tokens: 331 Refresh tokens are credentials used to obtain access tokens. 332 Refresh tokens are issued to the client by the authorization 333 server and are used to obtain a new access token when the current 334 access token becomes invalid or expires, or to obtain additional 335 access tokens with identical or narrower scope (access tokens may 336 have a shorter lifetime and fewer permissions than authorized by 337 the resource owner). Issuing a refresh token is optional at the 338 discretion of the authorization server. If the authorization 339 server issues a refresh token, it is included when issuing an 340 access token (i.e., step (B) in Figure 1). 342 A refresh token in OAuth 2.0 is a string representing the 343 authorization granted to the client by the resource owner. The 344 string is usually opaque to the client. The token denotes an 345 identifier used to retrieve the authorization information. Unlike 346 access tokens, refresh tokens are intended for use only with 347 authorization servers and are never sent to resource servers. In 348 this framework, refresh tokens are encoded in binary instead of 349 strings, if used. 351 Proof of Possession Tokens: 352 An access token may be bound to a cryptographic key, which is then 353 used by an RS to authenticate requests from a client. Such tokens 354 are called proof-of-possession access tokens (or PoP access 355 tokens). 357 The proof-of-possession (PoP) security concept assumes that the AS 358 acts as a trusted third party that binds keys to access tokens. 359 These so called PoP keys are then used by the client to 360 demonstrate the possession of the secret to the RS when accessing 361 the resource. The RS, when receiving an access token, needs to 362 verify that the key used by the client matches the one bound to 363 the access token. When this specification uses the term "access 364 token" it is assumed to be a PoP access token token unless 365 specifically stated otherwise. 367 The key bound to the access token (the PoP key) may use either 368 symmetric or asymmetric cryptography. The appropriate choice of 369 the kind of cryptography depends on the constraints of the IoT 370 devices as well as on the security requirements of the use case. 372 Symmetric PoP key: 373 The AS generates a random symmetric PoP key. The key is either 374 stored to be returned on introspection calls or encrypted and 375 included in the access token. The PoP key is also encrypted 376 for the client and sent together with the access token to the 377 client. 379 Asymmetric PoP key: 380 An asymmetric key pair is generated on the client and the 381 public key is sent to the AS (if it does not already have 382 knowledge of the client's public key). Information about the 383 public key, which is the PoP key in this case, is either stored 384 to be returned on introspection calls or included inside the 385 access token and sent back to the requesting client. The RS 386 can identify the client's public key from the information in 387 the token, which allows the client to use the corresponding 388 private key for the proof of possession. 390 The access token is either a simple reference, or a structured 391 information object (e.g., CWT [RFC8392]) protected by a 392 cryptographic wrapper (e.g., COSE [RFC8152]). The choice of PoP 393 key does not necessarily imply a specific credential type for the 394 integrity protection of the token. 396 Scopes and Permissions: 397 In OAuth 2.0, the client specifies the type of permissions it is 398 seeking to obtain (via the scope parameter) in the access token 399 request. In turn, the AS may use the scope response parameter to 400 inform the client of the scope of the access token issued. As the 401 client could be a constrained device as well, this specification 402 defines the use of CBOR encoding as data format, see Section 5, to 403 request scopes and to be informed what scopes the access token 404 actually authorizes. 406 The values of the scope parameter in OAuth 2.0 are expressed as a 407 list of space-delimited, case-sensitive strings, with a semantic 408 that is well-known to the AS and the RS. More details about the 409 concept of scopes is found under Section 3.3 in [RFC6749]. 411 Claims: 412 Information carried in the access token or returned from 413 introspection, called claims, is in the form of name-value pairs. 414 An access token may, for example, include a claim identifying the 415 AS that issued the token (via the "iss" claim) and what audience 416 the access token is intended for (via the "aud" claim). The 417 audience of an access token can be a specific resource or one or 418 many resource servers. The resource owner policies influence what 419 claims are put into the access token by the authorization server. 421 While the structure and encoding of the access token varies 422 throughout deployments, a standardized format has been defined 423 with the JSON Web Token (JWT) [RFC7519] where claims are encoded 424 as a JSON object. In [RFC8392], an equivalent format using CBOR 425 encoding (CWT) has been defined. 427 Introspection: 428 Introspection is a method for a resource server to query the 429 authorization server for the active state and content of a 430 received access token. This is particularly useful in those cases 431 where the authorization decisions are very dynamic and/or where 432 the received access token itself is an opaque reference rather 433 than a self-contained token. More information about introspection 434 in OAuth 2.0 can be found in [RFC7662]. 436 3.2. CoAP 438 CoAP is an application layer protocol similar to HTTP, but 439 specifically designed for constrained environments. CoAP typically 440 uses datagram-oriented transport, such as UDP, where reordering and 441 loss of packets can occur. A security solution needs to take the 442 latter aspects into account. 444 While HTTP uses headers and query strings to convey additional 445 information about a request, CoAP encodes such information into 446 header parameters called 'options'. 448 CoAP supports application-layer fragmentation of the CoAP payloads 449 through blockwise transfers [RFC7959]. However, blockwise transfer 450 does not increase the size limits of CoAP options, therefore data 451 encoded in options has to be kept small. 453 Transport layer security for CoAP can be provided by DTLS or TLS 454 [RFC6347][RFC8446] [I-D.ietf-tls-dtls13]. CoAP defines a number of 455 proxy operations that require transport layer security to be 456 terminated at the proxy. One approach for protecting CoAP 457 communication end-to-end through proxies, and also to support 458 security for CoAP over a different transport in a uniform way, is to 459 provide security at the application layer using an object-based 460 security mechanism such as COSE [RFC8152]. 462 One application of COSE is OSCORE [I-D.ietf-core-object-security], 463 which provides end-to-end confidentiality, integrity and replay 464 protection, and a secure binding between CoAP request and response 465 messages. In OSCORE, the CoAP messages are wrapped in COSE objects 466 and sent using CoAP. 468 This framework RECOMMENDS the use of CoAP as replacement for HTTP for 469 use in constrained environments. 471 4. Protocol Interactions 473 The ACE framework is based on the OAuth 2.0 protocol interactions 474 using the token endpoint and optionally the introspection endpoint. 475 A client obtains an access token, and optionally a refresh token, 476 from an AS using the token endpoint and subsequently presents the 477 access token to a RS to gain access to a protected resource. In most 478 deployments the RS can process the access token locally, however in 479 some cases the RS may present it to the AS via the introspection 480 endpoint to get fresh information. These interactions are shown in 481 Figure 1. An overview of various OAuth concepts is provided in 482 Section 3.1. 484 The OAuth 2.0 framework defines a number of "protocol flows" via 485 grant types, which have been extended further with extensions to 486 OAuth 2.0 (such as [RFC7521] and [I-D.ietf-oauth-device-flow]). What 487 grant types works best depends on the usage scenario and [RFC7744] 488 describes many different IoT use cases but there are two preferred 489 grant types, namely the Authorization Code Grant (described in 490 Section 4.1 of [RFC7521]) and the Client Credentials Grant (described 491 in Section 4.4 of [RFC7521]). The Authorization Code Grant is a good 492 fit for use with apps running on smart phones and tablets that 493 request access to IoT devices, a common scenario in the smart home 494 environment, where users need to go through an authentication and 495 authorization phase (at least during the initial setup phase). The 496 native apps guidelines described in [RFC8252] are applicable to this 497 use case. The Client Credential Grant is a good fit for use with IoT 498 devices where the OAuth client itself is constrained. In such a 499 case, the resource owner has pre-arranged access rights for the 500 client with the authorization server, which is often accomplished 501 using a commissioning tool. 503 The consent of the resource owner, for giving a client access to a 504 protected resource, can be provided dynamically as in the traditional 505 OAuth flows, or it could be pre-configured by the resource owner as 506 authorization policies at the AS, which the AS evaluates when a token 507 request arrives. The resource owner and the requesting party (i.e., 508 client owner) are not shown in Figure 1. 510 This framework supports a wide variety of communication security 511 mechanisms between the ACE entities, such as client, AS, and RS. It 512 is assumed that the client has been registered (also called enrolled 513 or onboarded) to an AS using a mechanism defined outside the scope of 514 this document. In practice, various techniques for onboarding have 515 been used, such as factory-based provisioning or the use of 516 commissioning tools. Regardless of the onboarding technique, this 517 provisioning procedure implies that the client and the AS exchange 518 credentials and configuration parameters. These credentials are used 519 to mutually authenticate each other and to protect messages exchanged 520 between the client and the AS. 522 It is also assumed that the RS has been registered with the AS, 523 potentially in a similar way as the client has been registered with 524 the AS. Established keying material between the AS and the RS allows 525 the AS to apply cryptographic protection to the access token to 526 ensure that its content cannot be modified, and if needed, that the 527 content is confidentiality protected. 529 The keying material necessary for establishing communication security 530 between C and RS is dynamically established as part of the protocol 531 described in this document. 533 At the start of the protocol, there is an optional discovery step 534 where the client discovers the resource server and the resources this 535 server hosts. In this step, the client might also determine what 536 permissions are needed to access the protected resource. A generic 537 procedure is described in Section 5.1, profiles MAY define other 538 procedures for discovery. 540 In Bluetooth Low Energy, for example, advertisements are broadcasted 541 by a peripheral, including information about the primary services. 542 In CoAP, as a second example, a client can make a request to "/.well- 543 known/core" to obtain information about available resources, which 544 are returned in a standardized format as described in [RFC6690]. 546 +--------+ +---------------+ 547 | |---(A)-- Token Request ------->| | 548 | | | Authorization | 549 | |<--(B)-- Access Token ---------| Server | 550 | | + Access Information | | 551 | | + Refresh Token (optional) +---------------+ 552 | | ^ | 553 | | Introspection Request (D)| | 554 | Client | (optional) | | 555 | | Response | |(E) 556 | | (optional) | v 557 | | +--------------+ 558 | |---(C)-- Token + Request ----->| | 559 | | | Resource | 560 | |<--(F)-- Protected Resource ---| Server | 561 | | | | 562 +--------+ +--------------+ 564 Figure 1: Basic Protocol Flow. 566 Requesting an Access Token (A): 567 The client makes an access token request to the token endpoint at 568 the AS. This framework assumes the use of PoP access tokens (see 569 Section 3.1 for a short description) wherein the AS binds a key to 570 an access token. The client may include permissions it seeks to 571 obtain, and information about the credentials it wants to use 572 (e.g., symmetric/asymmetric cryptography or a reference to a 573 specific credential). 575 Access Token Response (B): 576 If the AS successfully processes the request from the client, it 577 returns an access token and optionally a refresh token (note that 578 only certain grant types support refresh tokens). It can also 579 return additional parameters, referred to as "Access Information". 580 In addition to the response parameters defined by OAuth 2.0 and 581 the PoP access token extension, this framework defines parameters 582 that can be used to inform the client about capabilities of the 583 RS. More information about these parameters can be found in 584 Section 5.6.4. 586 Resource Request (C): 587 The client interacts with the RS to request access to the 588 protected resource and provides the access token. The protocol to 589 use between the client and the RS is not restricted to CoAP. 591 HTTP, HTTP/2, QUIC, MQTT, Bluetooth Low Energy, etc., are also 592 viable candidates. 594 Depending on the device limitations and the selected protocol, 595 this exchange may be split up into two parts: 597 (1) the client sends the access token containing, or 598 referencing, the authorization information to the RS, that may 599 be used for subsequent resource requests by the client, and 601 (2) the client makes the resource access request, using the 602 communication security protocol and other Access Information 603 obtained from the AS. 605 The Client and the RS mutually authenticate using the security 606 protocol specified in the profile (see step B) and the keys 607 obtained in the access token or the Access Information. The RS 608 verifies that the token is integrity protected by the AS and 609 compares the claims contained in the access token with the 610 resource request. If the RS is online, validation can be handed 611 over to the AS using token introspection (see messages D and E) 612 over HTTP or CoAP. 614 Token Introspection Request (D): 615 A resource server may be configured to introspect the access token 616 by including it in a request to the introspection endpoint at that 617 AS. Token introspection over CoAP is defined in Section 5.7 and 618 for HTTP in [RFC7662]. 620 Note that token introspection is an optional step and can be 621 omitted if the token is self-contained and the resource server is 622 prepared to perform the token validation on its own. 624 Token Introspection Response (E): 625 The AS validates the token and returns the most recent parameters, 626 such as scope, audience, validity etc. associated with it back to 627 the RS. The RS then uses the received parameters to process the 628 request to either accept or to deny it. 630 Protected Resource (F): 631 If the request from the client is authorized, the RS fulfills the 632 request and returns a response with the appropriate response code. 634 The RS uses the dynamically established keys to protect the 635 response, according to used communication security protocol. 637 5. Framework 639 The following sections detail the profiling and extensions of OAuth 640 2.0 for constrained environments, which constitutes the ACE 641 framework. 643 Credential Provisioning 644 For IoT, it cannot be assumed that the client and RS are part of a 645 common key infrastructure, so the AS provisions credentials or 646 associated information to allow mutual authentication. These 647 credentials need to be provided to the parties before or during 648 the authentication protocol is executed, and may be re-used for 649 subsequent token requests. 651 Proof-of-Possession 652 The ACE framework, by default, implements proof-of-possession for 653 access tokens, i.e., that the token holder can prove being a 654 holder of the key bound to the token. The binding is provided by 655 the "cnf" claim [I-D.ietf-ace-cwt-proof-of-possession] indicating 656 what key is used for proof-of-possession. If a client needs to 657 submit a new access token, e.g., to obtain additional access 658 rights, they can request that the AS binds this token to the same 659 key as the previous one. 661 ACE Profiles 662 The client or RS may be limited in the encodings or protocols it 663 supports. To support a variety of different deployment settings, 664 specific interactions between client and RS are defined in an ACE 665 profile. In ACE framework the AS is expected to manage the 666 matching of compatible profile choices between a client and an RS. 667 The AS informs the client of the selected profile using the 668 "profile" parameter in the token response. 670 OAuth 2.0 requires the use of TLS both to protect the communication 671 between AS and client when requesting an access token; between client 672 and RS when accessing a resource and between AS and RS if 673 introspection is used. In constrained settings TLS is not always 674 feasible, or desirable. Nevertheless it is REQUIRED that the data 675 exchanged with the AS is encrypted, integrity protected and protected 676 against message replay. It is also REQUIRED that the AS and the 677 endpoint communicating with it (client or RS) perform mutual 678 authentication. Furthermore it MUST be assured that responses are 679 bound to the requests in the sense that the receiver of a response 680 can be certain that the response actually belongs to a certain 681 request. 683 Profiles MUST specify a communication security protocol that provides 684 the features required above. 686 In OAuth 2.0 the communication with the Token and the Introspection 687 endpoints at the AS is assumed to be via HTTP and may use Uri-query 688 parameters. When profiles of this framework use CoAP instead, this 689 framework REQUIRES the use of the following alternative instead of 690 Uri-query parameters: The sender (client or RS) encodes the 691 parameters of its request as a CBOR map and submits that map as the 692 payload of the POST request. Profiles that use CBOR encoding of 693 protocol message parameters MUST use the media format 'application/ 694 ace+cbor', unless the protocol message is wrapped in another Content- 695 Format (e.g. object security). If CoAP is used for communication, 696 the Content-Format MUST be abbreviated with the ID: 19 (see 697 Section 8.15. 699 The OAuth 2.0 AS uses a JSON structure in the payload of its 700 responses both to client and RS. If CoAP is used, this framework 701 REQUIRES the use of CBOR [RFC7049] instead of JSON. Depending on the 702 profile, the CBOR payload MAY be enclosed in a non-CBOR cryptographic 703 wrapper. 705 5.1. Discovering Authorization Servers 707 In order to determine the AS in charge of a resource hosted at the 708 RS, C MAY send an initial Unauthorized Resource Request message to 709 RS. RS then denies the request and sends the address of its AS back 710 to C. 712 Instead of the initial Unauthorized Resource Request message, other 713 discovery methods may be used, or the client may be pre-provisioned 714 with the address of the AS. 716 5.1.1. Unauthorized Resource Request Message 718 The optional Unauthorized Resource Request message is a request for a 719 resource hosted by RS for which no proper authorization is granted. 720 RS MUST treat any request for a protected resource as Unauthorized 721 Resource Request message when any of the following holds: 723 o The request has been received on an unprotected channel. 725 o RS has no valid access token for the sender of the request 726 regarding the requested action on that resource. 728 o RS has a valid access token for the sender of the request, but 729 this does not allow the requested action on the requested 730 resource. 732 Note: These conditions ensure that RS can handle requests 733 autonomously once access was granted and a secure channel has been 734 established between C and RS. The authz-info endpoint MUST NOT be 735 protected as specified above, in order to allow clients to upload 736 access tokens to RS (cf. Section 5.8.1). 738 Unauthorized Resource Request messages MUST be denied with a client 739 error response. In this response, the Resource Server SHOULD provide 740 proper AS Request Creation Hints to enable the Client to request an 741 access token from RS's AS as described in Section 5.1.2. 743 The handling of all client requests (including unauthorized ones) by 744 the RS is described in Section 5.8.2. 746 5.1.2. AS Request Creation Hints 748 The AS Request Creation Hints message is sent by RS as a response to 749 an Unauthorized Resource Request message (see Section 5.1.1) to help 750 the sender of the Unauthorized Resource Request message in acquiring 751 a valid access token. The AS Request Creation Hints message is CBOR 752 map, with a MANDATORY element "AS" specifying an absolute URI (see 753 Section 4.3 of [RFC3986]) that identifies the AS in charge of RS. 755 The message can also contain the following OPTIONAL parameters: 757 o A "audience" element containing a suggested audience that the 758 client should request towards the AS. 760 o A "kid" element containing the key identifier of a key used in an 761 existing security association between the client and the RS. The 762 RS expects the client to request an access token bound to this 763 key, in order to avoid having to re-establish the security 764 association. 766 o A "nonce" element containing a nonce generated by RS to ensure 767 freshness in case that the RS and AS do not have synchronized 768 clocks. 770 o A "scope" element containing the suggested scope that the client 771 should request towards the AS. 773 Figure 2 summarizes the parameters that may be part of the AS Request 774 Creation Hints. 776 /-----------+----------+---------------------\ 777 | Name | CBOR Key | Value Type | 778 |-----------+----------+---------------------| 779 | AS | 0 | text string | 780 | kid | 4 | byte string | 781 | nonce | 5 | byte string | 782 | scope | 9 | text or byte string | 783 | audience | 18 | text string | 784 \-----------+----------+---------------------/ 786 Figure 2: AS Request Creation Hints 788 Note that the schema part of the AS parameter may need to be adapted 789 to the security protocol that is used between the client and the AS. 790 Thus the example AS value "coap://as.example.com/token" might need to 791 be transformed to "coaps://as.example.com/token". It is assumed that 792 the client can determine the correct schema part on its own depending 793 on the way it communicates with the AS. 795 Figure 3 shows an example for an AS Request Creation Hints message 796 payload using CBOR [RFC7049] diagnostic notation, using the parameter 797 names instead of the CBOR keys for better human readability. 799 4.01 Unauthorized 800 Content-Format: application/ace+cbor 801 {"AS" : "coaps://as.example.com/token", 802 "nonce" : h'e0a156bb3f', 803 "scope" : "rTempC", 804 "audience" : "coaps://rs.example.com" 805 } 807 Figure 3: AS Request Creation Hints payload example 809 In this example, the attribute AS points the receiver of this message 810 to the URI "coaps://as.example.com/token" to request access 811 permissions. The originator of the AS Request Creation Hints payload 812 (i.e., RS) uses a local clock that is loosely synchronized with a 813 time scale common between RS and AS (e.g., wall clock time). 814 Therefore, it has included a parameter "nonce" for replay attack 815 prevention. 817 Figure 4 illustrates the mandatory to use binary encoding of the 818 message payload shown in Figure 3. 820 a4 # map(4) 821 00 # unsigned(0) (=AS) 822 78 1c # text(28) 823 636f6170733a2f2f61732e657861 824 6d706c652e636f6d2f746f6b656e # "coaps://as.example.com/token" 825 05 # unsigned(5) (=nonce) 826 45 # bytes(5) 827 e0a156bb3f # "\xE0\xA1V\xBB?" 828 09 # unsigned(9) (=scope) 829 66 # text(6) 830 7254656d7043 # "rTempC" 831 12 # unsigned(18) (=audience) 832 76 # text(22) 833 636f6170733a2f2f72732e657861 834 6d706c652e636f6d # "coaps://rs.example.com" 836 Figure 4: AS Request Creation Hints example encoded in CBOR 838 5.2. Authorization Grants 840 To request an access token, the client obtains authorization from the 841 resource owner or uses its client credentials as grant. The 842 authorization is expressed in the form of an authorization grant. 844 The OAuth framework [RFC6749] defines four grant types. The grant 845 types can be split up into two groups, those granted on behalf of the 846 resource owner (password, authorization code, implicit) and those for 847 the client (client credentials). Further grant types have been added 848 later, such as [RFC7521] defining an assertion-based authorization 849 grant. 851 The grant type is selected depending on the use case. In cases where 852 the client acts on behalf of the resource owner, authorization code 853 grant is recommended. If the client acts on behalf of the resource 854 owner, but does not have any display or very limited interaction 855 possibilities it is recommended to use the device code grant defined 856 in [I-D.ietf-oauth-device-flow]. In cases where the client does not 857 act on behalf of the resource owner, client credentials grant is 858 recommended. 860 For details on the different grant types, see section 1.3 of 861 [RFC6749]. The OAuth 2.0 framework provides an extension mechanism 862 for defining additional grant types so profiles of this framework MAY 863 define additional grant types, if needed. 865 5.3. Client Credentials 867 Authentication of the client is mandatory independent of the grant 868 type when requesting the access token from the token endpoint. In 869 the case of client credentials grant type, the authentication and 870 grant coincide. 872 Client registration and provisioning of client credentials to the 873 client is out of scope for this specification. 875 The OAuth framework defines one client credential type in section 876 2.3.1 of [RFC6749]: client id and client secret. 877 [I-D.erdtman-ace-rpcc] adds raw-public-key and pre-shared-key to the 878 client credentials types. Profiles of this framework MAY extend with 879 additional client credentials client certificates. 881 5.4. AS Authentication 883 Client credential does not, by default, authenticate the AS that the 884 client connects to. In classic OAuth, the AS is authenticated with a 885 TLS server certificate. 887 Profiles of this framework MUST specify how clients authenticate the 888 AS and how communication security is implemented, otherwise server 889 side TLS certificates, as defined by OAuth 2.0, are required. 891 5.5. The Authorization Endpoint 893 The authorization endpoint is used to interact with the resource 894 owner and obtain an authorization grant in certain grant flows. 895 Since it requires the use of a user agent (i.e., browser), it is not 896 expected that these types of grant flow will be used by constrained 897 clients. This endpoint is therefore out of scope for this 898 specification. Implementations should use the definition and 899 recommendations of section 3.1 of [RFC6749] and of section 4.2 of 900 [RFC6819]. 902 If clients involved cannot support HTTP and TLS, profiles MAY define 903 mappings for the authorization endpoint. 905 5.6. The Token Endpoint 907 In standard OAuth 2.0, the AS provides the token endpoint for 908 submitting access token requests. This framework extends the 909 functionality of the token endpoint, giving the AS the possibility to 910 help the client and RS to establish shared keys or to exchange their 911 public keys. Furthermore, this framework defines encodings using 912 CBOR, as a substitute for JSON. 914 The endpoint may, however, be exposed over HTTPS as in classical 915 OAuth or even other transports. A profile MUST define the details of 916 the mapping between the fields described below, and these transports. 917 If HTTPS is used, JSON or CBOR payloads may be supported. If JSON 918 payloads are used, the semantics of Section 4 of the OAuth 2.0 919 specification MUST be followed (with additions as described below). 920 If CBOR payload is supported, the semantics described below MUST be 921 followed. 923 For the AS to be able to issue a token, the client MUST be 924 authenticated and present a valid grant for the scopes requested. 925 Profiles of this framework MUST specify how the AS authenticates the 926 client and how the communication between client and AS is protected. 928 The default name of this endpoint in an url-path is '/token', however 929 implementations are not required to use this name and can define 930 their own instead. 932 The figures of this section use CBOR diagnostic notation without the 933 integer abbreviations for the parameters or their values for 934 illustrative purposes. Note that implementations MUST use the 935 integer abbreviations and the binary CBOR encoding, if the CBOR 936 encoding is used. 938 5.6.1. Client-to-AS Request 940 The client sends a POST request to the token endpoint at the AS. The 941 profile MUST specify how the communication is protected. The content 942 of the request consists of the parameters specified in the relevant 943 subsection of section 4 of the OAuth 2.0 specification [RFC6749], 944 depending on the grant type. The parameter "grant_type" is an 945 exception, as it is OPTIONAL in the context of this framework (as 946 opposed to REQUIRED in RFC6749). If that parameter is missing, the 947 default value "client_credentials" is implied. 949 Furthermore the "audience" parameter from 950 [I-D.ietf-oauth-token-exchange] can be used to request an access 951 token bound to a specific audience. 953 In addition to these parameters, a client MUST be able to use the 954 parameters from [I-D.ietf-ace-oauth-params] in an access token 955 request to the token endpoint and the AS MUST be able to process 956 these additional parameters. 958 If CBOR is used then this parameter MUST be encoded as a CBOR map. 959 The "scope" parameter can be formatted as specified in section 3.3 of 960 [RFC6749] and additionally as a byte string, in order to allow 961 compact encoding of complex scopes. 963 When HTTP is used as a transport then the client makes a request to 964 the token endpoint by sending the parameters using the "application/ 965 x-www-form-urlencoded" format with a character encoding of UTF-8 in 966 the HTTP request entity-body, as defined in section 3.2 of [RFC6749]. 968 The following examples illustrate different types of requests for 969 proof-of-possession tokens. 971 Figure 5 shows a request for a token with a symmetric proof-of- 972 possession key. The content is displayed in CBOR diagnostic 973 notation, without abbreviations for better readability. 975 Header: POST (Code=0.02) 976 Uri-Host: "as.example.com" 977 Uri-Path: "token" 978 Content-Format: "application/ace+cbor" 979 Payload: 980 { 981 "client_id" : "myclient", 982 "audience" : "tempSensor4711" 983 } 985 Figure 5: Example request for an access token bound to a symmetric 986 key. 988 Figure 6 shows a request for a token with an asymmetric proof-of- 989 possession key. Note that in this example OSCORE 990 [I-D.ietf-core-object-security] is used to provide object-security, 991 therefore the Content-Format is "application/oscore" wrapping the 992 "application/ace+cbor" type content. Also note that in this example 993 the audience is implicitly known by both client and AS. Furthermore 994 note that this example uses the "req_cnf" parameter from 995 [I-D.ietf-ace-oauth-params]. 997 Header: POST (Code=0.02) 998 Uri-Host: "as.example.com" 999 Uri-Path: "token" 1000 OSCORE: 0x19, 0x05, 0x05, 0x44, 0x61, 0x6c, 0x65, 0x6b 1001 Content-Format: "application/oscore" 1002 Payload: 1003 0x44025d1 ... (full payload omitted for brevity) ... 68b3825e 1004 ) 1006 Decrypted payload: 1007 { 1008 "client_id" : "myclient", 1009 "req_cnf" : { 1010 "COSE_Key" : { 1011 "kty" : "EC", 1012 "kid" : h'11', 1013 "crv" : "P-256", 1014 "x" : b64'usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8', 1015 "y" : b64'IBOL+C3BttVivg+lSreASjpkttcsz+1rb7btKLv8EX4' 1016 } 1017 } 1018 } 1020 Figure 6: Example token request bound to an asymmetric key. 1022 Figure 7 shows a request for a token where a previously communicated 1023 proof-of-possession key is only referenced. Note that the client 1024 performs a password based authentication in this example by 1025 submitting its client_secret (see Section 2.3.1 of [RFC6749]). Note 1026 that this example uses the "req_cnf" parameter from 1027 [I-D.ietf-ace-oauth-params]. 1029 Header: POST (Code=0.02) 1030 Uri-Host: "as.example.com" 1031 Uri-Path: "token" 1032 Content-Format: "application/ace+cbor" 1033 Payload: 1034 { 1035 "client_id" : "myclient", 1036 "client_secret" : "mysecret234", 1037 "audience" : "valve424", 1038 "scope" : "read", 1039 "req_cnf" : { 1040 "kid" : b64'6kg0dXJM13U' 1041 } 1042 } 1044 Figure 7: Example request for an access token bound to a key 1045 reference. 1047 Refresh tokens are typically not stored as securely as proof-of- 1048 possession keys in requesting clients. Proof-of-possession based 1049 refresh token requests MUST NOT request different proof-of-possession 1050 keys or different audiences in token requests. Refresh token 1051 requests can only use to request access tokens bound to the same 1052 proof-of-possession key and the same audience as access tokens issued 1053 in the initial token request. 1055 5.6.2. AS-to-Client Response 1057 If the access token request has been successfully verified by the AS 1058 and the client is authorized to obtain an access token corresponding 1059 to its access token request, the AS sends a response with the 1060 response code equivalent to the CoAP response code 2.01 (Created). 1061 If client request was invalid, or not authorized, the AS returns an 1062 error response as described in Section 5.6.3. 1064 Note that the AS decides which token type and profile to use when 1065 issuing a successful response. It is assumed that the AS has prior 1066 knowledge of the capabilities of the client and the RS (see 1067 Appendix D. This prior knowledge may, for example, be set by the use 1068 of a dynamic client registration protocol exchange [RFC7591]. 1070 The content of the successful reply is the Access Information. When 1071 using CBOR payloads, the content MUST be encoded as CBOR map, 1072 containing parameters as specified in Section 5.1 of [RFC6749], with 1073 the following additions and changes: 1075 profile: 1077 OPTIONAL. This indicates the profile that the client MUST use 1078 towards the RS. See Section 5.6.4.3 for the formatting of this 1079 parameter. If this parameter is absent, the AS assumes that the 1080 client implicitly knows which profile to use towards the RS. 1082 token_type: 1083 This parameter is OPTIONAL, as opposed to 'required' in [RFC6749]. 1084 By default implementations of this framework SHOULD assume that 1085 the token_type is "pop". If a specific use case requires another 1086 token_type (e.g., "Bearer") to be used then this parameter is 1087 REQUIRED. 1089 Furthermore [I-D.ietf-ace-oauth-params] defines additional parameters 1090 that the AS MUST be able to use when responding to a request to the 1091 token endpoint. 1093 Figure 8 summarizes the parameters that may be part of the Access 1094 Information. This does not include the additional parameters 1095 specified in [I-D.ietf-ace-oauth-params]. 1097 /-------------------+-------------------------------\ 1098 | Parameter name | Specified in | 1099 |-------------------+-------------------------------| 1100 | access_token | RFC 6749 | 1101 | token_type | RFC 6749 | 1102 | expires_in | RFC 6749 | 1103 | refresh_token | RFC 6749 | 1104 | scope | RFC 6749 | 1105 | state | RFC 6749 | 1106 | error | RFC 6749 | 1107 | error_description | RFC 6749 | 1108 | error_uri | RFC 6749 | 1109 | profile | [this document] | 1110 \-------------------+-------------------------------/ 1112 Figure 8: Access Information parameters 1114 Figure 9 shows a response containing a token and a "cnf" parameter 1115 with a symmetric proof-of-possession key, which is defined in 1116 [I-D.ietf-ace-oauth-params]. 1118 Header: Created (Code=2.01) 1119 Content-Format: "application/ace+cbor" 1120 Payload: 1121 { 1122 "access_token" : b64'SlAV32hkKG ... 1123 (remainder of CWT omitted for brevity; 1124 CWT contains COSE_Key in the "cnf" claim)', 1125 "profile" : "coap_dtls", 1126 "expires_in" : "3600", 1127 "cnf" : { 1128 "COSE_Key" : { 1129 "kty" : "Symmetric", 1130 "kid" : b64'39Gqlw', 1131 "k" : b64'hJtXhkV8FJG+Onbc6mxCcQh' 1132 } 1133 } 1134 } 1136 Figure 9: Example AS response with an access token bound to a 1137 symmetric key. 1139 5.6.3. Error Response 1141 The error responses for CoAP-based interactions with the AS are 1142 equivalent to the ones for HTTP-based interactions as defined in 1143 Section 5.2 of [RFC6749], with the following differences: 1145 o When using CBOR the raw payload before being processed by the 1146 communication security protocol MUST be encoded as a CBOR map. 1148 o A response code equivalent to the CoAP code 4.00 (Bad Request) 1149 MUST be used for all error responses, except for invalid_client 1150 where a response code equivalent to the CoAP code 4.01 1151 (Unauthorized) MAY be used under the same conditions as specified 1152 in Section 5.2 of [RFC6749]. 1154 o The content type (for CoAP-based interactions) or media type (for 1155 HTTP-based interactions) "application/ace+cbor" MUST be used for 1156 the error response. 1158 o The parameters "error", "error_description" and "error_uri" MUST 1159 be abbreviated using the codes specified in Figure 12, when a CBOR 1160 encoding is used. 1162 o The error code (i.e., value of the "error" parameter) MUST be 1163 abbreviated as specified in Figure 10, when a CBOR encoding is 1164 used. 1166 /------------------------+-------------\ 1167 | Name | CBOR Values | 1168 |------------------------+-------------| 1169 | invalid_request | 1 | 1170 | invalid_client | 2 | 1171 | invalid_grant | 3 | 1172 | unauthorized_client | 4 | 1173 | unsupported_grant_type | 5 | 1174 | invalid_scope | 6 | 1175 | unsupported_pop_key | 7 | 1176 | incompatible_profiles | 8 | 1177 \------------------------+-------------/ 1179 Figure 10: CBOR abbreviations for common error codes 1181 In addition to the error responses defined in OAuth 2.0, the 1182 following behavior MUST be implemented by the AS: 1184 o If the client submits an asymmetric key in the token request that 1185 the RS cannot process, the AS MUST reject that request with a 1186 response code equivalent to the CoAP code 4.00 (Bad Request) 1187 including the error code "unsupported_pop_key" defined in 1188 Figure 10. 1190 o If the client and the RS it has requested an access token for do 1191 not share a common profile, the AS MUST reject that request with a 1192 response code equivalent to the CoAP code 4.00 (Bad Request) 1193 including the error code "incompatible_profiles" defined in 1194 Figure 10. 1196 5.6.4. Request and Response Parameters 1198 This section provides more detail about the new parameters that can 1199 be used in access token requests and responses, as well as 1200 abbreviations for more compact encoding of existing parameters and 1201 common parameter values. 1203 5.6.4.1. Grant Type 1205 The abbreviations in Figure 11 MUST be used in CBOR encodings instead 1206 of the string values defined in [RFC6749], if CBOR payloads are used. 1208 /--------------------+------------+------------------------\ 1209 | Name | CBOR Value | Original Specification | 1210 |--------------------+------------+------------------------| 1211 | password | 0 | RFC6749 | 1212 | authorization_code | 1 | RFC6749 | 1213 | client_credentials | 2 | RFC6749 | 1214 | refresh_token | 3 | RFC6749 | 1215 \--------------------+------------+------------------------/ 1217 Figure 11: CBOR abbreviations for common grant types 1219 5.6.4.2. Token Type 1221 The "token_type" parameter, defined in section 5.1 of [RFC6749], 1222 allows the AS to indicate to the client which type of access token it 1223 is receiving (e.g., a bearer token). 1225 This document registers the new value "pop" for the OAuth Access 1226 Token Types registry, specifying a proof-of-possession token. How 1227 the proof-of-possession by the client to the RS is performed MUST be 1228 specified by the profiles. 1230 The values in the "token_type" parameter MUST be CBOR text strings, 1231 if a CBOR encoding is used. 1233 In this framework the "pop" value for the "token_type" parameter is 1234 the default. The AS may, however, provide a different value. 1236 5.6.4.3. Profile 1238 Profiles of this framework MUST define the communication protocol and 1239 the communication security protocol between the client and the RS. 1240 The security protocol MUST provide encryption, integrity and replay 1241 protection. It MUST also provide a binding between requests and 1242 responses. Furthermore profiles MUST define proof-of-possession 1243 methods, if they support proof-of-possession tokens. 1245 A profile MUST specify an identifier that MUST be used to uniquely 1246 identify itself in the "profile" parameter. The textual 1247 representation of the profile identifier is just intended for human 1248 readability and MUST NOT be used in parameters and claims. 1250 Profiles MAY define additional parameters for both the token request 1251 and the Access Information in the access token response in order to 1252 support negotiation or signaling of profile specific parameters. 1254 5.6.5. Mapping Parameters to CBOR 1256 If CBOR encoding is used, all OAuth parameters in access token 1257 requests and responses MUST be mapped to CBOR types as specified in 1258 Figure 12, using the given integer abbreviation for the map keys. 1260 Note that we have aligned the abbreviations corresponding to claims 1261 with the abbreviations defined in [RFC8392]. 1263 Note also that abbreviations from -24 to 23 have a 1 byte encoding 1264 size in CBOR. We have thus chosen to assign abbreviations in that 1265 range to parameters we expect to be used most frequently in 1266 constrained scenarios. 1268 /-------------------+----------+---------------------\ 1269 | Name | CBOR Key | Value Type | 1270 |-------------------+----------+---------------------| 1271 | access_token | 1 | byte string | 1272 | scope | 9 | text or byte string | 1273 | audience | 18 | text string | 1274 | client_id | 24 | text string | 1275 | client_secret | 25 | byte string | 1276 | response_type | 26 | text string | 1277 | redirect_uri | 27 | text string | 1278 | state | 28 | text string | 1279 | code | 29 | byte string | 1280 | error | 30 | unsigned integer | 1281 | error_description | 31 | text string | 1282 | error_uri | 32 | text string | 1283 | grant_type | 33 | unsigned integer | 1284 | token_type | 34 | unsigned integer | 1285 | expires_in | 35 | unsigned integer | 1286 | username | 36 | text string | 1287 | password | 37 | text string | 1288 | refresh_token | 38 | byte string | 1289 | profile | 39 | unsigned integer | 1290 \-------------------+----------+---------------------/ 1292 Figure 12: CBOR mappings used in token requests 1294 5.7. The Introspection Endpoint 1296 Token introspection [RFC7662] can be OPTIONALLY provided by the AS, 1297 and is then used by the RS and potentially the client to query the AS 1298 for metadata about a given token, e.g., validity or scope. Analogous 1299 to the protocol defined in [RFC7662] for HTTP and JSON, this section 1300 defines adaptations to more constrained environments using CBOR and 1301 leaving the choice of the application protocol to the profile. 1303 Communication between the requesting entity and the introspection 1304 endpoint at the AS MUST be integrity protected and encrypted. The 1305 communication security protocol MUST also provide a binding between 1306 requests and responses. Furthermore the two interacting parties MUST 1307 perform mutual authentication. Finally the AS SHOULD verify that the 1308 requesting entity has the right to access introspection information 1309 about the provided token. Profiles of this framework that support 1310 introspection MUST specify how authentication and communication 1311 security between the requesting entity and the AS is implemented. 1313 The default name of this endpoint in an url-path is '/introspect', 1314 however implementations are not required to use this name and can 1315 define their own instead. 1317 The figures of this section uses CBOR diagnostic notation without the 1318 integer abbreviations for the parameters or their values for better 1319 readability. 1321 Note that supporting introspection is OPTIONAL for implementations of 1322 this framework. 1324 5.7.1. Introspection Request 1326 The requesting entity sends a POST request to the introspection 1327 endpoint at the AS, the profile MUST specify how the communication is 1328 protected. If CBOR is used, the payload MUST be encoded as a CBOR 1329 map with a "token" entry containing either the access token or a 1330 reference to the token (e.g., the cti). Further optional parameters 1331 representing additional context that is known by the requesting 1332 entity to aid the AS in its response MAY be included. 1334 For CoAP-based interaction, all messages MUST use the content type 1335 "application/ace+cbor", while for HTTP-based interactions the 1336 equivalent media type "application/ace+cbor" MUST be used. 1338 The same parameters are required and optional as in Section 2.1 of 1339 [RFC7662]. 1341 For example, Figure 13 shows a RS calling the token introspection 1342 endpoint at the AS to query about an OAuth 2.0 proof-of-possession 1343 token. Note that object security based on OSCORE 1344 [I-D.ietf-core-object-security] is assumed in this example, therefore 1345 the Content-Format is "application/oscore". Figure 14 shows the 1346 decoded payload. 1348 Header: POST (Code=0.02) 1349 Uri-Host: "as.example.com" 1350 Uri-Path: "introspect" 1351 OSCORE: 0x09, 0x05, 0x25 1352 Content-Format: "application/oscore" 1353 Payload: 1354 ... COSE content ... 1356 Figure 13: Example introspection request. 1358 { 1359 "token" : b64'7gj0dXJQ43U', 1360 "token_type_hint" : "pop" 1361 } 1363 Figure 14: Decoded token. 1365 5.7.2. Introspection Response 1367 If the introspection request is authorized and successfully 1368 processed, the AS sends a response with the response code equivalent 1369 to the CoAP code 2.01 (Created). If the introspection request was 1370 invalid, not authorized or couldn't be processed the AS returns an 1371 error response as described in Section 5.7.3. 1373 In a successful response, the AS encodes the response parameters in a 1374 map including with the same required and optional parameters as in 1375 Section 2.2 of [RFC7662] with the following addition: 1377 profile OPTIONAL. This indicates the profile that the RS MUST use 1378 with the client. See Section 5.6.4.3 for more details on the 1379 formatting of this parameter. 1381 Furthermore [I-D.ietf-ace-oauth-params] defines more parameters that 1382 the AS MUST be able to use when responding to a request to the 1383 introspection endpoint. 1385 For example, Figure 15 shows an AS response to the introspection 1386 request in Figure 13. Note that this example contains the "cnf" 1387 parameter defined in [I-D.ietf-ace-oauth-params]. 1389 Header: Created Code=2.01) 1390 Content-Format: "application/ace+cbor" 1391 Payload: 1392 { 1393 "active" : true, 1394 "scope" : "read", 1395 "profile" : "coap_dtls", 1396 "cnf" : { 1397 "COSE_Key" : { 1398 "kty" : "Symmetric", 1399 "kid" : b64'39Gqlw', 1400 "k" : b64'hJtXhkV8FJG+Onbc6mxCcQh' 1401 } 1402 } 1403 } 1405 Figure 15: Example introspection response. 1407 5.7.3. Error Response 1409 The error responses for CoAP-based interactions with the AS are 1410 equivalent to the ones for HTTP-based interactions as defined in 1411 Section 2.3 of [RFC7662], with the following differences: 1413 o If content is sent and CBOR is used the payload MUST be encoded as 1414 a CBOR map and the Content-Format "application/ace+cbor" MUST be 1415 used. 1417 o If the credentials used by the requesting entity (usually the RS) 1418 are invalid the AS MUST respond with the response code equivalent 1419 to the CoAP code 4.01 (Unauthorized) and use the required and 1420 optional parameters from Section 5.2 in [RFC6749]. 1422 o If the requesting entity does not have the right to perform this 1423 introspection request, the AS MUST respond with a response code 1424 equivalent to the CoAP code 4.03 (Forbidden). In this case no 1425 payload is returned. 1427 o The parameters "error", "error_description" and "error_uri" MUST 1428 be abbreviated using the codes specified in Figure 12. 1430 o The error codes MUST be abbreviated using the codes specified in 1431 Figure 10. 1433 Note that a properly formed and authorized query for an inactive or 1434 otherwise invalid token does not warrant an error response by this 1435 specification. In these cases, the authorization server MUST instead 1436 respond with an introspection response with the "active" field set to 1437 "false". 1439 5.7.4. Mapping Introspection parameters to CBOR 1441 If CBOR is used, the introspection request and response parameters 1442 MUST be mapped to CBOR types as specified in Figure 16, using the 1443 given integer abbreviation for the map key. 1445 Note that we have aligned abbreviations that correspond to a claim 1446 with the abbreviations defined in [RFC8392] and the abbreviations of 1447 parameters with the same name from Section 5.6.5. 1449 /-------------------+----------+-------------------------\ 1450 | Parameter name | CBOR Key | Value Type | 1451 |-------------------+----------+-------------------------| 1452 | iss | 1 | text string | 1453 | sub | 2 | text string | 1454 | aud | 3 | text string | 1455 | exp | 4 | integer or | 1456 | | | floating-point number | 1457 | nbf | 5 | integer or | 1458 | | | floating-point number | 1459 | iat | 6 | integer or | 1460 | | | floating-point number | 1461 | cti | 7 | byte string | 1462 | scope | 9 | text or byte string | 1463 | active | 10 | True or False | 1464 | token | 12 | byte string | 1465 | client_id | 24 | text string | 1466 | error | 30 | unsigned integer | 1467 | error_description | 31 | text string | 1468 | error_uri | 32 | text string | 1469 | token_type_hint | 33 | text string | 1470 | token_type | 34 | text string | 1471 | username | 36 | text string | 1472 | profile | 39 | unsigned integer | 1473 \-------------------+----------+-------------------------/ 1475 Figure 16: CBOR Mappings to Token Introspection Parameters. 1477 5.8. The Access Token 1479 This framework RECOMMENDS the use of CBOR web token (CWT) as 1480 specified in [RFC8392]. 1482 In order to facilitate offline processing of access tokens, this 1483 document uses the "cnf" claim from 1485 [I-D.ietf-ace-cwt-proof-of-possession] and specifies the "scope" 1486 claim for JWT- and CWT-encoded tokens. 1488 The "scope" claim explicitly encodes the scope of a given access 1489 token. This claim follows the same encoding rules as defined in 1490 Section 3.3 of [RFC6749], but in addition implementers MAY use byte 1491 strings as scope values, to achieve compact encoding of large scope 1492 elements. The meaning of a specific scope value is application 1493 specific and expected to be known to the RS running that application. 1495 If the AS needs to convey a hint to the RS about which profile it 1496 should use to communicate with the client, the AS MAY include a 1497 "profile" claim in the access token, with the same syntax and 1498 semantics as defined in Section 5.6.4.3. 1500 5.8.1. The Authorization Information Endpoint 1502 The access token, containing authorization information and 1503 information about the key used by the client, needs to be transported 1504 to the RS so that the RS can authenticate and authorize the client 1505 request. 1507 This section defines a method for transporting the access token to 1508 the RS using a RESTful protocol such as CoAP. Profiles of this 1509 framework MAY define other methods for token transport. 1511 The method consists of an authz-info endpoint, implemented by the RS. 1512 A client using this method MUST make a POST request to the authz-info 1513 endpoint at the RS with the access token in the payload. The RS 1514 receiving the token MUST verify the validity of the token. If the 1515 token is valid, the RS MUST respond to the POST request with 2.01 1516 (Created). Section Section 5.8.1.1 outlines how an RS MUST proceed 1517 to verify the validity of an access token. 1519 The RS MUST be prepared to store at least one access token for future 1520 use. This is a difference to how access tokens are handled in OAuth 1521 2.0, where the access token is typically sent along with each 1522 request, and therefore not stored at the RS. 1524 This specification RECOMMENDS that an RS stores only one token per 1525 proof-of-possession key, meaning that an additional token linked to 1526 the same key will overwrite any existing token at the RS. 1528 If the payload sent to the authz-info endpoint does not parse to a 1529 token, the RS MUST respond with a response code equivalent to the 1530 CoAP code 4.00 (Bad Request). 1532 The RS MAY make an introspection request to validate the token before 1533 responding to the POST request to the authz-info endpoint. 1535 Profiles MUST specify whether the authz-info endpoint is protected, 1536 including whether error responses from this endpoint are protected. 1537 Note that since the token contains information that allow the client 1538 and the RS to establish a security context in the first place, mutual 1539 authentication may not be possible at this point. 1541 The default name of this endpoint in an url-path is '/authz-info', 1542 however implementations are not required to use this name and can 1543 define their own instead. 1545 A RS MAY use introspection on a token received through the authz-info 1546 endpoint, e.g. if the token is an opaque reference. Some transport 1547 protocols may provide a way to indicate that the RS is busy and the 1548 client should retry after an interval; this type of status update 1549 would be appropriate while the RS is waiting for an introspection 1550 response. 1552 5.8.1.1. Verifying an Access Token 1554 When an RS receives an access token, it MUST verify it before storing 1555 it. The details of token verification depends on various aspects, 1556 including the token encoding, the type of token, the security 1557 protection applied to the token, and the claims. The token encoding 1558 matters since the security wrapper differs between the token 1559 encodings. For example, a CWT token uses COSE while a JWT token uses 1560 JOSE. The type of token also has an influence on the verification 1561 procedure since tokens may be self-contained whereby token 1562 verification may happen locally at the RS while a token-by-reference 1563 requires further interaction with the authorization server, for 1564 example using token introspection, to obtain the claims associated 1565 with the token reference. Self-contained token MUST, at a minimum, 1566 be integrity protected but they MAY also be encrypted. 1568 For self-contained tokens the RS MUST process the security protection 1569 of the token first, as specified by the respective token format. For 1570 CWT the description can be found in [RFC8392] and for JWT the 1571 relevant specification is [RFC7519]. This MUST include a 1572 verification that security protection (and thus the token) was 1573 generated by an AS that has the right to issue access tokens for this 1574 RS. 1576 In case the token is communicated by reference the RS needs to obtain 1577 the claims first. When the RS uses token introspection the relevant 1578 specification is [RFC7662] with CoAP transport specified in 1579 Section 5.7. 1581 Errors may happen during this initial processing stage: 1583 o If token or claim verification fails, the RS MUST discard the 1584 token and, if this was an interaction with authz-info, return an 1585 error message with a response code equivalent to the CoAP code 1586 4.01 (Unauthorized). 1588 o If the claims cannot be obtained the RS MUST discard the token 1589 and, in case of an interaction via the authz-info endpoint, return 1590 an error message with a response code equivalent to the CoAP code 1591 4.00 (Bad Request). 1593 Next, the RS MUST verify claims, if present, contained in the access 1594 token. Errors are returned when claim checks fail, in the order of 1595 priority of this list: 1597 iss The issuer claim must identify an AS that has the authority to 1598 issue access tokens for the receiving RS. If that is not the case 1599 the RS MUST discard the token. If this was an interaction with 1600 authz-info, the RS MUST also respond with a response code 1601 equivalent to the CoAP code 4.01 (Unauthorized). 1603 exp The expiration date must be in the future. If that is not the 1604 case the RS MUST discard the token. If this was an interaction 1605 with authz-info the RS MUST also respond with a response code 1606 equivalent to the CoAP code 4.01 (Unauthorized). Note that the RS 1607 has to terminate access rights to the protected resources at the 1608 time when the tokens expire. 1610 aud The audience claim must refer to an audience that the RS 1611 identifies with. If that is not the case the RS MUST discard the 1612 token. If this was an interaction with authz-info, the RS MUST 1613 also respond with a response code equivalent to the CoAP code 4.03 1614 (Forbidden). 1616 scope The RS must recognize value of the scope claim. If that is 1617 not the case the RS MUST discard the token. If this was an 1618 interaction with authz-info, the RS MUST also respond with a 1619 response code equivalent to the CoAP code 4.00 (Bad Request). The 1620 RS MAY provide additional information in the error response, to 1621 clarify what went wrong. 1623 If the access token contains any other claims that the RS cannot 1624 process the RS MUST discard the token. If this was an interaction 1625 with authz-info, the RS MUST also respond with a response code 1626 equivalent to the CoAP code 4.00 (Bad Request). The RS MAY provide 1627 additional detail in the error response to clarify which claim 1628 couldn't be processed. 1630 Note that the Subject (sub) claim cannot always be verified when the 1631 token is submitted to the RS since the client may not have 1632 authenticated yet. Also note that a counter for the expires_in (exi) 1633 claim MUST be initialized when the RS first verifies this token. 1635 Also note that profiles of this framework may define access token 1636 transport mechanisms that do not allow for error responses. 1637 Therefore the error messages specified here only apply if the token 1638 was POSTed to the authz-info endpoint. 1640 When sending error responses, the RS MAY use the error codes from 1641 Section 3.1 of [RFC6750], to provide additional details to the 1642 client. 1644 5.8.1.2. Protecting the Authorization Information Endpoint 1646 As this framework can be used in RESTful environments, it is 1647 important to make sure that attackers cannot perform unauthorized 1648 requests on the auth-info endpoints, other than submitting access 1649 tokens. 1651 Specifically it SHOULD NOT be possible to perform GET, DELETE or PUT 1652 on the authz-info endpoint and on it's children (if any). 1654 The POST method SHOULD NOT be allowed on children of the authz-info 1655 endpoint. 1657 The RS SHOULD implement rate limiting measures to mitigate attacks 1658 aiming to overload the processing capacity of the RS by repeatedly 1659 submitting tokens. For CoAP-based communication the RS could use the 1660 mechanisms from [RFC8516] to indicate that it is overloaded. 1662 5.8.2. Client Requests to the RS 1664 If an RS receives a request from a client, and the target resource 1665 requires authorization, the RS MUST first verify that it has an 1666 access token that authorizes this request, and that the client has 1667 performed the proof-of-possession for that token. 1669 The response code MUST be 4.01 (Unauthorized) in case the client has 1670 not performed the proof-of-possession, or if RS has no valid access 1671 token for the client. If RS has an access token for the client but 1672 not for the resource that was requested, RS MUST reject the request 1673 with a 4.03 (Forbidden). If RS has an access token for the client 1674 but it does not cover the action that was requested on the resource, 1675 RS MUST reject the request with a 4.05 (Method Not Allowed). 1677 Note: The use of the response codes 4.03 and 4.05 is intended to 1678 prevent infinite loops where a dumb Client optimistically tries to 1679 access a requested resource with any access token received from AS. 1680 As malicious clients could pretend to be C to determine C's 1681 privileges, these detailed response codes must be used only when a 1682 certain level of security is already available which can be achieved 1683 only when the Client is authenticated. 1685 Note: The RS MAY use introspection for timely validation of an access 1686 token, at the time when a request is presented. 1688 Note: Matching the claims of the access token (e.g., scope) to a 1689 specific request is application specific. 1691 If the request matches a valid token and the client has performed the 1692 proof-of-possession for that token, the RS continues to process the 1693 request as specified by the underlying application. 1695 5.8.3. Token Expiration 1697 Depending on the capabilities of the RS, there are various ways in 1698 which it can verify the expiration of a received access token. Here 1699 follows a list of the possibilities including what functionality they 1700 require of the RS. 1702 o The token is a CWT and includes an "exp" claim and possibly the 1703 "nbf" claim. The RS verifies these by comparing them to values 1704 from its internal clock as defined in [RFC7519]. In this case the 1705 RS's internal clock must reflect the current date and time, or at 1706 least be synchronized with the AS's clock. How this clock 1707 synchronization would be performed is out of scope for this 1708 specification. 1710 o The RS verifies the validity of the token by performing an 1711 introspection request as specified in Section 5.7. This requires 1712 the RS to have a reliable network connection to the AS and to be 1713 able to handle two secure sessions in parallel (C to RS and AS to 1714 RS). 1716 o In order to support token expiration for devices that have no 1717 reliable way of synchronizing their internal clocks, this 1718 specification defines the following approach: The claim "exi" 1719 ("expires in") can be used, to provide the RS with the lifetime of 1720 the token in seconds from the time the RS first receives the 1721 token. This approach is of course vulnerable to malicious clients 1722 holding back tokens they do not want to expire. Such an attack 1723 can only be prevented if the RS is able to communicate with the AS 1724 in some regular intervals, so that the can AS provide the RS with 1725 a list of expired tokens. The drawback of this mitigation is that 1726 the RS might as well use the communication with the AS to 1727 synchronize its internal clock. 1729 If a token that authorizes a long running request such as a CoAP 1730 Observe [RFC7641] expires, the RS MUST send an error response with 1731 the response code equivalent to the CoAP code 4.01 (Unauthorized) to 1732 the client and then terminate processing the long running request. 1734 5.8.4. Key Expiration 1736 The AS provides the client with key material that the RS uses. This 1737 can either be a common symmetric pop-key, or an asymmetric key used 1738 by the RS to authenticate towards the client. Since there is no 1739 metadata associated to those keys, the client has no way of knowing 1740 if these keys are still valid. This may lead to situations where the 1741 client sends requests containing sensitive information to the RS 1742 using a key that is expired and possibly in the hands of an attacker, 1743 or accepts responses from the RS that are not properly protected and 1744 could possibly have been forged by an attacker. 1746 In order to prevent this, the client must assume that those keys are 1747 only valid as long as the related access token is. Since the access 1748 token is opaque to the client, one of the following methods MUST be 1749 used to inform the client about the validity of an access token: 1751 o The client knows a default validity period for all tokens it is 1752 using. This information could be provisioned to the client when 1753 it is registered at the AS, or published by the AS in a way that 1754 the client can query. 1756 o The AS informs the client about the token validity using the 1757 "expires_in" parameter in the Access Information. 1759 o The client performs an introspection of the token. Although this 1760 is not explicitly forbidden, how exactly this is done is not 1761 currently specified for OAuth. 1763 A client that is not able to obtain information about the expiration 1764 of a token MUST NOT use this token. 1766 6. Security Considerations 1768 Security considerations applicable to authentication and 1769 authorization in RESTful environments provided in OAuth 2.0 [RFC6749] 1770 apply to this work. Furthermore [RFC6819] provides additional 1771 security considerations for OAuth which apply to IoT deployments as 1772 well. If the introspection endpoint is used, the security 1773 considerations from [RFC7662] also apply. 1775 A large range of threats can be mitigated by protecting the contents 1776 of the access token by using a digital signature or a keyed message 1777 digest (MAC) or an Authenticated Encryption with Associated Data 1778 (AEAD) algorithm. Consequently, the token integrity protection MUST 1779 be applied to prevent the token from being modified, particularly 1780 since it contains a reference to the symmetric key or the asymmetric 1781 key. If the access token contains the symmetric key, this symmetric 1782 key MUST be encrypted by the authorization server so that only the 1783 resource server can decrypt it. Note that using an AEAD algorithm is 1784 preferable over using a MAC unless the message needs to be publicly 1785 readable. 1787 If the token is intended for multiple recipients (i.e. an audience 1788 that is a group), integrity protection of the token with a symmetric 1789 key is not sufficient, since any of the recipients could modify the 1790 token undetected by the other recipients. Therefore a token with a 1791 multi-recipient audience MUST be protected with an asymmetric 1792 signature. 1794 It is important for the authorization server to include the identity 1795 of the intended recipient (the audience), typically a single resource 1796 server (or a list of resource servers), in the token. Using a single 1797 shared secret with multiple resource servers to simplify key 1798 management is NOT RECOMMENDED since the benefit from using the proof- 1799 of-possession concept is significantly reduced. 1801 The authorization server MUST offer confidentiality protection for 1802 any interactions with the client. This step is extremely important 1803 since the client may obtain the proof-of-possession key from the 1804 authorization server for use with a specific access token. Not using 1805 confidentiality protection exposes this secret (and the access token) 1806 to an eavesdropper thereby completely negating proof-of-possession 1807 security. Profiles MUST specify how confidentiality protection is 1808 provided, and additional protection can be applied by encrypting the 1809 token, for example encryption of CWTs is specified in Section 5.1 of 1810 [RFC8392]. 1812 Developers MUST ensure that the ephemeral credentials (i.e., the 1813 private key or the session key) are not leaked to third parties. An 1814 adversary in possession of the ephemeral credentials bound to the 1815 access token will be able to impersonate the client. Be aware that 1816 this is a real risk with many constrained environments, since 1817 adversaries can often easily get physical access to the devices. 1818 This risk can also be mitigated to some extent by making sure that 1819 keys are refreshed more frequently. 1821 If clients are capable of doing so, they should frequently request 1822 fresh access tokens, as this allows the AS to keep the lifetime of 1823 the tokens short. This allows the AS to use shorter proof-of- 1824 possession key sizes, which translate to a performance benefit for 1825 the client and for the resource server. Shorter keys also lead to 1826 shorter messages (particularly with asymmetric keying material). 1828 When authorization servers bind symmetric keys to access tokens, they 1829 SHOULD scope these access tokens to a specific permission. 1831 6.1. Unprotected AS Request Creation Hints 1833 Initially, no secure channel exists to protect the communication 1834 between C and RS. Thus, C cannot determine if the AS Request 1835 Creation Hints contained in an unprotected response from RS to an 1836 unauthorized request (see Section 5.1.2) are authentic. It is 1837 therefore advisable to provide C with a (possibly hard-coded) list of 1838 trustworthy authorization servers. AS Request Creation Hints 1839 referring to a URI not listed there would be ignored. 1841 6.2. Minimal security requirements for communication 1843 This section summarizes the minimal requirements for the 1844 communication security of the different protocol interactions. 1846 C-AS All communication between the client and the Authorization 1847 Server MUST be encrypted, integrity and replay protected. 1848 Furthermore responses from the AS to the client MUST be bound to 1849 the client's request to avoid attacks where the attacker swaps the 1850 intended response for an older one valid for a previous request. 1851 This requires that the client and the Authorization Server have 1852 previously exchanged either a shared secret, or their public keys 1853 in order to negotiate a secure communication. Furthermore the 1854 client MUST be able to determine whether an AS has the authority 1855 to issue access tokens for a certain RS. This can be done through 1856 pre-configured lists, or through an online lookup mechanism that 1857 in turn also must be secured. 1859 RS-AS The communication between the Resource Server and the 1860 Authorization Server via the introspection endpoint MUST be 1861 encrypted, integrity and replay protected. Furthermore responses 1862 from the AS to the RS MUST be bound to the RS's request. This 1863 requires that the client and the Authorization Server have 1864 previously exchanged either a shared secret, or their public keys 1865 in order to negotiate a secure communication. Furthermore the RS 1866 MUST be able to determine whether an AS has the authority to issue 1867 access tokens itself. This is usually configured out of band, but 1868 could also be performed through an online lookup mechanism 1869 provided that it is also secured in the same way. 1871 C-RS The initial communication between the client and the Resource 1872 Server can not be secured in general, since the RS is not in 1873 possession of on access token for that client, which would carry 1874 the necessary parameters. Certain security mechanisms (e.g. DTLS 1875 with server-side authentication via a certificate or a raw public 1876 key) can be possible and are RECOMMEND if supported by both 1877 parties. After the client has successfully transmitted the access 1878 token to the RS, a secure communication protocol MUST be 1879 established between client and RS for the actual resource request. 1880 This protocol MUST provide encryption, integrity and replay 1881 protection as well as a binding between requests and responses. 1882 This requires that the client learned either the RS's public key 1883 or received a symmetric proof-of-possession key bound to the 1884 access token from the AS. The RS must have learned either the 1885 client's public key or a shared symmetric key from the claims in 1886 the token or an introspection request. Since ACE does not provide 1887 profile negotiation between C and RS, the client MUST have learned 1888 what profile the RS supports (e.g. from the AS or pre-configured) 1889 and initiate the communication accordingly. 1891 6.3. Use of Nonces for Replay Protection 1893 The RS may add a nonce to the AS Request Creation Hints message sent 1894 as a response to an unauthorized request to ensure freshness of an 1895 Access Token subsequently presented to RS. While a time-stamp of 1896 some granularity would be sufficient to protect against replay 1897 attacks, using randomized nonce is preferred to prevent disclosure of 1898 information about RS's internal clock characteristics. 1900 6.4. Combining profiles 1902 There may be use cases were different profiles of this framework are 1903 combined. For example, an MQTT-TLS profile is used between the 1904 client and the RS in combination with a CoAP-DTLS profile for 1905 interactions between the client and the AS. Ideally, profiles should 1906 be designed in a way that the security of system should not depend on 1907 the specific security mechanisms used in individual protocol 1908 interactions. 1910 6.5. Unprotected Information 1912 Communication with the authz-info endpoint, as well as the various 1913 error responses defined in this framework all potentially include 1914 sending information over an unprotected channel. These messages may 1915 leak information to an adversary. For example errors responses for 1916 requests to the Authorization Information endpoint can reveal 1917 information about an otherwise opaque access token to an adversary 1918 who has intercepted this token. 1920 As far as error messages are concerned, this framework is written 1921 under the assumption that, in general, the benefits of detailed error 1922 messages outweigh the risk due to information leakage. For 1923 particular use cases, where this assessment does not apply, detailed 1924 error messages can be replaced by more generic ones. 1926 In some scenarios it may be possible to protect the communication 1927 with the authz-info endpoint (e.g. through DTLS with only server-side 1928 authentication). In cases where this is not possible this framework 1929 RECOMMENDS to use encrypted CWTs or opaque references and need to be 1930 subjected to introspection by the RS. 1932 If the initial unauthorized resource request message (see 1933 Section 5.1.1) is used, the client MUST make sure that it is not 1934 sending sensitive content in this request. While GET and DELETE 1935 requests only reveal the target URI of the resource, while POST and 1936 PUT requests would reveal the whole payload of the intended 1937 operation. 1939 6.6. Identifying audiences 1941 The audience claim as defined in [RFC7519] and the equivalent 1942 "audience" parameter from [I-D.ietf-oauth-token-exchange] are 1943 intentionally vague on how to match the audience value to a specific 1944 RS. This is intended to allow application specific semantics to be 1945 used. This section attempts to give some general guidance for the 1946 use of audiences in constrained environments. 1948 URLs are not a good way of identifying mobile devices that can switch 1949 networks and thus be associated with new URLs. If the audience 1950 represents a single RS, and asymmetric keys are used, the RS can be 1951 uniquely identified by a hash of its public key. If this approach is 1952 used this framework RECOMMENDS to apply the procedure from section 3 1953 of [RFC6920]. 1955 If the audience addresses a group of resource servers, the mapping of 1956 group identifier to individual RS has to be provisioned to each RS 1957 before the group-audience is usable. Managing dynamic groups could 1958 be an issue, if the RS is not always reachable when the group 1959 memberships change. Furthermore issuing access tokens bound to 1960 symmetric proof-of-possession keys that apply to a group-audience is 1961 problematic, as an RS that is in possession of the access token can 1962 impersonate the client towards the other RSs that are part of the 1963 group. It is therefore NOT RECOMMENDED to issue access tokens bound 1964 to a group audience and symmetric proof-of possession keys. 1966 Even the client must be able to determine the correct values to put 1967 into the "audience" parameter, in order to obtain a token for the 1968 intended RS. Errors in this process can lead to the client 1969 inadvertently communicating with the wrong RS. The correct values 1970 for "audience" can either be provisioned to the client as part of its 1971 configuration, or provided by the RS as part of the "AS Request 1972 Creation Hints" Section 5.1.2 or dynamically looked up by the client 1973 in some directory. In the latter case the integrity and correctness 1974 of the directory data must be assured. 1976 6.7. Denial of service against or with Introspection 1978 The optional introspection mechanism provided by OAuth and supported 1979 in the ACE framework allows for two types of attacks that need to be 1980 considered by implementers. 1982 First an attacker could perform a denial of service attack against 1983 the introspection endpoint at the AS in order to prevent validation 1984 of access tokens. To mitigate this attack, an RS that is configured 1985 to use introspection MUST NOT allow access based on a token for which 1986 it couldn't reach the introspection endpoint. 1988 Second an attacker could use the fact that an RS performs 1989 introspection to perform a denial of service attack against that RS 1990 by repeatedly sending tokens to its authz-info endpoint that require 1991 an introspection call. RS can mitigate such attacks by implementing 1992 a rate limit on how many introspection requests they perform in a 1993 given time interval and rejecting incoming requests to authz-info for 1994 a certain amount of time, when that rate limit has been reached. 1996 7. Privacy Considerations 1998 Implementers and users should be aware of the privacy implications of 1999 the different possible deployments of this framework. 2001 The AS is in a very central position and can potentially learn 2002 sensitive information about the clients requesting access tokens. If 2003 the client credentials grant is used, the AS can track what kind of 2004 access the client intends to perform. With other grants this can be 2005 prevented by the Resource Owner. To do so, the resource owner needs 2006 to bind the grants it issues to anonymous, ephemeral credentials that 2007 do not allow the AS to link different grants and thus different 2008 access token requests by the same client. 2010 If access tokens are only integrity protected and not encrypted, they 2011 may reveal information to attackers listening on the wire, or able to 2012 acquire the access tokens in some other way. In the case of CWTs the 2013 token may, e.g., reveal the audience, the scope and the confirmation 2014 method used by the client. The latter may reveal the identity of the 2015 device or application running the client. This may be linkable to 2016 the identity of the person using the client (if there is a person and 2017 not a machine-to-machine interaction). 2019 Clients using asymmetric keys for proof-of-possession should be aware 2020 of the consequences of using the same key pair for proof-of- 2021 possession towards different RSs. A set of colluding RSs or an 2022 attacker able to obtain the access tokens will be able to link the 2023 requests, or even to determine the client's identity. 2025 An unprotected response to an unauthorized request (see 2026 Section 5.1.2) may disclose information about RS and/or its existing 2027 relationship with C. It is advisable to include as little 2028 information as possible in an unencrypted response. Means of 2029 encrypting communication between C and RS already exist, more 2030 detailed information may be included with an error response to 2031 provide C with sufficient information to react on that particular 2032 error. 2034 8. IANA Considerations 2036 8.1. ACE Authorization Server Request Creation Hints 2038 This specification establishes the IANA "ACE Authorization Server 2039 Request Creation Hints" registry. The registry has been created to 2040 use the "Expert Review" registration procedure [RFC8126]. It should 2041 be noted that, in addition to the expert review, some portions of the 2042 registry require a specification, potentially a Standards Track RFC, 2043 be supplied as well. 2045 The columns of the registry are: 2047 Name The name of the parameter 2049 CBOR Key CBOR map key for the parameter. Different ranges of values 2050 use different registration policies [RFC8126]. Integer values 2051 from -256 to 255 are designated as Standards Action. Integer 2052 values from -65536 to -257 and from 256 to 65535 are designated as 2053 Specification Required. Integer values greater than 65535 are 2054 designated as Expert Review. Integer values less than -65536 are 2055 marked as Private Use. 2057 Value Type The CBOR data types allowable for the values of this 2058 parameter. 2060 Reference This contains a pointer to the public specification of the 2061 grant type abbreviation, if one exists. 2063 This registry will be initially populated by the values in Figure 2. 2064 The Reference column for all of these entries will be this document. 2066 8.2. OAuth Extensions Error Registration 2068 This specification registers the following error values in the OAuth 2069 Extensions Error registry defined in [RFC6749]. 2071 o Error name: "unsupported_pop_key" 2072 o Error usage location: token error response 2073 o Related protocol extension: The ACE framework [this document] 2074 o Change Controller: IESG 2075 o Specification document(s): Section 5.6.3 of [this document] 2077 o Error name: "incompatible_profiles" 2078 o Error usage location: token error response 2079 o Related protocol extension: The ACE framework [this document] 2080 o Change Controller: IESG 2081 o Specification document(s): Section 5.6.3 of [this document] 2083 8.3. OAuth Error Code CBOR Mappings Registry 2085 This specification establishes the IANA "OAuth Error Code CBOR 2086 Mappings" registry. The registry has been created to use the "Expert 2087 Review" registration procedure [RFC8126], except for the value range 2088 designated for private use. 2090 The columns of the registry are: 2092 Name The OAuth Error Code name, refers to the name in Section 5.2. 2093 of [RFC6749], e.g., "invalid_request". 2094 CBOR Value CBOR abbreviation for this error code. Integer values 2095 less than -65536 are marked as "Private Use", all other values use 2096 the registration policy "Expert Review" [RFC8126]. 2097 Reference This contains a pointer to the public specification of the 2098 grant type abbreviation, if one exists. 2100 This registry will be initially populated by the values in Figure 10. 2101 The Reference column for all of these entries will be this document. 2103 8.4. OAuth Grant Type CBOR Mappings 2105 This specification establishes the IANA "OAuth Grant Type CBOR 2106 Mappings" registry. The registry has been created to use the "Expert 2107 Review" registration procedure [RFC8126], except for the value range 2108 designated for private use. 2110 The columns of this registry are: 2112 Name The name of the grant type as specified in Section 1.3 of 2113 [RFC6749]. 2114 CBOR Value CBOR abbreviation for this grant type. Integer values 2115 less than -65536 are marked as "Private Use", all other values use 2116 the registration policy "Expert Review" [RFC8126]. 2117 Reference This contains a pointer to the public specification of the 2118 grant type abbreviation, if one exists. 2119 Original Specification This contains a pointer to the public 2120 specification of the grant type, if one exists. 2122 This registry will be initially populated by the values in Figure 11. 2123 The Reference column for all of these entries will be this document. 2125 8.5. OAuth Access Token Types 2127 This section registers the following new token type in the "OAuth 2128 Access Token Types" registry [IANA.OAuthAccessTokenTypes]. 2130 o Type name: "PoP" 2131 o Additional Token Endpoint Response Parameters: "cnf", "rs_cnf" see 2132 section 3.3 of [I-D.ietf-ace-oauth-params]. 2133 o HTTP Authentication Scheme(s): N/A 2134 o Change Controller: IETF 2135 o Specification document(s): [this document] 2137 8.6. OAuth Access Token Type CBOR Mappings 2139 This specification established the IANA "OAuth Access Token Type CBOR 2140 Mappings" registry. The registry has been created to use the "Expert 2141 Review" registration procedure [RFC8126], except for the value range 2142 designated for private use. 2144 The columns of this registry are: 2146 Name The name of token type as registered in the OAuth Access Token 2147 Types registry, e.g., "Bearer". 2148 CBOR Value CBOR abbreviation for this token type. Integer values 2149 less than -65536 are marked as "Private Use", all other values use 2150 the registration policy "Expert Review" [RFC8126]. 2152 Reference This contains a pointer to the public specification of the 2153 OAuth token type abbreviation, if one exists. 2154 Original Specification This contains a pointer to the public 2155 specification of the grant type, if one exists. 2157 8.6.1. Initial Registry Contents 2159 o Name: "Bearer" 2160 o Value: 1 2161 o Reference: [this document] 2162 o Original Specification: [RFC6749] 2164 o Name: "pop" 2165 o Value: 2 2166 o Reference: [this document] 2167 o Original Specification: [this document] 2169 8.7. ACE Profile Registry 2171 This specification establishes the IANA "ACE Profile" registry. The 2172 registry has been created to use the "Expert Review" registration 2173 procedure [RFC8126]. It should be noted that, in addition to the 2174 expert review, some portions of the registry require a specification, 2175 potentially a Standards Track RFC, be supplied as well. 2177 The columns of this registry are: 2179 Name The name of the profile, to be used as value of the profile 2180 attribute. 2181 Description Text giving an overview of the profile and the context 2182 it is developed for. 2183 CBOR Value CBOR abbreviation for this profile name. Different 2184 ranges of values use different registration policies [RFC8126]. 2185 Integer values from -256 to 255 are designated as Standards 2186 Action. Integer values from -65536 to -257 and from 256 to 65535 2187 are designated as Specification Required. Integer values greater 2188 than 65535 are designated as "Expert Review". Integer values less 2189 than -65536 are marked as Private Use. 2190 Reference This contains a pointer to the public specification of the 2191 profile abbreviation, if one exists. 2193 This registry will be initially empty and will be populated by the 2194 registrations from the ACE framework profiles. 2196 8.8. OAuth Parameter Registration 2198 This specification registers the following parameter in the "OAuth 2199 Parameters" registry [IANA.OAuthParameters]: 2201 o Name: "profile" 2202 o Parameter Usage Location: token response 2203 o Change Controller: IESG 2204 o Reference: Section 5.6.4.3 of [this document] 2206 8.9. OAuth Parameters CBOR Mappings Registry 2208 This specification establishes the IANA "OAuth Parameters CBOR 2209 Mappings" registry. The registry has been created to use the "Expert 2210 Review" registration procedure [RFC8126], except for the value range 2211 designated for private use. 2213 The columns of this registry are: 2215 Name The OAuth Parameter name, refers to the name in the OAuth 2216 parameter registry, e.g., "client_id". 2217 CBOR Key CBOR map key for this parameter. Integer values less than 2218 -65536 are marked as "Private Use", all other values use the 2219 registration policy "Expert Review" [RFC8126]. 2220 Value Type The allowable CBOR data types for values of this 2221 parameter. 2222 Reference This contains a pointer to the public specification of the 2223 parameter abbreviation, if one exists. 2225 This registry will be initially populated by the values in Figure 12. 2226 The Reference column for all of these entries will be this document. 2228 Note that the mappings of parameters corresponding to claim names 2229 intentionally coincide with the CWT claim name mappings from 2230 [RFC8392]. 2232 8.10. OAuth Introspection Response Parameter Registration 2234 This specification registers the following parameter in the OAuth 2235 Token Introspection Response registry 2236 [IANA.TokenIntrospectionResponse]. 2238 o Name: "profile" 2239 o Description: The communication and communication security profile 2240 used between client and RS, as defined in ACE profiles. 2241 o Change Controller: IESG 2242 o Reference: Section 5.7.2 of [this document] 2244 8.11. OAuth Token Introspection Response CBOR Mappings Registry 2246 This specification establishes the IANA "OAuth Token Introspection 2247 Response CBOR Mappings" registry. The registry has been created to 2248 use the "Expert Review" registration procedure [RFC8126], except for 2249 the value range designated for private use. 2251 The columns of this registry are: 2253 Name The OAuth Parameter name, refers to the name in the OAuth 2254 parameter registry, e.g., "client_id". 2255 CBOR Key CBOR map key for this parameter. Integer values less than 2256 -65536 are marked as "Private Use", all other values use the 2257 registration policy "Expert Review" [RFC8126]. 2258 Value Type The allowable CBOR data types for values of this 2259 parameter. 2260 Reference This contains a pointer to the public specification of the 2261 grant type abbreviation, if one exists. 2263 This registry will be initially populated by the values in Figure 16. 2264 The Reference column for all of these entries will be this document. 2266 Note that the mappings of parameters corresponding to claim names 2267 intentionally coincide with the CWT claim name mappings from 2268 [RFC8392]. 2270 8.12. JSON Web Token Claims 2272 This specification registers the following new claims in the JSON Web 2273 Token (JWT) registry of JSON Web Token Claims 2274 [IANA.JsonWebTokenClaims]: 2276 o Claim Name: "scope" 2277 o Claim Description: The scope of an access token as defined in 2278 [RFC6749]. 2279 o Change Controller: IESG 2280 o Reference: Section 5.8 of [this document] 2282 o Claim Name: "profile" 2283 o Claim Description: The profile a token is supposed to be used 2284 with. 2285 o Change Controller: IESG 2286 o Reference: Section 5.8 of [this document] 2288 o Claim Name: "exi" 2289 o Claim Description: "Expires in". Lifetime of the token in seconds 2290 from the time the RS first sees it. Used to implement a weaker 2291 from of token expiration for devices that cannot synchronize their 2292 internal clocks. 2293 o Change Controller: IESG 2294 o Reference: Section 5.8.3 of [this document] 2296 8.13. CBOR Web Token Claims 2298 This specification registers the following new claims in the "CBOR 2299 Web Token (CWT) Claims" registry [IANA.CborWebTokenClaims]. 2301 o Claim Name: "scope" 2302 o Claim Description: The scope of an access token as defined in 2303 [RFC6749]. 2304 o JWT Claim Name: scope 2305 o Claim Key: TBD (suggested: 9) 2306 o Claim Value Type(s): byte string or text string 2307 o Change Controller: IESG 2308 o Specification Document(s): Section 5.8 of [this document] 2310 o Claim Name: "profile" 2311 o Claim Description: The profile a token is supposed to be used 2312 with. 2313 o JWT Claim Name: profile 2314 o Claim Key: TBD (suggested: 39) 2315 o Claim Value Type(s): integer 2316 o Change Controller: IESG 2317 o Specification Document(s): Section 5.8 of [this document] 2319 o Claim Name: "exi" 2320 o Claim Description: The expiration time of a token measured from 2321 when it was received at the RS in seconds. 2322 o JWT Claim Name: exi 2323 o Claim Key: TBD (suggested: 41) 2324 o Claim Value Type(s): integer 2325 o Change Controller: IESG 2326 o Specification Document(s): Section 5.8 of [this document] 2328 8.14. Media Type Registrations 2330 This specification registers the 'application/ace+cbor' media type 2331 for messages of the protocols defined in this document carrying 2332 parameters encoded in CBOR. This registration follows the procedures 2333 specified in [RFC6838]. 2335 Type name: application 2337 Subtype name: ace+cbor 2338 Required parameters: none 2340 Optional parameters: none 2342 Encoding considerations: Must be encoded as CBOR map containing the 2343 protocol parameters defined in [this document]. 2345 Security considerations: See Section 6 of this document. 2347 Interoperability considerations: n/a 2349 Published specification: [this document] 2351 Applications that use this media type: The type is used by 2352 authorization servers, clients and resource servers that support the 2353 ACE framework as specified in [this document]. 2355 Additional information: 2357 Magic number(s): n/a 2359 File extension(s): .ace 2361 Macintosh file type code(s): n/a 2363 Person & email address to contact for further information: Ludwig 2364 Seitz 2366 Intended usage: COMMON 2368 Restrictions on usage: None 2370 Author: Ludwig Seitz 2372 Change controller: IESG 2374 8.15. CoAP Content-Format Registry 2376 This specification registers the following entry to the "CoAP 2377 Content-Formats" registry: 2379 Media Type: application/ace+cbor 2381 Encoding 2383 ID: 19 2385 Reference: [this document] 2387 8.16. Expert Review Instructions 2389 All of the IANA registries established in this document are defined 2390 as expert review. This section gives some general guidelines for 2391 what the experts should be looking for, but they are being designated 2392 as experts for a reason, so they should be given substantial 2393 latitude. 2395 Expert reviewers should take into consideration the following points: 2397 o Point squatting should be discouraged. Reviewers are encouraged 2398 to get sufficient information for registration requests to ensure 2399 that the usage is not going to duplicate one that is already 2400 registered, and that the point is likely to be used in 2401 deployments. The zones tagged as private use are intended for 2402 testing purposes and closed environments; code points in other 2403 ranges should not be assigned for testing. 2404 o Specifications are required for the standards track range of point 2405 assignment. Specifications should exist for specification 2406 required ranges, but early assignment before a specification is 2407 available is considered to be permissible. Specifications are 2408 needed for the first-come, first-serve range if they are expected 2409 to be used outside of closed environments in an interoperable way. 2410 When specifications are not provided, the description provided 2411 needs to have sufficient information to identify what the point is 2412 being used for. 2413 o Experts should take into account the expected usage of fields when 2414 approving point assignment. The fact that there is a range for 2415 standards track documents does not mean that a standards track 2416 document cannot have points assigned outside of that range. The 2417 length of the encoded value should be weighed against how many 2418 code points of that length are left, the size of device it will be 2419 used on, and the number of code points left that encode to that 2420 size. 2421 o Since a high degree of overlap is expected between these 2422 registries and the contents of the OAuth parameters 2423 [IANA.OAuthParameters] registries, experts should require new 2424 registrations to maintain alignment with parameters from OAuth 2425 that have comparable functionality. Deviation from this alignment 2426 should only be allowed if there are functional differences, that 2427 are motivated by the use case and that cannot be easily or 2428 efficiently addressed by comparable OAuth parameters. 2430 9. Acknowledgments 2432 This document is a product of the ACE working group of the IETF. 2434 Thanks to Eve Maler for her contributions to the use of OAuth 2.0 and 2435 UMA in IoT scenarios, Robert Taylor for his discussion input, and 2436 Malisa Vucinic for his input on the predecessors of this proposal. 2438 Thanks to the authors of draft-ietf-oauth-pop-key-distribution, from 2439 where large parts of the security considerations where copied. 2441 Thanks to Stefanie Gerdes, Olaf Bergmann, and Carsten Bormann for 2442 contributing their work on AS discovery from draft-gerdes-ace-dcaf- 2443 authorize (see Section 5.1). 2445 Thanks to Jim Schaad and Mike Jones for their comprehensive reviews. 2447 Thanks to Benjamin Kaduk for his input on various questions related 2448 to this work. 2450 Ludwig Seitz and Goeran Selander worked on this document as part of 2451 the CelticPlus project CyberWI, with funding from Vinnova. 2453 10. References 2455 10.1. Normative References 2457 [I-D.ietf-ace-cwt-proof-of-possession] 2458 Jones, M., Seitz, L., Selander, G., Erdtman, S., and H. 2459 Tschofenig, "Proof-of-Possession Key Semantics for CBOR 2460 Web Tokens (CWTs)", draft-ietf-ace-cwt-proof-of- 2461 possession-06 (work in progress), February 2019. 2463 [I-D.ietf-ace-oauth-params] 2464 Seitz, L., "Additional OAuth Parameters for Authorization 2465 in Constrained Environments (ACE)", draft-ietf-ace-oauth- 2466 params-04 (work in progress), February 2019. 2468 [I-D.ietf-oauth-token-exchange] 2469 Jones, M., Nadalin, A., Campbell, B., Bradley, J., and C. 2470 Mortimore, "OAuth 2.0 Token Exchange", draft-ietf-oauth- 2471 token-exchange-16 (work in progress), October 2018. 2473 [IANA.CborWebTokenClaims] 2474 IANA, "CBOR Web Token (CWT) Claims", 2475 . 2478 [IANA.JsonWebTokenClaims] 2479 IANA, "JSON Web Token Claims", 2480 . 2482 [IANA.OAuthAccessTokenTypes] 2483 IANA, "OAuth Access Token Types", 2484 . 2487 [IANA.OAuthParameters] 2488 IANA, "OAuth Parameters", 2489 . 2492 [IANA.TokenIntrospectionResponse] 2493 IANA, "OAuth Token Introspection Response", 2494 . 2497 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2498 Requirement Levels", BCP 14, RFC 2119, 2499 DOI 10.17487/RFC2119, March 1997, 2500 . 2502 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 2503 Resource Identifier (URI): Generic Syntax", STD 66, 2504 RFC 3986, DOI 10.17487/RFC3986, January 2005, 2505 . 2507 [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer 2508 Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, 2509 January 2012, . 2511 [RFC6749] Hardt, D., Ed., "The OAuth 2.0 Authorization Framework", 2512 RFC 6749, DOI 10.17487/RFC6749, October 2012, 2513 . 2515 [RFC6750] Jones, M. and D. Hardt, "The OAuth 2.0 Authorization 2516 Framework: Bearer Token Usage", RFC 6750, 2517 DOI 10.17487/RFC6750, October 2012, 2518 . 2520 [RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type 2521 Specifications and Registration Procedures", BCP 13, 2522 RFC 6838, DOI 10.17487/RFC6838, January 2013, 2523 . 2525 [RFC6920] Farrell, S., Kutscher, D., Dannewitz, C., Ohlman, B., 2526 Keranen, A., and P. Hallam-Baker, "Naming Things with 2527 Hashes", RFC 6920, DOI 10.17487/RFC6920, April 2013, 2528 . 2530 [RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained 2531 Application Protocol (CoAP)", RFC 7252, 2532 DOI 10.17487/RFC7252, June 2014, 2533 . 2535 [RFC7662] Richer, J., Ed., "OAuth 2.0 Token Introspection", 2536 RFC 7662, DOI 10.17487/RFC7662, October 2015, 2537 . 2539 [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for 2540 Writing an IANA Considerations Section in RFCs", BCP 26, 2541 RFC 8126, DOI 10.17487/RFC8126, June 2017, 2542 . 2544 [RFC8152] Schaad, J., "CBOR Object Signing and Encryption (COSE)", 2545 RFC 8152, DOI 10.17487/RFC8152, July 2017, 2546 . 2548 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2549 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2550 May 2017, . 2552 [RFC8392] Jones, M., Wahlstroem, E., Erdtman, S., and H. Tschofenig, 2553 "CBOR Web Token (CWT)", RFC 8392, DOI 10.17487/RFC8392, 2554 May 2018, . 2556 10.2. Informative References 2558 [I-D.erdtman-ace-rpcc] 2559 Seitz, L. and S. Erdtman, "Raw-Public-Key and Pre-Shared- 2560 Key as OAuth client credentials", draft-erdtman-ace- 2561 rpcc-02 (work in progress), October 2017. 2563 [I-D.ietf-core-object-security] 2564 Selander, G., Mattsson, J., Palombini, F., and L. Seitz, 2565 "Object Security for Constrained RESTful Environments 2566 (OSCORE)", draft-ietf-core-object-security-15 (work in 2567 progress), August 2018. 2569 [I-D.ietf-oauth-device-flow] 2570 Denniss, W., Bradley, J., Jones, M., and H. Tschofenig, 2571 "OAuth 2.0 Device Flow for Browserless and Input 2572 Constrained Devices", draft-ietf-oauth-device-flow-14 2573 (work in progress), January 2019. 2575 [I-D.ietf-tls-dtls13] 2576 Rescorla, E., Tschofenig, H., and N. Modadugu, "The 2577 Datagram Transport Layer Security (DTLS) Protocol Version 2578 1.3", draft-ietf-tls-dtls13-30 (work in progress), 2579 November 2018. 2581 [Margi10impact] 2582 Margi, C., de Oliveira, B., de Sousa, G., Simplicio Jr, 2583 M., Barreto, P., Carvalho, T., Naeslund, M., and R. Gold, 2584 "Impact of Operating Systems on Wireless Sensor Networks 2585 (Security) Applications and Testbeds", Proceedings of 2586 the 19th International Conference on Computer 2587 Communications and Networks (ICCCN), August 2010. 2589 [RFC4949] Shirey, R., "Internet Security Glossary, Version 2", 2590 FYI 36, RFC 4949, DOI 10.17487/RFC4949, August 2007, 2591 . 2593 [RFC6690] Shelby, Z., "Constrained RESTful Environments (CoRE) Link 2594 Format", RFC 6690, DOI 10.17487/RFC6690, August 2012, 2595 . 2597 [RFC6819] Lodderstedt, T., Ed., McGloin, M., and P. Hunt, "OAuth 2.0 2598 Threat Model and Security Considerations", RFC 6819, 2599 DOI 10.17487/RFC6819, January 2013, 2600 . 2602 [RFC7049] Bormann, C. and P. Hoffman, "Concise Binary Object 2603 Representation (CBOR)", RFC 7049, DOI 10.17487/RFC7049, 2604 October 2013, . 2606 [RFC7228] Bormann, C., Ersue, M., and A. Keranen, "Terminology for 2607 Constrained-Node Networks", RFC 7228, 2608 DOI 10.17487/RFC7228, May 2014, 2609 . 2611 [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 2612 Protocol (HTTP/1.1): Semantics and Content", RFC 7231, 2613 DOI 10.17487/RFC7231, June 2014, 2614 . 2616 [RFC7519] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token 2617 (JWT)", RFC 7519, DOI 10.17487/RFC7519, May 2015, 2618 . 2620 [RFC7521] Campbell, B., Mortimore, C., Jones, M., and Y. Goland, 2621 "Assertion Framework for OAuth 2.0 Client Authentication 2622 and Authorization Grants", RFC 7521, DOI 10.17487/RFC7521, 2623 May 2015, . 2625 [RFC7591] Richer, J., Ed., Jones, M., Bradley, J., Machulak, M., and 2626 P. Hunt, "OAuth 2.0 Dynamic Client Registration Protocol", 2627 RFC 7591, DOI 10.17487/RFC7591, July 2015, 2628 . 2630 [RFC7641] Hartke, K., "Observing Resources in the Constrained 2631 Application Protocol (CoAP)", RFC 7641, 2632 DOI 10.17487/RFC7641, September 2015, 2633 . 2635 [RFC7744] Seitz, L., Ed., Gerdes, S., Ed., Selander, G., Mani, M., 2636 and S. Kumar, "Use Cases for Authentication and 2637 Authorization in Constrained Environments", RFC 7744, 2638 DOI 10.17487/RFC7744, January 2016, 2639 . 2641 [RFC7959] Bormann, C. and Z. Shelby, Ed., "Block-Wise Transfers in 2642 the Constrained Application Protocol (CoAP)", RFC 7959, 2643 DOI 10.17487/RFC7959, August 2016, 2644 . 2646 [RFC8252] Denniss, W. and J. Bradley, "OAuth 2.0 for Native Apps", 2647 BCP 212, RFC 8252, DOI 10.17487/RFC8252, October 2017, 2648 . 2650 [RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data 2651 Interchange Format", STD 90, RFC 8259, 2652 DOI 10.17487/RFC8259, December 2017, 2653 . 2655 [RFC8414] Jones, M., Sakimura, N., and J. Bradley, "OAuth 2.0 2656 Authorization Server Metadata", RFC 8414, 2657 DOI 10.17487/RFC8414, June 2018, 2658 . 2660 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 2661 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 2662 . 2664 [RFC8516] Keranen, A., ""Too Many Requests" Response Code for the 2665 Constrained Application Protocol", RFC 8516, 2666 DOI 10.17487/RFC8516, January 2019, 2667 . 2669 Appendix A. Design Justification 2671 This section provides further insight into the design decisions of 2672 the solution documented in this document. Section 3 lists several 2673 building blocks and briefly summarizes their importance. The 2674 justification for offering some of those building blocks, as opposed 2675 to using OAuth 2.0 as is, is given below. 2677 Common IoT constraints are: 2679 Low Power Radio: 2681 Many IoT devices are equipped with a small battery which needs to 2682 last for a long time. For many constrained wireless devices, the 2683 highest energy cost is associated to transmitting or receiving 2684 messages (roughly by a factor of 10 compared to AES) 2685 [Margi10impact]. It is therefore important to keep the total 2686 communication overhead low, including minimizing the number and 2687 size of messages sent and received, which has an impact of choice 2688 on the message format and protocol. By using CoAP over UDP and 2689 CBOR encoded messages, some of these aspects are addressed. 2690 Security protocols contribute to the communication overhead and 2691 can, in some cases, be optimized. For example, authentication and 2692 key establishment may, in certain cases where security 2693 requirements allow, be replaced by provisioning of security 2694 context by a trusted third party, using transport or application 2695 layer security. 2697 Low CPU Speed: 2699 Some IoT devices are equipped with processors that are 2700 significantly slower than those found in most current devices on 2701 the Internet. This typically has implications on what timely 2702 cryptographic operations a device is capable of performing, which 2703 in turn impacts, e.g., protocol latency. Symmetric key 2704 cryptography may be used instead of the computationally more 2705 expensive public key cryptography where the security requirements 2706 so allows, but this may also require support for trusted third 2707 party assisted secret key establishment using transport or 2708 application layer security. 2709 Small Amount of Memory: 2711 Microcontrollers embedded in IoT devices are often equipped with 2712 small amount of RAM and flash memory, which places limitations 2713 what kind of processing can be performed and how much code can be 2714 put on those devices. To reduce code size fewer and smaller 2715 protocol implementations can be put on the firmware of such a 2716 device. In this case, CoAP may be used instead of HTTP, symmetric 2717 key cryptography instead of public key cryptography, and CBOR 2718 instead of JSON. Authentication and key establishment protocol, 2719 e.g., the DTLS handshake, in comparison with assisted key 2720 establishment also has an impact on memory and code. 2722 User Interface Limitations: 2724 Protecting access to resources is both an important security as 2725 well as privacy feature. End users and enterprise customers may 2726 not want to give access to the data collected by their IoT device 2727 or to functions it may offer to third parties. Since the 2728 classical approach of requesting permissions from end users via a 2729 rich user interface does not work in many IoT deployment 2730 scenarios, these functions need to be delegated to user-controlled 2731 devices that are better suitable for such tasks, such as smart 2732 phones and tablets. 2734 Communication Constraints: 2736 In certain constrained settings an IoT device may not be able to 2737 communicate with a given device at all times. Devices may be 2738 sleeping, or just disconnected from the Internet because of 2739 general lack of connectivity in the area, for cost reasons, or for 2740 security reasons, e.g., to avoid an entry point for Denial-of- 2741 Service attacks. 2743 The communication interactions this framework builds upon (as 2744 shown graphically in Figure 1) may be accomplished using a variety 2745 of different protocols, and not all parts of the message flow are 2746 used in all applications due to the communication constraints. 2747 Deployments making use of CoAP are expected, but not limited to, 2748 other protocols such as HTTP, HTTP/2 or other specific protocols, 2749 such as Bluetooth Smart communication, that do not necessarily use 2750 IP could also be used. The latter raises the need for application 2751 layer security over the various interfaces. 2753 In the light of these constraints we have made the following design 2754 decisions: 2756 CBOR, COSE, CWT: 2758 This framework RECOMMENDS the use of CBOR [RFC7049] as data 2759 format. Where CBOR data needs to be protected, the use of COSE 2760 [RFC8152] is RECOMMENDED. Furthermore where self-contained tokens 2761 are needed, this framework RECOMMENDS the use of CWT [RFC8392]. 2762 These measures aim at reducing the size of messages sent over the 2763 wire, the RAM size of data objects that need to be kept in memory 2764 and the size of libraries that devices need to support. 2766 CoAP: 2768 This framework RECOMMENDS the use of CoAP [RFC7252] instead of 2769 HTTP. This does not preclude the use of other protocols 2770 specifically aimed at constrained devices, like, e.g., Bluetooth 2771 Low Energy (see Section 3.2). This aims again at reducing the 2772 size of messages sent over the wire, the RAM size of data objects 2773 that need to be kept in memory and the size of libraries that 2774 devices need to support. 2776 Access Information: 2778 This framework defines the name "Access Information" for data 2779 concerning the RS that the AS returns to the client in an access 2780 token response (see Section 5.6.2). This aims at enabling 2781 scenarios, where a powerful client, supporting multiple profiles, 2782 needs to interact with a RS for which it does not know the 2783 supported profiles and the raw public key. 2785 Proof-of-Possession: 2787 This framework makes use of proof-of-possession tokens, using the 2788 "cnf" claim [I-D.ietf-ace-cwt-proof-of-possession]. A 2789 semantically and syntactically identical request and response 2790 parameter is defined for the token endpoint, to allow requesting 2791 and stating confirmation keys. This aims at making token theft 2792 harder. Token theft is specifically relevant in constrained use 2793 cases, as communication often passes through middle-boxes, which 2794 could be able to steal bearer tokens and use them to gain 2795 unauthorized access. 2797 Auth-Info endpoint: 2799 This framework introduces a new way of providing access tokens to 2800 a RS by exposing a authz-info endpoint, to which access tokens can 2801 be POSTed. This aims at reducing the size of the request message 2802 and the code complexity at the RS. The size of the request 2803 message is problematic, since many constrained protocols have 2804 severe message size limitations at the physical layer (e.g., in 2805 the order of 100 bytes). This means that larger packets get 2806 fragmented, which in turn combines badly with the high rate of 2807 packet loss, and the need to retransmit the whole message if one 2808 packet gets lost. Thus separating sending of the request and 2809 sending of the access tokens helps to reduce fragmentation. 2811 Client Credentials Grant: 2813 This framework RECOMMENDS the use of the client credentials grant 2814 for machine-to-machine communication use cases, where manual 2815 intervention of the resource owner to produce a grant token is not 2816 feasible. The intention is that the resource owner would instead 2817 pre-arrange authorization with the AS, based on the client's own 2818 credentials. The client can then (without manual intervention) 2819 obtain access tokens from the AS. 2821 Introspection: 2823 This framework RECOMMENDS the use of access token introspection in 2824 cases where the client is constrained in a way that it can not 2825 easily obtain new access tokens (i.e. it has connectivity issues 2826 that prevent it from communicating with the AS). In that case 2827 this framework RECOMMENDS the use of a long-term token, that could 2828 be a simple reference. The RS is assumed to be able to 2829 communicate with the AS, and can therefore perform introspection, 2830 in order to learn the claims associated with the token reference. 2831 The advantage of such an approach is that the resource owner can 2832 change the claims associated to the token reference without having 2833 to be in contact with the client, thus granting or revoking access 2834 rights. 2836 Appendix B. Roles and Responsibilities 2838 Resource Owner 2840 * Make sure that the RS is registered at the AS. This includes 2841 making known to the AS which profiles, token_types, scopes, and 2842 key types (symmetric/asymmetric) the RS supports. Also making 2843 it known to the AS which audience(s) the RS identifies itself 2844 with. 2845 * Make sure that clients can discover the AS that is in charge of 2846 the RS. 2847 * If the client-credentials grant is used, make sure that the AS 2848 has the necessary, up-to-date, access control policies for the 2849 RS. 2851 Requesting Party 2853 * Make sure that the client is provisioned the necessary 2854 credentials to authenticate to the AS. 2855 * Make sure that the client is configured to follow the security 2856 requirements of the Requesting Party when issuing requests 2857 (e.g., minimum communication security requirements, trust 2858 anchors). 2860 * Register the client at the AS. This includes making known to 2861 the AS which profiles, token_types, and key types (symmetric/ 2862 asymmetric) the client. 2864 Authorization Server 2866 * Register the RS and manage corresponding security contexts. 2867 * Register clients and authentication credentials. 2868 * Allow Resource Owners to configure and update access control 2869 policies related to their registered RSs. 2870 * Expose the token endpoint to allow clients to request tokens. 2871 * Authenticate clients that wish to request a token. 2872 * Process a token request using the authorization policies 2873 configured for the RS. 2874 * Optionally: Expose the introspection endpoint that allows RS's 2875 to submit token introspection requests. 2876 * If providing an introspection endpoint: Authenticate RSs that 2877 wish to get an introspection response. 2878 * If providing an introspection endpoint: Process token 2879 introspection requests. 2880 * Optionally: Handle token revocation. 2881 * Optionally: Provide discovery metadata. See [RFC8414] 2882 * Optionally: Handle refresh tokens. 2884 Client 2886 * Discover the AS in charge of the RS that is to be targeted with 2887 a request. 2888 * Submit the token request (see step (A) of Figure 1). 2890 + Authenticate to the AS. 2891 + Optionally (if not pre-configured): Specify which RS, which 2892 resource(s), and which action(s) the request(s) will target. 2893 + If raw public keys (rpk) or certificates are used, make sure 2894 the AS has the right rpk or certificate for this client. 2895 * Process the access token and Access Information (see step (B) 2896 of Figure 1). 2898 + Check that the Access Information provides the necessary 2899 security parameters (e.g., PoP key, information on 2900 communication security protocols supported by the RS). 2901 + Safely store the proof-of-possession key. 2902 + If provided by the AS: Safely store the refresh token. 2903 * Send the token and request to the RS (see step (C) of 2904 Figure 1). 2906 + Authenticate towards the RS (this could coincide with the 2907 proof of possession process). 2909 + Transmit the token as specified by the AS (default is to the 2910 authz-info endpoint, alternative options are specified by 2911 profiles). 2912 + Perform the proof-of-possession procedure as specified by 2913 the profile in use (this may already have been taken care of 2914 through the authentication procedure). 2915 * Process the RS response (see step (F) of Figure 1) of the RS. 2917 Resource Server 2919 * Expose a way to submit access tokens. By default this is the 2920 authz-info endpoint. 2921 * Process an access token. 2923 + Verify the token is from a recognized AS. 2924 + Verify that the token applies to this RS. 2925 + Check that the token has not expired (if the token provides 2926 expiration information). 2927 + Check the token's integrity. 2928 + Store the token so that it can be retrieved in the context 2929 of a matching request. 2930 * Process a request. 2932 + Set up communication security with the client. 2933 + Authenticate the client. 2934 + Match the client against existing tokens. 2935 + Check that tokens belonging to the client actually authorize 2936 the requested action. 2937 + Optionally: Check that the matching tokens are still valid, 2938 using introspection (if this is possible.) 2939 * Send a response following the agreed upon communication 2940 security. 2941 * Safely store credentials such as raw public keys for 2942 authentication or proof-of-possession keys linked to access 2943 tokens. 2945 Appendix C. Requirements on Profiles 2947 This section lists the requirements on profiles of this framework, 2948 for the convenience of profile designers. 2950 o Specify the communication protocol the client and RS the must use 2951 (e.g., CoAP). Section 5 and Section 5.6.4.3 2952 o Specify the security protocol the client and RS must use to 2953 protect their communication (e.g., OSCORE or DTLS over CoAP). 2954 This must provide encryption, integrity and replay protection. 2955 Section 5.6.4.3 2957 o Specify how the client and the RS mutually authenticate. 2958 Section 4 2959 o Specify the proof-of-possession protocol(s) and how to select one, 2960 if several are available. Also specify which key types (e.g., 2961 symmetric/asymmetric) are supported by a specific proof-of- 2962 possession protocol. Section 5.6.4.2 2963 o Specify a unique profile identifier. Section 5.6.4.3 2964 o If introspection is supported: Specify the communication and 2965 security protocol for introspection. Section 5.7 2966 o Specify the communication and security protocol for interactions 2967 between client and AS. This must provide encryption, integrity 2968 protection, replay protection and a binding between requests and 2969 responses. Section 5 and Section 5.6 2970 o Specify how/if the authz-info endpoint is protected, including how 2971 error responses are protected. Section 5.8.1 2972 o Optionally define other methods of token transport than the authz- 2973 info endpoint. Section 5.8.1 2975 Appendix D. Assumptions on AS knowledge about C and RS 2977 This section lists the assumptions on what an AS should know about a 2978 client and a RS in order to be able to respond to requests to the 2979 token and introspection endpoints. How this information is 2980 established is out of scope for this document. 2982 o The identifier of the client or RS. 2983 o The profiles that the client or RS supports. 2984 o The scopes that the RS supports. 2985 o The audiences that the RS identifies with. 2986 o The key types (e.g., pre-shared symmetric key, raw public key, key 2987 length, other key parameters) that the client or RS supports. 2988 o The types of access tokens the RS supports (e.g., CWT). 2989 o If the RS supports CWTs, the COSE parameters for the crypto 2990 wrapper (e.g., algorithm, key-wrap algorithm, key-length). 2991 o The expiration time for access tokens issued to this RS (unless 2992 the RS accepts a default time chosen by the AS). 2993 o The symmetric key shared between client or RS and AS (if any). 2994 o The raw public key of the client or RS (if any). 2995 o Whether the RS has synchronized time (and thus is able to use the 2996 'exp' claim) or not. 2998 Appendix E. Deployment Examples 3000 There is a large variety of IoT deployments, as is indicated in 3001 Appendix A, and this section highlights a few common variants. This 3002 section is not normative but illustrates how the framework can be 3003 applied. 3005 For each of the deployment variants, there are a number of possible 3006 security setups between clients, resource servers and authorization 3007 servers. The main focus in the following subsections is on how 3008 authorization of a client request for a resource hosted by a RS is 3009 performed. This requires the security of the requests and responses 3010 between the clients and the RS to consider. 3012 Note: CBOR diagnostic notation is used for examples of requests and 3013 responses. 3015 E.1. Local Token Validation 3017 In this scenario, the case where the resource server is offline is 3018 considered, i.e., it is not connected to the AS at the time of the 3019 access request. This access procedure involves steps A, B, C, and F 3020 of Figure 1. 3022 Since the resource server must be able to verify the access token 3023 locally, self-contained access tokens must be used. 3025 This example shows the interactions between a client, the 3026 authorization server and a temperature sensor acting as a resource 3027 server. Message exchanges A and B are shown in Figure 17. 3029 A: The client first generates a public-private key pair used for 3030 communication security with the RS. 3031 The client sends the POST request to the token endpoint at the AS. 3032 The security of this request can be transport or application 3033 layer. It is up the the communication security profile to define. 3034 In the example transport layer identification of the AS is done 3035 and the client identifies with client_id and client_secret as in 3036 classic OAuth. The request contains the public key of the client 3037 and the Audience parameter set to "tempSensorInLivingRoom", a 3038 value that the temperature sensor identifies itself with. The AS 3039 evaluates the request and authorizes the client to access the 3040 resource. 3041 B: The AS responds with a PoP access token and Access Information. 3042 The PoP access token contains the public key of the client, and 3043 the Access Information contains the public key of the RS. For 3044 communication security this example uses DTLS RawPublicKey between 3045 the client and the RS. The issued token will have a short 3046 validity time, i.e., "exp" close to "iat", to protect the RS from 3047 replay attacks. The token includes the claim such as "scope" with 3048 the authorized access that an owner of the temperature device can 3049 enjoy. In this example, the "scope" claim, issued by the AS, 3050 informs the RS that the owner of the token, that can prove the 3051 possession of a key is authorized to make a GET request against 3052 the /temperature resource and a POST request on the /firmware 3053 resource. Note that the syntax and semantics of the scope claim 3054 are application specific. 3055 Note: In this example it is assumed that the client knows what 3056 resource it wants to access, and is therefore able to request 3057 specific audience and scope claims for the access token. 3059 Authorization 3060 Client Server 3061 | | 3062 |<=======>| DTLS Connection Establishment 3063 | | to identify the AS 3064 | | 3065 A: +-------->| Header: POST (Code=0.02) 3066 | POST | Uri-Path:"token" 3067 | | Content-Format: application/ace+cbor 3068 | | Payload: 3069 | | 3070 B: |<--------+ Header: 2.05 Content 3071 | 2.05 | Content-Format: application/ace+cbor 3072 | | Payload: 3073 | | 3075 Figure 17: Token Request and Response Using Client Credentials. 3077 The information contained in the Request-Payload and the Response- 3078 Payload is shown in Figure 18 Note that the parameter "rs_cnf" from 3079 [I-D.ietf-ace-oauth-params] is used to inform the client about the 3080 resource server's public key. 3082 Request-Payload : 3083 { 3084 "audience" : "tempSensorInLivingRoom", 3085 "client_id" : "myclient", 3086 "client_secret" : "qwerty" 3087 "req_cnf" : { 3088 "COSE_Key" : { 3089 "kid" : b64'1Bg8vub9tLe1gHMzV76e8', 3090 "kty" : "EC", 3091 "crv" : "P-256", 3092 "x" : b64'f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU', 3093 "y" : b64'x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0' 3094 } 3095 } 3096 } 3098 Response-Payload : 3099 { 3100 "access_token" : b64'SlAV32hkKG ...', 3101 "rs_cnf" : { 3102 "COSE_Key" : { 3103 "kid" : b64'c29tZSBwdWJsaWMga2V5IGlk', 3104 "kty" : "EC", 3105 "crv" : "P-256", 3106 "x" : b64'MKBCTNIcKUSDii11ySs3526iDZ8AiTo7Tu6KPAqv7D4', 3107 "y" : b64'4Etl6SRW2YiLUrN5vfvVHuhp7x8PxltmWWlbbM4IFyM' 3108 } 3109 } 3110 } 3112 Figure 18: Request and Response Payload Details. 3114 The content of the access token is shown in Figure 19. 3116 { 3117 "aud" : "tempSensorInLivingRoom", 3118 "iat" : "1360189224", 3119 "exp" : "1360289224", 3120 "scope" : "temperature_g firmware_p", 3121 "cnf" : { 3122 "COSE_Key" : { 3123 "kid" : b64'1Bg8vub9tLe1gHMzV76e8', 3124 "kty" : "EC", 3125 "crv" : "P-256", 3126 "x" : b64'f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU', 3127 "y" : b64'x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0' 3128 } 3129 } 3130 } 3132 Figure 19: Access Token including Public Key of the Client. 3134 Messages C and F are shown in Figure 20 - Figure 21. 3136 C: The client then sends the PoP access token to the authz-info 3137 endpoint at the RS. This is a plain CoAP request, i.e., no 3138 transport or application layer security is used between client and 3139 RS since the token is integrity protected between the AS and RS. 3140 The RS verifies that the PoP access token was created by a known 3141 and trusted AS, is valid, and has been issued to the client. The 3142 RS caches the security context together with authorization 3143 information about this client contained in the PoP access token. 3145 Resource 3146 Client Server 3147 | | 3148 C: +-------->| Header: POST (Code=0.02) 3149 | POST | Uri-Path:"authz-info" 3150 | | Payload: SlAV32hkKG ... 3151 | | 3152 |<--------+ Header: 2.04 Changed 3153 | 2.04 | 3154 | | 3156 Figure 20: Access Token provisioning to RS 3157 The client and the RS runs the DTLS handshake using the raw public 3158 keys established in step B and C. 3159 The client sends the CoAP request GET to /temperature on RS over 3160 DTLS. The RS verifies that the request is authorized, based on 3161 previously established security context. 3162 F: The RS responds with a resource representation over DTLS. 3164 Resource 3165 Client Server 3166 | | 3167 |<=======>| DTLS Connection Establishment 3168 | | using Raw Public Keys 3169 | | 3170 +-------->| Header: GET (Code=0.01) 3171 | GET | Uri-Path: "temperature" 3172 | | 3173 | | 3174 | | 3175 F: |<--------+ Header: 2.05 Content 3176 | 2.05 | Payload: 3177 | | 3179 Figure 21: Resource Request and Response protected by DTLS. 3181 E.2. Introspection Aided Token Validation 3183 In this deployment scenario it is assumed that a client is not able 3184 to access the AS at the time of the access request, whereas the RS is 3185 assumed to be connected to the back-end infrastructure. Thus the RS 3186 can make use of token introspection. This access procedure involves 3187 steps A-F of Figure 1, but assumes steps A and B have been carried 3188 out during a phase when the client had connectivity to AS. 3190 Since the client is assumed to be offline, at least for a certain 3191 period of time, a pre-provisioned access token has to be long-lived. 3192 Since the client is constrained, the token will not be self contained 3193 (i.e. not a CWT) but instead just a reference. The resource server 3194 uses its connectivity to learn about the claims associated to the 3195 access token by using introspection, which is shown in the example 3196 below. 3198 In the example interactions between an offline client (key fob), a RS 3199 (online lock), and an AS is shown. It is assumed that there is a 3200 provisioning step where the client has access to the AS. This 3201 corresponds to message exchanges A and B which are shown in 3202 Figure 22. 3204 Authorization consent from the resource owner can be pre-configured, 3205 but it can also be provided via an interactive flow with the resource 3206 owner. An example of this for the key fob case could be that the 3207 resource owner has a connected car, he buys a generic key that he 3208 wants to use with the car. To authorize the key fob he connects it 3209 to his computer that then provides the UI for the device. After that 3210 OAuth 2.0 implicit flow can used to authorize the key for his car at 3211 the the car manufacturers AS. 3213 Note: In this example the client does not know the exact door it will 3214 be used to access since the token request is not send at the time of 3215 access. So the scope and audience parameters are set quite wide to 3216 start with and new values different form the original once can be 3217 returned from introspection later on. 3219 A: The client sends the request using POST to the token endpoint 3220 at AS. The request contains the Audience parameter set to 3221 "PACS1337" (PACS, Physical Access System), a value the that the 3222 online door in question identifies itself with. The AS generates 3223 an access token as an opaque string, which it can match to the 3224 specific client, a targeted audience and a symmetric key. The 3225 security is provided by identifying the AS on transport layer 3226 using a pre shared security context (psk, rpk or certificate) and 3227 then the client is identified using client_id and client_secret as 3228 in classic OAuth. 3229 B: The AS responds with the an access token and Access 3230 Information, the latter containing a symmetric key. Communication 3231 security between C and RS will be DTLS and PreSharedKey. The PoP 3232 key is used as the PreSharedKey. 3234 Authorization 3235 Client Server 3236 | | 3237 | | 3238 A: +-------->| Header: POST (Code=0.02) 3239 | POST | Uri-Path:"token" 3240 | | Content-Format: application/ace+cbor 3241 | | Payload: 3242 | | 3243 B: |<--------+ Header: 2.05 Content 3244 | | Content-Format: application/ace+cbor 3245 | 2.05 | Payload: 3246 | | 3248 Figure 22: Token Request and Response using Client Credentials. 3250 The information contained in the Request-Payload and the Response- 3251 Payload is shown in Figure 23. 3253 Request-Payload: 3254 { 3255 "client_id" : "keyfob", 3256 "client_secret" : "qwerty" 3257 } 3259 Response-Payload: 3260 { 3261 "access_token" : b64'VGVzdCB0b2tlbg==', 3262 "cnf" : { 3263 "COSE_Key" : { 3264 "kid" : b64'c29tZSBwdWJsaWMga2V5IGlk', 3265 "kty" : "oct", 3266 "alg" : "HS256", 3267 "k": b64'ZoRSOrFzN_FzUA5XKMYoVHyzff5oRJxl-IXRtztJ6uE' 3268 } 3269 } 3270 } 3272 Figure 23: Request and Response Payload for C offline 3274 The access token in this case is just an opaque byte string 3275 referencing the authorization information at the AS. 3277 C: Next, the client POSTs the access token to the authz-info 3278 endpoint in the RS. This is a plain CoAP request, i.e., no DTLS 3279 between client and RS. Since the token is an opaque string, the 3280 RS cannot verify it on its own, and thus defers to respond the 3281 client with a status code until after step E. 3282 D: The RS forwards the token to the introspection endpoint on the 3283 AS. Introspection assumes a secure connection between the AS and 3284 the RS, e.g., using transport of application layer security. In 3285 the example AS is identified using pre shared security context 3286 (psk, rpk or certificate) while RS is acting as client and is 3287 identified with client_id and client_secret. 3288 E: The AS provides the introspection response containing 3289 parameters about the token. This includes the confirmation key 3290 (cnf) parameter that allows the RS to verify the client's proof of 3291 possession in step F. 3292 After receiving message E, the RS responds to the client's POST in 3293 step C with the CoAP response code 2.01 (Created). 3295 Resource 3296 Client Server 3297 | | 3298 C: +-------->| Header: POST (T=CON, Code=0.02) 3299 | POST | Uri-Path:"authz-info" 3300 | | Payload: b64'VGVzdCB0b2tlbg==' 3301 | | 3302 | | Authorization 3303 | | Server 3304 | | | 3305 | D: +--------->| Header: POST (Code=0.02) 3306 | | POST | Uri-Path: "introspect" 3307 | | | Content-Format: "application/ace+cbor" 3308 | | | Payload: 3309 | | | 3310 | E: |<---------+ Header: 2.05 Content 3311 | | 2.05 | Content-Format: "application/ace+cbor" 3312 | | | Payload: 3313 | | | 3314 | | 3315 |<--------+ Header: 2.01 Created 3316 | 2.01 | 3317 | | 3319 Figure 24: Token Introspection for C offline 3320 The information contained in the Request-Payload and the Response- 3321 Payload is shown in Figure 25. 3323 Request-Payload: 3324 { 3325 "token" : b64'VGVzdCB0b2tlbg==', 3326 "client_id" : "FrontDoor", 3327 "client_secret" : "ytrewq" 3328 } 3330 Response-Payload: 3331 { 3332 "active" : true, 3333 "aud" : "lockOfDoor4711", 3334 "scope" : "open, close", 3335 "iat" : 1311280970, 3336 "cnf" : { 3337 "kid" : b64'c29tZSBwdWJsaWMga2V5IGlk' 3338 } 3339 } 3341 Figure 25: Request and Response Payload for Introspection 3343 The client uses the symmetric PoP key to establish a DTLS 3344 PreSharedKey secure connection to the RS. The CoAP request PUT is 3345 sent to the uri-path /state on the RS, changing the state of the 3346 door to locked. 3347 F: The RS responds with a appropriate over the secure DTLS 3348 channel. 3350 Resource 3351 Client Server 3352 | | 3353 |<=======>| DTLS Connection Establishment 3354 | | using Pre Shared Key 3355 | | 3356 +-------->| Header: PUT (Code=0.03) 3357 | PUT | Uri-Path: "state" 3358 | | Payload: 3359 | | 3360 F: |<--------+ Header: 2.04 Changed 3361 | 2.04 | Payload: 3362 | | 3364 Figure 26: Resource request and response protected by OSCORE 3366 Appendix F. Document Updates 3368 RFC EDITOR: PLEASE REMOVE THIS SECTION. 3370 F.1. Version -21 to 22 3372 o Provided section numbers in references to OAuth RFC. 3373 o Updated IANA mapping registries to only use "Private Use" and 3374 "Expert Review". 3375 o Made error messages optional for RS at token submission since it 3376 may not be able to send them depending on the profile. 3377 o Corrected errors in examples. 3379 F.2. Version -20 to 21 3381 o Added text about expiration of RS keys. 3383 F.3. Version -19 to 20 3385 o Replaced "req_aud" with "audience" from the OAuth token exchange 3386 draft. 3387 o Updated examples to remove unnecessary elements. 3389 F.4. Version -18 to -19 3391 o Added definition of "Authorization Information". 3392 o Explicitly state that ACE allows encoding refresh tokens in binary 3393 format in addition to strings. 3394 o Renamed "AS Information" to "AS Request Creation Hints" and added 3395 the possibility to specify req_aud and scope as hints. 3396 o Added the "kid" parameter to AS Request Creation Hints. 3397 o Added security considerations about the integrity protection of 3398 tokens with multi-RS audiences. 3399 o Renamed IANA registries mapping OAuth parameters to reflect the 3400 mapped registry. 3401 o Added JWT claim names to CWT claim registrations. 3402 o Added expert review instructions. 3403 o Updated references to TLS from 1.2 to 1.3. 3405 F.5. Version -17 to -18 3407 o Added OSCORE options in examples involving OSCORE. 3408 o Removed requirement for the client to send application/cwt, since 3409 the client has no way to know. 3410 o Clarified verification of tokens by the RS. 3411 o Added exi claim CWT registration. 3413 F.6. Version -16 to -17 3415 o Added references to (D)TLS 1.3. 3416 o Added requirement that responses are bound to requests. 3417 o Specify that grant_type is OPTIONAL in C2AS requests (as opposed 3418 to REQUIRED in OAuth). 3419 o Replaced examples with hypothetical COSE profile with OSCORE. 3420 o Added requirement for content type application/ace+cbor in error 3421 responses for token and introspection requests and responses. 3422 o Reworked abbreviation space for claims, request and response 3423 parameters. 3424 o Added text that the RS may indicate that it is busy at the authz- 3425 info resource. 3426 o Added section that specifies how the RS verifies an access token. 3427 o Added section on the protection of the authz-info endpoint. 3428 o Removed the expiration mechanism based on sequence numbers. 3429 o Added reference to RFC7662 security considerations. 3430 o Added considerations on minimal security requirements for 3431 communication. 3432 o Added security considerations on unprotected information sent to 3433 authz-info and in the error responses. 3435 F.7. Version -15 to -16 3437 o Added text the RS using RFC6750 error codes. 3438 o Defined an error code for incompatible token request parameters. 3439 o Removed references to the actors draft. 3440 o Fixed errors in examples. 3442 F.8. Version -14 to -15 3444 o Added text about refresh tokens. 3445 o Added text about protection of credentials. 3446 o Rephrased introspection so that other entities than RS can do it. 3447 o Editorial improvements. 3449 F.9. Version -13 to -14 3451 o Split out the 'aud', 'cnf' and 'rs_cnf' parameters to 3452 [I-D.ietf-ace-oauth-params] 3453 o Introduced the "application/ace+cbor" Content-Type. 3454 o Added claim registrations from 'profile' and 'rs_cnf'. 3455 o Added note on schema part of AS Information Section 5.1.2 3456 o Realigned the parameter abbreviations to push rarely used ones to 3457 the 2-byte encoding size of CBOR integers. 3459 F.10. Version -12 to -13 3461 o Changed "Resource Information" to "Access Information" to avoid 3462 confusion. 3463 o Clarified section about AS discovery. 3464 o Editorial changes 3466 F.11. Version -11 to -12 3468 o Moved the Request error handling to a section of its own. 3469 o Require the use of the abbreviation for profile identifiers. 3470 o Added rs_cnf parameter in the introspection response, to inform 3471 RS' with several RPKs on which key to use. 3472 o Allowed use of rs_cnf as claim in the access token in order to 3473 inform an RS with several RPKs on which key to use. 3474 o Clarified that profiles must specify if/how error responses are 3475 protected. 3476 o Fixed label number range to align with COSE/CWT. 3477 o Clarified the requirements language in order to allow profiles to 3478 specify other payload formats than CBOR if they do not use CoAP. 3480 F.12. Version -10 to -11 3482 o Fixed some CBOR data type errors. 3483 o Updated boilerplate text 3485 F.13. Version -09 to -10 3487 o Removed CBOR major type numbers. 3488 o Removed the client token design. 3489 o Rephrased to clarify that other protocols than CoAP can be used. 3490 o Clarifications regarding the use of HTTP 3492 F.14. Version -08 to -09 3494 o Allowed scope to be byte strings. 3495 o Defined default names for endpoints. 3496 o Refactored the IANA section for briefness and consistency. 3497 o Refactored tables that define IANA registry contents for 3498 consistency. 3499 o Created IANA registry for CBOR mappings of error codes, grant 3500 types and Authorization Server Information. 3501 o Added references to other document sections defining IANA entries 3502 in the IANA section. 3504 F.15. Version -07 to -08 3506 o Moved AS discovery from the DTLS profile to the framework, see 3507 Section 5.1. 3508 o Made the use of CBOR mandatory. If you use JSON you can use 3509 vanilla OAuth. 3510 o Made it mandatory for profiles to specify C-AS security and RS-AS 3511 security (the latter only if introspection is supported). 3512 o Made the use of CBOR abbreviations mandatory. 3513 o Added text to clarify the use of token references as an 3514 alternative to CWTs. 3515 o Added text to clarify that introspection must not be delayed, in 3516 case the RS has to return a client token. 3517 o Added security considerations about leakage through unprotected AS 3518 discovery information, combining profiles and leakage through 3519 error responses. 3520 o Added privacy considerations about leakage through unprotected AS 3521 discovery. 3522 o Added text that clarifies that introspection is optional. 3523 o Made profile parameter optional since it can be implicit. 3524 o Clarified that CoAP is not mandatory and other protocols can be 3525 used. 3526 o Clarified the design justification for specific features of the 3527 framework in appendix A. 3529 o Clarified appendix E.2. 3530 o Removed specification of the "cnf" claim for CBOR/COSE, and 3531 replaced with references to [I-D.ietf-ace-cwt-proof-of-possession] 3533 F.16. Version -06 to -07 3535 o Various clarifications added. 3536 o Fixed erroneous author email. 3538 F.17. Version -05 to -06 3540 o Moved sections that define the ACE framework into a subsection of 3541 the framework Section 5. 3542 o Split section on client credentials and grant into two separate 3543 sections, Section 5.2, and Section 5.3. 3544 o Added Section 5.4 on AS authentication. 3545 o Added Section 5.5 on the Authorization endpoint. 3547 F.18. Version -04 to -05 3549 o Added RFC 2119 language to the specification of the required 3550 behavior of profile specifications. 3551 o Added Section 5.3 on the relation to the OAuth2 grant types. 3552 o Added CBOR abbreviations for error and the error codes defined in 3553 OAuth2. 3554 o Added clarification about token expiration and long-running 3555 requests in Section 5.8.3 3556 o Added security considerations about tokens with symmetric pop keys 3557 valid for more than one RS. 3558 o Added privacy considerations section. 3559 o Added IANA registry mapping the confirmation types from RFC 7800 3560 to equivalent COSE types. 3561 o Added appendix D, describing assumptions about what the AS knows 3562 about the client and the RS. 3564 F.19. Version -03 to -04 3566 o Added a description of the terms "framework" and "profiles" as 3567 used in this document. 3568 o Clarified protection of access tokens in section 3.1. 3569 o Clarified uses of the "cnf" parameter in section 6.4.5. 3570 o Clarified intended use of Client Token in section 7.4. 3572 F.20. Version -02 to -03 3574 o Removed references to draft-ietf-oauth-pop-key-distribution since 3575 the status of this draft is unclear. 3577 o Copied and adapted security considerations from draft-ietf-oauth- 3578 pop-key-distribution. 3579 o Renamed "client information" to "RS information" since it is 3580 information about the RS. 3581 o Clarified the requirements on profiles of this framework. 3582 o Clarified the token endpoint protocol and removed negotiation of 3583 "profile" and "alg" (section 6). 3584 o Renumbered the abbreviations for claims and parameters to get a 3585 consistent numbering across different endpoints. 3586 o Clarified the introspection endpoint. 3587 o Renamed token, introspection and authz-info to "endpoint" instead 3588 of "resource" to mirror the OAuth 2.0 terminology. 3589 o Updated the examples in the appendices. 3591 F.21. Version -01 to -02 3593 o Restructured to remove communication security parts. These shall 3594 now be defined in profiles. 3595 o Restructured section 5 to create new sections on the OAuth 3596 endpoints token, introspection and authz-info. 3597 o Pulled in material from draft-ietf-oauth-pop-key-distribution in 3598 order to define proof-of-possession key distribution. 3599 o Introduced the "cnf" parameter as defined in RFC7800 to reference 3600 or transport keys used for proof of possession. 3601 o Introduced the "client-token" to transport client information from 3602 the AS to the client via the RS in conjunction with introspection. 3603 o Expanded the IANA section to define parameters for token request, 3604 introspection and CWT claims. 3605 o Moved deployment scenarios to the appendix as examples. 3607 F.22. Version -00 to -01 3609 o Changed 5.1. from "Communication Security Protocol" to "Client 3610 Information". 3611 o Major rewrite of 5.1 to clarify the information exchanged between 3612 C and AS in the PoP access token request profile for IoT. 3614 * Allow the client to indicate preferences for the communication 3615 security protocol. 3616 * Defined the term "Client Information" for the additional 3617 information returned to the client in addition to the access 3618 token. 3619 * Require that the messages between AS and client are secured, 3620 either with (D)TLS or with COSE_Encrypted wrappers. 3621 * Removed dependency on OSCOAP and added generic text about 3622 object security instead. 3623 * Defined the "rpk" parameter in the client information to 3624 transmit the raw public key of the RS from AS to client. 3626 * (D)TLS MUST use the PoP key in the handshake (either as PSK or 3627 as client RPK with client authentication). 3628 * Defined the use of x5c, x5t and x5tS256 parameters when a 3629 client certificate is used for proof of possession. 3630 * Defined "tktn" parameter for signaling for how to transfer the 3631 access token. 3632 o Added 5.2. the CoAP Access-Token option for transferring access 3633 tokens in messages that do not have payload. 3634 o 5.3.2. Defined success and error responses from the RS when 3635 receiving an access token. 3636 o 5.6.:Added section giving guidance on how to handle token 3637 expiration in the absence of reliable time. 3638 o Appendix B Added list of roles and responsibilities for C, AS and 3639 RS. 3641 Authors' Addresses 3643 Ludwig Seitz 3644 RISE 3645 Scheelevaegen 17 3646 Lund 223 70 3647 Sweden 3649 Email: ludwig.seitz@ri.se 3651 Goeran Selander 3652 Ericsson 3653 Faroegatan 6 3654 Kista 164 80 3655 Sweden 3657 Email: goran.selander@ericsson.com 3659 Erik Wahlstroem 3660 Sweden 3662 Email: erik@wahlstromstekniska.se 3664 Samuel Erdtman 3665 Spotify AB 3666 Birger Jarlsgatan 61, 4tr 3667 Stockholm 113 56 3668 Sweden 3670 Email: erdtman@spotify.com 3671 Hannes Tschofenig 3672 Arm Ltd. 3673 Absam 6067 3674 Austria 3676 Email: Hannes.Tschofenig@arm.com