Re: [Cbor] RFC7049bis processing of unknown tags

Jeffrey Yasskin <jyasskin@chromium.org> Fri, 08 May 2020 02:39 UTC

Return-Path: <jyasskin@google.com>
X-Original-To: cbor@ietfa.amsl.com
Delivered-To: cbor@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 28C413A0E92 for <cbor@ietfa.amsl.com>; Thu, 7 May 2020 19:39:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.25
X-Spam-Level:
X-Spam-Status: No, score=-9.25 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_SPF_WL=-7.5] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=chromium.org
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 p8cJbnJi7BHL for <cbor@ietfa.amsl.com>; Thu, 7 May 2020 19:39:01 -0700 (PDT)
Received: from mail-qt1-x832.google.com (mail-qt1-x832.google.com [IPv6:2607:f8b0:4864:20::832]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 233453A00D5 for <cbor@ietf.org>; Thu, 7 May 2020 19:39:00 -0700 (PDT)
Received: by mail-qt1-x832.google.com with SMTP id x12so145638qts.9 for <cbor@ietf.org>; Thu, 07 May 2020 19:39:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kv1U7chXmW++S6d2JM9raQQ7v1ZZ45q7DesJXrjQ/ME=; b=SN0l1ZKoX4oneti2DSUwyQc22qOWkB2i9hRClGhkHTKyIKCNcMV8ZdTjOwxRBhzonG qECBVwULo3iUlgHYaINBeI0TaRsDiG3kwZo7bFGUZ3Piac2T/WkDnsD0Y3s4mHMg6AXK 55G0BtJ37PhgKK28EisASfR/MKYq2GI/eYHBs=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kv1U7chXmW++S6d2JM9raQQ7v1ZZ45q7DesJXrjQ/ME=; b=k7WDu8C0XYClrmc5GSulrHQmgDYzFnsXhmBVpwPh83WlTKxeTTxLLKUeP8aDBCOTkL t9NbG8vDWwPbgvvRPWrpZZmWC9uREIa4f5LduJM/fT/oq7a1MP+sa3XbuAIztqbWNv/z 0yZTauEZxt+iSL42tzWDMAj84FsB5mQ+A9Ip0vgxlSUXT0NGVEASu7OKYawr9ngY8M2A otsmCEKmNx8rBcFoWYQ5IleiaTSYAg9KZVJabXsOe4J8AWB1Enck2Gm34PXj0q9kFYbn e37rK4HyCXbKnn2Ao8jTizpzDKKWfInLWDIB1iAUQGM6sLwlhRyknkdlzdPOry7Vkrxw Rn2w==
X-Gm-Message-State: AGi0PuZbwYn3nnpeTJZ0zqDYRw7MDqDpiQMYU2740A+vHy8IEFTgKrPU xt1kJ4N+Rx0aNTzZ/jLKXFb9tzg3LUW9LaGXns1eHw==
X-Google-Smtp-Source: APiQypLg94tSmkGPbBOIFRYRc6IEa4RfFfYiHKqPSukB9zQeemWz/NKBv2s63QYyqw3tFok0YrBJ15F7FRdEhlwlCds=
X-Received: by 2002:ac8:33ec:: with SMTP id d41mr599462qtb.382.1588905539539; Thu, 07 May 2020 19:38:59 -0700 (PDT)
MIME-Version: 1.0
References: <17300.1588779159@localhost> <38BB6FFF-737F-4C11-AD7A-DA3F28A9F570@tzi.org> <CANh-dXkdjMyO=WFUxrF06OfP+RE9v11unKJXL8P3UtEe+prV1w@mail.gmail.com> <13690.1588894939@localhost>
In-Reply-To: <13690.1588894939@localhost>
From: Jeffrey Yasskin <jyasskin@chromium.org>
Date: Thu, 07 May 2020 19:38:47 -0700
Message-ID: <CANh-dXmjD=RCwh7ExjSvFx+5ciew+eqHoVS88OommQ2xVnX5=Q@mail.gmail.com>
To: Michael Richardson <mcr+ietf@sandelman.ca>
Cc: cbor@ietf.org, Carsten Bormann <cabo@tzi.org>, Jeffrey Yasskin <jyasskin@chromium.org>
Content-Type: multipart/alternative; boundary="00000000000044812305a519e67b"
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/8zgpY5yWTOsPj4seERglt85UbZM>
Subject: Re: [Cbor] RFC7049bis processing of unknown tags
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <cbor.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cbor>, <mailto:cbor-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor/>
List-Post: <mailto:cbor@ietf.org>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cbor>, <mailto:cbor-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 08 May 2020 02:39:03 -0000

On Thu, May 7, 2020 at 4:42 PM Michael Richardson <mcr+ietf@sandelman.ca>
wrote:

>
> Jeffrey Yasskin <jyasskin@chromium.org> wrote:
>     > 3) While RFC7049-bis is already
>     > somewhat overstepping the bounds of a standard in specifying
>     > error-handling options, it'd be even farther out of bounds to specify
>     > parser API options. :)
>
> I disagree strongly with this part :-)
>
> It's is a regular and common mistake in IETF/many specifications that they
> do
> not adequately explain what the behaviour is supposed to be when a newer
> option shows up.  We probably spend 70% of our time at the IETF making sure
> that we don't break old code.
> Is that too high?  Well, maybe, because we don't spend the effort up-front.
>
> As an example: IKE (IPsec) has a major and minor version.
> We have no idea what it would mean to increment the minor version.
> Having a minor version was a waste of time.
>
> (I crafted the text for the VendorID payload in IKEv1.
> I believe that I got it right, and made sure that we could make
> use of private extensions without conflicts in the number space)
>
> As for API options, yes, we often do need to give advice on providing ways
> to
> put things into compatibility mode, and what that means.  At no point are
> we
> writing down some enum or #define though.
>
> I believe that I am less concerned about having rfc7049bis render some
> existing parsers "non-compliant" --- they *ARE* still compliant to RFC7049.
>
> I am a user of parsers, I have occasionally had to write my own
> conversions,
> but mostly I would say that I am not up to speed on some of the details.
>

That's all reasonable. :) Given the discussion, and Lawrence's quick
analysis of the existing tags, how do you currently feel about the state of
RFC7049bis's requirements around error handling?

* I'm not opposed to advice for parsers to have an option to treat a value
tagged with an unknown tag as equivalent to the value itself.
* I dislike the idea of any generic parser doing that by default, I think
based on reasoning like in
https://tools.ietf.org/html/draft-iab-protocol-maintenance-04.
* If a parser passes unknown tags up to the application, a higher-level
protocol can ignore them itself, skip their data item, return an error, or
do something else appropriate to the context. So if the RFC should
recommend a default in generic parsers, I'd vote for that one.
* I don't intend to draft this wording myself. :)

Jeffrey