idnits 2.17.1 draft-ietf-cbor-date-tag-05.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 16, 2020) is 1373 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 17, 2021 J. Richter 6 pdv Financial Software GmbH 7 July 16, 2020 9 Concise Binary Object Representation (CBOR) Tags for Date 10 draft-ietf-cbor-date-tag-05 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. This specification is 28 intended as the reference document for IANA registration of the CBOR 29 tags 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 17, 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.1.1. Example Date Representations . . . . . . . . . . . . 3 68 1.2. Comparing Dates . . . . . . . . . . . . . . . . . . . . . 4 69 1.3. Comparing Dates and Date/Time Values . . . . . . . . . . 4 70 2. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 4 71 2.1. Concise Binary Object Representation (CBOR) Tags 72 Registrations . . . . . . . . . . . . . . . . . . . . . . 4 73 3. Security Considerations . . . . . . . . . . . . . . . . . . . 5 74 4. References . . . . . . . . . . . . . . . . . . . . . . . . . 5 75 4.1. Normative References . . . . . . . . . . . . . . . . . . 5 76 4.2. Informative References . . . . . . . . . . . . . . . . . 5 77 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 5 78 Document History . . . . . . . . . . . . . . . . . . . . . . . . 6 79 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 7 81 1. Introduction 83 The Concise Binary Object Representation (CBOR) [RFC7049] provides 84 for the interchange of structured data without a requirement for a 85 pre-agreed schema. RFC 7049 defines a basic set of data types, as 86 well as a tagging mechanism that enables extending the set of data 87 types supported via an IANA registry. 89 This specification defines a CBOR tag for a text string representing 90 a date without a time. The tagged text string is represented as 91 specified by the RFC 3339 [RFC3339] "full-date" production. Per RFC 92 3339, this represents a date within the Gregorian calendar. 94 This specification also defines a CBOR tag for an integer 95 representing a date without a time. The tagged integer is an 96 unsigned or negative value indicating the number of days since the 97 Gregorian calendar date 1970-01-01. As an implementation note, this 98 value has a constant offset from the Modified Julian Date value 99 (which is defined by the Smithsonian Astrophysical Observatory as the 100 number of days since November 17, 1858); this value is the Modified 101 Julian Date minus 40587. 103 Note that since both tags are for dates without times, times of day, 104 time zones, and leap seconds are not applicable to these values. 105 These tags are both for representations of Gregorian calendar dates. 107 1.1. Calendar Dates 109 Calendar dates are used for numerous human use cases, such as marking 110 the dates of significant events. For instance, John Lennon was born 111 on October 9, 1940 and died on December 8, 1980. One such use case 112 is driver's licenses, which typically include a date of birth. The 113 dates used in this specification use the Gregorian calendar, as do 114 those in RFC 3339 [RFC3339]. The time zones and actual times of 115 these events are intentionally not represented in the calendar date. 117 The epoch chosen for the second tag, which represents days since the 118 Gregorian calendar date 1970-01-01, is related to the IEEE Std 119 1003.1, 2013 Edition [POSIX.1] time epoch 1970-01-01T00:00:00Z UTC 120 only insofar as both contain the date 1970-01-01. This should not be 121 construed as indicating that dates using this tag represent either a 122 specific time of day and/or time zone. 124 The day of the week (Sunday, Monday, Tuesday, etc.) is not explicitly 125 represented in either of these date formats. However, deterministic 126 algorithms that are beyond the scope of this specification can be 127 used to derive the day of the week in the Gregorian calendar from 128 dates represented in both of these formats. 130 1.1.1. Example Date Representations 132 This table contains example representations for dates using both 133 tags. 135 +------------------+--------------+---------+ 136 | Date | Tag 1004 | Tag 100 | 137 +------------------+--------------+---------+ 138 | October 9, 1940 | "1940-10-09" | -10676 | 139 | December 8, 1980 | "1980-12-08" | 3994 | 140 +------------------+--------------+---------+ 142 1.2. Comparing Dates 144 Comparison of dates in "full-date" format can be accomplished by 145 normal string comparison, since by design, the digits representing 146 the date are in fixed format and ordered from most significant to 147 least significant. Comparison of numeric dates representing days 148 since 1970-01-01 can be performed by normal integer comparison. 149 Comparison of dates in other formats or using other calendars require 150 conversions that are beyond the scope of this specification. 152 Note that different dates may correspond to the same moment in time, 153 depending upon the time zone in which the date was determined. For 154 instance, at many times of the day, a conference call occurring on a 155 particular date in Japan will simultaneously occur on the previous 156 date in Hawaii; at many times of the day, Japan's Friday corresponds 157 with Hawaii's Thursday. 159 1.3. Comparing Dates and Date/Time Values 161 Comparing dates with date/time values, which represent a particular 162 moment in time, is beyond the scope of this specification. That 163 said, if a date is augmented with a time zone and time of day, a 164 specific date/time value can be determined and comparing that date/ 165 time value to others becomes possible. For instance, if one were to 166 augment John Lennon's birth date of October 9, 1940 with the time of 167 day and time zone of his birth, then it would be possible to derive a 168 date/time at which he was born that could be compared with other 169 date/time values. 171 2. IANA Considerations 173 2.1. Concise Binary Object Representation (CBOR) Tags Registrations 175 This section registers the following values in the IANA "Concise 176 Binary Object Representation (CBOR) Tags" registry [IANA.cbor-tags]. 178 o Tag: 1004 179 o Data Item: UTF-8 text string 180 o Semantics: RFC 3339 full-date string 181 o Reference: [[ this specification ]] 183 o Tag: 100 (ASCII 'd') 184 o Data Item: Unsigned or negative integer 185 o Semantics: Number of days since the epoch date 1970-01-01 186 o Reference: [[ this specification ]] 188 3. Security Considerations 190 The security considerations of RFC 7049 apply; the tags introduced 191 here are not expected to raise security considerations beyond those. 193 A date, of course, has significant security considerations. These 194 include the exploitation of ambiguities where the date is security 195 relevant or where the date is used in access control decisions. 197 When using a calendar date for decision making, for example access 198 control, it needs to be noted that since calendar dates do not 199 represent a specific point in time, the results of the evaluation can 200 differ depending upon where the decision is made. For instance, a 201 person may have reached their 21st birthday in Japan while 202 simultaneously being a day short of their 21st birthday in Hawaii. 204 4. References 206 4.1. Normative References 208 [RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: 209 Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002, 210 . 212 [RFC7049] Bormann, C. and P. Hoffman, "Concise Binary Object 213 Representation (CBOR)", RFC 7049, DOI 10.17487/RFC7049, 214 October 2013, . 216 4.2. Informative References 218 [IANA.cbor-tags] 219 IANA, "Concise Binary Object Representation (CBOR) Tags", 220 . 222 [POSIX.1] IEEE, "The Open Group Base Specifications Issue 7", 223 IEEE Std 1003.1, 2013 Edition, 2013, 224 . 227 Acknowledgements 229 Thanks to Carsten Bormann for supporting creation of this 230 specification. Parts of the explanatory text in this specification 231 come from draft-bormann-cbor-time-tag-02. 233 Thanks to these people for reviews of the specification: Henk 234 Birkholz, Carsten Bormann, Thiago Macieira, Francesca Palombini, 235 Michael Richardson, Jim Schaad, Juergen Schoenwaelder, and Dale 236 Worley. 238 Document History 240 [[ to be removed by the RFC Editor before publication as an RFC ]] 242 -05 244 o Incorporated additional suggestions by Carsten Bormann and Juergen 245 Schoenwaelder. 247 -04 249 o Addressed shepherd comments by Francesca Palombini. 251 o Addressed additional review comments by Jim Schaad and Michael 252 Richardson. 254 -03 256 o Added statement that these tags are both for representations of 257 calendar dates. 259 o Described consequences of using calendar dates in access control 260 decisions. 262 -02 264 o Addressed working group last call comments, including stating that 265 time zones are not applicable to these values. 267 -01 269 o Changed "positive or negative" to "unsigned or negative". 271 o Added an implementation note about the relationship to Modified 272 Julian Dates. 274 -00 276 o Initial working group version based on draft-jones-cbor-date- 277 tag-01 with no normative changes. 279 Authors' Addresses 281 Michael B. Jones 282 Microsoft 284 Email: mbj@microsoft.com 285 URI: https://self-issued.info/ 287 Anthony Nadalin 288 Microsoft 290 Email: tonynad@microsoft.com 292 Joerg Richter 293 pdv Financial Software GmbH 295 Email: joerg.richter@pdv-fs.de