idnits 2.17.1 draft-bormann-lpwan-cbor-template-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (January 17, 2018) is 2283 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- ** Obsolete normative reference: RFC 7049 (Obsoleted by RFC 8949) == Outdated reference: A later version (-17) exists of draft-ietf-core-comi-02 == Outdated reference: A later version (-19) exists of draft-ietf-lpwan-coap-static-context-hc-02 Summary: 1 error (**), 0 flaws (~~), 3 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group C. Bormann 3 Internet-Draft Universitaet Bremen TZI 4 Intended status: Informational January 17, 2018 5 Expires: July 21, 2018 7 Concise Binary Object Representation (CBOR) Tag for CBOR Templates 8 draft-bormann-lpwan-cbor-template-02 10 Abstract 12 The Concise Binary Object Representation (CBOR, RFC 7049) is a data 13 format whose design goals include the possibility of extremely small 14 code size, fairly small message size, and extensibility without the 15 need for version negotiation. 17 The present document makes use of this extensibility to define a CBOR 18 tag for a variable within a CBOR data item, which then could be 19 filled in by a separate process (e.g., from another CBOR data item). 21 Status of This Memo 23 This Internet-Draft is submitted in full conformance with the 24 provisions of BCP 78 and BCP 79. 26 Internet-Drafts are working documents of the Internet Engineering 27 Task Force (IETF). Note that other groups may also distribute 28 working documents as Internet-Drafts. The list of current Internet- 29 Drafts is at https://datatracker.ietf.org/drafts/current/. 31 Internet-Drafts are draft documents valid for a maximum of six months 32 and may be updated, replaced, or obsoleted by other documents at any 33 time. It is inappropriate to use Internet-Drafts as reference 34 material or to cite them other than as "work in progress." 36 This Internet-Draft will expire on July 21, 2018. 38 Copyright Notice 40 Copyright (c) 2018 IETF Trust and the persons identified as the 41 document authors. All rights reserved. 43 This document is subject to BCP 78 and the IETF Trust's Legal 44 Provisions Relating to IETF Documents 45 (https://trustee.ietf.org/license-info) in effect on the date of 46 publication of this document. Please review these documents 47 carefully, as they describe your rights and restrictions with respect 48 to this document. Code Components extracted from this document must 49 include Simplified BSD License text as described in Section 4.e of 50 the Trust Legal Provisions and are provided without warranty as 51 described in the Simplified BSD License. 53 Table of Contents 55 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 56 2. Variable . . . . . . . . . . . . . . . . . . . . . . . . . . 2 57 2.1. Example . . . . . . . . . . . . . . . . . . . . . . . . . 3 58 3. CDDL typename . . . . . . . . . . . . . . . . . . . . . . . . 3 59 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 4 60 5. Security Considerations . . . . . . . . . . . . . . . . . . . 4 61 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 5 62 6.1. Normative References . . . . . . . . . . . . . . . . . . 5 63 6.2. Informative References . . . . . . . . . . . . . . . . . 5 64 Contributors . . . . . . . . . . . . . . . . . . . . . . . . . . 5 65 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 5 66 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 5 68 1. Introduction 70 The Concise Binary Object Representation (CBOR, [RFC7049]) provides 71 for the interchange of structured data without a requirement for a 72 pre-agreed schema. RFC 7049 defines a basic set of data types, as 73 well as a tagging mechanism that enables extending the set of data 74 types supported via an IANA registry. 76 With the work on static compression for CoAP [RFC7252] and CoAP 77 application protocols [I-D.ietf-core-comi] on LPWANs 78 [I-D.ietf-lpwan-coap-static-context-hc], there appears to be a need 79 for defining CBOR data items that have within them some open 80 positions in them that can later be filled in from a separate source 81 (such as another CBOR data item). The anchor points for this 82 substitution are called "variables" in this specification. 84 This document defines a CBOR tag for a variable in a CBOR data item. 85 It is intended as the reference document for the IANA registration of 86 the tag defined. 88 2. Variable 90 A variable is a CBOR data item that typically is included as a part 91 of a larger data item (the "CBOR template"). In a process that is 92 outside the scope of this specification, the variable is then 93 substituted by an actual value in order to yield an instance from the 94 template. 96 A variable is identified by the data item within the tag, the 97 "variable identifier". Typically, variables are numbered by 98 integers. Some applications may also benefit from the use of strings 99 as identifiers. The specification of the tag does not make a 100 restriction on the type of the identifier; however note that very 101 complex variable identifiers may benefit from canonicalization to 102 enable their comparison, cf. section 3.9 of [RFC7049]. 104 We term a CBOR data item that contains one or more variables as a 105 "CBOR template"; generally processes that accept CBOR templates with 106 variables will also accept CBOR data items without variables, so we 107 accept this as a degenerate case for "CBOR template". Note that a 108 template may use the same variable (i.e., a variable with the same 109 identifier) in multiple positions, leading to multiple substitutions 110 of the same value. 112 2.1. Example 114 An example for a CBOR template in diagnostic notation: 116 { "name": "Carsten Bormann", 117 "place": 42(0) } 119 When this template undergoes substitution, with the variable 0 set to 120 the value "Bremen", this would result in the data item: 122 { "name": "Carsten Bormann", 123 "place": "Bremen" } 125 3. CDDL typename 127 CDDL [I-D.greevenbosch-appsawg-cbor-cddl] definitions will typically 128 describe the structure of a data item after substitution. 130 However, when the CDDL definition needs to explicitly identify the 131 positions where substitutions can occur, the typename defined in 132 Figure 1 is recommended: 134 variable = #6.42(varid) 136 Figure 1: Recommended typenames for CDDL 138 4. IANA Considerations 140 RFC-Editor note: Please replace "42" throughout this document by the 141 actual tag allocated and delete this note. 143 IANA is requested to allocate the tag 42 as in Table 1, with the 144 present document as the specification reference. 146 +-----+-----------+---------------+ 147 | Tag | Data Item | Semantics | 148 +-----+-----------+---------------+ 149 | 42 | any | CBOR variable | 150 +-----+-----------+---------------+ 152 Table 1: Values for Tags 154 5. Security Considerations 156 The security considerations of RFC 7049 apply; the tag introduced 157 here not expected to raise security considerations beyond those. 159 Obviously, any process for performing variable substitution as 160 outlined in Section 2 needs to ensure that all of its inputs are 161 derived considering the security objectives, and that the inputs are 162 actually intended to fit together for this substitution. 164 For example, if a signed value includes the variables to be 165 substituted, but does not contain a unique identifier for the 166 template, then the structure resulting in substituting the variables 167 in the template must not be considered as having been signed. 168 Identifying templates by a hash, or by an identifier (that needs to 169 be specific to the actual value and version of the template) is 170 recommended. 172 6. References 174 6.1. Normative References 176 [I-D.greevenbosch-appsawg-cbor-cddl] 177 Birkholz, H., Vigano, C., and C. Bormann, "Concise data 178 definition language (CDDL): a notational convention to 179 express CBOR data structures", draft-greevenbosch-appsawg- 180 cbor-cddl-11 (work in progress), July 2017. 182 [RFC7049] Bormann, C. and P. Hoffman, "Concise Binary Object 183 Representation (CBOR)", RFC 7049, DOI 10.17487/RFC7049, 184 October 2013, . 186 6.2. Informative References 188 [I-D.ietf-core-comi] 189 Veillette, M., Stok, P., Pelov, A., and A. Bierman, "CoAP 190 Management Interface", draft-ietf-core-comi-02 (work in 191 progress), December 2017. 193 [I-D.ietf-lpwan-coap-static-context-hc] 194 Minaburo, A. and L. Toutain, "LPWAN Static Context Header 195 Compression (SCHC) for CoAP", draft-ietf-lpwan-coap- 196 static-context-hc-02 (work in progress), September 2017. 198 [RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained 199 Application Protocol (CoAP)", RFC 7252, 200 DOI 10.17487/RFC7252, June 2014, 201 . 203 Contributors 205 Laurent Toutain suggested the creation of a mechanism for indicating 206 which parts of a CBOR data item are not yet available or subject to 207 change. 209 Jim Schaad contributed to the security considerations. 211 Acknowledgements 213 TBD 215 Author's Address 216 Carsten Bormann 217 Universitaet Bremen TZI 218 Postfach 330440 219 Bremen D-28359 220 Germany 222 Phone: +49-421-218-63921 223 Email: cabo@tzi.org