Re: [Json] Are the Core Rules (Appendix B.1 of RFC 5234) always present in an ABNF spec?

Nico Williams <nico@cryptonector.com> Wed, 20 September 2023 15:37 UTC

Return-Path: <nico@cryptonector.com>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 5FC22C14CEF9; Wed, 20 Sep 2023 08:37:14 -0700 (PDT)
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, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=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=cryptonector.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 gBorFYETgpvV; Wed, 20 Sep 2023 08:37:10 -0700 (PDT)
Received: from aye.elm.relay.mailchannels.net (aye.elm.relay.mailchannels.net [23.83.212.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 11E7DC151070; Wed, 20 Sep 2023 08:37:09 -0700 (PDT)
X-Sender-Id: dreamhost|x-authsender|nico@cryptonector.com
Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 37FCD9014A1; Wed, 20 Sep 2023 15:37:09 +0000 (UTC)
Received: from pdx1-sub0-mail-a258.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id C843090131E; Wed, 20 Sep 2023 15:37:08 +0000 (UTC)
ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1695224228; a=rsa-sha256; cv=none; b=pJFSBm/GbBgsH/0bowp90aXU2Q2yIWdgqjWBQUtsdw2PEThyvcmnvQA0J12n/EudfcVRyY QTEDnLHsnQ7OI/S/V+3BOWHN43RFzdB+tNsX/QK26G0RahT31Ysjg8/vLe5wn/7BleyKYz g3d5y6hAJz+J2/sc68/wsVzQd0dwJiQOPIL+0afvPXPmI2mSckuJU8fS0k82ulNR12cLRs tCRtLNouqtjKRDgR9/HURefjMDEMx8Sl32+zcw/fBmjVDKApUOyhiXZiPSnKSXmoTCrFxr YKQJikiYelyClO0pdVgynbkua9H+WLe0AgV2VCzX9XXg+uBnSZl9oboDu/cOQQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1695224228; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=UPUNMPmkFnsd4BjtZBKDxiC7Fbt9iiH6iMHp3feLvrs=; b=4PDHBD+NZHtcqxWYrtG8xPaGrAx7xx5Z+jEC0IfGBmIaplss+ZPHLRecOyG1pR6qV863Yb yljQD/MLjaHj5AsGc+Tl8Cmf9LmhxHKegR5a2npS3gzLoF+Hz6RnZEVSRjPvH+HMRaDVeI sob5Yvmnhwfsxzfslyhe9vpNOfXh4Q1Eutt21k2bNBKEHx6uwAgE9x83XwcI6v9W1ERkhQ WMyLA7ndo03CMCh3QdPO6lgYt5pkvfbcS/pVP8mO4KwhHe4uYFifDY6PxbK+LS+PemU/Pa pLVXl0eDPF6aXcTx2lQ6kEeXO04e1dImQHeqBh5mhPzlD2Q8f0rpGtkBt2s0ew==
ARC-Authentication-Results: i=1; rspamd-7d5dc8fd68-47lgx; auth=pass smtp.auth=dreamhost smtp.mailfrom=nico@cryptonector.com
X-Sender-Id: dreamhost|x-authsender|nico@cryptonector.com
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|nico@cryptonector.com
X-MailChannels-Auth-Id: dreamhost
X-Arithmetic-Quick: 2faa659b3286b499_1695224229065_2588612679
X-MC-Loop-Signature: 1695224229065:1144190560
X-MC-Ingress-Time: 1695224229065
Received: from pdx1-sub0-mail-a258.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.114.198.215 (trex/6.9.1); Wed, 20 Sep 2023 15:37:09 +0000
Received: from ubby21 (075-081-095-064.res.spectrum.com [75.81.95.64]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nico@cryptonector.com) by pdx1-sub0-mail-a258.dreamhost.com (Postfix) with ESMTPSA id 4RrN1w1K4szDj; Wed, 20 Sep 2023 08:37:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cryptonector.com; s=dreamhost; t=1695224228; bh=UPUNMPmkFnsd4BjtZBKDxiC7Fbt9iiH6iMHp3feLvrs=; h=Date:From:To:Cc:Subject:Content-Type:Content-Transfer-Encoding; b=iMuQuIIHu3zAaUATakKYFwB6628hfhhCOvrc8kHhy//n9Rsd0+zpnLncWQA6CSwNN EiNaG6j2vnigxIyzQD9PRbme0LFi/k0tW/e7W1/cj7VCkphxYDSPl42/D7VA5WTrUK MtcZLmrbdNoGTCBYitG2gbOqSUDJa85QTY2GFZzqNs5Syhw2x1F2AsovJJ63f9OYgZ wuRax/fkUwTYe1/mkK5NXfZtkumAepXfxoh3J5bhMqRpYz/nQ6Ei1Z/465GdBmVpUX DQAfN//+yZvXlHSmeBnturUVGMKMKRB+97+QBCcSte4SB/C4YChbYZHA8bN0q+T5aA Muk8behjRXSKw==
Date: Wed, 20 Sep 2023 10:37:05 -0500
From: Nico Williams <nico@cryptonector.com>
To: Carsten Bormann <cabo@tzi.org>
Cc: "abnf-discuss@ietf.org" <abnf-discuss@ietf.org>, json@ietf.org
Message-ID: <ZQsRoQ64h6JA3jA6@ubby21>
References: <A9C3993F-D73B-4529-A94B-A6A33589726E@tzi.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <A9C3993F-D73B-4529-A94B-A6A33589726E@tzi.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/0soeWSmyn4tGyVDLNzSK-a4zVmg>
Subject: Re: [Json] Are the Core Rules (Appendix B.1 of RFC 5234) always present in an ABNF spec?
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/json/>
List-Post: <mailto:json@ietf.org>
List-Help: <mailto:json-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/json>, <mailto:json-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Sep 2023 15:37:14 -0000

On Wed, Sep 20, 2023 at 05:20:42PM +0200, Carsten Bormann wrote:
> The problem here is that RFC 8259 seems to (implicitly) import “DIGIT"
> and “HEXDIG" from RFC 5234 Appendix B.1, but also defines a rule
> “char”, which conflicts with “CHAR” in Appendix B.1 (rule names are
> case-insensitive per Section 2.1 of RFC 5234).

It's unclear if the core rules are always in scope or if one has to
import them somehow.  But clearly RFC 8259 wants some of the core rules.

It's also unclear if rule conflicts are errors or if the latest
overrides the preceding.

> Is this a bug in 8259?

I'm inclined to think so.  But perhaps it's only or also a bug in RFC
5234 (and possibly in other RFCs that use ABNF).

> And, if yes, is that bug that “char” and “CHAR” conflict (i.e.,
> because B.1 is always implicitly imported), or that 8259 forgets to
> import DIGIT and HEXDIG (i.e., because B.1 is not implicitly
> imported)?

That depends on whether one reads RFC 5234 as having the core rules
always in effect (like you, I don't), and whether conflicts are errors
or overrides (there's no mention of this in RFC 5234).  ABNF lacks
import/export syntax (and therefore also rule name namespacing), so
conflicts must be very likely.

Perhaps the best thing to do is to resolve all of this in an update to
ABNF.  The easiest thing to do though is to accept this erratum.  Both
can also be done.

> I know there are tons of ABNF out there that doesn’t get this right,
> so I’m also interested in a way forward that allows us to de-soupify
> ABNF (RFC 9431), while also offering a clear interpretation of what is
> already there.

RFC 9431?  "Message Queuing Telemetry Transport (MQTT) and Transport
Layer Security (TLS) Profile of Authentication and Authorization for
Constrained Environments (ACE) Framework"?

Nico
--