Re: [core] date-and-time and "created-on" field in constrained-voucher

Michael Richardson <mcr@sandelman.ca> Mon, 27 June 2022 21:24 UTC

Return-Path: <mcr@sandelman.ca>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C42A5C15AD34; Mon, 27 Jun 2022 14:24:47 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.706
X-Spam-Level:
X-Spam-Status: No, score=-1.706 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=neutral reason="invalid (public key: not available)" header.d=sandelman.ca
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vvfNqQJ-ghXZ; Mon, 27 Jun 2022 14:24:44 -0700 (PDT)
Received: from tuna.sandelman.ca (tuna.sandelman.ca [209.87.249.19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 03733C15AAC8; Mon, 27 Jun 2022 14:24:29 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by tuna.sandelman.ca (Postfix) with ESMTP id 3F8D638B2E; Mon, 27 Jun 2022 17:40:59 -0400 (EDT)
Received: from tuna.sandelman.ca ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 9iTLnb2p9Ll4; Mon, 27 Jun 2022 17:40:58 -0400 (EDT)
Received: from sandelman.ca (obiwan.sandelman.ca [IPv6:2607:f0b0:f:2::247]) by tuna.sandelman.ca (Postfix) with ESMTP id 1281738AB1; Mon, 27 Jun 2022 17:40:58 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sandelman.ca; s=mail; t=1656366058; bh=TcrYX7AyZRY89UOS6tqlbgpmQpU1fOkuPufvy70oA1M=; h=From:to:Subject:In-Reply-To:References:Date:From; b=0jKyiGgI2sawOCQMy8rRMnRPTjG7NSgy/H3Ky/Ql2bDtZieTVFQ7vZb5DLN+67niP SqVOW1p6nyLSY57pC4Utt3ommojCurrjMl7QlFysxBLET++pxSNyliBIhhGZHxeqKS vnh7QS701ymdQxyavDhNeJm45tZiTr25i4HGThIwy3cd6VRc4IGlzyXe4AS3NW8o42 Hscu9E4vxHOMFBM11GjuoGr1Ce37XjqAYWInUiJgQ9A42TXo5avRd0Ge+57/qftk5Y 1DcXoKQcG30T8Gj4lQE1Nh6UN0dQY3Hpdg02YZu6qEoBWes875Q7D+ujlOqzwM2fPJ 5y4QOgaOMqUnA==
Received: from localhost (localhost [IPv6:::1]) by sandelman.ca (Postfix) with ESMTP id 53594661; Mon, 27 Jun 2022 17:24:27 -0400 (EDT)
From: Michael Richardson <mcr@sandelman.ca>
to: core@ietf.org, anima@ietf.org
In-Reply-To: <24048.1656352364@localhost>
References: <DU0P190MB1978F90B0893D32291F6EE7DFDB99@DU0P190MB1978.EURP190.PROD.OUTLOOK.COM> <24048.1656352364@localhost>
X-Mailer: MH-E 8.6+git; nmh 1.7+dev; GNU Emacs 27.1
X-Face: $\n1pF)h^`}$H>Hk{L"x@)JS7<%Az}5RyS@k9X%29-lHB$Ti.V>2bi.~ehC0; <'$9xN5Ub# z!G,p`nR&p7Fz@^UXIn156S8.~^@MJ*mMsD7=QFeq%AL4m<nPbLgmtKK-5dC@#:k
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-="; micalg="pgp-sha512"; protocol="application/pgp-signature"
Date: Mon, 27 Jun 2022 17:24:27 -0400
Message-ID: <25937.1656365067@localhost>
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/YcYZm0eTYEPzmKj3Q4aUB-ki-ts>
Subject: Re: [core] date-and-time and "created-on" field in constrained-voucher
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 27 Jun 2022 21:24:47 -0000

Michael Richardson <mcr+ietf@sandelman.ca> wrote:
    > 2.  The other thing we ran into was that the CBOR implementation I'm using, when given a
    > DateTime object naturally produces a RFC 8949 Section 3.4.2 compliant "tag 1" marked Epoch-Based
    > Date/Time.  And demarshalls this.  So I don't really notice.

    > But, draft-ietf-core-yang-cbor doesn't say much about "yang:date-and-time".
    > The only reference seems to be at:
    > https://www.ietf.org/archive/id/draft-ietf-core-yang-cbor-20.html#name-the-container-and-other-nod

    > where date-and-time is shown as part of a container object.
    > The Content is defined to be string date pattern.

    > Section 6, where I might expect to see info about encoding dates:
    > https://www.ietf.org/archive/id/draft-ietf-core-yang-cbor-20.html#name-representing-yang-data-type

    > is silent about date and time formats.
    > https://github.com/core-wg/yang-cbor/issues/144

lemikev wrote in the issue:

l> I'm just not sure this issue is in scope for this draft.

l> "draft-ietf-core-yang-cbor" define the encoding of the built-In types
l> listed in
l> [https://datatracker.ietf.org/doc/html/rfc7950#section-4.2.4](url), not
l> every typedef.

l> [RFC 6021] defines date-and-time as a string with a specific pattern, this
l> is the way these data nodes should be encoded.

l> A clean way to support Epoch-Based Date/Time is to update the
l> ietf-yang-types YANG module to add this option.

l>  typedef date-and-time {
l>    union {
l>      type string {
l>        pattern '\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?'
l>              + '(Z|[\+\-]\d{2}:\d{2})';
l>      }
l>      type unit64;
l> }
l>
l> An alternate option is to use a different typedef in new IoT specific YANG modules.