Re: [Cbor] Request for IANA registry addition for cbor tag

Carsten Bormann <cabo@tzi.org> Tue, 21 January 2020 20:02 UTC

Return-Path: <cabo@tzi.org>
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 953B7120072 for <cbor@ietfa.amsl.com>; Tue, 21 Jan 2020 12:02:55 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.199
X-Spam-Level:
X-Spam-Status: No, score=-4.199 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, 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 z_zpWr6hZfrg for <cbor@ietfa.amsl.com>; Tue, 21 Jan 2020 12:02:50 -0800 (PST)
Received: from gabriel-vm-2.zfn.uni-bremen.de (gabriel-vm-2.zfn.uni-bremen.de [134.102.50.17]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0AA9C120824 for <cbor@ietf.org>; Tue, 21 Jan 2020 12:02:44 -0800 (PST)
Received: from [192.168.217.119] (p548DC4D8.dip0.t-ipconnect.de [84.141.196.216]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-vm-2.zfn.uni-bremen.de (Postfix) with ESMTPSA id 482KFt2vwKz16Hn; Tue, 21 Jan 2020 21:02:42 +0100 (CET)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.40.2.2.4\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <644EE647-CC60-4F4C-AE4A-94B511E9597F@island-resort.com>
Date: Tue, 21 Jan 2020 21:02:41 +0100
Cc: cbor@ietf.org, Kio Smallwood <kio@mothers-arms.co.uk>
X-Mao-Original-Outgoing-Id: 601329761.76366-7594066cee1ea648a448e16b3270c8a5
Content-Transfer-Encoding: quoted-printable
Message-Id: <8EB0DDFD-5AF1-4010-84AF-55F6E21688B2@tzi.org>
References: <8eefb11ba6e49f7f19fd645d11d47a7f@mothers-arms.co.uk> <75E3B32F-CEF8-4338-917D-2264006287FF@tzi.org> <644EE647-CC60-4F4C-AE4A-94B511E9597F@island-resort.com>
To: Laurence Lundblade <lgl@island-resort.com>
X-Mailer: Apple Mail (2.3608.40.2.2.4)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/6PkbBxwEOJ1vkV9rnFbfMwAXWGQ>
Subject: Re: [Cbor] Request for IANA registry addition for cbor tag
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: Tue, 21 Jan 2020 20:02:56 -0000

Hi Laurence,

I’m not sure I follow.  Decoders either implement a tag or they don’t.

> On 2020-01-21, at 18:58, Laurence Lundblade <lgl@island-resort.com> wrote:
> 
> Here’s some decoders types in relation to this tag:
> 
> 1) It recognizes the tag, supports it and does the right thing.

That would be a decoder that implements the tag.

> 2) It recognizes the tag, knows it can’t do what is required and errors out. For this decoder this type is invalid.

That would be a decoder that fundamentally doesn’t accept this tag.
Not particularly useful.
What does “can’t do what is required” mean?

> 3) It doesn’t recognizes the tag and happens to do the wrong thing. That is perfectly OK.

How would that be OK?  But maybe I don’t understand that “do the wrong thing” means.

> 4) It doesn’t recognize the tag and happens to do the right thing.

Which would be to present the tag number and the tag content to the application.

> So anyone using this tag really needs to be sure they are using a decoder of type 1. Decoder types 3 and 4 are really the same in that there is no way to know which one you’ve got.
> 
> I don’t think we want some sort of implication that decoder type 3 is defective creating a situation where all decoders are forced to support this.

Now I’m completely lost about your type 3.  “Do the wrong thing” and “OK” don’t mix that well for me…

> I think this should be spelled out in the description of this tag.

I think 7049bis might need some more text about handling unimplemented tags in decoders.

Right now, it says:
  Implementations receiving an unknown tag number can choose to simply ignore
  it or to process it as an unknown tag number wrapping the enclosed data
  item. The IANA registry in {{ianatags}} is the appropriate way to

But it also says:
Generic encoders provide an application interface that allows the
application to specify any well-formed value, including simple values
and tags unknown to the encoder.

So a generic encoder would not have problems with unimplemented tags; but other (e.g., task-specific) implementations might.

Grüße, Carsten