Re: [core] draft-ietf-core-echo-request-tag -14 and Block2

Carsten Bormann <cabo@tzi.org> Mon, 20 December 2021 17:39 UTC

Return-Path: <cabo@tzi.org>
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 976AB3A1120 for <core@ietfa.amsl.com>; Mon, 20 Dec 2021 09:39:32 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, 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 Akh_x0BzpK_J for <core@ietfa.amsl.com>; Mon, 20 Dec 2021 09:39:27 -0800 (PST)
Received: from gabriel-smtp.zfn.uni-bremen.de (gabriel-smtp.zfn.uni-bremen.de [134.102.50.15]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 265E43A1123 for <core@ietf.org>; Mon, 20 Dec 2021 09:39:22 -0800 (PST)
Received: from [192.168.217.118] (p5089a436.dip0.t-ipconnect.de [80.137.164.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-smtp.zfn.uni-bremen.de (Postfix) with ESMTPSA id 4JHmzq4XSVzDCvC; Mon, 20 Dec 2021 18:39:19 +0100 (CET)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <269201d7f5be$c94dcef0$5be96cd0$@jpshallow.com>
Date: Mon, 20 Dec 2021 18:39:19 +0100
Cc: core@ietf.org
X-Mao-Original-Outgoing-Id: 661714759.151062-4c721ab288ae8f7f815c0d3d8f9fc8f4
Content-Transfer-Encoding: quoted-printable
Message-Id: <8E42CD49-27E0-4537-9E09-19469EDCADB7@tzi.org>
References: <269201d7f5be$c94dcef0$5be96cd0$@jpshallow.com>
To: supjps-ietf@jpshallow.com
X-Mailer: Apple Mail (2.3608.120.23.2.7)
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/P0NB_Trjcg-DfLDAr9lj6GgZkwo>
Subject: Re: [core] draft-ietf-core-echo-request-tag -14 and Block2
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: Mon, 20 Dec 2021 17:39:33 -0000

Hi Jon,

thank you for bringing this up.

> On 2021-12-20, at 17:29, supjps-ietf@jpshallow.com wrote:
> 
> Hi there,
>  
> I have run into an issue where multiple CoAP requests (not needing Block1) to the same resource trigger potentially different responses that require the use of Block2. If the responses overlap, then there is confusion as to how to pull back the correct response to match the request.  For example (grossly simplifying things)
> POST /api/<service>/read   payload = { 'offset': 0, 'count': 1200 }
> POST /api/<service>/read   payload = { 'offset': 2000, 'count': 1300 }
> Or
> FETCH /api/<service>/read   payload = { 'offset': 0, 'count': 1200 }
> FETCH /api/<service>/read   payload = { 'offset': 2000, 'count': 1300 }
>  
> RFC7959 2.4 rightly states
>    The Block2 Option provides no way for a single endpoint to perform
>    multiple concurrently proceeding block-wise response payload transfer
>    (e.g., GET) operations to the same resource.  This is rarely a
>    requirement, but as a workaround, a client may vary the cache key
>    (e.g., by using one of several URIs accessing resources with the same
>    semantics, or by varying a proxy-safe elective option).

… and note that Request-Tag says:


3.2.1.  Request-Tag Option Format

   The Request-Tag option is not critical, is safe to forward,
   repeatable, and part of the cache key, see Figure 4, which extends
   Table 4 of [RFC7252]).

(No idea why “elective” is spelled “not critical”, but the point is that the option can be used to distinguish multiple ongoing sequences of requests, as is spelled out at the end of 3.2:

   In essence, it is an implementation of the "proxy-safe elective
   option" used just to "vary the cache key" as suggested in [RFC7959]
   Section 2.4.

)

> Which then brings in the possible use of Request-Tag option in the request as a proxy-safe elective option. However.
> draft-ietf-core-echo-request-tag -14 3.2 states
>    The Request-Tag option is only used in requests that
>    carry the Block1 option, and in Block2 requests following these.

This is indeed weird, in particular since 3.2.1 then has the correct sentence:

   The Request-Tag option is only used in the request messages of block-
   wise operations.
 
> Which implies that the examples above need to contain the Block1 option in the first instance if there is any suspicion that Block2 is needed in the response.
>  
> Then draft-ietf-core-echo-request-tag -14 3.4 states
>    Note that Request-Tag options can be present in request messages that
>    carry no Block option (for example, because a Request-Tag unaware
>    proxy reassembled them), and MUST be ignored in those.
>  
> Apart from being hard to parse (what does “those” refer to?),

“Those” = “request messages that carry no Block Option”.

> this tells me that Servers MUST ignore requests that have no Block option

No, that is definitely not what it says — it says the *option* is ignored in non-Block requests, not the entire request, and the context makes clear that what is meant is that the recipient MUST NOT throw an error just because the option is there.
The wording “MUST be ignored” is unfortunate, because they are still part of the cache key.

> – so, I cannot just add the Request-tag option to a request on the off-chance there may be a Block2 needed response.

You can (at least that is the intent).

The “Changes” have this snippet:

      -  Lift ban on Request-Tag options without Block1 (as they can
         legitimately be generated by an unaware proxy)

…which is confusing to me, but also see

https://www.ietf.org/rfcdiff?url2=draft-ietf-core-echo-request-tag-09.txt
 
> Is there a good reason for this MUST?

Your different reading demonstrates that we need to align the phrasing better with the intent.

This can be done in AUTH48, if the AD agrees.

Grüße, Carsten