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

Esko Dijk <esko.dijk@iotconsultancy.nl> Mon, 26 October 2020 10:01 UTC

Return-Path: <esko.dijk@iotconsultancy.nl>
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 EF2D83A1A56 for <core@ietfa.amsl.com>; Mon, 26 Oct 2020 03:01:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.101
X-Spam-Level:
X-Spam-Status: No, score=-2.101 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, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=iotconsultancy.nl
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 r5LEyPPciokH for <core@ietfa.amsl.com>; Mon, 26 Oct 2020 03:01:17 -0700 (PDT)
Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80097.outbound.protection.outlook.com [40.107.8.97]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 742BC3A1A55 for <core@ietf.org>; Mon, 26 Oct 2020 03:01:16 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I+rUYAaPE8GZ9TDaaDHpkXiNNaH7SXd3Ka10TE19ipRD6xEQK/jB7fsjwsj6HlKV07HYgRtnjRlBcp3rY5YwJ11VanCU3Ws8NIWO+KZ6XaCywyJFThrFOtO/AYwFnWWMr3UvHJ80yeCoLh8UIXW5yKrX+kHClsvCcKsvjhYJpuHf46Zu0kTpvMSPBiiP1whZOUMxicVC/WesyyVSvU33WrWlcmawcRE8XGGlWaAwy4RGtwJholV4gH9ZtAZA0PTEMxz9IQs2SnUbypnV45p9P0OJS1wi97xnSc6In20mguh5x2uZQxhvFYPA310BsEtV8ggGNRyQVNc3wp8YzENpCQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SLBeRSJI2ClIqPhMSiP9wGqr9i1uhXuHiY8DTPCW9G0=; b=oEPIIMImbTEA/+r+NiG/SmHy/fK/3exdpO5SFObLVlwqidMvrIoJy8aU52ABkYNzx0u3tLCjP03BsbxIpByIU8eSzLTXK/1I+9L1E2CnqnZYLkafrut7JaZurNrOYk8OOjAlOU2+3OfXSup9VkEtLCHnDtzhsZy7NWKycy6sLrjhYsQ+wV/07or2ZdvCaI3HJ35U0NxjtRiYmU811BEIvfN9GfZDysMLkf0kTHDAu7LmpfnUmRb9cIMC1FQp/0XPpPQOyrO84JH/fVW8B91yM5qQgWz3uC73mfOKpAbxALmvOLiAZFF1ZAaPmirr2bOZ2a6Llz56jdWqsXkOCox5eQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=iotconsultancy.nl; dmarc=pass action=none header.from=iotconsultancy.nl; dkim=pass header.d=iotconsultancy.nl; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iotconsultancy.nl; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SLBeRSJI2ClIqPhMSiP9wGqr9i1uhXuHiY8DTPCW9G0=; b=Xt1h12ZRQGunP0adnL2BbGjpBU/tbzwS/hzQd5Te1UoCYrhKMTcKuQLciY7hxakHfP/mfhoicmXytkJR+l16NuZaf2D1/adfXvxHZ6h213Ic92rIEqKysfN53tqUFU5PVZabs/F6hxrJu1heU/IYPN/NRjnofL8mJ1QJsDFl0e0=
Received: from AM8P190MB0979.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:1d3::8) by AM4P190MB0020.EURP190.PROD.OUTLOOK.COM (2603:10a6:200:61::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.18; Mon, 26 Oct 2020 10:01:09 +0000
Received: from AM8P190MB0979.EURP190.PROD.OUTLOOK.COM ([fe80::b0bf:bd8a:de8f:55fa]) by AM8P190MB0979.EURP190.PROD.OUTLOOK.COM ([fe80::b0bf:bd8a:de8f:55fa%5]) with mapi id 15.20.3499.018; Mon, 26 Oct 2020 10:01:09 +0000
From: Esko Dijk <esko.dijk@iotconsultancy.nl>
To: Christian Amsüss <christian@amsuess.com>
CC: "core@ietf.org" <core@ietf.org>
Thread-Topic: [core] Unnecessary "anchor" attributes in draft-ietf-core-resource-directory-25 ?
Thread-Index: AdagiZ7ddTpjV6VySOOkvoVV5WS9KQGQp6uAAC9rtEAABSmPAAABpo/AAANQggAA8gL0EA==
Date: Mon, 26 Oct 2020 10:01:09 +0000
Message-ID: <AM8P190MB0979AF808CD409D44CA435CEFD190@AM8P190MB0979.EURP190.PROD.OUTLOOK.COM>
References: <AM8P190MB09798CB94C780DBB8DD718CBFD070@AM8P190MB0979.EURP190.PROD.OUTLOOK.COM> <20201020103159.GA311699@hephaistos.amsuess.com> <AM8P190MB0979BE1707EF27FDF6AAD2CFFD1C0@AM8P190MB0979.EURP190.PROD.OUTLOOK.COM> <20201021113736.GC303030@hephaistos.amsuess.com> <AM8P190MB09790D140ABDE73680E652CCFD1C0@AM8P190MB0979.EURP190.PROD.OUTLOOK.COM> <20201021135946.GE303030@hephaistos.amsuess.com>
In-Reply-To: <20201021135946.GE303030@hephaistos.amsuess.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: amsuess.com; dkim=none (message not signed) header.d=none;amsuess.com; dmarc=none action=none header.from=iotconsultancy.nl;
x-originating-ip: [2001:1c02:3103:f000:831:730a:9dc6:3ef3]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 69460107-e37f-4231-a6e1-08d879961039
x-ms-traffictypediagnostic: AM4P190MB0020:
x-microsoft-antispam-prvs: <AM4P190MB00203C7B50732761B8BD9363FD190@AM4P190MB0020.EURP190.PROD.OUTLOOK.COM>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: wXlavlzN5l+to39j8jLjJ+ANa30MREDH2nFbeHTMhJueLmiu0+lqHR0QZUFjUZ3UYg/dV5hW5Hi7yIe9WbrzM0weKJZjVzb5bPbthu9NuR4qxnE3f4g5zoATU4Fr7Rbt7NUQsfFK9bLhRL7QtSG0hOgh5BtL1lK90QGMJoi1ETPRcknFFVHuwKXaXLEnM5cNS7cQgkiTloRuvE59E5sFaXDE9gS+ZtySoeogeRHjlpqTQSsbfCYR90xu3L5Oft1lvTXTzDO4aqiv0YmMB+n7Pmqv5ixMS3cadxjwbmyPOv4DpmIR3OIR5bhQVG/j1bcNdUtQg5whlboeOkCadFcfGg==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM8P190MB0979.EURP190.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(136003)(346002)(396003)(376002)(366004)(39830400003)(44832011)(66574015)(8936002)(53546011)(4326008)(6916009)(7696005)(2906002)(8676002)(9686003)(478600001)(86362001)(6506007)(83380400001)(186003)(64756008)(66476007)(55016002)(71200400001)(33656002)(5660300002)(76116006)(66946007)(66556008)(52536014)(316002)(66446008); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata: WbndlY2MaXMdOJ644SmPNF34qU0Id/jeGewzqGkY4OUCDCdoc3+CDAhrUlZVMIHX6clIewGTuHurCW5BcTItEgQCs/kgbvuepz+QDAvY73/UnpvKezBc6OnIjK4qN4fLPxjLkiqnYQn2PK6cXk84YpO3++4FHhiZjTH38diruiqxoq0INkgS2aRNc1nQUXuHMnaNGIaLDycmcoBwIIY1diuwow1bpwJgBbYevwiHy9bpnEJpfJyPKGm15VAVTFd1ncAxh/kOsrjo4BkGuF13wONKtpuWnjR1gY9ElxXai0c0F5RQ3GYMZS6Pk9+iGcfW+0sYOJOT+ItKFGSDf9+8b4U56lJ6fXr5VYkZe7vDwn0XQ9LE+WAw4Nqfxx+SojmiWXC1Wgq3avbo9DSo5m/7xcTwrwoA2KJ6rtxk4ciQs4rNJvJMTjb88JY5rzH3xFwpAOrXvRvHW6AS+kyAku2NDYfTehm6ETy8mR1z6bz6aBJtX9GZgUgJNUiTSZiwZXv7jOUpPxJ4INMO6h78WtE9GlEJFitDfJuES21HEgbLkGZV4/HIhgxS/quwQFrQtTdmni+ykEePS9YAiddVQ/kpVJxvovmQL9mV6rKt8yRhdE6NMG/DYCFRlKHXzaUau+27/z+eANmX4G3qhUGq7rWOdW345mDQ82GqH6jP5WSEnQlP4zBSvAc1/l+ftSheUJKGdTe9mlvP2Boap0aomfg9/A==
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: iotconsultancy.nl
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: AM8P190MB0979.EURP190.PROD.OUTLOOK.COM
X-MS-Exchange-CrossTenant-Network-Message-Id: 69460107-e37f-4231-a6e1-08d879961039
X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Oct 2020 10:01:09.6636 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 58bbf628-15d2-46bc-820b-863b6774d44b
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: q9jJ8rQDL94s8AYU12N6WdD+ifgQEFGcZFmyJS/h7sSqgvIpZGTRoFCKh8Ff2n5TCRrtdld5A6/47SbtqvVo3aSl7vAVWU3bOOJTvJ/AnR4=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4P190MB0020
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/mC27PgBApIztLnu0W8y3JjL7PJ4>
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: Mon, 26 Oct 2020 10:01:20 -0000

> It the above reading is agreed on, the rule can even be simpler: "If
> anchor was absent originally, it can stay absent". That would catch the
> same cases and some more, not depend on understanding rel, and upset the
> same set of implementations (those based on the 2018 understanding, and
> AFAIK that means it's only mine).

The proposed rule sounds good. It's easier to understand and apply for implementers than what I proposed.
So if the registering client sends its list of relative links without any 'rel' attribute in there nor 'anchor', the RD serves them back to lookup clients as absolute URIs without any 'rel' nor 'anchor' - unmodified statements, except for the change of relative URI to absolute URI.

> The main offender that necessitated the full-anchor-everywhere was my
> 2018 understanding. The change would be to reiterate in Limited Link
> Format that unlike in the Link header, an absent anchor means the
> context is origin-of(resolved-target), and then no further conditions on
> rel need apply.

Yes, agree.  That would be good to clarify/profile.

> So probably it'd be either leave-it-and-say-why-it's-like-that, or going
> even a step further than you are suggesting.

Okay, I'm hoping the outcome would be the one where the 'anchor' attributes are not added by the RD. (Per above text)

> I disagree here -- just because we normatively use 6690 doesn't mean we
> can't profile it and prescribe that a particular serialization needs to
> be used.

Agree that we can make a profile of RFC 6690 and not update it!  (as long as we don't violate any existing 6690 rules).
Sorry if I wasn't fully clear here.  In the case of the current RD draft text, the profile would need to say e.g. "the Limited Link 
Format serialization created by RD-lookup response must include the 'anchor' attribute in each link".
This is needed to clarify why all the examples use the 'anchor' while 6690 doesn't require it. And also to clarify that
RD implementations cannot use the shorter variant without 'anchor' even though 6690 would allow it.

Best regards
Esko

-----Original Message-----
From: Christian Amsüss <christian@amsuess.com> 
Sent: Wednesday, October 21, 2020 16:00
To: Esko Dijk <esko.dijk@iotconsultancy.nl>
Cc: core@ietf.org
Subject: Re: [core] Unnecessary "anchor" attributes in draft-ietf-core-resource-directory-25 ?

Hello Esko,

On Wed, Oct 21, 2020 at 12:59:59PM +0000, Esko Dijk wrote:
> I've swapped two lines in your item [2] plus added some comments for
> clarification

The swapping resolved a refactoring error of mine -- so we are aligned
there.

> Because this may be multi-interpretable, my idea for Limited Link
> Format was to simplify the parsing by splitting into two possible
> cases: 1) implicit rel=hosts without 'anchor' ; and 2) any other link
> with 'anchor'.

It the above reading is agreed on, the rule can even be simpler: "If
anchor was absent originally, it can stay absent". That would catch the
same cases and some more, not depend on understanding rel, and upset the
same set of implementations (those based on the 2018 understanding, and
AFAIK that means it's only mine).

> 1* "anchor" attribute MUST NOT be present for any link without the "rel" attribute   (this implies that this link uses the implicit rel=hosts semantics only)
> 2* "anchor" attribute MUST be present for any link with the "rel" attribute                  (this could be any type of link, possibly using rel="managed-by hosts" or rel="hosts" or rel=hosts )

If we go that route (and at least a brief chair chat earlier today
sounded a bit reluctant), I'd revisit the known implementations. My
expectation is that these restrictions won't even be necessary.

The main offender that necessitated the full-anchor-everywhere was my
2018 understanding. The change would be to reiterate in Limited Link
Format that unlike in the Link header, an absent anchor means the
context is origin-of(resolved-target), and then no further conditions on
rel need apply.

So probably it'd be either leave-it-and-say-why-it's-like-that, or going
even a step further than you are suggesting.

> There is one more consideration for the current RD draft - in case we
> decide to keep the explicit "anchor" attribute in all the examples.
> Because RFC 6690 is a normative reference, the assumption of the
> reader currently should still be that the "anchor" attribute that's
> added in all the example is just superfluous i.e.
>
> * an RD implementation may elide it , following RFC 6690 rules  (in
>   the interpretation as coded at the top of this email.) and Section
>   2.3 of 6690

I disagree here -- just because we normatively use 6690 doesn't mean we
can't profile it and prescribe that a particular serialization needs to
be used.

> * an RD client doing lookups may ignore it, following RFC 6690 rules
> in Section 2.3

... and here: 6690 says that "A consuming implementation can, however,
choose to ignore such links." (and not such attributes). The client woud
just ignore all resource lookup results, and the implementer would thus
need to implement (at least rudimentary) support for the anchor
attribute.

KR, and thanks for all your input
Christian

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