Re: [apps-discuss] Retroactive application of draft-ietf-appsawg-uri-scheme-reg - comprehensive review

"Roy T. Fielding" <fielding@gbiv.com> Tue, 14 April 2015 04:28 UTC

Return-Path: <fielding@gbiv.com>
X-Original-To: apps-discuss@ietfa.amsl.com
Delivered-To: apps-discuss@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 877931B3329; Mon, 13 Apr 2015 21:28:18 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.666
X-Spam-Level:
X-Spam-Status: No, score=-1.666 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, IP_NOT_FRIENDLY=0.334, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=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 kpykjReZH5L9; Mon, 13 Apr 2015 21:28:17 -0700 (PDT)
Received: from homiemail-a33.g.dreamhost.com (sub4.mail.dreamhost.com [69.163.253.135]) by ietfa.amsl.com (Postfix) with ESMTP id 4424B1B3328; Mon, 13 Apr 2015 21:28:17 -0700 (PDT)
Received: from homiemail-a33.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a33.g.dreamhost.com (Postfix) with ESMTP id 2381759406B; Mon, 13 Apr 2015 21:28:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gbiv.com; h=content-type :mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=gbiv.com; bh=aKtSXzS+1nfrRnMek1jdMh8ZlCk=; b=vRjt/+mjpdLuR2QPYMHfLOA/YTLk NQz/8BbdCkTniqmYIKUuTafqsZ8vZY07g7EaaO5HxWcldD1/k/zx1W53fRAOMlUZ ZVI6w6LVGACcIHZ8/GqV3JnRJlxrwXj4NqXQcAznTzPkC7UckK6Ta9OORBt6vNde iPxMPIa1rLNs0C0=
Received: from [10.71.5.221] (unknown [207.238.37.130]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: fielding@gbiv.com) by homiemail-a33.g.dreamhost.com (Postfix) with ESMTPSA id A5B40594057; Mon, 13 Apr 2015 21:28:16 -0700 (PDT)
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\))
From: "Roy T. Fielding" <fielding@gbiv.com>
In-Reply-To: <7AD26B88CD9C663FE291611C@JcK-HP8200.jck.com>
Date: Mon, 13 Apr 2015 23:28:17 -0500
Content-Transfer-Encoding: quoted-printable
Message-Id: <4D6A426F-8905-4DFC-90D2-86B85939A58E@gbiv.com>
References: <2E49FA112B054FFAED69D8A1@JcK-HP8200.jck.com> <CALaySJ+JdE5YrBuXv343_CfNP4mYxOR94JV4q_Uso4VoWfD=Ng@mail.gmail.com> <723FBC93979E1019101319C5@JcK-HP8200.jck.com> <4EA0B2F8-5109-49EA-8BAF-0199D1640407@gbiv.com> <55274198.5030309@andyet.net> <CA288E99-DE72-4DCF-9BD5-822A9C8F41F9@gbiv.com> <CALaySJJZsCuQHUSMFULfH33ke63_Xrka8OMft2Dp0NPJNKLF5w@mail.gmail.com> <327268B5-3817-42F1-90B3-D44158B0AA5D@gbiv.com> <7AD26B88CD9C663FE291611C@JcK-HP8200.jck.com>
To: John C Klensin <john-ietf@jck.com>
X-Mailer: Apple Mail (2.2098)
Archived-At: <http://mailarchive.ietf.org/arch/msg/apps-discuss/jZ5U0-wMp609Ul5lULI9lK58YB8>
Cc: Apps Discuss <apps-discuss@ietf.org>, Barry Leiba <barryleiba@computer.org>, IESG <iesg@ietf.org>, draft-ietf-appsawg-uri-scheme-reg.all@ietf.org
Subject: Re: [apps-discuss] Retroactive application of draft-ietf-appsawg-uri-scheme-reg - comprehensive review
X-BeenThere: apps-discuss@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: General discussion of application-layer protocols <apps-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/apps-discuss/>
List-Post: <mailto:apps-discuss@ietf.org>
List-Help: <mailto:apps-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 14 Apr 2015 04:28:18 -0000

> On Apr 13, 2015, at 2:05 PM, John C Klensin <john-ietf@jck.com> wrote:
> 
> Roy,
> 
> I think I've having serious trouble with the position you are
> taking but, before I overreact (again?) and confuse things
> further, I would appreciate your clarifying something for me.
> 
> Let's put 2141bis aside for a moment and go back to 2141 itself.
> Section 2 of 2141 says (trimming irrelevant material):
> 
> 	All URNs have the following syntax [...]:
> 
>       <URN> ::= "urn:" <NID> ":" <NSS>
> 
> 	The Namespace ID determines the _syntactic_
> 	interpretation of the Namespace Specific String (as
> 	discussed in [1])."
> 
> Reference [1] points to an I-D that I assume evolved into RFC
> 2276.
> 
> 2141 then goes on to say:
> 
>   <NSS>   ::= 1*<URN chars>
>   <URN chars> ::= <trans> |
>        "%" <hex> <hex>
>   <trans> ::=  <upper> | <lower> | <number> | <other> |
>        <reserved>
>   <hex>   ::= <number> | "A" | "B" | "C" | "D" | "E" |
>       "F" | "a" | "b" | "c" | "d" | "e" | "f"
>   <other>  ::= "(" | ")" | "+" | "," | "-" | "." |
>       ":" | "=" | "@" | ";" | "$" | "_" | "!" | "*" | "'"
> 
> Note that, if fragments (or anything delimited by a leading "#")
> were allowed, the above would make them part of the NSS.  If I
> understand you correctly, that is invalid because, in the syntax
> of 3986, the 2141 NSS is necessarily a substring of hier-part,
> while 3986 appears to allow "#" (and a fragment) only after the
> hier-part.  Is that correct?

Umm, not sure I understand the question.  The syntax above should not allow
a fragment delimiter "#" to be part of the NSS, which should mean that the <URN>
would match the absolute-URI production of 3986.  In other words, it would be
valid if it excludes the fragment.

  http://tools.ietf.org/html/rfc3986#section-4.3

> And, in section 2.3,
> 
>   The reserved character set is:
> 
>   <reserved>    ::= '%" | "/" | "?" | "#"

And there is the bug.  In RFC1808 and RFC2396, the "#" wasn't in the reserved set.
It was in the punctuation or delims set, which meant it was never allowed outside
of the specific occurrence as the fragment delimiter.  In RFC3986, the "#" is in
the reserved set, but the reserved set is for illustrative purposes only in both
2396 and 3986 (the URI grammar itself does not make use of the reserved production).

  http://tools.ietf.org/html/rfc2396#section-2.4.3

>   [...]
>  2.3.2 The other reserved characters
> 
>  RFC 1630 [2] reserves the characters "/", "?", and "#" for
>  particular purposes. The URN-WG has not yet debated the
>  applicability and precise semantics of those purposes as
>  applied to URNs. Therefore, these characters are RESERVED
>  for future developments.  Namespace developers SHOULD NOT
>  use these characters in unencoded form, but rather use the
>  appropriate %-encoding for each character.
> 
> Now, am I correct in my understanding that the above statement
> is invalid on its face because no URI scheme can prohibit the
> use of fragments, even to the extent of saying that they SHOULD
> NOT be used?

Yes.  More to the point, it should have said that they MUST NOT be
in NSS, since the fragment is not part of the URL, and they should have
been referring to RFC1808 (a proposed standard at that time), not
RFC1630 (an informational RFC).  In general, though, this was understood
and expected to be resolved as part of the development of RFC2396 and
finally in the form of RFC3986.  The IETF did a lot of work on URI
in the 18 years since RFC2141.

> Am I also correct in my understanding that the rule(s) that
> invalidate the above have nothing to do with any of 4395bis, RFC
> 4995, or even RFC 3986 but depend only on  RFC 1738 or possibly
> RFC 2396?

RFC1808, RFC2396, and RFC3986 (in succession).  We did have these discussions
about fragment, each time, which is why the requirement in RFC3986 (sec 4.3)
is very clear (IMO), and why it is repeated in 4395bis.  It is specified
that way because scheme-specific fragment is neither desirable (from the
architecture PoV) nor interoperable (most software separates the fragment
as part of reference parsing, before doing anything with the scheme).


Cheers,

Roy T. Fielding                     <http://roy.gbiv.com/>
Senior Principal Scientist, Adobe   <http://www.adobe.com/>