Subject: [Doh] New query formats

From: Martin Thomson <[email-masked]>
Date: Thu, 22 Mar 2018 14:32:40 +0000

Right now, the draft assumes a model for requests that uses content
type.  This is natural, because the same mechanism translates neatly
to both request forms.  POST naturally uses content types, GET is made
to follow suit.

This has consequences for the introduction of new query formats
(response formats are easy; see also conneg).  Clients have a strong
incentive to choose the wire format because any other format will
cause the server to produce an error.

A small change would allow GET-based queries to use new formats in
parallel.  It would also enable less constrained request forms that
don't use a single block of octets.

That change would be thus:

1. Undefine the ct parameter.

2. Define the dns as having a value that is exclusively the base64url
encoding of the wire format.

3. Specify that other parameters can be used to carry information
about queries.  Servers that find unknown query parameters MUST ignore
them.

4. Define a new registry for header field parameters.  (The URI
template would have covered this neatly, so you could avoid that.)

This would enable simpler forms of query, like:

   https://doh.example.com/q?dns=<base64junk>&aaaa=example.com&RRSig

As well as forms of request that are closer in form to the wireformat
thing, in that it is a single blob, such as a JSON equivalent:

   https://doh.example.com/q?dns=<base64junk>&json=<base64ofJSON>

Note: existing implementations tolerate this sort of change, by virtue
of there being no other formats, and that the default is sensible.
That's not necessarily a permanent condition though.

---

From: Stephane Bortzmeyer <[email-masked]>
Date: Mon, 26 Mar 2018 10:30:31 +0200

On Thu, Mar 22, 2018 at 02:32:40PM +0000,
 Martin Thomson <[email-masked]> wrote 

> template would have covered this neatly, so you could avoid that.)

Yes, RFC 6570 is the right way to specify these parameters.

You can get some inspiration from my (old) DNS looking glass:

http://www.bortzmeyer.org/dns-lg-usage.html