Problem Details For CoAP APIs
draft-fossati-core-coap-problem-00

Document Type Active Internet-Draft (individual)
Last updated 2019-11-20
Stream (None)
Intended RFC status (None)
Formats plain text html xml pdf htmlized bibtex
Stream Stream state (No stream defined)
Consensus Boilerplate Unknown
RFC Editor Note (None)
IESG IESG state I-D Exists
Telechat date
Responsible AD (None)
Send notices to (None)
CoRE Working Group                                            T. Fossati
Internet-Draft                                                       ARM
Intended status: Standards Track                        20 November 2019
Expires: 23 May 2020

                     Problem Details For CoAP APIs
                   draft-fossati-core-coap-problem-00

Abstract

   This document defines a "problem detail" as a way to carry machine-
   readable details of errors in a CoAP response to avoid the need to
   define new error response formats for CoAP APIs.

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at https://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on 23 May 2020.

Copyright Notice

   Copyright (c) 2019 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.

Fossati                    Expires 23 May 2020                  [Page 1]
Internet-Draft                CoAP Problem                 November 2019

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
     1.1.  Requirements Language . . . . . . . . . . . . . . . . . .   2
   2.  CoAP Problem Details Definition . . . . . . . . . . . . . . .   3
     2.1.  CDDL  . . . . . . . . . . . . . . . . . . . . . . . . . .   4
   3.  Extensibility . . . . . . . . . . . . . . . . . . . . . . . .   4
     3.1.  Defining New Problem Types  . . . . . . . . . . . . . . .   4
     3.2.  Defining New Problem Attributes . . . . . . . . . . . . .   5
   4.  Security Considerations . . . . . . . . . . . . . . . . . . .   5
   5.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   6
     5.1.  Registration of a Content-Format identifier for
           application/coap-problem+cbor . . . . . . . . . . . . . .   6
     5.2.  New Registries  . . . . . . . . . . . . . . . . . . . . .   6
       5.2.1.  CoAP Problem Details Registry . . . . . . . . . . . .   6
       5.2.2.  CoAP Problem Namespace Registry . . . . . . . . . . .   7
   6.  References  . . . . . . . . . . . . . . . . . . . . . . . . .   8
     6.1.  Normative References  . . . . . . . . . . . . . . . . . .   8
     6.2.  Informative References  . . . . . . . . . . . . . . . . .   9
   Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . .   9
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .   9

1.  Introduction

   CoAP [RFC7252] response codes are sometimes not sufficient to convey
   enough information about an error to be helpful.

   This specification defines a simple and extensible CBOR [RFC7049]
   format to suit this purpose.  It is designed to be reused by CoAP
   APIs, which can identify distinct "problem types" specific to their
   needs.

   Thus, API clients can be informed of both the high-level error class
   (using the response code) and the finer-grained details of the
   problem (using this format).

   The format presented is largely inspired by the Problem Details for
   HTTP APIs defined in [RFC7807].

1.1.  Requirements Language

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
   "OPTIONAL" in this document are to be interpreted as described in
   BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all
   capitals, as shown here.

Fossati                    Expires 23 May 2020                  [Page 2]
Internet-Draft                CoAP Problem                 November 2019

2.  CoAP Problem Details Definition

   A CoAP Problem Details is encoded as a CBOR map with the following
   members:

   *  "ns" (int) - A code-point that defines the namespace under which
      the "type" field needs to be interpreted.  This is a mandatory
      field.

   *  "type" (uint) - A code-point that identifies the problem type
      within the namespace.  This is a mandatory field.
Show full document text