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

Carsten Bormann <cabo@tzi.org> Wed, 29 June 2022 13:06 UTC

Return-Path: <cabo@tzi.org>
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 D3849C15C7F0; Wed, 29 Jun 2022 06:06:10 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.905
X-Spam-Level:
X-Spam-Status: No, score=-1.905 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_BLOCKED=0.001, 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=ham autolearn_force=no
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 KFuykq4EfQLt; Wed, 29 Jun 2022 06:06:08 -0700 (PDT)
Received: from gabriel-smtp.zfn.uni-bremen.de (gabriel-smtp.zfn.uni-bremen.de [IPv6:2001:638:708:32::15]) (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 9378BC14F735; Wed, 29 Jun 2022 06:06:04 -0700 (PDT)
Received: from [192.168.217.118] (p5089ad4f.dip0.t-ipconnect.de [80.137.173.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-smtp.zfn.uni-bremen.de (Postfix) with ESMTPSA id 4LY1tJ4F7czDChy; Wed, 29 Jun 2022 15:06:00 +0200 (CEST)
Content-Type: multipart/signed; boundary="Apple-Mail=_B2480EF5-B065-4075-8C54-B41730B3C523"; protocol="application/pgp-signature"; micalg="pgp-sha256"
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <258768.1656499296@dooku>
Date: Wed, 29 Jun 2022 15:06:00 +0200
Cc: Barry Leiba <barryleiba@computer.org>, cbor@ietf.org, core@ietf.org
X-Mao-Original-Outgoing-Id: 678200759.727124-afb10fde81100cb149804877edcd8daf
Content-Transfer-Encoding: quoted-printable
Message-Id: <FB9BBBB2-31ED-457D-98F9-21F413AE7773@tzi.org>
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>
To: Michael Richardson <mcr+ietf@sandelman.ca>
X-Mailer: Apple Mail (2.3608.120.23.2.7)
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/sjq670w1FOOqDVfrWIER7mqtbms>
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, 29 Jun 2022 13:06:10 -0000

> I am grumpy because those of doing interop testing on draft-ietf-anima-constrained-voucher
> noticed that *oops* yang:date-and-time does not translate to a CBOR Tag-1
> date value.  (My code did this, I never thought different about it, but it's
> not to spec)

You are expecting a magical bridge between the kingdoms of YANG specifications and CBOR Tags.  We would have had to set up this bridge, but we didn’t.

> draft-ietf-core-yang-cbor just got to AUTH48 on Monday.

Yes, and I hope we manage to go through this AUTH48 without unnecessary disturbances for once (would be a first for me in this decade).

> I think that if we started again today, that yang-cbor/yang-sid would be in the
> CBOR WG.

I don’t have an opinion on this.
I would think netmod would need to be central to this, as this is where YANG is being defined.

> My question is whether we can write a spec making there be some kind of exception.

s/exception/extension/

Similar to the way we could combine yang-cbor with cbor-packed, we could define something translating if that helps.

> I think we might also want one for tags 52 and 54 (IPv4/IPv6), and maybe a
> few other yang data types that have clear CBOR mappings.

Yes.  Archived-At: <https://mailarchive.ietf.org/arch/msg/core/0yEEG6JpCHbmpWoSfFoAihGA2DY>

> 1. would we do this in CBOR now?

Based on YANG-CBOR implementation experience, sure, but I don’t know in which WG.

>  (Is it in charter?)

(Pay grade: WG chair.)

> 2. is there support for doing this?

At least you :-)
I would prefer doing this properly; rushing to something that destabilizes the freshly published (to-be) YANG-CBOR format is not a good idea.

Note that we also still have the weird tags for unions out there.

> 3. how fast can we do this?

You saw how fast we were with problem-details.
But, again, I’d prefer to do this right (and, reasonably fast as well, please).

> 4. How can draft-ietf-anima-constrainer-voucher leverage this *now*?

*now*?  Don’t think so.
But it is not unusual to create an implementers’ agreement that is then picked up in a normative specification.

> 2022-06-17T09:21:32Z => 20 characters.
> vs 4 bytes until 2038, and 8 bytes after 2038.
> (I might suggest we encourage to send 8, because I'd hate for fragmentation
> to show up on 19-January-2038 and screw something up)

Well, 4 is the preferred encoding until 2106-02-07.
(CBOR does not steal bits for signed numbers.)

Grüße, Carsten