[core] Observe updates, and call for proxy implementations (picking from 'Sketch of "Keep it simple"' thread)

Christian Amsüss <christian@amsuess.com> Thu, 21 March 2019 08:47 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 E30A81311AD for <core@ietfa.amsl.com>; Thu, 21 Mar 2019 01:47:16 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, URIBL_BLOCKED=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 XNyWnh3cQ6n9 for <core@ietfa.amsl.com>; Thu, 21 Mar 2019 01:47:13 -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 2D17B1310E8 for <core@ietf.org>; Thu, 21 Mar 2019 01:47:13 -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 DF33841923 for <core@ietf.org>; Thu, 21 Mar 2019 09:47:09 +0100 (CET)
Received: from poseidon-mailbox.amsuess.com (hermes.amsuess.com [10.13.13.254]) by poseidon-mailhub.amsuess.com (Postfix) with ESMTP id 8788136 for <core@ietf.org>; Thu, 21 Mar 2019 09:47:08 +0100 (CET)
Received: from hephaistos.amsuess.com (unknown [IPv6:2a02:b18:c13b:8010:9568:5ff3:9971:c700]) by poseidon-mailbox.amsuess.com (Postfix) with ESMTPSA id 474F717B for <core@ietf.org>; Thu, 21 Mar 2019 09:47:08 +0100 (CET)
Received: (nullmailer pid 15352 invoked by uid 1000); Thu, 21 Mar 2019 08:47:08 -0000
Date: Thu, 21 Mar 2019 09:47:08 +0100
From: Christian Amsüss <christian@amsuess.com>
To: core WG <core@ietf.org>
Message-ID: <20190321084706.GA17128@hephaistos.amsuess.com>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="LQksG6bCIzRHxTLp"
Content-Disposition: inline
User-Agent: Mutt/1.10.1 (2018-07-13)
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/uF7L1QCwrTWxxQVyUFp2PLgMD2A>
Subject: [core] Observe updates, and call for proxy implementations (picking from 'Sketch of "Keep it simple"' thread)
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: Thu, 21 Mar 2019 08:47:25 -0000

Hello CoRE,

during IETF104, I'd like to discuss the possibility of small changes to
obsevation, which would mean an update to RFC7641.

Topics that have accumulated:

* Block1 and Observe.

  RFC8132 introduces the FETCH method which allows both observation and
  having a Block1'd request payload, but does not state those's
  interactions.

  AFAIR we've worked out how they'd work in practice on this list
  (roughly "as long as 2.31 is returned, the server won't accept the
  observation, but will on the last Block1"), but that should be written
  down at some point.

  That might be an opportunity to formally allow observation for all
  operations, provided I assume correctly that limiting Block1
  interaction was an important reason to not have POST+Observe.

  OSCORE worked around this by switching to FETCH for observations.

* Pinning of response content formats.

  The restriction that notifications need to carry the same
  Content-Format hinders the use of the Accept-Any variety of content
  negotiation in pubsub. (See proposal and impact ananlys^Wthoughts in
  quoted part below from the other thread).

  To me that restriction looks pretty arbitrary (though I see why it
  sounded good at the outset); I'm looking forward to discussion on its
  backgrounds.

* Pinning of all request options except ETag.

  This is a similar case as the pinning of response content formats.

  OSCORE worked its way around this by claiming that the inner options
  are the relevant ones, even though a proxy would have a hard time to
  know that. ("For OSCORE messages, this matching is to be done to the
  options in the decrypted message"). It was argued that a proxy can't
  really "be mad at" the client for doing it, for the client may simply
  have forgotten that the old observation was there, and is just
  requesting a new one with a most innocent look on its face.


My impression is that this can be a light update, especially if the
Block1/Observe part stays in there as "From the previous documents, it
(kind of implicitly but we better spell it out here) follows that".

That discussion would profit a lot from knowning which proxies are out
there and how they behave with respect to the open points; I'll start:

* aiocoap: The proxy implementation shipped with the library is lenient
  w/rt pinning. Block1+Observe is implemented as above (but not covered
  by the test suite yet).

Best regards
Christian


Proposal from [1]:
> Update to RFC7641
> =================
> 
> The requirement that subsequent notifications carry the same
> Content-Format option as the original response is lifted.
> 
> Impact
> ------
> 
> Changes to the returned media type can either happen when
> 
> * Accept-Any-Of was sent in the request -- in which case both server and
>   client know the updated rules, or
> * no Accept header was sent -- in which case the server whose
>   representation changes to require a new content format has no clear
>   way of indicating that under RFC7641 (ending with 4.06 Not Acceptable
>   would be close but isn't the expected response to a repeated request);
>   if the server changes the content format in a notification to an
>   unaware client, the client would catch it as a bad response (probably
>   similar to a response with a Content-Format not matching the sent
>   Accept). The client might consider the observation over while the
>   server does not, and will terminate the observation with a RST on the
>   next notification (or close the connection in TCP).
> 
> Impact on proxies: A proxy that enforces the previous rule on
> Content-Format staying constant would close observations (probably with
> something like 5.02 Bad Gateway), and the client would need to
> re-establish. No proxy implementations are known that implement that
> behavior. [ But I know only one so this would definitely need to be
> confirmed on the mailing list ].
> 
> [ I don't think that this has any actual interactions with the caching
> model, as the caching considerations are independent of the content
> format. ]

[1]: https://mailarchive.ietf.org/arch/msg/core/81SjKzfMJtSx6x8sc2P_RNq-M30

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