Re: [Lwip] [core] Proxies and observations: "All options MUST be identical"

Klaus Hartke <hartke@projectcool.de> Mon, 13 November 2017 17:24 UTC

Return-Path: <hartke@projectcool.de>
X-Original-To: lwip@ietfa.amsl.com
Delivered-To: lwip@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 4D2E9128B91; Mon, 13 Nov 2017 09:24:46 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.399
X-Spam-Level:
X-Spam-Status: No, score=-1.399 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_SORBS_SPAM=0.5, SPF_FAIL=0.001] 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 dq1-yr-eYMR1; Mon, 13 Nov 2017 09:24:44 -0800 (PST)
Received: from wp382.webpack.hosteurope.de (wp382.webpack.hosteurope.de [IPv6:2a01:488:42:1000:50ed:8597::]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A6C331286B2; Mon, 13 Nov 2017 09:24:43 -0800 (PST)
Received: from mail-lf0-f51.google.com ([209.85.215.51]); authenticated by wp382.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) id 1eEITQ-0000Ra-At; Mon, 13 Nov 2017 18:24:40 +0100
Received: by mail-lf0-f51.google.com with SMTP id 73so4898261lfu.10; Mon, 13 Nov 2017 09:24:40 -0800 (PST)
X-Gm-Message-State: AJaThX4GKMr+hmgFeaSJ32fmbpLRs4I7jEn4LIu+y/pE4RvSzUyMV4P6 EX7QvK+zWIug+4MNEk9nDm8qLu2XjilPorwTboE=
X-Google-Smtp-Source: AGs4zMYC9GlBq1+7Q6k+SL5bUz281GOjlR//lwmJ43lNS1JmAZMKoPVkWwQqIEGl7o6HW6ly63xH5jlcaddRBFWOdXg=
X-Received: by 10.46.77.10 with SMTP id a10mr2527111ljb.180.1510593879861; Mon, 13 Nov 2017 09:24:39 -0800 (PST)
MIME-Version: 1.0
Received: by 10.25.79.21 with HTTP; Mon, 13 Nov 2017 09:23:59 -0800 (PST)
In-Reply-To: <20171113165421.d23nmwklwjfwxaem@hephaistos.amsuess.com>
References: <20171113165421.d23nmwklwjfwxaem@hephaistos.amsuess.com>
From: Klaus Hartke <hartke@projectcool.de>
Date: Mon, 13 Nov 2017 18:23:59 +0100
X-Gmail-Original-Message-ID: <CAAzbHvaNvodqVfu+cD3K2JijSn=4nQB2mZRnRSV81bq+r0AFsw@mail.gmail.com>
Message-ID: <CAAzbHvaNvodqVfu+cD3K2JijSn=4nQB2mZRnRSV81bq+r0AFsw@mail.gmail.com>
To: Christian Amsüss <c.amsuess@energyharvesting.at>
Cc: "core@ietf.org WG" <core@ietf.org>, lwip@ietf.org
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-bounce-key: webpack.hosteurope.de; hartke@projectcool.de; 1510593884; a4ef9ac5;
X-HE-SMSGID: 1eEITQ-0000Ra-At
Archived-At: <https://mailarchive.ietf.org/arch/msg/lwip/2Ez3MDi1UkEpr4WZYvqcnejbjJY>
Subject: Re: [Lwip] [core] Proxies and observations: "All options MUST be identical"
X-BeenThere: lwip@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Lightweight IP stack <lwip.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/lwip>, <mailto:lwip-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/lwip/>
List-Post: <mailto:lwip@ietf.org>
List-Help: <mailto:lwip-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/lwip>, <mailto:lwip-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 13 Nov 2017 17:24:46 -0000

Christian Amsüss wrote:
> This is something that servers, especially proxies, should not try to
> enforce, because every case of a request with differing options (or
> FETCH payload) could just as well be a new observation from the client
> on the token whose observation cancellation got lost, or the client
> simply rebooted.

If it's a new observation, then the client should not use a token that
is still in use. RFC 7252 Section 5.3.1:

   The client SHOULD generate tokens in such a way that tokens currently
   in use for a given source/destination endpoint pair are unique.

This requirement is slightly relaxed when a client wants to
re-register its interest in a resource, but only under narrow
circumstances: namely that the request is (almost) identical.

This is a requirement for clients, however.

In case a server (or proxy in the role of a server) receives an
observation request with a token that is still in use, it must kill
the existing observation. RFC 7641 Section 4.1:

   The entry in the list of observers is keyed by the client endpoint
   and the token specified by the client in the request.  If an entry
   with a matching endpoint/token pair is already present in the list
   (which, for example, happens when the client wishes to reinforce its
   interest in a resource), the server MUST NOT add a new entry but MUST
   replace or update the existing one.

So the server already doesn't enforce the client requirement.

Klaus