Internet-Draft | Stand-in Tags for YANG-CBOR | February 2024 |
Bormann & Matejka | Expires 24 August 2024 | [Page] |
YANG (RFC 7950) is a data modeling language used to model configuration data, state data, parameters and results of Remote Procedure Call (RPC) operations or actions, and notifications.¶
YANG-CBOR (RFC 9254) defines encoding rules for YANG in the Concise Binary Object Representation (CBOR) (RFC 8949). While the overall structure of YANG-CBOR is encoded in an efficient, binary format, YANG itself has its roots in XML and therefore traditionally encodes some information such as date/times and IP addresses/prefixes in a verbose text form.¶
This document defines how to use existing CBOR tags for this kind of information in YANG-CBOR as a "stand-in" for the text-based information that would be found in the original form of YANG-CBOR.¶
This note is to be removed before publishing as an RFC.¶
Status information for this document may be found at https://datatracker.ietf.org/doc/draft-bormann-cbor-yang-standin/.¶
Discussion of this document takes place on the CBOR (Concise Binary Object Representation Maintenance and Extensions) Working Group mailing list (mailto:cbor@ietf.org), which is archived at https://mailarchive.ietf.org/arch/browse/cbor/. Subscribe at https://www.ietf.org/mailman/listinfo/cbor/.¶
Source for this draft and an issue tracker can be found at https://github.com/cabo/yang-standin.¶
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 24 August 2024.¶
Copyright (c) 2024 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 Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
(see abstract)¶
The terminology of [RFC9254] applies.¶
The (often text-based) representation for a YANG data item as used in YANG-XML, YANG-JSON, and (unchanged) YANG-CBOR.¶
A CBOR tag that can supply the information that is equivalent to a legacy representation in a more efficient format (e.g., using binary data).¶
The party which generates (sends) CBOR data described by YANG.¶
An encoder which isn't the original author of the data, converting it from legacy representation.¶
The party which receives and parses CBOR data described by YANG.¶
A decoder which isn't the final recipient of the data, converting it to legacy representation.¶
A series of actions, generally beginning by data origination, encoding, continuing by optional intermediate transcoding, sending and receiving, and finally decoding and consuming.¶
Part of a data transfer between an encoder generating CBOR data with stand-in tags and a decoder parsing the data.¶
A Round Trip where the encoder is an intermediate encoder or the decoder is an intermediate decoder and any of these converts from or to the legacy representation.¶
A Legacy Round Trip that provides exactly the same legacy representation (not just semantically equivalent). The stand-in tag is also said to "unambiguously stand in" for the legacy representation.¶
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.¶
Introducing stand-in tags in YANG-CBOR requires some form of consent between the producer and the consumer of YANG-CBOR information:¶
A producer that creates YANG-CBOR containing stand-in tags needs to know whether the consumer supports stand-in tags, and, possibly, which specific stand-in tags it supports. We speak about the capability of a consumer to consume stand-in tags. A producer MUST NOT employ stand-in tags unless it knows about the capabilities of the consumer. A consumer SHOULD indicate its capabilities for consuming stand-in tags.¶
A consumer may not want to implement certain legacy text-based representations where more efficient (and easy to implement) stand-in tags are available. This places a requirement on the producer (which needs to have the capability to produce YANG-CBOR where those stand-in tags are used, in place of legacy representations). A producer MUST NOT employ legacy representations where stand-in tags are required by the consumer. A consumer that has requirements for only receiving stand-in tags in place of legacy representations, MUST indicate this to the producer.¶
ISSUE: Where do we put those two aspects of negotiation?¶
TODO Security¶
ISSUE: Should the use of stand-in tags be mentioned in the various YANG-CBOR-based media types (as a media type parameter)? Compare how application/yang-data+cbor can use id=name/id=sid to indicate another encoding decision.¶
TODO acknowledge.¶