DNSOP Working Group | R. Bellis |
Internet-Draft | A. Clegg |
Intended status: Standards Track | ISC |
Expires: September 26, 2019 | P. van Dijk |
PowerDNS | |
March 25, 2019 |
DNS EDNS Tags
draft-bellis-dnsop-edns-tags-01
This document describes EDNS Tags, a mechanism by which DNS clients and servers can transmit an opaque data field which has no defined semantic meaning other than as previously agreed between the client and server.
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."
This Internet-Draft will expire on September 26, 2019.
Copyright (c) 2019 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 (https://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.
This document describes EDNS Tags, a mechanism by which DNS clients and servers [RFC1034] can transmit an opaque data field which has no defined semantic meaning other than as previously agreed between the client and server operators.
The tag is a single 16 bit field stored within the RDATA of an EDNS(0) OPT RR as described in [RFC6891].
Two EDNS options are defined to allow for the detection of servers that incorrectly echo responses verbatim. The EDNS-Client-Tag option may only appear in client requests, and the EDNS-Server-Tag may only appear in responses from servers.
The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.
The values of the individual bits within a tag are not defined to have any semantic meaning in this specification. Their interpretation is defined entirely by out-of-band bilateral agreement between client and server operators.
Operators are free to partition the bits within that field as they see fit; for example it could be used to transmit up to 16 separate boolean flags, or perhaps to transmit a 10 bit numeric value combined a 2 bit value and four boolean flags.
The intended mode of operation is that the value of a bit (or range of bits) could be tested in access control lists or any other such policy control mechanism.
Possible use cases for EDNS-Client-Tags include:
Use cases for EDNS-Server-Tags are still to be determined. The option is specified here for symmetry and in anticipation of new use cases being discovered. The semantic definitions for EDNS-Client-Tag and EDNS-Server-Tag values MAY be different; they need not be symmetrical.
The OPT RR in a DNS request packet (QR = 0) MUST NOT contain an EDNS-Server-Tag option. A request packet MUST NOT contain more than one EDNS-Client-Tag option.
The OPT RR in a DNS response packet (QR = 1) MUST NOT contain an EDNS-Client-Tag option. A response packet MUST NOT contain more than one EDNS-Server-Tag option.
An EDNS-Server-Tag option MUST NOT be sent unless the corresponding client query contained an EDNS-Client-Tag option.
Clients MUST discard any response packet that breaches any applicable packet validation rule.
Servers MUST respond with a FORMERR in accordance with Section 7 of [RFC6891] on receipt of a request that breaches any applicable packet validation rule.
The format of the EDNS options are as follows, to be stored within the RDATA of an OPT RR as specified in [RFC6891]:
+0 (MSB) +1 (LSB) +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 0: | OPTION-CODE (TBD1) | +---+---+---+---+---+---+---+---|---+---+---+---+---+---+---+---+ 2: | OPTION-LENGTH (2) | +---+---+---+---+---+---+---+---|---+---+---+---+---+---+---+---+ 4: | CLIENT-TAG-DATA | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
OPTION-CODE: The option code identifier (TBD1).
OPTION-LENGTH: Size (in octets) of OPTION-DATA. MUST be 2.
CLIENT-TAG-DATA: The tag field sent from client to server.
+0 (MSB) +1 (LSB) +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 0: | OPTION-CODE (TBD2) | +---+---+---+---+---+---+---+---|---+---+---+---+---+---+---+---+ 2: | OPTION-LENGTH (2) | +---+---+---+---+---+---+---+---|---+---+---+---+---+---+---+---+ 4: | SERVER-TAG-DATA | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
OPTION-CODE: The option code identifier (TBD2).
OPTION-LENGTH: Size (in octets) of OPTION-DATA. MUST be 2.
SERVER-TAG-DATA: The tag field sent from server to client.
Client tags are under the control of the client software and as such (and in the absence of any other mechanism to authenticate the client’s identity) this mechanism is not appropriate for applications where the DNS server operator wishes to contractually differentiate service based on the interpretation of the tag’s value.
TBC.
Tags are opaque fields that encode only a limited amount of information. The size of the data field in this specification is chosen to offer a compromise between offering sufficient content to be technically useful while also limiting the scope for it to be used to transmit Personally Identifiable Information.
IANA has assigned the following EDNS(0) Option Codes:
Value Name Status Reference ---------------------------------------------------------- TBD1 EDNS-Client-Tag Standard RFCXXXX TBD2 EDNS-Server-Tag Standard RFCXXXX
« Note to IANA - please assign an even value to TBD1, and the next consecutive odd value to TBD2. This allows the least-significant bit of the option value to be compared against the packet’s QR bit »
The authors wish to particularly thank Brian Conry, Peter van Dijk and Matthijs Mekking for early review and feedback on this document.
[RFC1034] | Mockapetris, P., "Domain names - concepts and facilities", STD 13, RFC 1034, DOI 10.17487/RFC1034, November 1987. |
[RFC2119] | Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997. |
[RFC6891] | Damas, J., Graff, M. and P. Vixie, "Extension Mechanisms for DNS (EDNS(0))", STD 75, RFC 6891, DOI 10.17487/RFC6891, April 2013. |
[RFC8174] | Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017. |