[core] Stateless proxy and Request-Tag

Christian Amsüss <christian@amsuess.com> Thu, 31 October 2019 13:37 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 CA5DC1200F7 for <core@ietfa.amsl.com>; Thu, 31 Oct 2019 06:37:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.499
X-Spam-Level:
X-Spam-Status: No, score=-1.499 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, KHOP_HELO_FCRDNS=0.399, SPF_HELO_NONE=0.001, SPF_NONE=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 Yspb4E6kfMzQ for <core@ietfa.amsl.com>; Thu, 31 Oct 2019 06:37:05 -0700 (PDT)
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 617D6120132 for <core@ietf.org>; Thu, 31 Oct 2019 06:37:04 -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 2DE3646D08; Thu, 31 Oct 2019 14:37:01 +0100 (CET)
Received: from poseidon-mailbox.amsuess.com (hermes.amsuess.com [10.13.13.254]) by poseidon-mailhub.amsuess.com (Postfix) with ESMTP id 28B1C36; Thu, 31 Oct 2019 14:37:00 +0100 (CET)
Received: from hephaistos.amsuess.com (unknown [IPv6:2a02:b18:c13b:8010:6d78:bd47:b07:7e5c]) by poseidon-mailbox.amsuess.com (Postfix) with ESMTPSA id 87CFD17B; Thu, 31 Oct 2019 14:36:59 +0100 (CET)
Received: (nullmailer pid 4560 invoked by uid 1000); Thu, 31 Oct 2019 13:36:56 -0000
Date: Thu, 31 Oct 2019 14:36:56 +0100
From: Christian Amsüss <christian@amsuess.com>
To: Core WG mailing list <core@ietf.org>, Klaus Hartke <hartke@projectcool.de>
Message-ID: <20191031133656.GA17667@hephaistos.amsuess.com>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="MGYHOYXEY6WxJCY8"
Content-Disposition: inline
User-Agent: Mutt/1.12.2 (2019-09-21)
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/9IT5mVcZMYb7M7YAnW11AGEghYI>
Subject: [core] Stateless proxy and Request-Tag
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, 31 Oct 2019 13:37:07 -0000

Hi Klaus and CoRE,

in preparation for an ERT -08 I also revisited the section on stateless
proxies (which we claim to be possible for blockwise transfers by adding
the Request-Tag disambiguator to all block-wise requests).

Whenever there is Block1 involved, things are good -- all request
messages carry a block-wise option, and the proxy adds a Request-Tag.

When there is no Block1 involved and the clien doesn't send early size
negotiation, we get requests without any block options. As we describe
it now, the proxy wouldn't add a Request-Tag (for it'd need to add it on
*all requests* otherwise). The client gets its first block back, and
starts asking for the second one. Only then, the proxy knows it's
blockwise and adds a Request-Tag.

That's fine for operations that are random-access on the server side
(for which Request-Tag wouldn't be needed but the proxy can't tell), but
for non-random-access operations, that incurs the risk of getting a
"Sorry can't server Block2:1 as you didn't reqeust Block2:0 before"
(which is atypical in GET scenarios but likely in POST ones).

There might be trivial recovery in some scenarios where a client sees
that and retries with a Block2:0 ab initio (providing such a retry is
safe to do), but a) that may trigger whichever action twice, b) is two
round-trips later, and c) I don't know whether clients actually behave
that way.

Sending a Request-Tag all the time would be vast overkill. With
Extended-Token-as-an-option we wouldn't need this at all, but as
mentioned yesterday, that boat probably sailed (though I don't remember
the reasons any more).

What to do about that? Don't know right now. Ideas welcome.

KR
c

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