draft-ietf-cbor-date-tag-07.txt   rfc8943.txt 
CBOR Working Group M. Jones Internet Engineering Task Force (IETF) M. Jones
Internet-Draft Microsoft Request for Comments: 8943 Microsoft
Intended status: Standards Track A. Nadalin Category: Standards Track A. Nadalin
Expires: March 14, 2021 Independent ISSN: 2070-1721 Independent
J. Richter J. Richter
pdv Financial Software GmbH pdv Financial Software GmbH
September 10, 2020 November 2020
Concise Binary Object Representation (CBOR) Tags for Date Concise Binary Object Representation (CBOR) Tags for Date
draft-ietf-cbor-date-tag-07
Abstract Abstract
The Concise Binary Object Representation (CBOR, RFC 7049) is a data The Concise Binary Object Representation (CBOR), as specified in RFC
format whose design goals include the possibility of extremely small 7049, is a data format whose design goals include the possibility of
code size, fairly small message size, and extensibility without the extremely small code size, fairly small message size, and
need for version negotiation. extensibility without the need for version negotiation.
In CBOR, one point of extensibility is the definition of CBOR tags. In CBOR, one point of extensibility is the definition of CBOR tags.
RFC 7049 defines two tags for time: CBOR tag 0 (RFC 3339 date/time RFC 7049 defines two tags for time: CBOR tag 0 (date/time string as
string) and tag 1 (Posix "seconds since the epoch"). Since then, per RFC 3339) and tag 1 (POSIX "seconds since the epoch"). Since
additional requirements have become known. This specification then, additional requirements have become known. This specification
defines a CBOR tag for an RFC 3339 date text string, for applications defines a CBOR tag for a date text string (as per RFC 3339) for
needing a textual date representation within the Gregorian calendar applications needing a textual date representation within the
without a time. It also defines a CBOR tag for days since the date Gregorian calendar without a time. It also defines a CBOR tag for
1970-01-01 in the Gregorian calendar for applications needing a days since the date 1970-01-01 in the Gregorian calendar for
numeric date representation without a time. This specification is applications needing a numeric date representation without a time.
intended as the reference document for IANA registration of the CBOR This specification is the reference document for IANA registration of
tags defined. the CBOR tags defined.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This is an Internet Standards Track document.
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 This document is a product of the Internet Engineering Task Force
and may be updated, replaced, or obsoleted by other documents at any (IETF). It represents the consensus of the IETF community. It has
time. It is inappropriate to use Internet-Drafts as reference received public review and has been approved for publication by the
material or to cite them other than as "work in progress." Internet Engineering Steering Group (IESG). Further information on
Internet Standards is available in Section 2 of RFC 7841.
This Internet-Draft will expire on March 14, 2021. Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
https://www.rfc-editor.org/info/rfc8943.
Copyright Notice Copyright Notice
Copyright (c) 2020 IETF Trust and the persons identified as the Copyright (c) 2020 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction
1.1. Calendar Dates . . . . . . . . . . . . . . . . . . . . . 3 1.1. Calendar Dates
1.1.1. Example Date Representations . . . . . . . . . . . . 3 1.1.1. Example Date Representations
1.2. Comparing Dates . . . . . . . . . . . . . . . . . . . . . 4 1.2. Comparing Dates
1.3. Comparing Dates and Date/Time Values . . . . . . . . . . 4 1.3. Comparing Dates and Date/Time Values
2. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 4 2. IANA Considerations
2.1. Concise Binary Object Representation (CBOR) Tags 2.1. Concise Binary Object Representation (CBOR) Tags
Registrations . . . . . . . . . . . . . . . . . . . . . . 4 Registrations
3. Security Considerations . . . . . . . . . . . . . . . . . . . 5 3. Security Considerations
4. References . . . . . . . . . . . . . . . . . . . . . . . . . 5 4. References
4.1. Normative References . . . . . . . . . . . . . . . . . . 5 4.1. Normative References
4.2. Informative References . . . . . . . . . . . . . . . . . 5 4.2. Informative References
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 5 Acknowledgements
Document History . . . . . . . . . . . . . . . . . . . . . . . . 6 Authors' Addresses
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 7
1. Introduction 1. Introduction
The Concise Binary Object Representation (CBOR) [RFC7049] provides The Concise Binary Object Representation (CBOR) [RFC7049] provides
for the interchange of structured data without a requirement for a for the interchange of structured data without a requirement for a
pre-agreed schema. RFC 7049 defines a basic set of data types, as pre-agreed schema. RFC 7049 defines a basic set of data types, as
well as a tagging mechanism that enables extending the set of data well as a tagging mechanism that enables extending the set of data
types supported via an IANA registry. types supported via an IANA registry.
This specification defines a CBOR tag for a text string representing This specification defines a CBOR tag for a text string representing
skipping to change at page 3, line 43 skipping to change at line 131
represented in either of these date formats. However, deterministic represented in either of these date formats. However, deterministic
algorithms that are beyond the scope of this specification can be algorithms that are beyond the scope of this specification can be
used to derive the day of the week in the Gregorian calendar from used to derive the day of the week in the Gregorian calendar from
dates represented in both of these formats. dates represented in both of these formats.
1.1.1. Example Date Representations 1.1.1. Example Date Representations
This table contains example representations for dates using both This table contains example representations for dates using both
tags. tags.
+------------------+--------------+---------+ +==================+==============+=========+
| Date | Tag 1004 | Tag 100 | | Date | Tag 1004 | Tag 100 |
+------------------+--------------+---------+ +==================+==============+=========+
| October 9, 1940 | "1940-10-09" | -10676 | | October 9, 1940 | "1940-10-09" | -10676 |
+------------------+--------------+---------+
| December 8, 1980 | "1980-12-08" | 3994 | | December 8, 1980 | "1980-12-08" | 3994 |
+------------------+--------------+---------+ +------------------+--------------+---------+
Table 1
1.2. Comparing Dates 1.2. Comparing Dates
Comparison of dates in "full-date" format can be accomplished by Comparison of dates in "full-date" format can be accomplished by
normal string comparison, since by design, the digits representing normal string comparison, since, by design, the digits representing
the date are in fixed format and ordered from most significant to the date are in fixed format and ordered from most significant to
least significant. Comparison of numeric dates representing days least significant. Comparison of numeric dates representing days
since 1970-01-01 can be performed by normal integer comparison. since 1970-01-01 can be performed by normal integer comparison.
Comparison of dates in other formats or using other calendars require Comparison of dates in other formats or using other calendars require
conversions that are beyond the scope of this specification. conversions that are beyond the scope of this specification.
Note that different dates may correspond to the same moment in time, Note that different dates may correspond to the same moment in time,
depending upon the time zone in which the date was determined. For depending upon the time zone in which the date was determined. For
instance, at many times of the day, a conference call occurring on a instance, at many times of the day, a conference call occurring on a
particular date in Japan will simultaneously occur on the previous particular date in Japan will simultaneously occur on the previous
date in Hawaii; at many times of the day, Japan's Friday corresponds date in Hawaii; at many times of the day, Japan's Friday corresponds
with Hawaii's Thursday. with Hawaii's Thursday.
1.3. Comparing Dates and Date/Time Values 1.3. Comparing Dates and Date/Time Values
Comparing dates with date/time values, which represent a particular Comparing dates with date/time values, which represent a particular
moment in time, is beyond the scope of this specification. That moment in time, is beyond the scope of this specification. That
said, if a date is augmented with a time zone and time of day, a said, if a date is augmented with a time zone and time of day, a
specific date/time value can be determined and comparing that date/ specific date/time value can be determined, and comparing that date/
time value to others becomes possible. For instance, if one were to time value to others becomes possible. For instance, if one were to
augment John Lennon's birth date of October 9, 1940 with the time of augment John Lennon's birth date of October 9, 1940 with the time of
day and time zone of his birth, then it would be possible to derive a day and time zone of his birth, then it would be possible to derive a
date/time at which he was born that could be compared with other date/time at which he was born that could be compared with other
date/time values. date/time values.
2. IANA Considerations 2. IANA Considerations
2.1. Concise Binary Object Representation (CBOR) Tags Registrations 2.1. Concise Binary Object Representation (CBOR) Tags Registrations
This section registers the following values in the IANA "Concise This section registers the following values in the IANA "Concise
Binary Object Representation (CBOR) Tags" registry [IANA.cbor-tags]. Binary Object Representation (CBOR) Tags" registry [IANA.cbor-tags].
o Tag: 1004 Tag: 1004
o Data Item: UTF-8 text string Data Item: UTF-8 text string
o Semantics: RFC 3339 full-date string Semantics: [RFC3339] full-date string
o Reference: [[ this specification ]] Reference: RFC 8943
o Tag: 100 (ASCII 'd') Tag: 100 (ASCII 'd')
o Data Item: Unsigned or negative integer Data Item: Unsigned or negative integer
o Semantics: Number of days since the epoch date 1970-01-01 Semantics: Number of days since the epoch date 1970-01-01
o Reference: [[ this specification ]] Reference: RFC 8943
3. Security Considerations 3. Security Considerations
The security considerations of RFC 7049 apply; the tags introduced The security considerations of RFC 7049 apply; the tags introduced
here are not expected to raise security considerations beyond those. here are not expected to raise security considerations beyond those.
A date, of course, has significant security considerations. These A date, of course, has significant security considerations. These
include the exploitation of ambiguities where the date is security include the exploitation of ambiguities where the date is security
relevant or where the date is used in access control decisions. relevant or where the date is used in access control decisions.
When using a calendar date for decision making, for example access When using a calendar date for decision making (for example, access
control, it needs to be noted that since calendar dates do not control), it needs to be noted that since calendar dates do not
represent a specific point in time, the results of the evaluation can represent a specific point in time, the results of the evaluation can
differ depending upon where the decision is made. For instance, a differ depending upon where the decision is made. For instance, a
person may have reached their 21st birthday in Japan while person may have reached their 21st birthday in Japan while
simultaneously being a day short of their 21st birthday in Hawaii. simultaneously being a day short of their 21st birthday in Hawaii.
Similarly, it would be inappropriate to use only a date to trigger Similarly, it would be inappropriate to use only a date to trigger
certificate expiration, since a date corresponds to a range of times certificate expiration, since a date corresponds to a range of times
worldwide, rather than a specific point in time that is independent worldwide rather than a specific point in time that is independent of
of geographic location. geographic location.
4. References 4. References
4.1. Normative References 4.1. Normative References
[RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: [RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet:
Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002, Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002,
<https://www.rfc-editor.org/info/rfc3339>. <https://www.rfc-editor.org/info/rfc3339>.
[RFC7049] Bormann, C. and P. Hoffman, "Concise Binary Object [RFC7049] Bormann, C. and P. Hoffman, "Concise Binary Object
Representation (CBOR)", RFC 7049, DOI 10.17487/RFC7049, Representation (CBOR)", RFC 7049, DOI 10.17487/RFC7049,
October 2013, <https://www.rfc-editor.org/info/rfc7049>. October 2013, <https://www.rfc-editor.org/info/rfc7049>.
4.2. Informative References 4.2. Informative References
[IANA.cbor-tags] [IANA.cbor-tags]
IANA, "Concise Binary Object Representation (CBOR) Tags", IANA, "Concise Binary Object Representation (CBOR) Tags",
<http://www.iana.org/assignments/cbor-tags>. <https://www.iana.org/assignments/cbor-tags>.
[POSIX.1] IEEE, "The Open Group Base Specifications Issue 7", [POSIX.1] IEEE, "The Open Group Base Specifications Issue 7", 2013
IEEE Std 1003.1, 2013 Edition, 2013, Edition, IEEE Std 1003.1, 2013,
<http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/ <https://pubs.opengroup.org/
V1_chap04.html#tag_04_15>. onlinepubs/9699919799.2013edition>.
[TIME-TAGS]
Bormann, C., Gamari, B., and H. Birkholz, "Concise Binary
Object Representation (CBOR) Tags for Time, Duration, and
Period", Work in Progress, Internet-Draft, draft-bormann-
cbor-time-tag-03, 9 March 2020,
<https://tools.ietf.org/html/draft-bormann-cbor-time-tag-
03>.
Acknowledgements Acknowledgements
Thanks to Carsten Bormann for supporting creation of this Thanks to Carsten Bormann for supporting creation of this
specification. Parts of the explanatory text in this specification specification. Parts of the explanatory text in this specification
come from draft-bormann-cbor-time-tag-02. come from [TIME-TAGS].
Thanks to these people for reviews of the specification: Henk Thanks to these people for reviews of the specification: Henk
Birkholz, Carsten Bormann, Samita Chakrabarti, Roman Danyliw, Linda Birkholz, Carsten Bormann, Samita Chakrabarti, Roman Danyliw, Linda
Dunbar, Benjamin Kaduk, Erik Kline, Warren Kumari, Barry Leiba, Dunbar, Benjamin Kaduk, Erik Kline, Warren Kumari, Barry Leiba,
Thiago Macieira, Francesca Palombini, Michael Richardson, Kyle Rose, Thiago Macieira, Francesca Palombini, Michael Richardson, Kyle Rose,
Jim Schaad, Juergen Schoenwaelder, Eric Vyncke, Robert Wilton, and Jim Schaad, Juergen Schoenwaelder, Éric Vyncke, Robert Wilton, and
Dale Worley. Dale Worley.
Document History
[[ to be removed by the RFC Editor before publication as an RFC ]]
-07
o Acknowledged Linda Dunbar for her GenArt review and Samita
Chakrabarti for her IOT-Dir review, as well as IESG reviewers.
-06
o Addressed SecDir review comments by Kyle Rose.
o Updated Tony Nadalin's affiliation and contact information.
-05
o Incorporated additional suggestions by Carsten Bormann and Juergen
Schoenwaelder.
-04
o Addressed shepherd comments by Francesca Palombini.
o Addressed additional review comments by Jim Schaad and Michael
Richardson.
-03
o Added statement that these tags are both for representations of
calendar dates.
o Described consequences of using calendar dates in access control
decisions.
-02
o Addressed working group last call comments, including stating that
time zones are not applicable to these values.
-01
o Changed "positive or negative" to "unsigned or negative".
o Added an implementation note about the relationship to Modified
Julian Dates.
-00
o Initial working group version based on draft-jones-cbor-date-
tag-01 with no normative changes.
Authors' Addresses Authors' Addresses
Michael B. Jones Michael B. Jones
Microsoft Microsoft
Email: mbj@microsoft.com Email: mbj@microsoft.com
URI: https://self-issued.info/ URI: https://self-issued.info/
Anthony Nadalin Anthony Nadalin
Independent Independent
Email: nadalin@prodigy.net Email: nadalin@prodigy.net
Joerg Richter Jörg Richter
pdv Financial Software GmbH pdv Financial Software GmbH
Email: joerg.richter@pdv-fs.de Email: joerg.richter@pdv-fs.de
 End of changes. 26 change blocks. 
121 lines changed or deleted 76 lines changed or added

This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/