Re: [websec] ABNF references (was RE: AppsDir review of draft-ietf-websec-strict-transport-sec)

Julian Reschke <> Wed, 02 May 2012 18:34 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id AC86411E8083 for <>; Wed, 2 May 2012 11:34:08 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -103.062
X-Spam-Status: No, score=-103.062 tagged_above=-999 required=5 tests=[AWL=-0.462, BAYES_00=-2.599, USER_IN_WHITELIST=-100]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id lfWLLl54FKeh for <>; Wed, 2 May 2012 11:34:08 -0700 (PDT)
Received: from ( []) by (Postfix) with SMTP id 756BC11E8081 for <>; Wed, 2 May 2012 11:34:07 -0700 (PDT)
Received: (qmail invoked by alias); 02 May 2012 18:34:06 -0000
Received: from (EHLO []) [] by (mp070) with SMTP; 02 May 2012 20:34:06 +0200
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX192yUdWFVt2IeXqnf+Hp0TZeX6r+WCvxzC/xq9mD6 h/qogz947+Gd+g
Message-ID: <>
Date: Wed, 02 May 2012 20:33:55 +0200
From: Julian Reschke <>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1
MIME-Version: 1.0
To: "Murray S. Kucherawy" <>
References: <> <> <> <> <> <> <>
In-Reply-To: <>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
Cc: "" <>, "" <>, "" <>
Subject: Re: [websec] ABNF references (was RE: AppsDir review of draft-ietf-websec-strict-transport-sec)
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Web Application Security Minus Authentication and Transport <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Wed, 02 May 2012 18:34:08 -0000

On 2012-05-02 19:48, Murray S. Kucherawy wrote:
>> -----Original Message-----
>> From: Julian Reschke []
>> Sent: Tuesday, May 01, 2012 12:54 PM
>> To: Murray S. Kucherawy
>> Cc:;;
>> Subject: Re: [websec] AppsDir review of draft-ietf-websec-strict-transport-sec
>> Technically it *does* point to the authoritative definition.
> The real issue here is that we don't have a (ahem) standard way to import ABNF definitions from other documents.  The specific problem in this case to me is twofold:

Exactly. It would be good to have that.

> 1) Section 4 of RFC5234 specifies that the prose-val construction is a mechanism of "last resort", which I take to mean one uses it only when the thing you need to describe is sufficiently complicated that it's easier to describe in English than in ABNF.  I don't think "1*DIGIT" qualifies, nor does an import from another document because we do it all the time with a non-ABNF sentence.  (Now, if that admonition in RFC5234 needs clarification, then let's do that.)

The choices we have are:

a) import "by value" (copy the ABNF rule)

b) import "by reference"

For b), I see two options:

b1) have a prose rule for the imported ABNF rule, or

b2) just say it in prose.

The advantage of b1 over b2 is that an ABNF checker can check whether 
the ABNF is complete (for some value of "complete").

I believe that using the prose rule for that is strictly better than 
having an incomplete ABNF, but it would certainly be cool to have 
something better than that.

> 2) There's a common axiom that says it's safer to refer to a definition rather than to copy it.  I understand that we're up against reader convenience here, which can suffer when a copy isn't used, especially when the definitions being recycled are scattered throughout many documents.  Although I'm infinitely confident the string "1*DIGIT" was copied correctly from RFC2616 to this draft, I'm concerned that approval of this use will eventually lead to a case where some author uses prose-val to copy something more complex in the name of reader convenience, and get it wrong, and now we have two documents that don't agree on the definition of something.  That may or may not have serious side effects.
> What I would prefer in this case is to say one of these:
> 	"delta-seconds" in defined in Section 3.3.2 of RFC2616.
> 	delta-seconds =<defined in Section 3.3.2 of RFC2616>
> I strongly prefer the former.  I still think the latter is an improper use of prose-val, but at least the ABNF itself isn't copied there.
> To address the larger question, we definitely have to have some conversation about the right way to do this in general.  Perhaps another draft that updates RFC5234 which presents a consensus view of the right, safe, convenient way to do so would be useful.  Perhaps further we just say that what you're doing here is the new official way to do so, where the ABNF inside the prose-val is a convenience copy with the understanding that the referenced definition is authoritative if somehow they diverged.
> For example, we could standardize on a prose-val whose contents are of the form:
> 	name =<  [ABNF] "from " [ "Section " 1*DIGIT *( "." 1*DIGIT) " of " ] "RFC" 1*DIGIT>

Something like that, yes. It would help automated checkers a lot.

> This would be interpreted as: "name" is defined in the specified RFC, possibly down to the specified Section.  If ABNF is there, it is a convenience copy; the referenced document contains the official definition of "name".  And people would just discourage the convenience copy in cases where it's non-trivial.  (We'd have to bang on this a bit to allow importing from documents that aren't RFCs, but you get the idea.)
> I'd be happy to write that up as something that updates 5234 if people think that's a good idea.

Best regards, Julian