| < draft-ietf-ace-oauth-authz-02.txt | draft-ietf-ace-oauth-authz-03.txt > | |||
|---|---|---|---|---|
| ACE Working Group L. Seitz | ACE Working Group L. Seitz | |||
| Internet-Draft SICS | Internet-Draft SICS | |||
| Intended status: Standards Track G. Selander | Intended status: Standards Track G. Selander | |||
| Expires: December 12, 2016 Ericsson | Expires: April 15, 2017 Ericsson | |||
| E. Wahlstroem | E. Wahlstroem | |||
| Nexus Technology | ||||
| S. Erdtman | S. Erdtman | |||
| Spotify AB | Spotify AB | |||
| H. Tschofenig | H. Tschofenig | |||
| ARM Ltd. | ARM Ltd. | |||
| June 10, 2016 | October 12, 2016 | |||
| Authentication and Authorization for Constrained Environments (ACE) | Authentication and Authorization for Constrained Environments (ACE) | |||
| draft-ietf-ace-oauth-authz-02 | draft-ietf-ace-oauth-authz-03 | |||
| Abstract | Abstract | |||
| This specification defines the ACE framework for authentication and | This specification defines a framework for authentication and | |||
| authorization in Internet of Things (IoT) deployments. The ACE | authorization in Internet of Things (IoT) environments. The | |||
| framework is based on a set of building blocks including OAuth 2.0 | framework is based on a set of building blocks including OAuth 2.0 | |||
| and CoAP, thus making a well-known and widely used authorization | and CoAP, thus making a well-known and widely used authorization | |||
| solution suitable for IoT devices. Existing specifications are used | solution suitable for IoT devices. Existing specifications are used | |||
| where possible, but where the limitations of IoT devices require it, | where possible, but where the constraints of IoT devices require it, | |||
| profiles and extensions are provided. | extensions are added and profiles are defined. | |||
| Status of This Memo | Status of This Memo | |||
| This Internet-Draft is submitted in full conformance with the | This Internet-Draft is submitted in full conformance with the | |||
| provisions of BCP 78 and BCP 79. | provisions of BCP 78 and BCP 79. | |||
| Internet-Drafts are working documents of the Internet Engineering | Internet-Drafts are working documents of the Internet Engineering | |||
| Task Force (IETF). Note that other groups may also distribute | Task Force (IETF). Note that other groups may also distribute | |||
| working documents as Internet-Drafts. The list of current Internet- | working documents as Internet-Drafts. The list of current Internet- | |||
| Drafts is at http://datatracker.ietf.org/drafts/current/. | Drafts is at http://datatracker.ietf.org/drafts/current/. | |||
| Internet-Drafts are draft documents valid for a maximum of six months | Internet-Drafts are draft documents valid for a maximum of six months | |||
| and may be updated, replaced, or obsoleted by other documents at any | and may be updated, replaced, or obsoleted by other documents at any | |||
| time. It is inappropriate to use Internet-Drafts as reference | time. It is inappropriate to use Internet-Drafts as reference | |||
| material or to cite them other than as "work in progress." | material or to cite them other than as "work in progress." | |||
| This Internet-Draft will expire on December 12, 2016. | This Internet-Draft will expire on April 15, 2017. | |||
| Copyright Notice | Copyright Notice | |||
| Copyright (c) 2016 IETF Trust and the persons identified as the | Copyright (c) 2016 IETF Trust and the persons identified as the | |||
| document authors. All rights reserved. | document authors. All rights reserved. | |||
| This document is subject to BCP 78 and the IETF Trust's Legal | This document is subject to BCP 78 and the IETF Trust's Legal | |||
| Provisions Relating to IETF Documents | Provisions Relating to IETF Documents | |||
| (http://trustee.ietf.org/license-info) in effect on the date of | (http://trustee.ietf.org/license-info) in effect on the date of | |||
| publication of this document. Please review these documents | publication of this document. Please review these documents | |||
| skipping to change at page 2, line 24 ¶ | skipping to change at page 2, line 24 ¶ | |||
| Table of Contents | Table of Contents | |||
| 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 | |||
| 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 | 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 | |||
| 3. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 5 | 3. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 5 | |||
| 3.1. OAuth 2.0 . . . . . . . . . . . . . . . . . . . . . . . . 6 | 3.1. OAuth 2.0 . . . . . . . . . . . . . . . . . . . . . . . . 6 | |||
| 3.2. CoAP . . . . . . . . . . . . . . . . . . . . . . . . . . 8 | 3.2. CoAP . . . . . . . . . . . . . . . . . . . . . . . . . . 8 | |||
| 4. Protocol Interactions . . . . . . . . . . . . . . . . . . . . 9 | 4. Protocol Interactions . . . . . . . . . . . . . . . . . . . . 9 | |||
| 5. Framework . . . . . . . . . . . . . . . . . . . . . . . . . . 13 | 5. Framework . . . . . . . . . . . . . . . . . . . . . . . . . . 13 | |||
| 6. The 'Token' Resource . . . . . . . . . . . . . . . . . . . . 14 | 6. The 'Token' Endpoint . . . . . . . . . . . . . . . . . . . . 14 | |||
| 6.1. Client-to-AS Request . . . . . . . . . . . . . . . . . . 14 | 6.1. Client-to-AS Request . . . . . . . . . . . . . . . . . . 14 | |||
| 6.2. AS-to-Client Response . . . . . . . . . . . . . . . . . . 17 | 6.2. AS-to-Client Response . . . . . . . . . . . . . . . . . . 17 | |||
| 6.3. Error Response . . . . . . . . . . . . . . . . . . . . . 18 | 6.3. Error Response . . . . . . . . . . . . . . . . . . . . . 18 | |||
| 6.4. New Request and Response Parameters . . . . . . . . . . . 18 | 6.4. New Request and Response Parameters . . . . . . . . . . . 18 | |||
| 6.4.1. Grant Type . . . . . . . . . . . . . . . . . . . . . 19 | 6.4.1. Audience . . . . . . . . . . . . . . . . . . . . . . 18 | |||
| 6.4.2. Token Type and Algorithms . . . . . . . . . . . . . . 19 | 6.4.2. Grant Type . . . . . . . . . . . . . . . . . . . . . 19 | |||
| 6.4.3. Profile . . . . . . . . . . . . . . . . . . . . . . . 20 | 6.4.3. Token Type . . . . . . . . . . . . . . . . . . . . . 19 | |||
| 6.4.4. Confirmation . . . . . . . . . . . . . . . . . . . . 20 | 6.4.4. Profile . . . . . . . . . . . . . . . . . . . . . . . 19 | |||
| 6.5. Mapping parameters to CBOR . . . . . . . . . . . . . . . 22 | 6.4.5. Confirmation . . . . . . . . . . . . . . . . . . . . 20 | |||
| 7. The 'Introspect' Resource . . . . . . . . . . . . . . . . . . 22 | 6.5. Mapping parameters to CBOR . . . . . . . . . . . . . . . 21 | |||
| 7. The 'Introspect' Endpoint . . . . . . . . . . . . . . . . . . 22 | ||||
| 7.1. RS-to-AS Request . . . . . . . . . . . . . . . . . . . . 23 | 7.1. RS-to-AS Request . . . . . . . . . . . . . . . . . . . . 23 | |||
| 7.2. AS-to-RS Response . . . . . . . . . . . . . . . . . . . . 23 | 7.2. AS-to-RS Response . . . . . . . . . . . . . . . . . . . . 23 | |||
| 7.3. Error Response . . . . . . . . . . . . . . . . . . . . . 24 | 7.3. Error Response . . . . . . . . . . . . . . . . . . . . . 24 | |||
| 7.4. Client Token . . . . . . . . . . . . . . . . . . . . . . 25 | 7.4. Client Token . . . . . . . . . . . . . . . . . . . . . . 25 | |||
| 7.5. Mapping Introspection parameters to CBOR . . . . . . . . 26 | 7.5. Mapping Introspection parameters to CBOR . . . . . . . . 26 | |||
| 8. The Access Token . . . . . . . . . . . . . . . . . . . . . . 27 | 8. The Access Token . . . . . . . . . . . . . . . . . . . . . . 27 | |||
| 8.1. The 'Authorization Information' Resource . . . . . . . . 27 | 8.1. The 'Authorization Information' Endpoint . . . . . . . . 28 | |||
| 8.2. Token Expiration . . . . . . . . . . . . . . . . . . . . 28 | 8.2. Token Expiration . . . . . . . . . . . . . . . . . . . . 28 | |||
| 9. Security Considerations . . . . . . . . . . . . . . . . . . . 28 | 9. Security Considerations . . . . . . . . . . . . . . . . . . . 29 | |||
| 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 29 | 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 30 | |||
| 10.1. OAuth Introspection Response Parameter Registration . . 29 | 10.1. OAuth Introspection Response Parameter Registration . . 30 | |||
| 10.2. OAuth Parameter Registration . . . . . . . . . . . . . . 30 | 10.2. OAuth Parameter Registration . . . . . . . . . . . . . . 31 | |||
| 10.3. OAuth Access Token Types . . . . . . . . . . . . . . . . 30 | 10.3. OAuth Access Token Types . . . . . . . . . . . . . . . . 31 | |||
| 10.4. Token Type Mappings . . . . . . . . . . . . . . . . . . 30 | 10.4. Token Type Mappings . . . . . . . . . . . . . . . . . . 32 | |||
| 10.4.1. Registration Template . . . . . . . . . . . . . . . 30 | 10.4.1. Registration Template . . . . . . . . . . . . . . . 32 | |||
| 10.4.2. Initial Registry Contents . . . . . . . . . . . . . 31 | 10.4.2. Initial Registry Contents . . . . . . . . . . . . . 32 | |||
| 10.5. JSON Web Token Claims . . . . . . . . . . . . . . . . . 31 | 10.5. CBOR Web Token Claims . . . . . . . . . . . . . . . . . 32 | |||
| 10.6. ACE Profile Registry . . . . . . . . . . . . . . . . . . 31 | 10.6. ACE Profile Registry . . . . . . . . . . . . . . . . . . 33 | |||
| 10.6.1. Registration Template . . . . . . . . . . . . . . . 31 | 10.6.1. Registration Template . . . . . . . . . . . . . . . 33 | |||
| 10.7. OAuth Parameter Mappings Registry . . . . . . . . . . . 32 | 10.7. OAuth Parameter Mappings Registry . . . . . . . . . . . 33 | |||
| 10.7.1. Registration Template . . . . . . . . . . . . . . . 32 | 10.7.1. Registration Template . . . . . . . . . . . . . . . 33 | |||
| 10.7.2. Initial Registry Contents . . . . . . . . . . . . . 32 | 10.7.2. Initial Registry Contents . . . . . . . . . . . . . 34 | |||
| 10.8. Introspection Resource CBOR Mappings Registry . . . . . 34 | 10.8. Introspection Endpoint CBOR Mappings Registry . . . . . 36 | |||
| 10.8.1. Registration Template . . . . . . . . . . . . . . . 35 | 10.8.1. Registration Template . . . . . . . . . . . . . . . 36 | |||
| 10.8.2. Initial Registry Contents . . . . . . . . . . . . . 35 | 10.8.2. Initial Registry Contents . . . . . . . . . . . . . 36 | |||
| 10.9. CoAP Option Number Registration . . . . . . . . . . . . 37 | 10.9. CoAP Option Number Registration . . . . . . . . . . . . 38 | |||
| 11. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 37 | 11. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 39 | |||
| 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 38 | 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 39 | |||
| 12.1. Normative References . . . . . . . . . . . . . . . . . . 38 | 12.1. Normative References . . . . . . . . . . . . . . . . . . 39 | |||
| 12.2. Informative References . . . . . . . . . . . . . . . . . 38 | 12.2. Informative References . . . . . . . . . . . . . . . . . 40 | |||
| Appendix A. Design Justification . . . . . . . . . . . . . . . . 40 | Appendix A. Design Justification . . . . . . . . . . . . . . . . 42 | |||
| Appendix B. Roles and Responsibilites . . . . . . . . . . . . . 42 | Appendix B. Roles and Responsibilites . . . . . . . . . . . . . 44 | |||
| Appendix C. Deployment Examples . . . . . . . . . . . . . . . . 44 | Appendix C. Requirements on Profiles . . . . . . . . . . . . . . 46 | |||
| C.1. Local Token Validation . . . . . . . . . . . . . . . . . 44 | Appendix D. Deployment Examples . . . . . . . . . . . . . . . . 46 | |||
| C.2. Introspection Aided Token Validation . . . . . . . . . . 48 | D.1. Local Token Validation . . . . . . . . . . . . . . . . . 47 | |||
| Appendix D. Document Updates . . . . . . . . . . . . . . . . . . 51 | D.2. Introspection Aided Token Validation . . . . . . . . . . 50 | |||
| D.1. Version -01 to -02 . . . . . . . . . . . . . . . . . . . 52 | Appendix E. Document Updates . . . . . . . . . . . . . . . . . . 54 | |||
| D.2. Version -00 to -01 . . . . . . . . . . . . . . . . . . . 52 | E.1. Version -02 to -03 . . . . . . . . . . . . . . . . . . . 54 | |||
| Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 53 | E.2. Version -01 to -02 . . . . . . . . . . . . . . . . . . . 54 | |||
| E.3. Version -00 to -01 . . . . . . . . . . . . . . . . . . . 55 | ||||
| Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 56 | ||||
| 1. Introduction | 1. Introduction | |||
| Authorization is the process for granting approval to an entity to | Authorization is the process for granting approval to an entity to | |||
| access a resource [RFC4949]. The authorization task itself can best | access a resource [RFC4949]. The authorization task itself can best | |||
| be described as granting access to a requesting client, for a | be described as granting access to a requesting client, for a | |||
| resource hosted on a device, the resource server (RS). This exchange | resource hosted on a device, the resource server (RS). This exchange | |||
| is mediated by one or multiple authorization servers (AS). Managing | is mediated by one or multiple authorization servers (AS). Managing | |||
| authorization for a large number of devices and users is a complex | authorization for a large number of devices and users is a complex | |||
| task. | task. | |||
| We envision that end consumers and enterprises will manage access to | ||||
| resources on, or produced by, Internet of Things (IoT) devices in the | ||||
| same style as they do today with data, services and applications on | ||||
| the Web or with their mobile devices. This desire will increase with | ||||
| the number of exposed services and capabilities provided by | ||||
| applications hosted on the IoT devices. | ||||
| While prior work on authorization solutions for the Web and for the | While prior work on authorization solutions for the Web and for the | |||
| mobile environment also applies to the IoT environment many IoT | mobile environment also applies to the IoT environment many IoT | |||
| devices are constrained, for example in terms of processing | devices are constrained, for example in terms of processing | |||
| capabilities, available memory, etc. For web applications on | capabilities, available memory, etc. For web applications on | |||
| constrained nodes this specification makes use of CoAP [RFC7252]. | constrained nodes this specification makes use of CoAP [RFC7252]. | |||
| A detailed treatment of constraints can be found in [RFC7228], and | A detailed treatment of constraints can be found in [RFC7228], and | |||
| the different IoT deployments present a continuous range of device | the different IoT deployments present a continuous range of device | |||
| and network capabilities. Taking energy consumption as an example: | and network capabilities. Taking energy consumption as an example: | |||
| At one end there are energy-harvesting or battery powered devices | At one end there are energy-harvesting or battery powered devices | |||
| which have a tight power budget, on the other end there are mains- | which have a tight power budget, on the other end there are mains- | |||
| powered devices, and all levels in between. | powered devices, and all levels in between. | |||
| Hence, IoT devices may be very different in terms of available | Hence, IoT devices may be very different in terms of available | |||
| processing and message exchange capabilities and there is a need to | processing and message exchange capabilities and there is a need to | |||
| support many different authorization use cases [RFC7744]. | support many different authorization use cases [RFC7744]. | |||
| This specification describes a framework for authentication and | This specification describes a framework for authentication and | |||
| authorization in constrained environments (ACE) built on re-use of | authorization in constrained environments (ACE) built on re-use of | |||
| skipping to change at page 5, line 9 ¶ | skipping to change at page 5, line 7 ¶ | |||
| is not used in this memo. | is not used in this memo. | |||
| Since this specification focuses on the problem of access control to | Since this specification focuses on the problem of access control to | |||
| resources, we simplify the actors by assuming that the client | resources, we simplify the actors by assuming that the client | |||
| authorization server (CAS) functionality is not stand-alone but | authorization server (CAS) functionality is not stand-alone but | |||
| subsumed by either the authorization server or the client (see | subsumed by either the authorization server or the client (see | |||
| section 2.2 in [I-D.ietf-ace-actors]). | section 2.2 in [I-D.ietf-ace-actors]). | |||
| 3. Overview | 3. Overview | |||
| This specification describes the ACE framework for authorization in | This specification defines the ACE framework for authorization in the | |||
| the Internet of Things consisting of a set of building blocks. | Internet of Things environment. It consists of a set of building | |||
| blocks. | ||||
| The basic block is the OAuth 2.0 [RFC6749] framework, which enjoys | The basic block is the OAuth 2.0 [RFC6749] framework, which enjoys | |||
| widespread deployment. Many IoT devices can support OAuth 2.0 | widespread deployment. Many IoT devices can support OAuth 2.0 | |||
| without any additional extensions, but for certain constrained | without any additional extensions, but for certain constrained | |||
| settings additional profiling is needed. | settings additional profiling is needed. | |||
| Another building block is the lightweight web transfer protocol CoAP | Another building block is the lightweight web transfer protocol CoAP | |||
| [RFC7252] for those communication environments where HTTP is not | [RFC7252] for those communication environments where HTTP is not | |||
| appropriate. CoAP typically runs on top of UDP which further reduces | appropriate. CoAP typically runs on top of UDP which further reduces | |||
| overhead and message exchanges. While this specification defines | overhead and message exchanges. While this specification defines | |||
| extensions for the use of OAuth over CoAP, we do envision further | extensions for the use of OAuth over CoAP, we do envision further | |||
| underlying protocols to be supported in the future, such as MQTT or | underlying protocols to be supported in the future, such as HTTP/2, | |||
| QUIC. | MQTT and QUIC. | |||
| A third building block is CBOR [RFC7049] for encodings where JSON | A third building block is CBOR [RFC7049] for encodings where JSON | |||
| [RFC7159] is not sufficiently compact. CBOR is a binary encoding | [RFC7159] is not sufficiently compact. CBOR is a binary encoding | |||
| designed for small code and message size, which may be used for | designed for small code and message size, which may be used for | |||
| encoding of self contained tokens, and also for encoding CoAP POST | encoding of self contained tokens, and also for encoding CoAP POST | |||
| parameters and CoAP responses. | parameters and CoAP responses. | |||
| A fourth building block is the compact CBOR-based secure message | A fourth building block is the compact CBOR-based secure message | |||
| format COSE [I-D.ietf-cose-msg], which enables application layer | format COSE [I-D.ietf-cose-msg], which enables application layer | |||
| security as an alternative or complement to transport layer security | security as an alternative or complement to transport layer security | |||
| (DTLS [RFC6347] or TLS [RFC5246]). COSE is used to secure self | (DTLS [RFC6347] or TLS [RFC5246]). COSE is used to secure self | |||
| contained tokens such as proof-of-possession (PoP) tokens | contained tokens such as proof-of-possession (PoP) tokens, which is | |||
| [I-D.ietf-oauth-pop-architecture], which is an extension to the OAuth | an extension to the OAuth access tokens, and "client tokens" which | |||
| access tokens, and "client tokens" which are defined in this | are defined in this framework (see Section 7.4). The default access | |||
| framework (see Section 7.4). The default access token format is | token format is defined in CBOR web token (CWT) | |||
| defined in CBOR web token (CWT) [I-D.ietf-ace-cbor-web-token]. | [I-D.ietf-ace-cbor-web-token]. Application layer security for CoAP | |||
| Application layer security for CoAP using COSE can be provided with | using COSE can be provided with OSCOAP | |||
| OSCOAP [I-D.selander-ace-object-security]. | [I-D.selander-ace-object-security]. | |||
| With the building blocks listed above, solutions satisfying various | With the building blocks listed above, solutions satisfying various | |||
| IoT device and network constraints are possible. A list of | IoT device and network constraints are possible. A list of | |||
| constraints is described in detail in RFC 7228 [RFC7228] and a | constraints is described in detail in RFC 7228 [RFC7228] and a | |||
| description of how the building blocks mentioned above relate to the | description of how the building blocks mentioned above relate to the | |||
| various constraints can be found in Appendix A. | various constraints can be found in Appendix A. | |||
| Luckily, not every IoT device suffers from all constraints. The ACE | Luckily, not every IoT device suffers from all constraints. The ACE | |||
| framework nevertheless takes all these aspects into account and | framework nevertheless takes all these aspects into account and | |||
| allows several different deployment variants to co-exist rather than | allows several different deployment variants to co-exist rather than | |||
| skipping to change at page 7, line 9 ¶ | skipping to change at page 7, line 7 ¶ | |||
| client. | client. | |||
| Access tokens can have different formats, and various methods of | Access tokens can have different formats, and various methods of | |||
| utilization (e.g., cryptographic properties) based on the security | utilization (e.g., cryptographic properties) based on the security | |||
| requirements of the given deployment. | requirements of the given deployment. | |||
| Proof of Possession Tokens: | Proof of Possession Tokens: | |||
| An access token may be bound to a cryptographic key, which is then | An access token may be bound to a cryptographic key, which is then | |||
| used by an RS to authenticate requests from a client. Such tokens | used by an RS to authenticate requests from a client. Such tokens | |||
| are called proof-of-possession tokens (or PoP tokens) | are called proof-of-possession tokens (or PoP tokens). | |||
| [I-D.ietf-oauth-pop-architecture]. | ||||
| The proof-of-possession (PoP) security concept assumes that the AS | The proof-of-possession (PoP) security concept assumes that the AS | |||
| acts as a trusted third party that binds keys to access tokens. | acts as a trusted third party that binds keys to access tokens. | |||
| These so called PoP keys are then used by the client to | These so called PoP keys are then used by the client to | |||
| demonstrate the possession of the secret to the RS when accessing | demonstrate the possession of the secret to the RS when accessing | |||
| the resource. The RS, when receiving an access token, needs to | the resource. The RS, when receiving an access token, needs to | |||
| verify that the key used by the client matches the one included in | verify that the key used by the client matches the one bound to | |||
| the access token. When this specification uses the term "access | the access token. When this specification uses the term "access | |||
| token" it is assumed to be a PoP token unless specifically stated | token" it is assumed to be a PoP token unless specifically stated | |||
| otherwise. | otherwise. | |||
| The key bound to the access token (aka PoP key) may be based on | The key bound to the access token (aka PoP key) may be based on | |||
| symmetric as well as on asymmetric cryptography. The appropriate | symmetric as well as on asymmetric cryptography. The appropriate | |||
| choice of security depends on the constraints of the IoT devices | choice of security depends on the constraints of the IoT devices | |||
| as well as on the security requirements of the use case. | as well as on the security requirements of the use case. | |||
| Symmetric PoP key: The AS generates a random symmetric PoP key, | Symmetric PoP key: The AS generates a random symmetric PoP key. | |||
| encrypts it for the RS and includes it inside an access token. | The key is either stored to be returned on introspection calls | |||
| The PoP key is also encrypted for the client and sent together | or encrypted and included in the access token. The PoP key is | |||
| with the access token to the client.> | also encrypted for the client and sent together with the access | |||
| token to the client. | ||||
| Asymmetric PoP key: An asymmetric key pair is generated on the | Asymmetric PoP key: An asymmetric key pair is generated on the | |||
| client and the public key is sent to the AS (if it does not | client and the public key is sent to the AS (if it does not | |||
| already have knowledge of the client's public key). | already have knowledge of the client's public key). | |||
| Information about the public key, which is the PoP key in this | Information about the public key, which is the PoP key in this | |||
| case, is then included inside the access token and sent back to | case, is either stored to be returned on introspection calls or | |||
| the requesting client. The RS can identify the client's public | included inside the access token and sent back to the | |||
| key from the information in the token, which allows the client | requesting client. The RS can identify the client's public key | |||
| to use the corresponding private key for the proof of | from the information in the token, which allows the client to | |||
| possession. | use the corresponding private key for the proof of possession. | |||
| The access token is protected against modifications using a MAC or | The access token is protected against modifications using a MAC or | |||
| a digital signature, which is added by the AS. The choice of PoP | a digital signature, which is added by the AS. The choice of PoP | |||
| key does not necessarily imply a specific credential type for the | key does not necessarily imply a specific credential type for the | |||
| integrity protection of the token. More information about PoP | integrity protection of the token. | |||
| tokens can be found in [I-D.ietf-oauth-pop-architecture]. | ||||
| Scopes and Permissions: | Scopes and Permissions: | |||
| In OAuth 2.0, the client specifies the type of permissions it is | In OAuth 2.0, the client specifies the type of permissions it is | |||
| seeking to obtain (via the scope parameter) in the access request. | seeking to obtain (via the scope parameter) in the access token | |||
| In turn, the AS may use the scope response parameter to inform the | request. In turn, the AS may use the scope response parameter to | |||
| client of the scope of the access token issued. As the client | inform the client of the scope of the access token issued. As the | |||
| could be a constrained device as well, this specification uses | client could be a constrained device as well, this specification | |||
| CBOR encoded messages for CoAP, defined in Section 5, to request | uses CBOR encoded messages for CoAP, defined in Section 5, to | |||
| scopes and to be informed what scopes the access token was | request scopes and to be informed what scopes the access token was | |||
| actually authorized for by the AS. | actually authorized for by the AS. | |||
| The values of the scope parameter are expressed as a list of | The values of the scope parameter are expressed as a list of | |||
| space- delimited, case-sensitive strings, with a semantic that is | space- delimited, case-sensitive strings, with a semantic that is | |||
| well-known to the AS and the RS. More details about the concept | well-known to the AS and the RS. More details about the concept | |||
| of scopes is found under Section 3.3 in [RFC6749]. | of scopes is found under Section 3.3 in [RFC6749]. | |||
| Claims: | Claims: | |||
| Information carried in the access token, called claims, is in the | Information carried in the access token or returned from | |||
| form of type-value pairs. An access token may, for example, | introspection, called claims, is in the form of type-value pairs. | |||
| include a claim identifying the AS that issued the token (via the | An access token may, for example, include a claim identifying the | |||
| "iss" claim) and what audience the access token is intended for | AS that issued the token (via the "iss" claim) and what audience | |||
| (via the "aud" claim). The audience of an access token can be a | the access token is intended for (via the "aud" claim). The | |||
| specific resource or one or many resource servers. The resource | audience of an access token can be a specific resource or one or | |||
| owner policies influence what claims are put into the access token | many resource servers. The resource owner policies influence what | |||
| by the authorization server. | claims are put into the access token by the authorization server. | |||
| While the structure and encoding of the access token varies | While the structure and encoding of the access token varies | |||
| throughout deployments, a standardized format has been defined | throughout deployments, a standardized format has been defined | |||
| with the JSON Web Token (JWT) [RFC7519] where claims are encoded | with the JSON Web Token (JWT) [RFC7519] where claims are encoded | |||
| as a JSON object. In [I-D.ietf-ace-cbor-web-token] an equivalent | as a JSON object. In [I-D.ietf-ace-cbor-web-token] an equivalent | |||
| format using CBOR encoding (CWT) has been defined. | format using CBOR encoding (CWT) has been defined. | |||
| Introspection: | Introspection: | |||
| Introspection is a method for a resource server to query the | Introspection is a method for a resource server to query the | |||
| skipping to change at page 9, line 10 ¶ | skipping to change at page 9, line 6 ¶ | |||
| specifically designed for constrained environments. CoAP typically | specifically designed for constrained environments. CoAP typically | |||
| uses datagram-oriented transport, such as UDP, where reordering and | uses datagram-oriented transport, such as UDP, where reordering and | |||
| loss of packets can occur. A security solution need to take the | loss of packets can occur. A security solution need to take the | |||
| latter aspects into account. | latter aspects into account. | |||
| While HTTP uses headers and query-strings to convey additional | While HTTP uses headers and query-strings to convey additional | |||
| information about a request, CoAP encodes such information in so- | information about a request, CoAP encodes such information in so- | |||
| called 'options'. | called 'options'. | |||
| CoAP supports application-layer fragmentation of the CoAP payloads | CoAP supports application-layer fragmentation of the CoAP payloads | |||
| through blockwise transfers [I-D.ietf-core-block]. However, block- | through blockwise transfers [RFC7959]. However, block-wise transfer | |||
| wise transfer does not increase the size limits of CoAP options, | does not increase the size limits of CoAP options, therefore data | |||
| therefore data encoded in options has to be kept small. | encoded in options has to be kept small. | |||
| Transport layer security for CoAP can be provided by DTLS 1.2 | Transport layer security for CoAP can be provided by DTLS 1.2 | |||
| [RFC6347] or TLS 1.2 [RFC5246]. CoAP defines a number of proxy | [RFC6347] or TLS 1.2 [RFC5246]. CoAP defines a number of proxy | |||
| operations which requires transport layer security to be terminated | operations which requires transport layer security to be terminated | |||
| at the proxy. One approach for protecting CoAP communication end-to- | at the proxy. One approach for protecting CoAP communication end-to- | |||
| end through proxies, and also to support security for CoAP over | end through proxies, and also to support security for CoAP over | |||
| different transport in a uniform way, is to provide security on | different transport in a uniform way, is to provide security on | |||
| application layer using an object-based security mechanism such as | application layer using an object-based security mechanism such as | |||
| CBOR Encoded Message Syntax [I-D.ietf-cose-msg]. | COSE [I-D.ietf-cose-msg]. | |||
| One application of COSE is OSCOAP [I-D.selander-ace-object-security], | One application of COSE is OSCOAP [I-D.selander-ace-object-security], | |||
| which provides end-to-end confidentiality, integrity and replay | which provides end-to-end confidentiality, integrity and replay | |||
| protection, and a secure binding between CoAP request and response | protection, and a secure binding between CoAP request and response | |||
| messages. In OSCOAP, the CoAP messages are wrapped in COSE objects | messages. In OSCOAP, the CoAP messages are wrapped in COSE objects | |||
| and sent using CoAP. | and sent using CoAP. | |||
| 4. Protocol Interactions | 4. Protocol Interactions | |||
| The ACE framework is based on the OAuth 2.0 protocol interactions | The ACE framework is based on the OAuth 2.0 protocol interactions | |||
| using the /token and /introspect endpoints. A client obtains an | using the /token and /introspect endpoints. A client obtains an | |||
| access token from an AS using the /token endpoint and subsequently | access token from an AS using the /token endpoint and subsequently | |||
| presents the access token to a RS to gain access to a protected | presents the access token to a RS to gain access to a protected | |||
| resource. The RS, after receiving an access token, may present it to | resource. The RS, after receiving an access token, may present it to | |||
| the AS via the /introspect endpoint to get information about the | the AS via the /introspect endpoint to get information about the | |||
| access token. In other deployments the RS may process the access | access token. In other deployments the RS may process the access | |||
| token locally without the need to contact an AS. These interactions | token locally without the need to contact an AS. These interactions | |||
| are shown in Figure 1. An overview of various OAuth concepts is | are shown in Figure 1. An overview of various OAuth concepts is | |||
| provided in Section 3.1. | provided in Section 3.1. | |||
| The OAuth 2.0 framework defines a number of "protocol flows" via | ||||
| grant types, which have been extended further with extensions to | ||||
| OAuth 2.0 (such as RFC 7521 [RFC7521] and | ||||
| [I-D.ietf-oauth-device-flow]). What grant types works best depends | ||||
| on the usage scenario and RFC 7744 [RFC7744] describes many different | ||||
| IoT use cases but there two preferred grant types, namely the | ||||
| Authorization Code Grant (described in Section 4.1 of RFC 7521) and | ||||
| the Client Credentials Grant (described in Section 4.4 of RFC 7521). | ||||
| The Authorization Code Grant is a good fit for use with apps running | ||||
| on smart phones and tablets that request access to IoT devices, a | ||||
| common scenario in the smart home environment, where users need to go | ||||
| through an authentication and authorization phase (at least during | ||||
| the initial setup phase). The native apps guidelines described in | ||||
| [I-D.ietf-oauth-native-apps] are applicable to this use case. The | ||||
| Client Credential Grant is a good fit for use with IoT devices where | ||||
| the OAuth client itself is constraint. In such a case the resource | ||||
| owner or another person on his or her behalf have arranged with the | ||||
| authorization server out-of-band, which is often accomplished using | ||||
| an commissioning tool. | ||||
| The consent of the resource owner, for giving a client access to a | The consent of the resource owner, for giving a client access to a | |||
| protected resource, can be pre-configured authorization policies or | protected resource, can be provided dynamically as in the traditional | |||
| dynamically at the time when the request is sent. The resource owner | OAuth flows, or it could be pre-configured by the resource owner as | |||
| and the requesting party (i.e. client owner) are not shown in | authorization policies at the AS, which the AS evaluates when a token | |||
| Figure 1. | request arrives. The resource owner and the requesting party (i.e. | |||
| client owner) are not shown in Figure 1. | ||||
| This framework supports a wide variety of communication security | This framework supports a wide variety of communication security | |||
| mechanisms between the ACE entities, such as client, AS, and RS. We | mechanisms between the ACE entities, such as client, AS, and RS. We | |||
| assume that the client has been registered (also called enrolled or | assume that the client has been registered (also called enrolled or | |||
| onboarded) to an AS using a mechanism defined outside the scope of | onboarded) to an AS using a mechanism defined outside the scope of | |||
| this document. In practice, various techniques for onboarding have | this document. In practice, various techniques for onboarding have | |||
| been used, such as factory-based provisioning or the use of | been used, such as factory-based provisioning or the use of | |||
| commissioning tools. Regardless of the onboarding technique, this | commissioning tools. Regardless of the onboarding technique, this | |||
| registration procedure implies that the client and the AS share | registration procedure implies that the client and the AS share | |||
| credentials, and configuration parameters. These credentials are | credentials, and configuration parameters. These credentials are | |||
| skipping to change at page 10, line 32 ¶ | skipping to change at page 10, line 49 ¶ | |||
| At the start of the protocol there is an optional discovery step | At the start of the protocol there is an optional discovery step | |||
| where the client discovers the resource server and the resources this | where the client discovers the resource server and the resources this | |||
| server hosts. In this step the client might also determine what | server hosts. In this step the client might also determine what | |||
| permissions are needed to access the protected resource. The | permissions are needed to access the protected resource. The | |||
| detailed procedures for this discovery process may be defined in an | detailed procedures for this discovery process may be defined in an | |||
| ACE profile and depend on the protocols being used and the specific | ACE profile and depend on the protocols being used and the specific | |||
| deployment environment. | deployment environment. | |||
| In Bluetooth Low Energy, for example, advertisements are broadcasted | In Bluetooth Low Energy, for example, advertisements are broadcasted | |||
| by a peripheral, including information about the primary services. | by a peripheral, including information about the primary services. | |||
| In CoAP, as a second example, a client can makes a request to | In CoAP, as a second example, a client can make a request to "/.well- | |||
| "/.well-known/core" to obtain information about available resources, | known/core" to obtain information about available resources, which | |||
| which are returned in a standardized format as described in | are returned in a standardized format as described in [RFC6690]. | |||
| [RFC6690]. | ||||
| +--------+ +---------------+ | +--------+ +---------------+ | |||
| | |---(A)-- Token Request ------->| | | | |---(A)-- Token Request ------->| | | |||
| | | | Authorization | | | | | Authorization | | |||
| | |<--(B)-- Access Token ---------| Server | | | |<--(B)-- Access Token ---------| Server | | |||
| | | + Client Information | | | | | + RS Information | | | |||
| | | +---------------+ | | | +---------------+ | |||
| | | ^ | | | | ^ | | |||
| | | Introspection Request (D)| | | | | Introspection Request (D)| | | |||
| | Client | | | | | Client | | | | |||
| | | Response + Client Token | |(E) | | | Response + Client Token | |(E) | |||
| | | | v | | | | v | |||
| | | +--------------+ | | | +--------------+ | |||
| | |---(C)-- Token + Request ----->| | | | |---(C)-- Token + Request ----->| | | |||
| | | | Resource | | | | | Resource | | |||
| | |<--(F)-- Protected Resource ---| Server | | | |<--(F)-- Protected Resource ---| Server | | |||
| skipping to change at page 11, line 39 ¶ | skipping to change at page 11, line 39 ¶ | |||
| Section 3.1 for a short description) wherein the AS binds a key to | Section 3.1 for a short description) wherein the AS binds a key to | |||
| an access token. The client may include permissions it seeks to | an access token. The client may include permissions it seeks to | |||
| obtain, and information about the credentials it wants to use | obtain, and information about the credentials it wants to use | |||
| (e.g., symmetric/asymmetric cryptography or a reference to a | (e.g., symmetric/asymmetric cryptography or a reference to a | |||
| specific credential). | specific credential). | |||
| Access Token Response (B): | Access Token Response (B): | |||
| If the AS successfully processes the request from the client, it | If the AS successfully processes the request from the client, it | |||
| returns an access token. It also returns various parameters, | returns an access token. It also returns various parameters, | |||
| referred as "Client Information". In addition to the response | referred as "RS Information". In addition to the response | |||
| parameters defined by OAuth 2.0 and the PoP token extension, | parameters defined by OAuth 2.0 and the PoP token extension, | |||
| further response parameters, such as information on which profile | further response parameters, such as information on which profile | |||
| the client should use with the resource server(s). More | the client should use with the resource server(s). More | |||
| information about these parameters can be found in in Section 6.4. | information about these parameters can be found in in Section 6.4. | |||
| Resource Request (C): | Resource Request (C): | |||
| The client interacts with the RS to request access to the | The client interacts with the RS to request access to the | |||
| protected resource and provides the access token. The protocol to | protected resource and provides the access token. The protocol to | |||
| use between the client and the RS is not restricted to CoAP. | use between the client and the RS is not restricted to CoAP. | |||
| HTTP, HTTP/2, QUIC, MQTT, Bluetooth Low Energy, etc., are also | HTTP, HTTP/2, QUIC, MQTT, Bluetooth Low Energy, etc., are also | |||
| viable candidates. | viable candidates. | |||
| Depending on the device limitations and the selected protocol this | Depending on the device limitations and the selected protocol this | |||
| exchange may be split up into two parts: | exchange may be split up into two parts: | |||
| (1) the client sends the access token containing, or | (1) the client sends the access token containing, or | |||
| referencing, the authorization information to the RS, that may | referencing, the authorization information to the RS, that may | |||
| be used for subsequent resource requests by the client, and | be used for subsequent resource requests by the client, and | |||
| (2) the client makes the resource access request, using the | (2) the client makes the resource access request, using the | |||
| communication security protocol and other client information | communication security protocol and other RS Information | |||
| obtained from the AS. | obtained from the AS. | |||
| The Client and the RS mutually authenticate using the security | The Client and the RS mutually authenticate using the security | |||
| protocol specified in the profile (see step B) and the keys | protocol specified in the profile (see step B) and the keys | |||
| obtained in the access token or the client information or the | obtained in the access token or the RS Information or the client | |||
| client token. The RS verifies that the token is integrity | token. The RS verifies that the token is integrity protected by | |||
| protected by the AS and compares the claims contained in the | the AS and compares the claims contained in the access token with | |||
| access token with the resource request. If the RS is online, | the resource request. If the RS is online, validation can be | |||
| validation can be handed over to the AS using token introspection | handed over to the AS using token introspection (see messages D | |||
| (see messages D and E) over HTTP or CoAP, in which case the | and E) over HTTP or CoAP, in which case the different parts of | |||
| different parts of step C may be interleaved with introspection. | step C may be interleaved with introspection. | |||
| Token Introspection Request (D): | Token Introspection Request (D): | |||
| A resource server may be configured to introspect the access token | A resource server may be configured to introspect the access token | |||
| by including it in a request to the /introspect endpoint at that | by including it in a request to the /introspect endpoint at that | |||
| AS. Token introspection over CoAP is defined in Section 7 and for | AS. Token introspection over CoAP is defined in Section 7 and for | |||
| HTTP in [RFC7662]. | HTTP in [RFC7662]. | |||
| Note that token introspection is an optional step and can be | Note that token introspection is an optional step and can be | |||
| omitted if the token is self-contained and the resource server is | omitted if the token is self-contained and the resource server is | |||
| skipping to change at page 13, line 22 ¶ | skipping to change at page 13, line 22 ¶ | |||
| For IoT we cannot generally assume that the client and RS are part | For IoT we cannot generally assume that the client and RS are part | |||
| of a common key infrastructure, so the AS provisions credentials | of a common key infrastructure, so the AS provisions credentials | |||
| or associated information to allow mutual authentication. These | or associated information to allow mutual authentication. These | |||
| credentials need to be provided to the parties before or during | credentials need to be provided to the parties before or during | |||
| the authentication protocol is executed, and may be re-used for | the authentication protocol is executed, and may be re-used for | |||
| subsequent token requests. | subsequent token requests. | |||
| Proof-of-Possession | Proof-of-Possession | |||
| The ACE framework by default implements proof-of-possession for | The ACE framework by default implements proof-of-possession for | |||
| access tokens, i.e. that the authenticated token holder is bound | access tokens, i.e. that the token holder can prove being a holder | |||
| to the token. The binding is provided by the "cnf" claim | of the key bound to the token. The binding is provided by the | |||
| indicating what key is used for mutual authentication. If clients | "cnf" claim indicating what key is used for mutual authentication. | |||
| need to update a token, e.g. to get additional rights, they can | If clients need to update a token, e.g. to get additional rights, | |||
| request that the AS binds the new access token to the same | they can request that the AS binds the new access token to the | |||
| credential as the previous token. | same credential as the previous token. | |||
| ACE Profile Negotiation | ACE Profiles | |||
| The client or RS may be limited in the encodings or protocols it | The client or RS may be limited in the encodings or protocols it | |||
| supports. To support a variety of different deployment settings, | supports. To support a variety of different deployment settings, | |||
| specific interactions between client and RS are defined in an ACE | specific interactions between client and RS are defined in an ACE | |||
| profile. The ACE framework supports the negotiation of different | profile. In ACE framework the AS is expected to manage the | |||
| ACE profiles between client and AS using the "profile" parameter | matching of compatible profile choices between a client and an RS. | |||
| in the token request and token response. | The AS informs the client of the selected profile using the | |||
| "profile" parameter in the token request and token response. | ||||
| OAuth 2.0 requires the use of TLS both to protect the communication | OAuth 2.0 requires the use of TLS both to protect the communication | |||
| between AS and client when requesting an access token and between AS | between AS and client when requesting an access token; between client | |||
| and RS for introspection. In constrained settings TLS is not always | and RS when accessing a resource and between AS and RS for | |||
| feasible, or desirable. Nevertheless it is REQUIRED that the data | introspection. In constrained settings TLS is not always feasible, | |||
| exchanged with the AS is encrypted and integrity protected. It is | or desirable. Nevertheless it is REQUIRED that the data exchanged | |||
| furthermore REQUIRED that the AS and the endpoint communicating with | with the AS is encrypted and integrity protected. It is furthermore | |||
| it (client or RS) perform mutual authentication. | REQUIRED that the AS and the endpoint communicating with it (client | |||
| or RS) perform mutual authentication. | ||||
| Profiles are expected to specify the details of how this is done, | Profiles are expected to specify the details of how this is done, | |||
| depending e.g. on the communication protocol and the credentials used | depending e.g. on the communication protocol and the credentials used | |||
| by the client or the RS. | by the client or the RS. | |||
| In OAuth 2.0 the communication with the Token and the Introspection | In OAuth 2.0 the communication with the Token and the Introspection | |||
| resources at the AS is assumed to be via HTTP and may use Uri-query | endpoints at the AS is assumed to be via HTTP and may use Uri-query | |||
| parameters. This framework RECOMMENDS to use CoAP instead and | parameters. This framework RECOMMENDS to use CoAP instead and | |||
| RECOMMENDS the use of the following alternative instead of Uri-query | RECOMMENDS the use of the following alternative instead of Uri-query | |||
| parameters: The sender (client or RS) encodes the parameters of its | parameters: The sender (client or RS) encodes the parameters of its | |||
| request as a CBOR map and submits that map as the payload of the POST | request as a CBOR map and submits that map as the payload of the POST | |||
| request. The Content-format MUST be "application/cbor" in that case. | request. The Content-format depends on the security applied to the | |||
| content and must be specified by the corresponding profile. | ||||
| The OAuth 2.0 AS uses a JSON structure in the payload of its | The OAuth 2.0 AS uses a JSON structure in the payload of its | |||
| responses both to client and RS. This framework RECOMMENDS the use | responses both to client and RS. This framework RECOMMENDS the use | |||
| of CBOR [RFC7049] instead. The requesting device can explicitly | of CBOR [RFC7049] instead. The requesting device can explicitly | |||
| request this encoding by setting the CoAP Accept option in the | request this encoding by setting the CoAP Accept option in the | |||
| request to "application/cbor". | request to "application/cbor". Depending on the profile, the content | |||
| may arrive in a different format wrapping a CBOR payload. | ||||
| 6. The 'Token' Resource | 6. The 'Token' Endpoint | |||
| In plain OAuth 2.0 the AS provides the /token resource for submitting | In plain OAuth 2.0 the AS provides the /token endpoint for submitting | |||
| access token requests. This framework extends the functionality of | access token requests. This framework extends the functionality of | |||
| the /token resource, giving the AS the possibility to help client and | the /token endpoint, giving the AS the possibility to help client and | |||
| RS to establish shared keys or to exchange their public keys. | RS to establish shared keys or to exchange their public keys. | |||
| Furthermore this framework defines encodings using CoAP and CBOR, | ||||
| instead of HTTP and JSON. | ||||
| Communication between the client and the token resource at the AS | Communication between the client and the /token endpoint at the AS | |||
| MUST be integrity protected and encrypted. Furthermore AS and client | MUST be integrity protected and encrypted. Furthermore AS and client | |||
| MUST perform mutual authentication. Profiles of this framework are | MUST perform mutual authentication. Profiles of this framework are | |||
| expected to specify how authentication and communication security is | expected to specify how authentication and communication security is | |||
| implemented. | implemented. | |||
| The figures of this section uses CBOR diagnostic notation without the | The figures of this section uses CBOR diagnostic notation without the | |||
| integer abbreviations for the parameters or their values for better | integer abbreviations for the parameters or their values for better | |||
| readability. | readability. | |||
| 6.1. Client-to-AS Request | 6.1. Client-to-AS Request | |||
| When requesting an access token from the AS, the client MAY include | The client sends a CoAP POST request to the token endpoint at the AS, | |||
| the following parameters in the request in addition to the ones | the profile is expected to specify the Content-Type and wrapping of | |||
| required or optional according to the OAuth 2.0 specification | the payload. The content of the request consists of the parameters | |||
| [RFC6749]: | specified in section 4 of the OAuth 2.0 specification [RFC6749] | |||
| encoded as a CBOR map. | ||||
| token_type | ||||
| OPTIONAL. See Section 6.4 for more details. | ||||
| alg | In addition to these parameters, this framework defines the following | |||
| OPTIONAL. See Section 6.4 for more details. | parameters for requesting an access token from a /token endpoint: | |||
| profile | aud | |||
| OPTIONAL. This indicates the profile that the client would like | OPTIONAL. Specifies the audience for which the client is | |||
| to use with the RS. See Section 6.4 for more details on the | requesting an access token. If this parameter is missing it is | |||
| formatting of this parameter. If the RS cannot support the | assumed that the client and the AS have a pre-established | |||
| requested profile, the AS MUST reply with an error message. | understanding of the audience that an access token should address. | |||
| If a client submits a request for an access token without | ||||
| specifying an "aud" parameter, and the AS does not have a default | ||||
| "aud" value for this client, then the AS MUST respond with an | ||||
| error message with the CoAP response code 4.00 (Bad Request). | ||||
| cnf | cnf | |||
| OPTIONAL. This field contains information about a public key the | OPTIONAL. This field contains information about the key the | |||
| client would like to bind to the access token. If the client | client would like to bind to the access token for proof-of- | |||
| requests an asymmetric proof-of-possession algorithm, but does not | possession. It is NOT RECOMMENDED that a client submits a | |||
| provide a public key, the AS MUST respond with an error message. | symmetric key value to the AS using this parameter. See | |||
| See Section 6.4 for more details on the formatting of the 'cnf' | Section 6.4.5 for more details on the formatting of the 'cnf' | |||
| parameter. | parameter. | |||
| These new parameters are optional in the case where the AS has prior | ||||
| knowledge of the capabilities of the client, otherwise these | ||||
| parameters are required. This prior knowledge may, for example, be | ||||
| set by the use of a dynamic client registration protocol exchange | ||||
| [RFC7591]. | ||||
| The following examples illustrate different types of requests for | The following examples illustrate different types of requests for | |||
| proof-of-possession tokens. | proof-of-possession tokens. | |||
| Figure 2 shows a request for a token with a symmetric proof-of- | Figure 2 shows a request for a token with a symmetric proof-of- | |||
| possession key. | possession key. Note that in this example we assume a DTLS-based | |||
| communication security profile, therefore the Content-Type is | ||||
| "application/cbor". | ||||
| Header: POST (Code=0.02) | Header: POST (Code=0.02) | |||
| Uri-Host: "server.example.com" | Uri-Host: "server.example.com" | |||
| Uri-Path: "token" | Uri-Path: "token" | |||
| Content-Type: "application/cbor" | Content-Type: "application/cbor" | |||
| Payload: | Payload: | |||
| { | { | |||
| "grant_type" : "client_credentials", | "grant_type" : "client_credentials", | |||
| "aud" : "tempSensor4711", | "aud" : "tempSensor4711", | |||
| "client_id" : "myclient", | } | |||
| "client_secret" : b64'FWRUVGZUZmZFRkWSRlVGhA', | ||||
| "token_type" : "pop", | ||||
| "alg" : "HS256", | ||||
| "profile" : "coap_dtls" | ||||
| } | ||||
| Figure 2: Example request for an access token bound to a symmetric | Figure 2: Example request for an access token bound to a symmetric | |||
| key. | key. | |||
| Figure 3 shows a request for a token with an asymmetric proof-of- | Figure 3 shows a request for a token with an asymmetric proof-of- | |||
| possession key. | possession key. Note that in this example we assume an object | |||
| security-based profile, therefore the Content-Type is "application/ | ||||
| cose+cbor". | ||||
| Header: POST (Code=0.02) | Header: POST (Code=0.02) | |||
| Uri-Host: "server.example.com" | Uri-Host: "server.example.com" | |||
| Uri-Path: "token" | Uri-Path: "token" | |||
| Content-Type: "application/cbor" | Content-Type: "application/cose+cbor" | |||
| Payload: | Payload: | |||
| { | { | |||
| "grant_type" : "token", | "grant_type" : "client_credentials", | |||
| "aud" : "lockOfDoor0815", | ||||
| "client_id" : "myclient", | ||||
| "token_type" : "pop", | ||||
| "alg" : "ES256", | ||||
| "profile" : "coap_oscoap" | ||||
| "cnf" : { | "cnf" : { | |||
| "COSE_Key" : { | "COSE_Key" : { | |||
| "kty" : "EC", | "kty" : "EC", | |||
| "kid" : h'11', | "kid" : h'11', | |||
| "crv" : "P-256", | "crv" : "P-256", | |||
| "x" : b64'usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8', | "x" : b64'usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8', | |||
| "y" : b64'IBOL+C3BttVivg+lSreASjpkttcsz+1rb7btKLv8EX4' | "y" : b64'IBOL+C3BttVivg+lSreASjpkttcsz+1rb7btKLv8EX4' | |||
| } | } | |||
| } | } | |||
| } | } | |||
| Figure 3: Example request for an access token bound to an asymmetric | Figure 3: Example request for an access token bound to an asymmetric | |||
| key. | key. | |||
| Figure 4 shows a request for a token where a previously communicated | Figure 4 shows a request for a token where a previously communicated | |||
| proof-of-possession key is only referenced. | proof-of-possession key is only referenced. Note that we assume a | |||
| DTLS-based communication security profile for this example, therefore | ||||
| the Content-Type is "application/cbor". Also note that the client | ||||
| performs a password based authentication in this example by | ||||
| submitting its client_secret. | ||||
| Header: POST (Code=0.02) | Header: POST (Code=0.02) | |||
| Uri-Host: "server.example.com" | Uri-Host: "server.example.com" | |||
| Uri-Path: "token" | Uri-Path: "token" | |||
| Content-Type: "application/cbor" | Content-Type: "application/cbor" | |||
| Payload: | Payload: | |||
| { | { | |||
| "grant_type" : "client_credentials", | "grant_type" : "client_credentials", | |||
| "client_id" : "myclient", | ||||
| "client_secret" : "mysecret234", | ||||
| "aud" : "valve424", | "aud" : "valve424", | |||
| "scope" : "read", | "scope" : "read", | |||
| "client_id" : "myclient", | ||||
| "token_type" : "pop", | ||||
| "alg" : "ES256", | ||||
| "profile" : "coap_oscoap" | ||||
| "cnf" : { | "cnf" : { | |||
| "kid" : b64'6kg0dXJM13U' | "kid" : b64'6kg0dXJM13U' | |||
| } | } | |||
| } | } | |||
| Figure 4: Example request for an access token bound to a key | Figure 4: Example request for an access token bound to a key | |||
| reference. | reference. | |||
| 6.2. AS-to-Client Response | 6.2. AS-to-Client Response | |||
| If the access token request has been successfully verified by the AS | If the access token request has been successfully verified by the AS | |||
| and the client is authorized to obtain a PoP token for the indicated | and the client is authorized to obtain an access token corresponding | |||
| audience and scopes (if any), the AS issues an access token. If | to its access token request, the AS sends a response with the CoAP | |||
| client authentication failed or is invalid, the authorization server | response code 2.01 (Created). If client request was invalid, or not | |||
| returns an error response as described in Section 6.3. | authorized, the AS returns an error response as described in | |||
| Section 6.3. | ||||
| The following parameters may also be part of a successful response in | Note that the AS decides which token type and profile to use when | |||
| addition to those defined in section 5.1 of [RFC6749]: | issuing a successful response. It is assumed that the AS has prior | |||
| knowledge of the capabilities of the client, and the RS. This prior | ||||
| knowledge may, for example, be set by the use of a dynamic client | ||||
| registration protocol exchange [RFC7591]. | ||||
| The content of the successful reply MUST be encoded as CBOR map, | ||||
| containing paramters as speficied in section 5.1 of [RFC6749]. In | ||||
| addition to these parameters, the following parameters are also part | ||||
| of a successful response: | ||||
| profile | profile | |||
| REQUIRED. This indicates the profile that the client MUST use | REQUIRED. This indicates the profile that the client MUST use | |||
| towards the RS. See Section 6.4 for the formatting of this | towards the RS. See Section 6.4.4 for the formatting of this | |||
| parameter. | parameter. | |||
| cnf | cnf | |||
| REQUIRED. This field contains information about the proof-of | REQUIRED if the token type is 'pop'. OPTIONAL otherwise. If a | |||
| possession key for this access token. See Section 6.4 for the | symmetric proof-of-possession algorithms was selected, this field | |||
| contains the proof-of-possession key. If an asymmetric algorithm | ||||
| was selected, this field contains information about the public key | ||||
| used by the RS to authenticate. See Section 6.4.5 for the | ||||
| formatting of this parameter. | formatting of this parameter. | |||
| token_type | ||||
| OPTIONAL. By default implementations of this framework SHOULD | ||||
| assume that the token_type is 'pop'. If a specific use case | ||||
| requires another token_type (e.g. 'Bearer') to be used then this | ||||
| parameter is REQUIRED. | ||||
| Note that the access token can also contains a 'cnf' claim, however, | Note that if CBOR Web Tokens [I-D.ietf-ace-cbor-web-token] are used, | |||
| these two values are consumed by different parties. The access token | the access token can also contain a 'cnf' claim. This claim is | |||
| is created by the AS and processed by the RS (and opaque to the | however consumed by a different party. The access token is created | |||
| client) whereas the Client Information is created by the AS and | by the AS and processed by the RS (and opaque to the client) whereas | |||
| processed by the client; it is never forwarded to the resource | the RS Information is created by the AS and processed by the client; | |||
| server. | it is never forwarded to the resource server. | |||
| The following examples illustrate different types of responses for | The following examples illustrate different types of responses for | |||
| proof-of-possession tokens. | proof-of-possession tokens. | |||
| Figure 5 shows a response containing a token and a 'cnf' parameter | Figure 5 shows a response containing a token and a 'cnf' parameter | |||
| with a symmetric proof-of-possession key. | with a symmetric proof-of-possession key. Note that we assume a | |||
| DTLS-based communication security profile for this example, therefore | ||||
| the Content-Type is "application/cbor". | ||||
| Header: Created (Code=2.01) | Header: Created (Code=2.01) | |||
| Content-Type: "application/cbor" | Content-Type: "application/cbor" | |||
| Payload: | Payload: | |||
| { | { | |||
| "access_token" : b64'SlAV32hkKG ... | "access_token" : b64'SlAV32hkKG ... | |||
| (remainder of CWT omitted for brevity; | (remainder of CWT omitted for brevity; | |||
| CWT contains COSE_Key in the 'cnf' claim)', | CWT contains COSE_Key in the 'cnf' claim)', | |||
| "token_type" : "pop", | ||||
| "alg" : "HS256", | ||||
| "expires_in" : "3600", | "expires_in" : "3600", | |||
| "profile" : "coap_dtls" | ||||
| "cnf" : { | "cnf" : { | |||
| "COSE_Key" : { | "COSE_Key" : { | |||
| "kty" : "Symmetric", | "kty" : "Symmetric", | |||
| "kid" : b64'39Gqlw', | "kid" : b64'39Gqlw', | |||
| "k" : b64'hJtXhkV8FJG+Onbc6mxCcQh' | "k" : b64'hJtXhkV8FJG+Onbc6mxCcQh' | |||
| } | } | |||
| } | } | |||
| } | } | |||
| Figure 5: Example AS response with an access token bound to a | Figure 5: Example AS response with an access token bound to a | |||
| symmetric key. | symmetric key. | |||
| 6.3. Error Response | 6.3. Error Response | |||
| The error responses for CoAP-based interactions with the AS are | The error responses for CoAP-based interactions with the AS are | |||
| equivalent to the ones for HTTP-based interactions as defined in | equivalent to the ones for HTTP-based interactions as defined in | |||
| section 5.2 of [RFC6749], with the following differences: The | section 5.2 of [RFC6749], with the following differences: The | |||
| Content-Type MUST be set to "application/cbor", the payload MUST be | Content-Type is specified by the communication security profile used | |||
| encoded in a CBOR map and the CoAP response code 4.00 Bad Request | between client and AS. The raw payload before being processed by the | |||
| MUST be used unless specified otherwise. | communication security protocol MUST be encoded as a CBOR map and the | |||
| CoAP response code 4.00 (Bad Request) MUST be used unless specified | ||||
| otherwise. | ||||
| 6.4. New Request and Response Parameters | 6.4. New Request and Response Parameters | |||
| This section defines parameters that can be used in access token | This section provides more detail about the new parameters that can | |||
| requests and responses, as well as abbreviations for more compact | be used in access token requests and responses, as well as | |||
| encoding of existing parameters and common values. | abbreviations for more compact encoding of existing parameters and | |||
| common parameter values. | ||||
| 6.4.1. Grant Type | 6.4.1. Audience | |||
| This parameter specifies for which audience the client is requesting | ||||
| a token. It should be encoded as CBOR text string (major type 3). | ||||
| The formatting and semantics of these strings are application | ||||
| specific. | ||||
| 6.4.2. Grant Type | ||||
| The abbreviations in Figure 6 MAY be used in CBOR encodings instead | The abbreviations in Figure 6 MAY be used in CBOR encodings instead | |||
| of the string values defined in [RFC6749]. | of the string values defined in [RFC6749]. | |||
| /--------------------+----------+--------------\ | /--------------------+----------+--------------\ | |||
| | grant_type | CBOR Key | Major Type | | | grant_type | CBOR Key | Major Type | | |||
| |--------------------+----------+--------------| | |--------------------+----------+--------------| | |||
| | password | 0 | 0 (uint) | | | password | 0 | 0 (uint) | | |||
| | authorization_code | 1 | 0 | | | authorization_code | 1 | 0 | | |||
| | client_credentials | 2 | 0 | | | client_credentials | 2 | 0 | | |||
| | refresh_token | 3 | 0 | | | refresh_token | 3 | 0 | | |||
| \--------------------+----------+--------------/ | \--------------------+----------+--------------/ | |||
| Figure 6: CBOR abbreviations for common grant types | Figure 6: CBOR abbreviations for common grant types | |||
| 6.4.2. Token Type and Algorithms | 6.4.3. Token Type | |||
| To allow clients to indicate support for specific token types and | ||||
| respective algorithms they need to interact with the AS. They can | ||||
| either provide this information out-of-band or via the 'token_type' | ||||
| and 'alg' parameter in the client request. | ||||
| The value in the 'alg' parameter together with value from the | The 'token_type' parameter allows the AS to indicate to the client | |||
| 'token_type' parameter allow the client to indicate the supported | which type of access token it is receiving (e.g. a bearer token). | |||
| algorithms for a given token type. The token type refers to the | The 'pop' token type MUST be assumed by default if the AS does not | |||
| specification used by the client to interact with the resource server | provide a different value. | |||
| to demonstrate possession of the key. The 'alg' parameter provides | ||||
| further information about the algorithm, such as whether a symmetric | ||||
| or an asymmetric crypto-system is used. Hence, a client supporting a | ||||
| specific token type also knows how to populate the values to the | ||||
| 'alg' parameter. | ||||
| This document registers the new value "pop" for the OAuth Access | This document registers the new value "pop" for the OAuth Access | |||
| Token Types registry, specifying a Proof-of-Possession token. How | Token Types registry, specifying a Proof-of-Possession token. How | |||
| the proof-of-possession is performed is specified by the 'alg' | the proof-of-possession is performed is specified by the profiles. | |||
| parameter. Profiles of this framework are responsible for defining | ||||
| values for the 'alg' parameter together with the corresponding proof- | ||||
| of-possession mechanisms. | ||||
| The values in the 'alg' parameter are case-sensitive. If the client | ||||
| supports more than one algorithm then each individual value MUST be | ||||
| separated by a space. | ||||
| 6.4.3. Profile | ||||
| The "profile" parameter identifies the communication protocol and the | The values in the 'token_type' parameter are CBOR text strings (major | |||
| communication security protocol between the client and the RS. | type 3). | |||
| An initial set of profile identifiers and their CBOR encodings are | 6.4.4. Profile | |||
| specified in Figure 7. Profiles using other combinations of | ||||
| protocols are expected to define their own profile identifiers. | ||||
| /--------------------+----------+--------------\ | Profiles of this framework are expected to define the communication | |||
| | Profile identifier | CBOR Key | Major Type | | protocol and the communication security protocol between the client | |||
| |--------------------+----------+--------------| | and the RS. Furthermore profiles are expected to define proof-of- | |||
| | http_tls | 0 | 0 (uint) | | possession methods, if they support proof-of-possession tokens. | |||
| | coap_dtls | 1 | 0 | | ||||
| | coap_oscoap | 2 | 0 | | ||||
| \--------------------+----------+--------------/ | ||||
| Figure 7: Profile identifiers and their CBOR mappings | A profile should specify an identifier that is used to uniquely | |||
| identify itself in the 'profile' parameter. | ||||
| Profiles MAY define additional parameters for both the token request | Profiles MAY define additional parameters for both the token request | |||
| and the client information in the access token response in order to | and the RS Information in the access token response in order to | |||
| support negotioation or signalling of profile specific parameters. | support negotioation or signalling of profile specific parameters. | |||
| 6.4.4. Confirmation | 6.4.5. Confirmation | |||
| The "cnf" parameter identifies or provides the key used for proof-of- | The "cnf" parameter identifies or provides the key used for proof-of- | |||
| possession. This framework extends the definition of 'cnf' from | possession or for authenticating the RS depending on the proof-of- | |||
| [RFC7800] by defining CBOR/COSE encodings and the use of 'cnf' for | possession algorithm and the context cnf is used in. This framework | |||
| transporting keys in the client information. | extends the definition of 'cnf' from [RFC7800] by adding CBOR/COSE | |||
| encodings and the use of 'cnf' for transporting keys in the RS | ||||
| Information. | ||||
| A CBOR encoded payload MAY contain the 'cnf' parameter with the | A CBOR encoded payload MAY contain the 'cnf' parameter with the | |||
| following contents: | following contents: | |||
| COSE_Key In this case the 'cnf' parameter contains the proof-of- | COSE_Key In this case the 'cnf' parameter contains the proof-of- | |||
| possession key to be used by the client. An example is shown in | possession key to be used by the client. An example is shown in | |||
| Figure 8. | Figure 7. | |||
| "cnf" : { | "cnf" : { | |||
| "COSE_Key" : { | "COSE_Key" : { | |||
| "kty" : "EC", | "kty" : "EC", | |||
| "kid" : h'11', | "kid" : h'11', | |||
| "crv" : "P-256", | "crv" : "P-256", | |||
| "x" : b64'usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8', | "x" : b64'usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8', | |||
| "y" : b64'IBOL+C3BttVivg+lSreASjpkttcsz+1rb7btKLv8EX4' | "y" : b64'IBOL+C3BttVivg+lSreASjpkttcsz+1rb7btKLv8EX4' | |||
| } | } | |||
| } | } | |||
| Figure 8: Confirmation parameter containing a public key | Figure 7: Confirmation parameter containing a public key | |||
| Note that the COSE_Key structure may contain an "alg" or "key_ops" | ||||
| parameter. If such parameters are present, a client MUST NOT use | ||||
| a key that is not compatible with the profile or proof-of- | ||||
| possession algorithm according to those parameters. | ||||
| COSE_Encrypted In this case the 'cnf' parameter contains an | COSE_Encrypted In this case the 'cnf' parameter contains an | |||
| encrypted symmetriic key destined for the client. The client is | encrypted symmetric key destined for the client. The client is | |||
| assumed to be able to decrypt the cihpertext of this parameter. | assumed to be able to decrypt the cihpertext of this parameter. | |||
| The parameter is encoded as COSE_Encrypted object wrapping a | The parameter is encoded as COSE_Encrypted object wrapping a | |||
| COSE_Key object. Figure 9 shows an example of this type of | COSE_Key object. Figure 8 shows an example of this type of | |||
| encoding. | encoding. | |||
| "cnf" : { | "cnf" : { | |||
| "COSE_Encrypted" : { | "COSE_Encrypted" : { | |||
| 993( | 993( | |||
| [ h'a1010a' # protected header : {"alg" : "AES-CCM-16-64-128"} | [ h'a1010a' # protected header : {"alg" : "AES-CCM-16-64-128"} | |||
| "iv" : b64'ifUvZaHFgJM7UmGnjA', # unprotected header | "iv" : b64'ifUvZaHFgJM7UmGnjA', # unprotected header | |||
| b64'WXThuZo6TMCaZZqi6ef/8WHTjOdGk8kNzaIhIQ' # ciphertext | b64'WXThuZo6TMCaZZqi6ef/8WHTjOdGk8kNzaIhIQ' # ciphertext | |||
| ] | ] | |||
| ) | ) | |||
| } | } | |||
| } | } | |||
| Figure 9: Confirmation paramter containing an encrypted symmetric key | Figure 8: Confirmation paramter containing an encrypted symmetric key | |||
| The ciphertext here could e.g. contain a symmetric key as in | The ciphertext here could e.g. contain a symmetric key as in | |||
| Figure 10. | Figure 9. | |||
| { | { | |||
| "kty" : "Symmetric", | "kty" : "Symmetric", | |||
| "kid" : b64'39Gqlw', | "kid" : b64'39Gqlw', | |||
| "k" : b64'hJtXhkV8FJG+Onbc6mxCcQh' | "k" : b64'hJtXhkV8FJG+Onbc6mxCcQh' | |||
| } | } | |||
| Figure 10: Example plaintext of an encrypted cnf parameter | Figure 9: Example plaintext of an encrypted cnf parameter | |||
| Key Identifier In this case the 'cnf' parameter references a key | Key Identifier In this case the 'cnf' parameter references a key | |||
| that is assumed to be previously known by the recipient. This | that is assumed to be previously known by the recipient. This | |||
| allows clients that perform repeated requests for an access token | allows clients that perform repeated requests for an access token | |||
| for the same audience but e.g. with different scopes to omit key | for the same audience but e.g. with different scopes to omit key | |||
| transport in the access token, token request and token response. | transport in the access token, token request and token response. | |||
| Figure 11 shows such an example. | Figure 10 shows such an example. | |||
| "cnf" : { | "cnf" : { | |||
| "kid" : b64'39Gqlw' | "kid" : b64'39Gqlw' | |||
| } | } | |||
| Figure 11: A Confirmation parameter with just a key identifier | Figure 10: A Confirmation parameter with just a key identifier | |||
| 6.5. Mapping parameters to CBOR | 6.5. Mapping parameters to CBOR | |||
| All OAuth parameters in access token requests and responses are | All OAuth parameters in access token requests and responses are | |||
| mapped to CBOR types as follows and are given an integer key value to | mapped to CBOR types as follows and are given an integer key value to | |||
| save space. | save space. | |||
| /-------------------+----------+-----------------\ | /-------------------+----------+-----------------\ | |||
| | Parameter name | CBOR Key | Major Type | | | Parameter name | CBOR Key | Major Type | | |||
| |-------------------+----------+-----------------| | |-------------------+----------+-----------------| | |||
| | client_id | 1 | 3 (text string) | | | aud | 3 | 3 | | |||
| | client_secret | 2 | 2 (byte string) | | | client_id | 8 | 3 (text string) | | |||
| | response_type | 3 | 3 | | | client_secret | 9 | 2 (byte string) | | |||
| | redirect_uri | 4 | 3 | | | response_type | 10 | 3 | | |||
| | scope | 5 | 3 | | | redirect_uri | 11 | 3 | | |||
| | state | 6 | 3 | | | scope | 12 | 3 | | |||
| | code | 7 | 2 | | | state | 13 | 3 | | |||
| | error_description | 8 | 3 | | | code | 14 | 2 | | |||
| | error_uri | 9 | 3 | | | error_description | 15 | 3 | | |||
| | grant_type | 10 | 0 (unit) | | | error_uri | 16 | 3 | | |||
| | access_token | 11 | 3 | | | grant_type | 17 | 0 (unit) | | |||
| | token_type | 12 | 0 | | | access_token | 18 | 3 | | |||
| | expires_in | 13 | 0 | | | token_type | 19 | 0 | | |||
| | username | 14 | 3 | | | expires_in | 20 | 0 | | |||
| | password | 15 | 3 | | | username | 21 | 3 | | |||
| | refresh_token | 16 | 3 | | | password | 22 | 3 | | |||
| | alg | 17 | 3 | | | refresh_token | 23 | 3 | | |||
| | cnf | 18 | 5 (map) | | | cnf | 24 | 5 (map) | | |||
| | aud | 19 | 3 | | | profile | 25 | 3 | | |||
| | profile | 20 | 0 | | \-------------------+----------+-----------------/ | |||
| \---------------+--------------+-----------------/ | ||||
| Figure 12: CBOR mappings used in token requests | Figure 11: CBOR mappings used in token requests | |||
| 7. The 'Introspect' Resource | 7. The 'Introspect' Endpoint | |||
| Token introspection [RFC7662] is used by the RS and potentially the | Token introspection [RFC7662] is used by the RS and potentially the | |||
| client to query the AS for metadata about a given token e.g. validity | client to query the AS for metadata about a given token e.g. validity | |||
| or scope. Analogous to the protocol defined in RFC 7662 [RFC7662] | or scope. Analogous to the protocol defined in RFC 7662 [RFC7662] | |||
| for HTTP and JSON, this section defines adaptations to more | for HTTP and JSON, this section defines adaptations to more | |||
| constrained environments using CoAP and CBOR. | constrained environments using CoAP and CBOR. | |||
| Communication between the RS and the introspection resource at the AS | Communication between the RS and the introspection endpoint at the AS | |||
| MUST be integrity protected and encrypted. Furthermore AS and RS | MUST be integrity protected and encrypted. Furthermore AS and RS | |||
| MUST perform mutual authentication. Finally the AS SHOULD to verify | MUST perform mutual authentication. Finally the AS SHOULD verify | |||
| that the RS has the right to access introspection information about | that the RS has the right to access introspection information about | |||
| the provided token. Profiles of this framework are expected to | the provided token. Profiles of this framework are expected to | |||
| specify how authentication and communication security is implemented. | specify how authentication and communication security is implemented. | |||
| The figures of this section uses CBOR diagnostic notation without the | The figures of this section uses CBOR diagnostic notation without the | |||
| integer abbreviations for the parameters or their values for better | integer abbreviations for the parameters or their values for better | |||
| readability. | readability. | |||
| 7.1. RS-to-AS Request | 7.1. RS-to-AS Request | |||
| The RS sends a CoAP POST request to the introspection resource at the | The RS sends a CoAP POST request to the introspection endpoint at the | |||
| AS, with payload sent as "application/cbor" data. The payload is a | AS, the profile is expected to specify the Content-Type and wrapping | |||
| CBOR map with a 'token' parameter containing the access token along | of the payload. The payload MUST be encoded as a CBOR map with a | |||
| with optional parameters representing additional context that is | 'token' parameter containing the access token along with optional | |||
| known by the RS to aid the AS in its response. | parameters representing additional context that is known by the RS to | |||
| aid the AS in its response. | ||||
| The same parameters are required and optional as in section 2.1 of | The same parameters are required and optional as in section 2.1 of | |||
| RFC 7662 [RFC7662]. | RFC 7662 [RFC7662]. | |||
| For example, Figure 13 shows a RS calling the token introspection | For example, Figure 12 shows a RS calling the token introspection | |||
| resource at the AS to query about an OAuth 2.0 proof-of-possession | endpoint at the AS to query about an OAuth 2.0 proof-of-possession | |||
| token. | token. Note that we assume a object security-based communication | |||
| security profile for this example, therefore the Content-Type is | ||||
| "application/cose+cbor". | ||||
| Header: POST (Code=0.02) | Header: POST (Code=0.02) | |||
| Uri-Host: "server.example.com" | Uri-Host: "server.example.com" | |||
| Uri-Path: "introspect" | Uri-Path: "introspect" | |||
| Content-Type: "application/cbor" | Content-Type: "application/cose+cbor" | |||
| Payload: | Payload: | |||
| { | { | |||
| "token" : b64'7gj0dXJQ43U', | "token" : b64'7gj0dXJQ43U', | |||
| "token_type_hint" : "pop" | "token_type_hint" : "pop" | |||
| } | } | |||
| Figure 13: Example introspection request. | Figure 12: Example introspection request. | |||
| 7.2. AS-to-RS Response | 7.2. AS-to-RS Response | |||
| The AS responds with a CBOR object in "application/cbor" format with | If the introspection request is authorized and successfully | |||
| the same required and optional parameters as in section 2.2. of RFC | processed, the AS sends a response with the CoAP response code 2.01 | |||
| 7662 [RFC7662] with the following additions: | (Created). If the introspection request was invalid, not authorized | |||
| or couldn't be processed the AS returns an error response as | ||||
| described in Section 7.3. | ||||
| alg | In a successful response, the AS encodes the response parameters in a | |||
| OPTIONAL. See Section 6.4 for more details. | CBOR map including with the same required and optional parameters as | |||
| in section 2.2. of RFC 7662 [RFC7662] with the following additions: | ||||
| cnf | cnf | |||
| OPTIONAL. This field contains information about the proof-of- | OPTIONAL. This field contains information about the proof-of- | |||
| possession key that binds the client to the access token. See | possession key that binds the client to the access token. See | |||
| Section 6.4 for more details on the formatting of the 'cnf' | Section 6.4.5 for more details on the formatting of the 'cnf' | |||
| parameter. | parameter. | |||
| profile | profile | |||
| OPTIONAL. This indicates the profile that the RS MUST use with | OPTIONAL. This indicates the profile that the RS MUST use with | |||
| the client. See Section 6.4 for more details on the formatting of | the client. See Section 6.4.4 for more details on the formatting | |||
| this parameter. | of this parameter. | |||
| client_token | client_token | |||
| OPTIONAL. This parameter contains information that the RS MUST | OPTIONAL. This parameter contains information that the RS MUST | |||
| pass on to the client. See Section 7.4 for more details. | pass on to the client. See Section 7.4 for more details. | |||
| For example, Figure 14 shows an AS response to the introspection | For example, Figure 13 shows an AS response to the introspection | |||
| request in Figure 13. | request in Figure 12. Note that we assume a DTLS-based communication | |||
| security profile for this example, therefore the Content-Type is | ||||
| "application/cbor". | ||||
| Header: Created Code=2.01) | Header: Created Code=2.01) | |||
| Content-Type: "application/cbor" | Content-Type: "application/cbor" | |||
| Payload: | Payload: | |||
| { | { | |||
| "active" : true, | "active" : true, | |||
| "scope" : "read", | "scope" : "read", | |||
| "token_type" : "pop", | ||||
| "alg" : "HS256", | ||||
| "profile" : "coap_dtls", | "profile" : "coap_dtls", | |||
| "client_token" : b64'2QPhg0OhAQo ... | "client_token" : b64'2QPhg0OhAQo ... | |||
| (remainder of client token omitted for brevity)', | (remainder of client token omitted for brevity)', | |||
| "cnf" : { | "cnf" : { | |||
| "COSE_Key" : { | "COSE_Key" : { | |||
| "kty" : "Symmetric", | "kty" : "Symmetric", | |||
| "kid" : b64'39Gqlw', | "kid" : b64'39Gqlw', | |||
| "k" : b64'hJtXhkV8FJG+Onbc6mxCcQh' | "k" : b64'hJtXhkV8FJG+Onbc6mxCcQh' | |||
| } | } | |||
| } | } | |||
| } | } | |||
| Figure 14: Example introspection response. | Figure 13: Example introspection response. | |||
| 7.3. Error Response | 7.3. Error Response | |||
| The error responses for CoAP-based interactions with the AS are | The error responses for CoAP-based interactions with the AS are | |||
| equivalent to the ones for HTTP-based interactions as defined in | equivalent to the ones for HTTP-based interactions as defined in | |||
| section 2.3 of [RFC7662], with the following differences: | section 2.3 of [RFC7662], with the following differences: | |||
| o If content is sent, the Content-Type MUST be set to "application/ | o If content is sent, the Content-Type MUST be set according to the | |||
| cbor", and the payload MUST be encoded in a CBOR map. | specification of the communication security profile, and the | |||
| content payload MUST be encoded as a CBOR map. | ||||
| o If the credentials used by the RS are invalid the AS MUST respond | o If the credentials used by the RS are invalid the AS MUST respond | |||
| with the CoAP response code code 4.01 (Unauthorized) and use the | with the CoAP response code 4.01 (Unauthorized) and use the | |||
| required and optional parameters from section 5.2 in RFC 6749 | required and optional parameters from section 5.2 in RFC 6749 | |||
| [RFC6749]. | [RFC6749]. | |||
| o If the RS does not have the right to perform this introspection | o If the RS does not have the right to perform this introspection | |||
| request, the AS MUST respond with the CoAP response code 4.03 | request, the AS MUST respond with the CoAP response code 4.03 | |||
| (Forbidden). In this case no payload is returned. | (Forbidden). In this case no payload is returned. | |||
| Note that a properly formed and authorized query for an inactive or | Note that a properly formed and authorized query for an inactive or | |||
| otherwise invalid token does not warrant an error response by this | otherwise invalid token does not warrant an error response by this | |||
| specification. In these cases, the authorization server MUST instead | specification. In these cases, the authorization server MUST instead | |||
| respond with an introspection response with the "active" field set to | respond with an introspection response with the "active" field set to | |||
| "false". | "false". | |||
| skipping to change at page 25, line 23 ¶ | skipping to change at page 25, line 27 ¶ | |||
| EDITORIAL NOTE: We have tentatively introduced this concept and would | EDITORIAL NOTE: We have tentatively introduced this concept and would | |||
| specifically like feedback if this is viewed as a useful addition to | specifically like feedback if this is viewed as a useful addition to | |||
| the framework. | the framework. | |||
| In cases where the client has limited connectivity and is requesting | In cases where the client has limited connectivity and is requesting | |||
| access to a previously unknown resource servers, using a long term | access to a previously unknown resource servers, using a long term | |||
| token, there are situations where it would be beneficial to relay the | token, there are situations where it would be beneficial to relay the | |||
| proof-of-possession key and other relevant information from the AS to | proof-of-possession key and other relevant information from the AS to | |||
| the client through the RS. The client_token parameter is designed to | the client through the RS. The client_token parameter is designed to | |||
| carry such information, and is intended to be used as described in | carry such information, and is intended to be used as described in | |||
| Figure 15. | Figure 14. | |||
| Resource Authorization | Resource Authorization | |||
| Client Server Server | Client Server Server | |||
| | | | | | | | | |||
| | | | | | | | | |||
| A: +--------------->| | | C: +--------------->| | | |||
| | POST | | | | POST | | | |||
| | Access Token | | | | Access Token | | | |||
| | B: +--------------->| | | D: +--------------->| | |||
| | | Introspection | | | | Introspection | | |||
| | | Request | | | | Request | | |||
| | | | | | | | | |||
| | C: +<---------------+ | | E: +<---------------+ | |||
| | | Introspection | | | | Introspection | | |||
| | | Response | | | | Response | | |||
| | | + Client Token | | | | + Client Token | | |||
| D: |<---------------+ | | |<---------------+ | | |||
| | 2.01 Created | | | | 2.01 Created | | | |||
| | + Client Token | | | + Client Token | | |||
| Figure 15: Use of the client_token parameter. | Figure 14: Use of the client_token parameter. | |||
| The client token is a COSE_Encrytped object, containing as payload a | The client token is a COSE_Encrytped object, containing as payload a | |||
| CBOR map with the following claims: | CBOR map with the following claims: | |||
| cnf | cnf | |||
| REQUIRED. Contains information about the proof-of-possession key | REQUIRED if the token type is 'pop', OPTIONAL otherwise. Contains | |||
| the client is to use with its access token. See Section 6.4.4. | information about the proof-of-possession key the client is to use | |||
| with its access token. See Section 6.4.5. | ||||
| token_type | token_type | |||
| OPTIONAL. See Section 6.4.2. | OPTIONAL. See Section 6.4.3. | |||
| alg | ||||
| OPTIONAL. See Section 6.4.2. | ||||
| profile | profile | |||
| REQUIRED. See Section 6.4.3. | REQUIRED. See Section 6.4.4. | |||
| rs_cnf | rs_cnf | |||
| OPTIONAL. Contains information about the key that the RS uses to | OPTIONAL. Contains information about the key that the RS uses to | |||
| authenticate towards the client. If the key is symmetric then | authenticate towards the client. If the key is symmetric then | |||
| this claim MUST NOT be part of the Client Token, since this is the | this claim MUST NOT be part of the Client Token, since this is the | |||
| same key as the one specified through the 'cnf' claim. This claim | same key as the one specified through the 'cnf' claim. This claim | |||
| uses the same encoding as the 'cnf' parameter. See Section 6.4.3. | uses the same encoding as the 'cnf' parameter. See Section 6.4.4. | |||
| The AS encrypts this token using a key shared between the AS and the | The AS encrypts this token using a key shared between the AS and the | |||
| client, so that only the client can decrypt it and access its | client, so that only the client can decrypt it and access its | |||
| payload. How this key is established is out of scope of this | payload. How this key is established is out of scope of this | |||
| framework. | framework. | |||
| 7.5. Mapping Introspection parameters to CBOR | 7.5. Mapping Introspection parameters to CBOR | |||
| The introspection request and response parameters are mapped to CBOR | The introspection request and response parameters are mapped to CBOR | |||
| types as follows and are given an integer key value to save space. | types as follows and are given an integer key value to save space. | |||
| /----------------+----------+-----------------\ | /-----------------+----------+-----------------\ | |||
| | Parameter name | CBOR Key | Major Type | | | Parameter name | CBOR Key | Major Type | | |||
| |----------------+----------+-----------------| | |-----------------+----------+-----------------| | |||
| | active | 1 | 0 (uint) | | | iss | 1 | 3 (text string) | | |||
| | username | 2 | 3 (text string) | | | sub | 2 | 3 | | |||
| | client_id | 3 | 3 | | | aud | 3 | 3 | | |||
| | scope | 4 | 3 | | | exp | 4 | 6 tag value 1 | | |||
| | token_type | 5 | 3 | | | nbf | 5 | 6 tag value 1 | | |||
| | exp | 6 | 6 tag value 1 | | | iat | 6 | 6 tag value 1 | | |||
| | iat | 7 | 6 tag value 1 | | | cti | 7 | 2 (byte string) | | |||
| | nbf | 8 | 6 tag value 1 | | | client_id | 8 | 3 | | |||
| | sub | 9 | 3 | | | scope | 12 | 3 | | |||
| | aud | 10 | 3 | | | token_type | 19 | 3 | | |||
| | iss | 11 | 3 | | | username | 21 | 3 | | |||
| | jti | 12 | 3 | | | cnf | 24 | 5 (map) | | |||
| | alg | 13 | 3 | | | profile | 25 | 0 (uint) | | |||
| | cnf | 14 | 5 (map) | | | token | 26 | 3 | | |||
| | aud | 15 | 3 | | | token_type_hint | 27 | 3 | | |||
| | client_token | 16 | 3 | | | active | 28 | 0 | | |||
| | rs_cnf | 17 | 5 | | | client_token | 29 | 3 | | |||
| \----------------+----------+-----------------/ | | rs_cnf | 30 | 5 | | |||
| \-----------------+----------+-----------------/ | ||||
| Figure 16: CBOR Mappings to Token Introspection Parameters. | Figure 15: CBOR Mappings to Token Introspection Parameters. | |||
| 8. The Access Token | 8. The Access Token | |||
| This framework RECOMMENDS the use of CBOR web token (CWT) as | This framework RECOMMENDS the use of CBOR web token (CWT) as | |||
| specified in [I-D.ietf-ace-cbor-web-token]. | specified in [I-D.ietf-ace-cbor-web-token]. | |||
| In order to facilitate offline processing of access tokens, this | In order to facilitate offline processing of access tokens, this | |||
| draft specfifies the "scope" claim for access tokens that explicitly | draft specifies the "cnf" and "scope" claims for CBOR web tokens. | |||
| encodes the scope of a given access token. This claim follows the | ||||
| same encoding rules as defined in section 3.3 of [RFC6749]. The | ||||
| meaning of a specific scope value is application specific and | ||||
| expected to be known to the RS running that application. | ||||
| 8.1. The 'Authorization Information' Resource | The "scope" claim explicitly encodes the scope of a given access | |||
| token. This claim follows the same encoding rules as defined in | ||||
| section 3.3 of [RFC6749]. The meaning of a specific scope value is | ||||
| application specific and expected to be known to the RS running that | ||||
| application. | ||||
| The "cnf" claim follows the same rules as specified for JSON web | ||||
| token in RFC7800 [RFC7800], except that it is encoded in CBOR in the | ||||
| same way as specified for the "cnf" parameter in section | ||||
| Section 6.4.5. | ||||
| 8.1. The 'Authorization Information' Endpoint | ||||
| The access token, containing authorization information and | The access token, containing authorization information and | |||
| information of the key used by the client, is transported to the RS | information of the key used by the client, needs to be transported to | |||
| so that the RS can authenticate and authorize the client request. | the RS so that the RS can authenticate and authorize the client | |||
| request. | ||||
| This section defines a method for transporting the access token to | This section defines a method for transporting the access token to | |||
| the RS using CoAP that MAY be used. An ACE profile MAY define other | the RS using CoAP. Profiles of this framework MAY define other | |||
| methods for token transport. | methods for token transport. Implementations conforming to this | |||
| framework MUST implement this method of token transportation. | ||||
| This method REQUIRES the RS to implement an /authz-info resource. A | The method consists of a /authz-info endpoint, implemented by the RS. | |||
| client using this method MUST make a POST request to /authz-info on | A client using this method MUST make a POST request to /authz-info at | |||
| the RS with the access token in the payload. The RS receiving the | the RS with the access token in the payload. The RS receiving the | |||
| token MUST verify the validity of the token. If the token is valid, | token MUST verify the validity of the token. If the token is valid, | |||
| the RS MUST respond to the POST request with 2.04 (Changed). | the RS MUST respond to the POST request with 2.04 (Changed). | |||
| If the token is not valid, the RS MUST respond with error code 4.01 | If the token is not valid, the RS MUST respond with the CoAP response | |||
| (Unauthorized). If the token is valid but the audience of the token | code 4.01 (Unauthorized). If the token is valid but the audience of | |||
| does not match the RS, the RS MUST respond with error code 4.03 | the token does not match the RS, the RS MUST respond with the CoAP | |||
| (Forbidden). | response code 4.03 (Forbidden). | |||
| The RS MAY make an introspection request to validate the token before | The RS MAY make an introspection request to validate the token before | |||
| responding to the POST /authz-info request. If the introspection | responding to the POST /authz-info request. If the introspection | |||
| response contains a client token (Section 7.4) then this token SHALL | response contains a client token (Section 7.4) then this token SHALL | |||
| be included in the payload of the 2.04 (Changed) response. | be included in the payload of the 2.04 (Changed) response. | |||
| Profiles are expected to specify how the /authz-info endpoint is | ||||
| protected. Note that since the token contains information that allow | ||||
| the client and the RS to establish a security context in the first | ||||
| place, mutual authentication may not be possible at this point. | ||||
| 8.2. Token Expiration | 8.2. Token Expiration | |||
| Depending on the capabilities of the RS, there are various ways in | Depending on the capabilities of the RS, there are various ways in | |||
| which it can verify the validity of a received access token. We list | which it can verify the validity of a received access token. We list | |||
| the possibilities here including what functionality they require of | the possibilities here including what functionality they require of | |||
| the RS. | the RS. | |||
| o The token is a CWT/JWT and includes a 'exp' claim and possibly the | o The token is a CWT/JWT and includes a 'exp' claim and possibly the | |||
| 'nbf' claim. The RS verifies these by comparing them to values | 'nbf' claim. The RS verifies these by comparing them to values | |||
| from its internal clock as defined in [RFC7519]. In this case the | from its internal clock as defined in [RFC7519]. In this case the | |||
| RS must have a real time chip (RTC) or some other way of reliably | RS's internal clock must reflect the current date and time, or at | |||
| measuring time. | least be synchronized with the AS's clock. How this clock | |||
| synchronization would be performed is out of scope for this memo. | ||||
| o The RS verifies the validity of the token by performing an | o The RS verifies the validity of the token by performing an | |||
| introspection request as specified in Section 7. This requires | introspection request as specified in Section 7. This requires | |||
| the RS to have a reliable network connection to the AS and to be | the RS to have a reliable network connection to the AS and to be | |||
| able to handle two secure sessions in parallel (C to RS and AS to | able to handle two secure sessions in parallel (C to RS and AS to | |||
| RS). | RS). | |||
| o The RS and the AS both store a sequence number linked to their | o The RS and the AS both store a sequence number linked to their | |||
| common security association. The AS increments this number for | common security association. The AS increments this number for | |||
| each access token it issues and includes it in the access token, | each access token it issues and includes it in the access token, | |||
| which is a CWT/JWT. The RS keeps track of the most recently | which is a CWT/JWT. The RS keeps track of the most recently | |||
| received sequence number, and only accepts tokens as valid, that | received sequence number, and only accepts tokens as valid, that | |||
| skipping to change at page 29, line 6 ¶ | skipping to change at page 29, line 27 ¶ | |||
| means of reliably measuring time, this is the best that can be | means of reliably measuring time, this is the best that can be | |||
| achieved. | achieved. | |||
| 9. Security Considerations | 9. Security Considerations | |||
| The entire document is about security. Security considerations | The entire document is about security. Security considerations | |||
| applicable to authentication and authorization in RESTful | applicable to authentication and authorization in RESTful | |||
| environments provided in OAuth 2.0 [RFC6749] apply to this work, as | environments provided in OAuth 2.0 [RFC6749] apply to this work, as | |||
| well as the security considerations from [I-D.ietf-ace-actors]. | well as the security considerations from [I-D.ietf-ace-actors]. | |||
| Furthermore [RFC6819] provides additional security considerations for | Furthermore [RFC6819] provides additional security considerations for | |||
| OAuth which apply to IoT deployments as well. Finally | OAuth which apply to IoT deployments as well. | |||
| [I-D.ietf-oauth-pop-architecture] discusses security and privacy | ||||
| threats as well as mitigation measures for Proof-of-Possession | A large range of threats can be mitigated by protecting the contents | |||
| tokens. | of the access token by using a digital signature or a keyed message | |||
| digest. Consequently, the token integrity protection MUST be applied | ||||
| to prevent the token from being modified, particularly since it | ||||
| contains a reference to the symmetric key or the asymmetric key. If | ||||
| the access token contains the symmetric key, this symmetric key MUST | ||||
| be encrypted by the authorization server with a long-term key shared | ||||
| with the resource server. | ||||
| It is important for the authorization server to include the identity | ||||
| of the intended recipient (the audience), typically a single resource | ||||
| server (or a list of resource servers), in the token. Using a single | ||||
| shared secret with multiple authorization server to simplify key | ||||
| management is NOT RECOMMENDED since the benefit from using the proof- | ||||
| of-possession concept is significantly reduced. | ||||
| Token replay is also not possible since an eavesdropper will also | ||||
| have to obtain the corresponding private key or shared secret that is | ||||
| bound to the access token. Nevertheless, it is good practice to | ||||
| limit the lifetime of the access token and therefore the lifetime of | ||||
| associated key. | ||||
| The authorization server MUST offer confidentiality protection for | ||||
| any interactions with the client. This step is extremely important | ||||
| since the client will obtain the session key from the authorization | ||||
| server for use with a specific access token. Not using | ||||
| confidentiality protection exposes this secret (and the access token) | ||||
| to an eavesdropper thereby making the proof-of-possession security | ||||
| model completely insecure. This framework relies on profiles to | ||||
| define how confidentiality protection is provided, and additional | ||||
| protection can be applied by encrypting the CWT as specified in | ||||
| section 5.1 of [I-D.ietf-ace-cbor-web-token] to provide an additional | ||||
| layer of protection for cases where keying material is conveyed, for | ||||
| example, to a hardware security module. | ||||
| Developers MUST ensure that the ephemeral credentials (i.e., the | ||||
| private key or the session key) is not leaked to third parties. An | ||||
| adversary in possession of the ephemeral credentials bound to the | ||||
| access token will be able to impersonate the client. Be aware that | ||||
| this is a real risk with many constrained environments, since | ||||
| adversaries can often easily get physical access to the devices. | ||||
| Clients can at any time request a new proof-of-possession capable | ||||
| access token. Using a refresh token to regularly request new access | ||||
| tokens that are bound to fresh and unique keys is important if the | ||||
| client has this capability. Keeping the lifetime of the access token | ||||
| short allows the authorization server to use shorter key sizes, which | ||||
| translate to a performance benefit for the client and for the | ||||
| resource server. Shorter keys also lead to shorter messages | ||||
| (particularly with asymmetric keying material). | ||||
| When authorization servers bind symmetric keys to access tokens then | ||||
| they SHOULD scope these access tokens to a specific permissions. | ||||
| 10. IANA Considerations | 10. IANA Considerations | |||
| This specification registers new parameters for OAuth and establishes | This specification registers new parameters for OAuth and establishes | |||
| registries for mappings to CBOR. | registries for mappings to CBOR. | |||
| 10.1. OAuth Introspection Response Parameter Registration | 10.1. OAuth Introspection Response Parameter Registration | |||
| This specification registers the following parameters in the OAuth | This specification registers the following parameters in the OAuth | |||
| introspection response parameters | introspection response parameters | |||
| o Name: "alg" | ||||
| o Description: Algorithm to use with PoP key, as defined in PoP | ||||
| token specification, | ||||
| o Change Controller: IESG | ||||
| o Specification Document(s): this document | ||||
| o Name: "cnf" | o Name: "cnf" | |||
| o Description: Key to use to prove the right to use an access token, | o Description: Key to use to prove the right to use an access token, | |||
| as defined in [RFC7800]. | as defined in [RFC7800]. | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| o Name: "aud" | o Name: "aud" | |||
| o Description: reference to intended receiving RS, as defined in PoP | o Description: reference to intended receiving RS, as defined in PoP | |||
| token specification. | token specification. | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| o Name: "profile" | o Name: "profile" | |||
| o Description: The communication and communication security profile | o Description: The communication and communication security profile | |||
| used between client and RS, as defined in ACE profiles. | used between client and RS, as defined in ACE profiles. | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| o Name: "client_token" | o Name: "client_token" | |||
| o Description: Information that the RS MUST pass to the client e.g. | o Description: Information that the RS MUST pass to the client e.g. | |||
| about the proof-of-possession keys. | about the proof-of-possession keys. | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| o Name: "rs_cnf" | ||||
| o Description: Describes the public key the RS uses to authenticate. | ||||
| o Change Controller: IESG | ||||
| o Specification Document(s): this document | ||||
| 10.2. OAuth Parameter Registration | 10.2. OAuth Parameter Registration | |||
| This specification registers the following parameters in the OAuth | This specification registers the following parameters in the OAuth | |||
| Parameters Registry | Parameters Registry | |||
| o Name: "alg" | ||||
| o Description: Algorithm to use with PoP key, as defined in PoP | ||||
| token specification, | ||||
| o Change Controller: IESG | ||||
| o Specification Document(s): this document | ||||
| o Parameter name: "profile" | o Parameter name: "profile" | |||
| o Parameter usage location: token request, and token response | o Parameter usage location: token request, and token response | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| o Name: "cnf" | o Name: "cnf" | |||
| o Description: Key to use to prove the right to use an access token, | o Description: Key to use to prove the right to use an access token, | |||
| as defined in [RFC7800]. | as defined in [RFC7800]. | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| skipping to change at page 31, line 26 ¶ | skipping to change at page 32, line 40 ¶ | |||
| o Parameter name: "Bearer" | o Parameter name: "Bearer" | |||
| o Mapped value: 1 | o Mapped value: 1 | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| o Parameter name: "pop" | o Parameter name: "pop" | |||
| o Mapped value: 2 | o Mapped value: 2 | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| 10.5. JSON Web Token Claims | 10.5. CBOR Web Token Claims | |||
| This specification registers the following new claim in the JSON Web | This specification registers the following new claims in the CBOR Web | |||
| Token (JWT) registry. | Token (CWT) registry: | |||
| o Claim Name: "scope" | o Claim Name: "scope" | |||
| o Claim Description: The scope of an access token as defined in | o Claim Description: The scope of an access token as defined in | |||
| [RFC6749]. | [RFC6749]. | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| o Claim Name: "cnf" | ||||
| o Claim Description: The proof-of-possession key of an access token | ||||
| as defined in [RFC7800]. | ||||
| o Change Controller: IESG | ||||
| o Specification Document(s): this document | ||||
| 10.6. ACE Profile Registry | 10.6. ACE Profile Registry | |||
| A new registry will be requested from IANA, entitled "ACE Profile | A new registry will be requested from IANA, entitled "ACE Profile | |||
| Registry". The registry is to be created as Expert Review Required. | Registry". The registry is to be created as Expert Review Required. | |||
| 10.6.1. Registration Template | 10.6.1. Registration Template | |||
| Profile name: | Profile name: | |||
| Name of the profile to be included in the profile attribute. | Name of the profile to be included in the profile attribute. | |||
| Profile description: | Profile description: | |||
| skipping to change at page 32, line 4 ¶ | skipping to change at page 33, line 25 ¶ | |||
| Profile name: | Profile name: | |||
| Name of the profile to be included in the profile attribute. | Name of the profile to be included in the profile attribute. | |||
| Profile description: | Profile description: | |||
| Text giving an over view of the profile and the context it is | Text giving an over view of the profile and the context it is | |||
| developed for. | developed for. | |||
| Profile ID: | Profile ID: | |||
| Integer value to identify the profile. The value MUST be an | Integer value to identify the profile. The value MUST be an | |||
| integer in the range of 1 to 65536. | integer in the range of 1 to 65536. | |||
| Change Controller: | Change Controller: | |||
| For Standards Track RFCs, list the "IESG". For others, give the | For Standards Track RFCs, list the "IESG". For others, give the | |||
| name of the responsible party. Other details (e.g., postal | name of the responsible party. Other details (e.g., postal | |||
| address, email address, home page URI) may also be included. | address, email address, home page URI) may also be included. | |||
| Specification Document(s): | Specification Document(s): | |||
| Reference to the document or documents that specify the | Reference to the document or documents that specify the | |||
| parameter,preferably including URIs that can be used to retrieve | parameter,preferably including URIs that can be used to retrieve | |||
| copies of the documents. An indication of the relevant sections | copies of the documents. An indication of the relevant sections | |||
| may also be included but is not required. | may also be included but is not required. | |||
| 10.7. OAuth Parameter Mappings Registry | 10.7. OAuth Parameter Mappings Registry | |||
| A new registry will be requested from IANA, entitled "Token Resource | A new registry will be requested from IANA, entitled "Token Endpoint | |||
| CBOR Mappings Registry". The registry is to be created as Expert | CBOR Mappings Registry". The registry is to be created as Expert | |||
| Review Required. | Review Required. | |||
| 10.7.1. Registration Template | 10.7.1. Registration Template | |||
| Parameter name: | Parameter name: | |||
| OAuth Parameter name, refers to the name in the OAuth parameter | OAuth Parameter name, refers to the name in the OAuth parameter | |||
| registry e.g. "client_id". | registry e.g. "client_id". | |||
| CBOR key value: | CBOR key value: | |||
| Key value for the claim. The key value MUST be an integer in the | Key value for the claim. The key value MUST be an integer in the | |||
| skipping to change at page 32, line 32 ¶ | skipping to change at page 34, line 4 ¶ | |||
| Parameter name: | Parameter name: | |||
| OAuth Parameter name, refers to the name in the OAuth parameter | OAuth Parameter name, refers to the name in the OAuth parameter | |||
| registry e.g. "client_id". | registry e.g. "client_id". | |||
| CBOR key value: | CBOR key value: | |||
| Key value for the claim. The key value MUST be an integer in the | Key value for the claim. The key value MUST be an integer in the | |||
| range of 1 to 65536. | range of 1 to 65536. | |||
| Change Controller: | Change Controller: | |||
| For Standards Track RFCs, list the "IESG". For others, give the | For Standards Track RFCs, list the "IESG". For others, give the | |||
| name of the responsible party. Other details (e.g., postal | name of the responsible party. Other details (e.g., postal | |||
| address, email address, home page URI) may also be included. | address, email address, home page URI) may also be included. | |||
| Specification Document(s): | Specification Document(s): | |||
| Reference to the document or documents that specify the | Reference to the document or documents that specify the | |||
| parameter,preferably including URIs that can be used to retrieve | parameter,preferably including URIs that can be used to retrieve | |||
| copies of the documents. An indication of the relevant sections | copies of the documents. An indication of the relevant sections | |||
| may also be included but is not required. | may also be included but is not required. | |||
| 10.7.2. Initial Registry Contents | 10.7.2. Initial Registry Contents | |||
| o Parameter name: "aud" | ||||
| o CBOR key value: 3 | ||||
| o Change Controller: IESG | ||||
| o Specification Document(s): this document | ||||
| o Parameter name: "client_id" | o Parameter name: "client_id" | |||
| o CBOR key value: 1 | o CBOR key value: 8 | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| o Parameter name: "client_secret" | o Parameter name: "client_secret" | |||
| o CBOR key value: 2 | o CBOR key value: 9 | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| o Parameter name: "response_type" | o Parameter name: "response_type" | |||
| o CBOR key value: 3 | o CBOR key value: 10 | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| o Parameter name: "redirect_uri" | o Parameter name: "redirect_uri" | |||
| o CBOR key value: 4 | o CBOR key value: 11 | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| o Parameter name: "scope" | o Parameter name: "scope" | |||
| o CBOR key value: 5 | o CBOR key value: 12 | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| o Parameter name: "state" | o Parameter name: "state" | |||
| o CBOR key value: 6 | o CBOR key value: 13 | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| o Parameter name: "code" | o Parameter name: "code" | |||
| o CBOR key value: 7 | o CBOR key value: 14 | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| o Parameter name: "error_description" | o Parameter name: "error_description" | |||
| o CBOR key value: 8 | o CBOR key value: 15 | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| o Parameter name: "error_uri" | o Parameter name: "error_uri" | |||
| o CBOR key value: 9 | o CBOR key value: 16 | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| o Parameter name: "grant_type" | o Parameter name: "grant_type" | |||
| o CBOR key value: 10 | o CBOR key value: 17 | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| o Parameter name: "access_token" | o Parameter name: "access_token" | |||
| o CBOR key value: 11 | o CBOR key value: 18 | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| o Parameter name: "token_type" | o Parameter name: "token_type" | |||
| o CBOR key value: 12 | o CBOR key value: 19 | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| o Parameter name: "expires_in" | o Parameter name: "expires_in" | |||
| o CBOR key value: 13 | o CBOR key value: 20 | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| o Parameter name: "username" | o Parameter name: "username" | |||
| o CBOR key value: 14 | o CBOR key value: 21 | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| o Parameter name: "password" | o Parameter name: "password" | |||
| o CBOR key value: 15 | o CBOR key value: 22 | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| o Parameter name: "refresh_token" | o Parameter name: "refresh_token" | |||
| o CBOR key value: 16 | o CBOR key value: 23 | |||
| o Change Controller: IESG | ||||
| o Specification Document(s): this document | ||||
| o Parameter name: "alg" | ||||
| o CBOR key value: 17 | ||||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| o Parameter name: "cnf" | o Parameter name: "cnf" | |||
| o CBOR key value: 18 | o CBOR key value: 24 | |||
| o Change Controller: IESG | ||||
| o Specification Document(s): this document | ||||
| o Parameter name: "aud" | ||||
| o CBOR key value: 19 | ||||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| o Parameter name: "profile" | o Parameter name: "profile" | |||
| o CBOR key value: 20 | o CBOR key value: 25 | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| 10.8. Introspection Resource CBOR Mappings Registry | 10.8. Introspection Endpoint CBOR Mappings Registry | |||
| A new registry will be requested from IANA, entitled "Introspection | A new registry will be requested from IANA, entitled "Introspection | |||
| Resource CBOR Mappings Registry". The registry is to be created as | Endpoint CBOR Mappings Registry". The registry is to be created as | |||
| Expert Review Required. | Expert Review Required. | |||
| 10.8.1. Registration Template | 10.8.1. Registration Template | |||
| Response parameter name: | Response parameter name: | |||
| Name of the response parameter as defined in the "OAuth Token | Name of the response parameter as defined in the "OAuth Token | |||
| Introspection Response" registry e.g. "active". | Introspection Response" registry e.g. "active". | |||
| CBOR key value: | CBOR key value: | |||
| Key value for the claim. The key value MUST be an integer in the | Key value for the claim. The key value MUST be an integer in the | |||
| range of 1 to 65536. | range of 1 to 65536. | |||
| skipping to change at page 35, line 25 ¶ | skipping to change at page 36, line 37 ¶ | |||
| name of the responsible party. Other details (e.g., postal | name of the responsible party. Other details (e.g., postal | |||
| address, email address, home page URI) may also be included. | address, email address, home page URI) may also be included. | |||
| Specification Document(s): | Specification Document(s): | |||
| Reference to the document or documents that specify the | Reference to the document or documents that specify the | |||
| parameter,preferably including URIs that can be used to retrieve | parameter,preferably including URIs that can be used to retrieve | |||
| copies of the documents. An indication of the relevant sections | copies of the documents. An indication of the relevant sections | |||
| may also be included but is not required. | may also be included but is not required. | |||
| 10.8.2. Initial Registry Contents | 10.8.2. Initial Registry Contents | |||
| o Response parameter name: "active" | o Response parameter name: "iss" | |||
| o CBOR key value: 1 | o CBOR key value: 1 | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| o Response parameter name: "username" | o Response parameter name: "sub" | |||
| o CBOR key value: 2 | o CBOR key value: 2 | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| o Response parameter name: "client_id" | o Response parameter name: "aud" | |||
| o CBOR key value: 3 | o CBOR key value: 3 | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| o Response parameter name: "exp" | ||||
| o Response parameter name: "scope" | ||||
| o CBOR key value: 4 | o CBOR key value: 4 | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| o Response parameter name: "token_type" | o Response parameter name: "nbf" | |||
| o CBOR key value: 5 | o CBOR key value: 5 | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| o Response parameter name: "exp" | o Response parameter name: "iat" | |||
| o CBOR key value: 6 | o CBOR key value: 6 | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| o Response parameter name: "iat" | o Response parameter name: "cti" | |||
| o CBOR key value: 7 | o CBOR key value: 7 | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| o Response parameter name: "nbf" | o Response parameter name: "client_id" | |||
| o CBOR key value: 8 | o CBOR key value: 8 | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| o Response parameter name: "sub" | o Response parameter name: "scope" | |||
| o CBOR key value: 9 | o CBOR key value: 12 | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| o Response parameter name: "aud" | o Response parameter name: "token_type" | |||
| o CBOR key value: 10 | o CBOR key value: 19 | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| o Response parameter name: "iss" | o Response parameter name: "username" | |||
| o CBOR key value: 11 | o CBOR key value: 21 | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| o Response parameter name: "jti" | o Parameter name: "cnf" | |||
| o CBOR key value: 12 | o CBOR key value: 24 | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| o Parameter name: "alg" | o Parameter name: "profile" | |||
| o CBOR key value: 13 | o CBOR key value: 25 | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| o Parameter name: "cnf" | o Response parameter name: "token" | |||
| o CBOR key value: 14 | o CBOR key value: 26 | |||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| o Parameter name: "aud" | o Response parameter name: "token_type_hint" | |||
| o CBOR key value: 15 | o CBOR key value: 27 | |||
| o Change Controller: IESG | ||||
| o Specification Document(s): this document | ||||
| o Response parameter name: "active" | ||||
| o CBOR key value: 28 | ||||
| o Change Controller: IESG | ||||
| o Specification Document(s): this document | ||||
| o Response parameter name: "client_token" | ||||
| o CBOR key value: 29 | ||||
| o Change Controller: IESG | ||||
| o Specification Document(s): this document | ||||
| o Response parameter name: "rs_cnf" | ||||
| o CBOR key value: 30 | ||||
| o Change Controller: IESG | o Change Controller: IESG | |||
| o Specification Document(s): this document | o Specification Document(s): this document | |||
| 10.9. CoAP Option Number Registration | 10.9. CoAP Option Number Registration | |||
| This section registers the "Access-Token" CoAP Option Number in the | This section registers the "Access-Token" CoAP Option Number in the | |||
| "CoRE Parameters" sub-registry "CoAP Option Numbers" in the manner | "CoRE Parameters" sub-registry "CoAP Option Numbers" in the manner | |||
| described in [RFC7252]. | described in [RFC7252]. | |||
| Name | Name | |||
| skipping to change at page 37, line 25 ¶ | skipping to change at page 39, line 4 ¶ | |||
| TBD | TBD | |||
| Reference | Reference | |||
| [This document]. | [This document]. | |||
| Meaning in Request | Meaning in Request | |||
| Contains an Access Token according to [This document] containing | Contains an Access Token according to [This document] containing | |||
| access permissions of the client. | access permissions of the client. | |||
| Meaning in Response | Meaning in Response | |||
| Not used in response | Not used in response | |||
| Safe-to-Forward | Safe-to-Forward | |||
| TBD | Yes | |||
| Format | Format | |||
| Based on the observer the format is perceived differently. Opaque | Based on the observer the format is perceived differently. Opaque | |||
| data to the client and CWT or reference token to the RS. | data to the client and CWT or reference token to the RS. | |||
| Length | Length | |||
| Less then 255 bytes | Less then 255 bytes | |||
| 11. Acknowledgments | 11. Acknowledgments | |||
| We would like to thank Eve Maler for her contributions to the use of | We would like to thank Eve Maler for her contributions to the use of | |||
| OAuth 2.0 and UMA in IoT scenarios, Robert Taylor for his discussion | OAuth 2.0 and UMA in IoT scenarios, Robert Taylor for his discussion | |||
| input, and Malisa Vucinic for his input on the ACRE proposal | input, and Malisa Vucinic for his input on the ACRE proposal | |||
| [I-D.seitz-ace-core-authz] which was one source of inspiration for | [I-D.seitz-ace-core-authz] which was one source of inspiration for | |||
| this work. Finally, we would like to thank the ACE working group in | this work. Finally, we would like to thank the ACE working group in | |||
| general for their feedback. | general for their feedback. | |||
| We would like to thank the authors of draft-ietf-oauth-pop-key- | ||||
| distribution, from where we copied large parts of our security | ||||
| considerations. | ||||
| Ludwig Seitz and Goeran Selander worked on this document as part of | Ludwig Seitz and Goeran Selander worked on this document as part of | |||
| the CelticPlus project CyberWI, with funding from Vinnova. | the CelticPlus project CyberWI, with funding from Vinnova. | |||
| 12. References | 12. References | |||
| 12.1. Normative References | 12.1. Normative References | |||
| [I-D.ietf-ace-cbor-web-token] | [I-D.ietf-ace-cbor-web-token] | |||
| Wahlstroem, E., Jones, M., and H. Tschofenig, "CBOR Web | Wahlstroem, E., Jones, M., Tschofenig, H., and S. Erdtman, | |||
| Token (CWT)", draft-ietf-ace-cbor-web-token-00 (work in | "CBOR Web Token (CWT)", draft-ietf-ace-cbor-web-token-01 | |||
| progress), May 2016. | (work in progress), July 2016. | |||
| [I-D.ietf-cose-msg] | [I-D.ietf-cose-msg] | |||
| Schaad, J., "CBOR Encoded Message Syntax", draft-ietf- | Schaad, J., "CBOR Object Signing and Encryption (COSE)", | |||
| cose-msg-12 (work in progress), May 2016. | draft-ietf-cose-msg-19 (work in progress), September 2016. | |||
| [I-D.selander-ace-object-security] | ||||
| Selander, G., Mattsson, J., Palombini, F., and L. Seitz, | ||||
| "Object Security of CoAP (OSCOAP)", draft-selander-ace- | ||||
| object-security-04 (work in progress), March 2016. | ||||
| [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | |||
| Requirement Levels", BCP 14, RFC 2119, | Requirement Levels", BCP 14, RFC 2119, | |||
| DOI 10.17487/RFC2119, March 1997, | DOI 10.17487/RFC2119, March 1997, | |||
| <http://www.rfc-editor.org/info/rfc2119>. | <http://www.rfc-editor.org/info/rfc2119>. | |||
| [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer | [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer | |||
| Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, | Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, | |||
| January 2012, <http://www.rfc-editor.org/info/rfc6347>. | January 2012, <http://www.rfc-editor.org/info/rfc6347>. | |||
| skipping to change at page 38, line 51 ¶ | skipping to change at page 40, line 28 ¶ | |||
| [RFC7800] Jones, M., Bradley, J., and H. Tschofenig, "Proof-of- | [RFC7800] Jones, M., Bradley, J., and H. Tschofenig, "Proof-of- | |||
| Possession Key Semantics for JSON Web Tokens (JWTs)", | Possession Key Semantics for JSON Web Tokens (JWTs)", | |||
| RFC 7800, DOI 10.17487/RFC7800, April 2016, | RFC 7800, DOI 10.17487/RFC7800, April 2016, | |||
| <http://www.rfc-editor.org/info/rfc7800>. | <http://www.rfc-editor.org/info/rfc7800>. | |||
| 12.2. Informative References | 12.2. Informative References | |||
| [I-D.ietf-ace-actors] | [I-D.ietf-ace-actors] | |||
| Gerdes, S., Seitz, L., Selander, G., and C. Bormann, "An | Gerdes, S., Seitz, L., Selander, G., and C. Bormann, "An | |||
| architecture for authorization in constrained | architecture for authorization in constrained | |||
| environments", draft-ietf-ace-actors-03 (work in | environments", draft-ietf-ace-actors-04 (work in | |||
| progress), March 2016. | progress), September 2016. | |||
| [I-D.ietf-core-block] | [I-D.ietf-oauth-device-flow] | |||
| Bormann, C. and Z. Shelby, "Block-wise transfers in CoAP", | Denniss, W., Myrseth, S., Bradley, J., Jones, M., and H. | |||
| draft-ietf-core-block-20 (work in progress), April 2016. | Tschofenig, "OAuth 2.0 Device Flow", draft-ietf-oauth- | |||
| device-flow-03 (work in progress), July 2016. | ||||
| [I-D.ietf-oauth-pop-architecture] | [I-D.ietf-oauth-native-apps] | |||
| Hunt, P., Richer, J., Mills, W., Mishra, P., and H. | Denniss, W. and J. Bradley, "OAuth 2.0 for Native Apps", | |||
| Tschofenig, "OAuth 2.0 Proof-of-Possession (PoP) Security | draft-ietf-oauth-native-apps-03 (work in progress), July | |||
| Architecture", draft-ietf-oauth-pop-architecture-07 (work | 2016. | |||
| in progress), December 2015. | ||||
| [I-D.seitz-ace-core-authz] | [I-D.seitz-ace-core-authz] | |||
| Seitz, L., Selander, G., and M. Vucinic, "Authorization | Seitz, L., Selander, G., and M. Vucinic, "Authorization | |||
| for Constrained RESTful Environments", draft-seitz-ace- | for Constrained RESTful Environments", draft-seitz-ace- | |||
| core-authz-00 (work in progress), June 2015. | core-authz-00 (work in progress), June 2015. | |||
| [I-D.selander-ace-object-security] | ||||
| Selander, G., Mattsson, J., Palombini, F., and L. Seitz, | ||||
| "Object Security of CoAP (OSCOAP)", draft-selander-ace- | ||||
| object-security-05 (work in progress), July 2016. | ||||
| [RFC4949] Shirey, R., "Internet Security Glossary, Version 2", | [RFC4949] Shirey, R., "Internet Security Glossary, Version 2", | |||
| FYI 36, RFC 4949, DOI 10.17487/RFC4949, August 2007, | FYI 36, RFC 4949, DOI 10.17487/RFC4949, August 2007, | |||
| <http://www.rfc-editor.org/info/rfc4949>. | <http://www.rfc-editor.org/info/rfc4949>. | |||
| [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security | [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security | |||
| (TLS) Protocol Version 1.2", RFC 5246, | (TLS) Protocol Version 1.2", RFC 5246, | |||
| DOI 10.17487/RFC5246, August 2008, | DOI 10.17487/RFC5246, August 2008, | |||
| <http://www.rfc-editor.org/info/rfc5246>. | <http://www.rfc-editor.org/info/rfc5246>. | |||
| [RFC6690] Shelby, Z., "Constrained RESTful Environments (CoRE) Link | [RFC6690] Shelby, Z., "Constrained RESTful Environments (CoRE) Link | |||
| skipping to change at page 40, line 19 ¶ | skipping to change at page 41, line 49 ¶ | |||
| [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer | [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer | |||
| Protocol (HTTP/1.1): Semantics and Content", RFC 7231, | Protocol (HTTP/1.1): Semantics and Content", RFC 7231, | |||
| DOI 10.17487/RFC7231, June 2014, | DOI 10.17487/RFC7231, June 2014, | |||
| <http://www.rfc-editor.org/info/rfc7231>. | <http://www.rfc-editor.org/info/rfc7231>. | |||
| [RFC7519] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token | [RFC7519] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token | |||
| (JWT)", RFC 7519, DOI 10.17487/RFC7519, May 2015, | (JWT)", RFC 7519, DOI 10.17487/RFC7519, May 2015, | |||
| <http://www.rfc-editor.org/info/rfc7519>. | <http://www.rfc-editor.org/info/rfc7519>. | |||
| [RFC7521] Campbell, B., Mortimore, C., Jones, M., and Y. Goland, | ||||
| "Assertion Framework for OAuth 2.0 Client Authentication | ||||
| and Authorization Grants", RFC 7521, DOI 10.17487/RFC7521, | ||||
| May 2015, <http://www.rfc-editor.org/info/rfc7521>. | ||||
| [RFC7591] Richer, J., Ed., Jones, M., Bradley, J., Machulak, M., and | [RFC7591] Richer, J., Ed., Jones, M., Bradley, J., Machulak, M., and | |||
| P. Hunt, "OAuth 2.0 Dynamic Client Registration Protocol", | P. Hunt, "OAuth 2.0 Dynamic Client Registration Protocol", | |||
| RFC 7591, DOI 10.17487/RFC7591, July 2015, | RFC 7591, DOI 10.17487/RFC7591, July 2015, | |||
| <http://www.rfc-editor.org/info/rfc7591>. | <http://www.rfc-editor.org/info/rfc7591>. | |||
| [RFC7744] Seitz, L., Ed., Gerdes, S., Ed., Selander, G., Mani, M., | [RFC7744] Seitz, L., Ed., Gerdes, S., Ed., Selander, G., Mani, M., | |||
| and S. Kumar, "Use Cases for Authentication and | and S. Kumar, "Use Cases for Authentication and | |||
| Authorization in Constrained Environments", RFC 7744, | Authorization in Constrained Environments", RFC 7744, | |||
| DOI 10.17487/RFC7744, January 2016, | DOI 10.17487/RFC7744, January 2016, | |||
| <http://www.rfc-editor.org/info/rfc7744>. | <http://www.rfc-editor.org/info/rfc7744>. | |||
| [RFC7959] Bormann, C. and Z. Shelby, Ed., "Block-Wise Transfers in | ||||
| the Constrained Application Protocol (CoAP)", RFC 7959, | ||||
| DOI 10.17487/RFC7959, August 2016, | ||||
| <http://www.rfc-editor.org/info/rfc7959>. | ||||
| Appendix A. Design Justification | Appendix A. Design Justification | |||
| This section provides further insight into the design decisions of | This section provides further insight into the design decisions of | |||
| the solution documented in this document. Section 3 lists several | the solution documented in this document. Section 3 lists several | |||
| building blocks and briefly summarizes their importance. The | building blocks and briefly summarizes their importance. The | |||
| justification for offering some of those building blocks, as opposed | justification for offering some of those building blocks, as opposed | |||
| to using OAuth 2.0 as is, is given below. | to using OAuth 2.0 as is, is given below. | |||
| Common IoT constraints are: | Common IoT constraints are: | |||
| skipping to change at page 42, line 14 ¶ | skipping to change at page 44, line 4 ¶ | |||
| security reasons, e.g. to avoid an entry point for Denial-of- | security reasons, e.g. to avoid an entry point for Denial-of- | |||
| Service attacks. | Service attacks. | |||
| The communication interactions this framework builds upon (as | The communication interactions this framework builds upon (as | |||
| shown graphically in Figure 1) may be accomplished using a variety | shown graphically in Figure 1) may be accomplished using a variety | |||
| of different protocols, and not all parts of the message flow are | of different protocols, and not all parts of the message flow are | |||
| used in all applications due to the communication constraints. | used in all applications due to the communication constraints. | |||
| While we envision deployments to make use of CoAP we explicitly | While we envision deployments to make use of CoAP we explicitly | |||
| want to support HTTP, HTTP/2 or specific protocols, such as | want to support HTTP, HTTP/2 or specific protocols, such as | |||
| Bluetooth Smart communication, which does not necessarily use IP. | Bluetooth Smart communication, which does not necessarily use IP. | |||
| The latter raises the need for application layer security over the | The latter raises the need for application layer security over the | |||
| various interfaces. | various interfaces. | |||
| Appendix B. Roles and Responsibilites | Appendix B. Roles and Responsibilites | |||
| Resource Owner | Resource Owner | |||
| * Make sure that the RS is registered at the AS. | * Make sure that the RS is registered at the AS. This includes | |||
| making known to the AS which profiles, token_types, scopes, and | ||||
| key types (symmetric/asymmetric) the RS supports. Also making | ||||
| it known to the AS which audience(s) the RS identifies itself | ||||
| with. | ||||
| * Make sure that clients can discover the AS which is in charge | * Make sure that clients can discover the AS which is in charge | |||
| of the RS. | of the RS. | |||
| * Make sure that the AS has the necessary, up-to-date, access | * Make sure that the AS has the necessary, up-to-date, access | |||
| control policies for the RS. | control policies for the RS. | |||
| Requesting Party | Requesting Party | |||
| * Make sure that the client is provisioned the necessary | * Make sure that the client is provisioned the necessary | |||
| credentials to authenticate to the AS. | credentials to authenticate to the AS. | |||
| * Make sure that the client is configured to follow the security | * Make sure that the client is configured to follow the security | |||
| requirements of the Requesting Party, when issuing requests | requirements of the Requesting Party, when issuing requests | |||
| (e.g. minimum communication security requirements, trust | (e.g. minimum communication security requirements, trust | |||
| anchors). | anchors). | |||
| * Register the client at the AS. | * Register the client at the AS. This includes making known to | |||
| the AS which profiles, token_types, and key types (symmetric/ | ||||
| asymmetric) the client. | ||||
| Authorization Server | Authorization Server | |||
| * Register RS and manage corresponding security contexts. | * Register RS and manage corresponding security contexts. | |||
| * Register clients and including authentication credentials. | * Register clients and including authentication credentials. | |||
| * Allow Resource Owners to configure and update access control | * Allow Resource Owners to configure and update access control | |||
| policies related to their registered RS' | policies related to their registered RS' | |||
| * Expose a service that allows clients to request tokens. | * Expose the /token endpoint to allow clients to request tokens. | |||
| * Authenticate clients that wishes to request a token. | * Authenticate clients that wish to request a token. | |||
| * Process a token requests against the authorization policies | * Process a token request against the authorization policies | |||
| configured for the RS. | configured for the RS. | |||
| * Expose a service that allows RS's to submit token introspection | * Expose the /introspection endpoint that allows RS's to submit | |||
| requests. | token introspection requests. | |||
| * Authenticate RS's that wishes to get an introspection response. | * Authenticate RS's that wish to get an introspection response. | |||
| * Process token introspection requests. | * Process token introspection requests. | |||
| * Optionally: Handle token revocation. | * Optionally: Handle token revocation. | |||
| Client | Client | |||
| * Discover the AS in charge of the RS that is to be targeted with | * Discover the AS in charge of the RS that is to be targeted with | |||
| a request. | a request. | |||
| * Submit the token request (A). | * Submit the token request (A). | |||
| + Authenticate towards the AS. | + Authenticate towards the AS. | |||
| + Specify which RS, which resource(s), and which action(s) the | + Optionally (if not pre-configured): Specify which RS, which | |||
| request(s) will target. | resource(s), and which action(s) the request(s) will target. | |||
| + Specify preferences for communication security | ||||
| + If raw public key (rpk) or certificate is used, make sure | + If raw public key (rpk) or certificate is used, make sure | |||
| the AS has the right rpk or certificate for this client. | the AS has the right rpk or certificate for this client. | |||
| * Process the access token and client information (B) | * Process the access token and RS Information (B) | |||
| + Check that the token has the right format (e.g. CWT). | + Check that the RS Information provides the necessary | |||
| + Check that the client information provides the necessary | ||||
| security parameters (e.g. PoP key, information on | security parameters (e.g. PoP key, information on | |||
| communication security protocols supported by the RS). | communication security protocols supported by the RS). | |||
| * Send the token and request to the RS (C) | * Send the token and request to the RS (C) | |||
| + Authenticate towards the RS (this could coincide with the | + Authenticate towards the RS (this could coincide with the | |||
| proof of possession process). | proof of possession process). | |||
| + Transmit the token as specified by the AS (default is to an | + Transmit the token as specified by the AS (default is to the | |||
| authorization information resource, alternative options are | /authz-info endpoint, alternative options are specified by | |||
| as a CoAP option or in the DTLS handshake). | profiles). | |||
| + Perform the proof-of-possession procedure as specified for | + Perform the proof-of-possession procedure as specified by | |||
| the type of used token (this may already have been taken | the profile in use (this may already have been taken care of | |||
| care of through the authentication procedure). | through the authentication procedure). | |||
| * Process the RS response (F) requirements of the Requesting | * Process the RS response (F) requirements of the Requesting | |||
| Party, when issuing requests (e.g. minimum communication | Party, when issuing requests (e.g. minimum communication | |||
| security requirements, trust anchors). | security requirements, trust anchors). | |||
| * Register the client at the AS. | * Register the client at the AS. | |||
| Resource Server | Resource Server | |||
| * Expose a way to submit access tokens. | * Expose a way to submit access tokens. By default this is the | |||
| /authz-info endpoint. | ||||
| * Process an access token. | * Process an access token. | |||
| + Verify the token is from the right AS. | + Verify the token is from the right AS. | |||
| + Verify that the token applies to this RS. | + Verify that the token applies to this RS. | |||
| + Check that the token has not expired (if the token provides | + Check that the token has not expired (if the token provides | |||
| expiration information). | expiration information). | |||
| + Check the token's integrity. | + Check the token's integrity. | |||
| + Store the token so that it can be retrieved in the context | + Store the token so that it can be retrieved in the context | |||
| of a matching request. | of a matching request. | |||
| * Process a request. | * Process a request. | |||
| skipping to change at page 44, line 4 ¶ | skipping to change at page 45, line 49 ¶ | |||
| + Verify the token is from the right AS. | + Verify the token is from the right AS. | |||
| + Verify that the token applies to this RS. | + Verify that the token applies to this RS. | |||
| + Check that the token has not expired (if the token provides | + Check that the token has not expired (if the token provides | |||
| expiration information). | expiration information). | |||
| + Check the token's integrity. | + Check the token's integrity. | |||
| + Store the token so that it can be retrieved in the context | + Store the token so that it can be retrieved in the context | |||
| of a matching request. | of a matching request. | |||
| * Process a request. | * Process a request. | |||
| + Set up communication security with the client. | + Set up communication security with the client. | |||
| + Authenticate the client. | + Authenticate the client. | |||
| + Match the client against existing tokens. | + Match the client against existing tokens. | |||
| + Check that tokens belonging to the client actually authorize | + Check that tokens belonging to the client actually authorize | |||
| the requested action. | the requested action. | |||
| + Optionally: Check that the matching tokens are still valid | + Optionally: Check that the matching tokens are still valid | |||
| (if this is possible. | (if this is possible.) | |||
| * Send a response following the agreed upon communication | * Send a response following the agreed upon communication | |||
| security. | security. | |||
| Appendix C. Deployment Examples | Appendix C. Requirements on Profiles | |||
| This section lists the requirements on profiles of this framework, | ||||
| for the convenience of a profile designer. All this information is | ||||
| also given in the appropriate sections of the main document, this is | ||||
| just meant as a checklist, to make it more easy to spot parts one | ||||
| might have missed. | ||||
| o Specify the discovery process of how the client finds the right AS | ||||
| for an RS it wants to send a request to. | ||||
| o Specify the communication protocol the client and RS the must use | ||||
| (e.g. CoAP). | ||||
| o Specify the security protocol the client and RS must use to | ||||
| protect their communication (e.g. OSCOAP or DTLS over CoAP). | ||||
| This must provide encryption and integrity protection. | ||||
| o Specify how the client and the RS mutually authenticate | ||||
| o Specify the Content-format of the protocol messages (e.g. | ||||
| "application/cbor" or "application/cose+cbor"). | ||||
| o Specify the proof-of-possession protocol(s) and how to select one, | ||||
| if several are available. Also specify which key types (e.g. | ||||
| symmetric/asymmetric) are supported by a specific proof-of- | ||||
| possession protocol. | ||||
| o Specify a unique profile identifier. | ||||
| o Optionally specify how the RS talks to the AS for introspection. | ||||
| o Optionally specify how the client talks to the AS for requesting a | ||||
| token. | ||||
| o Specify how/if the /authz-info endpoint is protected. | ||||
| o Optionally define other methods of token transport than the | ||||
| /authz-info endpoint. | ||||
| Appendix D. Deployment Examples | ||||
| There is a large variety of IoT deployments, as is indicated in | There is a large variety of IoT deployments, as is indicated in | |||
| Appendix A, and this section highlights a few common variants. This | Appendix A, and this section highlights a few common variants. This | |||
| section is not normative but illustrates how the framework can be | section is not normative but illustrates how the framework can be | |||
| applied. | applied. | |||
| For each of the deployment variants there are a number of possible | For each of the deployment variants there are a number of possible | |||
| security setups between clients, resource servers and authorization | security setups between clients, resource servers and authorization | |||
| servers. The main focus in the following subsections is on how | servers. The main focus in the following subsections is on how | |||
| authorization of a client request for a resource hosted by a RS is | authorization of a client request for a resource hosted by a RS is | |||
| performed. This requires the the security of the requests and | performed. This requires the the security of the requests and | |||
| responses between the clients and the RS to consider. | responses between the clients and the RS to consider. | |||
| Note: CBOR diagnostic notation is used for examples of requests and | Note: CBOR diagnostic notation is used for examples of requests and | |||
| responses. | responses. | |||
| C.1. Local Token Validation | D.1. Local Token Validation | |||
| In this scenario we consider the case where the resource server is | In this scenario we consider the case where the resource server is | |||
| offline, i.e. it is not connected to the AS at the time of the access | offline, i.e. it is not connected to the AS at the time of the access | |||
| request. This access procedure involves steps A, B, C, and F of | request. This access procedure involves steps A, B, C, and F of | |||
| Figure 1. | Figure 1. | |||
| Since the resource server must be able to verify the access token | Since the resource server must be able to verify the access token | |||
| locally, self-contained access tokens must be used. | locally, self-contained access tokens must be used. | |||
| This example shows the interactions between a client, the | This example shows the interactions between a client, the | |||
| authorization server and a temperature sensor acting as a resource | authorization server and a temperature sensor acting as a resource | |||
| server. Message exchanges A and B are shown in Figure 17. | server. Message exchanges A and B are shown in Figure 16. | |||
| A: The client first generates a public-private key pair used for | A: The client first generates a public-private key pair used for | |||
| communication security with the RS. | communication security with the RS. | |||
| The client sends the POST request to /token at the AS. The | The client sends the POST request to /token at the AS. The | |||
| request contains the public key of the client and the Audience | security of this request can be transport or application layer, it | |||
| parameter set to "tempSensorInLivingRoom", a value that the | is up the the comunication security profile to define. In the | |||
| temperature sensor identifies itself with. The AS evaluates the | example trasport layer identification of the AS is done and the | |||
| request and authorizes the client to access the resource. | client identifies with client_id and client_secret as in classic | |||
| OAuth. The request contains the public key of the client and the | ||||
| B: The AS responds with a PoP token and client information. The | Audience parameter set to "tempSensorInLivingRoom", a value that | |||
| PoP token contains the public key of the client, and the client | the temperature sensor identifies itself with. The AS evaluates | |||
| information contains the public key of the RS. For communication | the request and authorizes the client to access the resource. | |||
| B: The AS responds with a PoP token and RS Information. The PoP | ||||
| token contains the public key of the client, and the RS | ||||
| Information contains the public key of the RS. For communication | ||||
| security this example uses DTLS RawPublicKey between the client | security this example uses DTLS RawPublicKey between the client | |||
| and the RS. The issued token will have a short validity time, | and the RS. The issued token will have a short validity time, | |||
| i.e. 'exp' close to 'iat', to protect the RS from replay attacks | i.e. 'exp' close to 'iat', to protect the RS from replay attacks. | |||
| since it, that cannot do introspection to check the tokens current | The token includes the claim such as "scope" with the authorized | |||
| validity. The token includes the claim "aif" with the authorized | access that an owner of the temperature device can enjoy. In this | |||
| access that an owner of the temperature device can enjoy. The | example, the 'scope' claim, issued by the AS, informs the RS that | |||
| 'aif' claim, issued by the AS, informs the RS that the owner of | the owner of the token, that can prove the possession of a key is | |||
| the token, that can prove the possession of a key is authorized to | authorized to make a GET request against the /temperature resource | |||
| make a GET request against the /temperature resource and a POST | and a POST request on the /firmware resource. Note that the | |||
| request on the /firmware resource. | syntax and semantics of the scope claim are application specific. | |||
| Note: In this example we assume that the client knows what | Note: In this example we assume that the client knows what | |||
| resource it wants to access, and is therefore able to request | resource it wants to access, and is therefore able to request | |||
| specific audience and scope claims for the access token. | specific audience and scope claims for the access token. | |||
| Authorization | Authorization | |||
| Client Server | Client Server | |||
| | | | | | | |||
| |<=======>| DTLS Connection Establishment | ||||
| | | to identify the AS | ||||
| | | | | | | |||
| A: +-------->| Header: POST (Code=0.02) | A: +-------->| Header: POST (Code=0.02) | |||
| | POST | Uri-Path:"token" | | POST | Uri-Path:"token" | |||
| | | Content-Type: application/cbor | | | Content-Type: application/cbor | |||
| | | Payload: <Request-Payload> | | | Payload: <Request-Payload> | |||
| | | | | | | |||
| B: |<--------+ Header: 2.05 Content | B: |<--------+ Header: 2.05 Content | |||
| | 2.05 | Content-Type: application/cbor | | 2.05 | Content-Type: application/cbor | |||
| | | Payload: <Response-Payload> | | | Payload: <Response-Payload> | |||
| | | | | | | |||
| Figure 17: Token Request and Response Using Client Credentials. | Figure 16: Token Request and Response Using Client Credentials. | |||
| The information contained in the Request-Payload and the Response- | The information contained in the Request-Payload and the Response- | |||
| Payload is shown in Figure 18. | Payload is shown in Figure 17. Note that we assume a DTLS-based | |||
| communication security profile for this example, therefore the | ||||
| Content-Type is "application/cbor". | ||||
| Request-Payload : | Request-Payload : | |||
| { | { | |||
| "grant_type" : "client_credentials", | "grant_type" : "client_credentials", | |||
| "aud" : "tempSensorInLivingRoom", | "aud" : "tempSensorInLivingRoom", | |||
| "client_id" : "myclient", | "client_id" : "myclient", | |||
| "client_secret" : "qwerty" | "client_secret" : "qwerty" | |||
| } | } | |||
| Response-Payload : | Response-Payload : | |||
| skipping to change at page 46, line 29 ¶ | skipping to change at page 48, line 52 ¶ | |||
| "COSE_Key" : { | "COSE_Key" : { | |||
| "kid" : b64'c29tZSBwdWJsaWMga2V5IGlk', | "kid" : b64'c29tZSBwdWJsaWMga2V5IGlk', | |||
| "kty" : "EC", | "kty" : "EC", | |||
| "crv" : "P-256", | "crv" : "P-256", | |||
| "x" : b64'MKBCTNIcKUSDii11ySs3526iDZ8AiTo7Tu6KPAqv7D4', | "x" : b64'MKBCTNIcKUSDii11ySs3526iDZ8AiTo7Tu6KPAqv7D4', | |||
| "y" : b64'4Etl6SRW2YiLUrN5vfvVHuhp7x8PxltmWWlbbM4IFyM' | "y" : b64'4Etl6SRW2YiLUrN5vfvVHuhp7x8PxltmWWlbbM4IFyM' | |||
| } | } | |||
| } | } | |||
| } | } | |||
| Figure 18: Request and Response Payload Details. | Figure 17: Request and Response Payload Details. | |||
| The content of the access token is shown in Figure 19. | The content of the access token is shown in Figure 18. | |||
| { | { | |||
| "aud" : "tempSensorInLivingRoom", | "aud" : "tempSensorInLivingRoom", | |||
| "iat" : "1360189224", | "iat" : "1360189224", | |||
| "exp" : "1360289224", | "exp" : "1360289224", | |||
| "aif" : [["/temperature", 0], ["/firmware", 2]], | "scope" : "temperature_g firmware_p", | |||
| "cnf" : { | "cnf" : { | |||
| "jwk" : { | "jwk" : { | |||
| "kid" : b64'1Bg8vub9tLe1gHMzV76e8', | "kid" : b64'1Bg8vub9tLe1gHMzV76e8', | |||
| "kty" : "EC", | "kty" : "EC", | |||
| "crv" : "P-256", | "crv" : "P-256", | |||
| "x" : b64'f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU', | "x" : b64'f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU', | |||
| "y" : b64'x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0' | "y" : b64'x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0' | |||
| } | } | |||
| } | } | |||
| } | } | |||
| Figure 19: Access Token including Public Key of the Client. | Figure 18: Access Token including Public Key of the Client. | |||
| Messages C and F are shown in Figure 20 - Figure 21. | Messages C and F are shown in Figure 19 - Figure 20. | |||
| C: The client then sends the PoP token to the /authz-info resource | C: The client then sends the PoP token to the /authz-info endpoint | |||
| at the RS. This is a plain CoAP request, i.e. no transport or | at the RS. This is a plain CoAP request, i.e. no transport or | |||
| application layer security between client and RS, since the token | application layer security between client and RS, since the token | |||
| is integrity protected between AS and RS. The RS verifies that | is integrity protected between AS and RS. The RS verifies that | |||
| the PoP token was created by a known and trusted AS, is valid, and | the PoP token was created by a known and trusted AS, is valid, and | |||
| responds to the client. The RS caches the security context | responds to the client. The RS caches the security context | |||
| together with authorization information about this client | together with authorization information about this client | |||
| contained in the PoP token. | contained in the PoP token. | |||
| Resource | Resource | |||
| Client Server | Client Server | |||
| | | | | | | |||
| C: +-------->| Header: POST (Code=0.02) | C: +-------->| Header: POST (Code=0.02) | |||
| | POST | Uri-Path:"authz-info" | | POST | Uri-Path:"authz-info" | |||
| | | Payload: SlAV32hkKG ... | | | Payload: SlAV32hkKG ... | |||
| | | | | | | |||
| |<--------+ Header: 2.01 Created | |<--------+ Header: 2.04 Changed | |||
| | 2.01 | | | 2.04 | | |||
| | | | | | | |||
| Figure 20: Access Token provisioning to RS | Figure 19: Access Token provisioning to RS | |||
| The client and the RS runs the DTLS handshake using the raw public | The client and the RS runs the DTLS handshake using the raw public | |||
| keys established in step B and C. | keys established in step B and C. | |||
| The client sends the CoAP request GET to /temperature on RS over | The client sends the CoAP request GET to /temperature on RS over | |||
| DTLS. The RS verifies that the request is authorized, based on | DTLS. The RS verifies that the request is authorized, based on | |||
| previously established security context. | previously established security context. | |||
| F: The RS responds with a resource representation over DTLS. | F: The RS responds with a resource representation over DTLS. | |||
| Resource | Resource | |||
| Client Server | Client Server | |||
| | | | | | | |||
| |<=======>| DTLS Connection Establishment | |<=======>| DTLS Connection Establishment | |||
| | | using Raw Public Keys | | | using Raw Public Keys | |||
| | | | | | | |||
| +-------->| Header: GET (Code=0.01) | +-------->| Header: GET (Code=0.01) | |||
| | GET | Uri-Path: "temperature" | | GET | Uri-Path: "temperature" | |||
| | | | | | | |||
| | | | | | | |||
| | | | | | | |||
| F: |<--------+ Header: 2.05 Content | F: |<--------+ Header: 2.05 Content | |||
| | 2.05 | Payload: <sensor value> | | 2.05 | Payload: <sensor value> | |||
| | | | | | | |||
| Figure 21: Resource Request and Response protected by DTLS. | Figure 20: Resource Request and Response protected by DTLS. | |||
| C.2. Introspection Aided Token Validation | D.2. Introspection Aided Token Validation | |||
| In this deployment scenario we assume that a client is not be able to | In this deployment scenario we assume that a client is not able to | |||
| access the AS at the time of the access request. Since the RS is, | access the AS at the time of the access request. Since the RS is, | |||
| however, connected to the back-end infrastructure it can make use of | however, connected to the back-end infrastructure it can make use of | |||
| token introspection. This access procedure involves steps A-F of | token introspection. This access procedure involves steps A-F of | |||
| Figure 1, but assumes steps A and B have been carried out during a | Figure 1, but assumes steps A and B have been carried out during a | |||
| phase when the client had connectivity to AS. | phase when the client had connectivity to AS. | |||
| Since the client is assumed to be offline, at least for a certain | Since the client is assumed to be offline, at least for a certain | |||
| period of time, a pre-provisioned access token has to be long-lived. | period of time, a pre-provisioned access token has to be long-lived. | |||
| The resource server may use its online connectivity to validate the | The resource server may use its online connectivity to validate the | |||
| access token with the authorization server, which is shown in the | access token with the authorization server, which is shown in the | |||
| example below. | example below. | |||
| In the example we show the interactions between an offline client | In the example interactions between an offline client (key fob), a RS | |||
| (key fob), a resource server (online lock), and an authorization | (online lock), and an AS is shown. We assume that there is a | |||
| server. We assume that there is a provisioning step where the client | provisioning step where the client has access to the AS. This | |||
| has access to the AS. This corresponds to message exchanges A and B | corresponds to message exchanges A and B which are shown in | |||
| which are shown in Figure 22. | Figure 21. | |||
| Authorization consent from the resource owner can be pre-configured, | Authorization consent from the resource owner can be pre-configured, | |||
| but it can also be provided via an interactive flow with the resource | but it can also be provided via an interactive flow with the resource | |||
| owner. An example of this for the key fob case could be that the | owner. An example of this for the key fob case could be that the | |||
| resource owner has a connected car, he buys a generic key that he | resource owner has a connected car, he buys a generic key that he | |||
| wants to use with the car. To authorize the key fob he connects it | wants to use with the car. To authorize the key fob he connects it | |||
| to his computer that then provides the UI for the device. After that | to his computer that then provides the UI for the device. After that | |||
| OAuth 2.0 implicit flow can used to authorize the key for his car at | OAuth 2.0 implicit flow can used to authorize the key for his car at | |||
| the the car manufacturers AS. | the the car manufacturers AS. | |||
| skipping to change at page 48, line 46 ¶ | skipping to change at page 51, line 19 ¶ | |||
| be used to access since the token request is not send at the time of | be used to access since the token request is not send at the time of | |||
| access. So the scope and audience parameters is set quite wide to | access. So the scope and audience parameters is set quite wide to | |||
| start with and new values different form the original once can be | start with and new values different form the original once can be | |||
| returned from introspection later on. | returned from introspection later on. | |||
| A: The client sends the request using POST to /token at AS. The | A: The client sends the request using POST to /token at AS. The | |||
| request contains the Audience parameter set to "PACS1337" (PACS, | request contains the Audience parameter set to "PACS1337" (PACS, | |||
| Physical Access System), a value the that the online door in | Physical Access System), a value the that the online door in | |||
| question identifies itself with. The AS generates an access token | question identifies itself with. The AS generates an access token | |||
| as on opaque string, which it can match to the specific client, a | as on opaque string, which it can match to the specific client, a | |||
| targeted audience and a symmetric key. | targeted audience and a symmetric key. The security is provided | |||
| B: The AS responds with the an access token and client | by identifying the AS on transport layer using a pre shared | |||
| information, the latter containing a symmetric key. Communication | security context (psk, rpk or certificate) and then the client is | |||
| security between C and RS will be DTLS and PreSharedKey. The PoP | identified using client_id and client_secret as in classic OAuth | |||
| key being used as the PreSharedKey. | B: The AS responds with the an access token and RS Information, | |||
| the latter containing a symmetric key. Communication security | ||||
| between C and RS will be DTLS and PreSharedKey. The PoP key being | ||||
| used as the PreSharedKey. | ||||
| Authorization | Authorization | |||
| Client Server | Client Server | |||
| | | | | | | |||
| | | | | | | |||
| A: +-------->| Header: POST (Code=0.02) | A: +-------->| Header: POST (Code=0.02) | |||
| | POST | Uri-Path:"token" | | POST | Uri-Path:"token" | |||
| | | Content-Type: application/cbor | | | Content-Type: application/cbor | |||
| | | Payload: <Request-Payload> | | | Payload: <Request-Payload> | |||
| | | | | | | |||
| B: |<--------+ Header: 2.05 Content | B: |<--------+ Header: 2.05 Content | |||
| | | Content-Type: application/cbor | | | Content-Type: application/cbor | |||
| | 2.05 | Payload: <Response-Payload> | | 2.05 | Payload: <Response-Payload> | |||
| | | | | | | |||
| Figure 22: Token Request and Response using Client Credentials. | Figure 21: Token Request and Response using Client Credentials. | |||
| The information contained in the Request-Payload and the Response- | The information contained in the Request-Payload and the Response- | |||
| Payload is shown in Figure 23. | Payload is shown in Figure 22. | |||
| Request-Payload: | Request-Payload: | |||
| { | { | |||
| "grant_type" : "client_credentials", | "grant_type" : "client_credentials", | |||
| "aud" : "lockOfDoor4711", | "aud" : "lockOfDoor4711", | |||
| "client_id" : "keyfob", | "client_id" : "keyfob", | |||
| "client_secret" : "qwerty" | "client_secret" : "qwerty" | |||
| } | } | |||
| Response-Payload: | Response-Payload: | |||
| skipping to change at page 49, line 47 ¶ | skipping to change at page 52, line 28 ¶ | |||
| "cnf" : { | "cnf" : { | |||
| "COSE_Key" : { | "COSE_Key" : { | |||
| "kid" : b64'c29tZSBwdWJsaWMga2V5IGlk', | "kid" : b64'c29tZSBwdWJsaWMga2V5IGlk', | |||
| "kty" : "oct", | "kty" : "oct", | |||
| "alg" : "HS256", | "alg" : "HS256", | |||
| "k": b64'ZoRSOrFzN_FzUA5XKMYoVHyzff5oRJxl-IXRtztJ6uE' | "k": b64'ZoRSOrFzN_FzUA5XKMYoVHyzff5oRJxl-IXRtztJ6uE' | |||
| } | } | |||
| } | } | |||
| } | } | |||
| Figure 23: Request and Response Payload for C offline | Figure 22: Request and Response Payload for C offline | |||
| The access token in this case is just an opaque string referencing | The access token in this case is just an opaque string referencing | |||
| the authorization information at the AS. | the authorization information at the AS. | |||
| C: Next, the client POSTs the access token to the /authz-info | C: Next, the client POSTs the access token to the /authz-info | |||
| resource in the RS. This is a plain CoAP request, i.e. no DTLS | endpoint in the RS. This is a plain CoAP request, i.e. no DTLS | |||
| between client and RS. Since the token is an opaque string, the | between client and RS. Since the token is an opaque string, the | |||
| RS cannot verify it on its own, and thus defers to respond the | RS cannot verify it on its own, and thus defers to respond the | |||
| client with a status code until after step E. | client with a status code until after step E. | |||
| D: The RS forwards the token to the /introspect resource on the | D: The RS forwards the token to the /introspect endpoint on the | |||
| AS. Introspection assumes a secure connection between the AS and | AS. Introspection assumes a secure connection between the AS and | |||
| the RS, e.g. using transport of application layer security, which | the RS, e.g. using transport of application layer security. In | |||
| is not detailed in this example. | the example AS is identified using pre shared security context | |||
| (psk, rpk or certificate) while RS is acting as client and is | ||||
| identified with client_id and client_secret. | ||||
| E: The AS provides the introspection response containing | E: The AS provides the introspection response containing | |||
| parameters about the token. This includes the confirmation key | parameters about the token. This includes the confirmation key | |||
| (cnf) parameter that allows the RS to verify the client's proof of | (cnf) parameter that allows the RS to verify the client's proof of | |||
| possession in step F. | possession in step F. | |||
| After receiving message E, the RS responds to the client's POST in | After receiving message E, the RS responds to the client's POST in | |||
| step C with Code 2.01 Created. | step C with the CoAP response code 2.01 (Created). | |||
| Resource | Resource | |||
| Client Server | Client Server | |||
| | | | | | | |||
| C: +-------->| Header: POST (T=CON, Code=0.02) | C: +-------->| Header: POST (T=CON, Code=0.02) | |||
| | POST | Uri-Path:"authz-info" | | POST | Uri-Path:"authz-info" | |||
| | | Content-Type: "application/cbor" | | | Content-Type: "application/cbor" | |||
| | | Payload: b64'SlAV32hkKG ...'' | | | Payload: b64'SlAV32hkKG ...'' | |||
| | | | | | | |||
| | | Authorization | | | Authorization | |||
| | | Server | | | Server | |||
| | | | | | | | | |||
| D: | +--------->| Header: POST (Code=0.02) | | D: +--------->| Header: POST (Code=0.02) | |||
| | | POST | Uri-Path: "introspect" | | | POST | Uri-Path: "introspect" | |||
| | | | Content-Type: "application/cbor" | | | | Content-Type: "application/cbor" | |||
| | | | Payload: <Request-Payload> | | | | Payload: <Request-Payload> | |||
| | | | | | | | | |||
| E: | |<---------+ Header: 2.05 Content | | E: |<---------+ Header: 2.05 Content | |||
| | | 2.05 | Content-Type: "application/cbor" | | | 2.05 | Content-Type: "application/cbor" | |||
| | | | Payload: <Response-Payload> | | | | Payload: <Response-Payload> | |||
| | | | | | | | | |||
| | | | | | | |||
| C: |<--------+ Header: 2.01 Created | |<--------+ Header: 2.01 Created | |||
| | 2.01 | | | 2.01 | | |||
| | | | | | | |||
| Figure 24: Token Introspection for C offline | Figure 23: Token Introspection for C offline | |||
| The information contained in the Request-Payload and the Response- | The information contained in the Request-Payload and the Response- | |||
| Payload is shown in Figure 25. | Payload is shown in Figure 24. | |||
| Request-Payload: | Request-Payload: | |||
| { | { | |||
| "token" : b64'SlAV32hkKG...', | "token" : b64'SlAV32hkKG...', | |||
| "client_id" : "FrontDoor", | "client_id" : "FrontDoor", | |||
| "client_secret" : "ytrewq" | "client_secret" : "ytrewq" | |||
| } | } | |||
| Response-Payload: | Response-Payload: | |||
| { | { | |||
| "active" : true, | "active" : true, | |||
| "aud" : "lockOfDoor4711", | "aud" : "lockOfDoor4711", | |||
| "scope" : "open, close", | "scope" : "open, close", | |||
| "iat" : 1311280970, | "iat" : 1311280970, | |||
| "cnf" : { | "cnf" : { | |||
| "kid" : b64'JDLUhTMjU2IiwiY3R5Ijoi ...' | "kid" : b64'JDLUhTMjU2IiwiY3R5Ijoi ...' | |||
| } | } | |||
| } | } | |||
| Figure 25: Request and Response Payload for Introspection | Figure 24: Request and Response Payload for Introspection | |||
| The client uses the symmetric PoP key to establish a DTLS | The client uses the symmetric PoP key to establish a DTLS | |||
| PreSharedKey secure connection to the RS. The CoAP request PUT is | PreSharedKey secure connection to the RS. The CoAP request PUT is | |||
| sent to the uri-path /state on RS changing state of the door to | sent to the uri-path /state on RS changing state of the door to | |||
| locked. | locked. | |||
| F: The RS responds with a appropriate over the secure DTLS | F: The RS responds with a appropriate over the secure DTLS | |||
| channel. | channel. | |||
| Resource | Resource | |||
| Client Server | Client Server | |||
| skipping to change at page 51, line 46 ¶ | skipping to change at page 54, line 26 ¶ | |||
| | | using Pre Shared Key | | | using Pre Shared Key | |||
| | | | | | | |||
| +-------->| Header: PUT (Code=0.03) | +-------->| Header: PUT (Code=0.03) | |||
| | PUT | Uri-Path: "state" | | PUT | Uri-Path: "state" | |||
| | | Payload: <new state for the lock> | | | Payload: <new state for the lock> | |||
| | | | | | | |||
| F: |<--------+ Header: 2.04 Changed | F: |<--------+ Header: 2.04 Changed | |||
| | 2.04 | Payload: <new state for the lock> | | 2.04 | Payload: <new state for the lock> | |||
| | | | | | | |||
| Figure 26: Resource request and response protected by OSCOAP | Figure 25: Resource request and response protected by OSCOAP | |||
| Appendix D. Document Updates | Appendix E. Document Updates | |||
| D.1. Version -01 to -02 | ||||
| E.1. Version -02 to -03 | ||||
| o Removed references to draft-ietf-oauth-pop-key-distribution since | ||||
| the status of this draft is unclear. | ||||
| o Copied and adapted security considerations from draft-ietf-oauth- | ||||
| pop-key-distribution. | ||||
| o Renamed "client information" to "RS information" since it is | ||||
| information about the RS. | ||||
| o Clarified the requirements on profiles of this framework. | ||||
| o Clarified the token endpoint protocol and removed negotiation of | ||||
| 'profile' and 'alg' (section 6). | ||||
| o Renumbered the abbreviations for claims and parameters to get a | ||||
| consistent numbering across different endpoints. | ||||
| o Clarified the introspection endpoint. | ||||
| o Renamed token, introspection and authz-info to 'endpoint' instead | ||||
| of 'resource' to mirror the OAuth 2.0 terminology. | ||||
| o Updated the examples in the appendices. | ||||
| E.2. Version -01 to -02 | ||||
| o Restructured to remove communication security parts. These shall | o Restructured to remove communication security parts. These shall | |||
| now be defined in profiles. | now be defined in profiles. | |||
| o Restructured section 5 to create new sections on the OAuth | o Restructured section 5 to create new sections on the OAuth | |||
| endpoints /token, /introspect and /authz-info. | endpoints /token, /introspect and /authz-info. | |||
| o Pulled in material from draft-ietf-oauth-pop-key-distribution in | o Pulled in material from draft-ietf-oauth-pop-key-distribution in | |||
| order to define proof-of-possession key distribution. | order to define proof-of-possession key distribution. | |||
| o Introduced the 'cnf' parameter as defined in RFC7800 to reference | o Introduced the 'cnf' parameter as defined in RFC7800 to reference | |||
| or transport keys used for proof of posession. | or transport keys used for proof of posession. | |||
| o Introduced the 'client-token' to transport client information from | o Introduced the 'client-token' to transport client information from | |||
| the AS to the client via the RS in conjunction with introspection. | the AS to the client via the RS in conjunction with introspection. | |||
| o Expanded the IANA section to define parameters for token request, | o Expanded the IANA section to define parameters for token request, | |||
| introspection and CWT claims. | introspection and CWT claims. | |||
| o Moved deployment scenarios to the appendix as examples. | o Moved deployment scenarios to the appendix as examples. | |||
| D.2. Version -00 to -01 | E.3. Version -00 to -01 | |||
| o Changed 5.1. from "Communication Security Protocol" to "Client | o Changed 5.1. from "Communication Security Protocol" to "Client | |||
| Information". | Information". | |||
| o Major rewrite of 5.1 to clarify the information exchanged between | o Major rewrite of 5.1 to clarify the information exchanged between | |||
| C and AS in the PoP token request profile for IoT. | C and AS in the PoP token request profile for IoT. | |||
| * Allow the client to indicate preferences for the communication | * Allow the client to indicate preferences for the communication | |||
| security protocol. | security protocol. | |||
| * Defined the term "Client Information" for the additional | * Defined the term "Client Information" for the additional | |||
| information returned to the client in addition to the access | information returned to the client in addition to the access | |||
| skipping to change at page 53, line 24 ¶ | skipping to change at page 56, line 24 ¶ | |||
| Goeran Selander | Goeran Selander | |||
| Ericsson | Ericsson | |||
| Faroegatan 6 | Faroegatan 6 | |||
| Kista 164 80 | Kista 164 80 | |||
| SWEDEN | SWEDEN | |||
| Email: goran.selander@ericsson.com | Email: goran.selander@ericsson.com | |||
| Erik Wahlstroem | Erik Wahlstroem | |||
| Nexus Technology | ||||
| Telefonvagen 26 | ||||
| Hagersten 126 26 | ||||
| Sweden | Sweden | |||
| Email: erik.wahlstrom@nexusgroup.com | Email: erik@wahlstromtekniska.se | |||
| Samuel Erdtman | Samuel Erdtman | |||
| Spotify AB | Spotify AB | |||
| Birger Jarlsgatan 61, 4tr | Birger Jarlsgatan 61, 4tr | |||
| Stockholm 113 56 | Stockholm 113 56 | |||
| Sweden | Sweden | |||
| Email: erdtman@spotify.com | Email: erdtman@spotify.com | |||
| Hannes Tschofenig | Hannes Tschofenig | |||
| End of changes. 242 change blocks. | ||||
| 555 lines changed or deleted | 735 lines changed or added | |||
This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ | ||||