Re: [core] [Cbor] YANG-CBOR, Date formats

Michael Richardson <mcr+ietf@sandelman.ca> Wed, 06 July 2022 17:50 UTC

Return-Path: <mcr+ietf@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 19F25C159487; Wed, 6 Jul 2022 10:50:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.707
X-Spam-Level:
X-Spam-Status: No, score=-6.707 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_HI=-5, 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_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham 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 WxUjg7JIQ4xV; Wed, 6 Jul 2022 10:50:19 -0700 (PDT)
Received: from tuna.sandelman.ca (tuna.sandelman.ca [IPv6:2607:f0b0:f:3:216:3eff:fe7c:d1f3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D7AD6C157B39; Wed, 6 Jul 2022 10:50:18 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by tuna.sandelman.ca (Postfix) with ESMTP id 4C685399B5; Wed, 6 Jul 2022 14:07:21 -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 dipVCyqre_ep; Wed, 6 Jul 2022 14:07:19 -0400 (EDT)
Received: from sandelman.ca (obiwan.sandelman.ca [IPv6:2607:f0b0:f:2::247]) by tuna.sandelman.ca (Postfix) with ESMTP id D534539697; Wed, 6 Jul 2022 14:07:19 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sandelman.ca; s=mail; t=1657130839; bh=l00r0dMioUp/aNCSoyctViMHR5nenGJ2cQSWxCcsccw=; h=From:To:Subject:In-Reply-To:References:Date:From; b=2qFltLQWBVe1az43yzanbJ9o5yzNY2FeA/GDGcH64yAnpkyo1HspnDczO+OM6mQXL eeoNbbZUQe2xFdAYm9stz05BOTzR159oVXKtqE1v9xlKBRTrCvo+s4vVFaAdbVmB0s UGW4oI/uw7KsSrxgk+Xs1hLLkZi0+ChM3HOYi6hpKMhY2CZOsJQkjA2KOoX7hsRABE RktKN66qtNXUqKNvGp8oOh6tMdC0VFiN89qx74tK8y8GM3BTCKplRJaajwIpiNC5Vn zmU+UQI4b4h5pJoxBJcVQ4BydZng/SpRYv/1lA4YGqhDf6PhwBXLligEXtRVNf0V1h dUDwqOQEazJlg==
Received: from localhost (localhost [IPv6:::1]) by sandelman.ca (Postfix) with ESMTP id 73C075DF; Wed, 6 Jul 2022 13:50:16 -0400 (EDT)
From: Michael Richardson <mcr+ietf@sandelman.ca>
To: Esko Dijk <esko.dijk@iotconsultancy.nl>, Carsten Bormann <cabo@tzi.org>, "cbor@ietf.org" <cbor@ietf.org>, "core@ietf.org" <core@ietf.org>, anima@ietf.org
In-Reply-To: <DU0P190MB197851016C1B73DD8E86F2B9FD809@DU0P190MB1978.EURP190.PROD.OUTLOOK.COM>
References: <CALaySJLPtUjdfVss17noK=18RyczpcCGNu=im8CBpiQz=WiLWA@mail.gmail.com> <CALaySJKUNh-AkJa87sCDpzf9OHV8H367VQyzyozXCCXxphUARw@mail.gmail.com> <CALaySJ+P2sP7BU7bNSxRJBByyp04rzVZuukq_e+9wbb5WPRSFQ@mail.gmail.com> <CALaySJKxht1gd1+3mNiAH-kLUAxjdPPk3doK50C_xS74LG+YTQ@mail.gmail.com> <CALaySJJNXpcaBhWQiK+4vmUk+s6mfMvwQFnB9d4YfDtdet09OQ@mail.gmail.com> <CALaySJ+8qLX6kuqXcRp6-OHU_MBkkASfH80bf2EePueduMsCTw@mail.gmail.com> <CALaySJJ+rhJMOfhhc9jDxz_9y+VpyrNoMcFy_b00Ui05c+g4zw@mail.gmail.com> <258768.1656499296@dooku> <274622.1656503120@dooku> <2913DF0F-8F46-47E0-92AE-C29E5AE20578@tzi.org> <DU0P190MB197851016C1B73DD8E86F2B9FD809@DU0P190MB1978.EURP190.PROD.OUTLOOK.COM>
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: Wed, 06 Jul 2022 13:50:16 -0400
Message-ID: <7378.1657129816@localhost>
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/g0A2Nesb6dSZGj8ml4yV85nNQj4>
Subject: Re: [core] [Cbor] YANG-CBOR, Date formats
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: Wed, 06 Jul 2022 17:50:23 -0000

Esko Dijk <esko.dijk@iotconsultancy.nl> wrote:
    > For example, proximity-registrar-pubk is defined as a new field that
    > can be used instead of proximity-registrar-cert, effectively specifying
    > an alternative format for identification of a registrar.

    > We can do the same for date fields, e.g.
    > "created-on" -> "created-on-epochtime"
    > "expires-on" -> "expires-on-epochtime"

I don't mind doing this.
Does it establish some precedent that others may dislike?

    > The nice thing is that a Registrar or a MASA can easily handle either
    > format, while the Pledge can be code-optimized to handle only the
    > numeric uint format. (And MASA knows what the Pledge can support so
    > will use the proper encoding the Pledge can understand.)

Yes, I agree. It's really not a problem for the non-constrained systems.

    > I suspect this can't be wrong, because we're doing the same for other
    > fields (e.g. the proximity-registrar-cert as mentioned earlier.)

created-on is almost entirely for documentation/debugging purposes.
Both are mostly irrelevant to actual processing in voucher-requests.
It's on the pledge that I really prefer to avoid having time/date parsing
code present.

--
Michael Richardson <mcr+IETF@sandelman.ca>   . o O ( IPv6 IøT consulting )
           Sandelman Software Works Inc, Ottawa and Worldwide