Trust Anchor Signaling: Signaling Trust Anchor Knowledge in DNS Security Extensions (DNSSEC)
How a DNSSEC validating resolver can tell a server which trust anchor keys it uses, so key rollovers can be watched.
Wessels, D., Kumari, W., and P. Hoffman, "Signaling Trust Anchor Knowledge in DNS Security Extensions (DNSSEC)", RFC 8145, DOI 10.17487/RFC8145, April 2017, <https://www.rfc-editor.org/info/rfc8145>.
@misc{rfc8145,
series = {Request for Comments},
number = 8145,
howpublished = {RFC 8145},
publisher = {RFC Editor},
doi = {10.17487/RFC8145},
url = {https://www.rfc-editor.org/info/rfc8145},
author = {D. Wessels and W. Kumari and P. Hoffman},
title = {{Signaling Trust Anchor Knowledge in DNS Security Extensions (DNSSEC)}},
pagetotal = 13,
year = 2017,
month = apr,
} RFC text
Contents
Internet Engineering Task Force (IETF) D. Wessels
Request for Comments: 8145 Verisign
Category: Standards Track W. Kumari
ISSN: 2070-1721 Google
P. Hoffman
ICANN
April 2017
Signaling Trust Anchor Knowledge in DNS Security Extensions (DNSSEC)
Abstract
The DNS Security Extensions (DNSSEC) were developed to provide origin
authentication and integrity protection for DNS data by using digital
signatures. These digital signatures can be verified by building a
chain of trust starting from a trust anchor and proceeding down to a
particular node in the DNS. This document specifies two different
ways for validating resolvers to signal to a server which keys are
referenced in their chain of trust. The data from such signaling
allow zone administrators to monitor the progress of rollovers in a
DNSSEC-signed zone.
Status of This Memo
This is an Internet Standards Track document.
This document is a product of the Internet Engineering Task Force
(IETF). It represents the consensus of the IETF community. It has
received public review and has been approved for publication by the
Internet Engineering Steering Group (IESG). Further information on
Internet Standards is available in Section 2 of RFC 7841.
Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
http://www.rfc-editor.org/info/rfc8145.
Copyright Notice
Copyright (c) 2017 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.
Table of Contents
1. Introduction ....................................................3
1.1. Design Evolution ...........................................4
2. Requirements Terminology ........................................5
3. Terminology .....................................................5
4. Using the edns-key-tag Option ...................................5
4.1. Option Format ..............................................5
4.2. Use by Queriers ............................................6
4.2.1. Stub Resolvers ......................................7
4.2.1.1. Validating Stub Resolvers ..................7
4.2.1.2. Non-validating Stub Resolvers ..............7
4.2.2. Recursive Resolvers .................................7
4.2.2.1. Validating Recursive Resolvers .............7
4.2.2.2. Non-validating Recursive Resolvers .........8
4.3. Use by Responders ..........................................8
5. Using the Key Tag Query .........................................8
5.1. Query Format ...............................................8
5.2. Use by Queriers ............................................9
5.3. Use by Responders ..........................................9
5.3.1. Interaction with Aggressive Negative Caching ........9
6. IANA Considerations ............................................10
7. Security Considerations ........................................10
8. Privacy Considerations .........................................11
9. References .....................................................11
9.1. Normative References ......................................11
9.2. Informative References ....................................12
Acknowledgments ...................................................13
Authors' Addresses ................................................13
1. Introduction
The DNS Security Extensions (DNSSEC) [RFC4033] [RFC4034] [RFC4035]
were developed to provide origin authentication and integrity
protection for DNS data by using digital signatures. DNSSEC uses
Key Tags to efficiently match signatures to the keys from which they
are generated. The Key Tag is a 16-bit value computed from the RDATA
portion of a DNSKEY resource record (RR) using a formula not unlike a
ones-complement checksum. RRSIG RRs contain a Key Tag field whose
value is equal to the Key Tag of the DNSKEY RR that validates the
signature.
Likewise, Delegation Signer (DS) RRs also contain a Key Tag field
whose value is equal to the Key Tag of the DNSKEY RR to which it
refers.
This document specifies how validating resolvers can tell a server,
in a DNS query, which DNSSEC key(s) they would use to validate the
server's responses. It describes two independent methods for
conveying Key Tag information between clients and servers:
1. placing an EDNS option in the OPT RR [RFC6891] that contains the
Key Tags (described in Section 4)
2. periodically sending special "Key Tag queries" to a server
authoritative for the zone (described in Section 5)
Each of these new signaling mechanisms is OPTIONAL to implement and
use. These mechanisms serve to measure the acceptance and use of new
DNSSEC trust anchors and key signing keys (KSKs). This signaling
data can be used by zone administrators as a gauge to measure the
successful deployment of new keys. This is of particular interest
for the DNS root zone in the event of key and/or algorithm rollovers
that rely on [RFC5011] to automatically update a validating DNS
resolver's trust anchor.
This document does not introduce new processes for rolling keys or
updating trust anchors. Rather, it specifies a means by which a DNS
query can signal the set of keys that a client uses for DNSSEC
validation.
1.1. Design Evolution
Initially, when the work on this document started, it proposed
including Key Tag values in a new EDNS(0) option code. It was
modeled after [RFC6975], which provides DNSSEC algorithm signaling.
The authors received feedback from participants in the DNSOP Working
Group that it might be better to convey Key Tags in the QNAME of a
separate DNS query, rather than as an EDNS(0) option. Mostly, this
is because forwarding (e.g., from stub to recursive to authoritative)
could be problematic. Reasons include the following:
1. EDNS(0) is a hop-by-hop protocol. Unknown option codes would not
be forwarded by default, as per [RFC6891].
2. Middleboxes might block entire queries containing unknown EDNS(0)
option codes.
3. A recursive resolver might need to remember Key Tag values (i.e.,
keep state) received from its stub clients and then forward them
at a later opportunity.
One advantage of the EDNS(0) option code is that it is possible to
see that a stub client has a different Key Tag list than its
forwarder. In the QNAME-based approach, this is not possible because
queries originated by a stub and a forwarder are indistinguishable.
The authors feel that this advantage is not sufficient to justify the
EDNS(0) approach.
One downside to the QNAME approach is that it uses a separate query,
whereas with EDNS(0) the Key Tag values are "piggybacked" onto an
existing DNSKEY query. For this reason, this document recommends
only sending QNAME-based Key Tag queries for trust anchors, although
EDNS-based Key Tags can be sent with any DNSKEY query.
Another downside to the QNAME-based approach is that since the
trust anchor zone might not contain labels matching the QNAME, these
queries could be subject to aggressive negative caching features now
in development by the Working Group. This could affect the amount of
signaling sent by some clients compared to others.
A probably minor downside to the QNAME-based approach is that it
cannot be used with extremely long query names if the addition of the
prefix would cause the name to be longer than 255 octets.
2. Requirements Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [RFC2119].
3. Terminology
Trust Anchor: A configured DNSKEY RR or DS RR hash of a DNSKEY RR.
A validating security-aware resolver uses this public key or hash
as a starting point for building the authentication chain to a
signed DNS response. In general, a validating resolver will have
to obtain the initial values of its trust anchors via some secure
or trusted means outside the DNS protocol. Presence of a
trust anchor also implies that the resolver should expect the zone
to which the trust anchor points to be signed. (This paragraph is
quoted from Section 2 of [RFC4033].)
Key Tag: A 16-bit integer that identifies and enables efficient
selection of DNSSEC public keys. A Key Tag value can be computed
over the RDATA of a DNSKEY RR. The Key Tag field in the RRSIG and
DS records can be used to help select the corresponding DNSKEY RR
efficiently when more than one candidate DNSKEY RR is available.
For most algorithms, the Key Tag is a simple 16-bit modular sum of
the DNSKEY RDATA. See [RFC4034], Appendix B.
4. Using the edns-key-tag Option
4.1. Option Format
The edns-key-tag option is encoded as follows:
0 8 16
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
| OPTION-CODE |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
| OPTION-LENGTH |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
| KEY-TAG |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
| ... /
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
where:
OPTION-CODE: The EDNS0 option code assigned to edns-key-tag (14).
OPTION-LENGTH: The value 2 x number of key-tag values present.
KEY-TAG: One or more 16-bit Key Tag values ([RFC4034], Appendix B).
4.2. Use by Queriers
A validating resolver sets the edns-key-tag option in the OPT RR when
sending a DNSKEY query. The validating resolver SHOULD also set the
DNSSEC OK bit (also known as the DO bit) [RFC4035] to indicate that
it wishes to receive DNSSEC RRs in the response.
A DNS client MUST NOT include the edns-key-tag option for non-DNSKEY
queries.
The KEY-TAG value(s) included in the edns-key-tag option represents
the Key Tag of the trust anchor or DNSKEY RR that will be used to
validate the expected response. When the client sends a DNSKEY
query, the edns-key-tag option represents the Key Tag(s) of the
KSK(s) of the zone for which the server is authoritative. A
validating resolver learns the Key Tag(s) of the KSK(s) from the
zone's DS record(s) (found in the parent) or from a trust anchor.
A DNS client SHOULD include the edns-key-tag option when issuing a
DNSKEY query for a zone corresponding to a trust anchor.
A DNS client MAY include the edns-key-tag option when issuing a
DNSKEY query for a non-trust anchor zone (i.e., Key Tags learned via
DS records). Since some DNSSEC validators implement bottom-up
validation, a non-trust anchor Key Tags zone might not be known at
the time of the query. Such a validator can include the edns-key-tag
option based on previously cached data.
A DNS client MUST NOT include Key Tag(s) for keys that are not
learned via either a trust anchor or DS records.
Since the edns-key-tag option is only set in the query, if a client
sees these options in the response, no action needs to be taken and
the client MUST ignore the option values.
4.2.1. Stub Resolvers
Typically, stub resolvers rely on an upstream recursive resolver (or
cache) to provide a response. Optimal setting of the edns-key-tag
option depends on whether the stub resolver elects to perform its own
validation.
4.2.1.1. Validating Stub Resolvers
A validating stub resolver sets the DNSSEC OK bit [RFC4035] to
indicate that it wishes to receive additional DNSSEC RRs (i.e., RRSIG
RRs) in the response. Such validating resolvers SHOULD include the
edns-key-tag option in the OPT RR when sending a DNSKEY query.
4.2.1.2. Non-validating Stub Resolvers
The edns-key-tag option MUST NOT be included by non-validating stub
resolvers.
4.2.2. Recursive Resolvers
4.2.2.1. Validating Recursive Resolvers
A validating recursive resolver is, by definition, configured with at
least one trust anchor. Thus, a recursive resolver SHOULD include
the edns-key-tag option in its DNSKEY queries as described above.
In addition, the clients of a validating recursive resolver might be
configured to do their own validation, with their own
trust anchor(s). When a validating recursive resolver receives a
query that includes the edns-key-tag option with a Key Tag list that
differs from its own, it SHOULD forward both the client's Key Tag
list and its own list. When doing so, the recursive resolver SHOULD
transmit the two Key Tag lists using separate instances of the
edns-key-tag option code in the OPT RR. For example, if the
recursive resolver's Key Tag list is (19036, 12345) and the
stub/client's list is (19036, 34567), the recursive resolver
would include the edns-key-tag option twice: once with values
(19036, 12345) and once with values (19036, 34567).
A validating recursive resolver MAY combine stub/client Key Tag
values from multiple incoming queries into a single outgoing query.
It is RECOMMENDED that implementations place reasonable limits on the
number of Key Tags to include in the outgoing edns-key-tag option.
If the client included the DNSSEC OK and Checking Disabled (CD) bits
but did not include the edns-key-tag option in the query, the
validating recursive resolver MAY include the option with its own
Key Tag values in full.
Validating recursive resolvers MUST NOT set the edns-key-tag option
in the final response to the stub client.
4.2.2.2. Non-validating Recursive Resolvers
Recursive resolvers that do not validate responses SHOULD copy the
edns-key-tag option seen in received queries, as they represent the
wishes of the validating downstream resolver that issued the original
query.
4.3. Use by Responders
An authoritative name server receiving queries with the edns-key-tag
option MAY log or otherwise collect the Key Tag values to provide
information to the zone operator.
A responder MUST NOT include the edns-key-tag option in any DNS
response.
5. Using the Key Tag Query
5.1. Query Format
A Key Tag query consists of a standard DNS query of type NULL and of
class IN [RFC1035].
The first component of the query name is the string "_ta-" followed
by a sorted, hyphen-separated list of hexadecimal-encoded Key Tag
values. The zone name corresponding to the trust anchor is appended
to this first component.
For example, a validating DNS resolver that has a single root zone
trust anchor with Key Tag 17476 (decimal) would originate a query of
the form QTYPE=NULL, QCLASS=IN, QNAME=_ta-4444.
Hexadecimal values MUST be zero-padded to four hexadecimal digits.
For example, if the Key Tag is 999 (decimal), it is represented in
hexadecimal as 03e7.
When representing multiple Key Tag values, they MUST be sorted in
order from smallest to largest. For example, a validating DNS
resolver that has three trust anchors for the example.com zone with
Key Tags 1589, 43547, 31406 (decimal) would originate a query of the
form QTYPE=NULL, QCLASS=IN, QNAME=_ta-0635-7aae-aa1b.example.com.
5.2. Use by Queriers
A validating DNS resolver (stub or recursive) SHOULD originate a
Key Tag query whenever it also originates a DNSKEY query for a
trust anchor zone. In other words, the need to issue a DNSKEY query
is also the trigger to issue a Key Tag query.
The value(s) included in the Key Tag query represents the Key Tag(s)
of the trust anchor that will be used to validate the expected DNSKEY
response.
A validating DNS resolver SHOULD NOT originate Key Tag queries when
also originating DNSKEY queries for non-trust anchor zones.
A non-validating DNS resolver MUST NOT originate Key Tag queries.
DNS resolvers with caches SHOULD cache and reuse the response to a
Key Tag query just as it would any other response.
5.3. Use by Responders
An authoritative name server receiving Key Tag queries MAY log or
otherwise collect the Key Tag values to provide information to the
zone operator.
An authoritative name server MUST generate an appropriate response to
the Key Tag query. A server does not need to have built-in logic
that determines the response to Key Tag queries: the response code is
determined by whether the data is in the zone file or covered by
wildcards. The zone operator might want to add specific Key Tag
records to its zone, perhaps with specific TTLs, to affect the
frequency of Key Tag queries from clients.
5.3.1. Interaction with Aggressive Negative Caching
Aggressive NSEC/NSEC3 negative caching [NSEC-NSEC3-Usage] may also
affect the quality of Key Tag signaling. When the response code for
a Key Tag query is NXDOMAIN, DNS resolvers that implement aggressive
negative caching will send fewer Key Tag queries than resolvers that
do not implement it.
For this reason, zone operators might choose to create records
corresponding to expected Key Tag queries. During a rollover from
Key Tag 1111 (hex) to Key Tag 2222 (hex), the zone could include the
following records:
_ta-1111 IN NULL \# 0
_ta-2222 IN NULL \# 0
_ta-1111-2222 IN NULL \# 0
Recall that when multiple Key Tags are present, the originating
client MUST sort them from smallest to largest in the query name.
6. IANA Considerations
IANA has assigned an EDNS0 option code for the edns-key-tag option in
the "DNS EDNS0 Option Codes (OPT)" registry as follows:
+-------+--------------+----------+-----------+
| Value | Name | Status | Reference |
+-------+--------------+----------+-----------+
| 14 | edns-key-tag | Optional | RFC 8145 |
+-------+--------------+----------+-----------+
7. Security Considerations
This document specifies two ways for a client to signal its
trust anchor knowledge to a cache or server. The goal of these
optional mechanisms is to signal new trust anchor uptake in clients
to allow zone administrators to know when it is possible to complete
a key rollover in a DNSSEC-signed zone.
There is a possibility that an eavesdropper or server could infer the
validator in use by a client by the Key Tag list seen. This may
allow an attacker to find validators using old, possibly broken,
keys. It could also be used to identify the validator or to narrow
down the possible validator implementations in use by a client; the
validator used by the client could have a known vulnerability that
could be exploited by the attacker.
Consumers of data collected from the mechanisms described in this
document are advised that provided Key Tag values might be "made up"
by some DNS clients with malicious, or at least mischievous,
intentions. For example, an attacker with sufficient resources might
try to generate large numbers of queries including only old Key Tag
values, with the intention of delaying the completion of a key
rollover.
DNSSEC does not require keys in a zone to have unique Key Tags.
During a rollover, there is a small possibility that an old key and a
new key will have identical Key Tag values. Zone operators relying
on the edns-key-tag mechanism SHOULD take care to ensure that new
keys have unique Key Tag values.
8. Privacy Considerations
This proposal provides additional, optional "signaling" to DNS
queries in the form of Key Tag values. While Key Tag values
themselves are not considered private information, it may be possible
for an eavesdropper to use Key Tag values as a fingerprinting
technique to identify particular validating DNS clients. This may be
especially true if the validator is configured with trust anchors for
zones in addition to the root zone.
A validating resolver need not transmit the Key Tags in every
applicable query. Due to privacy concerns, such a resolver MAY
choose to transmit the Key Tags for a subset of queries (e.g., every
25th time) or by random chance with a certain probability (e.g., 5%).
Implementations of this specification MAY be administratively
configured to only transmit the Key Tags for certain zones. For
example, the software's configuration file may specify a list of
zones for which the use of the mechanisms described here is allowed
or denied. Since the primary motivation for this specification is to
provide operational measurement data for root zone key rollovers, it
is RECOMMENDED that implementations at least include the edns-key-tag
option for root zone DNSKEY queries.
9. References
9.1. Normative References
[RFC1035] Mockapetris, P., "Domain names - implementation and
specification", STD 13, RFC 1035, DOI 10.17487/RFC1035,
November 1987, <http://www.rfc-editor.org/info/rfc1035>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
<http://www.rfc-editor.org/info/rfc2119>.
[RFC4033] Arends, R., Austein, R., Larson, M., Massey, D., and S.
Rose, "DNS Security Introduction and Requirements",
RFC 4033, DOI 10.17487/RFC4033, March 2005,
<http://www.rfc-editor.org/info/rfc4033>.
[RFC4034] Arends, R., Austein, R., Larson, M., Massey, D., and S.
Rose, "Resource Records for the DNS Security Extensions",
RFC 4034, DOI 10.17487/RFC4034, March 2005,
<http://www.rfc-editor.org/info/rfc4034>.
[RFC4035] Arends, R., Austein, R., Larson, M., Massey, D., and S.
Rose, "Protocol Modifications for the DNS Security
Extensions", RFC 4035, DOI 10.17487/RFC4035, March 2005,
<http://www.rfc-editor.org/info/rfc4035>.
[RFC6891] Damas, J., Graff, M., and P. Vixie, "Extension Mechanisms
for DNS (EDNS(0))", STD 75, RFC 6891,
DOI 10.17487/RFC6891, April 2013,
<http://www.rfc-editor.org/info/rfc6891>.
9.2. Informative References
[NSEC-NSEC3-Usage]
Fujiwara, K., Kato, A., and W. Kumari, "Aggressive use of
DNSSEC-validated Cache", Work in Progress,
draft-ietf-dnsop-nsec-aggressiveuse-09, March 2017.
[RFC5011] StJohns, M., "Automated Updates of DNS Security (DNSSEC)
Trust Anchors", STD 74, RFC 5011, DOI 10.17487/RFC5011,
September 2007, <http://www.rfc-editor.org/info/rfc5011>.
[RFC6975] Crocker, S. and S. Rose, "Signaling Cryptographic
Algorithm Understanding in DNS Security Extensions
(DNSSEC)", RFC 6975, DOI 10.17487/RFC6975, July 2013,
<http://www.rfc-editor.org/info/rfc6975>.
Acknowledgments
This document was inspired by and borrows heavily from [RFC6975] by
Scott Rose and Steve Crocker. The authors would like to thank Mark
Andrews, Casey Deccio, Burt Kalisky, Bob Harold, Edward Lewis, Tim
Wicinski, Suzanne Woolf, and other members of the DNSOP Working Group
for their input.
Authors' Addresses
Duane Wessels
Verisign
12061 Bluemont Way
Reston, VA 20190
United States of America
Phone: +1 703 948-3200
Email: dwessels@verisign.com
URI: http://verisigninc.com
Warren Kumari
Google
1600 Amphitheatre Parkway
Mountain View, CA 94043
United States of America
Email: warren@kumari.net
Paul Hoffman
ICANN
Email: paul.hoffman@icann.org
ISO Plain Language
On this page
§1Why Signal Trust Anchor Knowledge
The DNS Security Extensions were developed to give DNS data origin authentication and integrity protection using digital signatures. Those signatures are verified by building a chain of trust that starts at a trust anchor and runs down to the node in the DNS being checked. DNSSEC uses Key Tags to match signatures efficiently to the keys that produced them. A Key Tag is a 16-bit value computed from the RDATA of a DNSKEY record with a formula not unlike a one's-complement checksum. An RRSIG record carries a Key Tag field equal to the Key Tag of the DNSKEY that validates it, and a Delegation Signer record carries one equal to the Key Tag of the DNSKEY it refers to.
This document specifies how validating resolvers can tell a server, in a DNS query, which DNSSEC keys they would use to validate the server's answers. It describes two independent ways of conveying Key Tag information between clients and servers: putting an EDNS option in the OPT record that carries the Key Tags, and periodically sending special Key Tag queries to a server authoritative for the zone.
Both mechanisms are optional to implement and use. Their purpose is to measure the acceptance and use of new DNSSEC trust anchors and key signing keys, and the data can be used by zone administrators as a gauge of how successfully a new key has been deployed. This matters most for the DNS root zone during key or algorithm rollovers that rely on RFC 5011 to update a validating resolver's trust anchor automatically.
The document introduces no new process for rolling keys or updating trust anchors. It only specifies a means for a DNS query to signal the set of keys a client uses for validation.
DNSSEC works by signing DNS records and checking those signatures against a chain of keys that starts at a trust anchor the resolver already holds. When the zone operator changes the keys, the operator needs to know how many resolvers have switched over. This document lets a resolver say which keys it holds.
§1.1How the Design Changed
The work started by proposing to carry Key Tag values in a new EDNS option code, modelled on RFC 6975, which signals DNSSEC algorithm understanding. Feedback from the DNSOP Working Group suggested that the Key Tags would be better carried in the QNAME of a separate DNS query, because forwarding from a stub to a recursive resolver and on to an authoritative server can be problematic. The reasons given were that EDNS is a hop-by-hop protocol, so unknown option codes would not be forwarded by default, that middleboxes might block entire queries containing unknown option codes, and that a recursive resolver might have to remember the Key Tag values from its stub clients and forward them later, keeping state it does not otherwise need.
One advantage of the EDNS option is that it is possible to see that a stub client has a different Key Tag list from its forwarder. In the QNAME approach that is not possible, because queries sent by a stub and by a forwarder are indistinguishable. The authors judged that this advantage did not justify the EDNS approach.
One downside of the QNAME approach is that it needs a separate query, whereas with EDNS the Key Tag values ride along on an existing DNSKEY query. For that reason the document recommends sending only QNAME-based Key Tag queries for trust anchors, while EDNS-based Key Tags can be sent with any DNSKEY query. Another downside is that the trust anchor zone might not contain labels matching the QNAME, so these queries could be affected by aggressive negative caching, which would change how much signalling some clients send compared with others. A minor further downside is that the approach cannot be used with extremely long query names where adding the prefix would make the name longer than 255 octets.
The first design put the key tags in an extra field on a DNS query. The working group preferred putting them in the name of a separate query instead, because extra fields get stripped by middleboxes and by hops in the middle. The document keeps both, but recommends the separate query only for trust anchors.
| Aspect | edns-key-tag option | Key Tag query |
|---|---|---|
| Where the key tags go | An extra field on a DNSKEY query | The name of a separate query |
| Survives forwarding | No, EDNS is hop-by-hop and middleboxes may drop it | Yes, it is an ordinary query |
| Extra query needed | No | Yes |
| Usable with very long names | Yes | No, the prefix could push the name past 255 octets |
| Affects negative caching | No | Yes, an NXDOMAIN answer may be cached aggressively |
§4.1The edns-key-tag Option
The edns-key-tag option is an EDNS option carried in the OPT record. Its OPTION-CODE is 14, the EDNS0 option code assigned to it. Its OPTION-LENGTH is twice the number of key tag values present, since each Key Tag is 16 bits. The option then carries one or more 16-bit Key Tag values.
The Key Tag values in the option are the Key Tags of the trust anchor or DNSKEY record that will be used to validate the expected response. When the client sends a DNSKEY query, the option represents the Key Tags of the key signing keys of the zone the server is authoritative for. A validating resolver learns those Key Tags from the zone's Delegation Signer records, which are found in the parent zone, or from a trust anchor.
A DNS client MUST NOT include the option for queries other than DNSKEY queries. It SHOULD include it when issuing a DNSKEY query for a zone that corresponds to a trust anchor, and MAY include it for a DNSKEY query for a zone that is not a trust anchor zone, where the Key Tags were learned from Delegation Signer records. Because some validators implement bottom-up validation, the Key Tags for a non-trust-anchor zone might not be known at the time of the query, in which case a validator can base the option on previously cached data. A DNS client MUST NOT include Key Tags for keys that were not learned from either a trust anchor or Delegation Signer records.
Since the option is only set in the query, a client that sees it in a response needs to take no action and MUST ignore the option values.
The option is a short list of 16-bit numbers, each one identifying a key. It may only be attached to a DNSKEY query, and only for keys the resolver got from a trust anchor or from a Delegation Signer record.
| Field | Name | Size | Value | Description |
|---|---|---|---|---|
OPTION-CODE | OPTION-CODE | 2 bytes | The EDNS0 option code assigned to edns-key-tag, which is 14. | |
OPTION-LENGTH | OPTION-LENGTH | 2 bytes | Twice the number of key tag values present, since each Key Tag is 16 bits. | |
KEY-TAG | KEY-TAG | 2 bytes | One or more 16-bit Key Tag values identifying the DNSSEC keys the resolver will use to validate the response. |
§4.2Who Sends It and Who Forwards It
A validating resolver sets the edns-key-tag option in the OPT record when it sends a DNSKEY query, and SHOULD also set the DNSSEC OK bit, also known as the DO bit, to say it wants DNSSEC records in the response.
A validating stub resolver sets the DO bit to ask for the additional DNSSEC records, that is the RRSIG records, and SHOULD include the option in the OPT record when sending a DNSKEY query. A non-validating stub resolver MUST NOT include the option.
A validating recursive resolver is by definition configured with at least one trust anchor, so it SHOULD include the option in its DNSKEY queries. Its clients may also be configured to validate with their own trust anchors. When a validating recursive resolver receives a query whose Key Tag list differs from its own, it SHOULD forward both the client's list and its own, using separate instances of the option code in the OPT record. The example given is a resolver whose own list is (19036, 12345) and a stub whose list is (19036, 34567): the resolver includes the option twice, once with each list. A validating recursive resolver MAY combine Key Tag values from several incoming queries into a single outgoing query, and it is RECOMMENDED that implementations put reasonable limits on how many Key Tags an outgoing option carries. If a client set the DO and Checking Disabled bits but sent no option, the resolver MAY include the option with its own Key Tag values in full. A validating recursive resolver MUST NOT set the option in the final response to the stub client.
A recursive resolver that does not validate responses SHOULD copy the option seen in received queries, because it carries the wishes of the validating resolver that sent the original query.
An authoritative name server receiving queries with the option MAY log or otherwise collect the Key Tag values to give information to the zone operator. A responder MUST NOT include the option in any DNS response.
Only resolvers that check signatures send the option, and only on DNSKEY queries. A recursive resolver passes it along so the server can see it, and may add its own list as a second copy. The server collects the values for the operator, and never sends the option back.
- DNSKEY query with edns-key-tagThe stub lists the key tags of the trust anchors it holds.
- DNSKEY query with both key tag listsThe recursive resolver forwards the client's list and its own.
- DNSKEY responseThe response never carries the option.
- DNSKEY response
§5.1The Key Tag Query
A Key Tag query is a standard DNS query of type NULL and class IN. The first component of the query name is the string _ta- followed by a sorted, hyphen-separated list of hexadecimal-encoded Key Tag values, and the zone name corresponding to the trust anchor is appended to that first component.
A validating resolver with a single root zone trust anchor with Key Tag 17476 in decimal would originate a query with QTYPE=NULL, QCLASS=IN and QNAME _ta-4444. Hexadecimal values MUST be zero-padded to four hexadecimal digits, so Key Tag 999 in decimal is written as 03e7. When several Key Tag values are present they MUST be sorted from smallest to largest. A resolver with three trust anchors for the example.com zone with Key Tags 1589, 43547 and 31406 would originate a query with QTYPE=NULL, QCLASS=IN and QNAME _ta-0635-7aae-aa1b.example.com.
A validating resolver, whether a stub or a recursive one, SHOULD originate a Key Tag query whenever it also originates a DNSKEY query for a trust anchor zone, so the need for a DNSKEY query is the trigger for the Key Tag query. The values in the query are the Key Tags of the trust anchor that will validate the expected DNSKEY response. A validating resolver SHOULD NOT originate Key Tag queries when it is also originating DNSKEY queries for non-trust-anchor zones, and a non-validating DNS resolver MUST NOT originate them at all. Resolvers with caches SHOULD cache and reuse the response to a Key Tag query as they would any other response.
An authoritative name server receiving Key Tag queries MAY log or collect the Key Tag values for the zone operator, and MUST generate an appropriate response. It needs no special logic for this, because the response code is decided by whether the data is in the zone file or covered by wildcards. A zone operator might add specific Key Tag records to the zone, with chosen time-to-live values, to affect how often clients send these queries.
Aggressive NSEC and NSEC3 negative caching affects the quality of the signalling. When the response code for a Key Tag query is NXDOMAIN, resolvers that implement aggressive negative caching send fewer Key Tag queries than those that do not. For that reason zone operators might choose to create records for the Key Tag queries they expect. During a rollover from Key Tag 1111 in hex to Key Tag 2222 in hex, the zone could include the records _ta-1111 IN NULL \# 0, _ta-2222 IN NULL \# 0 and _ta-1111-2222 IN NULL \# 0.
The second method puts the key tags in the name of a separate query, in hexadecimal, sorted, with the trust anchor's zone appended. The server answers it like any other lookup, and a zone operator can add empty records for the names they expect so that clients keep asking.
_ta-4444
_ta-0635-7aae-aa1b.example.com§7Security Considerations
The document specifies two ways for a client to signal its trust anchor knowledge to a cache or a server. The goal of these optional mechanisms is to signal new trust anchor uptake in clients, so that zone administrators know when it is possible to complete a key rollover in a DNSSEC-signed zone.
There is a possibility that an eavesdropper or a server could infer which validator a client uses from the Key Tag list it sees. That may allow an attacker to find validators still using old, possibly broken, keys, or to identify the validator and narrow down the implementations in use by a client, where the validator might have a known weakness worth exploiting.
Consumers of data collected through these mechanisms are advised that the Key Tag values might have been made up by clients with malicious, or at least mischievous, intentions. An attacker with enough resources might generate large numbers of queries containing only old Key Tag values, with the intention of delaying the completion of a key rollover.
DNSSEC does not require the keys in a zone to have unique Key Tags. During a rollover there is a small possibility that an old key and a new key have identical Key Tag values, so zone operators relying on this mechanism SHOULD take care to ensure that new keys have unique Key Tag values.
The signal can be misused. Someone who fakes old key tags in many queries could make a rollover look unfinished, and a server operator should not trust the numbers they collect.
§8Privacy Considerations
The proposal adds optional signalling to DNS queries in the form of Key Tag values. The Key Tag values themselves are not considered private information, but an eavesdropper might use them as a fingerprinting technique to identify particular validating DNS clients. This may be especially true when the validator is configured with trust anchors for zones in addition to the root zone.
A validating resolver need not transmit the Key Tags in every applicable query. Because of privacy concerns it MAY transmit them for only a subset of queries, for example every 25th time, or at random with a given probability such as 5%.
Implementations MAY be configured administratively to transmit the Key Tags only for certain zones, for example by listing the zones in which these mechanisms are allowed or denied in the configuration file. Since the main purpose of the document is to provide operational measurement data for root zone key rollovers, it is RECOMMENDED that implementations at least include the option for root zone DNSKEY queries.
The key tags are not secret, but a list of them can identify which resolver software a client runs. A resolver can therefore send them only now and then, or only for some zones, and the document still recommends sending them for root zone queries.