idnits 2.17.1 draft-ietf-ace-oauth-authz-03.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 seems to use 'NOT RECOMMENDED' as an RFC 2119 keyword, but does not include the phrase in its RFC 2119 key words list. -- The document date (October 12, 2016) is 2752 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: A later version (-15) exists of draft-ietf-ace-cbor-web-token-01 == Outdated reference: A later version (-24) exists of draft-ietf-cose-msg-19 ** Obsolete normative reference: RFC 6347 (Obsoleted by RFC 9147) == Outdated reference: A later version (-07) exists of draft-ietf-ace-actors-04 == Outdated reference: A later version (-15) exists of draft-ietf-oauth-device-flow-03 == Outdated reference: A later version (-12) exists of draft-ietf-oauth-native-apps-03 == Outdated reference: A later version (-06) exists of draft-selander-ace-object-security-05 -- Obsolete informational reference (is this intentional?): RFC 5246 (Obsoleted by RFC 8446) -- Obsolete informational reference (is this intentional?): RFC 7049 (Obsoleted by RFC 8949) -- Obsolete informational reference (is this intentional?): RFC 7159 (Obsoleted by RFC 8259) -- Obsolete informational reference (is this intentional?): RFC 7231 (Obsoleted by RFC 9110) Summary: 1 error (**), 0 flaws (~~), 8 warnings (==), 5 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 ACE Working Group L. Seitz 3 Internet-Draft SICS 4 Intended status: Standards Track G. Selander 5 Expires: April 15, 2017 Ericsson 6 E. Wahlstroem 8 S. Erdtman 9 Spotify AB 10 H. Tschofenig 11 ARM Ltd. 12 October 12, 2016 14 Authentication and Authorization for Constrained Environments (ACE) 15 draft-ietf-ace-oauth-authz-03 17 Abstract 19 This specification defines a framework for authentication and 20 authorization in Internet of Things (IoT) environments. The 21 framework is based on a set of building blocks including OAuth 2.0 22 and CoAP, thus making a well-known and widely used authorization 23 solution suitable for IoT devices. Existing specifications are used 24 where possible, but where the constraints of IoT devices require it, 25 extensions are added and profiles are defined. 27 Status of This Memo 29 This Internet-Draft is submitted in full conformance with the 30 provisions of BCP 78 and BCP 79. 32 Internet-Drafts are working documents of the Internet Engineering 33 Task Force (IETF). Note that other groups may also distribute 34 working documents as Internet-Drafts. The list of current Internet- 35 Drafts is at http://datatracker.ietf.org/drafts/current/. 37 Internet-Drafts are draft documents valid for a maximum of six months 38 and may be updated, replaced, or obsoleted by other documents at any 39 time. It is inappropriate to use Internet-Drafts as reference 40 material or to cite them other than as "work in progress." 42 This Internet-Draft will expire on April 15, 2017. 44 Copyright Notice 46 Copyright (c) 2016 IETF Trust and the persons identified as the 47 document authors. All rights reserved. 49 This document is subject to BCP 78 and the IETF Trust's Legal 50 Provisions Relating to IETF Documents 51 (http://trustee.ietf.org/license-info) in effect on the date of 52 publication of this document. Please review these documents 53 carefully, as they describe your rights and restrictions with respect 54 to this document. Code Components extracted from this document must 55 include Simplified BSD License text as described in Section 4.e of 56 the Trust Legal Provisions and are provided without warranty as 57 described in the Simplified BSD License. 59 Table of Contents 61 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 62 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 63 3. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 5 64 3.1. OAuth 2.0 . . . . . . . . . . . . . . . . . . . . . . . . 6 65 3.2. CoAP . . . . . . . . . . . . . . . . . . . . . . . . . . 8 66 4. Protocol Interactions . . . . . . . . . . . . . . . . . . . . 9 67 5. Framework . . . . . . . . . . . . . . . . . . . . . . . . . . 13 68 6. The 'Token' Endpoint . . . . . . . . . . . . . . . . . . . . 14 69 6.1. Client-to-AS Request . . . . . . . . . . . . . . . . . . 14 70 6.2. AS-to-Client Response . . . . . . . . . . . . . . . . . . 17 71 6.3. Error Response . . . . . . . . . . . . . . . . . . . . . 18 72 6.4. New Request and Response Parameters . . . . . . . . . . . 18 73 6.4.1. Audience . . . . . . . . . . . . . . . . . . . . . . 18 74 6.4.2. Grant Type . . . . . . . . . . . . . . . . . . . . . 19 75 6.4.3. Token Type . . . . . . . . . . . . . . . . . . . . . 19 76 6.4.4. Profile . . . . . . . . . . . . . . . . . . . . . . . 19 77 6.4.5. Confirmation . . . . . . . . . . . . . . . . . . . . 20 78 6.5. Mapping parameters to CBOR . . . . . . . . . . . . . . . 21 79 7. The 'Introspect' Endpoint . . . . . . . . . . . . . . . . . . 22 80 7.1. RS-to-AS Request . . . . . . . . . . . . . . . . . . . . 23 81 7.2. AS-to-RS Response . . . . . . . . . . . . . . . . . . . . 23 82 7.3. Error Response . . . . . . . . . . . . . . . . . . . . . 24 83 7.4. Client Token . . . . . . . . . . . . . . . . . . . . . . 25 84 7.5. Mapping Introspection parameters to CBOR . . . . . . . . 26 85 8. The Access Token . . . . . . . . . . . . . . . . . . . . . . 27 86 8.1. The 'Authorization Information' Endpoint . . . . . . . . 28 87 8.2. Token Expiration . . . . . . . . . . . . . . . . . . . . 28 88 9. Security Considerations . . . . . . . . . . . . . . . . . . . 29 89 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 30 90 10.1. OAuth Introspection Response Parameter Registration . . 30 91 10.2. OAuth Parameter Registration . . . . . . . . . . . . . . 31 92 10.3. OAuth Access Token Types . . . . . . . . . . . . . . . . 31 93 10.4. Token Type Mappings . . . . . . . . . . . . . . . . . . 32 94 10.4.1. Registration Template . . . . . . . . . . . . . . . 32 95 10.4.2. Initial Registry Contents . . . . . . . . . . . . . 32 96 10.5. CBOR Web Token Claims . . . . . . . . . . . . . . . . . 32 97 10.6. ACE Profile Registry . . . . . . . . . . . . . . . . . . 33 98 10.6.1. Registration Template . . . . . . . . . . . . . . . 33 99 10.7. OAuth Parameter Mappings Registry . . . . . . . . . . . 33 100 10.7.1. Registration Template . . . . . . . . . . . . . . . 33 101 10.7.2. Initial Registry Contents . . . . . . . . . . . . . 34 102 10.8. Introspection Endpoint CBOR Mappings Registry . . . . . 36 103 10.8.1. Registration Template . . . . . . . . . . . . . . . 36 104 10.8.2. Initial Registry Contents . . . . . . . . . . . . . 36 105 10.9. CoAP Option Number Registration . . . . . . . . . . . . 38 106 11. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 39 107 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 39 108 12.1. Normative References . . . . . . . . . . . . . . . . . . 39 109 12.2. Informative References . . . . . . . . . . . . . . . . . 40 110 Appendix A. Design Justification . . . . . . . . . . . . . . . . 42 111 Appendix B. Roles and Responsibilites . . . . . . . . . . . . . 44 112 Appendix C. Requirements on Profiles . . . . . . . . . . . . . . 46 113 Appendix D. Deployment Examples . . . . . . . . . . . . . . . . 46 114 D.1. Local Token Validation . . . . . . . . . . . . . . . . . 47 115 D.2. Introspection Aided Token Validation . . . . . . . . . . 50 116 Appendix E. Document Updates . . . . . . . . . . . . . . . . . . 54 117 E.1. Version -02 to -03 . . . . . . . . . . . . . . . . . . . 54 118 E.2. Version -01 to -02 . . . . . . . . . . . . . . . . . . . 54 119 E.3. Version -00 to -01 . . . . . . . . . . . . . . . . . . . 55 120 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 56 122 1. Introduction 124 Authorization is the process for granting approval to an entity to 125 access a resource [RFC4949]. The authorization task itself can best 126 be described as granting access to a requesting client, for a 127 resource hosted on a device, the resource server (RS). This exchange 128 is mediated by one or multiple authorization servers (AS). Managing 129 authorization for a large number of devices and users is a complex 130 task. 132 While prior work on authorization solutions for the Web and for the 133 mobile environment also applies to the IoT environment many IoT 134 devices are constrained, for example in terms of processing 135 capabilities, available memory, etc. For web applications on 136 constrained nodes this specification makes use of CoAP [RFC7252]. 138 A detailed treatment of constraints can be found in [RFC7228], and 139 the different IoT deployments present a continuous range of device 140 and network capabilities. Taking energy consumption as an example: 141 At one end there are energy-harvesting or battery powered devices 142 which have a tight power budget, on the other end there are mains- 143 powered devices, and all levels in between. 145 Hence, IoT devices may be very different in terms of available 146 processing and message exchange capabilities and there is a need to 147 support many different authorization use cases [RFC7744]. 149 This specification describes a framework for authentication and 150 authorization in constrained environments (ACE) built on re-use of 151 OAuth 2.0 [RFC6749], thereby extending authorization to Internet of 152 Things devices. This specification contains the necessary building 153 blocks for adjusting OAuth 2.0 to IoT environments. 155 More detailed, interoperable specifications can be found in profiles. 156 Implementations may claim conformance with a specific profile, 157 whereby implementations utilizing the same profile interoperate while 158 implementations of different profiles are not expected to be 159 interoperable. Some devices, such as mobile phones and tablets, may 160 implement multiple profiles and will therefore be able to interact 161 with a wider range of low end devices. 163 2. Terminology 165 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 166 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 167 document are to be interpreted as described in [RFC2119]. 169 Certain security-related terms such as "authentication", 170 "authorization", "confidentiality", "(data) integrity", "message 171 authentication code", and "verify" are taken from [RFC4949]. 173 Since we describe exchanges as RESTful protocol interactions HTTP 174 [RFC7231] offers useful terminology. 176 Terminology for entities in the architecture is defined in OAuth 2.0 177 [RFC6749] and [I-D.ietf-ace-actors], such as client (C), resource 178 server (RS), and authorization server (AS). 180 Note that the term "endpoint" is used here following its OAuth 181 definition, which is to denote resources such as /token and 182 /introspect at the AS and /authz-info at the RS. The CoAP [RFC7252] 183 definition, which is "An entity participating in the CoAP protocol" 184 is not used in this memo. 186 Since this specification focuses on the problem of access control to 187 resources, we simplify the actors by assuming that the client 188 authorization server (CAS) functionality is not stand-alone but 189 subsumed by either the authorization server or the client (see 190 section 2.2 in [I-D.ietf-ace-actors]). 192 3. Overview 194 This specification defines the ACE framework for authorization in the 195 Internet of Things environment. It consists of a set of building 196 blocks. 198 The basic block is the OAuth 2.0 [RFC6749] framework, which enjoys 199 widespread deployment. Many IoT devices can support OAuth 2.0 200 without any additional extensions, but for certain constrained 201 settings additional profiling is needed. 203 Another building block is the lightweight web transfer protocol CoAP 204 [RFC7252] for those communication environments where HTTP is not 205 appropriate. CoAP typically runs on top of UDP which further reduces 206 overhead and message exchanges. While this specification defines 207 extensions for the use of OAuth over CoAP, we do envision further 208 underlying protocols to be supported in the future, such as HTTP/2, 209 MQTT and QUIC. 211 A third building block is CBOR [RFC7049] for encodings where JSON 212 [RFC7159] is not sufficiently compact. CBOR is a binary encoding 213 designed for small code and message size, which may be used for 214 encoding of self contained tokens, and also for encoding CoAP POST 215 parameters and CoAP responses. 217 A fourth building block is the compact CBOR-based secure message 218 format COSE [I-D.ietf-cose-msg], which enables application layer 219 security as an alternative or complement to transport layer security 220 (DTLS [RFC6347] or TLS [RFC5246]). COSE is used to secure self 221 contained tokens such as proof-of-possession (PoP) tokens, which is 222 an extension to the OAuth access tokens, and "client tokens" which 223 are defined in this framework (see Section 7.4). The default access 224 token format is defined in CBOR web token (CWT) 225 [I-D.ietf-ace-cbor-web-token]. Application layer security for CoAP 226 using COSE can be provided with OSCOAP 227 [I-D.selander-ace-object-security]. 229 With the building blocks listed above, solutions satisfying various 230 IoT device and network constraints are possible. A list of 231 constraints is described in detail in RFC 7228 [RFC7228] and a 232 description of how the building blocks mentioned above relate to the 233 various constraints can be found in Appendix A. 235 Luckily, not every IoT device suffers from all constraints. The ACE 236 framework nevertheless takes all these aspects into account and 237 allows several different deployment variants to co-exist rather than 238 mandating a one-size-fits-all solution. We believe this is important 239 to cover the wide range of possible interworking use cases and the 240 different requirements from a security point of view. Once IoT 241 deployments mature, popular deployment variants will be documented in 242 form of ACE profiles. 244 In the subsections below we provide further details about the 245 different building blocks. 247 3.1. OAuth 2.0 249 The OAuth 2.0 authorization framework enables a client to obtain 250 limited access to a resource with the permission of a resource owner. 251 Authorization information, or references to it, is passed between the 252 nodes using access tokens. These access tokens are issued to clients 253 by an authorization server with the approval of the resource owner. 254 The client uses the access token to access the protected resources 255 hosted by the resource server. 257 A number of OAuth 2.0 terms are used within this specification: 259 The token and introspect Endpoints: 261 The AS hosts the /token endpoint that allows a client to request 262 access tokens. The client makes a POST request to the /token 263 endpoint on the AS and receives the access token in the response 264 (if the request was successful). 266 The token introspection endpoint, /introspect, is used by the RS 267 when requesting additional information regarding a received access 268 token. The RS makes a POST request to /introspect on the AS and 269 receives information about the access token contain in the 270 response. (See "Introspection" below.) 272 Access Tokens: 274 Access tokens are credentials needed to access protected 275 resources. An access token is a data structure representing 276 authorization permissions issued by the AS to the client. Access 277 tokens are generated by the authorization server and consumed by 278 the resource server. The access token content is opaque to the 279 client. 281 Access tokens can have different formats, and various methods of 282 utilization (e.g., cryptographic properties) based on the security 283 requirements of the given deployment. 285 Proof of Possession Tokens: 287 An access token may be bound to a cryptographic key, which is then 288 used by an RS to authenticate requests from a client. Such tokens 289 are called proof-of-possession tokens (or PoP tokens). 291 The proof-of-possession (PoP) security concept assumes that the AS 292 acts as a trusted third party that binds keys to access tokens. 293 These so called PoP keys are then used by the client to 294 demonstrate the possession of the secret to the RS when accessing 295 the resource. The RS, when receiving an access token, needs to 296 verify that the key used by the client matches the one bound to 297 the access token. When this specification uses the term "access 298 token" it is assumed to be a PoP token unless specifically stated 299 otherwise. 301 The key bound to the access token (aka PoP key) may be based on 302 symmetric as well as on asymmetric cryptography. The appropriate 303 choice of security depends on the constraints of the IoT devices 304 as well as on the security requirements of the use case. 306 Symmetric PoP key: The AS generates a random symmetric PoP key. 307 The key is either stored to be returned on introspection calls 308 or encrypted and included in the access token. The PoP key is 309 also encrypted for the client and sent together with the access 310 token to the client. 312 Asymmetric PoP key: An asymmetric key pair is generated on the 313 client and the public key is sent to the AS (if it does not 314 already have knowledge of the client's public key). 315 Information about the public key, which is the PoP key in this 316 case, is either stored to be returned on introspection calls or 317 included inside the access token and sent back to the 318 requesting client. The RS can identify the client's public key 319 from the information in the token, which allows the client to 320 use the corresponding private key for the proof of possession. 322 The access token is protected against modifications using a MAC or 323 a digital signature, which is added by the AS. The choice of PoP 324 key does not necessarily imply a specific credential type for the 325 integrity protection of the token. 327 Scopes and Permissions: 329 In OAuth 2.0, the client specifies the type of permissions it is 330 seeking to obtain (via the scope parameter) in the access token 331 request. In turn, the AS may use the scope response parameter to 332 inform the client of the scope of the access token issued. As the 333 client could be a constrained device as well, this specification 334 uses CBOR encoded messages for CoAP, defined in Section 5, to 335 request scopes and to be informed what scopes the access token was 336 actually authorized for by the AS. 338 The values of the scope parameter are expressed as a list of 339 space- delimited, case-sensitive strings, with a semantic that is 340 well-known to the AS and the RS. More details about the concept 341 of scopes is found under Section 3.3 in [RFC6749]. 343 Claims: 345 Information carried in the access token or returned from 346 introspection, called claims, is in the form of type-value pairs. 347 An access token may, for example, include a claim identifying the 348 AS that issued the token (via the "iss" claim) and what audience 349 the access token is intended for (via the "aud" claim). The 350 audience of an access token can be a specific resource or one or 351 many resource servers. The resource owner policies influence what 352 claims are put into the access token by the authorization server. 354 While the structure and encoding of the access token varies 355 throughout deployments, a standardized format has been defined 356 with the JSON Web Token (JWT) [RFC7519] where claims are encoded 357 as a JSON object. In [I-D.ietf-ace-cbor-web-token] an equivalent 358 format using CBOR encoding (CWT) has been defined. 360 Introspection: 362 Introspection is a method for a resource server to query the 363 authorization server for the active state and content of a 364 received access token. This is particularly useful in those cases 365 where the authorization decisions are very dynamic and/or where 366 the received access token itself is a reference rather than a 367 self-contained token. More information about introspection in 368 OAuth 2.0 can be found in [RFC7662]. 370 3.2. CoAP 372 CoAP is an application layer protocol similar to HTTP, but 373 specifically designed for constrained environments. CoAP typically 374 uses datagram-oriented transport, such as UDP, where reordering and 375 loss of packets can occur. A security solution need to take the 376 latter aspects into account. 378 While HTTP uses headers and query-strings to convey additional 379 information about a request, CoAP encodes such information in so- 380 called 'options'. 382 CoAP supports application-layer fragmentation of the CoAP payloads 383 through blockwise transfers [RFC7959]. However, block-wise transfer 384 does not increase the size limits of CoAP options, therefore data 385 encoded in options has to be kept small. 387 Transport layer security for CoAP can be provided by DTLS 1.2 388 [RFC6347] or TLS 1.2 [RFC5246]. CoAP defines a number of proxy 389 operations which requires transport layer security to be terminated 390 at the proxy. One approach for protecting CoAP communication end-to- 391 end through proxies, and also to support security for CoAP over 392 different transport in a uniform way, is to provide security on 393 application layer using an object-based security mechanism such as 394 COSE [I-D.ietf-cose-msg]. 396 One application of COSE is OSCOAP [I-D.selander-ace-object-security], 397 which provides end-to-end confidentiality, integrity and replay 398 protection, and a secure binding between CoAP request and response 399 messages. In OSCOAP, the CoAP messages are wrapped in COSE objects 400 and sent using CoAP. 402 4. Protocol Interactions 404 The ACE framework is based on the OAuth 2.0 protocol interactions 405 using the /token and /introspect endpoints. A client obtains an 406 access token from an AS using the /token endpoint and subsequently 407 presents the access token to a RS to gain access to a protected 408 resource. The RS, after receiving an access token, may present it to 409 the AS via the /introspect endpoint to get information about the 410 access token. In other deployments the RS may process the access 411 token locally without the need to contact an AS. These interactions 412 are shown in Figure 1. An overview of various OAuth concepts is 413 provided in Section 3.1. 415 The OAuth 2.0 framework defines a number of "protocol flows" via 416 grant types, which have been extended further with extensions to 417 OAuth 2.0 (such as RFC 7521 [RFC7521] and 418 [I-D.ietf-oauth-device-flow]). What grant types works best depends 419 on the usage scenario and RFC 7744 [RFC7744] describes many different 420 IoT use cases but there two preferred grant types, namely the 421 Authorization Code Grant (described in Section 4.1 of RFC 7521) and 422 the Client Credentials Grant (described in Section 4.4 of RFC 7521). 423 The Authorization Code Grant is a good fit for use with apps running 424 on smart phones and tablets that request access to IoT devices, a 425 common scenario in the smart home environment, where users need to go 426 through an authentication and authorization phase (at least during 427 the initial setup phase). The native apps guidelines described in 428 [I-D.ietf-oauth-native-apps] are applicable to this use case. The 429 Client Credential Grant is a good fit for use with IoT devices where 430 the OAuth client itself is constraint. In such a case the resource 431 owner or another person on his or her behalf have arranged with the 432 authorization server out-of-band, which is often accomplished using 433 an commissioning tool. 435 The consent of the resource owner, for giving a client access to a 436 protected resource, can be provided dynamically as in the traditional 437 OAuth flows, or it could be pre-configured by the resource owner as 438 authorization policies at the AS, which the AS evaluates when a token 439 request arrives. The resource owner and the requesting party (i.e. 440 client owner) are not shown in Figure 1. 442 This framework supports a wide variety of communication security 443 mechanisms between the ACE entities, such as client, AS, and RS. We 444 assume that the client has been registered (also called enrolled or 445 onboarded) to an AS using a mechanism defined outside the scope of 446 this document. In practice, various techniques for onboarding have 447 been used, such as factory-based provisioning or the use of 448 commissioning tools. Regardless of the onboarding technique, this 449 registration procedure implies that the client and the AS share 450 credentials, and configuration parameters. These credentials are 451 used to mutually authenticate each other and to protect messages 452 exchanged between the client and the AS. 454 It is also assumed that the RS has been registered with the AS, 455 potentially in a similar way as the client has been registered with 456 the AS. Established keying material between the AS and the RS allows 457 the AS to apply cryptographic protection to the access token to 458 ensure that its content cannot be modified, and if needed, that the 459 content is confidentiality protected. 461 The keying material necessary for establishing communication security 462 between C and RS is dynamically established as part of the protocol 463 described in this document. 465 At the start of the protocol there is an optional discovery step 466 where the client discovers the resource server and the resources this 467 server hosts. In this step the client might also determine what 468 permissions are needed to access the protected resource. The 469 detailed procedures for this discovery process may be defined in an 470 ACE profile and depend on the protocols being used and the specific 471 deployment environment. 473 In Bluetooth Low Energy, for example, advertisements are broadcasted 474 by a peripheral, including information about the primary services. 475 In CoAP, as a second example, a client can make a request to "/.well- 476 known/core" to obtain information about available resources, which 477 are returned in a standardized format as described in [RFC6690]. 479 +--------+ +---------------+ 480 | |---(A)-- Token Request ------->| | 481 | | | Authorization | 482 | |<--(B)-- Access Token ---------| Server | 483 | | + RS Information | | 484 | | +---------------+ 485 | | ^ | 486 | | Introspection Request (D)| | 487 | Client | | | 488 | | Response + Client Token | |(E) 489 | | | v 490 | | +--------------+ 491 | |---(C)-- Token + Request ----->| | 492 | | | Resource | 493 | |<--(F)-- Protected Resource ---| Server | 494 | | | | 495 +--------+ +--------------+ 497 Figure 1: Basic Protocol Flow. 499 Requesting an Access Token (A): 501 The client makes an access token request to the /token endpoint at 502 the AS. This framework assumes the use of PoP tokens (see 503 Section 3.1 for a short description) wherein the AS binds a key to 504 an access token. The client may include permissions it seeks to 505 obtain, and information about the credentials it wants to use 506 (e.g., symmetric/asymmetric cryptography or a reference to a 507 specific credential). 509 Access Token Response (B): 511 If the AS successfully processes the request from the client, it 512 returns an access token. It also returns various parameters, 513 referred as "RS Information". In addition to the response 514 parameters defined by OAuth 2.0 and the PoP token extension, 515 further response parameters, such as information on which profile 516 the client should use with the resource server(s). More 517 information about these parameters can be found in in Section 6.4. 519 Resource Request (C): 521 The client interacts with the RS to request access to the 522 protected resource and provides the access token. The protocol to 523 use between the client and the RS is not restricted to CoAP. 524 HTTP, HTTP/2, QUIC, MQTT, Bluetooth Low Energy, etc., are also 525 viable candidates. 527 Depending on the device limitations and the selected protocol this 528 exchange may be split up into two parts: 530 (1) the client sends the access token containing, or 531 referencing, the authorization information to the RS, that may 532 be used for subsequent resource requests by the client, and 533 (2) the client makes the resource access request, using the 534 communication security protocol and other RS Information 535 obtained from the AS. 537 The Client and the RS mutually authenticate using the security 538 protocol specified in the profile (see step B) and the keys 539 obtained in the access token or the RS Information or the client 540 token. The RS verifies that the token is integrity protected by 541 the AS and compares the claims contained in the access token with 542 the resource request. If the RS is online, validation can be 543 handed over to the AS using token introspection (see messages D 544 and E) over HTTP or CoAP, in which case the different parts of 545 step C may be interleaved with introspection. 547 Token Introspection Request (D): 549 A resource server may be configured to introspect the access token 550 by including it in a request to the /introspect endpoint at that 551 AS. Token introspection over CoAP is defined in Section 7 and for 552 HTTP in [RFC7662]. 554 Note that token introspection is an optional step and can be 555 omitted if the token is self-contained and the resource server is 556 prepared to perform the token validation on its own. 558 Token Introspection Response (E): 560 The AS validates the token and returns the most recent parameters, 561 such as scope, audience, validity etc. associated with it back to 562 the RS. The RS then uses the received parameters to process the 563 request to either accept or to deny it. The AS can additionally 564 return information that the RS needs to pass on to the client in 565 the form of a client token. The latter is used to establish keys 566 for mutual authentication between client and RS, when the client 567 has no direct connectivity to the AS. 569 Protected Resource (F): 571 If the request from the client is authorized, the RS fulfills the 572 request and returns a response with the appropriate response code. 573 The RS uses the dynamically established keys to protect the 574 response, according to used communication security protocol. 576 5. Framework 578 The following sections detail the profiling and extensions of OAuth 579 2.0 for constrained environments which constitutes the ACE framework. 581 Credential Provisioning 583 For IoT we cannot generally assume that the client and RS are part 584 of a common key infrastructure, so the AS provisions credentials 585 or associated information to allow mutual authentication. These 586 credentials need to be provided to the parties before or during 587 the authentication protocol is executed, and may be re-used for 588 subsequent token requests. 590 Proof-of-Possession 592 The ACE framework by default implements proof-of-possession for 593 access tokens, i.e. that the token holder can prove being a holder 594 of the key bound to the token. The binding is provided by the 595 "cnf" claim indicating what key is used for mutual authentication. 596 If clients need to update a token, e.g. to get additional rights, 597 they can request that the AS binds the new access token to the 598 same credential as the previous token. 600 ACE Profiles 602 The client or RS may be limited in the encodings or protocols it 603 supports. To support a variety of different deployment settings, 604 specific interactions between client and RS are defined in an ACE 605 profile. In ACE framework the AS is expected to manage the 606 matching of compatible profile choices between a client and an RS. 607 The AS informs the client of the selected profile using the 608 "profile" parameter in the token request and token response. 610 OAuth 2.0 requires the use of TLS both to protect the communication 611 between AS and client when requesting an access token; between client 612 and RS when accessing a resource and between AS and RS for 613 introspection. In constrained settings TLS is not always feasible, 614 or desirable. Nevertheless it is REQUIRED that the data exchanged 615 with the AS is encrypted and integrity protected. It is furthermore 616 REQUIRED that the AS and the endpoint communicating with it (client 617 or RS) perform mutual authentication. 619 Profiles are expected to specify the details of how this is done, 620 depending e.g. on the communication protocol and the credentials used 621 by the client or the RS. 623 In OAuth 2.0 the communication with the Token and the Introspection 624 endpoints at the AS is assumed to be via HTTP and may use Uri-query 625 parameters. This framework RECOMMENDS to use CoAP instead and 626 RECOMMENDS the use of the following alternative instead of Uri-query 627 parameters: The sender (client or RS) encodes the parameters of its 628 request as a CBOR map and submits that map as the payload of the POST 629 request. The Content-format depends on the security applied to the 630 content and must be specified by the corresponding profile. 632 The OAuth 2.0 AS uses a JSON structure in the payload of its 633 responses both to client and RS. This framework RECOMMENDS the use 634 of CBOR [RFC7049] instead. The requesting device can explicitly 635 request this encoding by setting the CoAP Accept option in the 636 request to "application/cbor". Depending on the profile, the content 637 may arrive in a different format wrapping a CBOR payload. 639 6. The 'Token' Endpoint 641 In plain OAuth 2.0 the AS provides the /token endpoint for submitting 642 access token requests. This framework extends the functionality of 643 the /token endpoint, giving the AS the possibility to help client and 644 RS to establish shared keys or to exchange their public keys. 645 Furthermore this framework defines encodings using CoAP and CBOR, 646 instead of HTTP and JSON. 648 Communication between the client and the /token endpoint at the AS 649 MUST be integrity protected and encrypted. Furthermore AS and client 650 MUST perform mutual authentication. Profiles of this framework are 651 expected to specify how authentication and communication security is 652 implemented. 654 The figures of this section uses CBOR diagnostic notation without the 655 integer abbreviations for the parameters or their values for better 656 readability. 658 6.1. Client-to-AS Request 660 The client sends a CoAP POST request to the token endpoint at the AS, 661 the profile is expected to specify the Content-Type and wrapping of 662 the payload. The content of the request consists of the parameters 663 specified in section 4 of the OAuth 2.0 specification [RFC6749] 664 encoded as a CBOR map. 666 In addition to these parameters, this framework defines the following 667 parameters for requesting an access token from a /token endpoint: 669 aud 670 OPTIONAL. Specifies the audience for which the client is 671 requesting an access token. If this parameter is missing it is 672 assumed that the client and the AS have a pre-established 673 understanding of the audience that an access token should address. 674 If a client submits a request for an access token without 675 specifying an "aud" parameter, and the AS does not have a default 676 "aud" value for this client, then the AS MUST respond with an 677 error message with the CoAP response code 4.00 (Bad Request). 679 cnf 680 OPTIONAL. This field contains information about the key the 681 client would like to bind to the access token for proof-of- 682 possession. It is NOT RECOMMENDED that a client submits a 683 symmetric key value to the AS using this parameter. See 684 Section 6.4.5 for more details on the formatting of the 'cnf' 685 parameter. 687 The following examples illustrate different types of requests for 688 proof-of-possession tokens. 690 Figure 2 shows a request for a token with a symmetric proof-of- 691 possession key. Note that in this example we assume a DTLS-based 692 communication security profile, therefore the Content-Type is 693 "application/cbor". 695 Header: POST (Code=0.02) 696 Uri-Host: "server.example.com" 697 Uri-Path: "token" 698 Content-Type: "application/cbor" 699 Payload: 700 { 701 "grant_type" : "client_credentials", 702 "aud" : "tempSensor4711", 703 } 705 Figure 2: Example request for an access token bound to a symmetric 706 key. 708 Figure 3 shows a request for a token with an asymmetric proof-of- 709 possession key. Note that in this example we assume an object 710 security-based profile, therefore the Content-Type is "application/ 711 cose+cbor". 713 Header: POST (Code=0.02) 714 Uri-Host: "server.example.com" 715 Uri-Path: "token" 716 Content-Type: "application/cose+cbor" 717 Payload: 718 { 719 "grant_type" : "client_credentials", 720 "cnf" : { 721 "COSE_Key" : { 722 "kty" : "EC", 723 "kid" : h'11', 724 "crv" : "P-256", 725 "x" : b64'usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8', 726 "y" : b64'IBOL+C3BttVivg+lSreASjpkttcsz+1rb7btKLv8EX4' 727 } 728 } 729 } 731 Figure 3: Example request for an access token bound to an asymmetric 732 key. 734 Figure 4 shows a request for a token where a previously communicated 735 proof-of-possession key is only referenced. Note that we assume a 736 DTLS-based communication security profile for this example, therefore 737 the Content-Type is "application/cbor". Also note that the client 738 performs a password based authentication in this example by 739 submitting its client_secret. 741 Header: POST (Code=0.02) 742 Uri-Host: "server.example.com" 743 Uri-Path: "token" 744 Content-Type: "application/cbor" 745 Payload: 746 { 747 "grant_type" : "client_credentials", 748 "client_id" : "myclient", 749 "client_secret" : "mysecret234", 750 "aud" : "valve424", 751 "scope" : "read", 752 "cnf" : { 753 "kid" : b64'6kg0dXJM13U' 754 } 755 } 757 Figure 4: Example request for an access token bound to a key 758 reference. 760 6.2. AS-to-Client Response 762 If the access token request has been successfully verified by the AS 763 and the client is authorized to obtain an access token corresponding 764 to its access token request, the AS sends a response with the CoAP 765 response code 2.01 (Created). If client request was invalid, or not 766 authorized, the AS returns an error response as described in 767 Section 6.3. 769 Note that the AS decides which token type and profile to use when 770 issuing a successful response. It is assumed that the AS has prior 771 knowledge of the capabilities of the client, and the RS. This prior 772 knowledge may, for example, be set by the use of a dynamic client 773 registration protocol exchange [RFC7591]. 775 The content of the successful reply MUST be encoded as CBOR map, 776 containing paramters as speficied in section 5.1 of [RFC6749]. In 777 addition to these parameters, the following parameters are also part 778 of a successful response: 780 profile 781 REQUIRED. This indicates the profile that the client MUST use 782 towards the RS. See Section 6.4.4 for the formatting of this 783 parameter. 785 cnf 786 REQUIRED if the token type is 'pop'. OPTIONAL otherwise. If a 787 symmetric proof-of-possession algorithms was selected, this field 788 contains the proof-of-possession key. If an asymmetric algorithm 789 was selected, this field contains information about the public key 790 used by the RS to authenticate. See Section 6.4.5 for the 791 formatting of this parameter. 792 token_type 793 OPTIONAL. By default implementations of this framework SHOULD 794 assume that the token_type is 'pop'. If a specific use case 795 requires another token_type (e.g. 'Bearer') to be used then this 796 parameter is REQUIRED. 798 Note that if CBOR Web Tokens [I-D.ietf-ace-cbor-web-token] are used, 799 the access token can also contain a 'cnf' claim. This claim is 800 however consumed by a different party. The access token is created 801 by the AS and processed by the RS (and opaque to the client) whereas 802 the RS Information is created by the AS and processed by the client; 803 it is never forwarded to the resource server. 805 The following examples illustrate different types of responses for 806 proof-of-possession tokens. 808 Figure 5 shows a response containing a token and a 'cnf' parameter 809 with a symmetric proof-of-possession key. Note that we assume a 810 DTLS-based communication security profile for this example, therefore 811 the Content-Type is "application/cbor". 813 Header: Created (Code=2.01) 814 Content-Type: "application/cbor" 815 Payload: 816 { 817 "access_token" : b64'SlAV32hkKG ... 818 (remainder of CWT omitted for brevity; 819 CWT contains COSE_Key in the 'cnf' claim)', 820 "expires_in" : "3600", 821 "cnf" : { 822 "COSE_Key" : { 823 "kty" : "Symmetric", 824 "kid" : b64'39Gqlw', 825 "k" : b64'hJtXhkV8FJG+Onbc6mxCcQh' 826 } 827 } 828 } 830 Figure 5: Example AS response with an access token bound to a 831 symmetric key. 833 6.3. Error Response 835 The error responses for CoAP-based interactions with the AS are 836 equivalent to the ones for HTTP-based interactions as defined in 837 section 5.2 of [RFC6749], with the following differences: The 838 Content-Type is specified by the communication security profile used 839 between client and AS. The raw payload before being processed by the 840 communication security protocol MUST be encoded as a CBOR map and the 841 CoAP response code 4.00 (Bad Request) MUST be used unless specified 842 otherwise. 844 6.4. New Request and Response Parameters 846 This section provides more detail about the new parameters that can 847 be used in access token requests and responses, as well as 848 abbreviations for more compact encoding of existing parameters and 849 common parameter values. 851 6.4.1. Audience 853 This parameter specifies for which audience the client is requesting 854 a token. It should be encoded as CBOR text string (major type 3). 856 The formatting and semantics of these strings are application 857 specific. 859 6.4.2. Grant Type 861 The abbreviations in Figure 6 MAY be used in CBOR encodings instead 862 of the string values defined in [RFC6749]. 864 /--------------------+----------+--------------\ 865 | grant_type | CBOR Key | Major Type | 866 |--------------------+----------+--------------| 867 | password | 0 | 0 (uint) | 868 | authorization_code | 1 | 0 | 869 | client_credentials | 2 | 0 | 870 | refresh_token | 3 | 0 | 871 \--------------------+----------+--------------/ 873 Figure 6: CBOR abbreviations for common grant types 875 6.4.3. Token Type 877 The 'token_type' parameter allows the AS to indicate to the client 878 which type of access token it is receiving (e.g. a bearer token). 879 The 'pop' token type MUST be assumed by default if the AS does not 880 provide a different value. 882 This document registers the new value "pop" for the OAuth Access 883 Token Types registry, specifying a Proof-of-Possession token. How 884 the proof-of-possession is performed is specified by the profiles. 886 The values in the 'token_type' parameter are CBOR text strings (major 887 type 3). 889 6.4.4. Profile 891 Profiles of this framework are expected to define the communication 892 protocol and the communication security protocol between the client 893 and the RS. Furthermore profiles are expected to define proof-of- 894 possession methods, if they support proof-of-possession tokens. 896 A profile should specify an identifier that is used to uniquely 897 identify itself in the 'profile' parameter. 899 Profiles MAY define additional parameters for both the token request 900 and the RS Information in the access token response in order to 901 support negotioation or signalling of profile specific parameters. 903 6.4.5. Confirmation 905 The "cnf" parameter identifies or provides the key used for proof-of- 906 possession or for authenticating the RS depending on the proof-of- 907 possession algorithm and the context cnf is used in. This framework 908 extends the definition of 'cnf' from [RFC7800] by adding CBOR/COSE 909 encodings and the use of 'cnf' for transporting keys in the RS 910 Information. 912 A CBOR encoded payload MAY contain the 'cnf' parameter with the 913 following contents: 915 COSE_Key In this case the 'cnf' parameter contains the proof-of- 916 possession key to be used by the client. An example is shown in 917 Figure 7. 919 "cnf" : { 920 "COSE_Key" : { 921 "kty" : "EC", 922 "kid" : h'11', 923 "crv" : "P-256", 924 "x" : b64'usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8', 925 "y" : b64'IBOL+C3BttVivg+lSreASjpkttcsz+1rb7btKLv8EX4' 926 } 927 } 929 Figure 7: Confirmation parameter containing a public key 931 Note that the COSE_Key structure may contain an "alg" or "key_ops" 932 parameter. If such parameters are present, a client MUST NOT use 933 a key that is not compatible with the profile or proof-of- 934 possession algorithm according to those parameters. 935 COSE_Encrypted In this case the 'cnf' parameter contains an 936 encrypted symmetric key destined for the client. The client is 937 assumed to be able to decrypt the cihpertext of this parameter. 938 The parameter is encoded as COSE_Encrypted object wrapping a 939 COSE_Key object. Figure 8 shows an example of this type of 940 encoding. 942 "cnf" : { 943 "COSE_Encrypted" : { 944 993( 945 [ h'a1010a' # protected header : {"alg" : "AES-CCM-16-64-128"} 946 "iv" : b64'ifUvZaHFgJM7UmGnjA', # unprotected header 947 b64'WXThuZo6TMCaZZqi6ef/8WHTjOdGk8kNzaIhIQ' # ciphertext 948 ] 949 ) 950 } 951 } 953 Figure 8: Confirmation paramter containing an encrypted symmetric key 955 The ciphertext here could e.g. contain a symmetric key as in 956 Figure 9. 958 { 959 "kty" : "Symmetric", 960 "kid" : b64'39Gqlw', 961 "k" : b64'hJtXhkV8FJG+Onbc6mxCcQh' 962 } 964 Figure 9: Example plaintext of an encrypted cnf parameter 966 Key Identifier In this case the 'cnf' parameter references a key 967 that is assumed to be previously known by the recipient. This 968 allows clients that perform repeated requests for an access token 969 for the same audience but e.g. with different scopes to omit key 970 transport in the access token, token request and token response. 971 Figure 10 shows such an example. 973 "cnf" : { 974 "kid" : b64'39Gqlw' 975 } 977 Figure 10: A Confirmation parameter with just a key identifier 979 6.5. Mapping parameters to CBOR 981 All OAuth parameters in access token requests and responses are 982 mapped to CBOR types as follows and are given an integer key value to 983 save space. 985 /-------------------+----------+-----------------\ 986 | Parameter name | CBOR Key | Major Type | 987 |-------------------+----------+-----------------| 988 | aud | 3 | 3 | 989 | client_id | 8 | 3 (text string) | 990 | client_secret | 9 | 2 (byte string) | 991 | response_type | 10 | 3 | 992 | redirect_uri | 11 | 3 | 993 | scope | 12 | 3 | 994 | state | 13 | 3 | 995 | code | 14 | 2 | 996 | error_description | 15 | 3 | 997 | error_uri | 16 | 3 | 998 | grant_type | 17 | 0 (unit) | 999 | access_token | 18 | 3 | 1000 | token_type | 19 | 0 | 1001 | expires_in | 20 | 0 | 1002 | username | 21 | 3 | 1003 | password | 22 | 3 | 1004 | refresh_token | 23 | 3 | 1005 | cnf | 24 | 5 (map) | 1006 | profile | 25 | 3 | 1007 \-------------------+----------+-----------------/ 1009 Figure 11: CBOR mappings used in token requests 1011 7. The 'Introspect' Endpoint 1013 Token introspection [RFC7662] is used by the RS and potentially the 1014 client to query the AS for metadata about a given token e.g. validity 1015 or scope. Analogous to the protocol defined in RFC 7662 [RFC7662] 1016 for HTTP and JSON, this section defines adaptations to more 1017 constrained environments using CoAP and CBOR. 1019 Communication between the RS and the introspection endpoint at the AS 1020 MUST be integrity protected and encrypted. Furthermore AS and RS 1021 MUST perform mutual authentication. Finally the AS SHOULD verify 1022 that the RS has the right to access introspection information about 1023 the provided token. Profiles of this framework are expected to 1024 specify how authentication and communication security is implemented. 1026 The figures of this section uses CBOR diagnostic notation without the 1027 integer abbreviations for the parameters or their values for better 1028 readability. 1030 7.1. RS-to-AS Request 1032 The RS sends a CoAP POST request to the introspection endpoint at the 1033 AS, the profile is expected to specify the Content-Type and wrapping 1034 of the payload. The payload MUST be encoded as a CBOR map with a 1035 'token' parameter containing the access token along with optional 1036 parameters representing additional context that is known by the RS to 1037 aid the AS in its response. 1039 The same parameters are required and optional as in section 2.1 of 1040 RFC 7662 [RFC7662]. 1042 For example, Figure 12 shows a RS calling the token introspection 1043 endpoint at the AS to query about an OAuth 2.0 proof-of-possession 1044 token. Note that we assume a object security-based communication 1045 security profile for this example, therefore the Content-Type is 1046 "application/cose+cbor". 1048 Header: POST (Code=0.02) 1049 Uri-Host: "server.example.com" 1050 Uri-Path: "introspect" 1051 Content-Type: "application/cose+cbor" 1052 Payload: 1053 { 1054 "token" : b64'7gj0dXJQ43U', 1055 "token_type_hint" : "pop" 1056 } 1058 Figure 12: Example introspection request. 1060 7.2. AS-to-RS Response 1062 If the introspection request is authorized and successfully 1063 processed, the AS sends a response with the CoAP response code 2.01 1064 (Created). If the introspection request was invalid, not authorized 1065 or couldn't be processed the AS returns an error response as 1066 described in Section 7.3. 1068 In a successful response, the AS encodes the response parameters in a 1069 CBOR map including with the same required and optional parameters as 1070 in section 2.2. of RFC 7662 [RFC7662] with the following additions: 1072 cnf 1073 OPTIONAL. This field contains information about the proof-of- 1074 possession key that binds the client to the access token. See 1075 Section 6.4.5 for more details on the formatting of the 'cnf' 1076 parameter. 1078 profile 1079 OPTIONAL. This indicates the profile that the RS MUST use with 1080 the client. See Section 6.4.4 for more details on the formatting 1081 of this parameter. 1083 client_token 1084 OPTIONAL. This parameter contains information that the RS MUST 1085 pass on to the client. See Section 7.4 for more details. 1087 For example, Figure 13 shows an AS response to the introspection 1088 request in Figure 12. Note that we assume a DTLS-based communication 1089 security profile for this example, therefore the Content-Type is 1090 "application/cbor". 1092 Header: Created Code=2.01) 1093 Content-Type: "application/cbor" 1094 Payload: 1095 { 1096 "active" : true, 1097 "scope" : "read", 1098 "profile" : "coap_dtls", 1099 "client_token" : b64'2QPhg0OhAQo ... 1100 (remainder of client token omitted for brevity)', 1101 "cnf" : { 1102 "COSE_Key" : { 1103 "kty" : "Symmetric", 1104 "kid" : b64'39Gqlw', 1105 "k" : b64'hJtXhkV8FJG+Onbc6mxCcQh' 1106 } 1107 } 1108 } 1110 Figure 13: Example introspection response. 1112 7.3. Error Response 1114 The error responses for CoAP-based interactions with the AS are 1115 equivalent to the ones for HTTP-based interactions as defined in 1116 section 2.3 of [RFC7662], with the following differences: 1118 o If content is sent, the Content-Type MUST be set according to the 1119 specification of the communication security profile, and the 1120 content payload MUST be encoded as a CBOR map. 1121 o If the credentials used by the RS are invalid the AS MUST respond 1122 with the CoAP response code 4.01 (Unauthorized) and use the 1123 required and optional parameters from section 5.2 in RFC 6749 1124 [RFC6749]. 1126 o If the RS does not have the right to perform this introspection 1127 request, the AS MUST respond with the CoAP response code 4.03 1128 (Forbidden). In this case no payload is returned. 1130 Note that a properly formed and authorized query for an inactive or 1131 otherwise invalid token does not warrant an error response by this 1132 specification. In these cases, the authorization server MUST instead 1133 respond with an introspection response with the "active" field set to 1134 "false". 1136 7.4. Client Token 1138 EDITORIAL NOTE: We have tentatively introduced this concept and would 1139 specifically like feedback if this is viewed as a useful addition to 1140 the framework. 1142 In cases where the client has limited connectivity and is requesting 1143 access to a previously unknown resource servers, using a long term 1144 token, there are situations where it would be beneficial to relay the 1145 proof-of-possession key and other relevant information from the AS to 1146 the client through the RS. The client_token parameter is designed to 1147 carry such information, and is intended to be used as described in 1148 Figure 14. 1150 Resource Authorization 1151 Client Server Server 1152 | | | 1153 | | | 1154 C: +--------------->| | 1155 | POST | | 1156 | Access Token | | 1157 | D: +--------------->| 1158 | | Introspection | 1159 | | Request | 1160 | | | 1161 | E: +<---------------+ 1162 | | Introspection | 1163 | | Response | 1164 | | + Client Token | 1165 |<---------------+ | 1166 | 2.01 Created | | 1167 | + Client Token | 1169 Figure 14: Use of the client_token parameter. 1171 The client token is a COSE_Encrytped object, containing as payload a 1172 CBOR map with the following claims: 1174 cnf 1175 REQUIRED if the token type is 'pop', OPTIONAL otherwise. Contains 1176 information about the proof-of-possession key the client is to use 1177 with its access token. See Section 6.4.5. 1179 token_type 1180 OPTIONAL. See Section 6.4.3. 1182 profile 1183 REQUIRED. See Section 6.4.4. 1185 rs_cnf 1186 OPTIONAL. Contains information about the key that the RS uses to 1187 authenticate towards the client. If the key is symmetric then 1188 this claim MUST NOT be part of the Client Token, since this is the 1189 same key as the one specified through the 'cnf' claim. This claim 1190 uses the same encoding as the 'cnf' parameter. See Section 6.4.4. 1192 The AS encrypts this token using a key shared between the AS and the 1193 client, so that only the client can decrypt it and access its 1194 payload. How this key is established is out of scope of this 1195 framework. 1197 7.5. Mapping Introspection parameters to CBOR 1199 The introspection request and response parameters are mapped to CBOR 1200 types as follows and are given an integer key value to save space. 1202 /-----------------+----------+-----------------\ 1203 | Parameter name | CBOR Key | Major Type | 1204 |-----------------+----------+-----------------| 1205 | iss | 1 | 3 (text string) | 1206 | sub | 2 | 3 | 1207 | aud | 3 | 3 | 1208 | exp | 4 | 6 tag value 1 | 1209 | nbf | 5 | 6 tag value 1 | 1210 | iat | 6 | 6 tag value 1 | 1211 | cti | 7 | 2 (byte string) | 1212 | client_id | 8 | 3 | 1213 | scope | 12 | 3 | 1214 | token_type | 19 | 3 | 1215 | username | 21 | 3 | 1216 | cnf | 24 | 5 (map) | 1217 | profile | 25 | 0 (uint) | 1218 | token | 26 | 3 | 1219 | token_type_hint | 27 | 3 | 1220 | active | 28 | 0 | 1221 | client_token | 29 | 3 | 1222 | rs_cnf | 30 | 5 | 1223 \-----------------+----------+-----------------/ 1225 Figure 15: CBOR Mappings to Token Introspection Parameters. 1227 8. The Access Token 1229 This framework RECOMMENDS the use of CBOR web token (CWT) as 1230 specified in [I-D.ietf-ace-cbor-web-token]. 1232 In order to facilitate offline processing of access tokens, this 1233 draft specifies the "cnf" and "scope" claims for CBOR web tokens. 1235 The "scope" claim explicitly encodes the scope of a given access 1236 token. This claim follows the same encoding rules as defined in 1237 section 3.3 of [RFC6749]. The meaning of a specific scope value is 1238 application specific and expected to be known to the RS running that 1239 application. 1241 The "cnf" claim follows the same rules as specified for JSON web 1242 token in RFC7800 [RFC7800], except that it is encoded in CBOR in the 1243 same way as specified for the "cnf" parameter in section 1244 Section 6.4.5. 1246 8.1. The 'Authorization Information' Endpoint 1248 The access token, containing authorization information and 1249 information of the key used by the client, needs to be transported to 1250 the RS so that the RS can authenticate and authorize the client 1251 request. 1253 This section defines a method for transporting the access token to 1254 the RS using CoAP. Profiles of this framework MAY define other 1255 methods for token transport. Implementations conforming to this 1256 framework MUST implement this method of token transportation. 1258 The method consists of a /authz-info endpoint, implemented by the RS. 1259 A client using this method MUST make a POST request to /authz-info at 1260 the RS with the access token in the payload. The RS receiving the 1261 token MUST verify the validity of the token. If the token is valid, 1262 the RS MUST respond to the POST request with 2.04 (Changed). 1264 If the token is not valid, the RS MUST respond with the CoAP response 1265 code 4.01 (Unauthorized). If the token is valid but the audience of 1266 the token does not match the RS, the RS MUST respond with the CoAP 1267 response code 4.03 (Forbidden). 1269 The RS MAY make an introspection request to validate the token before 1270 responding to the POST /authz-info request. If the introspection 1271 response contains a client token (Section 7.4) then this token SHALL 1272 be included in the payload of the 2.04 (Changed) response. 1274 Profiles are expected to specify how the /authz-info endpoint is 1275 protected. Note that since the token contains information that allow 1276 the client and the RS to establish a security context in the first 1277 place, mutual authentication may not be possible at this point. 1279 8.2. Token Expiration 1281 Depending on the capabilities of the RS, there are various ways in 1282 which it can verify the validity of a received access token. We list 1283 the possibilities here including what functionality they require of 1284 the RS. 1286 o The token is a CWT/JWT and includes a 'exp' claim and possibly the 1287 'nbf' claim. The RS verifies these by comparing them to values 1288 from its internal clock as defined in [RFC7519]. In this case the 1289 RS's internal clock must reflect the current date and time, or at 1290 least be synchronized with the AS's clock. How this clock 1291 synchronization would be performed is out of scope for this memo. 1292 o The RS verifies the validity of the token by performing an 1293 introspection request as specified in Section 7. This requires 1294 the RS to have a reliable network connection to the AS and to be 1295 able to handle two secure sessions in parallel (C to RS and AS to 1296 RS). 1297 o The RS and the AS both store a sequence number linked to their 1298 common security association. The AS increments this number for 1299 each access token it issues and includes it in the access token, 1300 which is a CWT/JWT. The RS keeps track of the most recently 1301 received sequence number, and only accepts tokens as valid, that 1302 are in a certain range around this number. This method does only 1303 require the RS to keep track of the sequence number. The method 1304 does not provide timely expiration, but it makes sure that older 1305 tokens cease to be valid after a certain number of newer ones got 1306 issued. For a constrained RS with no network connectivity and no 1307 means of reliably measuring time, this is the best that can be 1308 achieved. 1310 9. Security Considerations 1312 The entire document is about security. Security considerations 1313 applicable to authentication and authorization in RESTful 1314 environments provided in OAuth 2.0 [RFC6749] apply to this work, as 1315 well as the security considerations from [I-D.ietf-ace-actors]. 1316 Furthermore [RFC6819] provides additional security considerations for 1317 OAuth which apply to IoT deployments as well. 1319 A large range of threats can be mitigated by protecting the contents 1320 of the access token by using a digital signature or a keyed message 1321 digest. Consequently, the token integrity protection MUST be applied 1322 to prevent the token from being modified, particularly since it 1323 contains a reference to the symmetric key or the asymmetric key. If 1324 the access token contains the symmetric key, this symmetric key MUST 1325 be encrypted by the authorization server with a long-term key shared 1326 with the resource server. 1328 It is important for the authorization server to include the identity 1329 of the intended recipient (the audience), typically a single resource 1330 server (or a list of resource servers), in the token. Using a single 1331 shared secret with multiple authorization server to simplify key 1332 management is NOT RECOMMENDED since the benefit from using the proof- 1333 of-possession concept is significantly reduced. 1335 Token replay is also not possible since an eavesdropper will also 1336 have to obtain the corresponding private key or shared secret that is 1337 bound to the access token. Nevertheless, it is good practice to 1338 limit the lifetime of the access token and therefore the lifetime of 1339 associated key. 1341 The authorization server MUST offer confidentiality protection for 1342 any interactions with the client. This step is extremely important 1343 since the client will obtain the session key from the authorization 1344 server for use with a specific access token. Not using 1345 confidentiality protection exposes this secret (and the access token) 1346 to an eavesdropper thereby making the proof-of-possession security 1347 model completely insecure. This framework relies on profiles to 1348 define how confidentiality protection is provided, and additional 1349 protection can be applied by encrypting the CWT as specified in 1350 section 5.1 of [I-D.ietf-ace-cbor-web-token] to provide an additional 1351 layer of protection for cases where keying material is conveyed, for 1352 example, to a hardware security module. 1354 Developers MUST ensure that the ephemeral credentials (i.e., the 1355 private key or the session key) is not leaked to third parties. An 1356 adversary in possession of the ephemeral credentials bound to the 1357 access token will be able to impersonate the client. Be aware that 1358 this is a real risk with many constrained environments, since 1359 adversaries can often easily get physical access to the devices. 1361 Clients can at any time request a new proof-of-possession capable 1362 access token. Using a refresh token to regularly request new access 1363 tokens that are bound to fresh and unique keys is important if the 1364 client has this capability. Keeping the lifetime of the access token 1365 short allows the authorization server to use shorter key sizes, which 1366 translate to a performance benefit for the client and for the 1367 resource server. Shorter keys also lead to shorter messages 1368 (particularly with asymmetric keying material). 1370 When authorization servers bind symmetric keys to access tokens then 1371 they SHOULD scope these access tokens to a specific permissions. 1373 10. IANA Considerations 1375 This specification registers new parameters for OAuth and establishes 1376 registries for mappings to CBOR. 1378 10.1. OAuth Introspection Response Parameter Registration 1380 This specification registers the following parameters in the OAuth 1381 introspection response parameters 1383 o Name: "cnf" 1384 o Description: Key to use to prove the right to use an access token, 1385 as defined in [RFC7800]. 1386 o Change Controller: IESG 1387 o Specification Document(s): this document 1388 o Name: "aud" 1389 o Description: reference to intended receiving RS, as defined in PoP 1390 token specification. 1391 o Change Controller: IESG 1392 o Specification Document(s): this document 1394 o Name: "profile" 1395 o Description: The communication and communication security profile 1396 used between client and RS, as defined in ACE profiles. 1397 o Change Controller: IESG 1398 o Specification Document(s): this document 1400 o Name: "client_token" 1401 o Description: Information that the RS MUST pass to the client e.g. 1402 about the proof-of-possession keys. 1403 o Change Controller: IESG 1404 o Specification Document(s): this document 1406 o Name: "rs_cnf" 1407 o Description: Describes the public key the RS uses to authenticate. 1408 o Change Controller: IESG 1409 o Specification Document(s): this document 1411 10.2. OAuth Parameter Registration 1413 This specification registers the following parameters in the OAuth 1414 Parameters Registry 1416 o Parameter name: "profile" 1417 o Parameter usage location: token request, and token response 1418 o Change Controller: IESG 1419 o Specification Document(s): this document 1421 o Name: "cnf" 1422 o Description: Key to use to prove the right to use an access token, 1423 as defined in [RFC7800]. 1424 o Change Controller: IESG 1425 o Specification Document(s): this document 1427 10.3. OAuth Access Token Types 1429 This specification registers the following new token type in the 1430 OAuth Access Token Types Registry 1432 o Name: "PoP" 1433 o Description: A proof-of-possession token. 1434 o Change Controller: IESG 1435 o Specification Document(s): this document 1437 10.4. Token Type Mappings 1439 A new registry will be requested from IANA, entitled "Token Type 1440 Mappings". The registry is to be created as Expert Review Required. 1442 10.4.1. Registration Template 1444 Token Type: 1445 Name of token type as registered in the OAuth token type registry 1446 e.g. "Bearer". 1447 Mapped value: 1448 Integer representation for the token type value. The key value 1449 MUST be an integer in the range of 1 to 65536. 1450 Change Controller: 1451 For Standards Track RFCs, list the "IESG". For others, give the 1452 name of the responsible party. Other details (e.g., postal 1453 address, email address, home page URI) may also be included. 1454 Specification Document(s): 1455 Reference to the document or documents that specify the 1456 parameter,preferably including URIs that can be used to retrieve 1457 copies of the documents. An indication of the relevant sections 1458 may also be included but is not required. 1460 10.4.2. Initial Registry Contents 1462 o Parameter name: "Bearer" 1463 o Mapped value: 1 1464 o Change Controller: IESG 1465 o Specification Document(s): this document 1467 o Parameter name: "pop" 1468 o Mapped value: 2 1469 o Change Controller: IESG 1470 o Specification Document(s): this document 1472 10.5. CBOR Web Token Claims 1474 This specification registers the following new claims in the CBOR Web 1475 Token (CWT) registry: 1477 o Claim Name: "scope" 1478 o Claim Description: The scope of an access token as defined in 1479 [RFC6749]. 1480 o Change Controller: IESG 1481 o Specification Document(s): this document 1483 o Claim Name: "cnf" 1484 o Claim Description: The proof-of-possession key of an access token 1485 as defined in [RFC7800]. 1486 o Change Controller: IESG 1487 o Specification Document(s): this document 1489 10.6. ACE Profile Registry 1491 A new registry will be requested from IANA, entitled "ACE Profile 1492 Registry". The registry is to be created as Expert Review Required. 1494 10.6.1. Registration Template 1496 Profile name: 1497 Name of the profile to be included in the profile attribute. 1498 Profile description: 1499 Text giving an over view of the profile and the context it is 1500 developed for. 1501 Profile ID: 1502 Integer value to identify the profile. The value MUST be an 1503 integer in the range of 1 to 65536. 1504 Change Controller: 1505 For Standards Track RFCs, list the "IESG". For others, give the 1506 name of the responsible party. Other details (e.g., postal 1507 address, email address, home page URI) may also be included. 1508 Specification Document(s): 1509 Reference to the document or documents that specify the 1510 parameter,preferably including URIs that can be used to retrieve 1511 copies of the documents. An indication of the relevant sections 1512 may also be included but is not required. 1514 10.7. OAuth Parameter Mappings Registry 1516 A new registry will be requested from IANA, entitled "Token Endpoint 1517 CBOR Mappings Registry". The registry is to be created as Expert 1518 Review Required. 1520 10.7.1. Registration Template 1522 Parameter name: 1523 OAuth Parameter name, refers to the name in the OAuth parameter 1524 registry e.g. "client_id". 1525 CBOR key value: 1526 Key value for the claim. The key value MUST be an integer in the 1527 range of 1 to 65536. 1528 Change Controller: 1529 For Standards Track RFCs, list the "IESG". For others, give the 1530 name of the responsible party. Other details (e.g., postal 1531 address, email address, home page URI) may also be included. 1533 Specification Document(s): 1534 Reference to the document or documents that specify the 1535 parameter,preferably including URIs that can be used to retrieve 1536 copies of the documents. An indication of the relevant sections 1537 may also be included but is not required. 1539 10.7.2. Initial Registry Contents 1541 o Parameter name: "aud" 1542 o CBOR key value: 3 1543 o Change Controller: IESG 1544 o Specification Document(s): this document 1546 o Parameter name: "client_id" 1547 o CBOR key value: 8 1548 o Change Controller: IESG 1549 o Specification Document(s): this document 1551 o Parameter name: "client_secret" 1552 o CBOR key value: 9 1553 o Change Controller: IESG 1554 o Specification Document(s): this document 1556 o Parameter name: "response_type" 1557 o CBOR key value: 10 1558 o Change Controller: IESG 1559 o Specification Document(s): this document 1561 o Parameter name: "redirect_uri" 1562 o CBOR key value: 11 1563 o Change Controller: IESG 1564 o Specification Document(s): this document 1566 o Parameter name: "scope" 1567 o CBOR key value: 12 1568 o Change Controller: IESG 1569 o Specification Document(s): this document 1571 o Parameter name: "state" 1572 o CBOR key value: 13 1573 o Change Controller: IESG 1574 o Specification Document(s): this document 1576 o Parameter name: "code" 1577 o CBOR key value: 14 1578 o Change Controller: IESG 1579 o Specification Document(s): this document 1580 o Parameter name: "error_description" 1581 o CBOR key value: 15 1582 o Change Controller: IESG 1583 o Specification Document(s): this document 1585 o Parameter name: "error_uri" 1586 o CBOR key value: 16 1587 o Change Controller: IESG 1588 o Specification Document(s): this document 1590 o Parameter name: "grant_type" 1591 o CBOR key value: 17 1592 o Change Controller: IESG 1593 o Specification Document(s): this document 1595 o Parameter name: "access_token" 1596 o CBOR key value: 18 1597 o Change Controller: IESG 1598 o Specification Document(s): this document 1600 o Parameter name: "token_type" 1601 o CBOR key value: 19 1602 o Change Controller: IESG 1603 o Specification Document(s): this document 1605 o Parameter name: "expires_in" 1606 o CBOR key value: 20 1607 o Change Controller: IESG 1608 o Specification Document(s): this document 1610 o Parameter name: "username" 1611 o CBOR key value: 21 1612 o Change Controller: IESG 1613 o Specification Document(s): this document 1615 o Parameter name: "password" 1616 o CBOR key value: 22 1617 o Change Controller: IESG 1618 o Specification Document(s): this document 1620 o Parameter name: "refresh_token" 1621 o CBOR key value: 23 1622 o Change Controller: IESG 1623 o Specification Document(s): this document 1625 o Parameter name: "cnf" 1626 o CBOR key value: 24 1627 o Change Controller: IESG 1628 o Specification Document(s): this document 1630 o Parameter name: "profile" 1631 o CBOR key value: 25 1632 o Change Controller: IESG 1633 o Specification Document(s): this document 1635 10.8. Introspection Endpoint CBOR Mappings Registry 1637 A new registry will be requested from IANA, entitled "Introspection 1638 Endpoint CBOR Mappings Registry". The registry is to be created as 1639 Expert Review Required. 1641 10.8.1. Registration Template 1643 Response parameter name: 1644 Name of the response parameter as defined in the "OAuth Token 1645 Introspection Response" registry e.g. "active". 1646 CBOR key value: 1647 Key value for the claim. The key value MUST be an integer in the 1648 range of 1 to 65536. 1649 Change Controller: 1650 For Standards Track RFCs, list the "IESG". For others, give the 1651 name of the responsible party. Other details (e.g., postal 1652 address, email address, home page URI) may also be included. 1653 Specification Document(s): 1654 Reference to the document or documents that specify the 1655 parameter,preferably including URIs that can be used to retrieve 1656 copies of the documents. An indication of the relevant sections 1657 may also be included but is not required. 1659 10.8.2. Initial Registry Contents 1661 o Response parameter name: "iss" 1662 o CBOR key value: 1 1663 o Change Controller: IESG 1664 o Specification Document(s): this document 1666 o Response parameter name: "sub" 1667 o CBOR key value: 2 1668 o Change Controller: IESG 1669 o Specification Document(s): this document 1671 o Response parameter name: "aud" 1672 o CBOR key value: 3 1673 o Change Controller: IESG 1674 o Specification Document(s): this document 1675 o Response parameter name: "exp" 1676 o CBOR key value: 4 1677 o Change Controller: IESG 1678 o Specification Document(s): this document 1680 o Response parameter name: "nbf" 1681 o CBOR key value: 5 1682 o Change Controller: IESG 1683 o Specification Document(s): this document 1685 o Response parameter name: "iat" 1686 o CBOR key value: 6 1687 o Change Controller: IESG 1688 o Specification Document(s): this document 1690 o Response parameter name: "cti" 1691 o CBOR key value: 7 1692 o Change Controller: IESG 1693 o Specification Document(s): this document 1695 o Response parameter name: "client_id" 1696 o CBOR key value: 8 1697 o Change Controller: IESG 1698 o Specification Document(s): this document 1700 o Response parameter name: "scope" 1701 o CBOR key value: 12 1702 o Change Controller: IESG 1703 o Specification Document(s): this document 1705 o Response parameter name: "token_type" 1706 o CBOR key value: 19 1707 o Change Controller: IESG 1708 o Specification Document(s): this document 1710 o Response parameter name: "username" 1711 o CBOR key value: 21 1712 o Change Controller: IESG 1713 o Specification Document(s): this document 1715 o Parameter name: "cnf" 1716 o CBOR key value: 24 1717 o Change Controller: IESG 1718 o Specification Document(s): this document 1720 o Parameter name: "profile" 1721 o CBOR key value: 25 1722 o Change Controller: IESG 1723 o Specification Document(s): this document 1725 o Response parameter name: "token" 1726 o CBOR key value: 26 1727 o Change Controller: IESG 1728 o Specification Document(s): this document 1730 o Response parameter name: "token_type_hint" 1731 o CBOR key value: 27 1732 o Change Controller: IESG 1733 o Specification Document(s): this document 1735 o Response parameter name: "active" 1736 o CBOR key value: 28 1737 o Change Controller: IESG 1738 o Specification Document(s): this document 1740 o Response parameter name: "client_token" 1741 o CBOR key value: 29 1742 o Change Controller: IESG 1743 o Specification Document(s): this document 1745 o Response parameter name: "rs_cnf" 1746 o CBOR key value: 30 1747 o Change Controller: IESG 1748 o Specification Document(s): this document 1750 10.9. CoAP Option Number Registration 1752 This section registers the "Access-Token" CoAP Option Number in the 1753 "CoRE Parameters" sub-registry "CoAP Option Numbers" in the manner 1754 described in [RFC7252]. 1756 Name 1758 Access-Token 1759 Number 1761 TBD 1762 Reference 1764 [This document]. 1765 Meaning in Request 1767 Contains an Access Token according to [This document] containing 1768 access permissions of the client. 1769 Meaning in Response 1770 Not used in response 1771 Safe-to-Forward 1773 Yes 1774 Format 1776 Based on the observer the format is perceived differently. Opaque 1777 data to the client and CWT or reference token to the RS. 1778 Length 1780 Less then 255 bytes 1782 11. Acknowledgments 1784 We would like to thank Eve Maler for her contributions to the use of 1785 OAuth 2.0 and UMA in IoT scenarios, Robert Taylor for his discussion 1786 input, and Malisa Vucinic for his input on the ACRE proposal 1787 [I-D.seitz-ace-core-authz] which was one source of inspiration for 1788 this work. Finally, we would like to thank the ACE working group in 1789 general for their feedback. 1791 We would like to thank the authors of draft-ietf-oauth-pop-key- 1792 distribution, from where we copied large parts of our security 1793 considerations. 1795 Ludwig Seitz and Goeran Selander worked on this document as part of 1796 the CelticPlus project CyberWI, with funding from Vinnova. 1798 12. References 1800 12.1. Normative References 1802 [I-D.ietf-ace-cbor-web-token] 1803 Wahlstroem, E., Jones, M., Tschofenig, H., and S. Erdtman, 1804 "CBOR Web Token (CWT)", draft-ietf-ace-cbor-web-token-01 1805 (work in progress), July 2016. 1807 [I-D.ietf-cose-msg] 1808 Schaad, J., "CBOR Object Signing and Encryption (COSE)", 1809 draft-ietf-cose-msg-19 (work in progress), September 2016. 1811 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1812 Requirement Levels", BCP 14, RFC 2119, 1813 DOI 10.17487/RFC2119, March 1997, 1814 . 1816 [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer 1817 Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, 1818 January 2012, . 1820 [RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained 1821 Application Protocol (CoAP)", RFC 7252, 1822 DOI 10.17487/RFC7252, June 2014, 1823 . 1825 [RFC7662] Richer, J., Ed., "OAuth 2.0 Token Introspection", 1826 RFC 7662, DOI 10.17487/RFC7662, October 2015, 1827 . 1829 [RFC7800] Jones, M., Bradley, J., and H. Tschofenig, "Proof-of- 1830 Possession Key Semantics for JSON Web Tokens (JWTs)", 1831 RFC 7800, DOI 10.17487/RFC7800, April 2016, 1832 . 1834 12.2. Informative References 1836 [I-D.ietf-ace-actors] 1837 Gerdes, S., Seitz, L., Selander, G., and C. Bormann, "An 1838 architecture for authorization in constrained 1839 environments", draft-ietf-ace-actors-04 (work in 1840 progress), September 2016. 1842 [I-D.ietf-oauth-device-flow] 1843 Denniss, W., Myrseth, S., Bradley, J., Jones, M., and H. 1844 Tschofenig, "OAuth 2.0 Device Flow", draft-ietf-oauth- 1845 device-flow-03 (work in progress), July 2016. 1847 [I-D.ietf-oauth-native-apps] 1848 Denniss, W. and J. Bradley, "OAuth 2.0 for Native Apps", 1849 draft-ietf-oauth-native-apps-03 (work in progress), July 1850 2016. 1852 [I-D.seitz-ace-core-authz] 1853 Seitz, L., Selander, G., and M. Vucinic, "Authorization 1854 for Constrained RESTful Environments", draft-seitz-ace- 1855 core-authz-00 (work in progress), June 2015. 1857 [I-D.selander-ace-object-security] 1858 Selander, G., Mattsson, J., Palombini, F., and L. Seitz, 1859 "Object Security of CoAP (OSCOAP)", draft-selander-ace- 1860 object-security-05 (work in progress), July 2016. 1862 [RFC4949] Shirey, R., "Internet Security Glossary, Version 2", 1863 FYI 36, RFC 4949, DOI 10.17487/RFC4949, August 2007, 1864 . 1866 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 1867 (TLS) Protocol Version 1.2", RFC 5246, 1868 DOI 10.17487/RFC5246, August 2008, 1869 . 1871 [RFC6690] Shelby, Z., "Constrained RESTful Environments (CoRE) Link 1872 Format", RFC 6690, DOI 10.17487/RFC6690, August 2012, 1873 . 1875 [RFC6749] Hardt, D., Ed., "The OAuth 2.0 Authorization Framework", 1876 RFC 6749, DOI 10.17487/RFC6749, October 2012, 1877 . 1879 [RFC6819] Lodderstedt, T., Ed., McGloin, M., and P. Hunt, "OAuth 2.0 1880 Threat Model and Security Considerations", RFC 6819, 1881 DOI 10.17487/RFC6819, January 2013, 1882 . 1884 [RFC7049] Bormann, C. and P. Hoffman, "Concise Binary Object 1885 Representation (CBOR)", RFC 7049, DOI 10.17487/RFC7049, 1886 October 2013, . 1888 [RFC7159] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data 1889 Interchange Format", RFC 7159, DOI 10.17487/RFC7159, March 1890 2014, . 1892 [RFC7228] Bormann, C., Ersue, M., and A. Keranen, "Terminology for 1893 Constrained-Node Networks", RFC 7228, 1894 DOI 10.17487/RFC7228, May 2014, 1895 . 1897 [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 1898 Protocol (HTTP/1.1): Semantics and Content", RFC 7231, 1899 DOI 10.17487/RFC7231, June 2014, 1900 . 1902 [RFC7519] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token 1903 (JWT)", RFC 7519, DOI 10.17487/RFC7519, May 2015, 1904 . 1906 [RFC7521] Campbell, B., Mortimore, C., Jones, M., and Y. Goland, 1907 "Assertion Framework for OAuth 2.0 Client Authentication 1908 and Authorization Grants", RFC 7521, DOI 10.17487/RFC7521, 1909 May 2015, . 1911 [RFC7591] Richer, J., Ed., Jones, M., Bradley, J., Machulak, M., and 1912 P. Hunt, "OAuth 2.0 Dynamic Client Registration Protocol", 1913 RFC 7591, DOI 10.17487/RFC7591, July 2015, 1914 . 1916 [RFC7744] Seitz, L., Ed., Gerdes, S., Ed., Selander, G., Mani, M., 1917 and S. Kumar, "Use Cases for Authentication and 1918 Authorization in Constrained Environments", RFC 7744, 1919 DOI 10.17487/RFC7744, January 2016, 1920 . 1922 [RFC7959] Bormann, C. and Z. Shelby, Ed., "Block-Wise Transfers in 1923 the Constrained Application Protocol (CoAP)", RFC 7959, 1924 DOI 10.17487/RFC7959, August 2016, 1925 . 1927 Appendix A. Design Justification 1929 This section provides further insight into the design decisions of 1930 the solution documented in this document. Section 3 lists several 1931 building blocks and briefly summarizes their importance. The 1932 justification for offering some of those building blocks, as opposed 1933 to using OAuth 2.0 as is, is given below. 1935 Common IoT constraints are: 1937 Low Power Radio: 1939 Many IoT devices are equipped with a small battery which needs to 1940 last for a long time. For many constrained wireless devices the 1941 highest energy cost is associated to transmitting or receiving 1942 messages. It is therefore important to keep the total 1943 communication overhead low, including minimizing the number and 1944 size of messages sent and received, which has an impact of choice 1945 on the message format and protocol. By using CoAP over UDP, and 1946 CBOR encoded messages some of these aspects are addressed. 1947 Security protocols contribute to the communication overhead and 1948 can in some cases be optimized. For example authentication and 1949 key establishment may in certain cases where security requirements 1950 so allows be replaced by provisioning of security context by a 1951 trusted third party, using transport or application layer 1952 security. 1954 Low CPU Speed: 1956 Some IoT devices are equipped with processors that are 1957 significantly slower than those found in most current devices on 1958 the Internet. This typically has implications on what timely 1959 cryptographic operations a device is capable to perform, which in 1960 turn impacts e.g. protocol latency. Symmetric key cryptography 1961 may be used instead of the computationally more expensive public 1962 key cryptography where the security requirements so allows, but 1963 this may also require support for trusted third party assisted 1964 secret key establishment using transport or application layer 1965 security. 1967 Small Amount of Memory: 1969 Microcontrollers embedded in IoT devices are often equipped with 1970 small amount of RAM and flash memory, which places limitations 1971 what kind of processing can be performed and how much code can be 1972 put on those devices. To reduce code size fewer and smaller 1973 protocol implementations can be put on the firmware of such a 1974 device. In this case, CoAP may be used instead of HTTP, symmetric 1975 key cryptography instead of public key cryptography, and CBOR 1976 instead of JSON. Authentication and key establishment protocol, 1977 e.g. the DTLS handshake, in comparison with assisted key 1978 establishment also has an impact on memory and code. 1980 User Interface Limitations: 1982 Protecting access to resources is both an important security as 1983 well as privacy feature. End users and enterprise customers do 1984 not want to give access to the data collected by their IoT device 1985 or to functions it may offer to third parties. Since the 1986 classical approach of requesting permissions from end users via a 1987 rich user interface does not work in many IoT deployment scenarios 1988 these functions need to be delegated to user controlled devices 1989 that are better suitable for such tasks, such as smart phones and 1990 tablets. 1991 Communication Constraints: 1993 In certain constrained settings an IoT device may not be able to 1994 communicate with a given device at all times. Devices may be 1995 sleeping, or just disconnected from the Internet because of 1996 general lack of connectivity in the area, for cost reasons, or for 1997 security reasons, e.g. to avoid an entry point for Denial-of- 1998 Service attacks. 2000 The communication interactions this framework builds upon (as 2001 shown graphically in Figure 1) may be accomplished using a variety 2002 of different protocols, and not all parts of the message flow are 2003 used in all applications due to the communication constraints. 2004 While we envision deployments to make use of CoAP we explicitly 2005 want to support HTTP, HTTP/2 or specific protocols, such as 2006 Bluetooth Smart communication, which does not necessarily use IP. 2008 The latter raises the need for application layer security over the 2009 various interfaces. 2011 Appendix B. Roles and Responsibilites 2013 Resource Owner 2015 * Make sure that the RS is registered at the AS. This includes 2016 making known to the AS which profiles, token_types, scopes, and 2017 key types (symmetric/asymmetric) the RS supports. Also making 2018 it known to the AS which audience(s) the RS identifies itself 2019 with. 2020 * Make sure that clients can discover the AS which is in charge 2021 of the RS. 2022 * Make sure that the AS has the necessary, up-to-date, access 2023 control policies for the RS. 2025 Requesting Party 2027 * Make sure that the client is provisioned the necessary 2028 credentials to authenticate to the AS. 2029 * Make sure that the client is configured to follow the security 2030 requirements of the Requesting Party, when issuing requests 2031 (e.g. minimum communication security requirements, trust 2032 anchors). 2033 * Register the client at the AS. This includes making known to 2034 the AS which profiles, token_types, and key types (symmetric/ 2035 asymmetric) the client. 2037 Authorization Server 2039 * Register RS and manage corresponding security contexts. 2040 * Register clients and including authentication credentials. 2041 * Allow Resource Owners to configure and update access control 2042 policies related to their registered RS' 2043 * Expose the /token endpoint to allow clients to request tokens. 2044 * Authenticate clients that wish to request a token. 2045 * Process a token request against the authorization policies 2046 configured for the RS. 2047 * Expose the /introspection endpoint that allows RS's to submit 2048 token introspection requests. 2049 * Authenticate RS's that wish to get an introspection response. 2050 * Process token introspection requests. 2051 * Optionally: Handle token revocation. 2053 Client 2054 * Discover the AS in charge of the RS that is to be targeted with 2055 a request. 2056 * Submit the token request (A). 2058 + Authenticate towards the AS. 2059 + Optionally (if not pre-configured): Specify which RS, which 2060 resource(s), and which action(s) the request(s) will target. 2061 + If raw public key (rpk) or certificate is used, make sure 2062 the AS has the right rpk or certificate for this client. 2063 * Process the access token and RS Information (B) 2065 + Check that the RS Information provides the necessary 2066 security parameters (e.g. PoP key, information on 2067 communication security protocols supported by the RS). 2068 * Send the token and request to the RS (C) 2070 + Authenticate towards the RS (this could coincide with the 2071 proof of possession process). 2072 + Transmit the token as specified by the AS (default is to the 2073 /authz-info endpoint, alternative options are specified by 2074 profiles). 2075 + Perform the proof-of-possession procedure as specified by 2076 the profile in use (this may already have been taken care of 2077 through the authentication procedure). 2078 * Process the RS response (F) requirements of the Requesting 2079 Party, when issuing requests (e.g. minimum communication 2080 security requirements, trust anchors). 2081 * Register the client at the AS. 2083 Resource Server 2085 * Expose a way to submit access tokens. By default this is the 2086 /authz-info endpoint. 2087 * Process an access token. 2089 + Verify the token is from the right AS. 2090 + Verify that the token applies to this RS. 2091 + Check that the token has not expired (if the token provides 2092 expiration information). 2093 + Check the token's integrity. 2094 + Store the token so that it can be retrieved in the context 2095 of a matching request. 2096 * Process a request. 2098 + Set up communication security with the client. 2099 + Authenticate the client. 2100 + Match the client against existing tokens. 2102 + Check that tokens belonging to the client actually authorize 2103 the requested action. 2104 + Optionally: Check that the matching tokens are still valid 2105 (if this is possible.) 2106 * Send a response following the agreed upon communication 2107 security. 2109 Appendix C. Requirements on Profiles 2111 This section lists the requirements on profiles of this framework, 2112 for the convenience of a profile designer. All this information is 2113 also given in the appropriate sections of the main document, this is 2114 just meant as a checklist, to make it more easy to spot parts one 2115 might have missed. 2117 o Specify the discovery process of how the client finds the right AS 2118 for an RS it wants to send a request to. 2119 o Specify the communication protocol the client and RS the must use 2120 (e.g. CoAP). 2121 o Specify the security protocol the client and RS must use to 2122 protect their communication (e.g. OSCOAP or DTLS over CoAP). 2123 This must provide encryption and integrity protection. 2124 o Specify how the client and the RS mutually authenticate 2125 o Specify the Content-format of the protocol messages (e.g. 2126 "application/cbor" or "application/cose+cbor"). 2127 o Specify the proof-of-possession protocol(s) and how to select one, 2128 if several are available. Also specify which key types (e.g. 2129 symmetric/asymmetric) are supported by a specific proof-of- 2130 possession protocol. 2131 o Specify a unique profile identifier. 2132 o Optionally specify how the RS talks to the AS for introspection. 2133 o Optionally specify how the client talks to the AS for requesting a 2134 token. 2135 o Specify how/if the /authz-info endpoint is protected. 2136 o Optionally define other methods of token transport than the 2137 /authz-info endpoint. 2139 Appendix D. Deployment Examples 2141 There is a large variety of IoT deployments, as is indicated in 2142 Appendix A, and this section highlights a few common variants. This 2143 section is not normative but illustrates how the framework can be 2144 applied. 2146 For each of the deployment variants there are a number of possible 2147 security setups between clients, resource servers and authorization 2148 servers. The main focus in the following subsections is on how 2149 authorization of a client request for a resource hosted by a RS is 2150 performed. This requires the the security of the requests and 2151 responses between the clients and the RS to consider. 2153 Note: CBOR diagnostic notation is used for examples of requests and 2154 responses. 2156 D.1. Local Token Validation 2158 In this scenario we consider the case where the resource server is 2159 offline, i.e. it is not connected to the AS at the time of the access 2160 request. This access procedure involves steps A, B, C, and F of 2161 Figure 1. 2163 Since the resource server must be able to verify the access token 2164 locally, self-contained access tokens must be used. 2166 This example shows the interactions between a client, the 2167 authorization server and a temperature sensor acting as a resource 2168 server. Message exchanges A and B are shown in Figure 16. 2170 A: The client first generates a public-private key pair used for 2171 communication security with the RS. 2172 The client sends the POST request to /token at the AS. The 2173 security of this request can be transport or application layer, it 2174 is up the the comunication security profile to define. In the 2175 example trasport layer identification of the AS is done and the 2176 client identifies with client_id and client_secret as in classic 2177 OAuth. The request contains the public key of the client and the 2178 Audience parameter set to "tempSensorInLivingRoom", a value that 2179 the temperature sensor identifies itself with. The AS evaluates 2180 the request and authorizes the client to access the resource. 2181 B: The AS responds with a PoP token and RS Information. The PoP 2182 token contains the public key of the client, and the RS 2183 Information contains the public key of the RS. For communication 2184 security this example uses DTLS RawPublicKey between the client 2185 and the RS. The issued token will have a short validity time, 2186 i.e. 'exp' close to 'iat', to protect the RS from replay attacks. 2187 The token includes the claim such as "scope" with the authorized 2188 access that an owner of the temperature device can enjoy. In this 2189 example, the 'scope' claim, issued by the AS, informs the RS that 2190 the owner of the token, that can prove the possession of a key is 2191 authorized to make a GET request against the /temperature resource 2192 and a POST request on the /firmware resource. Note that the 2193 syntax and semantics of the scope claim are application specific. 2194 Note: In this example we assume that the client knows what 2195 resource it wants to access, and is therefore able to request 2196 specific audience and scope claims for the access token. 2198 Authorization 2199 Client Server 2200 | | 2201 |<=======>| DTLS Connection Establishment 2202 | | to identify the AS 2203 | | 2204 A: +-------->| Header: POST (Code=0.02) 2205 | POST | Uri-Path:"token" 2206 | | Content-Type: application/cbor 2207 | | Payload: 2208 | | 2209 B: |<--------+ Header: 2.05 Content 2210 | 2.05 | Content-Type: application/cbor 2211 | | Payload: 2212 | | 2214 Figure 16: Token Request and Response Using Client Credentials. 2216 The information contained in the Request-Payload and the Response- 2217 Payload is shown in Figure 17. Note that we assume a DTLS-based 2218 communication security profile for this example, therefore the 2219 Content-Type is "application/cbor". 2221 Request-Payload : 2222 { 2223 "grant_type" : "client_credentials", 2224 "aud" : "tempSensorInLivingRoom", 2225 "client_id" : "myclient", 2226 "client_secret" : "qwerty" 2227 } 2229 Response-Payload : 2230 { 2231 "access_token" : b64'SlAV32hkKG ...', 2232 "token_type" : "pop", 2233 "csp" : "DTLS", 2234 "cnf" : { 2235 "COSE_Key" : { 2236 "kid" : b64'c29tZSBwdWJsaWMga2V5IGlk', 2237 "kty" : "EC", 2238 "crv" : "P-256", 2239 "x" : b64'MKBCTNIcKUSDii11ySs3526iDZ8AiTo7Tu6KPAqv7D4', 2240 "y" : b64'4Etl6SRW2YiLUrN5vfvVHuhp7x8PxltmWWlbbM4IFyM' 2241 } 2242 } 2243 } 2245 Figure 17: Request and Response Payload Details. 2247 The content of the access token is shown in Figure 18. 2249 { 2250 "aud" : "tempSensorInLivingRoom", 2251 "iat" : "1360189224", 2252 "exp" : "1360289224", 2253 "scope" : "temperature_g firmware_p", 2254 "cnf" : { 2255 "jwk" : { 2256 "kid" : b64'1Bg8vub9tLe1gHMzV76e8', 2257 "kty" : "EC", 2258 "crv" : "P-256", 2259 "x" : b64'f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU', 2260 "y" : b64'x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0' 2261 } 2262 } 2263 } 2265 Figure 18: Access Token including Public Key of the Client. 2267 Messages C and F are shown in Figure 19 - Figure 20. 2269 C: The client then sends the PoP token to the /authz-info endpoint 2270 at the RS. This is a plain CoAP request, i.e. no transport or 2271 application layer security between client and RS, since the token 2272 is integrity protected between AS and RS. The RS verifies that 2273 the PoP token was created by a known and trusted AS, is valid, and 2274 responds to the client. The RS caches the security context 2275 together with authorization information about this client 2276 contained in the PoP token. 2278 Resource 2279 Client Server 2280 | | 2281 C: +-------->| Header: POST (Code=0.02) 2282 | POST | Uri-Path:"authz-info" 2283 | | Payload: SlAV32hkKG ... 2284 | | 2285 |<--------+ Header: 2.04 Changed 2286 | 2.04 | 2287 | | 2289 Figure 19: Access Token provisioning to RS 2290 The client and the RS runs the DTLS handshake using the raw public 2291 keys established in step B and C. 2293 The client sends the CoAP request GET to /temperature on RS over 2294 DTLS. The RS verifies that the request is authorized, based on 2295 previously established security context. 2296 F: The RS responds with a resource representation over DTLS. 2298 Resource 2299 Client Server 2300 | | 2301 |<=======>| DTLS Connection Establishment 2302 | | using Raw Public Keys 2303 | | 2304 +-------->| Header: GET (Code=0.01) 2305 | GET | Uri-Path: "temperature" 2306 | | 2307 | | 2308 | | 2309 F: |<--------+ Header: 2.05 Content 2310 | 2.05 | Payload: 2311 | | 2313 Figure 20: Resource Request and Response protected by DTLS. 2315 D.2. Introspection Aided Token Validation 2317 In this deployment scenario we assume that a client is not able to 2318 access the AS at the time of the access request. Since the RS is, 2319 however, connected to the back-end infrastructure it can make use of 2320 token introspection. This access procedure involves steps A-F of 2321 Figure 1, but assumes steps A and B have been carried out during a 2322 phase when the client had connectivity to AS. 2324 Since the client is assumed to be offline, at least for a certain 2325 period of time, a pre-provisioned access token has to be long-lived. 2326 The resource server may use its online connectivity to validate the 2327 access token with the authorization server, which is shown in the 2328 example below. 2330 In the example interactions between an offline client (key fob), a RS 2331 (online lock), and an AS is shown. We assume that there is a 2332 provisioning step where the client has access to the AS. This 2333 corresponds to message exchanges A and B which are shown in 2334 Figure 21. 2336 Authorization consent from the resource owner can be pre-configured, 2337 but it can also be provided via an interactive flow with the resource 2338 owner. An example of this for the key fob case could be that the 2339 resource owner has a connected car, he buys a generic key that he 2340 wants to use with the car. To authorize the key fob he connects it 2341 to his computer that then provides the UI for the device. After that 2342 OAuth 2.0 implicit flow can used to authorize the key for his car at 2343 the the car manufacturers AS. 2345 Note: In this example the client does not know the exact door it will 2346 be used to access since the token request is not send at the time of 2347 access. So the scope and audience parameters is set quite wide to 2348 start with and new values different form the original once can be 2349 returned from introspection later on. 2351 A: The client sends the request using POST to /token at AS. The 2352 request contains the Audience parameter set to "PACS1337" (PACS, 2353 Physical Access System), a value the that the online door in 2354 question identifies itself with. The AS generates an access token 2355 as on opaque string, which it can match to the specific client, a 2356 targeted audience and a symmetric key. The security is provided 2357 by identifying the AS on transport layer using a pre shared 2358 security context (psk, rpk or certificate) and then the client is 2359 identified using client_id and client_secret as in classic OAuth 2360 B: The AS responds with the an access token and RS Information, 2361 the latter containing a symmetric key. Communication security 2362 between C and RS will be DTLS and PreSharedKey. The PoP key being 2363 used as the PreSharedKey. 2365 Authorization 2366 Client Server 2367 | | 2368 | | 2369 A: +-------->| Header: POST (Code=0.02) 2370 | POST | Uri-Path:"token" 2371 | | Content-Type: application/cbor 2372 | | Payload: 2373 | | 2374 B: |<--------+ Header: 2.05 Content 2375 | | Content-Type: application/cbor 2376 | 2.05 | Payload: 2377 | | 2379 Figure 21: Token Request and Response using Client Credentials. 2381 The information contained in the Request-Payload and the Response- 2382 Payload is shown in Figure 22. 2384 Request-Payload: 2385 { 2386 "grant_type" : "client_credentials", 2387 "aud" : "lockOfDoor4711", 2388 "client_id" : "keyfob", 2389 "client_secret" : "qwerty" 2390 } 2392 Response-Payload: 2393 { 2394 "access_token" : b64'SlAV32hkKG ...' 2395 "token_type" : "pop", 2396 "csp" : "DTLS", 2397 "cnf" : { 2398 "COSE_Key" : { 2399 "kid" : b64'c29tZSBwdWJsaWMga2V5IGlk', 2400 "kty" : "oct", 2401 "alg" : "HS256", 2402 "k": b64'ZoRSOrFzN_FzUA5XKMYoVHyzff5oRJxl-IXRtztJ6uE' 2403 } 2404 } 2405 } 2407 Figure 22: Request and Response Payload for C offline 2409 The access token in this case is just an opaque string referencing 2410 the authorization information at the AS. 2412 C: Next, the client POSTs the access token to the /authz-info 2413 endpoint in the RS. This is a plain CoAP request, i.e. no DTLS 2414 between client and RS. Since the token is an opaque string, the 2415 RS cannot verify it on its own, and thus defers to respond the 2416 client with a status code until after step E. 2417 D: The RS forwards the token to the /introspect endpoint on the 2418 AS. Introspection assumes a secure connection between the AS and 2419 the RS, e.g. using transport of application layer security. In 2420 the example AS is identified using pre shared security context 2421 (psk, rpk or certificate) while RS is acting as client and is 2422 identified with client_id and client_secret. 2423 E: The AS provides the introspection response containing 2424 parameters about the token. This includes the confirmation key 2425 (cnf) parameter that allows the RS to verify the client's proof of 2426 possession in step F. 2427 After receiving message E, the RS responds to the client's POST in 2428 step C with the CoAP response code 2.01 (Created). 2430 Resource 2431 Client Server 2432 | | 2433 C: +-------->| Header: POST (T=CON, Code=0.02) 2434 | POST | Uri-Path:"authz-info" 2435 | | Content-Type: "application/cbor" 2436 | | Payload: b64'SlAV32hkKG ...'' 2437 | | 2438 | | Authorization 2439 | | Server 2440 | | | 2441 | D: +--------->| Header: POST (Code=0.02) 2442 | | POST | Uri-Path: "introspect" 2443 | | | Content-Type: "application/cbor" 2444 | | | Payload: 2445 | | | 2446 | E: |<---------+ Header: 2.05 Content 2447 | | 2.05 | Content-Type: "application/cbor" 2448 | | | Payload: 2449 | | | 2450 | | 2451 |<--------+ Header: 2.01 Created 2452 | 2.01 | 2453 | | 2455 Figure 23: Token Introspection for C offline 2456 The information contained in the Request-Payload and the Response- 2457 Payload is shown in Figure 24. 2459 Request-Payload: 2460 { 2461 "token" : b64'SlAV32hkKG...', 2462 "client_id" : "FrontDoor", 2463 "client_secret" : "ytrewq" 2464 } 2466 Response-Payload: 2467 { 2468 "active" : true, 2469 "aud" : "lockOfDoor4711", 2470 "scope" : "open, close", 2471 "iat" : 1311280970, 2472 "cnf" : { 2473 "kid" : b64'JDLUhTMjU2IiwiY3R5Ijoi ...' 2474 } 2475 } 2477 Figure 24: Request and Response Payload for Introspection 2479 The client uses the symmetric PoP key to establish a DTLS 2480 PreSharedKey secure connection to the RS. The CoAP request PUT is 2481 sent to the uri-path /state on RS changing state of the door to 2482 locked. 2483 F: The RS responds with a appropriate over the secure DTLS 2484 channel. 2486 Resource 2487 Client Server 2488 | | 2489 |<=======>| DTLS Connection Establishment 2490 | | using Pre Shared Key 2491 | | 2492 +-------->| Header: PUT (Code=0.03) 2493 | PUT | Uri-Path: "state" 2494 | | Payload: 2495 | | 2496 F: |<--------+ Header: 2.04 Changed 2497 | 2.04 | Payload: 2498 | | 2500 Figure 25: Resource request and response protected by OSCOAP 2502 Appendix E. Document Updates 2504 E.1. Version -02 to -03 2506 o Removed references to draft-ietf-oauth-pop-key-distribution since 2507 the status of this draft is unclear. 2508 o Copied and adapted security considerations from draft-ietf-oauth- 2509 pop-key-distribution. 2510 o Renamed "client information" to "RS information" since it is 2511 information about the RS. 2512 o Clarified the requirements on profiles of this framework. 2513 o Clarified the token endpoint protocol and removed negotiation of 2514 'profile' and 'alg' (section 6). 2515 o Renumbered the abbreviations for claims and parameters to get a 2516 consistent numbering across different endpoints. 2517 o Clarified the introspection endpoint. 2518 o Renamed token, introspection and authz-info to 'endpoint' instead 2519 of 'resource' to mirror the OAuth 2.0 terminology. 2520 o Updated the examples in the appendices. 2522 E.2. Version -01 to -02 2524 o Restructured to remove communication security parts. These shall 2525 now be defined in profiles. 2527 o Restructured section 5 to create new sections on the OAuth 2528 endpoints /token, /introspect and /authz-info. 2529 o Pulled in material from draft-ietf-oauth-pop-key-distribution in 2530 order to define proof-of-possession key distribution. 2531 o Introduced the 'cnf' parameter as defined in RFC7800 to reference 2532 or transport keys used for proof of posession. 2533 o Introduced the 'client-token' to transport client information from 2534 the AS to the client via the RS in conjunction with introspection. 2535 o Expanded the IANA section to define parameters for token request, 2536 introspection and CWT claims. 2537 o Moved deployment scenarios to the appendix as examples. 2539 E.3. Version -00 to -01 2541 o Changed 5.1. from "Communication Security Protocol" to "Client 2542 Information". 2543 o Major rewrite of 5.1 to clarify the information exchanged between 2544 C and AS in the PoP token request profile for IoT. 2546 * Allow the client to indicate preferences for the communication 2547 security protocol. 2548 * Defined the term "Client Information" for the additional 2549 information returned to the client in addition to the access 2550 token. 2551 * Require that the messages between AS and client are secured, 2552 either with (D)TLS or with COSE_Encrypted wrappers. 2553 * Removed dependency on OSCoAP and added generic text about 2554 object security instead. 2555 * Defined the "rpk" parameter in the client information to 2556 transmit the raw public key of the RS from AS to client. 2557 * (D)TLS MUST use the PoP key in the handshake (either as PSK or 2558 as client RPK with client authentication). 2559 * Defined the use of x5c, x5t and x5tS256 parameters when a 2560 client certificate is used for proof of possession. 2561 * Defined "tktn" parameter for signaling for how to transfer the 2562 access token. 2563 o Added 5.2. the CoAP Access-Token option for transferring access 2564 tokens in messages that do not have payload. 2565 o 5.3.2. Defined success and error responses from the RS when 2566 receiving an access token. 2567 o 5.6.:Added section giving guidance on how to handle token 2568 expiration in the absence of reliable time. 2569 o Appendix B Added list of roles and responsibilities for C, AS and 2570 RS. 2572 Authors' Addresses 2574 Ludwig Seitz 2575 SICS 2576 Scheelevaegen 17 2577 Lund 223 70 2578 SWEDEN 2580 Email: ludwig@sics.se 2582 Goeran Selander 2583 Ericsson 2584 Faroegatan 6 2585 Kista 164 80 2586 SWEDEN 2588 Email: goran.selander@ericsson.com 2590 Erik Wahlstroem 2591 Sweden 2593 Email: erik@wahlstromtekniska.se 2595 Samuel Erdtman 2596 Spotify AB 2597 Birger Jarlsgatan 61, 4tr 2598 Stockholm 113 56 2599 Sweden 2601 Email: erdtman@spotify.com 2603 Hannes Tschofenig 2604 ARM Ltd. 2605 Hall in Tirol 6060 2606 Austria 2608 Email: Hannes.Tschofenig@arm.com