Re: [core] Questions and comments against the github version

Christian M. Amsüss <christian@amsuess.com> Sun, 16 December 2018 13:33 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 36F4A126CB6; Sun, 16 Dec 2018 05:33:43 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.921
X-Spam-Level:
X-Spam-Status: No, score=-0.921 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FROM_EXCESS_BASE64=0.979] autolearn=no 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 Pcnf7m-UOvxm; Sun, 16 Dec 2018 05:33:40 -0800 (PST)
Received: from prometheus.amsuess.com (alt.prometheus.amsuess.com [IPv6:2a01:4f8:190:3064::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 917F5124D68; Sun, 16 Dec 2018 05:33:39 -0800 (PST)
Received: from poseidon-mailhub.amsuess.com (095129206250.cust.akis.net [95.129.206.250]) by prometheus.amsuess.com (Postfix) with ESMTPS id 5C68342500; Sun, 16 Dec 2018 14:33:33 +0100 (CET)
Received: from poseidon-mailbox.amsuess.com (unknown [IPv6:2a02:b18:c13b:8010:a800:ff:fede:b1bf]) by poseidon-mailhub.amsuess.com (Postfix) with ESMTP id 578E94D; Sun, 16 Dec 2018 14:33:31 +0100 (CET)
Received: from hephaistos.amsuess.com (hephaistos.amsuess.com [IPv6:2a02:b18:c13b:8010::71b]) by poseidon-mailbox.amsuess.com (Postfix) with ESMTPSA id E81D934A; Sun, 16 Dec 2018 14:33:30 +0100 (CET)
Received: (nullmailer pid 19481 invoked by uid 1000); Sun, 16 Dec 2018 13:33:30 -0000
Date: Sun, 16 Dec 2018 14:33:30 +0100
From: "Christian M. Amsüss" <christian@amsuess.com>
To: Jim Schaad <ietf@augustcellars.com>
Cc: draft-ietf-core-resource-directory@ietf.org, core@ietf.org
Message-ID: <20181216133329.GE22665@hephaistos.amsuess.com>
References: <02dd01d490f8$6aea0dc0$40be2940$@augustcellars.com>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="wchHw8dVAp53YPj8"
Content-Disposition: inline
In-Reply-To: <02dd01d490f8$6aea0dc0$40be2940$@augustcellars.com>
User-Agent: Mutt/1.10.1 (2018-07-13)
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/7ZHgnxVhHQViV42Xm5ExXuHfRF0>
Subject: Re: [core] Questions and comments against the github version
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: Sun, 16 Dec 2018 13:33:44 -0000

Hello Jim, Peter,

(trying to wrap up all the comments that have been exchanged here)

On Mon, Dec 10, 2018 at 06:22:48PM -0800, Jim Schaad wrote:
> *  In section 5.3, I don't understand why the rule exists that if the
> attribute values are different then the location of the registration needs
> to be changed.   It seems that this could lead to some interesting conflicts
> in behavior depending on what messages are used.

Frankly, I don't understand why those rules need to be here in the first
place -- from my PoV the only thing that matters is CoAP idempotency
(ie. identical messages that arrive with no other related operations
inbetween have the same result).

Peter, any concrete ideas on how to clean them up -- preferably in a way
that they don't speak of "updates"?

(My alternative would be: "The following rules" and their items, and
state that "Any Registration that has the same endpoint name and sector
('ep' and 'd' values) as a previously active one implicitly deletes that
registration." -- the idempotency rule stays intact and allows some
optimizations in terms of retransmission, but for everything else
everyone pretty please use the Location returned, whatever that is.)

> *  In Section 5.3 - What is the correct behavior if the RD is configured to
> recognize an endpoint, but the endpoint supplies a different name?  Is this
> an error or does one of them override?

4.01 Unauthorized. Were the credentials valid for any other ep, the
server could not "recognize" the endpoint; thus it follows that the
credentials are not good enough to create a registration with the given
ep value.

> * In section 5.3.1 - I assume it would be an error to include the base
> attribute - perhaps this should be explicit?

(pvds):
> The text says: "the base attribute is not accepted to keep the
> registration interface simple"
> Looks sufficient to me.

Agreed. I'd expect 4.00 Bad Request, but whoever sends that is already
in violation of the interface.

> * In section 5.3.1 - When doing simple registration, I do not believe that
> it should be a requirement that the result MUST be returned prior to doing
> the query.

See https://github.com/core-wg/resource-directory/issues/186

> * In section 5.3.1 - A valid response code might be 4.XX - method not
> supported if this functionality is disabled.  I am not sure what the "or is
> empty" means for the 4.04 response code.  Which one is empty, the RD or the
> EP? 

The 4.04 is an error here IMO that has been reitrated time and again in
the context of link format lookups (an empty list of links is distinct
from an absent list!); fixed.

> * In section 5.3.1 - Is the RD responsible for dealing with resource-link
> items which would not make sense by doing full resolutions on everything or
> re-writing them?

(pvds)
> For me a difficult question. "making sense" is very context/application dependent.
> The less the RD decides about validity of link contents, the better I feel.

It is generally demanded of the base URI that it "MUST be suitable as a
base URI to resolve any relative references given in the registration".
For regular registration that's explicit in the base parameter
description, for simple that follows from the registrant needing to
provide RFC6690 discovery (which doesn't work if links can't be
resolved).

If URIs make no sense, then that's the registrant's fault, and I don't
see how the RD could tell whether they do.

If the URIs can't be resolved (though I'm not sure the 3986 process
defines any error condition at all), then I'd treat that as equivalent
to any other syntax error in the submitted links (and either silently
fail or return Bad Request depending on what comes out of the above on
when the response is sent.)

> * In section 5.4.1 - s/lt,con/lt,base/

Thanks, fixed.

> * In section 5.4.1 - Description of 4.04 failure - I think this should be
> 'may have been garbage collected' as I believe from previous text that one
> should be able to refresh an expired registration.

Should say "may have been removed (explicitly or after its
expiration)"; that removal could have been explicit or as a concequence
of an overly long expiration. Fixed.

> * In section 6.4 - The example is missing the rt="core.rd-ep" attribute.  It
> appears to be required from the second paragraph.

Thanks, fixed (also on other locations).

> * In section 6.4 - Can you give an example of a "Links to endpoints"?  The
> only one that I can think of is 'base'.
> 
> * General - Should there be a value for lt which means infinite?

I think there should at least be a value for "as long as this TCP or
WebSocket connection is open" -- which primarily makes sense with an
additional "and please build a base name for me and act as a forward
proxy" parameter. Both can be covered using extensions.

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