Subject: [weirds] bootstrap json registry proposal

From: Marc Blanchet <[email-masked]>
Date: Sat, 31 May 2014 11:01:00 -0400

Hello,
 I've been working on the new version of the bootstrap draft. Given the new wg direction, it becomes a pretty important rewrite. I'm currently finishing the text around the new "design", but wanted to have some input from the wg about the design direction. So here is some considerations and then actual code example, for your review.

- separate registries for each realm (domain, ipv4, ipv6, autnum), since the registration policies are most likely going to be different, and that clients may only need to look at a specific registry (clients for ip addresses don't need to fetch the 2500+ domains...)

- however, from a protocol point of view (and therefore on the template point of view), there are all using the same URI structure. Therefore, a "global across rdap registries" default for the default template. 

- tried to cover what could be the most common case as straightforward as possible to ease clients, while providing flexibility for less common cases

- template below provide a way for a registry to specify which protocols (http, https) are supported (via the protos array), while providing a "global" default and a registry default. The global default would be https given the IETF direction of everything encrypted, but leave the registry the possibility to overwrite it, per tld/address block if desired.

- the {querypath} would land into the draft-ietf-weirds-rdap-query spec.

- below are examples

Please comment.

Regards, Marc.

===========================
IANA RDAP DEFAULTS REGISTRY
=========================== 
{
 "rdap.bootstrap": {
   "resources": [
     "ip", 
     "autnum", 
     "domain", 
     "nameserver", 
     "entity", 
     "help", 
     "domains", 
     "nameservers", 
     "entities",
   ],
  
   "defaults": {
     "query"   : "{proto}://{host}/{prefix}/{querypath}",
     "prefix"  : "rdap",
     "proto"  : "https",
     "protos" : [ "https", "http" ],
     "host" : "example.com",
    },
  }, 
}

===================================
IANA RDAP DOMAIN BOOTSTRAP REGISTRY
===================================
{
  “rdap.bootstrap”: {
    “domain": {
      “myexampletld.”: {
        "host": "rdap.example.org",
      },
      "myexample2tld.": {
        "host": "rdap.example.net",
        "protos": [ "http" ],
        "proto": [ "http" ],
        "prefix": "",
      },
    },
  },
}

===================================
IANA RDAP IPv4 BOOTSTRAP REGISTRY
===================================
{
  “rdap.bootstrap”: {
    “ip4": {
      “3.0.0.0/8”: {
        "host": "rdap.arin.net",
        "prefix": "rdap/ip4",
      },
    },
  },
}

===================================
IANA RDAP IPv6 BOOTSTRAP REGISTRY
===================================
{
  “rdap.bootstrap”: {
    “ip6": {
      “2001:0200::/23”: {
        "host": "apnic.net",
        "prefix": "rdap/ipv6"
        "protos": [ "https" ],
        "proto": [ "https" ],

      },
    },
  },
}

===================================
IANA RDAP AUTNUM BOOTSTRAP REGISTRY
===================================
{
  “rdap.bootstrap”: {
    “autnum": {
      “20116-20117”: {
        "host": "rdap.lacnic.net",
      },
    },
  },
}

---

From: "John Levine" <[email-masked]>
Date: 31 May 2014 16:52:26 -0000

Let's take a look.

>     "entities",

What is the purpose of this list?  What happens if it doesn't match
the actual tags used in the rest of the file?

>     "query"   : "{proto}://{host}/{prefix}/{querypath}",

Nit; I expect the most common prefix will be null, in which case this
puts a double slash in the path.  

Also, can you suggest a plausible scenario in which the query would be
something other than this?  Bootstraps are supposed to be minimal, so
I would prefer not to include features just in case someone might
think of a use case later.  If it's a fixed query, we can say as a
special case that a null prefix doesn't have a slash after it.

>     "protos" : [ "https", "http" ],

A JSON array is ordered, so why not just say you try the protos in
order?  That also avoids the undefined case where the proto isn't in
the protos.

>    “autnum": {

This requires that clients parse the label to see if it matches, and
since you don't know what the ranges are, the client has to iterate
over the whole object and try them all.  Since you have to iterate
anyway, how about making it an array with the numbers as numbers?

>    “autnum": [
	[
		"minasn": 20116,
		"maxasn": 20117,
	[
		"minasn": 261,
		"maxasn": 261,
		"host": "rdap.ripe.net",
	],

For all of the domains and IPs, is the plan to use the first one that
matches, or read the whole thing and take the longest match?  Note
that those could be equivalent if it were an array sorted in an
appropriate order.

R's,
John

---

From: Marc Blanchet <[email-masked]>
Date: Sat, 31 May 2014 15:29:19 -0400

Le 2014-05-31 à 12:52, John Levine <[email-masked]> a écrit :

> Let's take a look.
> 
>> {
>> "rdap.bootstrap": {
>>  "resources": [
>>    "ip", 
>>    "autnum", 
>>    "domain", 
>>    "nameserver", 
>>    "entity", 
>>    "help", 
>>    "domains", 
>>    "nameservers", 
>>    "entities",
>>  ],
> 
> What is the purpose of this list?

see ticket #26.

>  What happens if it doesn't match

good point.

> something other than this?

I'm not sure I understand your question. anyway.

>  Bootstraps are supposed to be minimal, so

To avoid the double slash and simplify, we could reduce the template to:
"query"   : "{proto}://{prefix}/{querypath}",

where prefix could be either: host.example.com  or host.example.com/rdap.

Separating the host part may be interesting.

The other way would be to force at registration (by IANA checking) that the prefix (from the initial proposal) must have a "/" and then concatenating the two without a "/", such as {prefix}{querypath}.

tradeoffs.

> order?  That also avoids the undefined case where the proto isn't in

right. I know. I thought it would be more straight forward for clients for the basic cases. It is a tradeoff.

>> �rdap.bootstrap�: {
>>   �autnum": {
>>     �20116-20117�: {

- this is nothing new here from the previous bootstrap documents. We said before that the AS ranges were possible. 
- so if I understand you well, for the legacy AS numbers, that would mean a 65K array expanding to a 4G array when including 4bytes AS numbers. really want to do that?  The current space is not super compressed but still. My take is that a client can easily parse this. Moreover, if the ranges are ordered (which is expected as all IANA registries containing numbers are and as the current AS registry is, then the client does not have to iterate through the whole thing. it stops when the range is the right one.

>> �rdap.bootstrap�: {
>>   �autnum": [

Is this your proposal? an array of 3 different objects? looks strange to me. I'm not sure I understand your proposal.
I think this is invalid JSON syntax. 

> matches, or read the whole thing and take the longest match?

in the current versions of the bootstrap documents, one can read that we have been stating longest match. We don't want to constraint the allocations to be of fixed sizes.

>  Note

---

From: "John R Levine" <[email-masked]>
Date: 31 May 2014 22:00:32 -0400

>> What is the purpose of this list?

I see that it wants an IANA registry, to avoid collsions and multiple 
names for the same thing, but I don't see why it'd be put into the 
downloaded bootstrap.

>     "query"   : "{proto}://{host}/{prefix}/{querypath}",

Given that we have parameters for proto, host, prefix, and query path, is
there a plausible circumstance in which they would be assembled in any 
other way than that?  I don't immediately see one.

> for the basic cases. It is a tradeoff.

It's hard to see a lot of difference between the code for proto and for 
protos[0].

>>>   "autnum": [

Sorry, it's supposed to be an array of objects, each of which describes a 
range of ASNs assigned to a registry.

Regards,
John Levine, [email-masked], Taughannock Networks, Trumansburg NY
Please consider the environment before reading this e-mail.