[Cbor] CDDL 2.0 import and paths

Christian Amsüss <christian@amsuess.com> Wed, 25 January 2023 16:27 UTC

Return-Path: <christian@amsuess.com>
X-Original-To: cbor@ietfa.amsl.com
Delivered-To: cbor@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 5B7C9C14CE24 for <cbor@ietfa.amsl.com>; Wed, 25 Jan 2023 08:27:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-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 LMBcy1kYW8S4 for <cbor@ietfa.amsl.com>; Wed, 25 Jan 2023 08:27:51 -0800 (PST)
Received: from smtp.akis.at (smtp.akis.at [IPv6:2a02:b18:500:a515::f455]) (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 BE19EC15153C for <cbor@ietf.org>; Wed, 25 Jan 2023 08:26:55 -0800 (PST)
Received: from poseidon-mailhub.amsuess.com (095129206250.cust.akis.net [95.129.206.250]) by smtp.akis.at (8.17.1/8.17.1) with ESMTPS id 30PGQoYj000376 (version=TLSv1.2 cipher=ECDHE-ECDSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <cbor@ietf.org>; Wed, 25 Jan 2023 17:26:51 +0100 (CET) (envelope-from christian@amsuess.com)
X-Authentication-Warning: smtp.akis.at: Host 095129206250.cust.akis.net [95.129.206.250] claimed to be poseidon-mailhub.amsuess.com
Received: from poseidon-mailbox.amsuess.com (poseidon-mailbox.amsuess.com [IPv6:2a02:b18:c13b:8010:a800:ff:fede:b1bf]) by poseidon-mailhub.amsuess.com (Postfix) with ESMTP id C791C19725 for <cbor@ietf.org>; Wed, 25 Jan 2023 17:26:48 +0100 (CET)
Received: from hephaistos.amsuess.com (hephaistos.amsuess.com [IPv6:2a02:b18:c13b:8010::907]) by poseidon-mailbox.amsuess.com (Postfix) with ESMTPSA id 786CA1C1F8 for <cbor@ietf.org>; Wed, 25 Jan 2023 17:26:48 +0100 (CET)
Received: (nullmailer pid 32577 invoked by uid 1000); Wed, 25 Jan 2023 16:26:48 -0000
Date: Wed, 25 Jan 2023 17:26:48 +0100
From: Christian Amsüss <christian@amsuess.com>
To: cbor@ietf.org
Message-ID: <Y9FYSKde6bXgzep3@hephaistos.amsuess.com>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="AjRGb8Rqzl6cyB2r"
Content-Disposition: inline
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/o68n2H__r1GpGFm_qhjquCjOfss>
Subject: [Cbor] CDDL 2.0 import and paths
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <cbor.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cbor>, <mailto:cbor-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor/>
List-Post: <mailto:cbor@ietf.org>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cbor>, <mailto:cbor-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 25 Jan 2023 16:27:53 -0000

Today's interim had some discussion about how bare-name CDDL files can
be imported from statically shipped libraries, the local directory, and
eventually a web-wide catalog.

I made a very incomplete suggestion of "could be URIs" to the question
of how to treat nested references; here's what I'd propose for this in a
slightly fuller form:

* Import "from"s are URI references.
* Tools should not dereference URIs by default, but may offer a `--web`
  switch to load any from HTTP(S),
  `--web=https://origin1,https://origin2` to allow web access only for
  some origins, and a `--file=ROOTPATH` flag to allow file system access
  up to ROOTPATH (wher `--file=.` is a practical default).
* Tools are encouraged to ship cache directories that are enabled by
  default. These look roughly like `wget -m` outputs in the file system,
  are used in sequence to resolve files (maybe with --web as a
  fallback). The user should be allowed to add such caches (a la
  CDDLPATH).
* An online catalog service can offer an easy to upload and quality
  controlled archive, which tools may auto-update from, possibly lazily
  (hitting an unknown URI in non--web mode, and the archive is stale?
  Better refresh from the catalog...).
* Locally used tools may have a path of bases to try when dereferencing
  as long as references are only relative. For example, when working in
  an I-D repository, there could be a fallback base that smoothes over
  the differences between the draft being hosted locally and its
  uploaded form.

I'm not sure this solves all issues, but I think it might work. To some
extent it hinges on IETF documents being assigned stable canonical URIs,
though :-/

BR
c


-- 
To use raw power is to make yourself infinitely vulnerable to greater powers.
  -- Bene Gesserit axiom