RFC 8141
Uniform Resource Names (URNs)
RFC 8141: Uniform Resource Names (URNs) ๐
okay bestie, this one is the big one for URNs โจ It's an Internet Standards Track doc from April 2017, written by P. Saint-Andre (from Filament) and J. Klensin, and it's published as ISSN 2070-1721. It obsoletes RFC 2141 and RFC 3406, which means it replaces both of those older specs. It doesn't list any updates in its header. Honestly the whole thing is giving "one source of truth for URNs" energy ๐
Abstract
A URN is a URI that gets assigned under the urn scheme plus a specific URN namespace, and the whole point is that it stays persistent and doesn't depend on where the resource lives ๐ฆ This doc does a few things. It sets the canonical URN syntax (kept consistent with URI syntax), explains how to figure out whether two URNs are URN-equivalent, and talks about URI conformance. On the namespace side, it describes how to define a URN namespace, tie it to a namespace identifier, and register that identifier with IANA. Stay with me, it's worth it ๐ธ
Status of This Memo
This is an Internet Standards Track document. โจ
It's a product of the Internet Engineering Task Force (IETF) and it represents the consensus of the IETF community. It went through public review and got approved for publication by the Internet Engineering Steering Group (IESG). If you want more on how Internet Standards work, check out Section 2 of RFC 7841 ๐ง
You can find the current status, any errata, and a way to send feedback at http://www.rfc-editor.org/info/rfc8141 ๐
Copyright Notice ๐
Copyright (c) 2017 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) as they stood on the publication date. Please actually read those, bestie, because they spell out your rights and restrictions for this document ๐
If you pull Code Components out of this document, they have to include the Simplified BSD License text, as described in Section 4.e of the Trust Legal Provisions. They come without warranty, as the Simplified BSD License describes ๐ซถ
Table of Contents ๐
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 5
1.2. Design Trade-offs . . . . . . . . . . . . . . . . . . . . 6
1.2.1. Resolution . . . . . . . . . . . . . . . . . . . . . 8
1.2.2. Character Sets and Encodings . . . . . . . . . . . . 9
2. URN Syntax . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.1. Namespace Identifier (NID) . . . . . . . . . . . . . . . 10
2.2. Namespace Specific String (NSS) . . . . . . . . . . . . . 10
2.3. Optional Components . . . . . . . . . . . . . . . . . . . 12
2.3.1. r-component . . . . . . . . . . . . . . . . . . . . . 12
2.3.2. q-component . . . . . . . . . . . . . . . . . . . . . 13
2.3.3. f-component . . . . . . . . . . . . . . . . . . . . . 15
3. URN-Equivalence . . . . . . . . . . . . . . . . . . . . . . . 16
3.1. Procedure . . . . . . . . . . . . . . . . . . . . . . . . 16
3.2. Examples . . . . . . . . . . . . . . . . . . . . . . . . 17
4. URI Conformance . . . . . . . . . . . . . . . . . . . . . . . 18
4.1. Use in URI Protocol Slots . . . . . . . . . . . . . . . . 18
4.2. Parsing . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.3. URNs and Relative References . . . . . . . . . . . . . . 19
4.4. Transport and Display . . . . . . . . . . . . . . . . . . 19
4.5. URI Design and Ownership . . . . . . . . . . . . . . . . 20
5. URN Namespaces . . . . . . . . . . . . . . . . . . . . . . . 20
5.1. Formal URN Namespaces . . . . . . . . . . . . . . . . . . 22
5.2. Informal URN Namespaces . . . . . . . . . . . . . . . . . 23
6. Defining and Registering a URN Namespace . . . . . . . . . . 24
6.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . 24
6.2. Registration Policy and Process: Community Registrations 25
6.3. Registration Policy and Process: Fast Track for Standards
Development Organizations, Scientific Societies, and
Similar Bodies . . . . . . . . . . . . . . . . . . . . . 26
6.4. Completing the Template . . . . . . . . . . . . . . . . . 27
6.4.1. Purpose . . . . . . . . . . . . . . . . . . . . . . . 27
6.4.2. Syntax . . . . . . . . . . . . . . . . . . . . . . . 28
6.4.3. Assignment . . . . . . . . . . . . . . . . . . . . . 29
6.4.4. Security and Privacy . . . . . . . . . . . . . . . . 29
6.4.5. Interoperability . . . . . . . . . . . . . . . . . . 30
6.4.6. Resolution . . . . . . . . . . . . . . . . . . . . . 30
6.4.7. Additional Information . . . . . . . . . . . . . . . 30
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 31
7.1. URI Scheme . . . . . . . . . . . . . . . . . . . . . . . 31
7.2. Registration of URN Namespaces . . . . . . . . . . . . . 31
7.3. Discussion List for New and Updated NID Registrations . . 31
8. Security and Privacy Considerations . . . . . . . . . . . . . 32
9. References . . . . . . . . . . . . . . . . . . . . . . . . . 32
9.1. Normative References . . . . . . . . . . . . . . . . . . 32
9.2. Informative References . . . . . . . . . . . . . . . . . 32
Appendix A. Registration Template . . . . . . . . . . . . . . . 37
Appendix B. Changes from RFC 2141 . . . . . . . . . . . . . . . 38
B.1. Syntax Changes from RFC 2141 . . . . . . . . . . . . . . 38
B.2. Other Changes from RFC 2141 . . . . . . . . . . . . . . . 39
Appendix C. Changes from RFC 3406 . . . . . . . . . . . . . . . 39
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 40
Contributors . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 40
1. Introduction โจ
okay so a URN is a URI (see [RFC3986]) that gets assigned under the urn scheme and a particular URN namespace. The goal is a persistent, location-independent identifier ๐ฆ A URN namespace is a whole collection of these URNs, and each one is (1) unique, (2) assigned in a consistent, managed way, and (3) assigned according to a shared definition. Some namespaces make names that only exist as URNs. Others build URNs from names that already existed in non-URN systems, like ISBNs [RFC3187], ISSNs [RFC3044], or RFCs [RFC2648] ๐
Assigning URNs is handled by an organization (or sometimes an algorithm or other automated process) that has been formally delegated a URN namespace inside the urn scheme. For example, a URN in the "example" URN namespace [RFC6963] might look like urn:example:foo ๐
This document rests on two key assumptions:
- Assignment of a URN is a managed process.
- The space of URN namespaces is itself managed.
Other URI schemes might let you freely pick and assign identifiers, but URNs don't work like that ๐ Just starting a name with urn: isn't enough to make it a URN. For a name to be a valid URN, its namespace identifier (NID) has to be registered under the rules in this document, and the rest of the assigned-name portion has to be generated under the rules for that registered URN namespace. Not me being picky, it's just how it works ๐
So that everything about URN syntax and URN namespaces lives in one place, this document does two things:
- It defines the canonical syntax for URNs in general (consistent with URI syntax), specifies how to determine URN-equivalence, and discusses URI conformance.
- It specifies a method for defining a URN namespace and tying it to a particular NID, and it describes how to register URN NIDs with the Internet Assigned Numbers Authority (IANA).
For URN syntax and URN namespaces, this document modernizes and replaces the original specs for URN syntax [RFC2141] and for defining and registering URN namespaces [RFC3406]. These changes build on the key requirements from the original functional description of URNs [RFC1737] and on years of lessons learned ๐ธ Both the older documents and this one aim to define URNs consistently, so that wherever it's practical, parsing, handling, and resolving a URN can be independent of the URN namespace it was assigned in. Main character energy for consistency, honestly ๐
Input from several key user communities, plus the history and experience with URNs, meant the URN definition needed to grow to support new functionality. That includes using syntax that RFC 2141 explicitly reserved for future standardization. Every URN namespace and URN that was valid under the earlier specs is still valid ๐ซถ Some namespace definitions may be worth updating to take advantage of the new features, though.
Here's the tricky bit โจ URNs differ from URIs that are locators (URLs), and RFC 3986 focuses heavily on URLs as the ultimate successor to [RFC1738] and [RFC1808]. Put those together and you can end up with interpretations of RFC 3986 and this spec that look (or maybe actually are) inconsistent, especially when it comes to actions or semantics beyond basic syntax. If that happens, discussions of URNs and URN namespaces should be interpreted according to this document, not by extrapolating from RFC 3986 ๐ฆ
Summaries of the changes from RFCs 2141 and 3406 are in Appendices B and C, respectively. This document obsoletes both [RFC2141] and [RFC3406]. It doesn't explicitly update or replace [RFC1737] or [RFC2276], but if you're referencing those, be aware that the conceptual model of URNs in this document is slightly different from the older specs ๐ง
1.1. Terminology
okay so before we get into the good stuff, we need to get the vocab straight ๐โจ these terms are distinguished from each other like this:
- URN ๐: a URI (as defined in RFC 3986) that uses the "urn" scheme and has the properties of a "name" described in that document, plus the ones described in this one. The term covers the entire URI, optional components included. Note to the reader: "URN" has been used elsewhere to mean a URN namespace, the namespace identifier, the assigned-name, and URIs that don't use the "urn" scheme. All but the last of those get more specific terms later in this document, but because of all those other uses, you have to use and interpret the word with care ๐ซถ
- Locator ๐: an identifier that gives you a way to access a resource.
- Identifier system ๐๏ธ: a managed collection of names. This document calls identifier systems outside the context of URNs "non-URN identifier systems".
- URN namespace ๐ธ: an identifier system that is associated with a URN NID.
- NID ๐ท๏ธ: the identifier associated with a URN namespace.
- NSS ๐งฉ: the URN-namespace-specific part of a URN.
- Assigned-name ๐: the combo of the "urn:" scheme, the NID, and the namespace specific string (NSS). So an assigned-name is a substring of a URN if that URN has any extra components (see Section 2).
The word "name" is deliberately not defined here, and it should be (and, honestly, is) only used very informally ๐ RFC 3986 uses it as a category of URI that's distinguished from "locator" (Section 1.1.3), but it also uses it in other contexts. If we treated all those uses as definitions, they'd clash with stuff like URN namespace names (aka NIDs) and with the terms for non-URN identifier systems. Not it.
This document uses "resource", "identifier", "identify", "dereference", "representation", and "metadata" roughly the way the URI specification [RFC3986] defines them.
It also uses "resolution" and "resolver" roughly the way they were used in the original discussion of architectural principles for URNs [RFC2276]. So "resolution" is the act of supplying services related to the identified resource, like translating the persistent URN into one or more current locators for the resource, delivering metadata about the resource in an appropriate format, or even delivering a representation of the resource (e.g., a document) without needing further intermediaries ๐ฆ At the time of writing, resolution services are described in [RFC2483].
For the difference between representations and metadata, check out Section 1.2.2 of [RFC3986] ๐
A bunch of other terms related to "normalization" operations that aren't part of the Unicode Standard [UNICODE] also show up here, and they mean what they mean in RFC 3986 ๐
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119] โญ
1.2. Design Trade-offs
okay this part is lowkey the big-brain section ๐ง Issues around persistent identifiers on the Internet involve fundamental design trade-offs, and those are way broader than URNs or the URN approach. They even brush up against open research questions in the information sciences community. To a much greater degree than when URNs were first considered and their uses outlined (see [RFC1737]), these trade-offs are everywhere. Ideal, comprehensive specs about what should be done or required across the whole universe of URNs would need general agreement about, and solutions to, a huge range of these issues. Some of them came from Internet and computer-age approaches to character encodings and data abstraction, but others predate computers by centuries ๐ So no, there's unlikely to be agreement on comprehensive solutions anytime soon ๐ญ
Because of that, this spec has some requirements and flexibility that wouldn't exist in a more perfect world. It was necessary in order to produce a consensus specification that gives us a modernized definition of URNs. The unattractive alternative would have been to not modernize the definition, even though URNs are already widely deployed ๐
The following sub-sections dig into two of the relevant issues in more detail ๐ซง
1.2.1. Resolution
Resolution is one issue that's specific to URNs (as opposed to naming systems in general), and honestly it's a pretty tricky topic ๐ It's discussed in Sections 1.1, 2.3.1, 6.4.6, and elsewhere below.
With traditional Uniform Resource Locators (URLs), meaning most URIs that are locators, resolution is pretty straightforward. It's used to figure out an access mechanism, and that mechanism then dereferences the locator by (typically) retrieving a representation of the associated resource, like a document (see Section 1.2.2 of [RFC3986]) โจ
URN resolution is way more flexible and varied, though ๐ฆ
One important case is mapping a URN to one or more locators. Here the end result is still dereferencing the mapped locator(s) to one or more representations. The big difference is persistence ๐ Even if a mapped locator has changed (say a DNS domain name changed hands and a URL didn't get updated to point somewhere new, or in a more extreme, hypothetical case, the DNS gets replaced entirely), a URN user can still get the correct representation (e.g., a document), as long as the resolver has kept its URN-to-locator mappings up to date. So the relevant relationships can be defined really precisely for URNs that resolve to locators, which in turn get dereferenced to a representation ๐
BUT this spec also allows several other cases of URN resolution, plus URNs for resources that don't involve information retrieval systems at all ๐ That's true either for individual URNs or, as defined below, for entire URN namespaces.
Here are a few examples:
- Imagine a namespace of URNs that resolve to locators, which then get dereferenced only to metadata about resources, because the underlying systems contain no representations of those resources. An example would be a URN namespace for International Standard Name Identifiers (ISNIs), as that identifier system is defined in the relevant standard [ISO.27729.2012]. By default, a URN there would be resolved only to a metadata record describing the public identity the ISNI identifies ๐งพ
- Then there are URNs that resolve to representations only if the requesting entity is authorized to get the representation. Other entities can only get metadata about the resource. An example would be documents held within the legal depository collection of a national library ๐๏ธ
- Finally, some URNs might not be meant to resolve to locators at all ๐ โโ๏ธ Examples include URNs identifying XML namespace names (e.g., the "dgiwg" URN namespace specified by [RFC6288]), URNs identifying application features that can be supported within a communications protocol (e.g., the "alert" URN namespace specified by [RFC7462]), and URNs identifying enumerated types like values in a registry (e.g., a URN namespace could be used to individually identify the values in all IANA registries, as provisionally proposed in [IANA-URN]) ๐
All these different types of URNs, plus the multiple resolution services that might be available for them, make "resolution" more complicated for URNs. But it's also way richer than the straightforward case of resolving to a locator that gets dereferenced to a representation ๐
1.2.2. Character Sets and Encodings
Similar considerations apply to character sets and encodings ๐ค URNs, especially ones that will be used as user-facing identifiers, should be convenient to use in local languages and writing systems. They should be easy to type with a wide range of keyboards and local conventions, and they should be unambiguous. Those goals trade off against each other, and at present it's impossible to see how a simple, readily understandable set of rules could be developed that would be optimal, or even reasonable, for all URNs ๐ฉ The discussion in Section 2.2 defines an overall framework that should make generalized parsing and processing possible, and it also makes recommendations about rules for individual URN namespaces ๐
2. URN Syntax
As we already talked about, the syntax for URNs in this spec allows significantly more functionality than the earlier specs did, most recently [RFC2141] ๐ It's also harmonized with the general URI syntax [RFC3986], which, it must be noted, was completed after the earlier URN specifications ๐ค
However, this spec does NOT extend URN syntax to allow direct use of characters outside the ASCII range [RFC20]. Because of that restriction, any such characters need to be percent-encoded as described in Section 2.1 of the URI specification [RFC3986] ๐
The basic syntax for a URN is defined using the Augmented Backus-Naur Form (ABNF) as specified in [RFC5234]. Rules not defined here (specifically: alphanum, fragment, and pchar) are defined as part of the URI syntax [RFC3986], and they're used here to point out the syntactic relationship with the terms used there ๐งท Some of the terms below aren't fully comprehensive, since extra restrictions come from the prose in the sections about those specific terms (especially r-component in Section 2.3.1 and q-component in Section 2.3.2) ๐
namestring = assigned-name
[ rq-components ]
[ "#" f-component ]
assigned-name = "urn" ":" NID ":" NSS
NID = (alphanum) 0*30(ldh) (alphanum)
ldh = alphanum / "-"
NSS = pchar *(pchar / "/")
rq-components = [ "?+" r-component ]
[ "?=" q-component ]
r-component = pchar *( pchar / "/" / "?" )
q-component = pchar *( pchar / "/" / "?" )
f-component = fragment
The question mark character ? can be used without percent-encoding inside r-components, q-components, and f-components ๐ธ Outside those components, a ? that is not immediately followed by = or + is not defined for URNs. It SHOULD be treated as a syntax error by URN-specific parsers and other processors. Yikes, don't let it slide ๐
โโ๏ธ
The following sections give more info about the syntactic elements of URNs ๐ซถ
2.1. Namespace Identifier (NID)
NIDs are case insensitive, so "ISBN" and "isbn" are equivalent ๐ท๏ธ
Characters outside the ASCII range [RFC20] are NOT permitted in NIDs, and no encoding mechanism for such characters is supported. Not even a little ๐ซ
Sections 5.1 and 5.2 impose additional constraints on the strings that can be used as NIDs, so the syntax shown above isn't comprehensive ๐
2.2. Namespace Specific String (NSS) โจ
okay bestie, the NSS is a string that's unique within a URN namespace ๐ It gets assigned and managed in a consistent way, and it has to match the definition of whatever URN namespace it belongs to ๐ So the NID (unique across the whole "urn" scheme) plus the NSS (unique within its namespace) is what makes the full URN globally unique. iconic teamwork ๐ซถ
The NSS in this spec lets in a bunch of characters the older specs didn't allow (see Appendix B) ๐ฆ The big one is /, which is now allowed, so you can basically wrap hierarchical names from non-URN ID systems inside a URN โจ Picture a made-up hierarchical system where the names are numbers separated by /, like 1/406/47452/2. If that authority ever wanted to use URNs, it'd be super natural to just drop the existing name into the NSS, giving you URNs like urn:example:1/406/47452/2 ๐ธ
Those NSS syntax changes don't touch the encoding rules for URN namespaces defined under [RFC2141] ๐ If a namespace whose names also get used outside the URN context already allows /, ~, or & in its native form within that identifier system, then that namespace's encoding rules aren't changed by this spec ๐
Now the tricky part. Depending on the rules of a non-URN identifier system, its names might contain characters that the pchar production doesn't allow (like characters outside the ASCII range or, following RFC 3986, /, ?, #, [, and ]). A name can be totally valid in that system and still not be a valid URN until it's translated into an NSS that follows that particular URN namespace's rules ๐ญ For URNs built from names that already exist in a non-URN system, the translation happens using the canonicalization and encoding methods for URNs in general, or the specific rules for that namespace.
Software that isn't aware of namespace-specific canonicalization and encoding rules MUST NOT construct URNs from the name in the non-URN identifier system. No shortcuts, bestie ๐ซ
About characters outside the ASCII range: URNs that show up in protocols or get passed between systems MUST use only Unicode characters encoded in UTF-8, and then further encoded as required by RFC 3986 ๐ As far as it's feasible, and consistent with names defined elsewhere and the principles in Section 1.2, the characters used for names SHOULD be limited to ASCII letters and digits, or to the characters and syntax of some widely used models, such as Internationalizing Domain Names in Applications (IDNA) [RFC5890], Preparation, Enforcement, and Comparison of Internationalized Strings (PRECIS) [RFC7613], or the Unicode Identifier and Pattern Syntax specification [UAX31] โจ
Last NSS tip, and it's a stability thing ๐ง In order to keep URNs as stable and persistent as possible while protocols evolve and the world around them changes, URN namespaces SHOULD NOT allow characters outside the ASCII range [RFC20], unless the nature of that particular namespace makes those characters necessary.
2.3. Optional Components
This spec has three optional components in the URN syntax: the r-component, the q-component, and the f-component ๐ They're described in more detail below. Since this spec is mostly about URN syntax, it doesn't define detailed semantics for these components for URNs in general. BUT each one has a distinct role that doesn't depend on any given URN or namespace, and clients are supposed to be able to handle them uniformly for all URNs ๐
These components MAY be used with URNs from existing URN namespaces, whether or not that namespace explicitly supports them. However, consistent with RFC 3986, the behavior of a URN containing components that are undefined or meaningless for a particular namespace or resource is not defined ๐ Okay, let's dig in!
2.3.1. r-component
The r-component is for passing parameters to URN resolution services (taken broadly, see Section 1.2), and those services are the ones that interpret them ๐ฆ (Passing parameters to the resources themselves, or to apps that manage those resources, is the q-component's job, which we'll get to next.)
The URN r-component has no syntactic counterpart in any other known URI scheme. Iconic, honestly ๐
The sequence ?+ introduces the r-component. It ends with a ?= sequence (which begins a q-component) or a # character (number sign, which begins an f-component). If neither of those shows up, the r-component just keeps going until the end of the URN. Also, characters outside the ASCII range [RFC20] MUST be percent-encoded using the method defined in Section 2.1 of the generic URI specification [RFC3986] ๐ธ
As described in Section 3, the r-component SHALL NOT be taken into account when determining URN-equivalence. However, the r-component SHALL be supplied along with the URN when presenting a request to a URN resolution service. So it gets sent but doesn't change what counts as "the same URN" ๐ซถ
This document only defines the syntax of the r-component and reserves it for future use. The exact semantics of the r-component, and how it's used in URN resolution protocols, are up for potential standardization in separate specifications. Those would presumably include specs that define conventions and a registry for resolution service identifiers ๐ง
Here's a hypothetical example: passing parameters to a resolution service, like an ISO alpha-2 country code [ISO.3166-1], to select the preferred country where you'd search for a physical copy of a book ๐ That could maybe be done by putting the country code in the r-component, giving URNs like:
urn:example:foo-bar-baz-qux?+CCResolve:cc=uk
While that should give you the general idea (and show what r-components are for), there are lots of open issues with them, including how they relate to resolution mechanisms tied to the particular URN namespace at registration time. Thus, r-components SHOULD NOT be used for URNs before their semantics have been standardized. Patience, bestie ๐
2.3.2. q-component
The q-component is for passing parameters to either the named resource or a system that can supply the requested service, so the resource or system can interpret them ๐ (Contrast that with the r-component from the previous section, which is for URN resolution services.)
The URN q-component has the same syntax as the URI query component, but it's introduced by ?=, not ? alone ๐ For a URN that may be resolved to a URI that's a locator, the q-component's semantics are identical to the query component of that URI. So URN resolvers returning a locator URI for a URN with a q-component do it by copying the q-component from the URN into the query component of the URI. There's an example of the copying operation further down โจ
This spec doesn't define a required behavior for when a URN resolves to a locator URI, the original URN has a q-component, and the URI has a query string. Different circumstances may need different approaches, so resolvers SHOULD document their strategy in such cases ๐
If the URN doesn't resolve to a locator URI, the interpretation of the q-component is undefined by this spec. For URNs that may be resolved to a locator URI, the q-component's semantics are identical to queries sent to the resource located via that URI ๐ฆ
For consistency with RFC 3986, the general syntax and semantics of q-components are not defined by, or dependent on, the URN namespace of the URN. Just like RFC 3986, the specifics of syntax and semantics (like which keywords or terms are meaningful) may of course depend on a particular URN namespace or even a particular resource ๐
The sequence ?= introduces the q-component. The q-component ends with a # character (number sign, which begins an f-component). If that character doesn't appear, the q-component continues to the end of the URN. The characters slash (/) and question mark (?) may represent data within the q-component. Note that characters outside the ASCII range [RFC20] MUST be percent-encoded using the method defined in Section 2.1 of the generic URI specification [RFC3986] ๐
As described in Section 3, the q-component SHALL NOT be taken into account when determining URN-equivalence. Same vibe as the r-component, but with a different job ๐
URN namespaces, and the way they place information in the syntax, SHOULD be designed to avoid any need for a resolution service to consider the q-component. Namespace-specific and more generic resolution systems MUST NOT require that q-component information be passed to them for processing. Resolvers shouldn't be grabbing the q-component, period ๐ซ
Here's a hypothetical example: passing parameters to an application that returns weather reports for different regions or different time periods โญ That could be done by putting latitude and longitude coordinates and datetimes in the URN's q-component, giving URNs like the following:
urn:example:weather?=op=map&lat=39.56
&lon=-104.85&datetime=1969-07-21T02:56:15Z
If this example resolved to an HTTP URI, the result might look like:
https://weatherapp.example?op=map&lat=39.56
&lon=-104.85&datetime=1969-07-21T02:56:15Z
2.3.3. f-component ๐ฆ
okay so the f-component is basically the client's little pointer ๐ to a specific spot inside a resource, or a region of it ๐. it's how you tell apart the bits that make up a resource named by a URN. for a URN that resolves to one or more locators you can dereference into a representation, or where the URN resolver just hands back a representation directly, the f-component means whatever the media type of that representation says it means โจ.
The URN f-component has the same syntax as the URI fragment component. If a URN with an f-component resolves to exactly one URI that's a locator for the named resource, the f-component can be applied (usually by the client) as the fragment of that URI ๐ . If the URN doesn't resolve to a URI that's a locator, this specification doesn't define what the f-component means ๐. so for URNs that can resolve to a locator, f-components act exactly like fragments for that resource, no cap ๐.
For the sake of consistency with RFC 3986, the f-component's general syntax and semantics are not defined by, and don't depend on, the URN namespace of the URN ๐ธ. in parallel with RFC 3986, the specifics of syntax and semantics (like which keywords or terms are meaningful) can totally depend on a particular URN namespace or even a particular resource ๐ง.
The f-component is introduced by the number sign (#) character and ends at the end of the URI. Any characters outside the ASCII range [RFC20] that appear in the f-component MUST be percent-encoded using the method defined in Section 2.1 of the generic URI specification [RFC3986] ๐ซถ.
As described in Section 3, the f-component SHALL NOT be taken into account when determining URN-equivalence ๐ โโ๏ธ.
Clients SHOULD NOT pass f-components to resolution services unless those services also perform object retrieval and interpretation functions ๐.
Consider the hypothetical example of obtaining resources that are part of a larger entity (say, the chapters of a book). Each part could be specified in the f-component, resulting in URNs such as:
urn:example:foo-bar-baz-qux#somepart
3. URN-Equivalence ๐
3.1. Procedure ๐
For various purposes such as caching, it is often desirable to determine if two URNs are "the same". This is done most generally (i.e., independent of the scheme) by testing for equivalence (see Section 6.1 of [RFC3986]) โจ.
The generic URI specification [RFC3986] is very flexible about equality comparisons, putting the focus on allowing false negatives and avoiding false positives ๐ฆ. if comparisons are made in a scheme-independent way, i.e., as URI comparisons only, lots of URNs that this specification considers equal would get rejected ๐ญ. the discussion below applies when the URIs involved are known to be URNs, and it uses the terms "URN-equivalent" and "URN-equivalence" to mean equivalence as specified in this document ๐.
Two URNs are URN-equivalent if their assigned-name portions are octet-by-octet equal after applying case normalization (as specified in Section 6.2.2.1 of [RFC3986]) to the following constructs:
- the URI scheme
urn, by conversion to lower case - the NID, by conversion to lower case
- any percent-encoded characters in the NSS (that is, all character triplets that match the
<pct-encoding>production found in Section 2.1 of the base URI specification [RFC3986]), by conversion to upper case for the digits A-F
Percent-encoded characters MUST NOT be decoded. In other words, percent-encoding normalization (as specified in Section 6.2.2.2 of [RFC3986]) MUST NOT be applied as part of the comparison process ๐ซ.
If an r-component, q-component, or f-component (or any combination thereof) is included in a URN, it MUST be ignored for purposes of determining URN-equivalence ๐.
URN namespace definitions MAY include additional rules for URN-equivalence, such as case insensitivity of the NSS (or parts thereof). Such rules MUST always have the effect of eliminating some of the false negatives obtained by the procedure above, and they MUST NOT result in treating two URNs as not "the same" if the procedure here says they are URN-equivalent ๐. for related considerations with regard to NID registration, see below ๐.
3.2. Examples ๐
This section shows a variety of URNs (using the "example" NID defined in [RFC6963]) that highlight the URN-equivalence rules ๐ .
First, because the scheme and NID are case insensitive, the following three URNs are URN-equivalent to each other:
urn:example:a123,z456URN:example:a123,z456urn:EXAMPLE:a123,z456
Second, because the r-component, q-component, and f-component are not taken into account for purposes of testing URN-equivalence, the following three URNs are URN-equivalent to the first three examples above:
urn:example:a123,z456?+abcurn:example:a123,z456?=xyzurn:example:a123,z456#789
Third, because the "/" character (and anything that follows it) in the NSS is taken into account for purposes of URN-equivalence, the following URNs are not URN-equivalent to each other or to the six preceding URNs:
urn:example:a123,z456/foourn:example:a123,z456/barurn:example:a123,z456/baz
Fourth, because of percent-encoding, the following URNs are URN-equivalent only to each other and not to any of those above. (Note that, although %2C is the percent-encoded transformation of "," from the previous examples, such sequences are not decoded for purposes of testing URN-equivalence ๐ง.)
urn:example:a123%2Cz456URN:EXAMPLE:a123%2cz456
Fifth, because characters in the NSS other than percent-encoded sequences are treated in a case-sensitive manner (unless otherwise specified for the URN namespace in question), the following URNs are not URN-equivalent to the first three URNs:
urn:example:A123,z456urn:example:a123,Z456
Sixth, on casual visual inspection of a URN presented in a human-oriented interface, the following URN might look the same as the first three URNs (because U+0430 CYRILLIC SMALL LETTER A can be confused with U+0061 LATIN SMALL LETTER A). But it is not URN-equivalent to the first three URNs ๐:
urn:example:%D0%B0123,z456
4. URI Conformance ๐
4.1. Use in URI Protocol Slots ๐งฉ
Because a URN is, syntactically, a URI under the "urn" scheme, in theory a URN can be placed in any protocol slot that allows for a URI. To name just a few: the "href" and "src" attributes in HTML, the base element in HTML, the "xml:base" attribute in XML [XML-BASE], and the "xmlns" attribute in XML for XML namespace names [XML-NAMES] โจ.
However, this doesn't mean that, semantically, it always makes sense in practice to put a URN in a given URI protocol slot. In particular, because a URN might not specify the location of a resource or even point indirectly to one, it might not be appropriate to place a URN in a URI protocol slot that points to a resource (e.g., the aforementioned "href" and "src" attributes) ๐ค.
Ultimately, guidelines about when it's appropriate to use URIs under the "urn" scheme (or any other scheme) are the responsibility of the specifications for individual URI protocol slots. (For example, the specification for the "xml:base" attribute in XML might recommend that it's inappropriate to use URNs in that protocol slot.) This specification can't possibly anticipate all of the relevant cases, and it's not its place to require or restrict usage for individual protocol slots ๐ซถ.
4.2. Parsing ๐
Partly because URN semantics are separated from more general URI syntax, generic URI processors need to pay special attention to the parsing and analysis rules of RFC 3986. In particular, they must treat the URI as opaque unless the scheme and its requirements are recognized. In the latter case, such processors may be in a position to invoke scheme-appropriate processing, e.g., by a URN resolver. A URN resolver can either be an external resolver that the URI resolver knows of, or be functionality built into the URI resolver. Note that this requirement might put constraints on the contexts in which URNs are appropriately used; see Section 4.1 ๐ธ.
4.3. URNs and Relative References ๐ฆ
Section 5.2 of [RFC3986] describes an algorithm for converting a URI reference that might be relative to a given base URI into "parsed components" of the target of that reference. Those components can then be recomposed per RFC 3986, Section 5.3 into a target URI. This algorithm is problematic for URNs, because their syntax doesn't support the necessary path components ๐ฌ. However, if the algorithm is applied independent of a particular scheme, it should work predictably for URNs as well, with the following understandings (syntax production terminology taken from RFC 3986):
- A system that encounters a
<URI-reference>that obeys the syntax for<relative-ref>, whether it explicitly has the scheme "urn" or not, will convert it into a target URI as specified in RFC 3986. - Because of the persistence and stability expectations of URNs, authors of documents, etc., that use URNs should generally avoid the use of the "urn" scheme in any
<URI-reference>that is not strictly a<URI>as specified in RFC 3986. This includes especially those that would require processing of<relative-ref>๐.
4.4. Transport and Display ๐บ
When URNs are transported and exchanged, they MUST be represented in the format defined herein. Further, URN-aware applications are strongly encouraged to offer the option of displaying URNs in this canonical form, so they can be directly transcribed (for example, by copy-and-paste techniques) ๐. Such applications might support displaying URNs in a more human-friendly form, and might use a character set that includes characters not permitted in URN syntax as defined in this specification. (For example, when displaying URNs to humans, such applications might replace percent-encoded strings with characters from an extended character repertoire such as Unicode [UNICODE].) ๐
To minimize user confusion, any application displaying URIs SHOULD display the complete URI (including, for URNs, the "urn" scheme and any components). That way there's no mix-up between URN NIDs and URI scheme identifiers ๐. For example, a URI beginning with urn:xmpp: [RFC4854] is very different from a URI beginning with xmpp: [RFC5122]. Similarly, a potential Digital Object Identifier (DOI) URI scheme [DOI-URI] is different from, and possibly completely unrelated to, a possible DOI URN namespace ๐ณ.
4.5. URI Design and Ownership ๐
As mentioned, the assignment of URNs within a URN namespace is a managed process, and so is the assignment of URN namespaces themselves. Although this specification cedes the design of the URNs to be assigned within a given URN namespace to the URN namespace manager, doing so in a managed way avoids the problems inherent in unmanaged generation of URIs, as described in the recommendations regarding URI design and ownership [RFC7320] ๐.
5. URN Namespaces โจ
okay so a URN namespace is basically a collection of names that has to follow three big rules, bestie ๐ (1) every name is unique, (2) names get assigned in a consistent way, and (3) everything runs off a common definition. no cap, these are the vibes that keep it iconic ๐ฆ
- The uniqueness rule means a name in the namespace is never given to more than one resource, and it never gets reassigned to a different resource (for the kind of "resource" that URNs in that namespace identify). this still holds even if the name gets deprecated or becomes obsolete ๐ฅน
- The consistent assignment rule means a name is either handed out by an organization or made by a process or algorithm that always gets followed. no random vibes allowed ๐ โโ๏ธ
- The common definition rule means there are clear definitions for what names in the namespace look like and for how they get assigned or created. everyone's on the same page ๐
A URN namespace gets identified by a particular NID. this does two jobs: it keeps URNs globally unique โจ and, if the namespace wants, it gives you a little cue about how the URNs inside it are structured ๐ง
About global uniqueness: using different NIDs for different collections of names means no two URNs will match for different resources, because every collection is required to uniquely assign each name ๐. BUT a single resource MAY have more than one URN assigned to it, either inside the same URN namespace (if that namespace allows it) or across different URN namespaces, and for similar purposes or totally different ones ๐ฏ. (for example, a publisher gives an electronic publication an ISBN [RFC3187]. later that publication gets tucked into a digital long-term archive run by a national library, and the library might give it a national bibliography number (NBN) [RFC3188]. now you've got two URNs pointing at the same book ๐๐) subject to other constraints, like the ones from the URI syntax [RFC3986], the URN scheme is meant to let you keep the normal, natural form of names from non-URN identifier systems when they get treated as URNs ๐ธ
About structure: how names in a URN namespace are built depends on what the community defining them needs, how the names get assigned and used, and so on ๐ค. that's way outside the scope of URN syntax and the general namespace rules, because it's specific to whichever community is defining a non-URN identifier system or a particular URN namespace. for example: the bibliographic and publishing folks for the "ISBN" namespace [RFC3187] and the "ISSN" namespace [RFC3044], or the developers of Extensible Messaging and Presence Protocol extensions [RFC6120] for the "XMPP" namespace [RFC4854] ๐
here's the tea โ: the colon (":") separates "urn" from the NID and the NID from the NSS, so it's super tempting to think the whole URN is structured by colons and that colons make a hierarchy inside the NSS part. nope, not implicitly! a particular NID spec could define structure like that, but there's no built-in structure. take this one:
urn:example:apple:pear:plum:cherry
the NSS is "apple:pear:plum:cherry" as one whole thing, and those colons have no special meaning inside it unless the specification of the "example" namespace says so ๐
URN namespaces also inherit some rights and responsibilities just from being URN namespaces, specifically:
- They uphold the general principles of a well-managed URN namespace by giving persistent identification to resources and unique assignment of names according to a common definition ๐ซถ
- Optionally, they can get registered in global registration services like the ones described in [RFC2483] ๐
there are two types of URN namespaces: formal and informal ๐. they're told apart by the expected level of service, the information needed to define them, and the registration procedures. since most of the URN namespaces registered so far have been formal, this document is going to focus on formal ones ๐
5.1. Formal URN Namespaces
okay a formal URN namespace has to provide benefit to some subset of users on the Internet ๐. it wouldn't make sense for one to only be used by a community or network that isn't connected to the Internet ๐. like, it would be inappropriate for a URN namespace to basically force someone into a proprietary network or service that isn't open to the general Internet user ๐ค. the whole point is that even if the crowd actively using the URNs is small, the potential use of names in that namespace is open to any user on the Internet ๐. formal namespaces can still be appropriate when some parts aren't fully open. for example, a namespace might use a fee-based, privately managed, or proprietary registry for assigning URNs โจ. even then, it might still benefit some Internet users if the associated services have openly published names ๐
an organization that's going to assign URNs within a formal URN namespace SHOULD meet these criteria:
- Organizational stability and the ability to keep maintaining the URN namespace for a long time. without that evidence, it ought to be clear how the namespace can stay viable if the organization can't maintain it anymore ๐ฅบ
- Competency in URN assignment. this makes persistence more likely (for example, it helps minimize the chance of conflicts) ๐ง
- Commitment to not reassigning existing URNs and to letting old URNs keep being valid. like, if the assignee isn't a member or customer of the assigning organization anymore, or if the info about the assignee or named entity changes, or even if the assignee or the named entity doesn't exist anymore, the URN is still valid. it doesn't expire just because the tea changed โ๐
a formal URN namespace establishes a particular NID, and it has to follow these constraints on top of the syntax rules we already covered:
- It MUST NOT be an already-registered NID. no copycats ๐ โโ๏ธ
- It MUST NOT start with "urn-", because that prefix is reserved for informal URN namespaces ๐ซ
- It MUST be more than two characters long, and it MUST NOT start with
ALPHA ALPHA "-", which means any string made of two letters followed by one hyphen. those strings are reserved for potential future NIDs based on ISO alpha-2 country codes [ISO.3166-1] for eventual national registrations of URN namespaces ๐ (the definition and scoping of rules for allocating responsibility for those country-code-based namespaces are beyond this document, so don't come for me on that one ๐ญ). as a consequence, it MUST NOT start with the string "xn--" or any other string made of two letters followed by two hyphens. those are reserved for potential representation of DNS A-labels and similar strings in the future [RFC5890] ๐งฉ - It MUST NOT start with the string "X-", so it won't get confused with or conflict with any experimental URN namespace that was previously permitted by [RFC3406] ๐ฅ
applicants and reviewers thinking about new NIDs should also know they may have semantic implications, and that makes them a possible source of conflict ๐. pay special attention to strings that could be read as identifiers for countries (including ISO 3166-1 alpha-3 codes), and to strings that might imply an association with existing URI schemes, non-URN identifier systems, or trademarks ๐. BUT, in line with traditional policies, disputes about "ownership" of particular strings are disagreements between the parties involved. neither IANA nor the IETF gets involved in those, except when a court of competent jurisdiction orders it โ๏ธ
5.2. Informal URN Namespaces
informal URN namespaces are full-fledged URN namespaces with all the same rights and responsibilities ๐. where they differ from formal ones is how the NID gets assigned: for an informal namespace, the registrant does NOT pick the NID. instead, IANA assigns it, and it's the string "urn-" followed by one or more digits (like "urn-7"), where the digits are the next available number in the sequence of positive integers assigned to informal namespaces ๐ข. so the syntax of an informal namespace identifier is:
InformalNamespaceName = "urn-" Number
Number = DigitNonZero 0*Digit
DigitNonZero = "1"/ "2" / "3" / "4"/ "5"
/ "6" / "7" / "8" / "9"
Digit = "0" / DigitNonZero
the only restrictions on <Number> are that it (1) consists strictly of ASCII digits, (2) has no leading zeros, and (3) doesn't make the NID exceed the length limits defined for URN syntax (see Section 2) ๐
6. Defining and Registering a URN Namespace ๐
6.1. Overview
because the space of URN namespaces is itself managed, the definition of a URN namespace SHOULD pay particular attention to these things ๐:
- The purpose of the URN namespace. ๐ฏ
- The syntax of URNs assigned within the namespace, including the internal syntax and anticipated effects of r-components or q-components. (the syntax and interpretation of f-components are defined in RFC 3986.) ๐งฉ
- The process for assigning URNs within the namespace. ๐ ๏ธ
- The security implications of assigning URNs within the namespace and of using the assigned URNs. ๐๐ญ
- Any potential interoperability issues with URNs assigned within the namespace. ๐ค
- Optionally, the process for resolving URNs assigned within the namespace. ๐
the section on completing the template (Section 6.4) explains all of this in more detail ๐. even though the registration templates are the same in every case, slightly different procedures get used depending on where the registration came from ๐ โจ
Okay bestie, picking up right where we left off ๐ โจ
6.2. Registration Policy and Process: Community Registrations
The basic registration policy for URN namespaces is Expert Review, as defined in the IANA Considerations document [RFC5226]. ๐ For URN namespaces (or their definitions) that are meant to become standards or parts of standards, the Expert Review process is supposed to produce a report, not direct instructions for IANA to do something. ๐ The key steps go like this:
- Fill out the URN namespace registration template (see Section 6.4 and Appendix A). ๐ You can do this as part of an Internet-Draft or a spec in another series, but that's not a requirement, so no pressure! ๐ซถ
- Send the completed template to the urn@ietf.org discussion list for review. ๐ฌ
- If you need to address comments you got, repeat steps 1 and 2. ๐
- If the Designated Experts approve the request and no standardization action is involved, IANA will register the requested NID. ๐ If standardization is expected, the Designated Experts will write up a report and forward it to the appropriate standards approval body (the IESG in the case of the IETF). IANA will only register the requested NID after getting directions from that body and a copy of the Expert Review report. ๐
A URN namespace registration can be revised by updating the registration template, following the same steps outlined above for new registrations. ๐ฆ A revised 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. ๐
Experience so far with URN namespace registration requests has shown that registrants sometimes don't initially get some of the subtleties of URN namespaces. ๐ Defining the namespace in the form of a specification helps registrants clearly write out their "contract" with the intended user community. ๐ค So even though the registration policy for formal URN namespaces is Expert Review, and a specification (as distinct from the registration template) isn't strictly required, registrants SHOULD provide a stable specification documenting the URN namespace definition and expanding upon the issues described here. ๐โจ
Naming can be difficult and contentious, so URN namespace registrants and the Designated Experts are strongly encouraged to work together in a spirit of good faith and mutual understanding to reach rough consensus (see [RFC7282]) on handling registration requests. ๐ They're also encouraged to bring in additional expertise if that would help with perspective or resolving issues. ๐ง
Especially when iterations in the registration process drag on, Designated Experts are expected to take reasonable precautions to avoid "race conditions" on proposed NIDs. ๐ญ If those situations come up, they should encourage applicants to work out any conflicts among themselves. ๐ซถ
6.3. Registration Policy and Process: Fast Track for Standards Development Organizations, Scientific Societies, and Similar Bodies
The IETF knows that URN namespaces will sometimes be created to embed existing, established standards (especially identifier standards), or to reflect knowledge, terminology, or ways of organizing information that are well outside the IETF's scope or outside what the Designated Experts are likely to know. ๐ง When the registration request comes from, or is authorized by, a recognized standards development organization, scientific society, or their designees, there's a somewhat different procedure available if that body wants to use it: ๐
- The URN namespace registration template is filled out and submitted, just like steps 1 and 2 of Section 6.2. ๐
- A specification is required that reflects or points to the needed external standards or specifications. ๐ Publishing it in the RFC Series or through an IETF process (for example, posting as an Internet-Draft) is not expected, and would only be appropriate under very unusual circumstances. ๐
- The reviews on the discussion list and by the Designated Experts are strictly advisory. The decisions about which advice to accept, and how long to spend on the process, are strictly under the control of the external body. ๐
- When that body decides the application is mature enough, its representative(s) will ask IANA to complete the registration for the NID, and IANA will do it. ๐
Decisions about whether to recognize the requesting entity as a standards development organization or scientific society are the responsibility of the IESG. ๐๏ธ
A similar model has already been defined for recognized standards development organizations that want to register media types. ๐ธ The document describing that mechanism [RFC6838] gives somewhat more information about the general approach. โจ
6.4. Completing the Template
A template for defining and registering a URN namespace is provided in Appendix A. ๐ This section covers considerations for filling it out. ๐
6.4.1. Purpose
The "Purpose" section of the template describes matters such as: ๐ฏ
- The kinds of resources identified by URNs assigned within the URN namespace. ๐ฆ
- The scope and applicability of the URNs assigned within the URN namespace. This might include information about the community of use (e.g., a particular nation, industry, technology, or organization), and whether the assigned URNs will be used on public networks or private networks, etc. ๐
- How the intended community (and the Internet community at large) will benefit from using or resolving the assigned URNs. ๐
- How the URN namespace relates to and complements existing URN namespaces, URI schemes, and non-URN identifier systems. ๐งฉ
- The kinds of software applications that can use or resolve the assigned URNs (e.g., by differentiating among disparate URN namespaces, identifying resources in a persistent fashion, or meaningfully resolving and accessing services associated with the URN namespace). ๐ค
- Whether resolution services are available or will be available (and, if so, the nature or identity of the services). Examples of q-component and (when they are standardized) r-component semantics and syntax are helpful here, even if detailed definitions are provided elsewhere or later. ๐โจ
- Whether the URN namespace or its definition is expected to become a constituent part of a standard being developed in the IETF or some other recognized standards body. ๐
6.4.2. Syntax
The "Syntax" section of the template contains: ๐ง
- A description of the structure of URNs within the URN namespace, in conformance with the fundamental URN syntax. ๐ The structure might be described with a formal definition (e.g., using ABNF [RFC5234]), an algorithm for generating conformant URNs, or a regular expression for parsing the name into constituent parts. Alternatively, the structure might be opaque. ๐ซฅ
- Any special character encoding rules for assigned URNs (e.g., which character ought to always be used for quotes). ๐ค
- Rules for determining URN-equivalence between two names in the URN namespace. ๐ Such rules ought to always have the effect of eliminating false negatives that might otherwise result from comparison. If it's appropriate and helpful, you can reference particular equivalence rules defined in the URI specification [RFC3986] or in Section 3 of this document. Examples of URN-equivalence rules include equivalence between uppercase and lowercase characters in the NSS, between hyphenated and non-hyphenated groupings in the name, or between single quotes and double quotes. There may also be namespace-specific special encoding considerations, especially for URNs that contain embedded forms of names from non-URN identifier systems. (Note that these are not normative statements for any kind of best practice related to handling of relationships between characters in general; such statements are limited to one particular URN namespace only.) ๐
- Any special considerations necessary for conforming with the URN syntax. ๐ง This is especially relevant for existing, non-URN identifier systems that are used in the context of URNs. For example, if a non-URN identifier system is used in contexts other than URNs, it might use characters that are reserved in the URN syntax. This section ought to note any such characters and outline the necessary mappings to conform to URN syntax. Normally, this is handled by percent-encoding the character as specified in Section 2.1 of the URI specification [RFC3986] and as discussed in Section 1.2.2 of this specification. ๐ท
- Any special considerations for the meaning of q-components (e.g., keywords) or f-components (e.g., predefined terms) in the context of this URN namespace. ๐๏ธ
6.4.3. Assignment
The "Assignment" section of the template describes matters such as: ๐ฆ
- Mechanisms or authorities for assigning URNs to resources. โ๏ธ It ought to make clear whether assignment is completely open (e.g., following a particular procedure such as first-come, first-served (FCFS)), completely closed (e.g., for a private organization), or limited in various ways (e.g., delegated to authorities recognized by a particular organization). If it's limited, it ought to explain how to become an assigner of names, or how to request assignment of names from existing assignment authorities. ๐ช
- Methods for ensuring that URNs within the URN namespace are unique. ๐ For example, names might be assigned sequentially or in accordance with some well-defined process by a single authority, assignment might be partitioned among delegated authorities that are individually responsible for respecting uniqueness rules, or URNs might be created independently following an algorithm that itself guarantees uniqueness. ๐งฎ
6.4.4. Security and Privacy
The "Security and Privacy" section of the template describes any potential issues related to security and privacy with regard to assignment, use, and resolution of names within the URN namespace. ๐จ Examples of such issues include: ๐ฑ
- The consequences of producing false negatives and false positives during comparison for URN-equivalence (see Section 3.1 of this specification and "Issues in Identifier Comparison for Security Purposes" [RFC6943]). โ ๏ธ
- Leakage of private information when names are communicated on the public Internet. ๐ต๏ธโโ๏ธ
- The potential for directory harvesting. ๐พ
- Various issues discussed in the guidelines for security considerations in RFCs [RFC3552] and the privacy considerations for Internet protocols [RFC6973]. ๐ In particular, note the privacy considerations text for the Global System for Mobile Communications Association (GSMA) / International Mobile station Equipment Identity (IMEI) namespace [RFC7254], which may provide a useful model for such cases. ๐ฑ๐
6.4.5. Interoperability ๐ซถ
Okay bestie, the Interoperability section is where you spill the tea on any known issues that could make things messy with other stuff. The MUST here is non-negotiable: you have to list every known potential issue. Think confusion with other URN namespaces, non-URN identifier systems, or URI schemes, whether that's because of syntax (like percent-encoding of certain characters) or scope (like overlapping areas of interest). ๐ If you can manage it, sort out those concerns during registration, or at the same time as the process, so nobody's stuck with drama later. ๐ธ
6.4.6. Resolution ๐
The Resolution section is all about whether resolution mechanisms are intended or expected for URNs in your namespace. This one is a MUST, so you can't skip it. ๐
If resolution is on the table, then you SHOULD say whether the assigning organization plans to run or recommend any resolution services for URNs in that namespace. โจ And if the organization wants to register publicly advertised resolution services (say, using a system in the spirit of the original architectural principles and service descriptions for URN resolution [RFC2276] [RFC2483]), then you SHOULD list or reference the requirements for being publicly advertised. ๐ Last but not least, you SHOULD describe any special considerations for handling r-components in this URN namespace. ๐ฆ
6.4.7. Additional Information ๐ง
This is the spot for extra info that helps people understand the registration or how it connects to other registrations, like comparisons to existing URN namespaces that might look like they overlap. ๐ This section is optional, so you don't have to include it if you don't need it. ๐
7. IANA Considerations ๐
7.1. URI Scheme ๐
This section updates the registration of the "urn" URI scheme in the Permanent URI Registry [URI-Registry]. Here's the full registration, exactly as it's written:
URI Scheme Name: urn
Status: permanent
URI Scheme Syntax: See Section 2 of RFC 8141.
URI Scheme Semantics: The "urn" scheme identifies Uniform Resource
Names, which are persistent, location-independent resource
identifiers.
Encoding Considerations: See Section 2 of RFC 8141.
Applications/Protocols That Use This URI Scheme Name: Uniform
Resource Names are used in a wide variety of applications,
including bibliographic reference systems and as names for
Extensible Markup Language (XML) namespaces.
Interoperability Considerations: See Section 4 of RFC 8141.
Security Considerations: See Sections 6.4.4 and 8 of RFC 8141.
Contact: URNBIS working group [mailto:urn@ietf.org]
Author/Change Controller: This scheme is registered under the IETF
tree. As such, the IETF maintains change control.
References: None.
7.2. Registration of URN Namespaces ๐
This document lays out how URN namespaces get registered, and it has consequences for IANA in terms of the registries that need maintaining (see especially Section 6). โจ In every case, IANA ought to assign the right NID (formal or informal) once the procedures in Section 6 are finished. ๐
7.3. Discussion List for New and Updated NID Registrations ๐ฌ
As covered elsewhere in this document, the discussion list in RFC 3406 (urn-nid@apps.ietf.org) has been discontinued and replaced by urn@ietf.org. So update your bookmarks, bestie. ๐ซถ
8. Security and Privacy Considerations ๐
Defining a URN namespace means you have to think about security and privacy issues tied to assigning, using, and resolving names in that namespace. โ ๏ธ For example, some URN resolvers might give special meaning to certain characters in the NSS. See Section 6.4.4 for the full tea on this. ๐ญ
Most of the time, URN namespaces are a way to declare public information. These declarations usually have a fairly low security profile, but there's always a risk of "spoofing" and passing along misinformation. ๐ So information in these declarations ought to be treated as advisory. ๐
9. References ๐
9.1. Normative References ๐ฆ
[RFC20] Cerf, V., "ASCII format for network interchange", STD 80,
RFC 20, DOI 10.17487/RFC0020, October 1969,
<http://www.rfc-editor.org/info/rfc20>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
<http://www.rfc-editor.org/info/rfc2119>.
[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
Resource Identifier (URI): Generic Syntax", STD 66,
RFC 3986, DOI 10.17487/RFC3986, January 2005,
<http://www.rfc-editor.org/info/rfc3986>.
[RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an
IANA Considerations Section in RFCs", BCP 26, RFC 5226,
DOI 10.17487/RFC5226, May 2008,
<http://www.rfc-editor.org/info/rfc5226>.
[RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax
Specifications: ABNF", STD 68, RFC 5234,
DOI 10.17487/RFC5234, January 2008,
<http://www.rfc-editor.org/info/rfc5234>.
9.2. Informative References โจ
okay bestie, these are the background reads and the receipts ๐๐ here's the whole list, every detail intact ๐ซถ
[DOI-URI] Paskin, N., Neylon, E., Hammond, T., and S. Sun, "The
"doi" URI Scheme for the Digital Object Identifier (DOI)",
Work in Progress, draft-paskin-doi-uri-04, June 2003.
[IANA-URN] Saint-Andre, P. and M. Cotton, "A Uniform Resource Name
(URN) Namespace for IANA Registries", Work in Progress,
draft-saintandre-iana-urn-01, February 2013.
[ISO.27729.2012]
ISO, "Information and documentation - International
standard name identifier (ISNI)", ISO 27729:2012,
Technical Committee ISO/TC 46, Information and
documentation, Subcommittee SC 9, Identification and
description, March 2012.
[ISO.3166-1]
ISO, "Codes for the representation of names of countries
and their subdivisions -- Part 1: Country codes",
ISO 3166-1:2013, November 2013.
[RFC1737] Sollins, K. and L. Masinter, "Functional Requirements for
Uniform Resource Names", RFC 1737, DOI 10.17487/RFC1737,
December 1994, <http://www.rfc-editor.org/info/rfc1737>.
[RFC1738] Berners-Lee, T., Masinter, L., and M. McCahill, "Uniform
Resource Locators (URL)", RFC 1738, DOI 10.17487/RFC1738,
December 1994, <http://www.rfc-editor.org/info/rfc1738>.
[RFC1808] Fielding, R., "Relative Uniform Resource Locators",
RFC 1808, DOI 10.17487/RFC1808, June 1995,
<http://www.rfc-editor.org/info/rfc1808>.
[RFC2141] Moats, R., "URN Syntax", RFC 2141, DOI 10.17487/RFC2141,
May 1997, <http://www.rfc-editor.org/info/rfc2141>.
[RFC2276] Sollins, K., "Architectural Principles of Uniform Resource
Name Resolution", RFC 2276, DOI 10.17487/RFC2276, January
1998, <http://www.rfc-editor.org/info/rfc2276>.
[RFC2483] Mealling, M. and R. Daniel, "URI Resolution Services
Necessary for URN Resolution", RFC 2483,
DOI 10.17487/RFC2483, January 1999,
<http://www.rfc-editor.org/info/rfc2483>.
[RFC2648] Moats, R., "A URN Namespace for IETF Documents", RFC 2648,
DOI 10.17487/RFC2648, August 1999,
<http://www.rfc-editor.org/info/rfc2648>.
[RFC3044] Rozenfeld, S., "Using The ISSN (International Serial
Standard Number) as URN (Uniform Resource Names) within an
ISSN-URN Namespace", RFC 3044, DOI 10.17487/RFC3044,
January 2001, <http://www.rfc-editor.org/info/rfc3044>.
[RFC3187] Hakala, J. and H. Walravens, "Using International Standard
Book Numbers as Uniform Resource Names", RFC 3187,
DOI 10.17487/RFC3187, October 2001,
<http://www.rfc-editor.org/info/rfc3187>.
[RFC3188] Hakala, J., "Using National Bibliography Numbers as
Uniform Resource Names", RFC 3188, DOI 10.17487/RFC3188,
October 2001, <http://www.rfc-editor.org/info/rfc3188>.
[RFC3406] Daigle, L., van Gulik, D., Iannella, R., and P. Faltstrom,
"Uniform Resource Names (URN) Namespace Definition
Mechanisms", BCP 66, RFC 3406, DOI 10.17487/RFC3406,
October 2002, <http://www.rfc-editor.org/info/rfc3406>.
[RFC3552] Rescorla, E. and B. Korver, "Guidelines for Writing RFC
Text on Security Considerations", BCP 72, RFC 3552,
DOI 10.17487/RFC3552, July 2003,
<http://www.rfc-editor.org/info/rfc3552>.
[RFC4854] Saint-Andre, P., "A Uniform Resource Name (URN) Namespace
for Extensions to the Extensible Messaging and Presence
Protocol (XMPP)", RFC 4854, DOI 10.17487/RFC4854, April
2007, <http://www.rfc-editor.org/info/rfc4854>.
[RFC5122] Saint-Andre, P., "Internationalized Resource Identifiers
(IRIs) and Uniform Resource Identifiers (URIs) for the
Extensible Messaging and Presence Protocol (XMPP)",
RFC 5122, DOI 10.17487/RFC5122, February 2008,
<http://www.rfc-editor.org/info/rfc5122>.
[RFC5890] Klensin, J., "Internationalized Domain Names for
Applications (IDNA): Definitions and Document Framework",
RFC 5890, DOI 10.17487/RFC5890, August 2010,
<http://www.rfc-editor.org/info/rfc5890>.
[RFC6120] Saint-Andre, P., "Extensible Messaging and Presence
Protocol (XMPP): Core", RFC 6120, DOI 10.17487/RFC6120,
March 2011, <http://www.rfc-editor.org/info/rfc6120>.
[RFC6288] Reed, C., "URN Namespace for the Defence Geospatial
Information Working Group (DGIWG)", RFC 6288,
DOI 10.17487/RFC6288, August 2011,
<http://www.rfc-editor.org/info/rfc6288>.
[RFC6648] Saint-Andre, P., Crocker, D., and M. Nottingham,
"Deprecating the "X-" Prefix and Similar Constructs in
Application Protocols", BCP 178, RFC 6648,
DOI 10.17487/RFC6648, June 2012,
<http://www.rfc-editor.org/info/rfc6648>.
[RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type
Specifications and Registration Procedures", BCP 13,
RFC 6838, DOI 10.17487/RFC6838, January 2013,
<http://www.rfc-editor.org/info/rfc6838>.
[RFC6943] Thaler, D., Ed., "Issues in Identifier Comparison for
Security Purposes", RFC 6943, DOI 10.17487/RFC6943, May
2013, <http://www.rfc-editor.org/info/rfc6943>.
[RFC6963] Saint-Andre, P., "A Uniform Resource Name (URN) Namespace
for Examples", BCP 183, RFC 6963, DOI 10.17487/RFC6963,
May 2013, <http://www.rfc-editor.org/info/rfc6963>.
[RFC6973] Cooper, A., Tschofenig, H., Aboba, B., Peterson, J.,
Morris, J., Hansen, M., and R. Smith, "Privacy
Considerations for Internet Protocols", RFC 6973,
DOI 10.17487/RFC6973, July 2013,
<http://www.rfc-editor.org/info/rfc6973>.
[RFC7254] Montemurro, M., Ed., Allen, A., McDonald, D., and P.
Gosden, "A Uniform Resource Name Namespace for the Global
System for Mobile Communications Association (GSMA) and
the International Mobile station Equipment Identity
(IMEI)", RFC 7254, DOI 10.17487/RFC7254, May 2014,
<http://www.rfc-editor.org/info/rfc7254>.
[RFC7282] Resnick, P., "On Consensus and Humming in the IETF",
RFC 7282, DOI 10.17487/RFC7282, June 2014,
<http://www.rfc-editor.org/info/rfc7282>.
[RFC7320] Nottingham, M., "URI Design and Ownership", BCP 190,
RFC 7320, DOI 10.17487/RFC7320, July 2014,
<http://www.rfc-editor.org/info/rfc7320>.
[RFC7462] Liess, L., Ed., Jesske, R., Johnston, A., Worley, D., and
P. Kyzivat, "URNs for the Alert-Info Header Field of the
Session Initiation Protocol (SIP)", RFC 7462,
DOI 10.17487/RFC7462, March 2015,
<http://www.rfc-editor.org/info/rfc7462>.
[RFC7613] Saint-Andre, P. and A. Melnikov, "Preparation,
Enforcement, and Comparison of Internationalized Strings
Representing Usernames and Passwords", RFC 7613,
DOI 10.17487/RFC7613, August 2015,
<http://www.rfc-editor.org/info/rfc7613>.
[UAX31] The Unicode Consortium, "Unicode Standard Annex #31:
Unicode Identifier and Pattern Syntax", Unicode 9.0.0,
June 2015, <http://unicode.org/reports/tr31/>.
[UNICODE] The Unicode Consortium, "The Unicode Standard",
<http://www.unicode.org/versions/latest/>.
[URI-Registry]
IANA, "Uniform Resource Identifier (URI) Schemes",
<http://www.iana.org/assignments/uri-schemes>.
[XML-BASE] Marsh, J. and R. Tobin, "XML Base (Second Edition)", W3C
Recommendation REC-xmlbase-20090128, January 2009,
<http://www.w3.org/TR/2009/REC-xmlbase-20090128>.
[XML-NAMES]
Thompson, H., Hollander, D., Layman, A., Bray, T., and R.
Tobin, "Namespaces in XML 1.0 (Third Edition)", W3C
Recommendation REC-xml-names-20091208, December 2009,
<http://www.w3.org/TR/2009/REC-xml-names-20091208>.
Appendix A. Registration Template ๐
okay this is the fill-in-the-blanks form, so every field name below is the exact label you write ๐
Namespace Identifier: Asked for from IANA if it's formal, or handed out by IANA if it's informal. ๐ง
Version: The version of the registration. It starts at 1 and goes up by 1 with each new version. ๐ข
Date: The date the registration gets requested from IANA, written in the format YYYY-MM-DD. ๐
Registrant: The person or org that registered the NID. That includes the name and address of the registering org, plus the name and contact info (email, phone number, or postal address) of the designated contact person. If the registrant is a recognized standards development organization, scientific society, or similar body asking for the fast-track registration procedure (see Section 6.3), that info should be clearly indicated in this section of the template. ๐
Purpose: Described in Section 6.4.1 of this document. ๐ธ
Syntax: Described in Section 6.4.2 of this document. Unless the registration explicitly describes the semantics of r-components, q-components, and f-components in the context of this URN namespace, those semantics are undefined. ๐ฆ
Assignment: Described in Section 6.4.3 of this document. ๐
Security and Privacy: Described in Section 6.4.4 of this document. ๐
Interoperability: Described in Section 6.4.5 of this document. ๐ซถ
Resolution: Described in Section 6.4.6 of this document. โจ
Documentation: A pointer to an RFC, a specification published by another standards development organization, or another stable document that gives more info about this URN namespace. ๐
Additional Information: Described in Section 6.4.7 of this document. ๐
Revision Information: A description of changes from prior version(s). This only applies when earlier registrations have been revised. ๐
Appendix B. Changes from RFC 2141 ๐ฆ
okay so this appendix is the glow-up story: what changed from the original URN syntax ๐ the substantive changes are listed below.
B.1. Syntax Changes from RFC 2141 โจ
the URN syntax in [RFC2141] was written before the updated URI spec in [RFC3986] existed, so this document updates the URN definition to do the following:
- Ensure consistency with the URI syntax. ๐
- Facilitate the use of URNs with parameters similar to URI queries and fragments. ๐ง
- Permit parameters influencing URN resolution. ๐ฅ
- Ease the use of URNs with non-URN identifier systems that include the "/" character. ๐ธ
in particular, this specification does the following: ๐
- Extends URN syntax to explicitly allow the characters "/", "?", and "#", which were reserved for future use by RFC 2141. This change also effectively allows several components of the URI syntax, although without necessarily tying those components to URI semantics. ๐
- Defines general syntax for an additional component that can be used in interactions with a URN resolution service. โจ
- Disallows "-" at the end of the NID. ๐
- Allows the "/", "~", and "&" characters in the NSS. ๐
- Makes several smaller syntax adjustments. ๐
B.2. Other Changes from RFC 2141 ๐ฆ
- Formally registers
urnas a URI scheme. ๐ - Allows what are now called r-components, q-components, and f-components. โจ
In addition, some of the text has been updated so it matches the URI definition in [RFC3986] and the IANA registration processes in [RFC5226]. It also picks up more modern guidance on security [RFC3552], privacy [RFC6973], and identifier comparison [RFC6943]. ๐ธ
Appendix C. Changes from RFC 3406 ๐
This document makes the following substantive changes from [RFC3406]: ๐
- Relaxes the registration policy for formal URN namespaces from "IETF Review" to "Expert Review" as discussed in Section 6.2. ๐
- Removes the category of experimental URN namespaces, consistent with [RFC6648]. ๐ Experimental URN namespaces used to be denoted by prefixing the namespace identifier with the string "X-". Because experimental URN namespaces were never registered, removing that category has no impact on the existing registries. Because experimental URN namespaces are not managed, strings conforming to URN syntax within experimental URN namespaces are not valid URNs. Truly experimental usages may, of course, employ the "example" namespace [RFC6963]. ๐ง
- Adds some information to, but generally simplifies, the URN namespace registration template. ๐
Acknowledgements ๐ซถ
Many thanks to Marc Blanchet, Leslie Daigle, Martin Duerst, Juha Hakala, Ted Hardie, Alfred Hoenes, Paul Jones, Barry Leiba, Sean Leonard, Larry Masinter, Keith Moore, Mark Nottingham, Julian Reschke, Lars Svensson, Henry S. Thompson, Dale Worley, and everyone else in the URNBIS working group for their input. ๐ Alfred Hoenes in particular edited an earlier draft version of this document and served as co-chair of the URNBIS working group. ๐
Juha Hakala deserves special recognition for his dedication to successfully completing this work. ๐ฅ The same goes for Andrew Newton and Melinda Shore in their roles as working group co-chairs, and for Barry Leiba in his role as area director and then as co-chair. ๐ญ
Contributors ๐
RFC 2141, which provided the basis for the syntax portion of this document, was authored by Ryan Moats. ๐ฆ
RFC 3406, which provided the basis for the namespace portion of this document, was authored by Leslie Daigle, Dirk-Willem van Gulik, Renato Iannella, and Patrik Faltstrom. ๐ง
Their work is gratefully acknowledged. ๐ โจ
Authors' Addresses ๐
Peter Saint-Andre
Filament
P.O. Box 787
Parker, CO 80134
United States of America
Phone: +1 720 256 6756
Email: peter@filament.com
URI: <https://filament.com/>
John C. Klensin
1770 Massachusetts Ave, Ste 322
Cambridge, MA 02140
United States of America
Phone: +1 617 245 1457
Email: john-ietf@jck.com
๐ฆ where this page comes from
- ietf: rfc8141 2017-04
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms