Re: Design: Ignored Unknown Frame Types and Intermediaries

James M Snell <jasnell@gmail.com> Mon, 13 May 2013 21:55 UTC

Return-Path: <ietf-http-wg-request@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 4B00121F9467 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 13 May 2013 14:55:38 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.379
X-Spam-Level:
X-Spam-Status: No, score=-9.379 tagged_above=-999 required=5 tests=[AWL=1.220, BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GOJwB8WNK1kB for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 13 May 2013 14:55:26 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id B256C21F9401 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Mon, 13 May 2013 14:55:26 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1Uc0i1-00018h-DV for ietf-http-wg-dist@listhub.w3.org; Mon, 13 May 2013 21:55:05 +0000
Resent-Date: Mon, 13 May 2013 21:55:05 +0000
Resent-Message-Id: <E1Uc0i1-00018h-DV@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <jasnell@gmail.com>) id 1Uc0hp-0007xl-1K for ietf-http-wg@listhub.w3.org; Mon, 13 May 2013 21:54:53 +0000
Received: from mail-oa0-f52.google.com ([209.85.219.52]) by lisa.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <jasnell@gmail.com>) id 1Uc0ho-0002Z3-Df for ietf-http-wg@w3.org; Mon, 13 May 2013 21:54:53 +0000
Received: by mail-oa0-f52.google.com with SMTP id h1so8061248oag.39 for <ietf-http-wg@w3.org>; Mon, 13 May 2013 14:54:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=2KGTRcXKVFWVP3yIMgpQqjIaftPzIYSZZAFxk/SUkjY=; b=WDk7iZnO31C+9Ne9777PBMDxZZBs7TRPFmTKuF0uqAP5hs0gUEQhMopLij7HBj1/if hT6kOKn2l+qNekbgxB7jGvXlwXGnmL+3WjtzFaVounHmAUb3OBEW5Y2YxEfxk+D4dPiH 9oKedo9PVYLcn5CrsqmaEi91hoQ+8FwyikE8BtTq2gSjbLsCKjpEDhjgIRZxqdNBjTu8 FWbmMrNptU97t2gAd0bax1netkGjIJdm1U9vN9te/Qa2j41rEJW0gvm3WpzRWPuhOk6Z fNb0z9Ehb/8Gjs6ygNDOUNXPFXuKLs3mKn0uMN2sahA7t45mp/Wi4vfJCDir68mZdg4I 4Yqg==
X-Received: by 10.60.141.226 with SMTP id rr2mr14321713oeb.35.1368482066498; Mon, 13 May 2013 14:54:26 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.60.3.137 with HTTP; Mon, 13 May 2013 14:54:06 -0700 (PDT)
In-Reply-To: <CABkgnnXJRHu_LsD+Fq9dTNi9Sqfmj0GQMBGO9QzZy6DCfxSJAQ@mail.gmail.com>
References: <CABP7Rbfko48A0yAceDeHfQKR7S6aW7AAAqCZroaZzTScTooOvw@mail.gmail.com> <09C78900-966B-46B0-AB97-1394FD05849A@checkpoint.com> <CAP+FsNe2L2aZbDhM4OiWmh7b7f0HkrVfGwa6aKkD2ohNNKJHxg@mail.gmail.com> <2124BAB0-8FF1-4D6D-BBD8-F042B1EA5F7B@checkpoint.com> <CABP7Rbf+H=WarqFaV0UM5On-3FkYAspkC4OBzh1HE6EpQow94w@mail.gmail.com> <CAP+FsNd3260xnQG8JU3UQkkSwaVhVgwkDPPcR02W_W0q12+HFw@mail.gmail.com> <CABkgnnXJRHu_LsD+Fq9dTNi9Sqfmj0GQMBGO9QzZy6DCfxSJAQ@mail.gmail.com>
From: James M Snell <jasnell@gmail.com>
Date: Mon, 13 May 2013 14:54:06 -0700
Message-ID: <CABP7Rbe13pdecnagp39a6fEuC0g-VqyxPqebZJwghGGD8Rxi5w@mail.gmail.com>
To: Martin Thomson <martin.thomson@gmail.com>
Cc: Roberto Peon <grmocg@gmail.com>, Yoav Nir <ynir@checkpoint.com>, "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Content-Type: text/plain; charset=UTF-8
Received-SPF: pass client-ip=209.85.219.52; envelope-from=jasnell@gmail.com; helo=mail-oa0-f52.google.com
X-W3C-Hub-Spam-Status: No, score=-3.5
X-W3C-Hub-Spam-Report: AWL=-2.693, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001
X-W3C-Scan-Sig: lisa.w3.org 1Uc0ho-0002Z3-Df be2555b905dafc309bd2f9d01aede788
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Design: Ignored Unknown Frame Types and Intermediaries
Archived-At: <http://www.w3.org/mid/CABP7Rbe13pdecnagp39a6fEuC0g-VqyxPqebZJwghGGD8Rxi5w@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/17979
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

On Mon, May 13, 2013 at 2:13 PM, Martin Thomson
<martin.thomson@gmail.com> wrote:
> On 13 May 2013 11:37, Roberto Peon <grmocg@gmail.com> wrote:
>> James:
>> Can you construct a case where, if you follow the rule spelled out in my
>> earlier email, you fail to achieve interop (because I can't)?
>
> It's trivially possible to construct a scenario where this happens,
> but only if you don't write down a "MUST ignore" rule.  Once the rule
> is in place, then you are constraining future extensibility.  A "MUST
> ignore" rule is the easiest rule to get right, but there are other
> models you can use.
>
>> The rule is, essentially:
>> If a party to the communication ignores (or removes) something it don't
>> understand, that must not screw up the session.
>
> The ignore/remove distinction is very important.  You can't
> selectively remove; it's all or nothing.  Either remove everything you
> don't know about or leave it all in.
>
> This consideration, along with James' hop-by-hop question does suggest
> a relatively simple way out:
>
> All unsupported/unknown frames that have a non-zero stream identifier
> MUST be ignored.  If a stream is forwarded by an intermediary, all
> unsupported/unknown frames MUST either be forwarded or removed; an
> intermediary MUST NOT selectively forward unsupported frame types.
> Unsupported/unknown frames with a zero stream identifier MUST be
> ignored and MUST NOT be forwarded.
>

I would go one step further and say that if an intermediary does not
wish to forward an unknown frame, it MUST NOT forward ANY additional
frames and ought to respond with an RST_STREAM. Removing only some
frames from the stream could cause significant data corruption or data
loss, especially if you don't know why those frames are there.

>> That implies that, when you add anything that must be interpreted, it then
>> must be declared in the version string (i.e. new version) and thus agreed
>> upon by both parties up front, and if you don't negotiate that other
>> version, you don't get to add frames whose removal would screw up the
>> session.
>
> Yeah, we addressed that early on.  If you want to guarantee that the
> other guy is going to support something, either work out how to agree
> in-session (with those ignored frames) or negotiate a new protocol.

Agreeing without prior coordination (must ignore or reject the stream)
is, in my opinion, the best approach for long term evolution and
growth. The "come up with a new version string" reminds me far too
much of things like XML namespaces. It's one of those things that
sounds like it ought to work in theory but when it gets down to real
world implementation, it ends up being a bigger mess than anticipated.

- James