Re: [Cbor] Private tag numbers
Anders Rundgren <anders.rundgren.net@gmail.com> Sun, 23 July 2023 07:15 UTC
Return-Path: <anders.rundgren.net@gmail.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 663BCC151095 for <cbor@ietfa.amsl.com>; Sun, 23 Jul 2023 00:15:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.097
X-Spam-Level:
X-Spam-Status: No, score=-7.097 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id m1gqZNC7BAvs for <cbor@ietfa.amsl.com>; Sun, 23 Jul 2023 00:15:53 -0700 (PDT)
Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 17F7EC15106B for <cbor@ietf.org>; Sun, 23 Jul 2023 00:15:53 -0700 (PDT)
Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-31297125334so1960409f8f.0 for <cbor@ietf.org>; Sun, 23 Jul 2023 00:15:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690096551; x=1690701351; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=5bgKwwTaQfLTewvmyxG+BG5OT0+B4NCm7zXVqGTdKUQ=; b=GYaJBIl7GIfdf7F/OlbvErPWZgnK7zrgmeuszM2TvN41kXoJdqWUbjQ4NrHwzPTLkl 8MX/F0TB8sRe7+GyVSIvCGNok3yq7YCUkcIQmMZ5P7vn1IKZp4U1QBNISLAMYwPDN/R+ gZbNE5hIxuJygLV9JtNE15sK1vWpn+nKK7x4gGCIfpmBtj4llkOFb82G8EKswyGtg4e3 QjD946qbY3qd3oxpU7f49m+t3DJXIdkTVBiMz4AiClDYb2Qt4/MNSD+kKdVkX+Ufl1hZ QuKNnDJFKmQn6g6notXBKp0BM15fSNrcmyv3LAvYT9w7wa1K9hmUxASZEpshSYUGa9p4 IxAg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690096551; x=1690701351; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=5bgKwwTaQfLTewvmyxG+BG5OT0+B4NCm7zXVqGTdKUQ=; b=eI+uVShSZEqdRH9iKuqWwcxu0JT0wEJSeSJi5nR+IGSB5IoP4AGFW0YWZmMe72U5sd 0va5voYAzG8e1L9VZDYJYdV1cGM0wblAGzi47zfAXpmP2uFHXwRjit6ZCupfv4bCuew+ WA/JJQzN/DG1/vZF0IEEZ/n1uIxufrkVBERHPXQhgeOCdZnXEJh1JxVexTOY39/Gh2c9 bL1Ca1b5NdJZV1vd9neaCRRs2bVK1OJ/Av1VtLXm08vXQTxumlFWokPerOKKHfjsJrgN iap3FEWigdU/DzTImz9kZ2mTfbmHtyec/EbrGOonBohgO0nWXzcjuikAPioWYPP/oh2N BU0w==
X-Gm-Message-State: ABy/qLYMrlyVfFq6PBsqtEt9yPcRLOM7GUmmVwyk7rAz16y5FXyY/Hjl ntw39ieqeiyNwZUtBQlJygk=
X-Google-Smtp-Source: APBJJlEoZwng5+Q2Q05cqVHaFr45/7BPVde34gmnRiqn9D+Zu5bnr6kbY5zNtCu4Yy1YaaE41HQuow==
X-Received: by 2002:adf:ce11:0:b0:314:11e6:da8a with SMTP id p17-20020adfce11000000b0031411e6da8amr6190488wrn.1.1690096551231; Sun, 23 Jul 2023 00:15:51 -0700 (PDT)
Received: from ?IPV6:2a01:e34:ec4e:5670:9193:d48:a5d6:6c4b? ([2a01:e34:ec4e:5670:9193:d48:a5d6:6c4b]) by smtp.googlemail.com with ESMTPSA id e1-20020adfe381000000b00313f031876esm8900145wrm.43.2023.07.23.00.15.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 23 Jul 2023 00:15:50 -0700 (PDT)
Message-ID: <c40b9570-5e22-73c8-744f-1e141edea875@gmail.com>
Date: Sun, 23 Jul 2023 09:15:50 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0
Content-Language: en-US
To: Vadim Goncharov <vadimnuclight@gmail.com>, Carsten Bormann <cabo@tzi.org>
Cc: Tony Putman <Anthony.Putman@dyson.com>, "cbor@ietf.org" <cbor@ietf.org>
References: <AS2PR09MB6342AB1E5DFF19EDFB65F25F8C609@AS2PR09MB6342.eurprd09.prod.outlook.com> <8AD1E3E6-A474-4D4D-B404-66172DF8C481@tzi.org> <20230723010552.01d80062@nuclight>
From: Anders Rundgren <anders.rundgren.net@gmail.com>
In-Reply-To: <20230723010552.01d80062@nuclight>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/O0GemGwwsYAlsCapoSRnvxJ9nuM>
Subject: Re: [Cbor] Private tag numbers
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.39
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: Sun, 23 Jul 2023 07:15:55 -0000
If you don't put the private tag in a tag construct (where it could clash with other tags), you could start using the solution today. I would consider a construct like Your Registered Tag([Private Number, Actual CBOR Object]) which eliminates the need for a standard based on reserving a range of tag values that I guess are associated with a specific tag syntax/interpretation. Other ways ahead: the JSON and XML folks seem to be quite happy using URLs/URIs. Why couldn't CBOR users do that as well? https://www.ietf.org/archive/id/draft-rundgren-cotx-04.html The potential waste of bytes is hardly an issue except for very constrained systems. If this indeed is an issue, OIDs represent a since long establish method for getting your own global (and possibly private) namespace. Anders On 2023-07-23 0:05, Vadim Goncharov wrote: > Hi Carsten and Tony, > > I'd still argue it's better bring up the older idea of "per-enterpise > tag spaces" - that is, where IANA register just one "container" tag per > organization, and there is a range of tag space of actual "private" > tags shared between all that enterprises. > > E.g. tag 1234560 for Microsoft and 1234561 for FreeBSD, and 234567 for > some data, which will have different meanings depending on which > container it's inside: > > 1234560(["name", 234567({ > "hi": "there" > })]) > > and > > 1234561(["name", 234567({ > "hello": [-122.5, 37.43] > })]) > > And enterprise tag number contatiner will be close to top-level of CBOR > document. This is in spirit of RFC 5424 which has enterprise numbers > (iso.org.dod.internet.private.enterprise registered per RFC 2578) for > interpreting keys within it's sections: > > [exampleSDID@32473 iut="3" eventSource="Application" > eventID="1011"][FreebsdField@2238 priority="high"] > > (32473 registered as example enterprise for RFC/documentation) > > This way, if ever private tags need to be exposed to public (as in your > analogy with 10.0.0/8), then organization may publish a spec for the > tag pair - e.g. for 1234561's 234567. > > It's still to be thought about from which range to allocate blocks (may > be several, for each byte-length range), and other questions, but I > hope you get the main idea. > > On Sat, 22 Apr 2023 10:34:05 +0200 > Carsten Bormann <cabo@tzi.org> wrote: > >> Hi Tony, >> >> thank you for asking this question. >> CBOR has a somewhat evolved view of the tag namespace (number space), >> and it may not be obvious. >> >> On 21. Apr 2023, at 18:53, Tony Putman <Anthony.Putman@dyson.com> >> wrote: >>> >>> Hi all, >>> I'm defining a data schema for purely internal use (no >>> interoperability needed) >> >> This is known as “famous last words” :-) >> A lot of organizations have learned that they do need to connect >> their “private” net 10 IP addresses once they purchase or merge with >> other organizations. I think the same applies to tag numbers, even >> more so because sharing data is more loosely coupled than sharing >> networks, and you may find a need to integrate your data with data >> from other sources that have tags “for purely internal use". >> >>> and encoding it in CBOR. There are points where we may want to >>> vary/extend the contents with new data, and I thought the natural >>> way to do this would be to define different tags to hold the data. >>> I expected to find a set of tag numbers defined in IANA for private >>> use, but there don't appear to be any. >> >> Indeed, because “private use” may be an illusion for the above reason. >> >> (Note that we have a different kind of tags, for contextual use [1]. >> I’m not talking about those.) >> >> [1]: >> https://www.ietf.org/archive/id/draft-bormann-cbor-notable-tags-07.html#name-enumerated-alternative-data >> >>> - Is this a misuse of tags? And if so, what would be the more >>> natural way to specify this? >> >> You didn’t say much, but what you said leads me to believe that tags >> are a good way to address your requirement. >> >>> - Is this a general problem that people face and would it be worth >>> defining a set of private tags which are known to be >>> context-sensitive and not interoperable? >> >> Why share a set of (then not so) “private” tags when you can have >> your own, *actually* private ones? >> >> My recommendation would be: >> >> Make a good guess at how many tags you’ll need, and get a block of >> tags registered from the FCFS space for your needs. (You don’t need >> to be overly large with that number because you can always go back >> for more.) Call them Dyson-0 to Dyson-4711 if you want. >> >> Run your own internal tag registry assigning your private meanings to >> your IANA-assigned private tags. And, of course, once you are >> surprised by noticing that your “private” use is no longer really so >> private, update the IANA registry with some information about some of >> the tags (e.g., specifications) at your leisure. >> >> We would like you to use the space from 65536 up (1+4 space) unless >> you need a humungous number (for which we have the 1+8 space). There >> also is a limited FCFS space from 32768 to 65535 (in 1+2 space), but >> you don’t want to take an out-of-proportion chunk of those (and only >> if the size of the tag representation matters a lot for your >> application). >> >> Today’s tag usage report: >> range used % free total >> 0 1+0 13 54.17 11 24 >> 1 1+1 70 30.17 162 232 >> 2 1+2 438 0.67 64842 65280 >> 3 1+4 65284 0.00 4294836476 4294901760 >> 4 1+8 2 0.00 18446744069414584318 18446744069414584320 >> >> (Remember that this reflects the first ~ 10 years of allocation, >> which also might ramp up a bit over time — this space needs to hold >> for many more decades.) >> >> Grüße, Carsten >> >> _______________________________________________ >> CBOR mailing list >> CBOR@ietf.org >> https://www.ietf.org/mailman/listinfo/cbor > > >
- Re: [Cbor] [EXTERNAL EMAIL] Re: Private tag numbe… Tony Putman
- [Cbor] Private tag numbers Tony Putman
- Re: [Cbor] Private tag numbers Carsten Bormann
- Re: [Cbor] Private tag numbers Vadim Goncharov
- Re: [Cbor] Private tag numbers Anders Rundgren
- Re: [Cbor] Private tag numbers Carsten Bormann
- [Cbor] Re: Private tag numbers / 1010 Vadim Goncharov
- Re: [Cbor] [EXTERNAL EMAIL] Re: Private tag numbe… Tony Putman
- [Cbor] Re: Private tag numbers / 1010 Anders Rundgren
- [Cbor] Re: Private tag numbers / 1010 Carsten Bormann
- [Cbor] Re: Private tag numbers / 1010 Anders Rundgren
- [Cbor] Re: Private tag numbers / 1010 Carsten Bormann
- [Cbor] Re: Private tag numbers / 1010 Anders Rundgren
- Re: [Cbor] [EXTERNAL EMAIL] Re: Private tag numbe… Carsten Bormann
- [Cbor] Re: Private tag numbers / 1010 Vadim Goncharov
- [Cbor] Re: Private tag numbers / 1010 Carsten Bormann
- Re: [Cbor] Private tag numbers Anders Rundgren
- [Cbor] Re: Private tag numbers / 1010 Vadim Goncharov
- Re: [Cbor] Private tag numbers Anders Rundgren