draft-newton-et-al-weirds-rir-query-00.txt   draft-newton-et-al-weirds-rir-query-01.txt 
Network Working Group A. Newton Network Working Group A. Newton
Internet-Draft ARIN Internet-Draft ARIN
Intended status: Standards Track K. Ranjbar Intended status: Standards Track K. Ranjbar
Expires: March 24, 2012 RIPE NCC Expires: September 12, 2012 RIPE NCC
A. Servin A. Servin
LACNIC LACNIC
September 21, 2011 B. Ellacott
APNIC
March 11, 2012
A Uniform RESTful URL Query Pattern for RIRs A Uniform RESTful URL Query Pattern for RIRs
draft-newton-et-al-weirds-rir-query-00 draft-newton-et-al-weirds-rir-query-01
Abstract Abstract
This document describes uniform patterns for which to construct HTTP This document describes uniform patterns for which to construct HTTP
URLs that may be used to retreive information from Regional Internet URLs that may be used to retreive information from Regional Internet
Registries (RIRs) using "RESTful" web access patterns. Registries (RIRs) using "RESTful" web access patterns.
Status of this Memo Status of this Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
skipping to change at page 1, line 35 skipping to change at page 1, line 37
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on March 24, 2012. This Internet-Draft will expire on September 12, 2012.
Copyright Notice Copyright Notice
Copyright (c) 2011 IETF Trust and the persons identified as the Copyright (c) 2012 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Path Specification . . . . . . . . . . . . . . . . . . . . . . 4 2. Design Intents . . . . . . . . . . . . . . . . . . . . . . . . 4
2.1. IP Networks . . . . . . . . . . . . . . . . . . . . . . . . 4 3. Path Specification . . . . . . . . . . . . . . . . . . . . . . 5
2.2. Autonomous Systems . . . . . . . . . . . . . . . . . . . . 6 3.1. IP Networks . . . . . . . . . . . . . . . . . . . . . . . 5
2.3. Reverse DNS . . . . . . . . . . . . . . . . . . . . . . . . 6 3.2. Autonomous Systems . . . . . . . . . . . . . . . . . . . . 7
3. Response Formats . . . . . . . . . . . . . . . . . . . . . . . 7 3.3. Reverse DNS . . . . . . . . . . . . . . . . . . . . . . . 8
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 8 4. Query Paramaters . . . . . . . . . . . . . . . . . . . . . . . 9
5. Normative References . . . . . . . . . . . . . . . . . . . . . 10
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 11
1. Introduction 1. Introduction
The Regional Internet Registries (RIRs) have begun experimenting with The Regional Internet Registries (RIRs) have begun experimenting with
RESTful web services for access to Whois data. This document RESTful web services for access to Whois data. This document
presents uniform patterns which may be used to contruct URLs for presents uniform patterns which may be used to contruct URLs for
accessing data from these RESTful web services. accessing data from these RESTful web services.
The patterns described in this document purposefully do not encompass The patterns described in this document purposefully do not encompass
all of the methods employed in the Whois and RESTful web services of all of the methods employed in the Whois and RESTful web services of
all of the RIRs. The intent of the patterns described here are to all of the RIRs. The intent of the patterns described here are to
enable lookups of networks by IP address, autonomous system numbers enable lookups of networks by IP address, autonomous system numbers
by number, and reverse DNS meta-data reverse DNS domain labels. It by number, and reverse DNS meta-data reverse DNS domain labels. It
is envisioned that each RIR will continue to maintain NICNAME/WHOIS is envisioned that each RIR will continue to maintain NICNAME/WHOIS
and/or RESTful web services specific to their needs and those of and/or RESTful web services specific to their needs and those of
their constituencies, and the information retreived through the their constituencies, and the information retreived through the
patterns described here may reference such services. patterns described here may reference such services.
Whois services, in general, are read-only services. Therefore URL Whois services, in general, are read-only services. Therefore URL
patterns presented here are only applicable to the HTTP GET and HEAD [RFC3986] patterns presented here are only applicable to the HTTP
methods. [RFC2616] GET and HEAD methods.
This document does not describe the results or entities returned from This document does not describe the results or entities returned from
issuing the described URLs with an HTTP GET. It is envisioned that issuing the described URLs with an HTTP GET. It is envisioned that
other documents will describe these entities in various serialization other documents will describe these entities in various serialization
formats, such as XML and JSON. formats, such as XML and JSON.
Additionally, resource management, provisioning and update functions Additionally, resource management, provisioning and update functions
are out of scope for this document. RIRs have various and divergent are out of scope for this document. RIRs have various and divergent
methods covering these functions, and it is unlikely a uniform methods covering these functions, and it is unlikely a uniform
approach for these functions will ever be possible. approach for these functions will ever be possible.
And while HTTP contains mechanisms for servers to authenticate And while HTTP contains mechanisms for servers to authenticate
clients and clients to authenticate servers, from which authorization clients and clients to authenticate servers, from which authorization
schemes may be built, both authentication of clients and servers and schemes may be built, both authentication of clients and servers and
authorization for access to data are out-of-scope of this document. authorization for access to data are out-of-scope of this document.
In general, these matters require "policy" and are not the domain of In general, these matters require "policy" and are not the domain of
technical standards body. technical standards bodies.
2. Path Specification 2. Design Intents
The uniform patterns start with a base URL specified by each RIR or There are a few design criteria this document attempts to support.
any other service provider offering this service. The base URL will
be appended with resource type specific path segments. The base URL First, each query is meant to return either zero or one result. With
may contain its own path segments (e.g. http://example.com/... or the maximum upper bound being set to one, the issuance of redirects
http://example.com/restful-whois/... ). is simplified to the known document model used by HTTP [RFC2616].
Should a result contain more than one result, some of which are
better served by other servers, the redirection model becomes much
more complicated.
Second, response formats are not specified in this document as the
intent is to leave room for multiple format types.
Third, HTTP offers a number of transport protocol mechanisms not
described further in this document. Operators are able to make use
of these mechanisms according to their local policy, including cache
control, authorization, compression, and redirection. HTTP also
benefits from widespread investment in scalability, reliability, and
performance
3. Path Specification
The uniform patterns start with a base URL [RFC3986] specified by
each RIR or any other service provider offering this service. The
base URL will be appended with resource type specific path segments.
The base URL may contain its own path segments (e.g.
http://example.com/... or http://example.com/restful-whois/... ).
The resource type path segments are: The resource type path segments are:
'ip' IP networks and associated data referenced using either an IPv4 'ip' IP networks and associated data referenced using either an IPv4
or IPv6 address (i.e. not CIDR notation). or IPv6 address.
'autnum' Autonomous system registrations and associated data 'autnum' Autonomous system registrations and associated data
referenced using an AS Plain autonomous system number. referenced using an AS Plain autonomous system number.
'rdns' Reverse DNS information and associated data referenced using 'rdns' Reverse DNS information and associated data referenced using
a fully-qualified domain name. a fully-qualified domain name.
2.1. IP Networks 3.1. IP Networks
Queries for information about IP networks are of the form /ip/ Queries for information about IP networks are of the form /ip/XXX/...
XXX.XXX.XXX.XXX/... where the path segment following 'ip' is either or /ip/XXX/YY/... where the path segment following 'ip' is either an
an IPv4 or IPv6 address. While an IP address may fall into multiple IPv4 [RFC0791] or IPv6 [RFC5952] address (i.e. XXX) or an IPv4 or
IP networks in a hierarchy of networks, this query targets the "most- IPv6 CIDR [RFC4632] notation address block (i.e. XXX/YY).
specific" or lowest IP network in a hierarchy. Semantically, the simpler form using the address can be thought of as
a CIDR block with a length of 32 for IPv4 and a length of 128 for
IPv6. A given specific address or CIDR may fall within multiple IP
networks in a hierarchy of networks, therefore this query targets the
"most-specific" or lowest IP network which completely encompasses it
in a hierarchy of IP networks.
Path segments following the IP address target specific information Path segments following the IP address or CIDR notation target
associated with the targetted IP network in the following way: specific information associated with the targetted IP network in the
following way:
'registration' The query is for the network registration data. 'registration' The query is for the network registration data.
'operator' The query is for data about the network operator of the 'operator' The query is for data about the network operator of the
IP network. The network operator is not always considered to be IP network. The network operator is not always considered to be
the end user or end site customer of the IP network, a distinction the end user or end site customer of the IP network, a distinction
made in some cases. For example, a residential Internet made in some cases. For example, a residential Internet
installation may be assigned IP addresses, but the provider from installation may be assigned IP addresses, but the provider from
whom they receive Internet access is considered the network whom they receive Internet access is considered the network
operator. Another rule of thumb is that the network operator is operator. Another rule of thumb is that the network operator is
the entity contacted to coordinate network issues and has the entity contacted to coordinate network issues and has
published contact information for this purpose, and operator published contact information for this purpose, and operator
information can be further decomposed into operator contact information can be further decomposed into operator contact
information, which is returned with the 'operator' query when not information, which is returned with the 'operator' query when not
specifically targetted (see below). specifically targetted (see below).
When no path segment follows the IP address, the semantics of the When no path segment follows the IP address, the semantics of the
query are that both registration and operator information are to be query are that both registration and operator information are to be
returned. returned.
The following example URL is a query for the IP network registrion The following example URL [RFC3986] is a query for the IP network
information. registrion information.
http://example.com/somepath/ip/192.0.2.0/registration http://example.com/somepath/ip/192.0.2.0/registration
The following example URL is a query for the IP network registration
information for the most specific IP network starting with 192.0.2.0
and ending with 192.0.2.255.
http://example.com/somepath/ip/192.0.2.0/24/registration
The following example URL is a query for the network operator The following example URL is a query for the network operator
information of the most specific network containing 192.0.2.0 information of the most specific network containing 192.0.2.0
http://example.com/somepath/ip/192.0.2.0/operator http://example.com/somepath/ip/192.0.2.0/operator
And this is an example URL for both the registration and operator And this is an example URL for both the registration and operator
information of the most specific network containing 192.0.2.0 information of the most specific network containing 192.0.2.0
http://example.com/somepath/ip/192.0.2.0 http://example.com/somepath/ip/192.0.2.0
This is an example of a URL for both the registration and operator
information of the most specific network containing 192.0.2.0/24.
http://example.com/somepath/ip/192.0.2.0/24
The contact information of an operator maybe specifically targetted The contact information of an operator maybe specifically targetted
by following it with a 'contacts' path segment. And the type of by following it with a 'contacts' path segment. And the type of
contact information may be further targetted by following that path contact information may be further targetted by following that path
segment with a type. The types are: segment with a type. The types are:
o tech o tech
o admin o admin
o abuse o abuse
o noc
For example: For example:
/ip/192.0.2.0/operator/contacts /ip/192.0.2.0/operator/contacts
returns all the contact information for the network operator of the returns all the contact information for the network operator of the
most specific network containing IP address 192.0.2.0. most specific network containing IP address 192.0.2.0.
And this path targets only the abuse contacts of that network And this path targets only the abuse contacts of that network
operator. operator.
/ip/192.0.2.0/operator/contacts/abuse /ip/192.0.2.0/operator/contacts/abuse
2.2. Autonomous Systems 3.2. Autonomous Systems
Queries for information regarding autonomous system number Queries for information regarding autonomous system number
registrations are of the form /autnum/XXX/... where XXX is an registrations are of the form /autnum/XXX/... where XXX is an
autonomous system number. In some registries, registration of autonomous system number [RFC5396]. In some registries, registration
autonomous system numbers is done on an individual number basis, of autonomous system numbers is done on an individual number basis,
while other registries may register blocks of autonomous system while other registries may register blocks of autonomous system
numbers. The semantics of this query is such that if a number falls numbers. The semantics of this query is such that if a number falls
within a range of registered blocks, the target of the query is the within a range of registered blocks, the target of the query is the
block registration, and that individual number registrations are block registration, and that individual number registrations are
considered a block of numbers with a size of 1. considered a block of numbers with a size of 1.
For example, to find information on autonomous system number 65551, For example, to find information on autonomous system number 65551,
the following path would be used: the following path would be used:
/autnum/65551 /autnum/65551
The autnum path segment may be followed by a 'registration' or The autnum path segment may be followed by a 'registration' or
'operator' path segment or no additional path segment, all of which 'operator' path segment or no additional path segment, all of which
follow the semantics above (Section 2.1). follow the semantics above (Section 3.1).
2.3. Reverse DNS 3.3. Reverse DNS
Queries for reverse DNS information are of the form Queries for reverse DNS information are of the form
/rdns/XXXXXXXXX/... where XXXX is a fully-qualified domain name in /rdns/XXXXXXXXX/... where XXXX is a fully-qualified domain name
either the in-addr.arpa or ip6.arpa zones. [RFC4343] in either the in-addr.arpa or ip6.arpa zones.
For example, to find information on the zone serving the network For example, to find information on the zone serving the network
192.0.2/24, the following path would be used: 192.0.2/24, the following path would be used:
/rdns/2.0.192.in-addr.arpa /rdns/2.0.192.in-addr.arpa
The rdns path segment may be follwed by a 'registration' or The rdns path segment may be follwed by a 'registration' or
'operator' path segment or no additional path segment, all of which 'operator' path segment or no additional path segment, all of which
follow the semantics in Section 2.1. follow the semantics in Section 3.1.
3. Response Formats 4. Query Paramaters
URLs may contain the 'format' query parameter. The value of the To overcome issues with misbehaving HTTP [RFC2616] cache
query parameter contains the MIME type of the desired format of the infrastructure, clients may use the '__weirds__cachebust' query
response. This parameter is used instead of the HTTP Accept header parameter with a random value of their choosing. Servers MUST ignore
to defeat web caches and better support HTTP clients that do not this query parameter.
support alteration of the Accept header.
The following is an example of a URL for AS 65551 requesting the The following is an example use of this parameter to retreive the
response be in text/plain format: abuse contacts associated with the most specific IP network with the
address 192.0.2.0:
http://example.com/autnum/65551?format=text%2Fplain /ip/192.0.2.0/operator/contacts/abuse?__weirds_cachebust=xyz123
This document does not specify the contents of the responses. It is For all others, server SHOULD ignore unknown query parameters.
envisioned that multiple format types may be supported. Other
documents will specify the contents of responses. 5. Normative References
[RFC0791] Postel, J., "Internet Protocol", STD 5, RFC 791,
September 1981.
[RFC5952] Kawamura, S. and M. Kawashima, "A Recommendation for IPv6
Address Text Representation", RFC 5952, August 2010.
[RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H.,
Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext
Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999.
[RFC4343] Eastlake, D., "Domain Name System (DNS) Case Insensitivity
Clarification", RFC 4343, January 2006.
[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
Resource Identifier (URI): Generic Syntax", STD 66,
RFC 3986, January 2005.
[RFC4632] Fuller, V. and T. Li, "Classless Inter-domain Routing
(CIDR): The Internet Address Assignment and Aggregation
Plan", BCP 122, RFC 4632, August 2006.
[RFC5396] Huston, G. and G. Michaelson, "Textual Representation of
Autonomous System (AS) Numbers", RFC 5396, December 2008.
Authors' Addresses Authors' Addresses
Andrew Lee Newton Andrew Lee Newton
American Registry for Internet Numbers American Registry for Internet Numbers
3635 Concorde Parkway 3635 Concorde Parkway
Chantilly, VA 20151 Chantilly, VA 20151
US US
Email: andy@arin.net Email: andy@arin.net
skipping to change at line 269 skipping to change at page 11, line 33
URI: http://www.ripe.net URI: http://www.ripe.net
Arturo L. Servin Arturo L. Servin
Latin American and Caribbean Internet Address Registry Latin American and Caribbean Internet Address Registry
Rambla Republica de Mexico 6125 Rambla Republica de Mexico 6125
Montevideo 11300 Montevideo 11300
UY UY
Email: aservin@lacnic.net Email: aservin@lacnic.net
URI: http://www.lacnic.net URI: http://www.lacnic.net
Byron J. Ellacott
Asia Pacific Network Information Center
6 Cordelia Street
South Brisbane QLD 4101
Australia
Email: bje@apnic.net
URI: http://www.apnic.net
 End of changes. 30 change blocks. 
54 lines changed or deleted 118 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/