rfc-8141

Uniform Resource Names (URNs)

P. Saint-Andre, J. Klensin
date2017-04 streamIETF areaart wgurnbis statusPROPOSED STANDARD pages40 canonicalhttps://www.rfc-editor.org/rfc/rfc8141 doi10.17487/RFC8141
A Uniform Resource Name (URN) is a Uniform Resource Identifier (URI) that is assigned under the "urn" URI scheme and a particular URN namespace, with the intent that the URN will be a persistent, location-independent resource identifier. With regard to URN syntax, this document defines the canonical syntax for URNs (in a way that is consistent with URI syntax), specifies methods for determining URN-equivalence, and discusses URI conformance. With regard to URN namespaces, this document specifies a method for defining a URN namespace and associating it with a namespace identifier, and it describes procedures for registering namespace identifiers with the Internet Assigned Numbers Authority (IANA). This document obsoletes both RFCs 2141 and 3406.

obsoletes

Extracted elements (30)

design-rationale §2.3.1

The r-component has no syntactic counterpart in any other known URI scheme. It was added to support passing parameters to URN resolution services, distinct from q-components which pass parameters to the resource or application. Exact semantics are deliberately left to future standardization to avoid premature lock-in.

design-rationale §1.2.2

The URN syntax deliberately restricts all characters to ASCII (requiring percent-encoding for others) to maintain stability and persistence as protocols evolve. The character set and encoding issues are acknowledged as involving fundamental unresolved trade-offs in the information sciences community, so the specification imposes restrictions rather than comprehensive rules.

design-rationale §1.2.1

URN resolution is intentionally more flexible than URL dereferencing. A URN may resolve to locators, to metadata only, to representations conditionally (based on authorization), or not at all. This flexibility is a deliberate architectural choice to accommodate a wide range of use cases beyond simple document retrieval.

interoperability-note §1

All URN namespaces and URNs that were valid under RFC 2141 and RFC 3406 remain valid under RFC 8141, even though it may be useful to update namespace definitions to take advantage of new features such as r-components, q-components, and the '/' character in the NSS.

interoperability-note §4.2

Syntactical correctness of a string beginning with 'urn:' is not sufficient to make it a valid URN; the NID must be registered in accordance with the rules in this document and the NSS must conform to the registered namespace's rules. Generic URI processors must treat URNs as opaque unless the scheme is recognized.

normative-requirement §5.1 MUST NOT

A formal URN namespace NID MUST NOT be an already-registered NID, MUST NOT start with 'urn-', MUST be more than two characters long, MUST NOT start with two letters followed by a hyphen (reserved for ISO alpha-2 country codes), and MUST NOT start with 'X-'.

registry

normative-requirement §6.2 MUST

A revised URN namespace registration MUST describe differences from prior versions and SHOULD make special note of any relevant changes in the underlying technologies or URN namespace management processes.

registry

normative-requirement §2.3.1 MUST

Characters outside the ASCII range in r-components, q-components, and f-components MUST be percent-encoded using the method defined in Section 2.1 of RFC 3986.

normative-requirement §3.1 MUST NOT

Percent-encoded characters MUST NOT be decoded (i.e., percent-encoding normalization as specified in RFC 3986 Section 6.2.2.2 MUST NOT be applied) during the URN-equivalence comparison process.

normative-requirement §2.3.1 SHOULD NOT

r-components SHOULD NOT be used for URNs before their semantics have been standardized in a separate specification.

normative-requirement §2.2 MUST NOT

Software that is not aware of namespace-specific canonicalization and encoding rules MUST NOT construct URNs from names in a non-URN identifier system, because names valid in that system may contain characters not permitted in URN syntax.

normative-requirement §6.4.5 MUST

The 'Interoperability' section of a URN namespace registration template MUST specify any known potential issues related to interoperability, including possible confusion with other URN namespaces, non-URN identifier systems, or URI schemes.

normative-requirement §2.3.1 REQUIRED

The r-component SHALL NOT be taken into account when determining URN-equivalence, but SHALL be supplied along with the URN when presenting a request to a URN resolution service.

normative-requirement §6.4.6 MUST

The 'Resolution' section of a URN namespace registration template MUST specify whether resolution mechanisms are intended or anticipated for URNs within that namespace.

normative-requirement §3.1 MUST

Two URNs are URN-equivalent if their assigned-name portions are octet-by-octet equal after: (1) converting the scheme 'urn' to lower case, (2) converting the NID to lower case, and (3) converting hex digits A-F in percent-encoded sequences within the NSS to upper case. The r-component, q-component, and f-component MUST be ignored for URN-equivalence.

normative-requirement §2.3.2 MUST NOT

URN namespaces and resolution systems MUST NOT require that q-component information be passed to them for processing; namespace design SHOULD avoid any need for a resolution service to consider the q-component.

normative-requirement §2.2 SHOULD NOT

URN namespaces SHOULD NOT allow characters outside the ASCII range unless the nature of the particular URN namespace makes such characters necessary, in order to keep URNs stable and persistent as protocols evolve.

normative-requirement §2.2 MUST

URNs that appear in protocols or are passed between systems MUST use only Unicode characters encoded in UTF-8 and further percent-encoded as required by RFC 3986.

normative-requirement §4.4 MUST

When URNs are transported and exchanged, they MUST be represented in the canonical format defined in RFC 8141. Applications SHOULD display the complete URI (including the 'urn' scheme and all components) to avoid confusion between URN NIDs and URI scheme identifiers.

protocol-element §2

A URN is composed of an assigned-name (scheme + NID + NSS) plus optional r-component, q-component, and f-component. The ABNF is: namestring = assigned-name [ rq-components ] [ "#" f-component ]; assigned-name = "urn" ":" NID ":" NSS; NID = (alphanum) 0*30(ldh) (alphanum); NSS = pchar *(pchar / "/").

registry

protocol-element §5.2

Informal URN namespaces are assigned a NID by IANA consisting of the string 'urn-' followed by the next available positive integer (e.g., 'urn-7'). The NID syntax is: InformalNamespaceName = 'urn-' Number, where Number is a non-zero-leading decimal integer.

registry

protocol-element §2.3.3

The f-component is an optional URN component introduced by '#' with the same syntax as the URI fragment component. It identifies a location within or region of the named resource, and its semantics are defined by the media type of the resolved representation.

protocol-element §2.1

The Namespace Identifier (NID) is the label identifying a URN namespace. NIDs are case insensitive ("ISBN" and "isbn" are equivalent), restricted to ASCII, and 2–32 characters long following the ABNF: NID = (alphanum) 0*30(ldh) (alphanum), where ldh = alphanum / "-".

protocol-element §2.2

The Namespace Specific String (NSS) is the portion of a URN that is unique within a given URN namespace and conforms to that namespace's definition. The NSS now permits '/', '~', and '&' characters that were disallowed by RFC 2141, enabling encapsulation of hierarchical names from non-URN identifier systems.

protocol-element §2.3.2

The q-component is an optional URN component introduced by '?=' used to pass parameters to the named resource or a system supplying a service. It has the same syntax as the URI query component. For URNs resolving to locator URIs, resolvers copy the q-component to the URI's query component.

protocol-element §2.3.1

The r-component is an optional URN component introduced by '?+' and used to pass parameters to URN resolution services. It ends at a '?=' sequence (q-component), a '#' (f-component), or end of URN. Its exact semantics are reserved for future standardization.

registry §7.2

IANA maintains the URN Namespace Registry, assigning formal NIDs (chosen by applicants) and informal NIDs (assigned as 'urn-N' sequences) following the Expert Review process described in Section 6. This document updates and supersedes the procedures in RFC 3406.

registry

registry §7.1

RFC 8141 updates the registration of the 'urn' URI scheme in the IANA Permanent URI Registry. The scheme is described as identifying persistent, location-independent resource identifiers, with syntax and encoding defined in Section 2 of this document.

registry

security-consideration §6.4.4

URN-equivalence comparison rules have security implications: producing false negatives (treating equivalent URNs as different) or false positives (treating different URNs as equivalent) can create exploitable ambiguity. Namespace definitions must specify equivalence rules carefully and MUST NOT introduce additional false negatives relative to the base procedure.

security

security-consideration §8

URN namespace definitions must account for potential spoofing: declarations ought to be taken as advisory since there is always a danger of providing misinformation. Namespace registrations should also address privacy risks such as leakage of private information when names are communicated on the public Internet and the potential for directory harvesting.

security, privacy