[Cbor] Re: Private tag numbers / 1010

Anders Rundgren <anders.rundgren.net@gmail.com> Sun, 15 December 2024 05:18 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 BB7B8C14F71D for <cbor@ietfa.amsl.com>; Sat, 14 Dec 2024 21:18:18 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.104
X-Spam-Level:
X-Spam-Status: No, score=-2.104 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, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=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 ZE2i6zjFFKt3 for <cbor@ietfa.amsl.com>; Sat, 14 Dec 2024 21:18:14 -0800 (PST)
Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E60BDC14F6FD for <cbor@ietf.org>; Sat, 14 Dec 2024 21:18:14 -0800 (PST)
Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-434a766b475so32283675e9.1 for <cbor@ietf.org>; Sat, 14 Dec 2024 21:18:14 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734239893; x=1734844693; darn=ietf.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=cAdvHYki8PDjK/PFseNLD58u2PSAElxKww9TFckAmeE=; b=fsEGz41XGzLto9GWdgJ14953sZtl1tzqsS8AVcNVHdbyLrcX0zkzvt8dPorapYMyCx z59N2LDZed3YrYrS0GZAiYIzNvzl1XPTf0qECl9Zc1Jy6z5EzevtO2Btwo4ldhpqlSIa fDl2hu9f3dZHQueDIssGQKuglOzti4kO0YYl5JfYc4AWlzBzFeHCcu3q2s134GimaDOa IAXaUzN2op1kKPRiMriiqpFlT1e2gE4e9iT48I9ee2MIUYDqrLHHhsdQt9LCJF+sp8hE JbX0/bsaVmkqWw2y7XhhwquhwDW5tBNrXmHdQ2A5JtAqeiTPoLnPMSVi3FbOVqxcNp4I wCpg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734239893; x=1734844693; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=cAdvHYki8PDjK/PFseNLD58u2PSAElxKww9TFckAmeE=; b=wPUdggZdU3gY+7nZEFLTUCBufEMpYd5fpQsMQCDGF4rF27ZVBNphkJrJUdF5lslFZk w2K65cLHdsgX1Hhvvtvf3mSlE3+UpRoujG+BncXrAs2v0k/OlqzJFeJK2JcORzCgZySl u6LmLlOQZRWXN8MIva+Rj81Nq5lzGVNIV1qaBagdMCsIavYIyhm0+rqRXiDU7LZ+WPlL XEbmQcnoHkpFP8x04p+uMEcPvZi5+p+DM1lJ3L5GvMu7X76vCDHS9s5Q/Jwbq0MkMFVy BjNSnYvM7X3KTtEGouT5FxSGhTjOpPEJdpoBGGoGIoCM7tDDfke+2PXg5JgLsK8sM7x3 AIWA==
X-Forwarded-Encrypted: i=1; AJvYcCVwEe4uHTMu2S+zs+uGHO46D+48ufdzg6BrG9eHc8oI0Ys51BOOvr34vDkdV2aof5sK33za@ietf.org
X-Gm-Message-State: AOJu0YyzxSv0fDx0RQxv/9gDdllwPEt+ohUGdG4k78Uoj4Q8X9KnSLPr l6BKQMsgC8Rys3YH/O5aw8awor55NhDyiY3TfGCZglvy47RKsOKE
X-Gm-Gg: ASbGncsdiluFIOFyI6g7fmsw7knCLYU2yQzB2j4cGdGESBcepHQSwupRB1l9brRRNpm 2RKJmQZbPca22aetXT2UE/4CF3uIAYZWidfWA0h2Lsjt6Z5qeTn35ojN5x5cqI6N9spdzX1sEa/ m9IeIxJ8odNY2n9sF04qoDFD8WoznXX7bGsRhU0y7OPgqEOJIpt6QEJU8UkutyU/dpTxlF3evVA l7XNz6ZkyMi8opy357VccFyTmluTaHHFxgFfpmj6NE7hhGOYZzM8qPqJEAu2la0UAIAokfByxvN 391KrjK+Rl6N/PnZqTXT9LL41Lakwm96ouhiUTrrNTYAKv1IGNPr/plk
X-Google-Smtp-Source: AGHT+IFVsB15bUNTUzH4GiZm3aTU7zFI0PFJHaTkRQey2UKvgI/dPcEwiaCaCqU0Uwvo/hhvZMp2zg==
X-Received: by 2002:a05:600c:1f0b:b0:434:a94f:f8a9 with SMTP id 5b1f17b1804b1-4362aaa495emr59989345e9.28.1734239892906; Sat, 14 Dec 2024 21:18:12 -0800 (PST)
Received: from ?IPV6:2a01:e0a:e1b:64b0:ad39:9f73:1eb0:ec77? ([2a01:e0a:e1b:64b0:ad39:9f73:1eb0:ec77]) by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-436257176a4sm98871485e9.38.2024.12.14.21.18.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 14 Dec 2024 21:18:11 -0800 (PST)
Message-ID: <755d93c9-d253-4558-b6ac-d3e1f4555535@gmail.com>
Date: Sun, 15 Dec 2024 06:18:10 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
To: Vadim Goncharov <vadimnuclight@gmail.com>
References: <AS2PR09MB6342AB1E5DFF19EDFB65F25F8C609@AS2PR09MB6342.eurprd09.prod.outlook.com> <8AD1E3E6-A474-4D4D-B404-66172DF8C481@tzi.org> <20230723010552.01d80062@nuclight> <c40b9570-5e22-73c8-744f-1e141edea875@gmail.com> <20241215031403.63e93131@nuclight.lan>
Content-Language: en-US
From: Anders Rundgren <anders.rundgren.net@gmail.com>
In-Reply-To: <20241215031403.63e93131@nuclight.lan>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Message-ID-Hash: CRQAJLMZEDSY6BRXQ7AVQG3IHHVO6VKY
X-Message-ID-Hash: CRQAJLMZEDSY6BRXQ7AVQG3IHHVO6VKY
X-MailFrom: anders.rundgren.net@gmail.com
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-cbor.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: Carsten Bormann <cabo@tzi.org>, Tony Putman <Anthony.Putman@dyson.com>, "cbor@ietf.org" <cbor@ietf.org>
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [Cbor] Re: Private tag numbers / 1010
List-Id: "Concise Binary Object Representation (CBOR)" <cbor.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/12l39owaTT31jITPes-TTcJtvcI>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Owner: <mailto:cbor-owner@ietf.org>
List-Post: <mailto:cbor@ietf.org>
List-Subscribe: <mailto:cbor-join@ietf.org>
List-Unsubscribe: <mailto:cbor-leave@ietf.org>

On 2024-12-15 01:14, Vadim Goncharov wrote:
> Hi,
> 
> Regarding https://datatracker.ietf.org/doc/draft-rundgren-cotx/05/ of
> tag 1010, please provide ability for identifier to be a non-text string
> until this is not an RFC.

Well, for unknown reasons the CBOR WG have rejected the by other formats firmly established method using dereferenceable specification URLs as object identifiers, so it seems COTX will remain my private "invention" :)

Anyway, I'm not a fan of "polymorphic" tags so I would urge you to seek a new tag number (hopefully a bit more compact than 1010), for a version using a binary argument.

Regards,
Anders

> 
> E.g. for 1010([37(binary-UUID), ...]) or SHA256 of object or
> something other (like referring previous string in a table) - the goal
> here is to allow more *compact* representation, like that of "@context"
> in JSON-LD (of which CBOR-LD took wrong way of not using CBOR tags
> capabilities).
> 
> On Sun, 23 Jul 2023 09:15:50 +0200
> Anders Rundgren <anders.rundgren.net@gmail.com> wrote:
> 
>> 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
>>>
>>>
>>>    
>>
> 
> 
>