Re: [DNSOP] DNS-in-JSON draft

Shane Kerr <shane@time-travellers.org> Mon, 05 September 2016 07:47 UTC

Return-Path: <shane@time-travellers.org>
X-Original-To: dnsop@ietfa.amsl.com
Delivered-To: dnsop@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id BA4AC12B28A for <dnsop@ietfa.amsl.com>; Mon, 5 Sep 2016 00:47:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.902
X-Spam-Level:
X-Spam-Status: No, score=-1.902 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1kcp7OyQ6DjO for <dnsop@ietfa.amsl.com>; Mon, 5 Sep 2016 00:47:53 -0700 (PDT)
Received: from time-travellers.nl.eu.org (c.time-travellers.nl.eu.org [IPv6:2a02:2770::21a:4aff:fea3:eeaa]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4F5E712B19B for <dnsop@ietf.org>; Mon, 5 Sep 2016 00:47:52 -0700 (PDT)
Received: from [240c:f:1:4000:8a63:3b33:66a5:1600] (helo=pallas.home.time-travellers.org) by time-travellers.nl.eu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from <shane@time-travellers.org>) id 1bgodA-0003U7-7M; Mon, 05 Sep 2016 07:47:48 +0000
Date: Mon, 05 Sep 2016 15:47:37 +0800
From: Shane Kerr <shane@time-travellers.org>
To: Paul Hoffman <paul.hoffman@vpnc.org>
Message-ID: <20160905154737.5a1c67e5@pallas.home.time-travellers.org>
In-Reply-To: <DB336274-A631-471E-8277-D6690A87C834@vpnc.org>
References: <DB336274-A631-471E-8277-D6690A87C834@vpnc.org>
X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.30; x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; micalg="pgp-sha1"; boundary="Sig_/DK9HsL00o3q_Ko6Q4gb+QZu"; protocol="application/pgp-signature"
Archived-At: <https://mailarchive.ietf.org/arch/msg/dnsop/J3BEmGyi5qGxVIjFdZatQqzEXxs>
Cc: dnsop WG <dnsop@ietf.org>
Subject: Re: [DNSOP] DNS-in-JSON draft
X-BeenThere: dnsop@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: IETF DNSOP WG mailing list <dnsop.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dnsop>, <mailto:dnsop-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dnsop/>
List-Post: <mailto:dnsop@ietf.org>
List-Help: <mailto:dnsop-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dnsop>, <mailto:dnsop-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 05 Sep 2016 07:47:55 -0000

Paul,

At 2016-09-03 15:43:34 -0700
"Paul Hoffman" <paul.hoffman@vpnc.org> wrote:

> Greetings again. I have updated my draft on describing DNS messages in 
> JSON. I still don't think that this WG needs to adopt this given that it 
> is, as far as I can tell, thinly implemented. I think it's probably 
> about baked enough for me to take it to the Independent Submissions 
> editor to become an Experimental RFC. If y'all have any comments on it, 
> please send them along and I'll incorporate before I move it along to 
> RFChood.

Thanks for this draft! I would be happy to see DNS in JSON documented,
if not exactly standardized. :)

I apologize if this stuff has been discussed before.

First, it seems like it might be nice to have a way to express RDATA in
DNS presentation format. The document is very clear that no way is
provided for this, but it seems like it would be really, really useful.

Next, is compressedNAME likely to be useful? I'm not arguing strongly
against it, but since it involves pointers and those are not going to
be useful with a JSON object, I don't really see much point.

I don't see any mention of whether things like TYPEname and CLASSname
are case-sensitive and if they are not which case they should be. My
recommendation would be to make them case-insensitive, although not
every field can be so having to tag each might be a bit much?

It occurs to me that maybe we want an option to have arrays of RRset
instead of arrays of RRs?

    "answerRRsets": [ { "NAME": "example.com",
                        "TYPE": 1, "CLASS": 1, "TTL": 3600, 
                        "RR": [ { "RDLENGTH": 4, "RDATA*": "C0000201" },
                                { "RDLENGTH": 4, "RDATA*": "CB007181" } 
                              ]
                      }
                    ]

It's not super important, but it would save me having to build RRset in
my applications. (With the RRs only I have to loop through the entire
section and only when done can I know that I have gotten a complete
RRset.)

Also, I guess it's also not important, but you may want to consider
using the RFC 5737 addresses for the example answer (like I did here).

Finally, I note that the RIPE Atlas system uses a type of DNS JSON
representation when you use their API to query for DNS measurement
results. You can get a sample here:

https://atlas.ripe.net/api/v2/measurements/5009360/results?start=1472860800&stop=1472947199&format=txt

The RIPE Atlas results match your proposal pretty well - you can see
it in the "results" object there - although they use "abuf" instead of
"messageOctets!".

Cheers,

--
Shane