[Doh] New query formats

Martin Thomson <martin.thomson@gmail.com> Thu, 22 March 2018 14:32 UTC

Return-Path: <martin.thomson@gmail.com>
X-Original-To: doh@ietfa.amsl.com
Delivered-To: doh@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E52D012DA05 for <doh@ietfa.amsl.com>; Thu, 22 Mar 2018 07:32:43 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.7
X-Spam-Level:
X-Spam-Status: No, score=-2.7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 P1rokT42JC1j for <doh@ietfa.amsl.com>; Thu, 22 Mar 2018 07:32:42 -0700 (PDT)
Received: from mail-oi0-x22d.google.com (mail-oi0-x22d.google.com [IPv6:2607:f8b0:4003:c06::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 2F198126D85 for <doh@ietf.org>; Thu, 22 Mar 2018 07:32:42 -0700 (PDT)
Received: by mail-oi0-x22d.google.com with SMTP id 126-v6so1527996oig.0 for <doh@ietf.org>; Thu, 22 Mar 2018 07:32:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=384bM1mCMUaKGD6QrbcpM6Q/vgI0Pv5FpjUq0693P40=; b=aWDByl7onQNkgaA33YoDFA7pY74mgXAPbpQ3RR/yrY0FFAJLDAwpK7XGFljtO7CSVv A7Mjz3C77SXofulSrO1ncA0Buzm2P96BfYb8vfkwBALORVHcXv72EbJKTed9vbSCx0Jg el+6Y858Wk1cIwCmXh9GQeKybfjMk6g5JB51rF3FH7U2HObP17iSfsSv1ADrJZ1gSkLA BZf1DChCmWidUBzrb3e1SEjrz+XfgGAHEwdZbuwckeLsOrE0CBXpqRYkyYHv1qnfHrZx bjtecDinlyudorcVlzs0GcYNzf96YeRkJ/YeAxOjflf9S23N5t288Qyxy8MJLnSPVet1 e1Ig==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=384bM1mCMUaKGD6QrbcpM6Q/vgI0Pv5FpjUq0693P40=; b=THU7rWVfTGguNvzhIKunOijr3xM0ied0uvd3Czj4S0uaPaQ7X4UNgSw0nBd+CE9yRR /zUssOReVdeDagxr/QPzwWHavRV0GrFjuNgVoyFAEHuaGwqeGwRye2mGz7ShrKqz++Tx YXtPhmyGVdisxroiop+afi/P+2l/T8mVJItBd+Dzbp4GAUUk+oX0Ha+RuZEkTWTcq0i3 sFm62B99Hyjo+469Inrl7uR8gQy9pPWBmIyNeHn0QklpKHKJAAVuEjZwKW/N8Jb1B9jF fjxMI2o7QdWoYYbOf9Chr8FQ7c4Qte1QApTRLyiKfUCknuSBu3y5Kv26bXtHY89gKiRp oYMA==
X-Gm-Message-State: AElRT7FqzuHu87kzcYsbkDumLbOwUx7pEdGlvUuwdk9zhMQpvt/8D/Em bxxmKWYEc6CWT4Jwa4873yM9zC9eeatCMQbLI5Vluv4O
X-Google-Smtp-Source: AG47ELsPkH0Hck+uUb2gvlSuzb98N/BPB/bO7TzyCeMCFUhdaYTzQMsujWzitRXRGH7DwPBfF6VUqVgoTRx/fXM5yC8=
X-Received: by 10.202.198.141 with SMTP id w135mr1135649oif.215.1521729161134; Thu, 22 Mar 2018 07:32:41 -0700 (PDT)
MIME-Version: 1.0
Received: by 2002:a9d:ac7:0:0:0:0:0 with HTTP; Thu, 22 Mar 2018 07:32:40 -0700 (PDT)
From: Martin Thomson <martin.thomson@gmail.com>
Date: Thu, 22 Mar 2018 14:32:40 +0000
Message-ID: <CABkgnnVf_bEsxkTuFeCLO+PxUu6cYb1K-5j1C4LzOsrt0-V6HQ@mail.gmail.com>
To: doh@ietf.org
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/doh/q-tYPfi8GEc9RhOMw8zHOK0Xj9M>
Subject: [Doh] New query formats
X-BeenThere: doh@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: DNS Over HTTPS <doh.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/doh>, <mailto:doh-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/doh/>
List-Post: <mailto:doh@ietf.org>
List-Help: <mailto:doh-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/doh>, <mailto:doh-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 22 Mar 2018 14:32:46 -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.