Extended Tokens and Stateless Clients in the Constrained Application Protocol (CoAP)
RFC 8974

Document Type RFC - Proposed Standard (January 2021; No errata)
Updates RFC 8323, RFC 7252
Authors Klaus Hartke  , Michael Richardson 
Last updated 2021-01-08
Replaces draft-hartke-core-stateless
Stream IETF
Formats plain text html xml pdf htmlized bibtex
Reviews
Additional Resources
- Working Group Repo
- Mailing list discussion
Stream WG state Submitted to IESG for Publication
Document shepherd Carsten Bormann
Shepherd write-up Show (last changed 2020-03-05)
IESG IESG state RFC 8974 (Proposed Standard)
Action Holders
(None)
Consensus Boilerplate Yes
Telechat date
Responsible AD Barry Leiba
Send notices to Carsten Bormann <cabo@tzi.org>
IANA IANA review state Version Changed - Review Needed
IANA action state RFC-Ed-Ack


Internet Engineering Task Force (IETF)                         K. Hartke
Request for Comments: 8974                                      Ericsson
Updates: 7252, 8323                                        M. Richardson
Category: Standards Track                                      Sandelman
ISSN: 2070-1721                                             January 2021

                 Extended Tokens and Stateless Clients
             in the Constrained Application Protocol (CoAP)

Abstract

   This document provides considerations for alleviating Constrained
   Application Protocol (CoAP) clients and intermediaries of keeping
   per-request state.  To facilitate this, this document additionally
   introduces a new, optional CoAP protocol extension for extended token
   lengths.

   This document updates RFCs 7252 and 8323 with an extended definition
   of the "TKL" field in the CoAP message header.

Status of This Memo

   This is an Internet Standards Track document.

   This document is a product of the Internet Engineering Task Force
   (IETF).  It represents the consensus of the IETF community.  It has
   received public review and has been approved for publication by the
   Internet Engineering Steering Group (IESG).  Further information on
   Internet Standards is available in Section 2 of RFC 7841.

   Information about the current status of this document, any errata,
   and how to provide feedback on it may be obtained at
   https://www.rfc-editor.org/info/rfc8974.

Copyright Notice

   Copyright (c) 2021 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (https://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Table of Contents

   1.  Introduction
     1.1.  Terminology
   2.  Extended Tokens
     2.1.  Extended Token Length (TKL) Field
     2.2.  Discovering Support
       2.2.1.  Extended-Token-Length Capability Option
       2.2.2.  Trial and Error
     2.3.  Intermediaries
   3.  Stateless Clients
     3.1.  Serializing Client State
     3.2.  Using Extended Tokens
     3.3.  Transmitting Messages
   4.  Stateless Intermediaries
     4.1.  Observing Resources
     4.2.  Block-Wise Transfers
     4.3.  Gateway Timeouts
     4.4.  Extended Tokens
   5.  Security Considerations
     5.1.  Extended Tokens
     5.2.  Stateless Clients and Intermediaries
   6.  IANA Considerations
     6.1.  CoAP Signaling Option Number
   7.  References
     7.1.  Normative References
     7.2.  Informative References
   Appendix A.  Updated Message Formats
     A.1.  CoAP over UDP
     A.2.  CoAP over TCP/TLS
     A.3.  CoAP over WebSockets
   Acknowledgements
   Authors' Addresses

1.  Introduction

   The Constrained Application Protocol (CoAP) [RFC7252] is a RESTful
   application-layer protocol for constrained environments [RFC7228].
   In CoAP, clients (or intermediaries in the client role) make requests
   to servers (or intermediaries in the server role), which satisfy the
   requests by returning responses.

   While a request is ongoing, a client typically needs to keep some
   state that it requires for processing the response when that arrives.
   Identification of this state is done in CoAP by means of a token: an
   opaque sequence of bytes that is chosen by the client and included in
   the CoAP request and that is returned by the server verbatim in any
   resulting CoAP response (Figure 1).

          +-----------------+     request with     +------------+
          |        |        |   state identifier   |            |
          |        |        |       as token       |            |
          |    .-<-+->------|--------------------->|------.     |
          |   _|_           |                      |      |     |
          |  /   \ stored   |                      |      |     |
          |  \___/ state    |                      |      |     |
          |    |            |                      |      |     |
          |    '->-+-<------|<---------------------|------'     |
          |        |        |     response with    |            |
          |        v        |   token echoed back  |            |
          +-----------------+                      +------------+
                Client                                 Server

             Figure 1: Token as an Identifier for Request State

   In some scenarios, it can be beneficial to reduce the amount of state
   that is stored at the client at the cost of increased message sizes.
   A client can opt into this by serializing (parts of) its state into
Show full document text