One document matched: draft-ietf-dnsop-qname-minimisation-03.xml


<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY rfc1034 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.1034.xml">
<!ENTITY rfc1035 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.1035.xml">
<!ENTITY rfc2119 SYSTEM
"http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY rfc2181 SYSTEM
"http://xml.resource.org/public/rfc/bibxml/reference.RFC.2181.xml">
<!ENTITY rfc4033 SYSTEM
"http://xml.resource.org/public/rfc/bibxml/reference.RFC.4033.xml">
<!ENTITY rfc5246 SYSTEM
"http://xml.resource.org/public/rfc/bibxml/reference.RFC.5246.xml">
<!ENTITY rfc5936 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5936.xml">
<!ENTITY rfc6347 SYSTEM
"http://xml.resource.org/public/rfc/bibxml/reference.RFC.6347.xml">
<!ENTITY rfc6973 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6973.xml">
<!ENTITY rfc6982 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6982.xml">
<!ENTITY I-D.ietf-dprive-problem-statement SYSTEM
"http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-dprive-problem-statement.xml">
<!ENTITY I-D.vixie-dnsext-resimprove SYSTEM
"http://xml.resource.org/public/rfc/bibxml3/reference.I-D.vixie-dnsext-resimprove.xml">
<!ENTITY I-D.wkumari-dnsop-hammer SYSTEM
"http://xml.resource.org/public/rfc/bibxml3/reference.I-D.wkumari-dnsop-hammer.xml">
]>

<rfc docName="draft-ietf-dnsop-qname-minimisation-03"
     category="exp" ipr="trust200902">
<?rfc toc="yes"?>
<?rfc strict="yes"?>
<front>
<title abbrev="Qname minimisation">DNS query name minimisation to improve privacy</title>
<author fullname="Stephane Bortzmeyer" initials="S." surname="Bortzmeyer">
<organization>AFNIC</organization>
<address><postal><street>1, rue Stephenson</street><code>78180</code><city>Montigny-le-Bretonneux</city><country>France</country></postal> <phone>+33 1 39 30 83 46</phone><email>bortzmeyer+ietf@nic.fr</email><uri>http://www.afnic.fr/</uri></address>
</author>
<date month="June" year="2015"/>
<workgroup>Domain Name System Operations (dnsop) Working Group</workgroup>
<abstract>
<t>This document describes one of the techniques that could be used to
improve DNS privacy (see <xref
target="I-D.ietf-dprive-problem-statement"/>), a technique called
"QNAME minimisation", where the DNS resolver no longer sends the full
original QNAME to the upstream name server.</t>
<t>REMOVE BEFORE PUBLICATION Discussions of the document should take place on the
DNSOP working group mailing list <xref target="dnsop"/>.</t>
</abstract>
</front>

<middle>
<section anchor="intro" title="Introduction and background">
<t>The problem statement is exposed in <xref
target="I-D.ietf-dprive-problem-statement"/> TODO: add a reference to
the specific section when ietf-dprive-problem-statement will be
published as RFC. The terminology ("QNAME", "resolver", etc) is also
defined in this companion document. This specific solution is not
intended to fully solve the DNS privacy problem; instead, it should be
viewed as one tool amongst many.</t>
<t>It follows the principle explained in section 6.1 of <xref
target="RFC6973"/>: the less data you send out, the fewer privacy
problems you'll get.</t>
<t>Under current practice, when a resolver receives the query "What is
the AAAA record for www.example.com?", it sends to the root (assuming
a cold resolver, whose cache is empty) the very same question. Sending
the full QNAME to the authoritative name server is a tradition, not a
protocol requirement. This tradition comes<xref
target="mockapetris-history"/> from a desire to optimize the number of
requests, when the same name server is authoritative for many zones in
a given name (something which was more common in the old days, where
the same name servers served .com and the root) or when the same name
server is both recursive and authoritative (something which is
strongly discouraged now). Whatever the merits of this choice at this
time, the DNS is quite different now.</t>
</section>

<section anchor="qname-main" title="QNAME minimisation">
<t>The idea is to minimise the amount of data sent from the DNS
resolver to the authoritative name server<!-- TODO or a forwarder? See
issue #14 -->. In the example in the previous section, sending "What
are the NS records for .com?" would have been sufficient (since it
will be the answer from the root anyway). The rest of this section
describes the recommended way to do QNAME minimisation, the one which
maximimes privacy benefits (other alternatives are discussed in
appendixes).</t>
<t>A resolver which implements QNAME minimisation, and which does not
have already the answer in its cache, instead of sending the full
QNAME and the original QTYPE upstream, sends a request to the name
server authoritative for the closest known parent of the original
QNAME. The request is done with:
<list>
<t>the QTYPE NS,</t>
<t>the QNAME which is the original QNAME, stripped to just one label
more than the zone for which the server is authoritative.</t>
</list>
For example, a resolver receives a request to resolve
foo.bar.baz.example. Let's assume it already knows that
ns1.nic.example is authoritative for .example and the resolver does
not know a more specific authoritative name server. It will send the
query QTYPE=NS,QNAME=baz.example to ns1.nic.example.</t>
<t>To do such minimisation, the resolver needs to know the zone cut
<xref target="RFC2181"/>.  Zone cuts do not necessarily exist at every
label boundary.  If we take the name www.foo.bar.example, it is
possible that there is a zone cut between "foo" and "bar" but not
between "bar" and "example"<!-- Real examples today are
www.economie.gouv.fr or www.janet.ac.uk -->.  So, assuming the
resolver already knows the name servers of .example, when it receives
the query "What is the AAAA record of www.foo.bar.example", it does
not always know whether the request should be sent to the name servers
of bar.example or to those of example. <xref target="RFC2181"/>
suggests a method to find the zone cut (section 6), so resolvers may
try it.</t>
<t>Note that DNSSEC-validating resolvers already have access to this
information, since they have to find the zone cut (the DNSKEY record
set is just below, the DS record set just above).</t>
</section>

<section title="Possible issues">
<t>QNAME minimisation is legal, since the original DNS RFC do not
mandate sending the full QNAME. So, in theory, it should work without
any problems. However, in practice, some problems may occur (see an
analysis in <xref target="huque-qnamemin"/>).</t>
<t>Some broken name servers do not react properly to qtype=NS
requests. For instance, some authoritative name servers embedded in
load balancers reply properly to A queries but send REFUSED to NS
queries.  REMOVE THIS SENTENCE BEFORE PUBLICATION: As an example of
today, look at www.ratp.fr (not ratp.fr). This behaviour is a gross
protocol violation, and there is no need to stop improving the DNS
because of such brokenness. However, QNAME minimisation may still work
with such domains since they are only leaf domains (no need to send
them NS requests). Such setup breaks more than just QNAME
minimisation. It breaks negative answers, since the servers don't
return the correct SOA, and it also breaks anything dependent upon NS
and SOA records existing at the top of the zone.
</t>
<t>A problem can also appear when a name server does not react
properly to ENT (Empty Non-Terminals). If ent.example.com has no
resource records but foobar.ent.example.com does, then ent.example.com
is an ENT. A query, whatever the qtype, for ent.example.com must
return NODATA (NOERROR / ANSWER: 0). However, some broken name servers
return NXDOMAIN for ENTs. REMOVE THIS SENTENCE BEFORE PUBLICATION: As
an example of today, look at com.akadns.net or www.upenn.edu with its
delegations to Akamai. If a resolver queries only
foobar.ent.example.com, everything will be OK but, if it implements
QNAME minimisation, it may query ent.example.com and get a
NXDOMAIN. See also section 3 of <xref
target="I-D.vixie-dnsext-resimprove"/> for the other bad consequences
of this brokenness.</t>
<t>Another way to deal with such broken name servers would be to try
with QTYPE=A requests (A being chosen because it is the most common
and hence a qtype which will be always accepted, while a qtype NS may
ruffle the feathers of some middleboxes). Instead of querying name
servers with a query "NS example.com", we could use "A _.example.com"
and see if we get a referral.</t>
<t>Other strange and non-conformant practices may pose a problem:
there is a common DNS anti-pattern used by low-end web hosters that
also do DNS hosting that exploits the fact that the DNS protocol
(pre-DNSSEC) allows certain serious misconfigurations, such as parent
and child zones disagreeing on the location of a zone cut.  Basically,
they have a single zone with wildcards for each TLD like:
<figure>
<artwork>
*.example.          60  IN  A   192.0.2.6
</artwork>
</figure>
(It is not known why they don't just wildcard all of "*." and be done with
it.)</t>
<t>This lets them turn up many web hosting customers without having to
configure thousands of individual zones on their nameservers.  They just
tell the prospective customer to point their NS records at the hoster's
nameservers, and the Web hoster doesn't have to provision anything in
order to make the customer's domain resolve. NS queries to the hoster
will therefore do not give the right result, which may endanger QNAME
minimisation (it will be a problem for DNSSEC, too).
</t>
</section>

<section title="Discussion">
<t>QNAME minimisation is compatible with the current DNS system and
therefore can easily be deployed; since it is a unilateral change to
the resolver, it does not change the protocol. (Because of that,
resolver implementers may do QNAME minimisation in slightly different
ways, see the appendices for examples.).</t>
<t>One should note that the behaviour suggested here (minimising the
amount of data sent in QNAMEs from the resolver) is NOT forbidden by
the <xref target="RFC1034"/> (section 5.3.3) or <xref
target="RFC1035"/> (section 7.2). As said in <xref target="intro"/>,
the current method, sending the full QNAME, is not mandated by the DNS
protocol.</t>
<t>It may be noticed that many documents explaining the DNS and
intended for a wide audience, incorrectly describe the resolution
process as using QNAME minimisation, for instance by showing a request
going to the root, with just the TLD in the query. As a result, these
documents may confuse the privacy analysis of the users who see them.</t>
</section>

<section title="Operational considerations">
<t>The administrators of the forwarders, and of the authoritative name
servers, will get less data, which will reduce the utility of the
statistics they can produce (such as the percentage of the various
QTYPEs) <xref target="kaliski-minimum"/>.</t>
<t>DNS administrators are reminded that the data on DNS requests
that they store may have legal consequences, depending on your
jurisdiction (check with your local lawyer).</t>
</section>

<section title="Performance considerations">
<t>The main goal of QNAME minimisation is to improve privacy by
sending less data. However, it may have other advantages. For
instance, if a root name server receives a query from some resolver
for A.example followed by B.example followed by C.example, the result
will be three NXDOMAINs, since .example does not exist in the root
zone. Under query name minimisation, the root name servers would hear
only one question (for .example itself) to which they could answer
NXDOMAIN, thus opening up a negative caching opportunity in which the
full resolver could know a priori that neither B.example or C.example
could exist. Thus in this common case the total number of upstream
queries under QNAME minimisation would be counter-intuitively less
than the number of queries under the traditional iteration (as
described in the DNS standard).</t>
<t>QNAME minimisation may also improve look-up performance for TLD
operators.  For a typical TLD, delegation-only, and with delegations
just under the TLD, a 2-label QNAME query is optimal for finding the
delegation owner name.</t>
<t>QNAME minimisation can decrease performance in some cases, for
instance for a deep domain name (like
www.host.group.department.example.com where
host.group.department.example.com is hosted on example.com's name
servers). For such a name, a cold resolver will, depending how QNAME
minimisation is implemented, send more queries. Once the cache is
warm, there will be no difference with a traditional resolver. A
possible solution is to always use the traditional algorithm when the
cache is cold and then to move to QNAME minimisation. This will
decrease the privacy a bit but will guarantee no degradation of
performance. Actual testing is described in <xref
target="huque-qnamemin"/>. Such deep domains are specially common
under ip6.arpa.</t>
</section>

<section title="Security considerations">
<t>QNAME minimisation's benefits are clear in the case where you want
to decrease exposure to the authoritative name server. But minimising
the amount of data sent also, in part, addresses the case of a wire
sniffer as well the case of privacy invasion by the
servers. (Encryption is of course a better defense against wire
sniffers but, unlike QNAME minimisation, it changes the protocol and
cannot be deployed unilaterally. Also, the effect of QNAME
minimisation on wire sniffers depend on whether the sniffer is, on the
DNS path.)</t>
<t>QNAME minimisation offers zero protection against the recursive
resolver, which still sees the full request coming from the stub
resolver.</t>
</section>

<section title="Implementation status - REMOVE BEFORE PUBLICATION">

<t>This section records the status of known implementations of the
protocol defined by this specification at the time of posting of this
Internet-Draft, and is based on a proposal described in <xref
target="RFC6982"/>. The description of implementations in this section
is intended to assist the IETF in its decision processes in
progressing drafts to RFCs.  Please note that the listing of any
individual implementation here does not imply endorsement by the IETF.
Furthermore, no effort has been spent to verify the information
presented here that was supplied by IETF contributors.  This is not
intended as, and must not be construed to be, a catalog of available
implementations or their features.  Readers are advised to note that
other implementations may exist.</t>
<t>According to <xref target="RFC6982"/>, "this will allow reviewers
and working groups to assign due consideration to documents that have
the benefit of running code, which may serve as evidence of valuable
experimentation and feedback that have made the implemented protocols
more mature.  It is up to the individual working groups to use this
information as they see fit".</t>
<t>As of today, no production resolver implements QNAME minimisation
but it has been publically announced for the <eref
target="https://ripe70.ripe.net/presentations/121-knot-resolver-ripe70.pdf">future
Knot DNS resolver</eref>. For Unbound, see <eref
target="https://www.nlnetlabs.nl/bugs-script/show_bug.cgi?id=648">ticket
648</eref> and for PowerDNS <eref
target="https://github.com/PowerDNS/pdns/issues/2311"/>.</t>
<t>The algorithm to find the zone cuts described in <xref
target="zonecutalgo"/> is implemented with QNAME minimisation in <eref
target="https://github.com/bortzmeyer/my-IETF-work/blob/master/draft-ietf-dnsop-QNAME-minimisation/zonecut.go">the
sample code zonecut.go</eref>. It is also implemented, for a much
longer time, in an option of dig, "dig +trace", but without QNAME
minimisation.</t>
<t>Another implementation was done by Shumon Huque for testing, and is
described in <xref target="huque-qnamemin"/>.</t>
</section>

<section title="Acknowledgments">
<t>Thanks to Olaf Kolkman for the original idea although the concept
is probably <eref
target="https://lists.dns-oarc.net/pipermail/dns-operations/2010-February/005003.html">much
older</eref>. Thanks for Shumon Huque for implementation and testing.
Thanks to Mark Andrews and Francis Dupont for the interesting
discussions. Thanks to Brian Dickson, Warren Kumari, Evan Hunt and
David Conrad for remarks and suggestions. Thanks to Mohsen Souissi for
proofreading. Thanks to Tony Finch for the zone cut algorithm in <xref
target="zonecutalgo"/>. Thanks to Paul Vixie for pointing out that
there are practical advantages (besides privacy) to QNAME
minimisation.  Thanks to Phillip Hallam-Baker for the fallback on A
queries, to deal with broken servers. Thanks to Robert Edmonds for an
interesting anti-pattern.</t>
</section>

</middle>

<back>

<references title='Normative References'>
&rfc1034;
&rfc1035;
&rfc6973;
&I-D.ietf-dprive-problem-statement;
</references>

<references title='Informative References'>
&rfc2181;
&rfc6982;
&I-D.wkumari-dnsop-hammer;
&I-D.vixie-dnsext-resimprove;

<reference anchor="dnsop" target="https://datatracker.ietf.org/wg/dnsop/charter/">
<front>
<title>The DNSOP working group of IETF</title>
<author fullname="IETF" surname="IETF"/>
<date month="March" year="2014"/>
<abstract>
<t>The DNS Operations Working Group will develop guidelines for the
operation of DNS software and services and for the administration
of DNS zones.</t>
</abstract>
</front>
</reference>

<reference anchor="mockapetris-history">
<front>
<title>Private discussion</title>
<author fullname="Paul Mockapetris" surname="Mockapetris" initials="P."/>
<date day="13" month="January" year="2015"/>
<abstract><t>Meeting in the AFNIC office.</t></abstract>
</front>
</reference>

<reference anchor="kaliski-minimum" target="http://blogs.verisigninc.com/blog/entry/minimum_disclosure_what_information_does">
<front>
<title>Minimum Disclosure: What Information Does a Name Server Need to Do Its Job?</title>
<author fullname="Burt Kaliski" initials="B." surname="Kaliski"/>
<date month="March" year="2015"/>
</front>
</reference>

<reference anchor="huque-qnamemin" target="https://indico.dns-oarc.net/event/21/contribution/9">
<front>
<title>Query name minimization and authoritative server behavior</title>
<author fullname="Shumon Huque" initials="S." surname="Huque"/>
<date month="May" year="2015"/>
</front>
</reference>

<reference anchor="huque-qnamestorify" target="https://storify.com/shuque/qname-minimization-dns-oarc">
<front>
<title>Qname Minimization @ DNS-OARC</title>
<author fullname="Shumon Huque" initials="S." surname="Huque"/>
<date month="May" year="2015"/>
</front>
</reference>

</references>

<section anchor="zonecutalgo" title="An algorithm to find the zone cut">

  <!-- source
       http://www.ietf.org/mail-archive/web/dns-privacy/current/msg00035.html -->
<t>Although a validating resolver already has the logic to find the
zone cut, other resolvers may be interested by this algorithm to
follow in order to locate this cut:
<list style="empty">
<t>(0) If the query can be answered from the cache, do so, otherwise iterate
as follows:</t>
<t>(1) Find closest enclosing NS RRset in your cache. The owner of this NS
RRset will be a suffix of the QNAME - the longest suffix of any NS RRset
in the cache. Call this PARENT.</t>
<t>(2) Initialize CHILD to the same as PARENT.</t>
<t>(3) If CHILD is the same as the QNAME, resolve the original query using
PARENT's name servers, and finish.</t>
<t>(4) Otherwise, add a label from the QNAME to the start of CHILD.</t>
<t>(5) If you have a negative cache entry for the NS RRset at CHILD, go back
to step 3.</t>
<t>(6) Query for CHILD IN NS using PARENT's name servers. The response can
be:
<list style="empty">
<t>(6a) A referral. Cache the NS RRset from the authority section and go back
to step 1.</t>
<t>(6b) An authoritative answer. Cache the NS RRset from the answer section
and go back to step 1.</t>
<t>(6c) An NXDOMAIN answer. Return an NXDOMAIN answer in response to the
original query and stop.</t>
<t>(6d) A NOERROR/NODATA answer. Cache this negative answer and go back to
step 3.</t>
</list></t>
</list>
</t></section>

<section title="Alternatives">
<t>Remember that QNAME minimisation is unilateral so a resolver is not
forced to implement it exactly as described here.</t>
<t>There are several ways to perform QNAME minimisation. The one in
<xref target="qname-main"/> is the suggested one. It can be called the
aggressive algorithm, since the resolver only sends NS queries as long
as it does not know the zone cuts. This is the safest, from a privacy
point of view. Another possible algorithm, not fully studied at this
time, could be to "piggyback" on the traditional resolution code. At
startup, it sends traditional full QNAMEs and learns the zone cuts
from the referrals received, then switches to NS queries asking only
for the minimum domain name. This leaks more data but could require
fewer changes in the existing resolver codebase.</t>
<t>In the above specification, the original QTYPE is replaced by NS
(or may be A, if too many servers react incorrectly to NS requests),
which is the best approach to preserve privacy. But this erases
information about the relative use of the various QTYPEs, which may be
interesting for researchers (for instance if they try to follow IPv6
deployment by counting the percentage of AAAA vs. A queries). A
variant of QNAME minimisation would be to keep the original QTYPE.</t>
<t>Another useful optimisation may be, in the spirit of the HAMMER
idea <xref target="I-D.wkumari-dnsop-hammer"/> to probe in advance for
the introduction of zone cuts where none previously existed
(i.e. confirm their continued absence, or discover them.)</t>
</section>

<!-- IPR:

http://datatracker.ietf.org/ipr/2542/ Licence RF and RAND.
http://www.google.com/patents/EP2611116A1?cl=en Good rationale for
data minimisation. Strange idea of "false labels"; may be an
equivalent of the "A query with a label _" idea of PHB? 

Possible prior art: https://lists.dns-oarc.net/pipermail/dns-operations/2010-February/005003.html

-->

</back>

</rfc>




PAFTECH AB 2003-20262026-04-24 04:39:21