draft-ietf-ace-oauth-authz-24.txt   draft-ietf-ace-oauth-authz-25.txt 
ACE Working Group L. Seitz ACE Working Group L. Seitz
Internet-Draft RISE Internet-Draft RISE
Intended status: Standards Track G. Selander Intended status: Standards Track G. Selander
Expires: September 28, 2019 Ericsson Expires: May 2, 2020 Ericsson
E. Wahlstroem E. Wahlstroem
S. Erdtman S. Erdtman
Spotify AB Spotify AB
H. Tschofenig H. Tschofenig
Arm Ltd. Arm Ltd.
March 27, 2019 October 30, 2019
Authentication and Authorization for Constrained Environments (ACE) Authentication and Authorization for Constrained Environments (ACE)
using the OAuth 2.0 Framework (ACE-OAuth) using the OAuth 2.0 Framework (ACE-OAuth)
draft-ietf-ace-oauth-authz-24 draft-ietf-ace-oauth-authz-25
Abstract Abstract
This specification defines a framework for authentication and This specification defines a framework for authentication and
authorization in Internet of Things (IoT) environments called ACE- authorization in Internet of Things (IoT) environments called ACE-
OAuth. The framework is based on a set of building blocks including OAuth. The framework is based on a set of building blocks including
OAuth 2.0 and CoAP, thus making a well-known and widely used OAuth 2.0 and CoAP, thus transforming a well-known and widely used
authorization solution suitable for IoT devices. Existing authorization solution into a form suitable for IoT devices.
specifications are used where possible, but where the constraints of Existing specifications are used where possible, but extensions are
IoT devices require it, extensions are added and profiles are added and profiles are defined to better serve the IoT use cases.
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 https://datatracker.ietf.org/drafts/current/. Drafts is at https://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 September 28, 2019. This Internet-Draft will expire on May 2, 2020.
Copyright Notice Copyright Notice
Copyright (c) 2019 IETF Trust and the persons identified as the Copyright (c) 2019 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
(https://trustee.ietf.org/license-info) in effect on the date of (https://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 43 skipping to change at page 2, line 43
5.2. Authorization Grants . . . . . . . . . . . . . . . . . . 20 5.2. Authorization Grants . . . . . . . . . . . . . . . . . . 20
5.3. Client Credentials . . . . . . . . . . . . . . . . . . . 20 5.3. Client Credentials . . . . . . . . . . . . . . . . . . . 20
5.4. AS Authentication . . . . . . . . . . . . . . . . . . . . 21 5.4. AS Authentication . . . . . . . . . . . . . . . . . . . . 21
5.5. The Authorization Endpoint . . . . . . . . . . . . . . . 21 5.5. The Authorization Endpoint . . . . . . . . . . . . . . . 21
5.6. The Token Endpoint . . . . . . . . . . . . . . . . . . . 21 5.6. The Token Endpoint . . . . . . . . . . . . . . . . . . . 21
5.6.1. Client-to-AS Request . . . . . . . . . . . . . . . . 22 5.6.1. Client-to-AS Request . . . . . . . . . . . . . . . . 22
5.6.2. AS-to-Client Response . . . . . . . . . . . . . . . . 25 5.6.2. AS-to-Client Response . . . . . . . . . . . . . . . . 25
5.6.3. Error Response . . . . . . . . . . . . . . . . . . . 27 5.6.3. Error Response . . . . . . . . . . . . . . . . . . . 27
5.6.4. Request and Response Parameters . . . . . . . . . . . 28 5.6.4. Request and Response Parameters . . . . . . . . . . . 28
5.6.4.1. Grant Type . . . . . . . . . . . . . . . . . . . 28 5.6.4.1. Grant Type . . . . . . . . . . . . . . . . . . . 28
5.6.4.2. Token Type . . . . . . . . . . . . . . . . . . . 28 5.6.4.2. Token Type . . . . . . . . . . . . . . . . . . . 29
5.6.4.3. Profile . . . . . . . . . . . . . . . . . . . . . 29 5.6.4.3. Profile . . . . . . . . . . . . . . . . . . . . . 29
5.6.4.4. Client-Nonce . . . . . . . . . . . . . . . . . . 29 5.6.4.4. Client-Nonce . . . . . . . . . . . . . . . . . . 30
5.6.5. Mapping Parameters to CBOR . . . . . . . . . . . . . 29 5.6.5. Mapping Parameters to CBOR . . . . . . . . . . . . . 30
5.7. The Introspection Endpoint . . . . . . . . . . . . . . . 30 5.7. The Introspection Endpoint . . . . . . . . . . . . . . . 31
5.7.1. Introspection Request . . . . . . . . . . . . . . . . 31 5.7.1. Introspection Request . . . . . . . . . . . . . . . . 32
5.7.2. Introspection Response . . . . . . . . . . . . . . . 32 5.7.2. Introspection Response . . . . . . . . . . . . . . . 33
5.7.3. Error Response . . . . . . . . . . . . . . . . . . . 33 5.7.3. Error Response . . . . . . . . . . . . . . . . . . . 34
5.7.4. Mapping Introspection parameters to CBOR . . . . . . 34 5.7.4. Mapping Introspection parameters to CBOR . . . . . . 35
5.8. The Access Token . . . . . . . . . . . . . . . . . . . . 34 5.8. The Access Token . . . . . . . . . . . . . . . . . . . . 35
5.8.1. The Authorization Information Endpoint . . . . . . . 35 5.8.1. The Authorization Information Endpoint . . . . . . . 36
5.8.1.1. Verifying an Access Token . . . . . . . . . . . . 36 5.8.1.1. Verifying an Access Token . . . . . . . . . . . . 37
5.8.1.2. Protecting the Authorization Information 5.8.1.2. Protecting the Authorization Information
Endpoint . . . . . . . . . . . . . . . . . . . . 38 Endpoint . . . . . . . . . . . . . . . . . . . . 39
5.8.2. Client Requests to the RS . . . . . . . . . . . . . . 38 5.8.2. Client Requests to the RS . . . . . . . . . . . . . . 39
5.8.3. Token Expiration . . . . . . . . . . . . . . . . . . 39 5.8.3. Token Expiration . . . . . . . . . . . . . . . . . . 40
5.8.4. Key Expiration . . . . . . . . . . . . . . . . . . . 40 5.8.4. Key Expiration . . . . . . . . . . . . . . . . . . . 41
6. Security Considerations . . . . . . . . . . . . . . . . . . . 41 6. Security Considerations . . . . . . . . . . . . . . . . . . . 42
6.1. Unprotected AS Request Creation Hints . . . . . . . . . . 42 6.1. Protecting Tokens . . . . . . . . . . . . . . . . . . . . 42
6.2. Minimal security requirements for communication . 42 6.2. Communication Security . . . . . . . . . . . . . . . . . 43
6.3. Use of Nonces for Token Freshness . . . . . . . . . . . . 43 6.3. Long-Term Credentials . . . . . . . . . . . . . . . . . . 43
6.4. Combining profiles . . . . . . . . . . . . . . . . . . . 44 6.4. Unprotected AS Request Creation Hints . . . . . . . . . . 44
6.5. Unprotected Information . . . . . . . . . . . . . . . . . 44 6.5. Minimal security requirements for communication . 44
6.6. Identifying audiences . . . . . . . . . . . . . . . . . . 44 6.6. Token Freshness and Expiration . . . . . . . . . . . . . 46
6.7. Denial of service against or with Introspection . . 45 6.7. Combining profiles . . . . . . . . . . . . . . . . . . . 46
7. Privacy Considerations . . . . . . . . . . . . . . . . . . . 46 6.8. Unprotected Information . . . . . . . . . . . . . . . . . 46
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 46 6.9. Identifying audiences . . . . . . . . . . . . . . . . . . 47
8.1. ACE Authorization Server Request Creation Hints . . . . . 46 6.10. Denial of service against or with Introspection . . 48
8.2. OAuth Extensions Error Registration . . . . . . . . . . . 47 7. Privacy Considerations . . . . . . . . . . . . . . . . . . . 48
8.3. OAuth Error Code CBOR Mappings Registry . . . . . . . . . 47 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 49
8.4. OAuth Grant Type CBOR Mappings . . . . . . . . . . . . . 48 8.1. ACE Authorization Server Request Creation Hints . . . . . 49
8.5. OAuth Access Token Types . . . . . . . . . . . . . . . . 48 8.2. OAuth Extensions Error Registration . . . . . . . . . . . 50
8.6. OAuth Access Token Type CBOR Mappings . . . . . . . . . . 49 8.3. OAuth Error Code CBOR Mappings Registry . . . . . . . . . 50
8.6.1. Initial Registry Contents . . . . . . . . . . . . . . 49 8.4. OAuth Grant Type CBOR Mappings . . . . . . . . . . . . . 51
8.7. ACE Profile Registry . . . . . . . . . . . . . . . . . . 49 8.5. OAuth Access Token Types . . . . . . . . . . . . . . . . 51
8.8. OAuth Parameter Registration . . . . . . . . . . . . . . 50 8.6. OAuth Access Token Type CBOR Mappings . . . . . . . . . . 51
8.9. OAuth Parameters CBOR Mappings Registry . . . . . . . . . 50 8.6.1. Initial Registry Contents . . . . . . . . . . . . . . 52
8.10. OAuth Introspection Response Parameter Registration . . . 51 8.7. ACE Profile Registry . . . . . . . . . . . . . . . . . . 52
8.11. OAuth Token Introspection Response CBOR Mappings Registry 51 8.8. OAuth Parameter Registration . . . . . . . . . . . . . . 53
8.12. JSON Web Token Claims . . . . . . . . . . . . . . . . . . 51 8.9. OAuth Parameters CBOR Mappings Registry . . . . . . . . . 53
8.13. CBOR Web Token Claims . . . . . . . . . . . . . . . . . . 52 8.10. OAuth Introspection Response Parameter Registration . . . 53
8.14. Media Type Registrations . . . . . . . . . . . . . . . . 53 8.11. OAuth Token Introspection Response CBOR Mappings Registry 54
8.15. CoAP Content-Format Registry . . . . . . . . . . . . . . 54 8.12. JSON Web Token Claims . . . . . . . . . . . . . . . . . . 54
8.16. Expert Review Instructions . . . . . . . . . . . . . . . 54 8.13. CBOR Web Token Claims . . . . . . . . . . . . . . . . . . 55
9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 55 8.14. Media Type Registrations . . . . . . . . . . . . . . . . 56
10. References . . . . . . . . . . . . . . . . . . . . . . . . . 56 8.15. CoAP Content-Format Registry . . . . . . . . . . . . . . 57
10.1. Normative References . . . . . . . . . . . . . . . . . . 56 8.16. Expert Review Instructions . . . . . . . . . . . . . . . 57
10.2. Informative References . . . . . . . . . . . . . . . . . 58 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 58
Appendix A. Design Justification . . . . . . . . . . . . . . . . 60 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 58
Appendix B. Roles and Responsibilities . . . . . . . . . . . . . 64 10.1. Normative References . . . . . . . . . . . . . . . . . . 58
Appendix C. Requirements on Profiles . . . . . . . . . . . . . . 66 10.2. Informative References . . . . . . . . . . . . . . . . . 61
Appendix D. Assumptions on AS knowledge about C and RS . . . . . 67 Appendix A. Design Justification . . . . . . . . . . . . . . . . 63
Appendix E. Deployment Examples . . . . . . . . . . . . . . . . 67 Appendix B. Roles and Responsibilities . . . . . . . . . . . . . 67
E.1. Local Token Validation . . . . . . . . . . . . . . . . . 67 Appendix C. Requirements on Profiles . . . . . . . . . . . . . . 69
E.2. Introspection Aided Token Validation . . . . . . . . . . 72 Appendix D. Assumptions on AS knowledge about C and RS . . . . . 70
Appendix F. Document Updates . . . . . . . . . . . . . . . . . . 76 Appendix E. Deployment Examples . . . . . . . . . . . . . . . . 70
F.1. Version -21 to 22 . . . . . . . . . . . . . . . . . . . . 76 E.1. Local Token Validation . . . . . . . . . . . . . . . . . 71
F.2. Version -20 to 21 . . . . . . . . . . . . . . . . . . . . 76 E.2. Introspection Aided Token Validation . . . . . . . . . . 75
F.3. Version -19 to 20 . . . . . . . . . . . . . . . . . . . . 76
F.4. Version -18 to -19 . . . . . . . . . . . . . . . . . . . 77 Appendix F. Document Updates . . . . . . . . . . . . . . . . . . 79
F.5. Version -17 to -18 . . . . . . . . . . . . . . . . . . . 77 F.1. Version -21 to 22 . . . . . . . . . . . . . . . . . . . . 80
F.6. Version -16 to -17 . . . . . . . . . . . . . . . . . . . 77 F.2. Version -20 to 21 . . . . . . . . . . . . . . . . . . . . 80
F.7. Version -15 to -16 . . . . . . . . . . . . . . . . . . . 78 F.3. Version -19 to 20 . . . . . . . . . . . . . . . . . . . . 80
F.8. Version -14 to -15 . . . . . . . . . . . . . . . . . . . 78 F.4. Version -18 to -19 . . . . . . . . . . . . . . . . . . . 80
F.9. Version -13 to -14 . . . . . . . . . . . . . . . . . . . 78 F.5. Version -17 to -18 . . . . . . . . . . . . . . . . . . . 80
F.10. Version -12 to -13 . . . . . . . . . . . . . . . . . . . 78 F.6. Version -16 to -17 . . . . . . . . . . . . . . . . . . . 80
F.11. Version -11 to -12 . . . . . . . . . . . . . . . . . . . 78 F.7. Version -15 to -16 . . . . . . . . . . . . . . . . . . . 81
F.12. Version -10 to -11 . . . . . . . . . . . . . . . . . . . 79 F.8. Version -14 to -15 . . . . . . . . . . . . . . . . . . . 81
F.13. Version -09 to -10 . . . . . . . . . . . . . . . . . . . 79 F.9. Version -13 to -14 . . . . . . . . . . . . . . . . . . . 81
F.14. Version -08 to -09 . . . . . . . . . . . . . . . . . . . 79 F.10. Version -12 to -13 . . . . . . . . . . . . . . . . . . . 81
F.15. Version -07 to -08 . . . . . . . . . . . . . . . . . . . 79 F.11. Version -11 to -12 . . . . . . . . . . . . . . . . . . . 82
F.16. Version -06 to -07 . . . . . . . . . . . . . . . . . . . 80 F.12. Version -10 to -11 . . . . . . . . . . . . . . . . . . . 82
F.17. Version -05 to -06 . . . . . . . . . . . . . . . . . . . 80 F.13. Version -09 to -10 . . . . . . . . . . . . . . . . . . . 82
F.18. Version -04 to -05 . . . . . . . . . . . . . . . . . . . 80 F.14. Version -08 to -09 . . . . . . . . . . . . . . . . . . . 82
F.19. Version -03 to -04 . . . . . . . . . . . . . . . . . . . 80 F.15. Version -07 to -08 . . . . . . . . . . . . . . . . . . . 82
F.20. Version -02 to -03 . . . . . . . . . . . . . . . . . . . 80 F.16. Version -06 to -07 . . . . . . . . . . . . . . . . . . . 83
F.21. Version -01 to -02 . . . . . . . . . . . . . . . . . . . 81 F.17. Version -05 to -06 . . . . . . . . . . . . . . . . . . . 83
F.22. Version -00 to -01 . . . . . . . . . . . . . . . . . . . 81 F.18. Version -04 to -05 . . . . . . . . . . . . . . . . . . . 83
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 82 F.19. Version -03 to -04 . . . . . . . . . . . . . . . . . . . 84
F.20. Version -02 to -03 . . . . . . . . . . . . . . . . . . . 84
F.21. Version -01 to -02 . . . . . . . . . . . . . . . . . . . 84
F.22. Version -00 to -01 . . . . . . . . . . . . . . . . . . . 85
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 85
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 can be a authorization for a large number of devices and users can be a
complex task. complex task.
skipping to change at page 6, line 5 skipping to change at page 6, line 5
Note that the term "endpoint" is used here following its OAuth Note that the term "endpoint" is used here following its OAuth
definition, which is to denote resources such as token and definition, which is to denote resources such as token and
introspection at the AS and authz-info at the RS (see Section 5.8.1 introspection at the AS and authz-info at the RS (see Section 5.8.1
for a definition of the authz-info endpoint). The CoAP [RFC7252] for a definition of the authz-info endpoint). The CoAP [RFC7252]
definition, which is "An entity participating in the CoAP protocol" definition, which is "An entity participating in the CoAP protocol"
is not used in this specification. is not used in this specification.
The specifications in this document is called the "framework" or "ACE The specifications in this document is called the "framework" or "ACE
framework". When referring to "profiles of this framework" it refers framework". When referring to "profiles of this framework" it refers
to additional specifications that define the use of this to additional specifications that define the use of this
specification with concrete transport, and communication security specification with concrete transport and communication security
protocols (e.g., CoAP over DTLS). protocols (e.g., CoAP over DTLS).
We use the term "Access Information" for parameters other than the We use the term "Access Information" for parameters other than the
access token provided to the client by the AS to enable it to access access token provided to the client by the AS to enable it to access
the RS (e.g. public key of the RS, profile supported by RS). the RS (e.g. public key of the RS, profile supported by RS).
We use the term "Authorization Information" to denote all We use the term "Authorization Information" to denote all
information, including the claims of relevant access tokens, that an information, including the claims of relevant access tokens, that an
RS uses to determine whether an access request should be granted. RS uses to determine whether an access request should be granted.
skipping to change at page 6, line 33 skipping to change at page 6, line 33
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 appropriate. CoAP typically runs on top of UDP, which further
reduces overhead and message exchanges. While this specification reduces overhead and message exchanges. While this specification
defines extensions for the use of OAuth over CoAP, other underlying defines extensions for the use of OAuth over CoAP, other underlying
protocols are not prohibited from being supported in the future, such protocols are not prohibited from being supported in the future, such
as HTTP/2, MQTT, BLE and QUIC. as HTTP/2 [RFC7540], MQTT [MQTT5.0], BLE [BLE] and QUIC
[I-D.ietf-quic-transport]. Note that this document specifies
protocol exchanges in terms of RESTful verbs such as GET and POST.
Future profiles using protocols that do not support these verbs MUST
specify how the corresponding protocol messages are transmitted
instead.
A third building block is CBOR [RFC7049], for encodings where JSON A third building block is CBOR [RFC7049], for encodings where JSON
[RFC8259] is not sufficiently compact. CBOR is a binary encoding [RFC8259] 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 payload encoding of self contained tokens, and also for encoding payloads
transferred in protocol messages. transferred in protocol messages.
A fourth building block is the compact CBOR-based secure message A fourth building block is the CBOR-based secure message format COSE
format COSE [RFC8152], which enables application layer security as an [RFC8152], which enables object-level layer security as an
alternative or complement to transport layer security (DTLS [RFC6347] alternative or complement to transport layer security (DTLS [RFC6347]
or TLS [RFC8446]). COSE is used to secure self-contained tokens such or TLS [RFC8446]). COSE is used to secure self-contained tokens such
as proof-of-possession (PoP) tokens, which is an extension to the as proof-of-possession (PoP) tokens, which are an extension to the
OAuth tokens. The default token format is defined in CBOR web token OAuth bearer tokens. The default token format is defined in CBOR web
(CWT) [RFC8392]. Application layer security for CoAP using COSE can token (CWT) [RFC8392]. Application layer security for CoAP using
be provided with OSCORE [I-D.ietf-core-object-security]. COSE can be provided with OSCORE [RFC8613].
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 [RFC7228] and a description of constraints is described in detail in [RFC7228] and a description of
how the building blocks mentioned above relate to the various how the building blocks mentioned above relate to the various
constraints can be found in Appendix A. 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 8, line 6 skipping to change at page 8, line 8
"Introspection" below.) "Introspection" below.)
Access Tokens: Access Tokens:
Access tokens are credentials needed to access protected Access tokens are credentials needed to access protected
resources. An access token is a data structure representing resources. An access token is a data structure representing
authorization permissions issued by the AS to the client. Access authorization permissions issued by the AS to the client. Access
tokens are generated by the AS and consumed by the RS. The access tokens are generated by the AS and consumed by the RS. The access
token content is opaque to the client. token content is opaque to the 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.
Refresh Tokens: Refresh Tokens:
Refresh tokens are credentials used to obtain access tokens. Refresh tokens are credentials used to obtain access tokens.
Refresh tokens are issued to the client by the authorization Refresh tokens are issued to the client by the authorization
server and are used to obtain a new access token when the current server and are used to obtain a new access token when the current
access token becomes invalid or expires, or to obtain additional access token becomes invalid or expires, or to obtain additional
access tokens with identical or narrower scope (access tokens may access tokens with identical or narrower scope (such access tokens
have a shorter lifetime and fewer permissions than authorized by may have a shorter lifetime and fewer permissions than authorized
the resource owner). Issuing a refresh token is optional at the by the resource owner). Issuing a refresh token is optional at
discretion of the authorization server. If the authorization the discretion of the authorization server. If the authorization
server issues a refresh token, it is included when issuing an server issues a refresh token, it is included when issuing an
access token (i.e., step (B) in Figure 1). access token (i.e., step (B) in Figure 1).
A refresh token in OAuth 2.0 is a string representing the A refresh token in OAuth 2.0 is a string representing the
authorization granted to the client by the resource owner. The authorization granted to the client by the resource owner. The
string is usually opaque to the client. The token denotes an string is usually opaque to the client. The token denotes an
identifier used to retrieve the authorization information. Unlike identifier used to retrieve the authorization information. Unlike
access tokens, refresh tokens are intended for use only with access tokens, refresh tokens are intended for use only with
authorization servers and are never sent to resource servers. In authorization servers and are never sent to resource servers. In
this framework, refresh tokens are encoded in binary instead of this framework, refresh tokens are encoded in binary instead of
strings, if used. strings, if used.
Proof of Possession Tokens: Proof of Possession Tokens:
An access token may be bound to a cryptographic key, which is then A token may be bound to a cryptographic key, which is then used to
used by an RS to authenticate requests from a client. Such tokens bind the token to a request authorized by the token. Such tokens
are called proof-of-possession access tokens (or PoP access are called proof-of-possession tokens (or PoP tokens).
tokens).
The proof-of-possession (PoP) security concept assumes that the AS The proof-of-possession (PoP) security concept used here assumes
acts as a trusted third party that binds keys to access tokens. that the AS acts as a trusted third party that binds keys to
These so called PoP keys are then used by the client to tokens. In the case of access tokens, these so called PoP keys
demonstrate the possession of the secret to the RS when accessing are then used by the client to demonstrate the possession of the
the resource. The RS, when receiving an access token, needs to secret to the RS when accessing the resource. The RS, when
verify that the key used by the client matches the one bound to receiving an access token, needs to verify that the key used by
the access token. When this specification uses the term "access the client matches the one bound to the access token. When this
token" it is assumed to be a PoP access token token unless specification uses the term "access token" it is assumed to be a
specifically stated otherwise. PoP access token token unless specifically stated otherwise.
The key bound to the access token (the PoP key) may use either The key bound to the token (the PoP key) may use either symmetric
symmetric or asymmetric cryptography. The appropriate choice of or asymmetric cryptography. The appropriate choice of the kind of
the kind of cryptography depends on the constraints of the IoT cryptography depends on the constraints of the IoT devices as well
devices as well as on the security requirements of the use case. as on the security requirements of the use case.
Symmetric PoP key: Symmetric PoP key:
The AS generates a random symmetric PoP key. The key is either The AS generates a random symmetric PoP key. The key is either
stored to be returned on introspection calls or encrypted and stored to be returned on introspection calls or encrypted and
included in the access token. The PoP key is also encrypted included in the token. The PoP key is also encrypted for the
for the client and sent together with the access token to the token recipient and sent to the recipient together with the
client. token.
Asymmetric PoP key: Asymmetric PoP key:
An asymmetric key pair is generated on the client and the An asymmetric key pair is generated on the token's recipient
public key is sent to the AS (if it does not already have and the public key is sent to the AS (if it does not already
knowledge of the client's public key). Information about the have knowledge of the recipient's public key). Information
public key, which is the PoP key in this case, is either stored about the public key, which is the PoP key in this case, is
to be returned on introspection calls or included inside the either stored to be returned on introspection calls or included
access token and sent back to the requesting client. The RS inside the token and sent back to the requesting party. The
can identify the client's public key from the information in consumer of the token can identify the public key from the
the token, which allows the client to use the corresponding information in the token, which allows the recipient of the
private key for the proof of possession. token to use the corresponding private key for the proof of
possession.
The access token is either a simple reference, or a structured The token is either a simple reference, or a structured
information object (e.g., CWT [RFC8392]) protected by a information object (e.g., CWT [RFC8392]) protected by a
cryptographic wrapper (e.g., COSE [RFC8152]). The choice of PoP cryptographic wrapper (e.g., COSE [RFC8152]). 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. integrity protection of the token.
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 token seeking to obtain (via the scope parameter) in the access token
request. In turn, the AS may use the scope response parameter to request. In turn, the AS may use the scope response parameter to
inform the client of the scope of the access token issued. As the inform the client of the scope of the access token issued. As the
client could be a constrained device as well, this specification client could be a constrained device as well, this specification
defines the use of CBOR encoding as data format, see Section 5, to defines the use of CBOR encoding, see Section 5, for such requests
request scopes and to be informed what scopes the access token and responses.
actually authorizes.
The values of the scope parameter in OAuth 2.0 are expressed as a The values of the scope parameter in OAuth 2.0 are expressed as a
list of space-delimited, case-sensitive strings, with a semantic list of space-delimited, case-sensitive strings, with a semantic
that is well-known to the AS and the RS. More details about the that is well-known to the AS and the RS. More details about the
concept of scopes is found under Section 3.3 in [RFC6749]. concept of scopes is found under Section 3.3 in [RFC6749].
Claims: Claims:
Information carried in the access token or returned from Information carried in the access token or returned from
introspection, called claims, is in the form of name-value pairs. introspection, called claims, is in the form of name-value pairs.
An access token may, for example, include a claim identifying the An access token may, for example, include a claim identifying the
AS that issued the token (via the "iss" claim) and what audience AS that issued the token (via the "iss" claim) and what audience
the access token is intended for (via the "aud" claim). The the access token is intended for (via the "aud" claim). The
audience of an access token can be a specific resource or one or audience of an access token can be a specific resource or one or
many resource servers. The resource owner policies influence what many resource servers. The resource owner policies influence what
claims are put into the access token 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
skipping to change at page 11, line 7 skipping to change at page 11, line 9
Transport layer security for CoAP can be provided by DTLS or TLS Transport layer security for CoAP can be provided by DTLS or TLS
[RFC6347][RFC8446] [I-D.ietf-tls-dtls13]. CoAP defines a number of [RFC6347][RFC8446] [I-D.ietf-tls-dtls13]. CoAP defines a number of
proxy operations that require transport layer security to be proxy operations that require transport layer security to be
terminated at the proxy. One approach for protecting CoAP terminated at the proxy. One approach for protecting CoAP
communication end-to-end through proxies, and also to support communication end-to-end through proxies, and also to support
security for CoAP over a different transport in a uniform way, is to security for CoAP over a different transport in a uniform way, is to
provide security at the application layer using an object-based provide security at the application layer using an object-based
security mechanism such as COSE [RFC8152]. security mechanism such as COSE [RFC8152].
One application of COSE is OSCORE [I-D.ietf-core-object-security], One application of COSE is OSCORE [RFC8613], which provides end-to-
which provides end-to-end confidentiality, integrity and replay end confidentiality, integrity and replay protection, and a secure
protection, and a secure binding between CoAP request and response binding between CoAP request and response messages. In OSCORE, the
messages. In OSCORE, the CoAP messages are wrapped in COSE objects CoAP messages are wrapped in COSE objects and sent using CoAP.
and sent using CoAP.
This framework RECOMMENDS the use of CoAP as replacement for HTTP for This framework RECOMMENDS the use of CoAP as replacement for HTTP for
use in constrained environments. use in constrained environments.
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 endpoint and optionally the introspection endpoint. using the token endpoint and optionally the introspection endpoint.
A client obtains an access token, and optionally a refresh token, A client obtains an access token, and optionally a refresh token,
from an AS using the token endpoint and subsequently presents the from an AS using the token endpoint and subsequently presents the
access token to a RS to gain access to a protected resource. In most access token to a RS to gain access to a protected resource. In most
deployments the RS can process the access token locally, however in deployments the RS can process the access token locally, however in
some cases the RS may present it to the AS via the introspection some cases the RS may present it to the AS via the introspection
endpoint to get fresh information. These interactions are shown in endpoint to get fresh information. These interactions are shown in
Figure 1. An overview of various OAuth concepts is provided in Figure 1. An overview of various OAuth concepts is provided in
Section 3.1. Section 3.1.
The OAuth 2.0 framework defines a number of "protocol flows" via The OAuth 2.0 framework defines a number of "protocol flows" via
grant types, which have been extended further with extensions to grant types, which have been extended further with extensions to
OAuth 2.0 (such as [RFC7521] and [I-D.ietf-oauth-device-flow]). What OAuth 2.0 (such as [RFC7521] and [RFC8628]). What grant types works
grant types works best depends on the usage scenario and [RFC7744] best depends on the usage scenario and [RFC7744] describes many
describes many different IoT use cases but there are two preferred different IoT use cases but there are two preferred grant types,
grant types, namely the Authorization Code Grant (described in namely the Authorization Code Grant (described in Section 4.1 of
Section 4.1 of [RFC7521]) and the Client Credentials Grant (described [RFC7521]) and the Client Credentials Grant (described in Section 4.4
in Section 4.4 of [RFC7521]). The Authorization Code Grant is a good of [RFC7521]). The Authorization Code Grant is a good fit for use
fit for use with apps running on smart phones and tablets that with apps running on smart phones and tablets that request access to
request access to IoT devices, a common scenario in the smart home IoT devices, a common scenario in the smart home environment, where
environment, where users need to go through an authentication and users need to go through an authentication and authorization phase
authorization phase (at least during the initial setup phase). The (at least during the initial setup phase). The native apps
native apps guidelines described in [RFC8252] are applicable to this guidelines described in [RFC8252] are applicable to this use case.
use case. The Client Credential Grant is a good fit for use with IoT The Client Credential Grant is a good fit for use with IoT devices
devices where the OAuth client itself is constrained. In such a where the OAuth client itself is constrained. In such a case, the
case, the resource owner has pre-arranged access rights for the resource owner has pre-arranged access rights for the client with the
client with the authorization server, which is often accomplished authorization server, which is often accomplished using a
using a commissioning tool. 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 provided dynamically as in the traditional protected resource, can be provided dynamically as in the traditional
OAuth flows, or it could be pre-configured by the resource owner as OAuth flows, or it could be pre-configured by the resource owner as
authorization policies at the AS, which the AS evaluates when a token authorization policies at the AS, which the AS evaluates when a token
request arrives. The resource owner and the requesting party (i.e., request arrives. The resource owner and the requesting party (i.e.,
client owner) are not shown in Figure 1. 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. It mechanisms between the ACE entities, such as client, AS, and RS. It
skipping to change at page 12, line 34 skipping to change at page 12, line 35
content is confidentiality protected. content is confidentiality protected.
The keying material necessary for establishing communication security The keying material necessary for establishing communication security
between C and RS is dynamically established as part of the protocol between C and RS is dynamically established as part of the protocol
described in this document. described in this document.
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. A generic permissions are needed to access the protected resource. A generic
procedure is described in Section 5.1, profiles MAY define other procedure is described in Section 5.1; profiles MAY define other
procedures for discovery. procedures for discovery.
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 make a request to "/.well- In CoAP, as a second example, a client can make a request to "/.well-
known/core" to obtain information about available resources, which known/core" to obtain information about available resources, which
are returned in a standardized format as described in [RFC6690]. are returned in a standardized format as described in [RFC6690].
+--------+ +---------------+ +--------+ +---------------+
| |---(A)-- Token Request ------->| | | |---(A)-- Token Request ------->| |
skipping to change at page 13, line 42 skipping to change at page 13, line 42
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 and optionally a refresh token (note that returns an access token and optionally a refresh token (note that
only certain grant types support refresh tokens). It can also only certain grant types support refresh tokens). It can also
return additional parameters, referred to as "Access Information". return additional parameters, referred to as "Access Information".
In addition to the response parameters defined by OAuth 2.0 and In addition to the response parameters defined by OAuth 2.0 and
the PoP access token extension, this framework defines parameters the PoP access token extension, this framework defines parameters
that can be used to inform the client about capabilities of the that can be used to inform the client about capabilities of the
RS. More information about these parameters can be found in RS, e.g. the profiles the RS supports. More information about
Section 5.6.4. these parameters can be found in Section 5.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, Depending on the device limitations and the selected protocol,
skipping to change at page 14, line 22 skipping to change at page 14, line 22
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 Access Information communication security protocol and other Access 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 Access Information. The RS obtained in the access token or the Access Information. The RS
verifies that the token is integrity protected by the AS and verifies that the token is integrity protected and originated by
compares the claims contained in the access token with the the AS. It then compares the claims contained in the access token
resource request. If the RS is online, validation can be handed with the resource request. If the RS is online, validation can be
over to the AS using token introspection (see messages D and E) handed over to the AS using token introspection (see messages D
over HTTP or CoAP. and E) over HTTP or CoAP.
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 introspection endpoint at that by including it in a request to the introspection endpoint at that
AS. Token introspection over CoAP is defined in Section 5.7 and AS. Token introspection over CoAP is defined in Section 5.7 and
for HTTP in [RFC7662]. for 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
prepared to perform the token validation on its own. prepared to perform the token validation on its own.
skipping to change at page 15, line 6 skipping to change at page 15, line 6
The AS validates the token and returns the most recent parameters, The AS validates the token and returns the most recent parameters,
such as scope, audience, validity etc. associated with it back to such as scope, audience, validity etc. associated with it back to
the RS. The RS then uses the received parameters to process the the RS. The RS then uses the received parameters to process the
request to either accept or to deny it. request to either accept or to deny it.
Protected Resource (F): Protected Resource (F):
If the request from the client is authorized, the RS fulfills the If the request from the client is authorized, the RS fulfills the
request and returns a response with the appropriate response code. request and returns a response with the appropriate response code.
The RS uses the dynamically established keys to protect the The RS uses the dynamically established keys to protect the
response, according to used communication security protocol. response, according to the communication security protocol used.
5. Framework 5. Framework
The following sections detail the profiling and extensions of OAuth The following sections detail the profiling and extensions of OAuth
2.0 for constrained environments, which constitutes the ACE 2.0 for constrained environments, which constitutes the ACE
framework. framework.
Credential Provisioning Credential Provisioning
For IoT, it cannot be assumed that the client and RS are part of a For IoT, it cannot be assumed that the client and RS are part of a
common key infrastructure, so the AS provisions credentials or common key infrastructure, so the AS provisions credentials or
associated information to allow mutual authentication. These associated information to allow mutual authentication between
credentials need to be provided to the parties before or during client and RS. The resulting security association between client
the authentication protocol is executed, and may be re-used for and RS may then be re-used by binding these credentials to
subsequent token requests. additional access tokens.
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 token holder can prove being a access tokens, i.e., that the token holder can prove being a
holder of the key bound to the token. The binding is provided by holder of the key bound to the token. The binding is provided by
the "cnf" claim [I-D.ietf-ace-cwt-proof-of-possession] indicating the "cnf" claim [I-D.ietf-ace-cwt-proof-of-possession] indicating
what key is used for proof-of-possession. If a client needs to what key is used for proof-of-possession. If a client needs to
submit a new access token, e.g., to obtain additional access submit a new access token, e.g., to obtain additional access
rights, they can request that the AS binds this token to the same rights, they can request that the AS binds this token to the same
key as the previous one. key as the previous one.
ACE Profiles 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. In ACE framework the AS is expected to manage the profile. In ACE framework the AS is expected to manage the
matching of compatible profile choices between a client and an RS. matching of compatible profile choices between a client and an RS.
The AS informs the client of the selected profile using the The AS informs the client of the selected profile using the
"profile" parameter in the token response. "ace_profile" parameter in the 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; between client between AS and client when requesting an access token; between client
and RS when accessing a resource and between AS and RS if and RS when accessing a resource and between AS and RS if
introspection is used. In constrained settings TLS is not always introspection is used. In constrained settings TLS is not always
feasible, or desirable. Nevertheless it is REQUIRED that the data feasible, or desirable. Nevertheless it is REQUIRED that the
exchanged with the AS is encrypted, integrity protected and protected communications named above are encrypted, integrity protected and
against message replay. It is also REQUIRED that the AS and the protected against message replay. It is also REQUIRED that the
endpoint communicating with it (client or RS) perform mutual communicating endpoints perform mutual authentication. Furthermore
authentication. Furthermore it MUST be assured that responses are it MUST be assured that responses are bound to the requests in the
bound to the requests in the sense that the receiver of a response sense that the receiver of a response can be certain that the
can be certain that the response actually belongs to a certain response actually belongs to a certain request. Note that setting up
request. such a secure communication may require some unprotected messages to
be exchanged first (e.g. sending the token from the client to the
RS).
Profiles MUST specify a communication security protocol that provides Profiles MUST specify a communication security protocol that provides
the features required above. the features required above.
In OAuth 2.0 the communication with the Token and the Introspection In OAuth 2.0 the communication with the Token and the Introspection
endpoints 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. When profiles of this framework use CoAP instead, this parameters. When profiles of this framework use CoAP instead, it is
framework REQUIRES the use of the following alternative instead of REQUIRED to use of the following alternative instead of Uri-query
Uri-query parameters: The sender (client or RS) encodes the parameters: The sender (client or RS) encodes the parameters of its
parameters of its request as a CBOR map and submits that map as the request as a CBOR map and submits that map as the payload of the POST
payload of the POST request. Profiles that use CBOR encoding of request.
protocol message parameters MUST use the media format 'application/
ace+cbor', unless the protocol message is wrapped in another Content- Profiles that use CBOR encoding of protocol message parameters at the
Format (e.g. object security). If CoAP is used for communication, outermost encoding layer MUST use the media format 'application/
the Content-Format MUST be abbreviated with the ID: 19 (see ace+cbor'. If CoAP is used for communication, the Content-Format
Section 8.15). MUST be abbreviated with the ID: 19 (see Section 8.15).
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. If CoAP is used, this framework responses both to client and RS. If CoAP is used, it is REQUIRED to
REQUIRES the use of CBOR [RFC7049] instead of JSON. Depending on the use CBOR [RFC7049] instead of JSON. Depending on the profile, the
profile, the CBOR payload MAY be enclosed in a non-CBOR cryptographic CBOR payload MAY be enclosed in a non-CBOR cryptographic wrapper.
wrapper.
5.1. Discovering Authorization Servers 5.1. Discovering Authorization Servers
In order to determine the AS in charge of a resource hosted at the In order to determine the AS in charge of a resource hosted at the
RS, C MAY send an initial Unauthorized Resource Request message to RS, C MAY send an initial Unauthorized Resource Request message to
RS. RS then denies the request and sends the address of its AS back RS. RS then denies the request and sends the address of its AS back
to C. to C.
Instead of the initial Unauthorized Resource Request message, other Instead of the initial Unauthorized Resource Request message, other
discovery methods may be used, or the client may be pre-provisioned discovery methods may be used, or the client may be pre-provisioned
with the address of the AS. with an RS-to-AS mapping.
5.1.1. Unauthorized Resource Request Message 5.1.1. Unauthorized Resource Request Message
The optional Unauthorized Resource Request message is a request for a An Unauthorized Resource Request message is a request for any
resource hosted by RS for which no proper authorization is granted. resource hosted by RS for which the client does not have
RS MUST treat any request for a protected resource as Unauthorized authorization granted. RSes MUST treat any request for a protected
Resource Request message when any of the following holds: resource as an Unauthorized Resource Request message when any of the
following hold:
o The request has been received on an unprotected channel. o The request has been received on an unprotected channel.
o RS has no valid access token for the sender of the request o The RS has no valid access token for the sender of the request
regarding the requested action on that resource. regarding the requested action on that resource.
o RS has a valid access token for the sender of the request, but o The RS has a valid access token for the sender of the request, but
this does not allow the requested action on the requested that token does not authorize the requested action on the
resource. requested resource.
Note: These conditions ensure that RS can handle requests Note: These conditions ensure that the RS can handle requests
autonomously once access was granted and a secure channel has been autonomously once access was granted and a secure channel has been
established between C and RS. The authz-info endpoint MUST NOT be established between C and RS. The authz-info endpoint, as part of
protected as specified above, in order to allow clients to upload the process for authorizing to protected resources, is not itself a
access tokens to RS (cf. Section 5.8.1). protected resource and MUST NOT be protected as specified above (cf.
Section 5.8.1).
Unauthorized Resource Request messages MUST be denied with a client Unauthorized Resource Request messages MUST be denied with an
error response. In this response, the Resource Server SHOULD provide "unauthorized_client" error response. In this response, the Resource
proper AS Request Creation Hints to enable the Client to request an Server SHOULD provide proper AS Request Creation Hints to enable the
access token from RS's AS as described in Section 5.1.2. Client to request an access token from RS's AS as described in
Section 5.1.2.
The handling of all client requests (including unauthorized ones) by The handling of all client requests (including unauthorized ones) by
the RS is described in Section 5.8.2. the RS is described in Section 5.8.2.
5.1.2. AS Request Creation Hints 5.1.2. AS Request Creation Hints
The AS Request Creation Hints message is sent by RS as a response to The AS Request Creation Hints message is sent by an RS as a response
an Unauthorized Resource Request message (see Section 5.1.1) to help to an Unauthorized Resource Request message (see Section 5.1.1) to
the sender of the Unauthorized Resource Request message in acquiring help the sender of the Unauthorized Resource Request message acquire
a valid access token. The AS Request Creation Hints message is CBOR a valid access token. The AS Request Creation Hints message is a
map, with a MANDATORY element "AS" specifying an absolute URI (see CBOR map, with a MANDATORY element "AS" specifying an absolute URI
Section 4.3 of [RFC3986]) that identifies the AS in charge of RS. (see Section 4.3 of [RFC3986]) that identifies the appropriate AS for
the RS.
The message can also contain the following OPTIONAL parameters: The message can also contain the following OPTIONAL parameters:
o A "audience" element containing a suggested audience that the o A "audience" element containing a suggested audience that the
client should request towards the AS. client should request at the AS.
o A "kid" element containing the key identifier of a key used in an o A "kid" element containing the key identifier of a key used in an
existing security association between the client and the RS. The existing security association between the client and the RS. The
RS expects the client to request an access token bound to this RS expects the client to request an access token bound to this
key, in order to avoid having to re-establish the security key, in order to avoid having to re-establish the security
association. association.
o A "cnonce" element containing a client-nonce. See o A "cnonce" element containing a client-nonce. See
Section 5.1.2.1. Section 5.1.2.1.
skipping to change at page 19, line 19 skipping to change at page 19, line 22
6d706c652e636f6d2f746f6b656e # "coaps://as.example.com/token" 6d706c652e636f6d2f746f6b656e # "coaps://as.example.com/token"
05 # unsigned(5) (=audience) 05 # unsigned(5) (=audience)
76 # text(22) 76 # text(22)
636f6170733a2f2f72732e657861 636f6170733a2f2f72732e657861
6d706c652e636f6d # "coaps://rs.example.com" 6d706c652e636f6d # "coaps://rs.example.com"
09 # unsigned(9) (=scope) 09 # unsigned(9) (=scope)
66 # text(6) 66 # text(6)
7254656d7043 # "rTempC" 7254656d7043 # "rTempC"
18 27 # unsigned(39) (=cnonce) 18 27 # unsigned(39) (=cnonce)
45 # bytes(5) 45 # bytes(5)
e0a156bb3f # "\xE0\xA1V\xBB?" e0a156bb3f #
Figure 4: AS Request Creation Hints example encoded in CBOR Figure 4: AS Request Creation Hints example encoded in CBOR
5.1.2.1. The Client-Nonce Parameter 5.1.2.1. The Client-Nonce Parameter
If the RS does not synchronize its clock with the AS, it could be If the RS does not synchronize its clock with the AS, it could be
tricked into accepting old access tokens, that are either expired or tricked into accepting old access tokens, that are either expired or
have been compromised. In order to ensure some level of token have been compromised. In order to ensure some level of token
freshness in that case, the RS can use the "cnonce" (client-nonce) freshness in that case, the RS can use the "cnonce" (client-nonce)
parameter. The processing requirements for this parameter are as parameter. The processing requirements for this parameter are as
follows: follows:
o A RS sending a "cnonce" parameter in an an AS Request Creation o A RS sending a "cnonce" parameter in an an AS Request Creation
Hints message MUST store information to validate that a given Hints message MUST store information to validate that a given
cnonce is fresh. How this is implemented internally is out of cnonce is fresh. How this is implemented internally is out of
scope for this specification. Expiration of client-nonces should scope for this specification. Expiration of client-nonces should
be based roughly on the time it would take a client to obtain an be based roughly on the time it would take a client to obtain an
access token after receiving the AS Request Creation Hints access token after receiving the AS Request Creation Hints
message. message, with some allowance for unexpected delays.
o A client receiving a "cnonce" parameter in an AS Request Creation o A client receiving a "cnonce" parameter in an AS Request Creation
Hints message MUST include this in the parameters when requesting Hints message MUST include this in the parameters when requesting
an access token at the AS, using the "cnonce" parameter from an access token at the AS, using the "cnonce" parameter from
Section 5.6.4.4. Section 5.6.4.4.
o If an AS grants an access token request containing a "cnonce" o If an AS grants an access token request containing a "cnonce"
parameter, it MUST include this value in the access token, using parameter, it MUST include this value in the access token, using
the "cnonce" claim specified in Section 5.8. the "cnonce" claim specified in Section 5.8.
o A RS that is using the client-nonce mechanism and that receives an o A RS that is using the client-nonce mechanism and that receives an
access token MUST verify that this token contains a cnonce claim, access token MUST verify that this token contains a cnonce claim,
with a client-nonce value that is fresh according to the with a client-nonce value that is fresh according to the
information stored at the first step above. If the cnonce claim information stored at the first step above. If the cnonce claim
is not present or if the cnonce claim value is not fresh, it MUST is not present or if the cnonce claim value is not fresh, the RS
discard the access token. If this was an interaction with the MUST discard the access token. If this was an interaction with
authz-info endpoint the RS MUST also respond with an error message the authz-info endpoint the RS MUST also respond with an error
using a response code equivalent to the CoAP code 4.01 message using a response code equivalent to the CoAP code 4.01
(Unauthorized). (Unauthorized).
5.2. Authorization Grants 5.2. Authorization Grants
To request an access token, the client obtains authorization from the To request an access token, the client obtains authorization from the
resource owner or uses its client credentials as grant. The resource owner or uses its client credentials as a grant. The
authorization is expressed in the form of an authorization grant. authorization is expressed in the form of an authorization grant.
The OAuth framework [RFC6749] defines four grant types. The grant The OAuth framework [RFC6749] defines four grant types. The grant
types can be split up into two groups, those granted on behalf of the types can be split up into two groups, those granted on behalf of the
resource owner (password, authorization code, implicit) and those for resource owner (password, authorization code, implicit) and those for
the client (client credentials). Further grant types have been added the client (client credentials). Further grant types have been added
later, such as [RFC7521] defining an assertion-based authorization later, such as [RFC7521] defining an assertion-based authorization
grant. grant.
The grant type is selected depending on the use case. In cases where The grant type is selected depending on the use case. In cases where
the client acts on behalf of the resource owner, authorization code the client acts on behalf of the resource owner, the authorization
grant is recommended. If the client acts on behalf of the resource code grant is recommended. If the client acts on behalf of the
owner, but does not have any display or very limited interaction resource owner, but does not have any display or has very limited
possibilities it is recommended to use the device code grant defined interaction possibilities, it is recommended to use the device code
in [I-D.ietf-oauth-device-flow]. In cases where the client does not grant defined in [RFC8628]. In cases where the client acts
acts autonomously the client credentials grant is recommended. autonomously the client credentials grant is recommended.
For details on the different grant types, see section 1.3 of For details on the different grant types, see section 1.3 of
[RFC6749]. The OAuth 2.0 framework provides an extension mechanism [RFC6749]. The OAuth 2.0 framework provides an extension mechanism
for defining additional grant types so profiles of this framework MAY for defining additional grant types, so profiles of this framework
define additional grant types, if needed. MAY define additional grant types, if needed.
5.3. Client Credentials 5.3. Client Credentials
Authentication of the client is mandatory independent of the grant Authentication of the client is mandatory independent of the grant
type when requesting the access token from the token endpoint. In type when requesting an access token from the token endpoint. In the
the case of client credentials grant type, the authentication and case of the client credentials grant type, the authentication and
grant coincide. grant coincide.
Client registration and provisioning of client credentials to the Client registration and provisioning of client credentials to the
client is out of scope for this specification. client is out of scope for this specification.
The OAuth framework defines one client credential type in section The OAuth framework defines one client credential type in section
2.3.1 of [RFC6749]: client id and client secret. 2.3.1 of [RFC6749]: client id and client secret.
[I-D.erdtman-ace-rpcc] adds raw-public-key and pre-shared-key to the [I-D.erdtman-ace-rpcc] adds raw-public-key and pre-shared-key to the
client credentials types. Profiles of this framework MAY extend with client credentials types. Profiles of this framework MAY extend with
additional client credentials client certificates. an additional client credentials type using client certificates.
5.4. AS Authentication 5.4. AS Authentication
Client credential does not, by default, authenticate the AS that the The client credential grant does not, by default, authenticate the AS
client connects to. In classic OAuth, the AS is authenticated with a that the client connects to. In classic OAuth, the AS is
TLS server certificate. authenticated with a TLS server certificate.
Profiles of this framework MUST specify how clients authenticate the Profiles of this framework MUST specify how clients authenticate the
AS and how communication security is implemented, otherwise server AS and how communication security is implemented. By default, server
side TLS certificates, as defined by OAuth 2.0, are required. side TLS certificates, as defined by OAuth 2.0, are required.
5.5. The Authorization Endpoint 5.5. The Authorization Endpoint
The authorization endpoint is used to interact with the resource The OAuth 2.0 authorization endpoint is used to interact with the
owner and obtain an authorization grant in certain grant flows. The resource owner and obtain an authorization grant, in certain grant
primary use case for this framework is machine-to-machine flows. The primary use case for the ACE-OAuth framework is for
interactions, not involving the resource owner in the authorization machine-to-machine interactions that do not involve the resource
flow, therefore this endpoint is out of scope here. Future profiles owner in the authorization flow; therefore, this endpoint is out of
may define constrained adaptation mechanisms for this endpoint as scope here. Future profiles may define constrained adaptation
well. Non-constrained clients interacting with constrained resource mechanisms for this endpoint as well. Non-constrained clients
servers can use the specifications in section 3.1 of [RFC6749] and of interacting with constrained resource servers can use the
section 4.2 of [RFC6819]. specification in section 3.1 of [RFC6749] and the attack
countermeasures suggested in section 4.2 of [RFC6819].
5.6. The Token Endpoint 5.6. The Token Endpoint
In standard OAuth 2.0, the AS provides the token endpoint for In standard OAuth 2.0, the AS provides the token endpoint for
submitting access token requests. This framework extends the submitting access token requests. This framework extends the
functionality of the token endpoint, giving the AS the possibility to functionality of the token endpoint, giving the AS the possibility to
help the client and RS to establish shared keys or to exchange their help the client and RS to establish shared keys or to exchange their
public keys. Furthermore, this framework defines encodings using public keys. Furthermore, this framework defines encodings using
CBOR, as a substitute for JSON. CBOR, as a substitute for JSON.
skipping to change at page 21, line 48 skipping to change at page 22, line 4
the mapping between the fields described below, and these transports. the mapping between the fields described below, and these transports.
If HTTPS is used, JSON or CBOR payloads may be supported. If JSON If HTTPS is used, JSON or CBOR payloads may be supported. If JSON
payloads are used, the semantics of Section 4 of the OAuth 2.0 payloads are used, the semantics of Section 4 of the OAuth 2.0
specification MUST be followed (with additions as described below). specification MUST be followed (with additions as described below).
If CBOR payload is supported, the semantics described below MUST be If CBOR payload is supported, the semantics described below MUST be
followed. followed.
For the AS to be able to issue a token, the client MUST be For the AS to be able to issue a token, the client MUST be
authenticated and present a valid grant for the scopes requested. authenticated and present a valid grant for the scopes requested.
Profiles of this framework MUST specify how the AS authenticates the Profiles of this framework MUST specify how the AS authenticates the
client and how the communication between client and AS is protected. client and how the communication between client and AS is protected,
fulfilling the requirements specified in Section 5.
The default name of this endpoint in an url-path is '/token', however The default name of this endpoint in an url-path is '/token', however
implementations are not required to use this name and can define implementations are not required to use this name and can define
their own instead. their own instead.
The figures of this section use CBOR diagnostic notation without the The figures of this section use CBOR diagnostic notation without the
integer abbreviations for the parameters or their values for integer abbreviations for the parameters or their values for
illustrative purposes. Note that implementations MUST use the illustrative purposes. Note that implementations MUST use the
integer abbreviations and the binary CBOR encoding, if the CBOR integer abbreviations and the binary CBOR encoding, if the CBOR
encoding is used. encoding is used.
5.6.1. Client-to-AS Request 5.6.1. Client-to-AS Request
The client sends a POST request to the token endpoint at the AS. The The client sends a POST request to the token endpoint at the AS. The
profile MUST specify how the communication is protected. The content profile MUST specify how the communication is protected. The content
of the request consists of the parameters specified in the relevant of the request consists of the parameters specified in the relevant
subsection of section 4 of the OAuth 2.0 specification [RFC6749], subsection of section 4 of the OAuth 2.0 specification [RFC6749],
depending on the grant type with the following exceptions and depending on the grant type, with the following exceptions and
additions: additions:
o The parameter "grant_type" is OPTIONAL in the context of this o The parameter "grant_type" is OPTIONAL in the context of this
framework (as opposed to REQUIRED in RFC6749). If that parameter framework (as opposed to REQUIRED in RFC6749). If that parameter
is missing, the default value "client_credentials" is implied. is missing, the default value "client_credentials" is implied.
o The "audience" parameter from [I-D.ietf-oauth-token-exchange] is o The "audience" parameter from [I-D.ietf-oauth-token-exchange] is
OPTIONAL to request an access token bound to a specific audience. OPTIONAL to request an access token bound to a specific audience.
o The "cnonce" parameter defined in Section 5.6.4.4 is REQUIRED if o The "cnonce" parameter defined in Section 5.6.4.4 is REQUIRED if
the RS provided a client-nonce in the "AS Request Creation Hints" the RS provided a client-nonce in the "AS Request Creation Hints"
message Section 5.1.2 message Section 5.1.2
o The "scope" parameter MAY be encoded as a byte string instead of o The "scope" parameter MAY be encoded as a byte string instead of
the string encoding specified in section 3.3 of [RFC6749], in the string encoding specified in section 3.3 of [RFC6749], in
order allow compact encoding of complex scopes. order allow compact encoding of complex scopes. The syntax of
such a binary encoding is explicitly not specified here and left
to profiles or applications, specifically note that a binary
encoded scope does not necessarily use the space character '0x20'
to delimit scope-tokens.
o The client can send an empty (null value) "profile" parameter to o The client can send an empty (null value) "ace_profile" parameter
indicate that it wants the AS to include the "profile" parameter to indicate that it wants the AS to include the "ace_profile"
in the response. See Section 5.6.4.3. parameter in the response. See Section 5.6.4.3.
o A client MUST be able to use the parameters from o A client MUST be able to use the parameters from
[I-D.ietf-ace-oauth-params] in an access token request to the [I-D.ietf-ace-oauth-params] in an access token request to the
token endpoint and the AS MUST be able to process these additional token endpoint and the AS MUST be able to process these additional
parameters. parameters.
The default behavior, is that the AS generates a symmetric proof-of-
possession key for the client. In order to use an asymmetric key
pair or to re-use a key previously established with the RS, the
client is supposed to use the "req_cnf" parameter from
[I-D.ietf-ace-oauth-params].
If CBOR is used then these parameters MUST be encoded as a CBOR map. If CBOR is used then these parameters MUST be encoded as a CBOR map.
When HTTP is used as a transport then the client makes a request to When HTTP is used as a transport then the client makes a request to
the token endpoint by sending the parameters using the "application/ the token endpoint by sending the parameters using the "application/
x-www-form-urlencoded" format with a character encoding of UTF-8 in x-www-form-urlencoded" format with a character encoding of UTF-8 in
the HTTP request entity-body, as defined in section 3.2 of [RFC6749]. the HTTP request entity-body, as defined in section 3.2 of [RFC6749].
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.
skipping to change at page 23, line 23 skipping to change at page 23, line 41
Payload: Payload:
{ {
"client_id" : "myclient", "client_id" : "myclient",
"audience" : "tempSensor4711" "audience" : "tempSensor4711"
} }
Figure 5: Example request for an access token bound to a symmetric Figure 5: Example request for an access token bound to a symmetric
key. key.
Figure 6 shows a request for a token with an asymmetric proof-of- Figure 6 shows a request for a token with an asymmetric proof-of-
possession key. Note that in this example OSCORE possession key. Note that in this example OSCORE [RFC8613] is used
[I-D.ietf-core-object-security] is used to provide object-security, to provide object-security, therefore the Content-Format is
therefore the Content-Format is "application/oscore" wrapping the "application/oscore" wrapping the "application/ace+cbor" type
"application/ace+cbor" type content. Also note that in this example content. The OSCORE option has a decoded interpretation appended in
the audience is implicitly known by both client and AS. Furthermore parentheses for the reader's convenience. Also note that in this
note that this example uses the "req_cnf" parameter from example the audience is implicitly known by both client and AS.
Furthermore note that this example uses the "req_cnf" parameter from
[I-D.ietf-ace-oauth-params]. [I-D.ietf-ace-oauth-params].
Header: POST (Code=0.02) Header: POST (Code=0.02)
Uri-Host: "as.example.com" Uri-Host: "as.example.com"
Uri-Path: "token" Uri-Path: "token"
OSCORE: 0x19, 0x05, 0x05, 0x44, 0x61, 0x6c, 0x65, 0x6b OSCORE: 0x09, 0x05, 0x44, 0x6C
(h=0, k=1, n=001, partialIV= 0x05, kid=[0x44, 0x6C])
Content-Format: "application/oscore" Content-Format: "application/oscore"
Payload: Payload:
0x44025d1 ... (full payload omitted for brevity) ... 68b3825e 0x44025d1 ... (full payload omitted for brevity) ... 68b3825e
Decrypted payload: Decrypted payload:
{ {
"client_id" : "myclient", "client_id" : "myclient",
"req_cnf" : { "req_cnf" : {
"COSE_Key" : { "COSE_Key" : {
"kty" : "EC", "kty" : "EC",
skipping to change at page 24, line 30 skipping to change at page 24, line 31
"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 6: Example token request bound to an asymmetric key. Figure 6: Example token request bound to an asymmetric key.
Figure 7 shows a request for a token where a previously communicated Figure 7 shows a request for a token where a previously communicated
proof-of-possession key is only referenced. Note that the client proof-of-possession key is only referenced using the "req_cnf"
performs a password based authentication in this example by parameter from [I-D.ietf-ace-oauth-params].
submitting its client_secret (see Section 2.3.1 of [RFC6749]). Note
that this example uses the "req_cnf" parameter from
[I-D.ietf-ace-oauth-params].
Header: POST (Code=0.02) Header: POST (Code=0.02)
Uri-Host: "as.example.com" Uri-Host: "as.example.com"
Uri-Path: "token" Uri-Path: "token"
Content-Format: "application/ace+cbor" Content-Format: "application/ace+cbor"
Payload: Payload:
{ {
"client_id" : "myclient", "client_id" : "myclient",
"client_secret" : "mysecret234",
"audience" : "valve424", "audience" : "valve424",
"scope" : "read", "scope" : "read",
"req_cnf" : { "req_cnf" : {
"kid" : b64'6kg0dXJM13U' "kid" : b64'6kg0dXJM13U'
} }
} }W
Figure 7: Example request for an access token bound to a key Figure 7: Example request for an access token bound to a key
reference. reference.
Refresh tokens are typically not stored as securely as proof-of- Refresh tokens are typically not stored as securely as proof-of-
possession keys in requesting clients. Proof-of-possession based possession keys in requesting clients. Proof-of-possession based
refresh token requests MUST NOT request different proof-of-possession refresh token requests MUST NOT request different proof-of-possession
keys or different audiences in token requests. Refresh token keys or different audiences in token requests. Refresh token
requests can only use to request access tokens bound to the same requests can only use to request access tokens bound to the same
proof-of-possession key and the same audience as access tokens issued proof-of-possession key and the same audience as access tokens issued
skipping to change at page 25, line 26 skipping to change at page 25, line 23
and the client is authorized to obtain an access token corresponding and the client is authorized to obtain an access token corresponding
to its access token request, the AS sends a response with the to its access token request, the AS sends a response with the
response code equivalent to the CoAP response code 2.01 (Created). response code equivalent to the CoAP response code 2.01 (Created).
If client request was invalid, or not authorized, the AS returns an If client request was invalid, or not authorized, the AS returns an
error response as described in Section 5.6.3. error response as described in Section 5.6.3.
Note that the AS decides which token type and profile to use when Note that the AS decides which token type and profile to use when
issuing a successful response. It is assumed that the AS has prior issuing a successful response. It is assumed that the AS has prior
knowledge of the capabilities of the client and the RS (see knowledge of the capabilities of the client and the RS (see
Appendix D). This prior knowledge may, for example, be set by the Appendix D). This prior knowledge may, for example, be set by the
use of a dynamic client registration protocol exchange [RFC7591]. use of a dynamic client registration protocol exchange [RFC7591]. If
the client has requested a specific proof-of-possession key using the
"req_cnf" parameter from [I-D.ietf-ace-oauth-params], this may also
influence which profile the AS selects, as it needs to support the
use of the key type requested the client.
The content of the successful reply is the Access Information. When The content of the successful reply is the Access Information. When
using CBOR payloads, the content MUST be encoded as CBOR map, using CBOR payloads, the content MUST be encoded as a CBOR map,
containing parameters as specified in Section 5.1 of [RFC6749], with containing parameters as specified in Section 5.1 of [RFC6749], with
the following additions and changes: the following additions and changes:
profile: ace_profile:
OPTIONAL unless the request included an empty profile parameter in OPTIONAL unless the request included an empty ace_profile
which case it is MANDATORY. This indicates the profile that the parameter in which case it is MANDATORY. This indicates the
client MUST use towards the RS. See Section 5.6.4.3 for the profile that the client MUST use towards the RS. See
formatting of this parameter. If this parameter is absent, the AS Section 5.6.4.3 for the formatting of this parameter. If this
assumes that the client implicitly knows which profile to use parameter is absent, the AS assumes that the client implicitly
towards the RS. knows which profile to use towards the RS.
token_type: token_type:
This parameter is OPTIONAL, as opposed to 'required' in [RFC6749]. This parameter is OPTIONAL, as opposed to 'required' in [RFC6749].
By default implementations of this framework SHOULD assume that By default implementations of this framework SHOULD assume that
the token_type is "pop". If a specific use case requires another the token_type is "PoP". If a specific use case requires another
token_type (e.g., "Bearer") to be used then this parameter is token_type (e.g., "Bearer") to be used then this parameter is
REQUIRED. REQUIRED.
Furthermore [I-D.ietf-ace-oauth-params] defines additional parameters Furthermore [I-D.ietf-ace-oauth-params] defines additional parameters
that the AS MUST be able to use when responding to a request to the that the AS MUST be able to use when responding to a request to the
token endpoint. token endpoint.
Figure 8 summarizes the parameters that may be part of the Access Figure 8 summarizes the parameters that can currently be part of the
Information. This does not include the additional parameters Access Information. Future extensions may define additional
specified in [I-D.ietf-ace-oauth-params]. parameters.
/-------------------+-------------------------------\ /-------------------+-------------------------------\
| Parameter name | Specified in | | Parameter name | Specified in |
|-------------------+-------------------------------| |-------------------+-------------------------------|
| access_token | RFC 6749 | | access_token | RFC 6749 |
| token_type | RFC 6749 | | token_type | RFC 6749 |
| expires_in | RFC 6749 | | expires_in | RFC 6749 |
| refresh_token | RFC 6749 | | refresh_token | RFC 6749 |
| scope | RFC 6749 | | scope | RFC 6749 |
| state | RFC 6749 | | state | RFC 6749 |
| error | RFC 6749 | | error | RFC 6749 |
| error_description | RFC 6749 | | error_description | RFC 6749 |
| error_uri | RFC 6749 | | error_uri | RFC 6749 |
| profile | [this document] | | ace_profile | [this document] |
| cnf | [I-D.ietf-ace-oauth-params] |
| rs_cnf | [I-D.ietf-ace-oauth-params] |
\-------------------+-------------------------------/ \-------------------+-------------------------------/
Figure 8: Access Information parameters Figure 8: Access Information parameters
Figure 9 shows a response containing a token and a "cnf" parameter Figure 9 shows a response containing a token and a "cnf" parameter
with a symmetric proof-of-possession key, which is defined in with a symmetric proof-of-possession key, which is defined in
[I-D.ietf-ace-oauth-params]. [I-D.ietf-ace-oauth-params]. Note that the key identifier 'kid' is
only used to simplify indexing and retrieving the key, and no
assumptions should be made that it is unique in the domains of either
the client or the RS.
Header: Created (Code=2.01) Header: Created (Code=2.01)
Content-Format: "application/ace+cbor" Content-Format: "application/ace+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)',
"profile" : "coap_dtls", "ace_profile" : "coap_dtls",
"expires_in" : "3600", "expires_in" : "3600",
"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 9: Example AS response with an access token bound to a Figure 9: Example AS response with an access token bound to a
symmetric key. symmetric key.
5.6.3. Error Response 5.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 generally equivalent to the ones for HTTP-based interactions as
Section 5.2 of [RFC6749], with the following differences: defined in Section 5.2 of [RFC6749], with the following exceptions:
o When using CBOR the raw payload before being processed by the o When using CBOR the raw payload before being processed by the
communication security protocol MUST be encoded as a CBOR map. communication security protocol MUST be encoded as a CBOR map.
o A response code equivalent to the CoAP code 4.00 (Bad Request) o A response code equivalent to the CoAP code 4.00 (Bad Request)
MUST be used for all error responses, except for invalid_client MUST be used for all error responses, except for invalid_client
where a response code equivalent to the CoAP code 4.01 where a response code equivalent to the CoAP code 4.01
(Unauthorized) MAY be used under the same conditions as specified (Unauthorized) MAY be used under the same conditions as specified
in Section 5.2 of [RFC6749]. in Section 5.2 of [RFC6749].
o The content type (for CoAP-based interactions) or media type (for o The Content-Format (for CoAP-based interactions) or media type
HTTP-based interactions) "application/ace+cbor" MUST be used for (for HTTP-based interactions) "application/ace+cbor" MUST be used
the error response. for the error response.
o The parameters "error", "error_description" and "error_uri" MUST o The parameters "error", "error_description" and "error_uri" MUST
be abbreviated using the codes specified in Figure 12, when a CBOR be abbreviated using the codes specified in Figure 12, when a CBOR
encoding is used. encoding is used.
o The error code (i.e., value of the "error" parameter) MUST be o The error code (i.e., value of the "error" parameter) MUST be
abbreviated as specified in Figure 10, when a CBOR encoding is abbreviated as specified in Figure 10, when a CBOR encoding is
used. used.
/------------------------+-------------\ /------------------------+-------------\
skipping to change at page 28, line 22 skipping to change at page 28, line 44
5.6.4. Request and Response Parameters 5.6.4. Request and Response Parameters
This section provides more detail about the new parameters that can This section provides more detail about the new parameters that can
be used in access token requests and responses, as well as be used in access token requests and responses, as well as
abbreviations for more compact encoding of existing parameters and abbreviations for more compact encoding of existing parameters and
common parameter values. common parameter values.
5.6.4.1. Grant Type 5.6.4.1. Grant Type
The abbreviations in Figure 11 MUST be used in CBOR encodings instead The abbreviations specified in the registry defined in Section 8.4
of the string values defined in [RFC6749], if CBOR payloads are used. MUST be used in CBOR encodings instead of the string values defined
in [RFC6749], if CBOR payloads are used.
/--------------------+------------+------------------------\ /--------------------+------------+------------------------\
| Name | CBOR Value | Original Specification | | Name | CBOR Value | Original Specification |
|--------------------+------------+------------------------| |--------------------+------------+------------------------|
| password | 0 | RFC6749 | | password | 0 | RFC6749 |
| authorization_code | 1 | RFC6749 | | authorization_code | 1 | RFC6749 |
| client_credentials | 2 | RFC6749 | | client_credentials | 2 | RFC6749 |
| refresh_token | 3 | RFC6749 | | refresh_token | 3 | RFC6749 |
\--------------------+------------+------------------------/ \--------------------+------------+------------------------/
Figure 11: CBOR abbreviations for common grant types Figure 11: CBOR abbreviations for common grant types
5.6.4.2. Token Type 5.6.4.2. Token Type
The "token_type" parameter, defined in section 5.1 of [RFC6749], The "token_type" parameter, defined in section 5.1 of [RFC6749],
allows the AS to indicate to the client which type of access token it allows the AS to indicate to the client which type of access token it
is receiving (e.g., a bearer token). is receiving (e.g., a bearer token).
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 by the client to the RS is performed MUST be the proof-of-possession by the client to the RS is performed MUST be
specified by the profiles. specified by the profiles.
The values in the "token_type" parameter MUST be CBOR text strings, The values in the "token_type" parameter MUST use the CBOR
if a CBOR encoding is used. abbreviations defined in the registry specified by Section 8.6, if a
CBOR encoding is used.
In this framework the "pop" value for the "token_type" parameter is In this framework the "pop" value for the "token_type" parameter is
the default. The AS may, however, provide a different value. the default. The AS may, however, provide a different value.
5.6.4.3. Profile 5.6.4.3. Profile
Profiles of this framework MUST define the communication protocol and Profiles of this framework MUST define the communication protocol and
the communication security protocol between the client and the RS. the communication security protocol between the client and the RS.
The security protocol MUST provide encryption, integrity and replay The security protocol MUST provide encryption, integrity and replay
protection. It MUST also provide a binding between requests and protection. It MUST also provide a binding between requests and
responses. Furthermore profiles MUST define proof-of-possession responses. Furthermore profiles MUST define a list of allowed proof-
methods, if they support proof-of-possession tokens. of-possession methods, if they support proof-of-possession tokens.
A profile MUST specify an identifier that MUST be used to uniquely A profile MUST specify an identifier that MUST be used to uniquely
identify itself in the "profile" parameter. The textual identify itself in the "ace_profile" parameter. The textual
representation of the profile identifier is just intended for human representation of the profile identifier is just intended for human
readability and MUST NOT be used in parameters and claims. readability and MUST NOT be used in parameters and claims. Profiles
MUST register their identifier in the registry defined in
Section 8.7.
Profiles MAY define additional parameters for both the token request Profiles MAY define additional parameters for both the token request
and the Access Information in the access token response in order to and the Access Information in the access token response in order to
support negotiation or signaling of profile specific parameters. support negotiation or signaling of profile specific parameters.
Clients that want the AS to provide them with the "profile" parameter Clients that want the AS to provide them with the "ace_profile"
in the access token response can indicate that by sending a profile parameter in the access token response can indicate that by sending a
parameter with a null value in the access token request. ace_profile parameter with a null value in the access token request.
5.6.4.4. Client-Nonce 5.6.4.4. Client-Nonce
This parameter MUST be sent from the client to the AS, if it This parameter MUST be sent from the client to the AS, if it
previously received a "cnonce" parameter in the AS Request Creation previously received a "cnonce" parameter in the AS Request Creation
Hints Section 5.1.2. The parameter is encoded as a byte string and Hints Section 5.1.2. The parameter is encoded as a byte string and
copies the value from the cnonce parameter in the AS Request Creation copies the value from the cnonce parameter in the AS Request Creation
Hints. Hints.
5.6.5. Mapping Parameters to CBOR 5.6.5. Mapping Parameters to CBOR
If CBOR encoding is used, all OAuth parameters in access token If CBOR encoding is used, all OAuth parameters in access token
requests and responses MUST be mapped to CBOR types as specified in requests and responses MUST be mapped to CBOR types as specified in
Figure 12, using the given integer abbreviation for the map keys. the registry defined by Section 8.9, using the given integer
abbreviation for the map keys.
Note that we have aligned the abbreviations corresponding to claims Note that we have aligned the abbreviations corresponding to claims
with the abbreviations defined in [RFC8392]. with the abbreviations defined in [RFC8392].
Note also that abbreviations from -24 to 23 have a 1 byte encoding Note also that abbreviations from -24 to 23 have a 1 byte encoding
size in CBOR. We have thus chosen to assign abbreviations in that size in CBOR. We have thus chosen to assign abbreviations in that
range to parameters we expect to be used most frequently in range to parameters we expect to be used most frequently in
constrained scenarios. constrained scenarios.
/-------------------+----------+---------------------\ /-------------------+----------+---------------------\
skipping to change at page 30, line 26 skipping to change at page 31, line 26
| state | 28 | text string | | state | 28 | text string |
| code | 29 | byte string | | code | 29 | byte string |
| error | 30 | unsigned integer | | error | 30 | unsigned integer |
| error_description | 31 | text string | | error_description | 31 | text string |
| error_uri | 32 | text string | | error_uri | 32 | text string |
| grant_type | 33 | unsigned integer | | grant_type | 33 | unsigned integer |
| token_type | 34 | unsigned integer | | token_type | 34 | unsigned integer |
| username | 35 | text string | | username | 35 | text string |
| password | 36 | text string | | password | 36 | text string |
| refresh_token | 37 | byte string | | refresh_token | 37 | byte string |
| profile | 38 | unsigned integer | | ace_profile | 38 | unsigned integer |
| cnonce | 39 | byte string | | cnonce | 39 | byte string |
\-------------------+----------+---------------------/ \-------------------+----------+---------------------/
Figure 12: CBOR mappings used in token requests Figure 12: CBOR mappings used in token requests and responses
5.7. The Introspection Endpoint 5.7. The Introspection Endpoint
Token introspection [RFC7662] can be OPTIONALLY provided by the AS, Token introspection [RFC7662] can be OPTIONALLY provided by the AS,
and is then used by the RS and potentially the client to query the AS and is then used by the RS and potentially the client to query the AS
for metadata about a given token, e.g., validity or scope. Analogous for metadata about a given token, e.g., validity or scope. Analogous
to the protocol defined in [RFC7662] for HTTP and JSON, this section to the protocol defined in [RFC7662] for HTTP and JSON, this section
defines adaptations to more constrained environments using CBOR and defines adaptations to more constrained environments using CBOR and
leaving the choice of the application protocol to the profile. leaving the choice of the application protocol to the profile.
skipping to change at page 31, line 19 skipping to change at page 32, line 19
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.
Note that supporting introspection is OPTIONAL for implementations of Note that supporting introspection is OPTIONAL for implementations of
this framework. this framework.
5.7.1. Introspection Request 5.7.1. Introspection Request
The requesting entity sends a POST request to the introspection The requesting entity sends a POST request to the introspection
endpoint at the AS, the profile MUST specify how the communication is endpoint at the AS. The profile MUST specify how the communication
protected. If CBOR is used, the payload MUST be encoded as a CBOR is protected. If CBOR is used, the payload MUST be encoded as a CBOR
map with a "token" entry containing either the access token or a map with a "token" entry containing the access token. Further
reference to the token (e.g., the cti). Further optional parameters optional parameters representing additional context that is known by
representing additional context that is known by the requesting the requesting entity to aid the AS in its response MAY be included.
entity to aid the AS in its response MAY be included.
For CoAP-based interaction, all messages MUST use the content type For CoAP-based interaction, all messages MUST use the content type
"application/ace+cbor", while for HTTP-based interactions the "application/ace+cbor", while for HTTP-based interactions the
equivalent media type "application/ace+cbor" MUST be used. equivalent media type "application/ace+cbor" MUST be used.
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
[RFC7662]. [RFC7662].
For example, Figure 13 shows a RS calling the token introspection For example, Figure 13 shows a RS calling the token introspection
endpoint 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. Note that object security based on OSCORE token. Note that object security based on OSCORE [RFC8613] is
[I-D.ietf-core-object-security] is assumed in this example, therefore assumed in this example, therefore the Content-Format is
the Content-Format is "application/oscore". Figure 14 shows the "application/oscore". Figure 14 shows the decoded payload.
decoded payload.
Header: POST (Code=0.02) Header: POST (Code=0.02)
Uri-Host: "as.example.com" Uri-Host: "as.example.com"
Uri-Path: "introspect" Uri-Path: "introspect"
OSCORE: 0x09, 0x05, 0x25 OSCORE: 0x09, 0x05, 0x25
Content-Format: "application/oscore" Content-Format: "application/oscore"
Payload: Payload:
... COSE content ... ... COSE content ...
Figure 13: Example introspection request. Figure 13: Example introspection request.
{ {
"token" : b64'7gj0dXJQ43U', "token" : b64'7gj0dXJQ43U',
"token_type_hint" : "pop" "token_type_hint" : "PoP"
} }
Figure 14: Decoded token. Figure 14: Decoded payload.
5.7.2. Introspection Response 5.7.2. Introspection Response
If the introspection request is authorized and successfully If the introspection request is authorized and successfully
processed, the AS sends a response with the response code equivalent processed, the AS sends a response with the response code equivalent
to the CoAP code 2.01 (Created). If the introspection request was to the CoAP code 2.01 (Created). If the introspection request was
invalid, not authorized or couldn't be processed the AS returns an invalid, not authorized or couldn't be processed the AS returns an
error response as described in Section 5.7.3. error response as described in Section 5.7.3.
In a successful response, the AS encodes the response parameters in a In a successful response, the AS encodes the response parameters in a
map including with the same required and optional parameters as in map including with the same required and optional parameters as in
Section 2.2 of [RFC7662] with the following addition: Section 2.2 of [RFC7662] with the following addition:
profile OPTIONAL. This indicates the profile that the RS MUST use ace_profile OPTIONAL. This indicates the profile that the RS MUST
with the client. See Section 5.6.4.3 for more details on the use with the client. See Section 5.6.4.3 for more details on the
formatting of this parameter. formatting of this parameter.
cnonce OPTIONAL. A client-nonce previously provided to the AS by cnonce OPTIONAL. A client-nonce provided to the AS by the client.
the RS via the client. See Section 5.6.4.4. The RS MUST verify that this corresponds to the client-nonce
previously provided to the client in the AS Request Creation
Hints. See Section 5.1.2 and Section 5.6.4.4.
exi OPTIONAL. The "expires-in" claim associated to this access exi OPTIONAL. The "expires-in" claim associated to this access
token. See Section 5.8.3. token. See Section 5.8.3.
Furthermore [I-D.ietf-ace-oauth-params] defines more parameters that Furthermore [I-D.ietf-ace-oauth-params] defines more parameters that
the AS MUST be able to use when responding to a request to the the AS MUST be able to use when responding to a request to the
introspection endpoint. introspection endpoint.
For example, Figure 15 shows an AS response to the introspection For example, Figure 15 shows an AS response to the introspection
request in Figure 13. Note that this example contains the "cnf" request in Figure 13. Note that this example contains the "cnf"
parameter defined in [I-D.ietf-ace-oauth-params]. parameter defined in [I-D.ietf-ace-oauth-params].
Header: Created (Code=2.01) Header: Created (Code=2.01)
Content-Format: "application/ace+cbor" Content-Format: "application/ace+cbor"
Payload: Payload:
{ {
"active" : true, "active" : true,
"scope" : "read", "scope" : "read",
"profile" : "coap_dtls", "ace_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 15: Example introspection response. Figure 15: Example introspection response.
skipping to change at page 33, line 47 skipping to change at page 34, line 47
o If the requesting entity does not have the right to perform this o If the requesting entity does not have the right to perform this
introspection request, the AS MUST respond with a response code introspection request, the AS MUST respond with a response code
equivalent to the CoAP code 4.03 (Forbidden). In this case no equivalent to the CoAP code 4.03 (Forbidden). In this case no
payload is returned. payload is returned.
o The parameters "error", "error_description" and "error_uri" MUST o The parameters "error", "error_description" and "error_uri" MUST
be abbreviated using the codes specified in Figure 12. be abbreviated using the codes specified in Figure 12.
o The error codes MUST be abbreviated using the codes specified in o The error codes MUST be abbreviated using the codes specified in
Figure 10. the registry defined by Section 8.3.
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".
5.7.4. Mapping Introspection parameters to CBOR 5.7.4. Mapping Introspection parameters to CBOR
If CBOR is used, the introspection request and response parameters If CBOR is used, the introspection request and response parameters
MUST be mapped to CBOR types as specified in Figure 16, using the MUST be mapped to CBOR types as specified in the registry defined by
given integer abbreviation for the map key. Section 8.11, using the given integer abbreviation for the map key.
Note that we have aligned abbreviations that correspond to a claim Note that we have aligned abbreviations that correspond to a claim
with the abbreviations defined in [RFC8392] and the abbreviations of with the abbreviations defined in [RFC8392] and the abbreviations of
parameters with the same name from Section 5.6.5. parameters with the same name from Section 5.6.5.
/-------------------+----------+-------------------------\ /-------------------+----------+-------------------------\
| Parameter name | CBOR Key | Value Type | | Parameter name | CBOR Key | Value Type |
|-------------------+----------+-------------------------| |-------------------+----------+-------------------------|
| iss | 1 | text string | | iss | 1 | text string |
| sub | 2 | text string | | sub | 2 | text string |
skipping to change at page 34, line 40 skipping to change at page 35, line 40
| scope | 9 | text or byte string | | scope | 9 | text or byte string |
| active | 10 | True or False | | active | 10 | True or False |
| token | 11 | byte string | | token | 11 | byte string |
| client_id | 24 | text string | | client_id | 24 | text string |
| error | 30 | unsigned integer | | error | 30 | unsigned integer |
| error_description | 31 | text string | | error_description | 31 | text string |
| error_uri | 32 | text string | | error_uri | 32 | text string |
| token_type_hint | 33 | text string | | token_type_hint | 33 | text string |
| token_type | 34 | text string | | token_type | 34 | text string |
| username | 35 | text string | | username | 35 | text string |
| profile | 38 | unsigned integer | | ace_profile | 38 | unsigned integer |
| cnonce | 39 | byte string | | cnonce | 39 | byte string |
| exi | 40 | unsigned integer | | exi | 40 | unsigned integer |
\-------------------+----------+-------------------------/ \-------------------+----------+-------------------------/
Figure 16: CBOR Mappings to Token Introspection Parameters. Figure 16: CBOR Mappings to Token Introspection Parameters.
5.8. The Access Token 5.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 [RFC8392]. specified in [RFC8392].
In order to facilitate offline processing of access tokens, this In order to facilitate offline processing of access tokens, this
document uses the "cnf" claim from document uses the "cnf" claim from
[I-D.ietf-ace-cwt-proof-of-possession] and specifies the "scope" [I-D.ietf-ace-cwt-proof-of-possession] and the "scope" claim from
claim for JWT- and CWT-encoded tokens. [I-D.ietf-oauth-token-exchange] for JWT- and CWT-encoded tokens. In
addition to string encoding specified for the "scope" claim, a binary
The "scope" claim explicitly encodes the scope of a given access encoding MAY be used. The syntax of such an encoding is explicitly
token. This claim follows the same encoding rules as defined in not specified here and left to profiles or applications, specifically
Section 3.3 of [RFC6749], but in addition implementers MAY use byte note that a binary encoded scope does not necessarily use the space
strings as scope values, to achieve compact encoding of large scope character '0x20' to delimit scope-tokens.
elements. The meaning of a specific scope value is application
specific and expected to be known to the RS running that application.
If the AS needs to convey a hint to the RS about which profile it If the AS needs to convey a hint to the RS about which profile it
should use to communicate with the client, the AS MAY include a should use to communicate with the client, the AS MAY include an
"profile" claim in the access token, with the same syntax and "ace_profile" claim in the access token, with the same syntax and
semantics as defined in Section 5.6.4.3. semantics as defined in Section 5.6.4.3.
If the client submitted a client-nonce parameter in the access token If the client submitted a client-nonce parameter in the access token
request Section 5.6.4.4, the AS MUST include the value of this request Section 5.6.4.4, the AS MUST include the value of this
parameter in the "cnonce" claim specified here. The "cnonce" claim parameter in the "cnonce" claim specified here. The "cnonce" claim
uses binary encoding. uses binary encoding.
5.8.1. The Authorization Information Endpoint 5.8.1. The Authorization Information Endpoint
The access token, containing authorization information and The access token, containing authorization information and
information about the key used by the client, needs to be transported information about the proof-of-possession method used by the client,
to the RS so that the RS can authenticate and authorize the client needs to be transported to the RS so that the RS can authenticate and
request. 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 a RESTful protocol such as CoAP. Profiles of this the RS using a RESTful protocol such as CoAP. Profiles of this
framework MAY define other methods for token transport. framework MAY define other methods for token transport.
The method consists of an authz-info endpoint, implemented by the RS. The method consists of an authz-info endpoint, implemented by the RS.
A client using this method MUST make a POST request to the authz-info A client using this method MUST make a POST request to the authz-info
endpoint at the RS with the access token in the payload. The RS endpoint at the RS with the access token in the payload. The RS
receiving the token MUST verify the validity of the token. If the receiving the token MUST verify the validity of the token. If the
token is valid, the RS MUST respond to the POST request with 2.01 token is valid, the RS MUST respond to the POST request with 2.01
(Created). Section Section 5.8.1.1 outlines how an RS MUST proceed (Created). Section Section 5.8.1.1 outlines how an RS MUST proceed
to verify the validity of an access token. to verify the validity of an access token.
The RS MUST be prepared to store at least one access token for future The RS MUST be prepared to store at least one access token for future
use. This is a difference to how access tokens are handled in OAuth use. This is a difference to how access tokens are handled in OAuth
2.0, where the access token is typically sent along with each 2.0, where the access token is typically sent along with each
request, and therefore not stored at the RS. request, and therefore not stored at the RS.
This specification RECOMMENDS that an RS stores only one token per This specification RECOMMENDS that an RS stores only one token per
proof-of-possession key, meaning that an additional token linked to proof-of-possession key, meaning that an additional token linked to
the same key will overwrite any existing token at the RS. the same key will overwrite any existing token at the RS. The reason
is that this greatly simplifies (constrained) implementations, with
respect to required storage and resolving a request to the applicable
token.
If the payload sent to the authz-info endpoint does not parse to a If the payload sent to the authz-info endpoint does not parse to a
token, the RS MUST respond with a response code equivalent to the token, the RS MUST respond with a response code equivalent to the
CoAP code 4.00 (Bad Request). CoAP code 4.00 (Bad Request).
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 request to the authz-info endpoint. responding to the POST request to the authz-info endpoint, e.g. if
the token is an opaque reference. Some transport protocols may
provide a way to indicate that the RS is busy and the client should
retry after an interval; this type of status update would be
appropriate while the RS is waiting for an introspection response.
Profiles MUST specify whether the authz-info endpoint is protected, Profiles MUST specify whether the authz-info endpoint is protected,
including whether error responses from this endpoint are protected. including whether error responses from this endpoint are protected.
Note that since the token contains information that allow the client Note that since the token contains information that allow the client
and the RS to establish a security context in the first place, mutual and the RS to establish a security context in the first place, mutual
authentication may not be possible at this point. authentication may not be possible at this point.
The default name of this endpoint in an url-path is '/authz-info', The default name of this endpoint in an url-path is '/authz-info',
however implementations are not required to use this name and can however implementations are not required to use this name and can
define their own instead. define their own instead.
A RS MAY use introspection on a token received through the authz-info
endpoint, e.g. if the token is an opaque reference. Some transport
protocols may provide a way to indicate that the RS is busy and the
client should retry after an interval; this type of status update
would be appropriate while the RS is waiting for an introspection
response.
5.8.1.1. Verifying an Access Token 5.8.1.1. Verifying an Access Token
When an RS receives an access token, it MUST verify it before storing When an RS receives an access token, it MUST verify it before storing
it. The details of token verification depends on various aspects, it. The details of token verification depends on various aspects,
including the token encoding, the type of token, the security including the token encoding, the type of token, the security
protection applied to the token, and the claims. The token encoding protection applied to the token, and the claims. The token encoding
matters since the security wrapper differs between the token matters since the security wrapper differs between the token
encodings. For example, a CWT token uses COSE while a JWT token uses encodings. For example, a CWT token uses COSE while a JWT token uses
JOSE. The type of token also has an influence on the verification JOSE. The type of token also has an influence on the verification
procedure since tokens may be self-contained whereby token procedure since tokens may be self-contained whereby token
verification may happen locally at the RS while a token-by-reference verification may happen locally at the RS while a token-by-reference
requires further interaction with the authorization server, for requires further interaction with the authorization server, for
example using token introspection, to obtain the claims associated example using token introspection, to obtain the claims associated
with the token reference. Self-contained token MUST, at a minimum, with the token reference. Self-contained tokens MUST, at a minimum,
be integrity protected but they MAY also be encrypted. be integrity protected but they MAY also be encrypted.
For self-contained tokens the RS MUST process the security protection For self-contained tokens the RS MUST process the security protection
of the token first, as specified by the respective token format. For of the token first, as specified by the respective token format. For
CWT the description can be found in [RFC8392] and for JWT the CWT the description can be found in [RFC8392] and for JWT the
relevant specification is [RFC7519]. This MUST include a relevant specification is [RFC7519]. This MUST include a
verification that security protection (and thus the token) was verification that security protection (and thus the token) was
generated by an AS that has the right to issue access tokens for this generated by an AS that has the right to issue access tokens for this
RS. RS.
skipping to change at page 38, line 7 skipping to change at page 39, line 5
also respond with a response code equivalent to the CoAP code 4.03 also respond with a response code equivalent to the CoAP code 4.03
(Forbidden). (Forbidden).
scope The RS must recognize value of the scope claim. If that is scope The RS must recognize value of the scope claim. If that is
not the case the RS MUST discard the token. If this was an not the case the RS MUST discard the token. If this was an
interaction with authz-info, the RS MUST also respond with a interaction with authz-info, the RS MUST also respond with a
response code equivalent to the CoAP code 4.00 (Bad Request). The response code equivalent to the CoAP code 4.00 (Bad Request). The
RS MAY provide additional information in the error response, to RS MAY provide additional information in the error response, to
clarify what went wrong. clarify what went wrong.
If the access token contains any other claims that the RS cannot Additional processing may be needed for other claims in a way
process the RS MUST discard the token. If this was an interaction specific to a profile or the underlying application.
with authz-info, the RS MUST also respond with a response code
equivalent to the CoAP code 4.00 (Bad Request). The RS MAY provide
additional detail in the error response to clarify which claim
couldn't be processed.
Note that the Subject (sub) claim cannot always be verified when the Note that the Subject (sub) claim cannot always be verified when the
token is submitted to the RS since the client may not have token is submitted to the RS since the client may not have
authenticated yet. Also note that a counter for the expires_in (exi) authenticated yet. Also note that a counter for the expires_in (exi)
claim MUST be initialized when the RS first verifies this token. claim MUST be initialized when the RS first verifies this token.
Also note that profiles of this framework may define access token Also note that profiles of this framework may define access token
transport mechanisms that do not allow for error responses. transport mechanisms that do not allow for error responses.
Therefore the error messages specified here only apply if the token Therefore the error messages specified here only apply if the token
was POSTed to the authz-info endpoint. was sent to the authz-info endpoint.
When sending error responses, the RS MAY use the error codes from When sending error responses, the RS MAY use the error codes from
Section 3.1 of [RFC6750], to provide additional details to the Section 3.1 of [RFC6750], to provide additional details to the
client. client.
5.8.1.2. Protecting the Authorization Information Endpoint 5.8.1.2. Protecting the Authorization Information Endpoint
As this framework can be used in RESTful environments, it is As this framework can be used in RESTful environments, it is
important to make sure that attackers cannot perform unauthorized important to make sure that attackers cannot perform unauthorized
requests on the auth-info endpoints, other than submitting access requests on the authz-info endpoints, other than submitting access
tokens. tokens.
Specifically it SHOULD NOT be possible to perform GET, DELETE or PUT Specifically it SHOULD NOT be possible to perform GET, DELETE or PUT
on the authz-info endpoint and on it's children (if any). on the authz-info endpoint and on it's children (if any).
The POST method SHOULD NOT be allowed on children of the authz-info The POST method SHOULD NOT be allowed on children of the authz-info
endpoint. endpoint.
The RS SHOULD implement rate limiting measures to mitigate attacks The RS SHOULD implement rate limiting measures to mitigate attacks
aiming to overload the processing capacity of the RS by repeatedly aiming to overload the processing capacity of the RS by repeatedly
skipping to change at page 39, line 8 skipping to change at page 39, line 50
5.8.2. Client Requests to the RS 5.8.2. Client Requests to the RS
Before sending a request to a RS, the client MUST verify that the Before sending a request to a RS, the client MUST verify that the
keys used to protect this communication are still valid. See keys used to protect this communication are still valid. See
Section 5.8.4 for details on how the client determines the validity Section 5.8.4 for details on how the client determines the validity
of the keys used. of the keys used.
If an RS receives a request from a client, and the target resource If an RS receives a request from a client, and the target resource
requires authorization, the RS MUST first verify that it has an requires authorization, the RS MUST first verify that it has an
access token that authorizes this request, and that the client has access token that authorizes this request, and that the client has
performed the proof-of-possession for that token. performed the proof-of-possession binding that token to the request.
The response code MUST be 4.01 (Unauthorized) in case the client has The response code MUST be 4.01 (Unauthorized) in case the client has
not performed the proof-of-possession, or if RS has no valid access not performed the proof-of-possession, or if RS has no valid access
token for the client. If RS has an access token for the client but token for the client. If RS has an access token for the client but
not for the resource that was requested, RS MUST reject the request the token does not authorize access for the resource that was
with a 4.03 (Forbidden). If RS has an access token for the client requested, RS MUST reject the request with a 4.03 (Forbidden). If RS
but it does not cover the action that was requested on the resource, has an access token for the client but it does not cover the action
RS MUST reject the request with a 4.05 (Method Not Allowed). that was requested on the resource, RS MUST reject the request with a
4.05 (Method Not Allowed).
Note: The use of the response codes 4.03 and 4.05 is intended to Note: The use of the response codes 4.03 and 4.05 is intended to
prevent infinite loops where a dumb Client optimistically tries to prevent infinite loops where a dumb Client optimistically tries to
access a requested resource with any access token received from AS. access a requested resource with any access token received from AS.
As malicious clients could pretend to be C to determine C's As malicious clients could pretend to be C to determine C's
privileges, these detailed response codes must be used only when a privileges, these detailed response codes must be used only when a
certain level of security is already available which can be achieved certain level of security is already available which can be achieved
only when the Client is authenticated. only when the Client is authenticated.
Note: The RS MAY use introspection for timely validation of an access Note: The RS MAY use introspection for timely validation of an access
skipping to change at page 40, line 5 skipping to change at page 40, line 50
"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's internal clock must reflect the current date and time, or at RS's internal clock must reflect the current date and time, or at
least be synchronized with the AS's clock. How this clock least be synchronized with the AS's clock. How this clock
synchronization would be performed is out of scope for this synchronization would be performed is out of scope for this
specification. specification.
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 5.7. This requires introspection request as specified in Section 5.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 RS to
RS). AS).
o In order to support token expiration for devices that have no o In order to support token expiration for devices that have no
reliable way of synchronizing their internal clocks, this reliable way of synchronizing their internal clocks, this
specification defines the following approach: The claim "exi" specification defines the following approach: The claim "exi"
("expires in") can be used, to provide the RS with the lifetime of ("expires in") can be used, to provide the RS with the lifetime of
the token in seconds from the time the RS first receives the the token in seconds from the time the RS first receives the
token. This approach is of course vulnerable to malicious clients token. This approach is of course vulnerable to malicious clients
holding back tokens they do not want to expire. Such an attack holding back tokens they do not want to expire. Such an attack
can only be prevented if the RS is able to communicate with the AS can only be prevented if the RS is able to communicate with the AS
in some regular intervals, so that the can AS provide the RS with in some regular intervals, so that the can AS provide the RS with
skipping to change at page 40, line 29 skipping to change at page 41, line 26
synchronize its internal clock. synchronize its internal clock.
If a token that authorizes a long running request such as a CoAP If a token that authorizes a long running request such as a CoAP
Observe [RFC7641] expires, the RS MUST send an error response with Observe [RFC7641] expires, the RS MUST send an error response with
the response code equivalent to the CoAP code 4.01 (Unauthorized) to the response code equivalent to the CoAP code 4.01 (Unauthorized) to
the client and then terminate processing the long running request. the client and then terminate processing the long running request.
5.8.4. Key Expiration 5.8.4. Key Expiration
The AS provides the client with key material that the RS uses. This The AS provides the client with key material that the RS uses. This
can either be a common symmetric pop-key, or an asymmetric key used can either be a common symmetric PoP-key, or an asymmetric key used
by the RS to authenticate towards the client. Since there is no by the RS to authenticate towards the client. Since there is no
metadata associated to those keys, the client has no way of knowing metadata associated to those keys, the client has no way of knowing
if these keys are still valid. This may lead to situations where the if these keys are still valid. This may lead to situations where the
client sends requests containing sensitive information to the RS client sends requests containing sensitive information to the RS
using a key that is expired and possibly in the hands of an attacker, using a key that is expired and possibly in the hands of an attacker,
or accepts responses from the RS that are not properly protected and or accepts responses from the RS that are not properly protected and
could possibly have been forged by an attacker. could possibly have been forged by an attacker.
In order to prevent this, the client must assume that those keys are In order to prevent this, the client must assume that those keys are
only valid as long as the related access token is. Since the access only valid as long as the related access token is. Since the access
token is opaque to the client, one of the following methods MUST be token is opaque to the client, one of the following methods MUST be
used to inform the client about the validity of an access token: used to inform the client about the validity of an access token:
o The client knows a default validity period for all tokens it is o The client knows a default validity time for all tokens it is
using. This information could be provisioned to the client when using (i.e. how long a token is valid after being issued). This
it is registered at the AS, or published by the AS in a way that information could be provisioned to the client when it is
the client can query. registered at the AS, or published by the AS in a way that the
client can query.
o The AS informs the client about the token validity using the o The AS informs the client about the token validity using the
"expires_in" parameter in the Access Information. "expires_in" parameter in the Access Information.
o The client performs an introspection of the token. Although this o The client performs an introspection of the token. Although this
is not explicitly forbidden, how exactly a client does is not explicitly forbidden, how exactly a client does
introspection is not currently specified for OAuth. introspection is not currently specified for OAuth.
A client that is not able to obtain information about the expiration A client that is not able to obtain information about the expiration
of a token MUST NOT use this token. of a token MUST NOT use this token.
6. Security Considerations 6. Security Considerations
Security considerations applicable to authentication and Security considerations applicable to authentication and
authorization in RESTful environments provided in OAuth 2.0 [RFC6749] authorization in RESTful environments provided in OAuth 2.0 [RFC6749]
apply to this work. Furthermore [RFC6819] provides additional apply to this work. Furthermore [RFC6819] provides additional
security considerations for OAuth which apply to IoT deployments as security considerations for OAuth which apply to IoT deployments as
well. If the introspection endpoint is used, the security well. If the introspection endpoint is used, the security
considerations from [RFC7662] also apply. considerations from [RFC7662] also apply.
The following subsections address issues specific to this document
and it's use in constrained environments.
6.1. Protecting Tokens
A large range of threats can be mitigated by protecting the contents A large range of threats can be mitigated by protecting the contents
of the access token by using a digital signature or a keyed message of the access token by using a digital signature or a keyed message
digest (MAC) or an Authenticated Encryption with Associated Data digest (MAC) or an Authenticated Encryption with Associated Data
(AEAD) algorithm. Consequently, the token integrity protection MUST (AEAD) algorithm. Consequently, the token integrity protection MUST
be applied to prevent the token from being modified, particularly be applied to prevent the token from being modified, particularly
since it contains a reference to the symmetric key or the asymmetric since it contains a reference to the symmetric key or the asymmetric
key. If the access token contains the symmetric key, this symmetric key used for proof-of-possession. If the access token contains the
key MUST be encrypted by the authorization server so that only the symmetric key, this symmetric key MUST be encrypted by the
resource server can decrypt it. Note that using an AEAD algorithm is authorization server so that only the resource server can decrypt it.
preferable over using a MAC unless the message needs to be publicly Note that using an AEAD algorithm is preferable over using a MAC
readable. unless the token needs to be publicly readable.
If the token is intended for multiple recipients (i.e. an audience If the token is intended for multiple recipients (i.e. an audience
that is a group), integrity protection of the token with a symmetric that is a group), integrity protection of the token with a symmetric
key is not sufficient, since any of the recipients could modify the key, shared between the AS and the recipients, is not sufficient,
token undetected by the other recipients. Therefore a token with a since any of the recipients could modify the token undetected by the
multi-recipient audience MUST be protected with an asymmetric other recipients. Therefore a token with a multi-recipient audience
signature. MUST be protected with an asymmetric signature.
It is important for the authorization server to include the identity It is important for the authorization server to include the identity
of the intended recipient (the audience), typically a single resource of the intended recipient (the audience), typically a single resource
server (or a list of resource servers), in the token. Using a single server (or a list of resource servers), in the token. Using a single
shared secret with multiple resource servers to simplify key shared secret as proof-of-possession key with multiple resource
management is NOT RECOMMENDED since the benefit from using the proof- servers is NOT RECOMMENDED since the benefit from using the proof-of-
of-possession concept is significantly reduced. possession concept is then significantly reduced.
If clients are capable of doing so, they should frequently request
fresh access tokens, as this allows the AS to keep the lifetime of
the tokens short. This allows the AS to use shorter proof-of-
possession 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, they
SHOULD scope these access tokens to a specific permission.
In certain situations it may be necessary to revoke an access token
that is still valid. Client-initiated revocation is specified in
[RFC7009] for OAuth 2.0. Other revocation mechanisms are currently
not specified, as the underlying assumption in OAuth is that access
tokens are issued with a relatively short lifetime. This may not
hold true for disconnected constrained devices, needing access tokens
with relatively long lifetimes, and would therefore necessitate
further standardization work that is out of scope for this document.
6.2. Communication Security
The authorization server MUST offer confidentiality protection for The authorization server MUST offer confidentiality protection for
any interactions with the client. This step is extremely important any interactions with the client. This step is extremely important
since the client may obtain the proof-of-possession key from the since the client may obtain the proof-of-possession key from the
authorization server for use with a specific access token. Not using authorization server for use with a specific access token. Not using
confidentiality protection exposes this secret (and the access token) confidentiality protection exposes this secret (and the access token)
to an eavesdropper thereby completely negating proof-of-possession to an eavesdropper thereby completely negating proof-of-possession
security. Profiles MUST specify how confidentiality protection is security. Profiles MUST specify how communication security according
provided, and additional protection can be applied by encrypting the to the requirements in Section 5 is provided.
token, for example encryption of CWTs is specified in Section 5.1 of
[RFC8392]. Additional protection for the access token can be applied by
encrypting it, for example encryption of CWTs is specified in
Section 5.1 of [RFC8392]. Such additional protection can be
necessary if the token is later transferred over an insecure
connection (e.g. when it is sent to the authz-info endpoint).
Developers MUST ensure that the ephemeral credentials (i.e., the Developers MUST ensure that the ephemeral credentials (i.e., the
private key or the session key) are not leaked to third parties. An private key or the session key) are not leaked to third parties. An
adversary in possession of the ephemeral credentials bound to the adversary in possession of the ephemeral credentials bound to the
access token will be able to impersonate the client. Be aware that access token will be able to impersonate the client. Be aware that
this is a real risk with many constrained environments, since this is a real risk with many constrained environments, since
adversaries can often easily get physical access to the devices. adversaries can often easily get physical access to the devices.
This risk can also be mitigated to some extent by making sure that This risk can also be mitigated to some extent by making sure that
keys are refreshed more frequently. keys are refreshed more frequently.
If clients are capable of doing so, they should frequently request 6.3. Long-Term Credentials
fresh access tokens, as this allows the AS to keep the lifetime of
the tokens short. This allows the AS to use shorter proof-of-
possession 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, they Both clients and RSs have long-term credentials that are used to
SHOULD scope these access tokens to a specific permission. secure communications, and authenticate to the AS. These credentials
need to be protected against unauthorized access. In constrained
devices, deployed in publicly accessible places, such protection can
be difficult to achieve without specialized hardware (e.g. secure key
storage memory).
6.1. Unprotected AS Request Creation Hints If credentials are lost or compromised, the operator of the affected
devices needs to have procedures to invalidate any access these
credentials give and to revoke tokens linked to such credentials.
The loss of a credential linked to a specific device MUST NOT lead to
a compromise of other credentials not linked to that device,
therefore sharing secret keys between more than two parties is NOT
RECOMMENDED.
Operators of clients or RS should have procedures in place to replace
credentials that are suspected to have been compromised or that have
been lost.
Operators also need to have procedures for decommissioning devices,
that include securely erasing credentials and other security critical
material in the devices being decommissioned.
6.4. Unprotected AS Request Creation Hints
Initially, no secure channel exists to protect the communication Initially, no secure channel exists to protect the communication
between C and RS. Thus, C cannot determine if the AS Request between C and RS. Thus, C cannot determine if the AS Request
Creation Hints contained in an unprotected response from RS to an Creation Hints contained in an unprotected response from RS to an
unauthorized request (see Section 5.1.2) are authentic. It is unauthorized request (see Section 5.1.2) are authentic. It is
therefore advisable to provide C with a (possibly hard-coded) list of therefore advisable to provide C with a (possibly hard-coded) list of
trustworthy authorization servers. AS Request Creation Hints trustworthy authorization servers. AS Request Creation Hints
referring to a URI not listed there would be ignored. referring to a URI not listed there would be ignored.
6.2. Minimal security requirements for communication A compromised RS may use the hints to trick a client into contacting
an AS that is not supposed to be in charge of that RS. Since this AS
must be in the hard-coded list of trusted AS no violation of
privileges and or exposure of redentials should happen. However a
compromised RS may use this to perform a denial of service against a
specific AS, by redirecting a large number of client requests to that
AS.
A compromised client can be made to contact any AS, including
compromised ones. This should not affect the RS, since it is
supposed to keep track of which AS are trusted and have corresponding
credentials to verify the source of access tokens it receives.
6.5. Minimal security requirements for communication
This section summarizes the minimal requirements for the This section summarizes the minimal requirements for the
communication security of the different protocol interactions. communication security of the different protocol interactions.
C-AS All communication between the client and the Authorization C-AS All communication between the client and the Authorization
Server MUST be encrypted, integrity and replay protected. Server MUST be encrypted, integrity and replay protected.
Furthermore responses from the AS to the client MUST be bound to Furthermore responses from the AS to the client MUST be bound to
the client's request to avoid attacks where the attacker swaps the the client's request to avoid attacks where the attacker swaps the
intended response for an older one valid for a previous request. intended response for an older one valid for a previous request.
This requires that the client and the Authorization Server have This requires that the client and the Authorization Server have
previously exchanged either a shared secret, or their public keys previously exchanged either a shared secret or their public keys
in order to negotiate a secure communication. Furthermore the in order to negotiate a secure communication. Furthermore the
client MUST be able to determine whether an AS has the authority client MUST be able to determine whether an AS has the authority
to issue access tokens for a certain RS. This can be done through to issue access tokens for a certain RS. This can for example be
pre-configured lists, or through an online lookup mechanism that done through pre-configured lists, or through an online lookup
in turn also must be secured. mechanism that in turn also must be secured.
RS-AS The communication between the Resource Server and the RS-AS The communication between the Resource Server and the
Authorization Server via the introspection endpoint MUST be Authorization Server via the introspection endpoint MUST be
encrypted, integrity and replay protected. Furthermore responses encrypted, integrity and replay protected. Furthermore responses
from the AS to the RS MUST be bound to the RS's request. This from the AS to the RS MUST be bound to the RS's request. This
requires that the client and the Authorization Server have requires that the RS and the Authorization Server have previously
previously exchanged either a shared secret, or their public keys exchanged either a shared secret, or their public keys in order to
in order to negotiate a secure communication. Furthermore the RS negotiate a secure communication. Furthermore the RS MUST be able
MUST be able to determine whether an AS has the authority to issue to determine whether an AS has the authority to issue access
access tokens itself. This is usually configured out of band, but tokens itself. This is usually configured out of band, but could
could also be performed through an online lookup mechanism also be performed through an online lookup mechanism provided that
provided that it is also secured in the same way. it is also secured in the same way.
C-RS The initial communication between the client and the Resource C-RS The initial communication between the client and the Resource
Server can not be secured in general, since the RS is not in Server can not be secured in general, since the RS is not in
possession of on access token for that client, which would carry possession of on access token for that client, which would carry
the necessary parameters. Certain security mechanisms (e.g. DTLS the necessary parameters. Certain security mechanisms (e.g. DTLS
with server-side authentication via a certificate or a raw public with server-side authentication via a certificate or a raw public
key) can be possible and are RECOMMEND if supported by both key) can be possible and are RECOMMEND if supported by both
parties. After the client has successfully transmitted the access parties. After the client has successfully transmitted the access
token to the RS, a secure communication protocol MUST be token to the RS, a secure communication protocol MUST be
established between client and RS for the actual resource request. established between client and RS for the actual resource request.
This protocol MUST provide encryption, integrity and replay This protocol MUST provide confidentiality, integrity and replay
protection as well as a binding between requests and responses. protection as well as a binding between requests and responses.
This requires that the client learned either the RS's public key This requires that the client learned either the RS's public key
or received a symmetric proof-of-possession key bound to the or received a symmetric proof-of-possession key bound to the
access token from the AS. The RS must have learned either the access token from the AS. The RS must have learned either the
client's public key or a shared symmetric key from the claims in client's public key or a shared symmetric key from the claims in
the token or an introspection request. Since ACE does not provide the token or an introspection request. Since ACE does not provide
profile negotiation between C and RS, the client MUST have learned profile negotiation between C and RS, the client MUST have learned
what profile the RS supports (e.g. from the AS or pre-configured) what profile the RS supports (e.g. from the AS or pre-configured)
and initiate the communication accordingly. and initiate the communication accordingly.
6.3. Use of Nonces for Token Freshness 6.6. Token Freshness and Expiration
An RS that does not synchronize its clock with the AS may be tricked An RS that is offline faces the problem of clock drift. Since it
into accepting old access tokens that are no longer valid or have cannot synchronize its clock with the AS, it may be tricked into
been compromised. In order to prevent this, an RS may use the nonce- accepting old access tokens that are no longer valid or have been
based mechanism defined in Section 5.1.2 to ensure freshness of an compromised. In order to prevent this, an RS may use the nonce-based
Access Token subsequently presented to this RS. mechanism defined in Section 5.1.2 to ensure freshness of an Access
Token subsequently presented to this RS.
6.4. Combining profiles Another problem with clock drift is that evaluating the standard
token expiration claim "exp" can give unpredictable results.
The expiration mechanism implemented by the "exi" claim, based on the
first time the RS sees the token was defined to provide a more
predictable alternative. The "exi" approach has some drawbacks that
need to be considered: First a malicious client may hold back tokens
with the "exi" claim in order to prolong their lifespan, and second
if an RS loses state (e.g. due to an unscheduled reboot), it looses
the current values of counters tracking the "exi" claims of tokens it
is storing. The first drawback is inherent to the deployment
scenario and the "exi" solution. It can therefore not be mitigated
without requiring the the RS be online at times. The second drawback
can be mitigated by regularly storing the value of "exi" Counters to
persistent memory.
6.7. Combining profiles
There may be use cases were different profiles of this framework are There may be use cases were different profiles of this framework are
combined. For example, an MQTT-TLS profile is used between the combined. For example, an MQTT-TLS profile is used between the
client and the RS in combination with a CoAP-DTLS profile for client and the RS in combination with a CoAP-DTLS profile for
interactions between the client and the AS. Ideally, profiles should interactions between the client and the AS. The security of a
be designed in a way that the security of system should not depend on profile MUST NOT depend on the assumption that the profile is used
the specific security mechanisms used in individual protocol for all the different types of interactions in this framework.
interactions.
6.5. Unprotected Information 6.8. Unprotected Information
Communication with the authz-info endpoint, as well as the various Communication with the authz-info endpoint, as well as the various
error responses defined in this framework all potentially include error responses defined in this framework, all potentially include
sending information over an unprotected channel. These messages may sending information over an unprotected channel. These messages may
leak information to an adversary. For example errors responses for leak information to an adversary. For example error responses for
requests to the Authorization Information endpoint can reveal requests to the Authorization Information endpoint can reveal
information about an otherwise opaque access token to an adversary information about an otherwise opaque access token to an adversary
who has intercepted this token. who has intercepted this token.
As far as error messages are concerned, this framework is written As far as error messages are concerned, this framework is written
under the assumption that, in general, the benefits of detailed error under the assumption that, in general, the benefits of detailed error
messages outweigh the risk due to information leakage. For messages outweigh the risk due to information leakage. For
particular use cases, where this assessment does not apply, detailed particular use cases, where this assessment does not apply, detailed
error messages can be replaced by more generic ones. error messages can be replaced by more generic ones.
In some scenarios it may be possible to protect the communication In some scenarios it may be possible to protect the communication
with the authz-info endpoint (e.g. through DTLS with only server-side with the authz-info endpoint (e.g. through DTLS with only server-side
authentication). In cases where this is not possible this framework authentication). In cases where this is not possible this framework
RECOMMENDS to use encrypted CWTs or opaque references and need to be RECOMMENDS to use encrypted CWTs or tokens that are opaque references
subjected to introspection by the RS. and need to be subjected to introspection by the RS.
If the initial unauthorized resource request message (see If the initial unauthorized resource request message (see
Section 5.1.1) is used, the client MUST make sure that it is not Section 5.1.1) is used, the client MUST make sure that it is not
sending sensitive content in this request. While GET and DELETE sending sensitive content in this request. While GET and DELETE
requests only reveal the target URI of the resource, while POST and requests only reveal the target URI of the resource, POST and PUT
PUT requests would reveal the whole payload of the intended requests would reveal the whole payload of the intended operation.
operation.
6.6. Identifying audiences 6.9. Identifying audiences
The audience claim as defined in [RFC7519] and the equivalent The audience claim as defined in [RFC7519] and the equivalent
"audience" parameter from [I-D.ietf-oauth-token-exchange] are "audience" parameter from [I-D.ietf-oauth-token-exchange] are
intentionally vague on how to match the audience value to a specific intentionally vague on how to match the audience value to a specific
RS. This is intended to allow application specific semantics to be RS. This is intended to allow application specific semantics to be
used. This section attempts to give some general guidance for the used. This section attempts to give some general guidance for the
use of audiences in constrained environments. use of audiences in constrained environments.
URLs are not a good way of identifying mobile devices that can switch URLs are not a good way of identifying mobile devices that can switch
networks and thus be associated with new URLs. If the audience networks and thus be associated with new URLs. If the audience
represents a single RS, and asymmetric keys are used, the RS can be represents a single RS, and asymmetric keys are used, the RS can be
uniquely identified by a hash of its public key. If this approach is uniquely identified by a hash of its public key. If this approach is
used this framework RECOMMENDS to apply the procedure from section 3 used this framework RECOMMENDS to apply the procedure from section 3
of [RFC6920]. of [RFC6920].
If the audience addresses a group of resource servers, the mapping of If the audience addresses a group of resource servers, the mapping of
group identifier to individual RS has to be provisioned to each RS group identifier to individual RS has to be provisioned to each RS
before the group-audience is usable. Managing dynamic groups could before the group-audience is usable. Managing dynamic groups could
be an issue, if the RS is not always reachable when the group be an issue, if any RS is not always reachable when the groups'
memberships change. Furthermore issuing access tokens bound to memberships change. Furthermore, issuing access tokens bound to
symmetric proof-of-possession keys that apply to a group-audience is symmetric proof-of-possession keys that apply to a group-audience is
problematic, as an RS that is in possession of the access token can problematic, as an RS that is in possession of the access token can
impersonate the client towards the other RSs that are part of the impersonate the client towards the other RSs that are part of the
group. It is therefore NOT RECOMMENDED to issue access tokens bound group. It is therefore NOT RECOMMENDED to issue access tokens bound
to a group audience and symmetric proof-of possession keys. to a group audience and symmetric proof-of possession keys.
Even the client must be able to determine the correct values to put Even the client must be able to determine the correct values to put
into the "audience" parameter, in order to obtain a token for the into the "audience" parameter, in order to obtain a token for the
intended RS. Errors in this process can lead to the client intended RS. Errors in this process can lead to the client
inadvertently communicating with the wrong RS. The correct values inadvertently obtaining a token for the wrong RS. The correct values
for "audience" can either be provisioned to the client as part of its for "audience" can either be provisioned to the client as part of its
configuration, or provided by the RS as part of the "AS Request configuration, or dynamically looked up by the client in some
Creation Hints" Section 5.1.2 or dynamically looked up by the client directory. In the latter case the integrity and correctness of the
in some directory. In the latter case the integrity and correctness directory data must be assured. Note that the "audience" hint
of the directory data must be assured. provided by the RS as part of the "AS Request Creation Hints"
Section 5.1.2 is not typically source authenticated and integrity
protected, and should therefore not be treated a trusted value.
6.7. Denial of service against or with Introspection 6.10. Denial of service against or with Introspection
The optional introspection mechanism provided by OAuth and supported The optional introspection mechanism provided by OAuth and supported
in the ACE framework allows for two types of attacks that need to be in the ACE framework allows for two types of attacks that need to be
considered by implementers. considered by implementers.
First an attacker could perform a denial of service attack against First, an attacker could perform a denial of service attack against
the introspection endpoint at the AS in order to prevent validation the introspection endpoint at the AS in order to prevent validation
of access tokens. To mitigate this attack, an RS that is configured of access tokens. To maintain the security of the system, an RS that
to use introspection MUST NOT allow access based on a token for which is configured to use introspection MUST NOT allow access based on a
it couldn't reach the introspection endpoint. token for which it couldn't reach the introspection endpoint.
Second an attacker could use the fact that an RS performs Second, an attacker could use the fact that an RS performs
introspection to perform a denial of service attack against that RS introspection to perform a denial of service attack against that RS
by repeatedly sending tokens to its authz-info endpoint that require by repeatedly sending tokens to its authz-info endpoint that require
an introspection call. RS can mitigate such attacks by implementing an introspection call. RS can mitigate such attacks by implementing
a rate limit on how many introspection requests they perform in a rate limits on how many introspection requests they perform in a
given time interval and rejecting incoming requests to authz-info for given time interval for a certain client IP address submitting tokens
a certain amount of time, when that rate limit has been reached. to /authz-info. When that limit has been reached, incoming requests
from that address are rejected for a certain amount of time. A
general rate limit on the introspection requests should also be
considered, to mitigate distributed attacks.
7. Privacy Considerations 7. Privacy Considerations
Implementers and users should be aware of the privacy implications of Implementers and users should be aware of the privacy implications of
the different possible deployments of this framework. the different possible deployments of this framework.
The AS is in a very central position and can potentially learn The AS is in a very central position and can potentially learn
sensitive information about the clients requesting access tokens. If sensitive information about the clients requesting access tokens. If
the client credentials grant is used, the AS can track what kind of the client credentials grant is used, the AS can track what kind of
access the client intends to perform. With other grants this can be access the client intends to perform. With other grants this can be
prevented by the Resource Owner. To do so, the resource owner needs prevented by the Resource Owner. To do so, the resource owner needs
to bind the grants it issues to anonymous, ephemeral credentials that to bind the grants it issues to anonymous, ephemeral credentials that
do not allow the AS to link different grants and thus different do not allow the AS to link different grants and thus different
access token requests by the same client. access token requests by the same client.
If access tokens are only integrity protected and not encrypted, they The claims contained in a token can reveal privacy sensitive
may reveal information to attackers listening on the wire, or able to information about the client and the RS to any party having access to
them (whether by processing the content of a self-contained token or
by introspection). The AS SHOULD be configured to minimize the
information about clients and RSs disclosed in the tokens it issues.
If tokens are only integrity protected and not encrypted, they may
reveal information to attackers listening on the wire, or able to
acquire the access tokens in some other way. In the case of CWTs the acquire the access tokens in some other way. In the case of CWTs the
token may, e.g., reveal the audience, the scope and the confirmation token may, e.g., reveal the audience, the scope and the confirmation
method used by the client. The latter may reveal the identity of the method used by the client. The latter may reveal the identity of the
device or application running the client. This may be linkable to device or application running the client. This may be linkable to
the identity of the person using the client (if there is a person and the identity of the person using the client (if there is a person and
not a machine-to-machine interaction). not a machine-to-machine interaction).
Clients using asymmetric keys for proof-of-possession should be aware Clients using asymmetric keys for proof-of-possession should be aware
of the consequences of using the same key pair for proof-of- of the consequences of using the same key pair for proof-of-
possession towards different RSs. A set of colluding RSs or an possession towards different RSs. A set of colluding RSs or an
attacker able to obtain the access tokens will be able to link the attacker able to obtain the access tokens will be able to link the
requests, or even to determine the client's identity. requests, or even to determine the client's identity.
An unprotected response to an unauthorized request (see An unprotected response to an unauthorized request (see
Section 5.1.2) may disclose information about RS and/or its existing Section 5.1.2) may disclose information about RS and/or its existing
relationship with C. It is advisable to include as little relationship with C. It is advisable to include as little
information as possible in an unencrypted response. Means of information as possible in an unencrypted response. If means of
encrypting communication between C and RS already exist, more encrypting communication between C and RS already exist, more
detailed information may be included with an error response to detailed information may be included with an error response to
provide C with sufficient information to react on that particular provide C with sufficient information to react on that particular
error. error.
8. IANA Considerations 8. IANA Considerations
This document creates several registries with a registration policy
of "Expert Review"; guidelines to the experts are given in
Section 8.16.
8.1. ACE Authorization Server Request Creation Hints 8.1. ACE Authorization Server Request Creation Hints
This specification establishes the IANA "ACE Authorization Server This specification establishes the IANA "ACE Authorization Server
Request Creation Hints" registry. The registry has been created to Request Creation Hints" registry. The registry has been created to
use the "Expert Review" registration procedure [RFC8126]. It should use the "Expert Review" registration procedure [RFC8126]. It should
be noted that, in addition to the expert review, some portions of the be noted that, in addition to the expert review, some portions of the
registry require a specification, potentially a Standards Track RFC, registry require a specification, potentially a Standards Track RFC,
be supplied as well. be supplied as well.
The columns of the registry are: The columns of the registry are:
skipping to change at page 47, line 21 skipping to change at page 50, line 11
from -256 to 255 are designated as Standards Action. Integer from -256 to 255 are designated as Standards Action. Integer
values from -65536 to -257 and from 256 to 65535 are designated as values from -65536 to -257 and from 256 to 65535 are designated as
Specification Required. Integer values greater than 65535 are Specification Required. Integer values greater than 65535 are
designated as Expert Review. Integer values less than -65536 are designated as Expert Review. Integer values less than -65536 are
marked as Private Use. marked as Private Use.
Value Type The CBOR data types allowable for the values of this Value Type The CBOR data types allowable for the values of this
parameter. parameter.
Reference This contains a pointer to the public specification of the Reference This contains a pointer to the public specification of the
grant type abbreviation, if one exists. request creation hint abbreviation, if one exists.
This registry will be initially populated by the values in Figure 2. This registry will be initially populated by the values in Figure 2.
The Reference column for all of these entries will be this document. The Reference column for all of these entries will be this document.
8.2. OAuth Extensions Error Registration 8.2. OAuth Extensions Error Registration
This specification registers the following error values in the OAuth This specification registers the following error values in the OAuth
Extensions Error registry defined in [RFC6749]. Extensions Error registry [IANA.OAuthExtensionsErrorRegistry].
o Error name: "unsupported_pop_key" o Error name: "unsupported_pop_key"
o Error usage location: token error response o Error usage location: token error response
o Related protocol extension: The ACE framework [this document] o Related protocol extension: The ACE framework [this document]
o Change Controller: IESG o Change Controller: IESG
o Specification document(s): Section 5.6.3 of [this document] o Specification document(s): Section 5.6.3 of [this document]
o Error name: "incompatible_profiles" o Error name: "incompatible_profiles"
o Error usage location: token error response o Error usage location: token error response
o Related protocol extension: The ACE framework [this document] o Related protocol extension: The ACE framework [this document]
skipping to change at page 48, line 11 skipping to change at page 50, line 48
designated for private use. designated for private use.
The columns of the registry are: The columns of the registry are:
Name The OAuth Error Code name, refers to the name in Section 5.2. Name The OAuth Error Code name, refers to the name in Section 5.2.
of [RFC6749], e.g., "invalid_request". of [RFC6749], e.g., "invalid_request".
CBOR Value CBOR abbreviation for this error code. Integer values CBOR Value CBOR abbreviation for this error code. Integer values
less than -65536 are marked as "Private Use", all other values use less than -65536 are marked as "Private Use", all other values use
the registration policy "Expert Review" [RFC8126]. the registration policy "Expert Review" [RFC8126].
Reference This contains a pointer to the public specification of the Reference This contains a pointer to the public specification of the
grant type abbreviation, if one exists. error code abbreviation, if one exists.
This registry will be initially populated by the values in Figure 10. This registry will be initially populated by the values in Figure 10.
The Reference column for all of these entries will be this document. The Reference column for all of these entries will be this document.
8.4. OAuth Grant Type CBOR Mappings 8.4. OAuth Grant Type CBOR Mappings
This specification establishes the IANA "OAuth Grant Type CBOR This specification establishes the IANA "OAuth Grant Type CBOR
Mappings" registry. The registry has been created to use the "Expert Mappings" registry. The registry has been created to use the "Expert
Review" registration procedure [RFC8126], except for the value range Review" registration procedure [RFC8126], except for the value range
designated for private use. designated for private use.
skipping to change at page 49, line 19 skipping to change at page 52, line 4
Review" registration procedure [RFC8126], except for the value range Review" registration procedure [RFC8126], except for the value range
designated for private use. designated for private use.
The columns of this registry are: The columns of this registry are:
Name The name of token type as registered in the OAuth Access Token Name The name of token type as registered in the OAuth Access Token
Types registry, e.g., "Bearer". Types registry, e.g., "Bearer".
CBOR Value CBOR abbreviation for this token type. Integer values CBOR Value CBOR abbreviation for this token type. Integer values
less than -65536 are marked as "Private Use", all other values use less than -65536 are marked as "Private Use", all other values use
the registration policy "Expert Review" [RFC8126]. the registration policy "Expert Review" [RFC8126].
Reference This contains a pointer to the public specification of the Reference This contains a pointer to the public specification of the
OAuth token type abbreviation, if one exists. OAuth token type abbreviation, if one exists.
Original Specification This contains a pointer to the public Original Specification This contains a pointer to the public
specification of the grant type, if one exists. specification of the OAuth token type, if one exists.
8.6.1. Initial Registry Contents 8.6.1. Initial Registry Contents
o Name: "Bearer" o Name: "Bearer"
o Value: 1 o Value: 1
o Reference: [this document] o Reference: [this document]
o Original Specification: [RFC6749] o Original Specification: [RFC6749]
o Name: "pop" o Name: "PoP"
o Value: 2 o Value: 2
o Reference: [this document] o Reference: [this document]
o Original Specification: [this document] o Original Specification: [this document]
8.7. ACE Profile Registry 8.7. ACE Profile Registry
This specification establishes the IANA "ACE Profile" registry. The This specification establishes the IANA "ACE Profile" registry. The
registry has been created to use the "Expert Review" registration registry has been created to use the "Expert Review" registration
procedure [RFC8126]. It should be noted that, in addition to the procedure [RFC8126]. It should be noted that, in addition to the
expert review, some portions of the registry require a specification, expert review, some portions of the registry require a specification,
skipping to change at page 50, line 19 skipping to change at page 53, line 10
profile abbreviation, if one exists. profile abbreviation, if one exists.
This registry will be initially empty and will be populated by the This registry will be initially empty and will be populated by the
registrations from the ACE framework profiles. registrations from the ACE framework profiles.
8.8. OAuth Parameter Registration 8.8. OAuth Parameter Registration
This specification registers the following parameter in the "OAuth This specification registers the following parameter in the "OAuth
Parameters" registry [IANA.OAuthParameters]: Parameters" registry [IANA.OAuthParameters]:
o Name: "profile" o Name: "ace_profile"
o Parameter Usage Location: token response o Parameter Usage Location: token response
o Change Controller: IESG o Change Controller: IESG
o Reference: Section 5.6.4.3 of [this document] o Reference: Section 5.6.4.3 of [this document]
8.9. OAuth Parameters CBOR Mappings Registry 8.9. OAuth Parameters CBOR Mappings Registry
This specification establishes the IANA "OAuth Parameters CBOR This specification establishes the IANA "OAuth Parameters CBOR
Mappings" registry. The registry has been created to use the "Expert Mappings" registry. The registry has been created to use the "Expert
Review" registration procedure [RFC8126], except for the value range Review" registration procedure [RFC8126], except for the value range
designated for private use. designated for private use.
skipping to change at page 50, line 41 skipping to change at page 53, line 32
The columns of this registry are: The columns of this registry are:
Name The OAuth Parameter name, refers to the name in the OAuth Name The OAuth Parameter name, refers to the name in the OAuth
parameter registry, e.g., "client_id". parameter registry, e.g., "client_id".
CBOR Key CBOR map key for this parameter. Integer values less than CBOR Key CBOR map key for this parameter. Integer values less than
-65536 are marked as "Private Use", all other values use the -65536 are marked as "Private Use", all other values use the
registration policy "Expert Review" [RFC8126]. registration policy "Expert Review" [RFC8126].
Value Type The allowable CBOR data types for values of this Value Type The allowable CBOR data types for values of this
parameter. parameter.
Reference This contains a pointer to the public specification of the Reference This contains a pointer to the public specification of the
parameter abbreviation, if one exists. OAuth parameter abbreviation, if one exists.
This registry will be initially populated by the values in Figure 12. This registry will be initially populated by the values in Figure 12.
The Reference column for all of these entries will be this document. The Reference column for all of these entries will be this document.
Note that the mappings of parameters corresponding to claim names
intentionally coincide with the CWT claim name mappings from
[RFC8392].
8.10. OAuth Introspection Response Parameter Registration 8.10. OAuth Introspection Response Parameter Registration
This specification registers the following parameter in the OAuth This specification registers the following parameter in the OAuth
Token Introspection Response registry Token Introspection Response registry
[IANA.TokenIntrospectionResponse]. [IANA.TokenIntrospectionResponse].
o Name: "profile" o Name: "ace_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 Reference: Section 5.7.2 of [this document] o Reference: Section 5.7.2 of [this document]
8.11. OAuth Token Introspection Response CBOR Mappings Registry 8.11. OAuth Token Introspection Response CBOR Mappings Registry
This specification establishes the IANA "OAuth Token Introspection This specification establishes the IANA "OAuth Token Introspection
Response CBOR Mappings" registry. The registry has been created to Response CBOR Mappings" registry. The registry has been created to
use the "Expert Review" registration procedure [RFC8126], except for use the "Expert Review" registration procedure [RFC8126], except for
skipping to change at page 51, line 34 skipping to change at page 54, line 22
The columns of this registry are: The columns of this registry are:
Name The OAuth Parameter name, refers to the name in the OAuth Name The OAuth Parameter name, refers to the name in the OAuth
parameter registry, e.g., "client_id". parameter registry, e.g., "client_id".
CBOR Key CBOR map key for this parameter. Integer values less than CBOR Key CBOR map key for this parameter. Integer values less than
-65536 are marked as "Private Use", all other values use the -65536 are marked as "Private Use", all other values use the
registration policy "Expert Review" [RFC8126]. registration policy "Expert Review" [RFC8126].
Value Type The allowable CBOR data types for values of this Value Type The allowable CBOR data types for values of this
parameter. parameter.
Reference This contains a pointer to the public specification of the Reference This contains a pointer to the public specification of the
grant type abbreviation, if one exists. introspection response parameter abbreviation, if one exists.
This registry will be initially populated by the values in Figure 16. This registry will be initially populated by the values in Figure 16.
The Reference column for all of these entries will be this document. The Reference column for all of these entries will be this document.
Note that the mappings of parameters corresponding to claim names Note that the mappings of parameters corresponding to claim names
intentionally coincide with the CWT claim name mappings from intentionally coincide with the CWT claim name mappings from
[RFC8392]. [RFC8392].
8.12. JSON Web Token Claims 8.12. JSON Web Token Claims
This specification registers the following new claims in the JSON Web This specification registers the following new claims in the JSON Web
Token (JWT) registry of JSON Web Token Claims Token (JWT) registry of JSON Web Token Claims
[IANA.JsonWebTokenClaims]: [IANA.JsonWebTokenClaims]:
o Claim Name: "scope" o Claim Name: "ace_profile"
o Claim Description: The scope of an access token as defined in
[RFC6749].
o Change Controller: IESG
o Reference: Section 5.8 of [this document]
o Claim Name: "profile"
o Claim Description: The profile a token is supposed to be used o Claim Description: The profile a token is supposed to be used
with. with.
o Change Controller: IESG o Change Controller: IESG
o Reference: Section 5.8 of [this document] o Reference: Section 5.8 of [this document]
o Claim Name: "exi" o Claim Name: "exi"
o Claim Description: "Expires in". Lifetime of the token in seconds o Claim Description: "Expires in". Lifetime of the token in seconds
from the time the RS first sees it. Used to implement a weaker from the time the RS first sees it. Used to implement a weaker
from of token expiration for devices that cannot synchronize their from of token expiration for devices that cannot synchronize their
internal clocks. internal clocks.
o Change Controller: IESG o Change Controller: IESG
o Reference: Section 5.8.3 of [this document] o Reference: Section 5.8.3 of [this document]
o Claim Name: "cnonce" o Claim Name: "cnonce"
o Claim Description: "client-nonce". A nonce previously provided to o Claim Description: "client-nonce". A nonce previously provided to
the AS by the RS via the client. Used verify token freshness when the AS by the RS via the client. Used to verify token freshness
the RS cannot synchronize its clock with the AS. when the RS cannot synchronize its clock with the AS.
o Change Controller: IESG o Change Controller: IESG
o Reference: Section 5.8 of [this document] o Reference: Section 5.8 of [this document]
8.13. CBOR Web Token Claims 8.13. CBOR Web Token Claims
This specification registers the following new claims in the "CBOR This specification registers the following new claims in the "CBOR
Web Token (CWT) Claims" registry [IANA.CborWebTokenClaims]. Web Token (CWT) Claims" registry [IANA.CborWebTokenClaims].
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 JWT Claim Name: scope o JWT Claim Name: scope
o Claim Key: TBD (suggested: 9) o Claim Key: TBD (suggested: 9)
o Claim Value Type(s): byte string or text string o Claim Value Type(s): byte string or text string
o Change Controller: IESG o Change Controller: IESG
o Specification Document(s): Section 5.8 of [this document] o Specification Document(s): Section 4.2 of
[I-D.ietf-oauth-token-exchange]
o Claim Name: "profile" o Claim Name: "ace_profile"
o Claim Description: The profile a token is supposed to be used o Claim Description: The profile a token is supposed to be used
with. with.
o JWT Claim Name: profile o JWT Claim Name: ace_profile
o Claim Key: TBD (suggested: 38) o Claim Key: TBD (suggested: 38)
o Claim Value Type(s): integer o Claim Value Type(s): integer
o Change Controller: IESG o Change Controller: IESG
o Specification Document(s): Section 5.8 of [this document] o Specification Document(s): Section 5.8 of [this document]
o Claim Name: "exi" o Claim Name: "exi"
o Claim Description: The expiration time of a token measured from o Claim Description: The expiration time of a token measured from
when it was received at the RS in seconds. when it was received at the RS in seconds.
o JWT Claim Name: exi o JWT Claim Name: exi
o Claim Key: TBD (suggested: 40) o Claim Key: TBD (suggested: 40)
skipping to change at page 54, line 4 skipping to change at page 56, line 36
Published specification: [this document] Published specification: [this document]
Applications that use this media type: The type is used by Applications that use this media type: The type is used by
authorization servers, clients and resource servers that support the authorization servers, clients and resource servers that support the
ACE framework as specified in [this document]. ACE framework as specified in [this document].
Additional information: Additional information:
Magic number(s): n/a Magic number(s): n/a
File extension(s): .ace File extension(s): .ace
Macintosh file type code(s): n/a Macintosh file type code(s): n/a
Person & email address to contact for further information: Ludwig Person & email address to contact for further information:
Seitz <ludwig.seitz@ri.se> <iesg@ietf.org>
Intended usage: COMMON Intended usage: COMMON
Restrictions on usage: None Restrictions on usage: None
Author: Ludwig Seitz <ludwig.setiz@ri.se> Author: Ludwig Seitz <ludwig.setiz@ri.se>
Change controller: IESG Change controller: IESG
8.15. CoAP Content-Format Registry 8.15. CoAP Content-Format Registry
skipping to change at page 54, line 35 skipping to change at page 57, line 21
Encoding Encoding
ID: 19 ID: 19
Reference: [this document] Reference: [this document]
8.16. Expert Review Instructions 8.16. Expert Review Instructions
All of the IANA registries established in this document are defined All of the IANA registries established in this document are defined
as expert review. This section gives some general guidelines for to use a registration policy of Expert Review. This section gives
what the experts should be looking for, but they are being designated some general guidelines for what the experts should be looking for,
as experts for a reason, so they should be given substantial but they are being designated as experts for a reason, so they should
latitude. be given substantial latitude.
Expert reviewers should take into consideration the following points: Expert reviewers should take into consideration the following points:
o Point squatting should be discouraged. Reviewers are encouraged o Point squatting should be discouraged. Reviewers are encouraged
to get sufficient information for registration requests to ensure to get sufficient information for registration requests to ensure
that the usage is not going to duplicate one that is already that the usage is not going to duplicate one that is already
registered, and that the point is likely to be used in registered, and that the point is likely to be used in
deployments. The zones tagged as private use are intended for deployments. The zones tagged as private use are intended for
testing purposes and closed environments; code points in other testing purposes and closed environments; code points in other
ranges should not be assigned for testing. ranges should not be assigned for testing.
o Specifications are required for the standards track range of point
assignment. Specifications should exist for specification
required ranges, but early assignment before a specification is
available is considered to be permissible. Specifications are
needed for the first-come, first-serve range if they are expected
to be used outside of closed environments in an interoperable way.
When specifications are not provided, the description provided
needs to have sufficient information to identify what the point is
being used for.
o Experts should take into account the expected usage of fields when o Experts should take into account the expected usage of fields when
approving point assignment. The fact that there is a range for approving point assignment. The fact that there is a range for
standards track documents does not mean that a standards track standards track documents does not mean that a standards track
document cannot have points assigned outside of that range. The document cannot have points assigned outside of that range. The
length of the encoded value should be weighed against how many length of the encoded value should be weighed against how many
code points of that length are left, the size of device it will be code points of that length are left, the size of device it will be
used on, and the number of code points left that encode to that used on.
size.
o Since a high degree of overlap is expected between these o Since a high degree of overlap is expected between these
registries and the contents of the OAuth parameters registries and the contents of the OAuth parameters
[IANA.OAuthParameters] registries, experts should require new [IANA.OAuthParameters] registries, experts should require new
registrations to maintain alignment with parameters from OAuth registrations to maintain alignment with parameters from OAuth
that have comparable functionality. Deviation from this alignment that have comparable functionality. Deviation from this alignment
should only be allowed if there are functional differences, that should only be allowed if there are functional differences, that
are motivated by the use case and that cannot be easily or are motivated by the use case and that cannot be easily or
efficiently addressed by comparable OAuth parameters. efficiently addressed by comparable OAuth parameters.
9. Acknowledgments 9. Acknowledgments
skipping to change at page 56, line 15 skipping to change at page 58, line 40
the context of the CelticNext project Critisec. the context of the CelticNext project Critisec.
10. References 10. References
10.1. Normative References 10.1. Normative References
[I-D.ietf-ace-cwt-proof-of-possession] [I-D.ietf-ace-cwt-proof-of-possession]
Jones, M., Seitz, L., Selander, G., Erdtman, S., and H. Jones, M., Seitz, L., Selander, G., Erdtman, S., and H.
Tschofenig, "Proof-of-Possession Key Semantics for CBOR Tschofenig, "Proof-of-Possession Key Semantics for CBOR
Web Tokens (CWTs)", draft-ietf-ace-cwt-proof-of- Web Tokens (CWTs)", draft-ietf-ace-cwt-proof-of-
possession-06 (work in progress), February 2019. possession-09 (work in progress), October 2019.
[I-D.ietf-ace-oauth-params] [I-D.ietf-ace-oauth-params]
Seitz, L., "Additional OAuth Parameters for Authorization Seitz, L., "Additional OAuth Parameters for Authorization
in Constrained Environments (ACE)", draft-ietf-ace-oauth- in Constrained Environments (ACE)", draft-ietf-ace-oauth-
params-04 (work in progress), February 2019. params-05 (work in progress), March 2019.
[I-D.ietf-oauth-token-exchange] [I-D.ietf-oauth-token-exchange]
Jones, M., Nadalin, A., Campbell, B., Bradley, J., and C. Jones, M., Nadalin, A., Campbell, B., Bradley, J., and C.
Mortimore, "OAuth 2.0 Token Exchange", draft-ietf-oauth- Mortimore, "OAuth 2.0 Token Exchange", draft-ietf-oauth-
token-exchange-16 (work in progress), October 2018. token-exchange-19 (work in progress), July 2019.
[IANA.CborWebTokenClaims] [IANA.CborWebTokenClaims]
IANA, "CBOR Web Token (CWT) Claims", IANA, "CBOR Web Token (CWT) Claims",
<https://www.iana.org/assignments/cwt/ <https://www.iana.org/assignments/cwt/
cwt.xhtml#claims-registry>. cwt.xhtml#claims-registry>.
[IANA.JsonWebTokenClaims] [IANA.JsonWebTokenClaims]
IANA, "JSON Web Token Claims", IANA, "JSON Web Token Claims",
<https://www.iana.org/assignments/jwt/jwt.xhtml#claims>. <https://www.iana.org/assignments/jwt/jwt.xhtml#claims>.
[IANA.OAuthAccessTokenTypes] [IANA.OAuthAccessTokenTypes]
IANA, "OAuth Access Token Types", IANA, "OAuth Access Token Types",
<https://www.iana.org/assignments/oauth-parameters/ <https://www.iana.org/assignments/oauth-parameters/
oauth-parameters.xhtml#token-types>. oauth-parameters.xhtml#token-types>.
[IANA.OAuthExtensionsErrorRegistry]
IANA, "OAuth Extensions Error Registry",
<https://www.iana.org/assignments/oauth-parameters/
oauth-parameters.xhtml#extensions-error>.
[IANA.OAuthParameters] [IANA.OAuthParameters]
IANA, "OAuth Parameters", IANA, "OAuth Parameters",
<https://www.iana.org/assignments/oauth-parameters/ <https://www.iana.org/assignments/oauth-parameters/
oauth-parameters.xhtml#parameters>. oauth-parameters.xhtml#parameters>.
[IANA.TokenIntrospectionResponse] [IANA.TokenIntrospectionResponse]
IANA, "OAuth Token Introspection Response", IANA, "OAuth Token Introspection Response",
<https://www.iana.org/assignments/oauth-parameters/ <https://www.iana.org/assignments/oauth-parameters/
oauth-parameters.xhtml#token-introspection-response>. oauth-parameters.xhtml#token-introspection-response>.
skipping to change at page 57, line 38 skipping to change at page 60, line 20
[RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type [RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type
Specifications and Registration Procedures", BCP 13, Specifications and Registration Procedures", BCP 13,
RFC 6838, DOI 10.17487/RFC6838, January 2013, RFC 6838, DOI 10.17487/RFC6838, January 2013,
<https://www.rfc-editor.org/info/rfc6838>. <https://www.rfc-editor.org/info/rfc6838>.
[RFC6920] Farrell, S., Kutscher, D., Dannewitz, C., Ohlman, B., [RFC6920] Farrell, S., Kutscher, D., Dannewitz, C., Ohlman, B.,
Keranen, A., and P. Hallam-Baker, "Naming Things with Keranen, A., and P. Hallam-Baker, "Naming Things with
Hashes", RFC 6920, DOI 10.17487/RFC6920, April 2013, Hashes", RFC 6920, DOI 10.17487/RFC6920, April 2013,
<https://www.rfc-editor.org/info/rfc6920>. <https://www.rfc-editor.org/info/rfc6920>.
[RFC7049] Bormann, C. and P. Hoffman, "Concise Binary Object
Representation (CBOR)", RFC 7049, DOI 10.17487/RFC7049,
October 2013, <https://www.rfc-editor.org/info/rfc7049>.
[RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained [RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained
Application Protocol (CoAP)", RFC 7252, Application Protocol (CoAP)", RFC 7252,
DOI 10.17487/RFC7252, June 2014, DOI 10.17487/RFC7252, June 2014,
<https://www.rfc-editor.org/info/rfc7252>. <https://www.rfc-editor.org/info/rfc7252>.
[RFC7519] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token
(JWT)", RFC 7519, DOI 10.17487/RFC7519, May 2015,
<https://www.rfc-editor.org/info/rfc7519>.
[RFC7662] Richer, J., Ed., "OAuth 2.0 Token Introspection", [RFC7662] Richer, J., Ed., "OAuth 2.0 Token Introspection",
RFC 7662, DOI 10.17487/RFC7662, October 2015, RFC 7662, DOI 10.17487/RFC7662, October 2015,
<https://www.rfc-editor.org/info/rfc7662>. <https://www.rfc-editor.org/info/rfc7662>.
[RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for
Writing an IANA Considerations Section in RFCs", BCP 26, Writing an IANA Considerations Section in RFCs", BCP 26,
RFC 8126, DOI 10.17487/RFC8126, June 2017, RFC 8126, DOI 10.17487/RFC8126, June 2017,
<https://www.rfc-editor.org/info/rfc8126>. <https://www.rfc-editor.org/info/rfc8126>.
[RFC8152] Schaad, J., "CBOR Object Signing and Encryption (COSE)", [RFC8152] Schaad, J., "CBOR Object Signing and Encryption (COSE)",
skipping to change at page 58, line 19 skipping to change at page 61, line 7
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>. May 2017, <https://www.rfc-editor.org/info/rfc8174>.
[RFC8392] Jones, M., Wahlstroem, E., Erdtman, S., and H. Tschofenig, [RFC8392] Jones, M., Wahlstroem, E., Erdtman, S., and H. Tschofenig,
"CBOR Web Token (CWT)", RFC 8392, DOI 10.17487/RFC8392, "CBOR Web Token (CWT)", RFC 8392, DOI 10.17487/RFC8392,
May 2018, <https://www.rfc-editor.org/info/rfc8392>. May 2018, <https://www.rfc-editor.org/info/rfc8392>.
10.2. Informative References 10.2. Informative References
[BLE] Bluetooth SIG, "Bluetooth Core Specification v5.1",
Section 4.4, January 2019,
<https://www.bluetooth.com/specifications/
bluetooth-core-specification/>.
[I-D.erdtman-ace-rpcc] [I-D.erdtman-ace-rpcc]
Seitz, L. and S. Erdtman, "Raw-Public-Key and Pre-Shared- Seitz, L. and S. Erdtman, "Raw-Public-Key and Pre-Shared-
Key as OAuth client credentials", draft-erdtman-ace- Key as OAuth client credentials", draft-erdtman-ace-
rpcc-02 (work in progress), October 2017. rpcc-02 (work in progress), October 2017.
[I-D.ietf-core-object-security] [I-D.ietf-quic-transport]
Selander, G., Mattsson, J., Palombini, F., and L. Seitz, Iyengar, J. and M. Thomson, "QUIC: A UDP-Based Multiplexed
"Object Security for Constrained RESTful Environments and Secure Transport", draft-ietf-quic-transport-23 (work
(OSCORE)", draft-ietf-core-object-security-16 (work in in progress), September 2019.
progress), March 2019.
[I-D.ietf-oauth-device-flow]
Denniss, W., Bradley, J., Jones, M., and H. Tschofenig,
"OAuth 2.0 Device Authorization Grant", draft-ietf-oauth-
device-flow-15 (work in progress), March 2019.
[I-D.ietf-tls-dtls13] [I-D.ietf-tls-dtls13]
Rescorla, E., Tschofenig, H., and N. Modadugu, "The Rescorla, E., Tschofenig, H., and N. Modadugu, "The
Datagram Transport Layer Security (DTLS) Protocol Version Datagram Transport Layer Security (DTLS) Protocol Version
1.3", draft-ietf-tls-dtls13-30 (work in progress), 1.3", draft-ietf-tls-dtls13-33 (work in progress), October
November 2018. 2019.
[Margi10impact] [Margi10impact]
Margi, C., de Oliveira, B., de Sousa, G., Simplicio Jr, Margi, C., de Oliveira, B., de Sousa, G., Simplicio Jr,
M., Barreto, P., Carvalho, T., Naeslund, M., and R. Gold, M., Barreto, P., Carvalho, T., Naeslund, M., and R. Gold,
"Impact of Operating Systems on Wireless Sensor Networks "Impact of Operating Systems on Wireless Sensor Networks
(Security) Applications and Testbeds", Proceedings of (Security) Applications and Testbeds", Proceedings of
the 19th International Conference on Computer the 19th International Conference on Computer
Communications and Networks (ICCCN), August 2010. Communications and Networks (ICCCN), August 2010.
[MQTT5.0] Banks, A., Briggs, E., Borgendale, K., and R. Gupta, "MQTT
Version 5.0", OASIS Standard, March 2019,
<https://docs.oasis-open.org/mqtt/mqtt/v5.0/
mqtt-v5.0.html>.
[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,
<https://www.rfc-editor.org/info/rfc4949>. <https://www.rfc-editor.org/info/rfc4949>.
[RFC6690] Shelby, Z., "Constrained RESTful Environments (CoRE) Link [RFC6690] Shelby, Z., "Constrained RESTful Environments (CoRE) Link
Format", RFC 6690, DOI 10.17487/RFC6690, August 2012, Format", RFC 6690, DOI 10.17487/RFC6690, August 2012,
<https://www.rfc-editor.org/info/rfc6690>. <https://www.rfc-editor.org/info/rfc6690>.
[RFC6819] Lodderstedt, T., Ed., McGloin, M., and P. Hunt, "OAuth 2.0 [RFC6819] Lodderstedt, T., Ed., McGloin, M., and P. Hunt, "OAuth 2.0
Threat Model and Security Considerations", RFC 6819, Threat Model and Security Considerations", RFC 6819,
DOI 10.17487/RFC6819, January 2013, DOI 10.17487/RFC6819, January 2013,
<https://www.rfc-editor.org/info/rfc6819>. <https://www.rfc-editor.org/info/rfc6819>.
[RFC7049] Bormann, C. and P. Hoffman, "Concise Binary Object [RFC7009] Lodderstedt, T., Ed., Dronia, S., and M. Scurtescu, "OAuth
Representation (CBOR)", RFC 7049, DOI 10.17487/RFC7049, 2.0 Token Revocation", RFC 7009, DOI 10.17487/RFC7009,
October 2013, <https://www.rfc-editor.org/info/rfc7049>. August 2013, <https://www.rfc-editor.org/info/rfc7009>.
[RFC7228] Bormann, C., Ersue, M., and A. Keranen, "Terminology for [RFC7228] Bormann, C., Ersue, M., and A. Keranen, "Terminology for
Constrained-Node Networks", RFC 7228, Constrained-Node Networks", RFC 7228,
DOI 10.17487/RFC7228, May 2014, DOI 10.17487/RFC7228, May 2014,
<https://www.rfc-editor.org/info/rfc7228>. <https://www.rfc-editor.org/info/rfc7228>.
[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,
<https://www.rfc-editor.org/info/rfc7231>. <https://www.rfc-editor.org/info/rfc7231>.
[RFC7519] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token
(JWT)", RFC 7519, DOI 10.17487/RFC7519, May 2015,
<https://www.rfc-editor.org/info/rfc7519>.
[RFC7521] Campbell, B., Mortimore, C., Jones, M., and Y. Goland, [RFC7521] Campbell, B., Mortimore, C., Jones, M., and Y. Goland,
"Assertion Framework for OAuth 2.0 Client Authentication "Assertion Framework for OAuth 2.0 Client Authentication
and Authorization Grants", RFC 7521, DOI 10.17487/RFC7521, and Authorization Grants", RFC 7521, DOI 10.17487/RFC7521,
May 2015, <https://www.rfc-editor.org/info/rfc7521>. May 2015, <https://www.rfc-editor.org/info/rfc7521>.
[RFC7540] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext
Transfer Protocol Version 2 (HTTP/2)", RFC 7540,
DOI 10.17487/RFC7540, May 2015,
<https://www.rfc-editor.org/info/rfc7540>.
[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,
<https://www.rfc-editor.org/info/rfc7591>. <https://www.rfc-editor.org/info/rfc7591>.
[RFC7641] Hartke, K., "Observing Resources in the Constrained [RFC7641] Hartke, K., "Observing Resources in the Constrained
Application Protocol (CoAP)", RFC 7641, Application Protocol (CoAP)", RFC 7641,
DOI 10.17487/RFC7641, September 2015, DOI 10.17487/RFC7641, September 2015,
<https://www.rfc-editor.org/info/rfc7641>. <https://www.rfc-editor.org/info/rfc7641>.
skipping to change at page 60, line 33 skipping to change at page 63, line 24
[RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol
Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018,
<https://www.rfc-editor.org/info/rfc8446>. <https://www.rfc-editor.org/info/rfc8446>.
[RFC8516] Keranen, A., ""Too Many Requests" Response Code for the [RFC8516] Keranen, A., ""Too Many Requests" Response Code for the
Constrained Application Protocol", RFC 8516, Constrained Application Protocol", RFC 8516,
DOI 10.17487/RFC8516, January 2019, DOI 10.17487/RFC8516, January 2019,
<https://www.rfc-editor.org/info/rfc8516>. <https://www.rfc-editor.org/info/rfc8516>.
[RFC8613] Selander, G., Mattsson, J., Palombini, F., and L. Seitz,
"Object Security for Constrained RESTful Environments
(OSCORE)", RFC 8613, DOI 10.17487/RFC8613, July 2019,
<https://www.rfc-editor.org/info/rfc8613>.
[RFC8628] Denniss, W., Bradley, J., Jones, M., and H. Tschofenig,
"OAuth 2.0 Device Authorization Grant", RFC 8628,
DOI 10.17487/RFC8628, August 2019,
<https://www.rfc-editor.org/info/rfc8628>.
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 61, line 21 skipping to change at page 64, line 22
Low CPU Speed: Low CPU Speed:
Some IoT devices are equipped with processors that are Some IoT devices are equipped with processors that are
significantly slower than those found in most current devices on significantly slower than those found in most current devices on
the Internet. This typically has implications on what timely the Internet. This typically has implications on what timely
cryptographic operations a device is capable of performing, which cryptographic operations a device is capable of performing, which
in turn impacts, e.g., protocol latency. Symmetric key in turn impacts, e.g., protocol latency. Symmetric key
cryptography may be used instead of the computationally more cryptography may be used instead of the computationally more
expensive public key cryptography where the security requirements expensive public key cryptography where the security requirements
so allows, but this may also require support for trusted third so allow, but this may also require support for trusted-third-
party assisted secret key establishment using transport or party-assisted secret key establishment using transport- or
application layer security. application-layer security.
Small Amount of Memory: Small Amount of Memory:
Microcontrollers embedded in IoT devices are often equipped with Microcontrollers embedded in IoT devices are often equipped with
small amount of RAM and flash memory, which places limitations only a small amount of RAM and flash memory, which places
what kind of processing can be performed and how much code can be limitations on what kind of processing can be performed and how
put on those devices. To reduce code size fewer and smaller much code can be put on those devices. To reduce code size, fewer
protocol implementations can be put on the firmware of such a and smaller protocol implementations can be put on the firmware of
device. In this case, CoAP may be used instead of HTTP, symmetric such a device. In this case, CoAP may be used instead of HTTP,
key cryptography instead of public key cryptography, and CBOR symmetric-key cryptography instead of public-key cryptography, and
instead of JSON. Authentication and key establishment protocol, CBOR instead of JSON. An authentication and key establishment
e.g., the DTLS handshake, in comparison with assisted key protocol, e.g., the DTLS handshake, in comparison with assisted
establishment also has an impact on memory and code. key establishment, also has an impact on memory and code
footprints.
User Interface Limitations: User Interface Limitations:
Protecting access to resources is both an important security as Protecting access to resources is both an important security as
well as privacy feature. End users and enterprise customers may well as privacy feature. End users and enterprise customers may
not want to give access to the data collected by their IoT device not want to give access to the data collected by their IoT device
or to functions it may offer to third parties. Since the or to functions it may offer to third parties. Since the
classical approach of requesting permissions from end users via a classical approach of requesting permissions from end users via a
rich user interface does not work in many IoT deployment rich user interface does not work in many IoT deployment
scenarios, these functions need to be delegated to user-controlled scenarios, these functions need to be delegated to user-controlled
skipping to change at page 62, line 16 skipping to change at page 65, line 16
communicate with a given device at all times. Devices may be communicate with a given device at all times. Devices may be
sleeping, or just disconnected from the Internet because of sleeping, or just disconnected from the Internet because of
general lack of connectivity in the area, for cost reasons, or for general lack of connectivity in the area, for cost reasons, or for
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.
Deployments making use of CoAP are expected, but not limited to, Deployments making use of CoAP are expected, but this framework is
other protocols such as HTTP, HTTP/2 or other specific protocols, not limited to them. Other protocols such as HTTP, or even
such as Bluetooth Smart communication, that do not necessarily use protocols such as Bluetooth Smart communication that do not
IP could also be used. The latter raises the need for application necessarily use IP, could also be used. The latter raises the
layer security over the various interfaces. need for application layer security over the various interfaces.
In the light of these constraints we have made the following design In the light of these constraints we have made the following design
decisions: decisions:
CBOR, COSE, CWT: CBOR, COSE, CWT:
This framework RECOMMENDS the use of CBOR [RFC7049] as data This framework RECOMMENDS the use of CBOR [RFC7049] as data
format. Where CBOR data needs to be protected, the use of COSE format. Where CBOR data needs to be protected, the use of COSE
[RFC8152] is RECOMMENDED. Furthermore where self-contained tokens [RFC8152] is RECOMMENDED. Furthermore, where self-contained
are needed, this framework RECOMMENDS the use of CWT [RFC8392]. tokens are needed, this framework RECOMMENDS the use of CWT
These measures aim at reducing the size of messages sent over the [RFC8392]. These measures aim at reducing the size of messages
wire, the RAM size of data objects that need to be kept in memory sent over the wire, the RAM size of data objects that need to be
and the size of libraries that devices need to support. kept in memory and the size of libraries that devices need to
support.
CoAP: CoAP:
This framework RECOMMENDS the use of CoAP [RFC7252] instead of This framework RECOMMENDS the use of CoAP [RFC7252] instead of
HTTP. This does not preclude the use of other protocols HTTP. This does not preclude the use of other protocols
specifically aimed at constrained devices, like, e.g., Bluetooth specifically aimed at constrained devices, like, e.g., Bluetooth
Low Energy (see Section 3.2). This aims again at reducing the Low Energy (see Section 3.2). This aims again at reducing the
size of messages sent over the wire, the RAM size of data objects size of messages sent over the wire, the RAM size of data objects
that need to be kept in memory and the size of libraries that that need to be kept in memory and the size of libraries that
devices need to support. devices need to support.
Access Information: Access Information:
This framework defines the name "Access Information" for data This framework defines the name "Access Information" for data
concerning the RS that the AS returns to the client in an access concerning the RS that the AS returns to the client in an access
token response (see Section 5.6.2). This aims at enabling token response (see Section 5.6.2). This aims at enabling
scenarios, where a powerful client, supporting multiple profiles, scenarios where a powerful client, supporting multiple profiles,
needs to interact with a RS for which it does not know the needs to interact with a RS for which it does not know the
supported profiles and the raw public key. supported profiles and the raw public key.
Proof-of-Possession: Proof-of-Possession:
This framework makes use of proof-of-possession tokens, using the This framework makes use of proof-of-possession tokens, using the
"cnf" claim [I-D.ietf-ace-cwt-proof-of-possession]. A "cnf" claim [I-D.ietf-ace-cwt-proof-of-possession]. A request
semantically and syntactically identical request and response parameter "cnf" and a Response parameter "cnf", both having a
parameter is defined for the token endpoint, to allow requesting value space semantically and syntactically identical to the "cnf"
and stating confirmation keys. This aims at making token theft claim, are defined for the token endpoint, to allow requesting and
stating confirmation keys. This aims at making token theft
harder. Token theft is specifically relevant in constrained use harder. Token theft is specifically relevant in constrained use
cases, as communication often passes through middle-boxes, which cases, as communication often passes through middle-boxes, which
could be able to steal bearer tokens and use them to gain could be able to steal bearer tokens and use them to gain
unauthorized access. unauthorized access.
Auth-Info endpoint: Authz-Info endpoint:
This framework introduces a new way of providing access tokens to This framework introduces a new way of providing access tokens to
a RS by exposing a authz-info endpoint, to which access tokens can a RS by exposing a authz-info endpoint, to which access tokens can
be POSTed. This aims at reducing the size of the request message be POSTed. This aims at reducing the size of the request message
and the code complexity at the RS. The size of the request and the code complexity at the RS. The size of the request
message is problematic, since many constrained protocols have message is problematic, since many constrained protocols have
severe message size limitations at the physical layer (e.g., in severe message size limitations at the physical layer (e.g., in
the order of 100 bytes). This means that larger packets get the order of 100 bytes). This means that larger packets get
fragmented, which in turn combines badly with the high rate of fragmented, which in turn combines badly with the high rate of
packet loss, and the need to retransmit the whole message if one packet loss, and the need to retransmit the whole message if one
skipping to change at page 64, line 13 skipping to change at page 67, line 17
The advantage of such an approach is that the resource owner can The advantage of such an approach is that the resource owner can
change the claims associated to the token reference without having change the claims associated to the token reference without having
to be in contact with the client, thus granting or revoking access to be in contact with the client, thus granting or revoking access
rights. rights.
Appendix B. Roles and Responsibilities Appendix B. Roles and Responsibilities
Resource Owner Resource Owner
* Make sure that the RS is registered at the AS. This includes * Make sure that the RS is registered at the AS. This includes
making known to the AS which profiles, token_types, scopes, and making known to the AS which profiles, token_type, scopes, and
key types (symmetric/asymmetric) the RS supports. Also making key types (symmetric/asymmetric) the RS supports. Also making
it known to the AS which audience(s) the RS identifies itself it known to the AS which audience(s) the RS identifies itself
with. with.
* Make sure that clients can discover the AS that is in charge of * Make sure that clients can discover the AS that is in charge of
the RS. the RS.
* If the client-credentials grant is used, make sure that the AS * If the client-credentials grant is used, make sure that the AS
has the necessary, up-to-date, access control policies for the has the necessary, up-to-date, access control policies for the
RS. RS.
Requesting Party Requesting Party
skipping to change at page 65, line 48 skipping to change at page 68, line 52
through the authentication procedure). through the authentication procedure).
* Process the RS response (see step (F) of Figure 1) of the RS. * Process the RS response (see step (F) of Figure 1) of the RS.
Resource Server Resource Server
* Expose a way to submit access tokens. By default this is the * Expose a way to submit access tokens. By default this is the
authz-info endpoint. authz-info endpoint.
* Process an access token. * Process an access token.
+ Verify the token is from a recognized AS. + Verify the token is from a recognized AS.
+ Check the token's integrity.
+ 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.
+ 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.
Note: The order proposed here is not normative, any process
that arrives at an equivalent result can be used. A noteworthy
consideration is whether one can use cheap operations early on
to quickly discard non-applicable or invalid tokens, before
performing expensive cryptographic operations (e.g. doing an
expiration check before verifying a signature).
* 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,
using introspection (if this is possible.) using introspection (if this is possible.)
* Send a response following the agreed upon communication * Send a response following the agreed upon communication
security. security mechanism(s).
* Safely store credentials such as raw public keys for * Safely store credentials such as raw public keys for
authentication or proof-of-possession keys linked to access authentication or proof-of-possession keys linked to access
tokens. tokens.
Appendix C. Requirements on Profiles Appendix C. Requirements on Profiles
This section lists the requirements on profiles of this framework, This section lists the requirements on profiles of this framework,
for the convenience of profile designers. for the convenience of profile designers.
o Optionally define new methods for the client to discover the
necessary permissions and AS for accessing a resource, different
from the one proposed in Section 5.1. Section 4
o Optionally specify new grant types. Section 5.2
o Optionally define the use of client certificates as client
credential type. Section 5.3
o Specify the communication protocol the client and RS the must use o Specify the communication protocol the client and RS the must use
(e.g., CoAP). Section 5 and Section 5.6.4.3 (e.g., CoAP). Section 5 and Section 5.6.4.3
o Specify the security protocol the client and RS must use to o Specify the security protocol the client and RS must use to
protect their communication (e.g., OSCORE or DTLS over CoAP). protect their communication (e.g., OSCORE or DTLS). This must
This must provide encryption, integrity and replay protection. provide encryption, integrity and replay protection.
Section 5.6.4.3 Section 5.6.4.3
o Specify how the client and the RS mutually authenticate. o Specify how the client and the RS mutually authenticate.
Section 4 Section 4
o Specify the proof-of-possession protocol(s) and how to select one, o Specify the proof-of-possession protocol(s) and how to select one,
if several are available. Also specify which key types (e.g., if several are available. Also specify which key types (e.g.,
symmetric/asymmetric) are supported by a specific proof-of- symmetric/asymmetric) are supported by a specific proof-of-
possession protocol. Section 5.6.4.2 possession protocol. Section 5.6.4.2
o Specify a unique profile identifier. Section 5.6.4.3 o Specify a unique ace_profile identifier. Section 5.6.4.3
o If introspection is supported: Specify the communication and o If introspection is supported: Specify the communication and
security protocol for introspection. Section 5.7 security protocol for introspection. Section 5.7
o Specify the communication and security protocol for interactions o Specify the communication and security protocol for interactions
between client and AS. This must provide encryption, integrity between client and AS. This must provide encryption, integrity
protection, replay protection and a binding between requests and protection, replay protection and a binding between requests and
responses. Section 5 and Section 5.6 responses. Section 5 and Section 5.6
o Specify how/if the authz-info endpoint is protected, including how o Specify how/if the authz-info endpoint is protected, including how
error responses are protected. Section 5.8.1 error responses are protected. Section 5.8.1
o Optionally define other methods of token transport than the authz- o Optionally define other methods of token transport than the authz-
info endpoint. Section 5.8.1 info endpoint. Section 5.8.1
skipping to change at page 67, line 20 skipping to change at page 70, line 36
established is out of scope for this document. established is out of scope for this document.
o The identifier of the client or RS. o The identifier of the client or RS.
o The profiles that the client or RS supports. o The profiles that the client or RS supports.
o The scopes that the RS supports. o The scopes that the RS supports.
o The audiences that the RS identifies with. o The audiences that the RS identifies with.
o The key types (e.g., pre-shared symmetric key, raw public key, key o The key types (e.g., pre-shared symmetric key, raw public key, key
length, other key parameters) that the client or RS supports. length, other key parameters) that the client or RS supports.
o The types of access tokens the RS supports (e.g., CWT). o The types of access tokens the RS supports (e.g., CWT).
o If the RS supports CWTs, the COSE parameters for the crypto o If the RS supports CWTs, the COSE parameters for the crypto
wrapper (e.g., algorithm, key-wrap algorithm, key-length). wrapper (e.g., algorithm, key-wrap algorithm, key-length) that the
RS supports.
o The expiration time for access tokens issued to this RS (unless o The expiration time for access tokens issued to this RS (unless
the RS accepts a default time chosen by the AS). the RS accepts a default time chosen by the AS).
o The symmetric key shared between client or RS and AS (if any). o The symmetric key shared between client and AS (if any).
o The symmetric key shared between RS and AS (if any).
o The raw public key of the client or RS (if any). o The raw public key of the client or RS (if any).
o Whether the RS has synchronized time (and thus is able to use the o Whether the RS has synchronized time (and thus is able to use the
'exp' claim) or not. 'exp' claim) or not.
Appendix E. Deployment Examples Appendix E. 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 security of the requests and responses performed. This requires the security of the requests and responses
between the clients and the RS to consider. between the clients and the RS to be considered.
Note: CBOR diagnostic notation is used for examples of requests and Note: CBOR diagnostic notation is used for examples of requests and
responses. responses.
E.1. Local Token Validation E.1. Local Token Validation
In this scenario, the case where the resource server is offline is In this scenario, the case where the resource server is offline is
considered, i.e., it is not connected to the AS at the time of the considered, 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 access request. This access procedure involves steps A, B, C, and F
of Figure 1. of 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 17.
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 the token endpoint at the AS. The client sends a CoAP POST request to the token endpoint at the
The security of this request can be transport or application AS. The security of this request can be transport or application
layer. It is up the the communication security profile to define. layer. It is up the the communication security profile to define.
In the example transport layer identification of the AS is done In the example it is assumed that both client and AS have
and the client identifies with client_id and client_secret as in performed mutual authentication e.g. via DTLS. The request
classic OAuth. The request contains the public key of the client contains the public key of the client and the Audience parameter
and the Audience parameter set to "tempSensorInLivingRoom", a set to "tempSensorInLivingRoom", a value that the temperature
value that the temperature sensor identifies itself with. The AS sensor identifies itself with. The AS evaluates the request and
evaluates the request and authorizes the client to access the authorizes the client to access the resource.
resource. B: The AS responds with a 2.05 Content response containing the
B: The AS responds with a PoP access token and Access Information. Access Information, including the access token. The PoP access
The PoP access token contains the public key of the client, and token contains the public key of the client, and the Access
the Access Information contains the public key of the RS. For Information contains the public key of the RS. For communication
communication security this example uses DTLS RawPublicKey between security this example uses DTLS RawPublicKey between the client
the client and the RS. The issued token will have a short and the RS. The issued token will have a short validity time,
validity time, i.e., "exp" close to "iat", to protect the RS from i.e., "exp" close to "iat", in order to mitigate attacks using
replay attacks. The token includes the claim such as "scope" with stolen client credentials. The token includes the claim such as
the authorized access that an owner of the temperature device can "scope" with the authorized access that an owner of the
enjoy. In this example, the "scope" claim, issued by the AS, temperature device can enjoy. In this example, the "scope" claim,
informs the RS that the owner of the token, that can prove the issued by the AS, informs the RS that the owner of the token, that
possession of a key is authorized to make a GET request against can prove the possession of a key is authorized to make a GET
the /temperature resource and a POST request on the /firmware request against the /temperature resource and a POST request on
resource. Note that the syntax and semantics of the scope claim the /firmware resource. Note that the syntax and semantics of the
are application specific. scope claim are application specific.
Note: In this example it is assumed that the client knows what Note: In this example it is assumed 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 |<=======>| DTLS Connection Establishment
| | to identify the AS | | and mutual authentication
| | | |
A: +-------->| Header: POST (Code=0.02) A: +-------->| Header: POST (Code=0.02)
| POST | Uri-Path:"token" | POST | Uri-Path:"token"
| | Content-Format: application/ace+cbor | | Content-Format: application/ace+cbor
| | Payload: <Request-Payload> | | Payload: <Request-Payload>
| | | |
B: |<--------+ Header: 2.05 Content B: |<--------+ Header: 2.05 Content
| 2.05 | Content-Format: application/ace+cbor | 2.05 | Content-Format: application/ace+cbor
| | Payload: <Response-Payload> | | Payload: <Response-Payload>
| | | |
skipping to change at page 70, line 9 skipping to change at page 73, line 9
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 Note that the parameter "rs_cnf" from Payload is shown in Figure 18 Note that the parameter "rs_cnf" from
[I-D.ietf-ace-oauth-params] is used to inform the client about the [I-D.ietf-ace-oauth-params] is used to inform the client about the
resource server's public key. resource server's public key.
Request-Payload : Request-Payload :
{ {
"audience" : "tempSensorInLivingRoom", "audience" : "tempSensorInLivingRoom",
"client_id" : "myclient", "client_id" : "myclient",
"client_secret" : "qwerty"
"req_cnf" : { "req_cnf" : {
"COSE_Key" : { "COSE_Key" : {
"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'
} }
} }
} }
Response-Payload : Response-Payload :
{ {
"access_token" : b64'SlAV32hkKG ...', "access_token" : b64'0INDoQEKoQVNKkXfb7xaWqMTf6 ...',
"rs_cnf" : { "rs_cnf" : {
"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 18: 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 19.
{ {
"aud" : "tempSensorInLivingRoom", "aud" : "tempSensorInLivingRoom",
"iat" : "1360189224", "iat" : "1563451500",
"exp" : "1360289224", "exp" : "1563453000",
"scope" : "temperature_g firmware_p", "scope" : "temperature_g firmware_p",
"cnf" : { "cnf" : {
"COSE_Key" : { "COSE_Key" : {
"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 19: 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 20 - Figure 21.
C: The client then sends the PoP access token to the authz-info C: The client then sends the PoP access token to the authz-info
endpoint at the RS. This is a plain CoAP request, i.e., no endpoint at the RS. This is a plain CoAP POST request, i.e., no
transport or application layer security is used between client and transport or application layer security is used between client and
RS since the token is integrity protected between the AS and RS. RS since the token is integrity protected between the AS and RS.
The RS verifies that the PoP access token was created by a known The RS verifies that the PoP access token was created by a known
and trusted AS, is valid, and has been issued to the client. The and trusted AS, that it applies to this RS, and that it is valid.
RS caches the security context together with authorization The RS caches the security context together with authorization
information about this client contained in the PoP access token. information about this client contained in the PoP access 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: 0INDoQEKoQVN ...
| | | |
|<--------+ Header: 2.04 Changed |<--------+ Header: 2.04 Changed
| 2.04 | | 2.04 |
| | | |
Figure 20: Access Token provisioning to RS Figure 20: 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 a CoAP GET request 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 over the same DTLS channel with a CoAP 2.05
Content response, containing a resource representation as payload.
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"
| | | |
skipping to change at page 73, line 8 skipping to change at page 76, line 11
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.
Note: In this example the client does not know the exact door it will Note: In this example the client does not know the exact door it will
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 are set quite wide to access. So the scope and audience parameters are set quite wide to
start with and new values different form the original once can be start with, while tailored values narrowing down the claims to the
returned from introspection later on. specific RS being accessed can be provided to that RS during an
introspection step.
A: The client sends the request using POST to the token endpoint A: The client sends a CoAP POST request to the token endpoint at
at AS. The request contains the Audience parameter set to AS. The request contains the Audience parameter set to "PACS1337"
"PACS1337" (PACS, Physical Access System), a value the that the (PACS, Physical Access System), a value the that identifies the
online door in question identifies itself with. The AS generates physical access control system to which the individual doors are
an access token as an opaque string, which it can match to the connected. The AS generates an access token as an opaque string,
specific client, a targeted audience and a symmetric key. The which it can match to the specific client and the targeted
security is provided by identifying the AS on transport layer audience. It furthermore generates a symmetric proof-of-
using a pre shared security context (psk, rpk or certificate) and possession key. The communication security and authentication
then the client is identified using client_id and client_secret as between client and AS is assumed to have been provided at
in classic OAuth. transport layer (e.g. via DTLS) using a pre-shared security
B: The AS responds with the an access token and Access context (psk, rpk or certificate).
Information, the latter containing a symmetric key. Communication B: The AS responds with a CoAP 2.05 Content response, containing
security between C and RS will be DTLS and PreSharedKey. The PoP as playload the Access Information, including the access token and
key is used as the PreSharedKey. the symmetric proof-of-possession key. Communication security
between C and RS will be DTLS and PreSharedKey. The PoP key is
used as the PreSharedKey.
Note: In this example we are using a symmetric key for a multi-RS
audience, which is not recommended normally (see Section 6.9).
However in this case the risk is deemed to be acceptable, since all
the doors are part of the same physical access control system, and
therefore the risk of a malicious RS impersonating the client towards
another RS is low.
Authorization Authorization
Client Server Client Server
| | | |
|<=======>| DTLS Connection Establishment
| | and mutual authentication
| | | |
A: +-------->| Header: POST (Code=0.02) A: +-------->| Header: POST (Code=0.02)
| POST | Uri-Path:"token" | POST | Uri-Path:"token"
| | Content-Format: application/ace+cbor | | Content-Format: application/ace+cbor
| | Payload: <Request-Payload> | | Payload: <Request-Payload>
| | | |
B: |<--------+ Header: 2.05 Content B: |<--------+ Header: 2.05 Content
| | Content-Format: application/ace+cbor | | Content-Format: application/ace+cbor
| 2.05 | Payload: <Response-Payload> | 2.05 | Payload: <Response-Payload>
| | | |
Figure 22: Token Request and Response using Client Credentials. Figure 22: 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 23.
Request-Payload: Request-Payload:
{ {
"client_id" : "keyfob", "client_id" : "keyfob",
"client_secret" : "qwerty" "audience" : "PACS1337"
} }
Response-Payload: Response-Payload:
{ {
"access_token" : b64'VGVzdCB0b2tlbg==', "access_token" : b64'VGVzdCB0b2tlbg==',
"cnf" : { "cnf" : {
"COSE_Key" : { "COSE_Key" : {
"kid" : b64'c29tZSBwdWJsaWMga2V5IGlk', "kid" : b64'c29tZSBwdWJsaWMga2V5IGlk',
"kty" : "oct", "kty" : "oct",
"alg" : "HS256", "alg" : "HS256",
skipping to change at page 74, line 34 skipping to change at page 78, line 6
Figure 23: Request and Response Payload for C offline Figure 23: Request and Response Payload for C offline
The access token in this case is just an opaque byte string The access token in this case is just an opaque byte string
referencing the authorization information at the AS. referencing 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
endpoint 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 introspection endpoint on the D: The RS sends the token to the introspection endpoint on the AS
AS. Introspection assumes a secure connection between the AS and using a CoAP POST request. In this example RS and AS are assumed
the RS, e.g., using transport of application layer security. In to have performed mutual authentication using a pre shared
the example AS is identified using pre shared security context security context (psk, rpk or certificate) with the RS acting as
(psk, rpk or certificate) while RS is acting as client and is DTLS client.
identified with client_id and client_secret. E: The AS provides the introspection response (2.05 Content)
E: The AS provides the introspection response containing containing parameters about the token. This includes the
parameters about the token. This includes the confirmation key confirmation key (cnf) parameter that allows the RS to verify the
(cnf) parameter that allows the RS to verify the client's proof of client's proof of possession in step F. Note that our example in
possession in step F. Figure 25 assumes a pre-established key (e.g. one used by the
client and the RS for a previous token) that is now only
referenced by its key-identifier 'kid'.
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 the CoAP response 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"
| | Payload: b64'VGVzdCB0b2tlbg==' | | Payload: b64'VGVzdCB0b2tlbg=='
| | | |
skipping to change at page 75, line 37 skipping to change at page 79, line 9
| | | |
Figure 24: Token Introspection for C offline Figure 24: 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 25.
Request-Payload: Request-Payload:
{ {
"token" : b64'VGVzdCB0b2tlbg==', "token" : b64'VGVzdCB0b2tlbg==',
"client_id" : "FrontDoor", "client_id" : "FrontDoor",
"client_secret" : "ytrewq"
} }
Response-Payload: Response-Payload:
{ {
"active" : true, "active" : true,
"aud" : "lockOfDoor4711", "aud" : "lockOfDoor4711",
"scope" : "open, close", "scope" : "open, close",
"iat" : 1311280970, "iat" : 1563454000,
"cnf" : { "cnf" : {
"kid" : b64'c29tZSBwdWJsaWMga2V5IGlk' "kid" : b64'c29tZSBwdWJsaWMga2V5IGlk'
} }
} }
Figure 25: Request and Response Payload for Introspection Figure 25: 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 the RS, changing the state of the sent to the uri-path /state on the RS, changing the state of the
skipping to change at page 80, line 32 skipping to change at page 83, line 47
F.18. Version -04 to -05 F.18. Version -04 to -05
o Added RFC 2119 language to the specification of the required o Added RFC 2119 language to the specification of the required
behavior of profile specifications. behavior of profile specifications.
o Added Section 5.3 on the relation to the OAuth2 grant types. o Added Section 5.3 on the relation to the OAuth2 grant types.
o Added CBOR abbreviations for error and the error codes defined in o Added CBOR abbreviations for error and the error codes defined in
OAuth2. OAuth2.
o Added clarification about token expiration and long-running o Added clarification about token expiration and long-running
requests in Section 5.8.3 requests in Section 5.8.3
o Added security considerations about tokens with symmetric pop keys o Added security considerations about tokens with symmetric PoP keys
valid for more than one RS. valid for more than one RS.
o Added privacy considerations section. o Added privacy considerations section.
o Added IANA registry mapping the confirmation types from RFC 7800 o Added IANA registry mapping the confirmation types from RFC 7800
to equivalent COSE types. to equivalent COSE types.
o Added appendix D, describing assumptions about what the AS knows o Added appendix D, describing assumptions about what the AS knows
about the client and the RS. about the client and the RS.
F.19. Version -03 to -04 F.19. Version -03 to -04
o Added a description of the terms "framework" and "profiles" as o Added a description of the terms "framework" and "profiles" as
used in this document. used in this document.
o Clarified protection of access tokens in section 3.1. o Clarified protection of access tokens in section 3.1.
o Clarified uses of the "cnf" parameter in section 6.4.5. o Clarified uses of the "cnf" parameter in section 6.4.5.
o Clarified intended use of Client Token in section 7.4. o Clarified intended use of Client Token in section 7.4.
 End of changes. 218 change blocks. 
610 lines changed or deleted 775 lines changed or added

This html diff was produced by rfcdiff 1.47. The latest version is available from http://tools.ietf.org/tools/rfcdiff/