Re: [core] Unnecessary "anchor" attributes in draft-ietf-core-resource-directory-25 ?

Christian Amsüss <christian@amsuess.com> Wed, 21 October 2020 11:37 UTC

Return-Path: <christian@amsuess.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 31CAF3A1769 for <core@ietfa.amsl.com>; Wed, 21 Oct 2020 04:37:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9f8IKkpK64m3 for <core@ietfa.amsl.com>; Wed, 21 Oct 2020 04:37:42 -0700 (PDT)
Received: from prometheus.amsuess.com (prometheus.amsuess.com [5.9.147.112]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CBCAE3A1768 for <core@ietf.org>; Wed, 21 Oct 2020 04:37:40 -0700 (PDT)
Received: from poseidon-mailhub.amsuess.com (unknown [IPv6:2a02:b18:c13b:8010:a800:ff:fede:b1bd]) by prometheus.amsuess.com (Postfix) with ESMTPS id 7F6AB4012D; Wed, 21 Oct 2020 13:37:38 +0200 (CEST)
Received: from poseidon-mailbox.amsuess.com (hermes.amsuess.com [10.13.13.254]) by poseidon-mailhub.amsuess.com (Postfix) with ESMTP id 5C149AB; Wed, 21 Oct 2020 13:37:37 +0200 (CEST)
Received: from hephaistos.amsuess.com (unknown [IPv6:2a02:b18:c13b:8010:b5e3:21a5:c6eb:f5c2]) by poseidon-mailbox.amsuess.com (Postfix) with ESMTPSA id C34AA34; Wed, 21 Oct 2020 13:37:36 +0200 (CEST)
Received: (nullmailer pid 628427 invoked by uid 1000); Wed, 21 Oct 2020 11:37:36 -0000
Date: Wed, 21 Oct 2020 13:37:36 +0200
From: Christian Amsüss <christian@amsuess.com>
To: Esko Dijk <esko.dijk@iotconsultancy.nl>
Cc: "core@ietf.org" <core@ietf.org>
Message-ID: <20201021113736.GC303030@hephaistos.amsuess.com>
References: <AM8P190MB09798CB94C780DBB8DD718CBFD070@AM8P190MB0979.EURP190.PROD.OUTLOOK.COM> <20201020103159.GA311699@hephaistos.amsuess.com> <AM8P190MB0979BE1707EF27FDF6AAD2CFFD1C0@AM8P190MB0979.EURP190.PROD.OUTLOOK.COM>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="9zSXsLTf0vkW971A"
Content-Disposition: inline
In-Reply-To: <AM8P190MB0979BE1707EF27FDF6AAD2CFFD1C0@AM8P190MB0979.EURP190.PROD.OUTLOOK.COM>
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/9sccDcCOQOixlEMexVzc5QlwL6o>
Subject: Re: [core] Unnecessary "anchor" attributes in draft-ietf-core-resource-directory-25 ?
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.29
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, 21 Oct 2020 11:37:44 -0000

Hello Esko, hello CoRE,

You're right, this does not only come from Limited Link Format, but is
an explicit additional requirement on the lookup side. As I remember,
this was intruduced for two reasons:

* There was little trust in implementations following the RFC6690 rules
  -- they might just as well work under Link Header rules.

* The 6690 rules would require that any present relative anchor would
  need resolution, and in some absent cases, an absent anchor would need
  to be set to a (full) URI.

  Given the varying interpretations of 6690, it would be difficult to
  come up with sharp rules when the anchor could be elided.

Re-reading the 6690 rules, I see that some of my own interpretations of
the resolution process (that, apart from discussions on whether or not
the relation type can have a bearing on the resolution process[1],
seemed to be largely agreed on) can easily have been wrong -- and that
reading played into the "always absolute in lookup" rules.

If what how I think you interpret 6690[2] is the accepted reading of
6690, the explicit anchor can indeed be elided for many cases.

The changes would be manageable on a prescriptive level (but affect a
lot of lookup examples -- removing text from the wire so that's a very
good thing, but still a large change). The three reasons I'm not jumping
to just doing it but ask the WG to chime in are:

* We're quite late in the process.
* If we pick [2] as The Reading of 6690, we should be sure about it, and
  I've been wrong about details of the 6690 process too often to jump to
  conclusions here.
* Very few people using link-format seem to care about the semantics of
  the links in link-format, using it more for the list of resources
  (like, we could have used some resource description format in the
  first place). This makes reviews on preserving the actual link
  semantics -- which we have to to not break the few cases where it does
  matter -- hard to come by.


Chairs, can we even still make such a change?

Esko, does [2] capture how you read the resolution process?

Group, can we find agreement on that being the right interpretation?

KR
Christian

[1]:
> * "anchor" attribute MUST NOT be present for a link with the "hosts"
> relation   (i.e. the default relation if none specified)

This is relatively hard to check -- sure you can test for the presence,
but how about if someone made it explicit as rel=hosts? What about
rel="managed-by hosts"?

[2]: I've read and written too many phrasings of that, maybe this is
less ambiguous -- the RFC6690 algorithm as I think you understand it:

```
docbase = the RFC3986 base URI (from the encapsulating entity, as
  link-format has no base embedded in the content)
href = string part between the angular brackets
anchor = string value of the anchor attribute, or null if absent
target = resolve href against docbase
if anchor == null:
    context = resolve anchor against docbase
else:
    context = origin of target
```

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