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

Andy Bierman <andy@yumaworks.com> Tue, 28 June 2022 20:23 UTC

Return-Path: <andy@yumaworks.com>
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 9C304C15A747 for <core@ietfa.amsl.com>; Tue, 28 Jun 2022 13:23:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.106
X-Spam-Level:
X-Spam-Status: No, score=-2.106 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=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_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yumaworks.com
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 98kBoBmI3rly for <core@ietfa.amsl.com>; Tue, 28 Jun 2022 13:23:11 -0700 (PDT)
Received: from mail-yb1-xb36.google.com (mail-yb1-xb36.google.com [IPv6:2607:f8b0:4864:20::b36]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 88875C14F745 for <core@ietf.org>; Tue, 28 Jun 2022 13:23:11 -0700 (PDT)
Received: by mail-yb1-xb36.google.com with SMTP id i7so24119292ybe.11 for <core@ietf.org>; Tue, 28 Jun 2022 13:23:11 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zI9HhcB0+BrQYUcCGJKmOII+YFhNjkdeyA2hDmZM86s=; b=IIZs8tgYK0Z/9Nw5oLy+k+jFDYKbzmVeZyLx6k6Ia9mYK00Xp2MNNiF0IY8yupz+FT vCBzvnM1jfwRwFE6MOGyFzKpR296+XYPOEMabV+Hzuia3aI37KK30vn9He6ZvEIaFUbP AiOwg2UizkGAk/WkXvSKxNHsGSv2Fh7PYysY1eCO3c3PZD036WdftLm7oOuvOMaZ1kAx GnmUv4oem0Fl08a7g8yBnJ4yQ+mHdZ5e2BoWOCVVZmPL/OJ+B3qlOEFBLahPKj/1PBwB Fpt8hD7DeNHm8FeMMcPU9aNGmCoVvsqkBcbGiMHPXXu2Q6HCIyabYLipTbLVxB68cvuK gy/Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zI9HhcB0+BrQYUcCGJKmOII+YFhNjkdeyA2hDmZM86s=; b=RaWd9jXWQoCM+QqjX+9xoGcptI8vBWKKhkhDQSLCF2371X0vss8crZ/1Cq6GeB90HF S93mdOkURo/Yg2W0DtxerH3M0M8RpIrJzkycNdabh8e72rMNLxuZnxhV5ckGQCcIyOD7 Lo9FY8JLlkO1aLOK1PD2gYBpUOZeiVNLo+F8gJNYGjSV1AItMWrjTeghzRopA7MeR6Pm C4Kes9ZMANXuPALuf3GZeSy/yS9uVR1EnBHSvm9UqGtWXSjLFhNLAyqzkeOgrjHi/mMz 2/U1PM8lHmKh4llOZM8kQNJenexGBxEPAyOuOO/UDkIQmiwtlcIpD5qCSA+hd+qq46cL 1DkQ==
X-Gm-Message-State: AJIora9nZe4pqYpw14Ol/ruQp30T1TyrTgSY3HKmQlr8Xk5QQaOy0gwz iDDHjvjcLX/F9RYmQkIBKzxJ3X+VRaxEsAnh4qZ8kw==
X-Google-Smtp-Source: AGRyM1usk3eAIDMU/j+nxZbKkOeXhYMjn+L8h590Dp8T6py+jrX4NE/mlAYV14yRqpcVSybdf/MVTXXYCFWBkcYy5A4=
X-Received: by 2002:a05:6902:1108:b0:66d:584f:77e1 with SMTP id o8-20020a056902110800b0066d584f77e1mr547366ybu.262.1656447790391; Tue, 28 Jun 2022 13:23:10 -0700 (PDT)
MIME-Version: 1.0
References: <DU0P190MB1978F90B0893D32291F6EE7DFDB99@DU0P190MB1978.EURP190.PROD.OUTLOOK.COM> <24048.1656352364@localhost> <25937.1656365067@localhost> <CABCOCHS6=F0tfESkVmOk1AFKvsu4tRfKu9A_Sgz5swVXv-eXCQ@mail.gmail.com> <26870.1656383550@localhost> <CABCOCHSkh95PEEM5E3YKe_yc5VmsY90XxT1D-z3AiJwwcG-HhA@mail.gmail.com> <7669.1656440710@localhost> <6DCC06F4-3799-4CC0-8780-21E6B12A4022@tzi.org>
In-Reply-To: <6DCC06F4-3799-4CC0-8780-21E6B12A4022@tzi.org>
From: Andy Bierman <andy@yumaworks.com>
Date: Tue, 28 Jun 2022 13:22:59 -0700
Message-ID: <CABCOCHQqtKw6cZ1o7nzDmQBN0zQP70CgeAAc6nFdRa_kB+-DBQ@mail.gmail.com>
To: Carsten Bormann <cabo@tzi.org>
Cc: Michael Richardson <mcr+ietf@sandelman.ca>, Core <core@ietf.org>, anima@ietf.org
Content-Type: multipart/alternative; boundary="00000000000022b3d205e287ce28"
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/OG-YFyUcDFsR11QtGR1axLExoxQ>
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: Tue, 28 Jun 2022 20:23:15 -0000

On Tue, Jun 28, 2022 at 11:30 AM Carsten Bormann <cabo@tzi.org> wrote:

> > Andy Bierman <andy@yumaworks.com> wrote:
> >> I am not in favor of the YANG-CBOR draft defining special encodings for
> >> 1 derived type (like date-and-time).  Implementations may not store the
> >> named YANG typedefs defined in various YANG modules.
> >> The current draft (properly) addresses only the base types, not derived
> >> types.
> >
> > So, do you think that auxiliary drafts could/should be written to deal
> with special
> > encoding of derived times?
>
> Well, first of all we need an architecture that explains how to do this.
> (Who needs to know what to make this happen.)
>
>
The key design goal is the YANG modules do not need to be modified to
provide efficient encoding options for CBOR.  Instead, tags are used
to indicate an alternate encoding is sent on the wire.

Each protocol needs a "server capabilities" discovery mechanism.
For example, NETCONF has a <capability> URI, but the current practice
is to design a protocol-independent YANG module for the client to read.

During the protocol setup, the client and server agree on which supported
tags
will be used (or maybe the protocol dictates this list).

During operation, the optimized encoding is used for any objects with the
data type.  E.g., tag X for date-and-time, tag Y for ipv4-address, tag Z
for ipv6-address.
The receiver is responsible for converting the special encoding to the
correct format
for the YANG data type.  Storage and exposure of the optimized format are
possible,
but (perhaps) not required.



Then we need a set of YANG-defined data types (which may or may not be
> congruent with a chosen set of CBOR tags such as 0, 1, 52, 54, etc.) that
> map to CBOR.
>
> The architecture will need to define whether the mapping can be
> schema-free or needs to be schema-informed (let me guess we’ll come up with
> the latter), which can be decided separately for the encoder/packer and the
> decoder/unpacker (which may be unpacking only at the architecture, but not
> at the implementation level).
>
> Whether this set is easily extensible, or only via a massive version
> up-ratchet, the architecture will need to define.
>

It is possible to do a combination of both, but for simplicity, a
hard-wired set
of the most relevant data types would be fine.



> Grüße, Carsten
>


Andy