Re: [DNSOP] DNS-in-JSON draft

Shane Kerr <shane@time-travellers.org> Tue, 06 September 2016 04:45 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 2321812B109 for <dnsop@ietfa.amsl.com>; Mon, 5 Sep 2016 21:45:00 -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 3KxjubGkgNQ3 for <dnsop@ietfa.amsl.com>; Mon, 5 Sep 2016 21:44:58 -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 9F9AE12B0C3 for <dnsop@ietf.org>; Mon, 5 Sep 2016 21:44:58 -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 1bh8Fj-00077K-84; Tue, 06 Sep 2016 04:44:55 +0000
Date: Tue, 06 Sep 2016 12:44:48 +0800
From: Shane Kerr <shane@time-travellers.org>
To: Paul Hoffman <paul.hoffman@vpnc.org>
Message-ID: <20160906124448.2c66cf2a@pallas.home.time-travellers.org>
In-Reply-To: <EC47A7C8-56E3-4891-8F12-73617AE566C4@vpnc.org>
References: <DB336274-A631-471E-8277-D6690A87C834@vpnc.org> <20160905154737.5a1c67e5@pallas.home.time-travellers.org> <EC47A7C8-56E3-4891-8F12-73617AE566C4@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_/5/no2ZEphAYB/dPAQfpIQPR"; protocol="application/pgp-signature"
Archived-At: <https://mailarchive.ietf.org/arch/msg/dnsop/yJvQIvxXWZkkDuJaYwcGIGUKdX4>
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: Tue, 06 Sep 2016 04:45:00 -0000

Paul,

At 2016-09-05 10:21:40 -0700
"Paul Hoffman" <paul.hoffman@vpnc.org> wrote:

> On 5 Sep 2016, at 0:47, Shane Kerr wrote:
> 
> > 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.  
> 
> If it useful for a particular application for particular RDATA, that 
> application could easily specify a format in its profile. If that 
> catches on, I could update this document with a collection of those. But 
> I don't want to start now by specifying the formats I would want myself.

Hm... I guess I don't see why the DNS-in-JSON draft can't simply say
that the formats are those documented in the RFC for any particular
RTYPE? Each RTYPE has a defined format, right?

> > 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 doubt they will be that useful, but a receiver might want to know 
> which names in a message were compressed and which were not. I admit 
> that it would be clearer for that receiver to just look through the 
> message or section binary fields.

Maybe it could be a value that describes something like this:

"compressedNAME": { "isCompressed": "yes", "length": 7 }

The "length" would be the compressed length. The uncompressed length
can be found by looking at the name.
 
> > 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?  
> 
> Well, this brought up an ugly problem. The name in the IANA registry for 
> class 1 is "Internet (IN)". Chaos and Hesiod are similarly bad. I'm 
> going to change the definition of the class names to be 'String whose 
> value is "IN", "CH", "HS", or has the format in {{RFC3597}}'. I don't 
> think I really need to add to TYPEs that the name is case-sensitive, 
> since it says "from the IANA RR TYPEs registry".

Makes sense. Stupid DNS classes. :)

Can you explicitly say that TYPEs are case-INsensitive then? It might
save some poor coder at some point, since programming languages
generally default to case-sensitive comparisons...

> > 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.)  
> 
> Instead of a new "answerRRsets", how about if I invent an "RRset" object 
> and the change the definitions of the various sections to "answerRRs -- 
> Array of zero or more resource records or RRset objects in the Answer 
> section"? That way you can mix and match records and RRsets.

Sounds good!

--
Shane