RFC 3368 PROPOSED STANDARD URI · NAMING · CNRP

The 'go' URI Scheme for the Common Name Resolution Protocol

A compact URI format for pointing at a common-name lookup, or at one record on one server.

On rfc-editor.org ↗
PUBLISHED
August 2002
AUTHORS
M. Mealling
STREAM
Legacy
SCHEME NAME
go
DEFAULT CNRP HTTP PORT
1096
EMPTY SERVER MEANS
localhost
CHARACTER ENCODING
UTF-8 with %hex escapes
DOI
10.17487/RFC3368

RFC text

Contents
Original text · RFC Editor View on rfc-editor.org ↗
Network Working Group                                        M. Mealling
Request for Comments: 3368                                VeriSign, Inc.
Category: Standards Track                                    August 2002


      The 'go' URI Scheme for the Common Name Resolution Protocol

Status of this Memo

   This document specifies an Internet standards track protocol for the
   Internet community, and requests discussion and suggestions for
   improvements.  Please refer to the current edition of the "Internet
   Official Protocol Standards" (STD 1) for the standardization state
   and status of this protocol.  Distribution of this memo is unlimited.

Copyright Notice

   Copyright (C) The Internet Society (2002).  All Rights Reserved.

Abstract

   This document defines a URI scheme, 'go:' to be used with the Common
   Name Resolution Protocol.  Specifically it lays out the syntactic
   components and how those components are used by URI Resolution to
   find the available transports for a CNRP service.  Care should be
   taken with several of the URI components because, while they may look
   like components found in other URI schemes, they often do not act
   like them.  The "go" scheme has more in common with the location
   independent "news" scheme than any other URI scheme.

Table of Contents

   1.    Goals  . . . . . . . . . . . . . . . . . . . . . . . . . . .  2
   2.    Terminology  . . . . . . . . . . . . . . . . . . . . . . . .  2
   3.    Syntax Rules . . . . . . . . . . . . . . . . . . . . . . . .  3
   3.1   General Syntax . . . . . . . . . . . . . . . . . . . . . . .  3
   3.2   ABNF Grammar . . . . . . . . . . . . . . . . . . . . . . . .  3
   3.3   Special Cases and Default Values . . . . . . . . . . . . . .  4
   3.3.1 If There is Only a Server  . . . . . . . . . . . . . . . . .  4
   3.3.2 If Server is Empty Then server=localhost . . . . . . . . . .  4
   3.3.3 Default Port . . . . . . . . . . . . . . . . . . . . . . . .  4
   3.4   Encoding Rules . . . . . . . . . . . . . . . . . . . . . . .  4
   4.    Transport Independence . . . . . . . . . . . . . . . . . . .  4
   5.    Examples . . . . . . . . . . . . . . . . . . . . . . . . . .  4
   6.    Security Considerations  . . . . . . . . . . . . . . . . . .  5
   7.    IANA Considerations  . . . . . . . . . . . . . . . . . . . .  5
         References . . . . . . . . . . . . . . . . . . . . . . . . .  6
   A.    Registration Template  . . . . . . . . . . . . . . . . . . .  7
         Author's Address . . . . . . . . . . . . . . . . . . . . . .  7
         Full Copyright Statement . . . . . . . . . . . . . . . . . .  8

1. Goals

   The two goals of the CNRP [3] URI [1] are to identify both a specific
   common-name record at a specific server and to identify a possibly
   dynamic query or entry point into the query process.  Since CNRP
   requires that the ID be a core query term, these two cases can be
   generalized down to simply specifying a query that contains only the
   ID of the item.

   On first glance it would seem a simple enough exercise to
   canonicalize the XML encoded query and then insert it into the query
   portion of the URL.  The problem here is that, due to the encoding
   rules, any remotely complex query will quickly blow out the URI
   length limitations.  The suggested solution is to provide a
   simplified query syntax that is a subset of what is available via the
   XML.

2. Terminology

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in RFC 2119 [4].

3. Syntax Rules

3.1 General Syntax

   The CNRP URI comes in two forms.  The first form is for talking to a
   specific server.  The second form is for expressing a query that is
   meant to be sent to several different CNRP services.  The following
   two examples are for pedagogical purposes only.  The complete ABNF
   grammar in Section 3.2 is the only authoritative syntax definition.

   go://[<host>]?[<common-name>]*[;<attribute>=[<type>,]<value>]

   and

   go:<common-name>*[;<attribute>=[<type>,]<value>]

3.2 ABNF Grammar

   The full ABNF [2] (certain values are included by reference from RFC
   2396 [1]):

   cnrp-uri      = "go:" (form1 / form2)
   form1         = "//" [server] ["?" ((common-name *avpair) / id-req) ]
   form2         = common-name *avpair

   id-req        = "id=" value
   avpair        = ";" attribute "=" [ type "," ] value

   server        = // as specified in RFC2396

   common-name     = *(unreserved | escaped)
   attribute       = *(unreserved | escaped)
   value           = *(unreserved | escaped)
   type            = *(unreserved | escaped)

   unreserved      = // as specified in RFC2396

   escaped       = "%" hex hex
   hex           = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" |
                   "8" | "9" | "A" | "B" | "C" | "D" | "E" | "F" |
                   "a" | "b" | "c" | "d" | "e" | "f"

3.3 Special Cases and Default Values

3.3.1 If There is Only a Server

   In the case where the CNRP URI contains only the server production
   then the URI identifies a given CNRP server, not any particular query
   that is to be done.  A client can assume that this server will at
   least answer the 'servicequery' request.

3.3.2 If Server is Empty Then server=localhost

   If the 'server' element has no value then its value MUST be assumed
   to be "localhost".

3.3.3 Default Port

   CNRP's well known HTTP transport port is 1096.  If the port value
   portion of the server production is not specified then port 1096
   SHOULD be used if the client has no prior knowledge about other ports
   or transports that the service may support.

3.4 Encoding Rules

   The common-name, query parameters, and parameter values must be
   encoded using the UTF-8 encoding scheme [5], and any octet that is
   not one of the permitted characters per the above grammar MUST
   instead be represented by a "%" followed by two characters from the
   <hex> character set above.  The two characters give the hexadecimal
   representation of that octet.

4. Transport Independence

   As stated in the CNRP protocol specification [3], CNRP is allowed to
   be expressed over multiple transport protocols with HTTP being
   mandatory to implement.  In the case where a client attempts to
   resolve a CNRP URI and it knows nothing about the service being
   referenced in that URI, then it SHOULD use HTTP on the CNRP default
   port (1096).

5. Examples

   go:Mercedes%20Benz
      This example shows a general query for the common-name "Mercedes
      Benz".  The intent is that the query should be packaged with any
      client provided defaults and sent to the one or more services that
      the client has configured to ask.

   go://?Mercedes%20Benz
      This example shows a general query for the common-name "Mercedes
      Benz" that is sent to the server running on the 'localhost'.

   go://cnrp.foo.com?Mercedes%20Benz;geography=US-ga
      This example shows a query for the common-name "Mercedes Benz" in
      the geographic area "US-ga" which should be sent to the server
      found at cnrp.foo.com.

   go://cnrp.foo.org?Martin%20J.%20D%C3%BCrst
      This example includes a UTF-8 character encoded using hex
      escaping.  The value encoded is a u-umlaut (a 'u' with two dots
      over it).  This simple query is sent to a server found at
      cnrp.foo.org with no parameters.

   go://cnrp.foo.com?id=5432345
      Here only an id is given which means that his example points
      directly at a particular common-name record on a particular
      server.  This example would probably be found in a link on a web
      page of some type.

6. Security Considerations

   In addition to the security considerations inherent in CNRP itself
   (see the Security Considerations section of RFC 3367 [3]), the URI
   mechanism can also be used to retrieve a URI identifying some other
   site by including just the ID and not the common-name being linked
   to.  I.e., the user may think he/she is being shown the URI currently
   mapped to the "BMW" common-name but in the case where only the ID is
   used the actual common-name is not part of the URI, thus making it
   possible to use a CNRP URI without knowing which common-name it is
   referring to.

7. IANA Considerations

   The IANA is asked to register the URL registration template found in
   Appendix A in accordance with RFC 2717 [6].

References

   [1]  Berners-Lee, T., Fielding, R. and L. Masinter, "Uniform Resource
        Identifiers (URI): Generic Syntax", RFC 2396, August 1998.

   [2]  Crocker, D., "Augmented BNF for Syntax Specifications: ABNF",
        RFC 2234, November 1997.

   [3]  Popp, N., Mealling, M. and M. Moseley, "Common Name Resolution
        Protocol (CNRP)", RFC 3367, August 2002.

   [4]  Bradner, S., "Key words for use in RFCs to Indicate Requirement
        Levels", BCP 14, RFC 2119, March 1997.

   [5]  The Unicode Consortium, "The Unicode Standard, Version 2.0:
        Appendix A.2", ISBN 0-201-48345-9, January 1988.

   [6]  Petke, R. and I. King, "Registration Procedures for URL Scheme
        Names", BCP 35, RFC 2717, November 1999.

Appendix A. Registration Template

   URL scheme name: go

   URL scheme syntax: Section 3.2

   Character encoding considerations: Section 3.4

   Intended usage: Section 1

   Applications and/or protocols which use this scheme: [3]

   Interoperability considerations: None not specified in [3]

   Security considerations: Section 6

   Relevant publications: [3]

   Contact: CNRP Working Group

   Author/Change Controller: IESG

Author's Address

   Michael Mealling
   VeriSign, Inc.
   21345 Ridgetop Circle
   Dulles, VA  20170
   US

   Phone: (703) 742-0400
   EMail: michael@verisignlabs.com

Full Copyright Statement

   Copyright (C) The Internet Society (2002).  All Rights Reserved.

   This document and translations of it may be copied and furnished to
   others, and derivative works that comment on or otherwise explain it
   or assist in its implementation may be prepared, copied, published
   and distributed, in whole or in part, without restriction of any
   kind, provided that the above copyright notice and this paragraph are
   included on all such copies and derivative works.  However, this
   document itself may not be modified in any way, such as by removing
   the copyright notice or references to the Internet Society or other
   Internet organizations, except as needed for the purpose of
   developing Internet standards in which case the procedures for
   copyrights defined in the Internet Standards process must be
   followed, or as required to translate it into languages other than
   English.

   The limited permissions granted above are perpetual and will not be
   revoked by the Internet Society or its successors or assigns.

   This document and the information contained herein is provided on an
   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

Acknowledgement

   Funding for the RFC Editor function is currently provided by the
   Internet Society.

AI ELI5

On this page
PROBLEMA Common Name Resolution Protocol (CNRP) query is written in XML, and putting a complex XML query into a URI would quickly exceed URI length limits.
MECHANISMThe go: scheme defines a simplified query syntax, a subset of what the XML allows, made of an optional server, a common name and optional attribute=value pairs, or just an ID.
WHY IT MATTERSClients get a short, linkable form for a CNRP query. The RFC warns that an ID-only URI hides which common name it refers to.

§1Goals of the go: Scheme

The go: URI scheme is made for the Common Name Resolution Protocol (CNRP, RFC 3367). It has two goals: to identify a specific common-name record at a specific server, and to identify a possibly dynamic query or entry point into the query process.

Because CNRP requires the ID to be a core query term, both cases boil down to a query that holds only the ID of the item. The obvious idea, canonicalizing the XML query and inserting it into the URI query part, fails: with the URI encoding rules any remotely complex query would blow past URI length limits. So the RFC provides a simplified query syntax that is a subset of what the XML can say.

The abstract adds a warning: some components look like those in other URI schemes but do not act like them. The go scheme has more in common with the location-independent news scheme than any other.

Writing a whole question on a postcard takes too much room. So the go link is a short note that carries just the important parts of the question.

§3Syntax of a go: URI

A CNRP URI comes in two forms. Form 1 talks to a specific server: go://[server]?common-name;attribute=[type,]value. Form 2 expresses a query meant to be sent to several different CNRP services: go:common-name;attribute=[type,]value. These two patterns are only for teaching; the ABNF grammar in Section 3.2 is the only authoritative definition.

In the grammar, cnrp-uri is go: followed by form 1 or form 2. Form 1 is //, an optional server, and an optional ? part that holds either a common name followed by any number of attribute pairs, or an ID request written id=value. Each attribute pair is ;attribute=[type,]value. The server and the unreserved characters are taken from RFC 2396.

A go link has an optional address of who to ask, the name you are looking for, and optional extra clues like 'only in this place'.

§3.3Special Cases and Default Values

If the URI contains only the server part, it identifies a given CNRP server, not any particular query. A client can assume that such a server will at least answer the servicequery request.

If the server element is empty, its value MUST be assumed to be localhost.

CNRP's well-known HTTP transport port is 1096. If the port is not given in the server part, port 1096 SHOULD be used when the client has no prior knowledge of other ports or transports the service may support.

If you leave out who to ask, it means 'ask the computer right here'. If you leave out the door number, knock on door 1096.

§3.4Encoding Rules and Transport Independence

The common name, query parameters and parameter values must be encoded as UTF-8. Any octet that is not one of the characters the grammar permits MUST be written as % followed by two hexadecimal characters giving the value of that octet.

CNRP can be carried over multiple transports, with HTTP mandatory to implement. When a client tries to resolve a go: URI and knows nothing about the service it names, it SHOULD use HTTP on the CNRP default port, 1096.

Odd letters are written as a percent sign and two digits, like a secret code that any computer can read. If you do not know how a server likes to talk, use the standard way.

§5Examples

The RFC gives five examples. go:Mercedes%20Benz is a general query for a common name; the client packages it with its own defaults and sends it to the services it has configured. go://?Mercedes%20Benz sends the same query to the server on localhost.

go://cnrp.foo.com?Mercedes%20Benz;geography=US-ga adds a geographic attribute and targets the server at cnrp.foo.com. go://cnrp.foo.org?Martin%20J.%20D%C3%BCrst shows a UTF-8 character written with hex escaping. go://cnrp.foo.com?id=5432345 gives only an ID, so it points directly at one common-name record on one server, the sort of thing found in a link on a web page.

Examples show links that look up a car brand, one with a place filter, one with a letter that has two dots, and one that jumps straight to a numbered record.

EXAMPLE go: URIS FROM RFC 3368
go: URIs
go:Mercedes%20Benz
go://?Mercedes%20Benz
go://cnrp.foo.com?Mercedes%20Benz;geography=US-ga
go://cnrp.foo.org?Martin%20J.%20D%C3%BCrst
go://cnrp.foo.com?id=5432345

§6Security Considerations

Beyond the security considerations of CNRP itself (see RFC 3367), the RFC points out a specific trap. A URI that holds only an ID, without the common name, can lead to a different site than the one a user expects.

A user may believe the link shows whatever is currently mapped to the common name "BMW", but since the name is not in the URI, a go: URI can be used without anyone knowing which common name it refers to.

If a link only has a secret number and no name, you cannot tell where it goes just by reading it.

§7IANA Registration

The IANA is asked to register the URL scheme using the template in Appendix A, following RFC 2717. The template names the scheme go, points to Section 3.2 for syntax and Section 3.4 for character encoding, and gives CNRP as the protocol that uses it.

It lists the CNRP Working Group as contact and the IESG as author and change controller.

The official list of link starting words needs to add 'go', so nobody else uses it for something different.

§8References