idnits 2.17.1 draft-ietf-cbor-date-tag-04.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 (July 14, 2020) is 1353 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Obsolete normative reference: RFC 7049 (Obsoleted by RFC 8949) Summary: 1 error (**), 0 flaws (~~), 1 warning (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 CBOR Working Group M. Jones 3 Internet-Draft A. Nadalin 4 Intended status: Standards Track Microsoft 5 Expires: January 15, 2021 J. Richter 6 pdv Financial Software GmbH 7 July 14, 2020 9 Concise Binary Object Representation (CBOR) Tags for Date 10 draft-ietf-cbor-date-tag-04 12 Abstract 14 The Concise Binary Object Representation (CBOR, RFC 7049) is a data 15 format whose design goals include the possibility of extremely small 16 code size, fairly small message size, and extensibility without the 17 need for version negotiation. 19 In CBOR, one point of extensibility is the definition of CBOR tags. 20 RFC 7049 defines two tags for time: CBOR tag 0 (RFC 3339 date/time 21 string) and tag 1 (Posix "seconds since the epoch"). Since then, 22 additional requirements have become known. This specification 23 defines a CBOR tag for an RFC 3339 date text string, for applications 24 needing a textual date representation within the Gregorian calendar 25 without a time. It also defines a CBOR tag for days since the date 26 1970-01-01 in the Gregorian calendar for applications needing a 27 numeric date representation without a time. It is intended as the 28 reference document for the IANA registration of the CBOR tags 29 defined. 31 Status of This Memo 33 This Internet-Draft is submitted in full conformance with the 34 provisions of BCP 78 and BCP 79. 36 Internet-Drafts are working documents of the Internet Engineering 37 Task Force (IETF). Note that other groups may also distribute 38 working documents as Internet-Drafts. The list of current Internet- 39 Drafts is at https://datatracker.ietf.org/drafts/current/. 41 Internet-Drafts are draft documents valid for a maximum of six months 42 and may be updated, replaced, or obsoleted by other documents at any 43 time. It is inappropriate to use Internet-Drafts as reference 44 material or to cite them other than as "work in progress." 46 This Internet-Draft will expire on January 15, 2021. 48 Copyright Notice 50 Copyright (c) 2020 IETF Trust and the persons identified as the 51 document authors. All rights reserved. 53 This document is subject to BCP 78 and the IETF Trust's Legal 54 Provisions Relating to IETF Documents 55 (https://trustee.ietf.org/license-info) in effect on the date of 56 publication of this document. Please review these documents 57 carefully, as they describe your rights and restrictions with respect 58 to this document. Code Components extracted from this document must 59 include Simplified BSD License text as described in Section 4.e of 60 the Trust Legal Provisions and are provided without warranty as 61 described in the Simplified BSD License. 63 Table of Contents 65 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 66 1.1. Calendar Dates . . . . . . . . . . . . . . . . . . . . . 3 67 1.2. Comparing Dates . . . . . . . . . . . . . . . . . . . . . 3 68 1.3. Comparing Dates and Times . . . . . . . . . . . . . . . . 3 69 2. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 4 70 2.1. Concise Binary Object Representation (CBOR) Tags 71 Registrations . . . . . . . . . . . . . . . . . . . . . . 4 72 3. Security Considerations . . . . . . . . . . . . . . . . . . . 4 73 4. References . . . . . . . . . . . . . . . . . . . . . . . . . 4 74 4.1. Normative References . . . . . . . . . . . . . . . . . . 4 75 4.2. Informative References . . . . . . . . . . . . . . . . . 5 76 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 5 77 Document History . . . . . . . . . . . . . . . . . . . . . . . . 5 78 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 6 80 1. Introduction 82 The Concise Binary Object Representation (CBOR) [RFC7049] provides 83 for the interchange of structured data without a requirement for a 84 pre-agreed schema. RFC 7049 defines a basic set of data types, as 85 well as a tagging mechanism that enables extending the set of data 86 types supported via an IANA registry. 88 This specification defines a CBOR tag for a text string representing 89 a date without a time. The tagged text string is represented as 90 specified by the RFC 3339 [RFC3339] "full-date" production. Per RFC 91 3339, this represents a date within the Gregorian calendar. 93 This specification also defines a CBOR tag for an integer 94 representing a date without a time. The tagged integer is an 95 unsigned or negative value indicating the number of days since the 96 Gregorian calendar date 1970-01-01. As an implementation note, this 97 value has a constant offset from the Modified Julian Date value 98 (which is defined by the Smithsonian Astrophysical Observatory as the 99 number of days since November 17, 1858); this value is the Modified 100 Julian Date minus 40587. 102 Note that since both tags are for dates without times, times of day, 103 time zones, and leap seconds are not applicable to these values. 104 These tags are both for representations of Gregorian calendar dates. 106 1.1. Calendar Dates 108 Calendar dates are used for numerous human use cases, such as marking 109 the dates of significant events. For instance, John Lennon was born 110 on October 9, 1940 and died on December 8, 1980. One such common use 111 case is driver's licenses, which typically include a date of birth. 112 The dates used in this specification use the Gregorian calendar, as 113 do those in RFC 3339 [RFC3339]. The time zones and actual times of 114 these events are intentionally not represented in the calendar date. 116 The epoch chosen for the second tag, which represents days since the 117 Gregorian calendar date 1970-01-01, is related to the IEEE Std 118 1003.1, 2013 Edition [POSIX.1] time epoch 1970-01-01T00:00:00Z UTC 119 only insofar as both contain the date 1970-01-01. This should not be 120 construed as indicating that dates using this tag represent either a 121 specific time of day and/or time zone. 123 The day of the week (Sunday, Monday, Tuesday, etc.) is not explicitly 124 represented in either of these date formats. However, deterministic 125 algorithms that are beyond the scope of this specification can be 126 used to derive the day of the week in the Gregorian calendar from 127 dates represented in both of these formats. 129 1.2. Comparing Dates 131 Comparison of dates in "full-date" format can be accomplished by 132 normal string comparison, since by design, the digits representing 133 the date are in fixed format and ordered from most significant to 134 least significant. Comparison of numeric dates representing days 135 since 1970-01-01 can be performed by normal integer comparison. 136 Comparison of dates in other formats or using other calendars require 137 conversions that are beyond the scope of this specification. 139 1.3. Comparing Dates and Times 141 Comparing dates with times is beyond the scope of this specification. 142 That said, if a date is augmented with a time zone and time of day, 143 comparing that augmented date with other times becomes possible. For 144 instance, if one were to augment John Lennon's birth date of October 145 9, 1940 with the time of day and time zone of his birth, then it 146 would be possible to derive a time at which he was born that could be 147 compared with other times. 149 2. IANA Considerations 151 2.1. Concise Binary Object Representation (CBOR) Tags Registrations 153 This section registers the following values in the IANA "Concise 154 Binary Object Representation (CBOR) Tags" registry [IANA.cbor-tags]. 156 o Tag: 1004 (value requested) 157 o Data Item: UTF-8 text string 158 o Semantics: RFC 3339 full-date string 159 o Reference: [[ this specification ]] 161 o Tag: 100 (ASCII 'd') (value requested) 162 o Data Item: Unsigned or negative integer 163 o Semantics: Number of days since the epoch date 1970-01-01 164 o Reference: [[ this specification ]] 166 3. Security Considerations 168 The security considerations of RFC 7049 apply; the tags introduced 169 here are not expected to raise security considerations beyond those. 171 A date, of course, has significant security considerations. These 172 include the exploitation of ambiguities where the date is security 173 relevant or where the date is used in access control decisions. 175 When using a calendar date for decision making, for example access 176 control, it needs to be noted that since calendar dates do not 177 represent a specific point in time, the results of the evaluation can 178 differ depending upon where the decision is made. For instance, a 179 person may have reached their 21st birthday in Japan while 180 simultaneously being a day short of their 21st birthday in Hawaii. 182 4. References 184 4.1. Normative References 186 [RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: 187 Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002, 188 . 190 [RFC7049] Bormann, C. and P. Hoffman, "Concise Binary Object 191 Representation (CBOR)", RFC 7049, DOI 10.17487/RFC7049, 192 October 2013, . 194 4.2. Informative References 196 [IANA.cbor-tags] 197 IANA, "Concise Binary Object Representation (CBOR) Tags", 198 . 200 [POSIX.1] IEEE, "The Open Group Base Specifications Issue 7", 201 IEEE Std 1003.1, 2013 Edition, 2013, 202 . 205 Acknowledgements 207 Thanks to Carsten Bormann for supporting creation of this 208 specification. Parts of the explanatory text in this specification 209 come from draft-bormann-cbor-time-tag-02. 211 Thanks to these people for reviews of the specification: Henk 212 Birkholz, Carsten Bormann, Thiago Macieira, Francesca Palombini, 213 Michael Richardson, Jim Schaad, Juergen Schoenwaelder, and Dale 214 Worley. 216 Document History 218 [[ to be removed by the RFC Editor before publication as an RFC ]] 220 -04 222 o Addressed shepherd comments by Francesca Palombini. 224 o Addressed additional review comments by Jim Schaad and Michael 225 Richardson. 227 -03 229 o Added statement that these tags are both for representations of 230 calendar dates. 232 o Described consequences of using calendar dates in access control 233 decisions. 235 -02 236 o Addressed working group last call comments, including stating that 237 time zones are not applicable to these values. 239 -01 241 o Changed "positive or negative" to "unsigned or negative". 243 o Added an implementation note about the relationship to Modified 244 Julian Dates. 246 -00 248 o Initial working group version based on draft-jones-cbor-date- 249 tag-01 with no normative changes. 251 Authors' Addresses 253 Michael B. Jones 254 Microsoft 256 Email: mbj@microsoft.com 257 URI: https://self-issued.info/ 259 Anthony Nadalin 260 Microsoft 262 Email: tonynad@microsoft.com 264 Joerg Richter 265 pdv Financial Software GmbH 267 Email: joerg.richter@pdv-fs.de