Re: [core] Questions on draft-ietf-core-resource-directory-12

peter van der Stok <stokcons@xs4all.nl> Mon, 16 April 2018 07:46 UTC

Return-Path: <stokcons@xs4all.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 7545512D886; Mon, 16 Apr 2018 00:46:41 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.601
X-Spam-Level:
X-Spam-Status: No, score=-2.601 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, 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 k3y77LMtKm0q; Mon, 16 Apr 2018 00:46:37 -0700 (PDT)
Received: from lb1-smtp-cloud7.xs4all.net (lb1-smtp-cloud7.xs4all.net [194.109.24.24]) (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 F2132126BF0; Mon, 16 Apr 2018 00:46:30 -0700 (PDT)
Received: from webmail.xs4all.nl ([IPv6:2001:888:0:22:194:109:20:211]) by smtp-cloud7.xs4all.net with ESMTPA id 7yqJfEbfL8U077yqJfCvcx; Mon, 16 Apr 2018 09:46:29 +0200
Received: from 2001:983:a264:1:a97d:6638:fb5:6cad by webmail.xs4all.nl with HTTP (HTTP/1.1 POST); Mon, 16 Apr 2018 09:46:27 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset="US-ASCII"; format="flowed"
Content-Transfer-Encoding: 7bit
Date: Mon, 16 Apr 2018 09:46:27 +0200
From: peter van der Stok <stokcons@xs4all.nl>
To: Christian Amsüss <christian@amsuess.com>
Cc: consultancy@vanderstok.org, Jim Schaad <ietf@augustcellars.com>, draft-ietf-core-resource-directory@ietf.org, 'core' <core@ietf.org>
Organization: vanderstok consultancy
Reply-To: consultancy@vanderstok.org
Mail-Reply-To: consultancy@vanderstok.org
In-Reply-To: <20180413182947.GE18031@hephaistos.amsuess.com>
References: <053601d3c9e8$84da96f0$8e8fc4d0$@augustcellars.com> <7be5aeccaf53c373bcc999136dfec5cb@xs4all.nl> <06f101d3cc2d$8d3287d0$a7979770$@augustcellars.com> <0ef32a74d6b492e4e8e8fd4c917467c5@xs4all.nl> <20180413182947.GE18031@hephaistos.amsuess.com>
Message-ID: <7b887b22f034883c48b8a46c9c199ea3@xs4all.nl>
X-Sender: stokcons@xs4all.nl
User-Agent: XS4ALL Webmail
X-CMAE-Envelope: MS4wfKcU1dwrc9HQWW36F1lGZxK7xtar7rzbj/97PEN+ZJDfIJaZbEUSot7S7L9PglKrE2VezRFBsQcIO2h1EGJilQ7kevjBfRWV9e+vXGHB6XvxFdoMbx0f Y4bxMVGTwfQEkaQ4kzAcsTRczUgiS3fCL/mFK7YBZkJEArCA3kI6k+TN/bRY7GLrbJlcqLHMCSv//cMQri5Fl59ssDK3rMlDGVImsBQCfFuvxJBRuXafq+gL mvtJO7xVXBRdaUvUrDCKOVlHg5ZJYgprntPYMhnzhK9O25WWG/stjtl3X7KAnMtI
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/9OXurOH4eVlsAybwyGCHdk-S8b0>
Subject: Re: [core] Questions on draft-ietf-core-resource-directory-12
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.22
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, 16 Apr 2018 07:46:44 -0000

> 
>> > POST /rd?ep=node1
>> >    - payload contains the set of resources the register.
>> >    - returns a location of /rd/yyyy
>> >
>> > POST /rd/yyyy?ep=node1
>> >    - payload is empty.
>> >
>> > In the first post, the rd will infer a context based on how the
>> > registration is done.  The second post just says that the TTL value
>> > is to be refreshed back to the life-time value.  However, the
>> > inferred context could also be changed.
>> 
>> Thanks for the example; it would take me long to figure this out 
>> otherwise.
>> 
>> Reading the update specification, the ep=node1 is illegal in the 
>> update.
>> Specifying ep means creating a new registration.
> 
> ep=node1 would be ...well not technically illegal (the template would
> put the ep in extra-attrs, and the server hopefully not store it 
> there);
> it is an attribute that is not changing and therefore SHOULD NOT be
> included in the update by the client.

I do not follow.
Registration template:
EP->RD
POST
URI template {+rd}{?ep,d,lt,con,extra-attrs*}

Update template
EP->RD
POST
URI template {+rd}{?lt,con,extra-attrs*}

What distinguishes Update from registration? => the presence of ?ep,d
saying that extra-attrs* can include ep makes life really difficult IMO.

sending a POST to /rd/123 can create a new registration at /rd/123/567, 
according to me, we did not distinguish resources as registration 
resource or general rd resource.

Am I missing something?

> 
> A changed ep would not create a new registration (we're at a
> registration resource already), but simply be refused.
> 
>> sending the update
>> POST /rd/yyy will update the lt value.
>> It is allowed to change the value of con in the update POST 
>> specification.
>> The question is:
>> When an updating ep, different from the registering one, sends the 
>> update of
>> lt, does the context change to the hosts relation value of the 
>> updating ep.
>> 
>> My gut reaction is no. it does not change the context value in the RD
>> because that needs an explicit ?con= in the update specification.
>> 
>> A warning in the RD text to this effect looks reasonable.
> 
> The text is already pretty explicit:
> 
>     "If the parameter is set in an update, it is stored by the RD as 
> the
>     new Base URI under which to interpret the links of the 
> registration,
>     following the same restrictions as in the registration.  If the
>     parameter is not set and was set explicitly before, the previous
>     context value is kept unmodified.  If the parameter is not set and
>     was not set explicitly before either, the source address and source
>     port of the update request are stored as the context."

Do we understand that the hosts relation does not set the parameter?

> 
> This allows for clients that do not keep a good eye on their addresses
> but have their OS pick the latest one.
> 
> Note that nobody other than the endpoint (or CT if created by one) may
> manipulate a registration resource.

but difficult to check or enforce. the registration has no memory of the 
registering ep.

> 
> (If we wanted to allow other hosts to manipulate a different endpoint's
> registration, we'd need something like a ?ct=keep or change in 
> semantics
> to allow that -- but I'd like to have a good reason to do that in the
> first place).
> 
>