idnits 2.17.1 draft-ietf-dnssd-push-06.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (March 21, 2016) is 2957 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: A later version (-28) exists of draft-ietf-tls-tls13-11 ** Obsolete normative reference: RFC 793 (Obsoleted by RFC 9293) ** Downref: Normative reference to an Informational RFC: RFC 4953 ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) ** Obsolete normative reference: RFC 5966 (Obsoleted by RFC 7766) ** Obsolete normative reference: RFC 6195 (Obsoleted by RFC 6895) == Outdated reference: A later version (-10) exists of draft-ietf-dnssd-hybrid-03 == Outdated reference: A later version (-06) exists of draft-sekar-dns-llq-01 -- Obsolete informational reference (is this intentional?): RFC 5077 (Obsoleted by RFC 8446) -- Obsolete informational reference (is this intentional?): RFC 7525 (Obsoleted by RFC 9325) Summary: 5 errors (**), 0 flaws (~~), 4 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Internet Engineering Task Force T. Pusateri 3 Internet-Draft Seeking affiliation 4 Intended status: Standards Track S. Cheshire 5 Expires: September 22, 2016 Apple Inc. 6 March 21, 2016 8 DNS Push Notifications 9 draft-ietf-dnssd-push-06 11 Abstract 13 The Domain Name System (DNS) was designed to return matching records 14 efficiently for queries for data that is relatively static. When 15 those records change frequently, DNS is still efficient at returning 16 the updated results when polled. But there exists no mechanism for a 17 client to be asynchronously notified when these changes occur. This 18 document defines a mechanism for a client to be notified of such 19 changes to DNS records, called DNS Push Notifications. 21 Status of This Memo 23 This Internet-Draft is submitted in full conformance with the 24 provisions of BCP 78 and BCP 79. 26 Internet-Drafts are working documents of the Internet Engineering 27 Task Force (IETF). Note that other groups may also distribute 28 working documents as Internet-Drafts. The list of current Internet- 29 Drafts is at http://datatracker.ietf.org/drafts/current/. 31 Internet-Drafts are draft documents valid for a maximum of six months 32 and may be updated, replaced, or obsoleted by other documents at any 33 time. It is inappropriate to use Internet-Drafts as reference 34 material or to cite them other than as "work in progress." 36 This Internet-Draft will expire on September 22, 2016. 38 Copyright Notice 40 Copyright (c) 2016 IETF Trust and the persons identified as the 41 document authors. All rights reserved. 43 This document is subject to BCP 78 and the IETF Trust's Legal 44 Provisions Relating to IETF Documents 45 (http://trustee.ietf.org/license-info) in effect on the date of 46 publication of this document. Please review these documents 47 carefully, as they describe your rights and restrictions with respect 48 to this document. Code Components extracted from this document must 49 include Simplified BSD License text as described in Section 4.e of 50 the Trust Legal Provisions and are provided without warranty as 51 described in the Simplified BSD License. 53 Table of Contents 55 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 56 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3 57 2. Motivation . . . . . . . . . . . . . . . . . . . . . . . . . 3 58 3. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 5 59 4. Transport . . . . . . . . . . . . . . . . . . . . . . . . . . 6 60 4.1. Client-Initiated Termination . . . . . . . . . . . . . . 7 61 4.2. Server-Initiated Termination . . . . . . . . . . . . . . 7 62 5. State Considerations . . . . . . . . . . . . . . . . . . . . 9 63 6. Protocol Operation . . . . . . . . . . . . . . . . . . . . . 10 64 6.1. Discovery . . . . . . . . . . . . . . . . . . . . . . . . 11 65 6.2. DNS Push Notification SUBSCRIBE . . . . . . . . . . . . . 13 66 6.3. DNS Push Notification UNSUBSCRIBE . . . . . . . . . . . . 18 67 6.4. DNS Push Notification Update Messages . . . . . . . . . . 19 68 6.5. DNS RECONFIRM . . . . . . . . . . . . . . . . . . . . . . 22 69 6.6. DNS Push Notification Termination Message . . . . . . . . 24 70 7. Security Considerations . . . . . . . . . . . . . . . . . . . 26 71 7.1. Security Services . . . . . . . . . . . . . . . . . . . . 26 72 7.2. TLS Name Authentication . . . . . . . . . . . . . . . . . 27 73 7.3. TLS Compression . . . . . . . . . . . . . . . . . . . . . 27 74 7.4. TLS Session Resumption . . . . . . . . . . . . . . . . . 27 75 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 27 76 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 28 77 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 28 78 10.1. Normative References . . . . . . . . . . . . . . . . . . 28 79 10.2. Informative References . . . . . . . . . . . . . . . . . 30 80 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 31 82 1. Introduction 84 DNS records may be updated using DNS Update [RFC2136]. Other 85 mechanisms such as a Hybrid Proxy [I-D.ietf-dnssd-hybrid] can also 86 generate changes to a DNS zone. This document specifies a protocol 87 for Unicast DNS clients to subscribe to receive asynchronous 88 notifications of changes to RRSets of interest. It is immediately 89 relevant in the case of DNS Service Discovery [RFC6763] but is not 90 limited to that use case, and provides a general DNS mechanism for 91 DNS record change notifications. Familiarity with the DNS protocol 92 and DNS packet formats is assumed [RFC1034] [RFC1035] [RFC6195]. 94 1.1. Requirements Language 96 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 97 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 98 "OPTIONAL" in this document are to be interpreted as described in 99 "Key words for use in RFCs to Indicate Requirement Levels" [RFC2119]. 101 2. Motivation 103 As the domain name system continues to adapt to new uses and changes 104 in deployment, polling has the potential to burden DNS servers at 105 many levels throughout the network. Other network protocols have 106 successfully deployed a publish/subscribe model to state changes 107 following the Observer design pattern. XMPP Publish-Subscribe 108 [XEP0060] and Atom [RFC4287] are examples. While DNS servers are 109 generally highly tuned and capable of a high rate of query/response 110 traffic, adding a publish/subscribe model for tracking changes to DNS 111 records can result in more timely notification of changes with 112 reduced CPU usage and lower network traffic. 114 Multicast DNS [RFC6762] implementations always listen on a well known 115 link-local IP multicast group, and new services and updates are sent 116 for all group members to receive. Therefore, Multicast DNS already 117 has asynchronous change notification capability. However, when DNS 118 Service Discovery [RFC6763] is used across a wide area network using 119 Unicast DNS (possibly facilitated via a Hybrid Proxy 120 [I-D.ietf-dnssd-hybrid]) it would be beneficial to have an equivalent 121 capability for Unicast DNS, to allow clients to learn about DNS 122 record changes in a timely manner without polling. 124 DNS Long-Lived Queries (LLQ) [I-D.sekar-dns-llq] is an existing 125 deployed solution to provide asynchronous change notifications. Even 126 though it can be used over TCP, LLQ is defined primarily as a UDP- 127 based protocol, and as such it defines its own equivalents of 128 existing TCP features like the three-way handshake. This document 129 builds on experience gained with the LLQ protocol, with an improved 130 design that uses long-lived TCP connections instead of UDP (and 131 therefore doesn't need to duplicate existing TCP functionality), and 132 adopts the syntax and semantics of DNS Update messages [RFC2136] 133 instead of inventing a new vocabulary of messages to communicate DNS 134 zone changes. 136 Because DNS Push Notifications impose a certain load on the 137 responding server (though less load than rapid polling of that 138 server) DNS Push Notification clients SHOULD exercise restraint in 139 issuing DNS Push Notification subscriptions. A subscription SHOULD 140 only be active when there is a valid reason to need live data (for 141 example, an on-screen display is currently showing the results of 142 that subscription to the user) and the subscription SHOULD be 143 cancelled as soon as the need for that data ends (for example, when 144 the user dismisses that display). Implementations MAY want to 145 implement idle timeouts, so that if the user ceases interacting with 146 the device, the display showing the result of the DNS Push 147 Notification subscription is automatically dismissed after a certain 148 period of inactivity. For example, if a user presses the "Print" 149 button on their phone, and then leaves the phone showing the printer 150 discovery screen until the phone goes to sleep, then the printer 151 discovery screen should be automatically dismissed as the device goes 152 to sleep. If the user does still intend to print, this will require 153 them to press the "Print" button again when they wake their phone up. 155 A DNS Push Notification client MUST NOT routinely keep a DNS Push 156 Notification subscription active 24 hours a day 7 days a week just to 157 keep a list in memory up to date so that it will be really fast if 158 the user does choose to bring up an on-screen display of that data. 159 DNS Push Notifications are designed to be fast enough that there is 160 no need to pre-load a "warm" list in memory just in case it might be 161 needed later. 163 3. Overview 165 The existing DNS Update protocol [RFC2136] provides a mechanism for 166 clients to add or delete individual resource records (RRs) or entire 167 resource record sets (RRSets) on the zone's server. 169 This specification adopts a simplified subset of these existing 170 syntax and semantics, and uses them for DNS Push Notification 171 messages going in the opposite direction, from server to client, to 172 communicate changes to a zone. The client subscribes for Push 173 Notifications by connecting to the server and sending DNS message(s) 174 indicating the RRSet(s) of interest. When the client loses interest 175 in updates to these records, it unsubscribes. 177 The DNS Push Notification server for a zone is any server capable 178 of generating the correct change notifications for a name. 179 It may be a master, slave, or stealth name server [RFC1996]. 180 Consequently, the "_dns-push-tls._tcp." SRV record for a 181 zone MAY reference the same target host and port as that zone's 182 "_dns-update-tls._tcp." SRV record. When the same target host 183 and port is offered for both DNS Updates and DNS Push Notifications, 184 a client MAY use a single TCP connection to that server for both DNS 185 Updates and DNS Push Notification Queries. 187 Supporting DNS Updates and DNS Push Notifications on the same server 188 is OPTIONAL. A DNS Push Notification server is not REQUIRED to 189 support DNS Update. 191 DNS Updates and DNS Push Notifications may be handled on different 192 ports on the same target host, in which case they are not considered 193 to be the "same server" for the purposes of this specification, and 194 communications with these two ports are handled independently. 196 Standard DNS Queries MAY be sent over a DNS Push Notification 197 connection, provided that these are queries for names falling within 198 the server's zone (the in the "_dns-push-tls._tcp." SRV 199 record). The RD (Recursion Desired) bit MUST be zero. 201 DNS Push Notification clients are NOT required to implement DNS 202 Update Prerequisite processing. Prerequisites are used to perform 203 tentative atomic test-and-set type operations when a client updates 204 records on a server, and that concept has no applicability when it 205 comes to an authoritative server informing a client of changes to DNS 206 records. 208 This DNS Push Notification specification includes support for DNS 209 classes, for completeness. However, in practice, it is anticipated 210 that for the foreseeable future the only DNS class in use will be DNS 211 class "IN", as it is today with existing DNS servers and clients. A 212 DNS Push Notification server MAY choose to implement only DNS class 213 "IN". 215 4. Transport 217 Implementations of DNS Update [RFC2136] MAY use either User Datagram 218 Protocol (UDP) [RFC0768] or Transmission Control Protocol (TCP) 219 [RFC0793] as the transport protocol, in keeping with the historical 220 precedent that DNS queries must first be sent over UDP [RFC1123]. 221 This requirement to use UDP has subsequently been relaxed 222 [RFC5966][I-D.ietf-dnsop-5966bis]. 224 In keeping with the more recent precedent, DNS Push Notification is 225 defined only for TCP. DNS Push Notification clients MUST use TLS 226 over TCP. 228 Connection setup over TCP ensures return reachability and alleviates 229 concerns of state overload at the server through anonymous 230 subscriptions. All subscribers are guaranteed to be reachable by the 231 server by virtue of the TCP three-way handshake. Because TCP SYN 232 flooding attacks are possible with any protocol over TCP, 233 implementers are encouraged to use industry best practices to guard 234 against such attacks [IPJ.9-4-TCPSYN] [RFC4953]. 236 Transport Layer Security (TLS) [RFC5246] is well understood and 237 deployed across many protocols running over TCP. It is designed to 238 prevent eavesdropping, tampering, or message forgery. TLS is 239 REQUIRED for every connection between a client subscriber and server 240 in this protocol specification. Additional security measures such as 241 client authentication during TLS negotiation MAY also be employed to 242 increase the trust relationship between client and server. 243 Additional authentication of the SRV target using DNSSEC verification 244 and DANE TLSA records [RFC7673] is strongly encouraged. See below in 245 Section 7.2 for details. 247 A DNS Push Notification session begins with a client connecting to a 248 DNS Push Notification server. Over that connection the client then 249 issues DNS operation requests, such as SUBSCRIBE. 251 4.1. Client-Initiated Termination 253 An individual subscription is terminated by sending an UNSUBSCRIBE 254 message for that specific subscription, or all subscriptions can be 255 cancelled at once by the client closing the connection with a TCP 256 RST. When a client terminates an individual subscription (via 257 UNSUBSCRIBE) or all subscriptions on that connection (by closing the 258 connection) it is signalling to the server that it is longer 259 interested in receiving those particular updates. It is informing 260 the server that the server may release any state information it has 261 been keeping with regards to these particular subscriptions. 263 After terminating its last subscription on a connection via 264 UNSUBSCRIBE, a client MAY close the connection immediately with a TCP 265 FIN, or it may keep it open if it anticipates performing further 266 operations on that connection in the future. If a client wishes to 267 keep an idle connection open, it MUST meet its keepalive obligations 268 [I-D.ietf-dnsop-edns-tcp-keepalive] or the server is entitled to 269 close the connection (see below). 271 If a client plans to terminate one or more subscriptions on a 272 connection and doesn't intend to keep that connection open, then as 273 an efficiency optimization it MAY instead choose to simply close the 274 connection with a TCP RST, which implicitly terminates all 275 subscriptions on that connection. This may occur because the client 276 computer is being shut down, is going to sleep, the application 277 requiring the subscriptions has terminated, or simply because the 278 last active subscription on that connection has been cancelled. 280 4.2. Server-Initiated Termination 282 If a client makes a connection and then fails to send any DNS message 283 that uses EDNS(0) TCP Keepalive [I-D.ietf-dnsop-edns-tcp-keepalive] 284 (either SUBSCRIBE, where Keepalive is implicit, or some other DNS 285 message, with an explicit an EDNS(0) TCP Keepalive option) then after 286 30 seconds of inactivity the server SHOULD close the connection. If 287 no data has been sent on the connection the server MAY abort the 288 connection with a TCP RST. If data has been sent on the connection 289 then the server SHOULD close the connection gracefully with a TCP FIN 290 so that the data is reliably delivered. 292 In the response to the first successful SUBSCRIBE, the included 293 EDNS(0) TCP Keepalive option specifies the idle timeout so that the 294 client knows the frequency of traffic it must generate to keep the 295 connection alive. If the idle timeout for that connection changes, 296 then the server communicates this by placing an updated EDNS(0) TCP 297 Keepalive option in a subsequent message to the client. 299 At both servers and clients, the generation or reception of any 300 request, response, update, or keepalive message resets the keepalive 301 timer for that connection. 303 In the absence of any requests, responses, or update messages on a 304 connection, a client MUST generate keepalive traffic before the idle 305 timeout expires, or the server is entitled to close the connection. 307 If a client disconnects from the network abruptly, without closing 308 its connection, the server learns of this after failing to receive 309 further traffic from that client. If no requests, responses, update 310 messages or keepalive traffic occurs on a connection for 1.5 times 311 the idle timeout, then this indicates that the client is probably no 312 longer on the network, and the server SHOULD abort the connection 313 with a TCP RST. 315 [We need to discuss the nature of "the required keepalives". Are 316 they TCP-layer keepalives? DNS-layer keepalives? There is currently 317 no DNS-layer keepalive or 'no-op' operation defined. What would that 318 operation be? A DNS QUERY containing zero questions? A DNS 319 SUBSCRIBE containing zero questions? An "empty" DNS message over the 320 TCP connection (just a pair of zero bytes, signifying a zero-length 321 message)? One benefit of TCP-layer keepalives is that they transmit 322 fewer bytes, and involve less software overhead for processing those 323 bytes. Another benefit is that it is more feasible to implement 324 these in networking offload hardware, which can allow devices to meet 325 their TCP keepalive obligations while sleeping. This is particularly 326 important for battery-powered devices like mobile phones and tablets. 327 On the other hand, using TCP-layer keepalives requires an API for a 328 client to tell the networking stack at what frequency to perform TCP- 329 layer keepalives, and an API for a server to request the networking 330 stack to inform it when TCP-layer keepalives are not received by the 331 required deadline. TCP-layer keepalives also only verify liveness of 332 the remote networking stack, whereas DNS-layer keepalives provide 333 higher assurance of liveness of the remote server application 334 software -- though this a limited benefit, since there is no reason 335 to expect that DNS Push Notification server software will routinely 336 become wedged and unresponsive.] 338 After sending an error response to a client, the server MAY close the 339 connection with a TCP FIN. 341 If the server is overloaded and needs to shed load, it MAY send a 342 Termination Message to the client and close the connection with a TCP 343 FIN. 345 Apart from the cases described above, a server MUST NOT close a 346 connection with a DNS Push Notification client, except in 347 extraordinary error conditions. Closing the connection is the 348 client's responsibility, to be done at the client's discretion, when 349 it so chooses. A DNS Push Notification server only closes a DNS Push 350 Notification connection under exceptional circumstances, such as when 351 the server application software or underlying operating system is 352 restarting, the server application terminated unexpectedly (perhaps 353 due to a bug that makes it crash), or the server is undergoing 354 maintenance procedures. When possible, a DNS Push Notification 355 server SHOULD send a Termination Message (Section 6.6 ) informing the 356 client of the reason for the connection being closed. 358 After a connection is closed by the server, the client SHOULD try to 359 reconnect, to that server, or to another server supporting DNS Push 360 Notifications for the zone. If reconnecting to the same server, and 361 there was a Termination Message or error response containing a 362 EDNS(0) TCP Keepalive option, the client MUST respect the indicated 363 delay before attempting to reconnect. 365 5. State Considerations 367 Each DNS Push Notification server is capable of handling some finite 368 number of Push Notification subscriptions. This number will vary 369 from server to server and is based on physical machine 370 characteristics, network bandwidth, and operating system resource 371 allocation. After a client establishes a connection to a DNS server, 372 each record subscription is individually accepted or rejected. 373 Servers may employ various techniques to limit subscriptions to a 374 manageable level. Correspondingly, the client is free to establish 375 simultaneous connections to alternate DNS servers that support DNS 376 Push Notifications for the zone and distribute record subscriptions 377 at its discretion. In this way, both clients and servers can react 378 to resource constraints. Token bucket rate limiting schemes are also 379 effective in providing fairness by a server across numerous client 380 requests. 382 6. Protocol Operation 384 A DNS Push Notification exchange begins with the client discovering 385 the appropriate server, and then making a TLS/TCP connection to it. 386 The client may then add and remove Push Notification subscriptions 387 over this connection. In accordance with the current set of active 388 subscriptions the server sends relevant asynchronous Push 389 Notifications to the client. Note that a client MUST be prepared to 390 receive (and silently ignore) Push Notifications for subscriptions it 391 has previously removed, since there is no way to prevent the 392 situation where a Push Notification is in flight from server to 393 client while the client's UNSUBSCRIBE message cancelling that 394 subscription is simultaneously in flight from client to server. 396 The exchange between client and server terminates when either end 397 closes the TCP connection with a TCP FIN or RST. 399 A client SHOULD NOT make multiple TLS/TCP connections to the same DNS 400 Push Notification server. A client SHOULD share a single TLS/TCP 401 connection for all requests to the same DNS Push Notification server. 402 This shared connection should be used for all DNS Queries and DNS 403 Push Notification Queries queries to that server, and for DNS Update 404 requests too when the "_dns-update-tls._tcp." SRV record 405 indicates that the same server also handles DNS Update requests. 406 This is to reduce unnecessary load on the DNS Push Notification 407 server. 409 For the purposes here, the determination of "same server" is made by 410 inspecting the target hostname and port, regardless of the name being 411 queried, or what zone if falls within. A given server may support 412 Push Notifications (and possibly DNS Updates too) for multiple DNS 413 zones. When a client discovers that the DNS Push Notification server 414 (and/or DNS Update server) for several different names (including 415 names that fall within different zones) is the same target hostname 416 and port, the client SHOULD use a single shared TCP connection for 417 all relevant operations on those names. A client SHOULD NOT open 418 multiple TCP connections to the same target host and port just 419 because the names being queried (or updated) happen to fall within 420 different zones. 422 Note that the "same server" determination described here is made 423 using the target hostname given in the SRV record, not the IP 424 address(es) that the hostname resolves to. If two different target 425 hostnames happen to resolve to the same IP address(es), then the 426 client SHOULD NOT recognize these as the "same server" for the 427 purposes of using a single shared connection to that server. If an 428 administrator wishes to use a single server for multiple zones and/or 429 multiple roles (e.g., both DNS Push Notifications and DNS Updates), 430 and wishes to have clients use a single shared connection for 431 operations on that server, then the administrator MUST use the same 432 target hostname in the appropriate SRV records. 434 However, server implementers and operators should be aware that this 435 connection sharing may not be possible in all cases. A single client 436 device may be home to multiple independent client software instances 437 that don't know about each other, so a DNS Push Notification server 438 MUST be prepared to accept multiple connections from the same client 439 IP address. This is undesirable from an efficiency standpoint, but 440 may be unavoidable in some situations, so a DNS Push Notification 441 server MUST be prepared to accept multiple connections from the same 442 client IP address. 444 6.1. Discovery 446 The first step in DNS Push Notification subscription is to discover 447 an appropriate DNS server that supports DNS Push Notifications for 448 the desired zone. The client MUST also determine which TCP port on 449 the server is listening for connections, which need not be (and often 450 is not) the typical TCP port 53 used for conventional DNS. 452 1. The client begins the discovery by sending a DNS query to the 453 local resolver with record type SOA [RFC1035] for the name of the 454 record it wishes to subscribe. 456 2. If the SOA record exists, it MUST be returned in the Answer 457 Section of the reply. If not, the local resolver SHOULD include 458 the SOA record for the zone of the requested name in the 459 Authority Section. 461 3. If no SOA record is returned, the client then strips off the 462 leading label from the requested name. If the resulting name has 463 at least one label in it, the client sends a new SOA query and 464 processing continues at step 2 above. If the resulting name is 465 empty (the root label) then this is a network configuration error 466 and the client gives up. The client MAY retry the operation at a 467 later time. 469 4. Once the SOA is known, the client sends a DNS query with type SRV 470 [RFC2782] for the record name "_dns-push-tls._tcp.", where 471 is the owner name of the discovered SOA record. 473 5. If the zone in question does not offer DNS Push Notifications 474 then SRV record MUST NOT exist and the SRV query will return a 475 negative answer. 477 6. If the zone in question is set up to offer DNS Push Notifications 478 then this SRV record MUST exist. The SRV "target" contains the 479 name of the server providing DNS Push Notifications for the zone. 480 The port number on which to contact the server is in the SRV 481 record "port" field. The address(es) of the target host MAY be 482 included in the Additional Section, however, the address records 483 SHOULD be authenticated before use as described below in 484 Section 7.2 [RFC7673]. 486 7. More than one SRV record may be returned. In this case, the 487 "priority" and "weight" values in the returned SRV records are 488 used to determine the order in which to contact the servers for 489 subscription requests. As described in the SRV specification 490 [RFC2782], the server with the lowest "priority" is first 491 contacted. If more than one server has the same "priority", the 492 "weight" indicates the weighted probability that the client 493 should contact that server. Higher weights have higher 494 probabilities of being selected. If a server is not reachable or 495 is not willing to accept a subscription request, then a 496 subsequent server is to be contacted. 498 Each time a client makes a new DNS Push Notification subscription 499 connection, it SHOULD repeat the discovery process in order to 500 determine the preferred DNS server for subscriptions at that time. 502 6.2. DNS Push Notification SUBSCRIBE 504 A DNS Push Notification client indicates its desire to receive DNS 505 Push Notifications for a given domain name by sending a SUBSCRIBE 506 request over the established TCP connection to the server. A 507 SUBSCRIBE request is formatted identically to a conventional DNS 508 QUERY request [RFC1035], except that the opcode is SUBSCRIBE (6) 509 instead of QUERY (0). If neither QTYPE nor QCLASS are ANY (255) then 510 this is a specific subscription to changes for the given name, type 511 and class. If one or both of QTYPE or QCLASS are ANY (255) then this 512 subscription matches any type and/or any class, as appropriate. 514 In a SUBSCRIBE request the DNS Header QR bit MUST be zero. 515 If the QR bit is not zero the message is not a SUBSCRIBE request. 517 The AA, TC, RD, RA, Z, AD, and CD bits, the ID field, and the RCODE 518 field, MUST be zero on transmission, and MUST be silently ignored on 519 reception. 521 Like a DNS QUERY request, a SUBSCRIBE request MUST contain exactly 522 one question. Since SUBSCRIBE requests are sent over TCP, multiple 523 SUBSCRIBE requests can be concatenated in a single TCP stream and 524 packed efficiently into TCP segments, so the ability to pack multiple 525 SUBSCRIBE operations into a single DNS message within that TCP stream 526 would add extra complexity for little benefit. 528 ANCOUNT MUST be zero, and the Answer Section MUST be empty. 529 Any records in the Answer Section MUST be silently ignored. 531 NSCOUNT MUST be zero, and the Authority Section MUST be empty. 532 Any records in the Authority Section MUST be silently ignored. 534 ARCOUNT specifies the number of records in the Additional Data 535 Section. Typically this is zero, but it may be nonzero in some 536 cases, such as when the request includes an EDNS(0) OPT record. 538 If accepted, the subscription will stay in effect until the client 539 revokes the subscription or until the connection between the client 540 and the server is closed. 542 SUBSCRIBE requests on a given connection MUST be unique. A client 543 MUST NOT send a SUBSCRIBE message that duplicates the name, type and 544 class of an existing active subscription on that TLS/TCP connection. 545 For the purpose of this matching, the established DNS case- 546 insensitivity for US-ASCII letters applies (e.g., "foo.com" and 547 "Foo.com" are the same). If a server receives such a duplicate 548 SUBSCRIBE message this is an error and the server MUST immediately 549 close the TCP connection. 551 DNS wildcarding is not supported. That is, a wildcard ("*") in a 552 SUBSCRIBE message matches only a literal wildcard character ("*") in 553 the zone, and nothing else. 555 Aliasing is not supported. That is, a CNAME in a SUBSCRIBE message 556 matches only a literal CNAME record in the zone, and nothing else. 558 A client may SUBSCRIBE to records that are unknown to the server at 559 the time of the request (providing that the name falls within one of 560 the zone(s) the server is responsible for) and this is not an error. 561 The server MUST accept these requests and send Push Notifications if 562 and when matches are found in the future. 564 Since all SUBSCRIBE operations are implicitly long-lived operations, 565 the server MUST interpret a SUBSCRIBE request as if it contained an 566 EDNS(0) TCP Keepalive option [I-D.ietf-dnsop-edns-tcp-keepalive]. A 567 client MUST NOT include an actual EDNS(0) TCP Keepalive option in the 568 request, since it is automatic, and implied by the semantics of 569 SUBSCRIBE. If a server receives a SUBSCRIBE request that does 570 contain an actual EDNS(0) TCP Keepalive option this is an error and 571 the server MUST immediately close the TCP connection. 573 A SUBSCRIBE operation MAY include an explicit EDNS(0) [RFC6891] OPT 574 record where necessary to carry additional information. 576 The presence of a SUBSCRIBE operation on a connection indicates to 577 the server that the client fully implements EDNS(0) [RFC6891], and 578 can correctly understand any response that conforms to that 579 specification. After receiving a SUBSCRIBE request, the server MAY 580 include OPT record in any of its responses, as needed. 582 Each SUBSCRIBE request generates exactly one SUBSCRIBE response from 583 the server. 585 In a SUBSCRIBE response the DNS Header QR bit MUST be one. 586 If the QR bit is not one the message is not a SUBSCRIBE response. 588 The AA, TC, RD, RA, Z, AD, and CD bits, and the ID field, MUST be 589 zero on transmission, and MUST be silently ignored on reception. 591 The Question Section MUST echo back the values provided by the client 592 in the SUBSCRIBE request that generated this SUBSCRIBE response. 594 ANCOUNT MUST be zero, and the Answer Section MUST be empty. 595 Any records in the Answer Section MUST be silently ignored. 596 If the subscription was accepted and there are positive answers for 597 the requested name, type and class, then these positive answers MUST 598 be communicated to the client in an immediately following Push 599 Notification Update, not in the Answer Section of the SUBSCRIBE 600 response. This simplifying requirement is made so that there is only 601 a single way that information is communicated to a DNS Push 602 Notification client. Since a DNS Push Notification client has to 603 parse information received via Push Notification Updates anyway, it 604 is simpler if it does not also have to parse information received via 605 the Answer Section of a SUBSCRIBE response. 607 NSCOUNT MUST be zero, and the Authority Section MUST be empty. 608 Any records in the Authority Section MUST be silently ignored. 610 ARCOUNT specifies the number of records in the Additional Data 611 Section, e.g., the EDNS(0) OPT record. 613 In the SUBSCRIBE response the RCODE indicates whether or not the 614 subscription was accepted. Supported RCODEs are as follows: 616 +----------+-------+------------------------------------------------+ 617 | Mnemonic | Value | Description | 618 +----------+-------+------------------------------------------------+ 619 | NOERROR | 0 | SUBSCRIBE successful. | 620 | FORMERR | 1 | Server failed to process request due to a | 621 | | | malformed request. | 622 | SERVFAIL | 2 | Server failed to process request due to | 623 | | | resource exhaustion. | 624 | NXDOMAIN | 3 | NOT APPLICABLE. DNS Push Notification MUST NOT | 625 | | | return NXDOMAIN errors in response to | 626 | | | SUBSCRIBE requests. | 627 | NOTIMP | 4 | Server does not implement DNS Push | 628 | | | Notifications. | 629 | REFUSED | 5 | Server refuses to process request for policy | 630 | | | or security reasons. | 631 | NOTAUTH | 9 | Server is not authoritative for the requested | 632 | | | name. | 633 +----------+-------+------------------------------------------------+ 635 SUBSCRIBE Response codes 637 This document specifies only these RCODE values for SUBSCRIBE 638 Responses. Servers sending SUBSCRIBE Responses SHOULD use one of 639 these values. However, future circumstances may create situations 640 where other RCODE values are appropriate in SUBSCRIBE Responses, so 641 clients MUST be prepared to accept SUBSCRIBE Responses with any RCODE 642 value. 644 In the first SUBSCRIBE response on a connection, the server MUST 645 include an explicit EDNS(0) TCP Keepalive option. If the first 646 SUBSCRIBE response does not include an explicit EDNS(0) TCP Keepalive 647 option this is an error and the client MUST immediately close the TCP 648 connection. In this case the client should act as if the response 649 contained an EDNS(0) TCP Keepalive option with a value of one hour, 650 and not attempt any further DNS Push Notification requests to that 651 server until one hour has passed. This situation may occur if a 652 client connects to a server that doesn't implement DNS Push 653 Notifications at all, and it is important not to burden such servers 654 with continuous retries. 656 The server MAY include EDNS(0) TCP Keepalive options in subsequent 657 messages, if the idle timeout changes. If the client receives 658 subsequent messages that do not contain an explicit EDNS(0) TCP 659 Keepalive option then the idle timeout for that connection remains 660 unchanged at that time. 662 In an error response, with nonzero RCODE, the server MUST contain an 663 EDNS(0) TCP Keepalive option specifying the delay before the client 664 tries again: 666 For RCODE = 1 (FORMERR) the delay may be any value selected by the 667 implementer. A value of one minute is RECOMMENDED, to avoid high 668 load from defective clients. 670 For RCODE = 2 (SERVFAIL), which occurs due to resource exhaustion, 671 the delay should be chosen according to the level of server 672 overload and the anticipated duration of that overload. By 673 default, a value of one minute is RECOMMENDED. 675 For RCODE = 4 (NOTIMP), which occurs on a server that doesn't 676 implement DNS Push Notifications, it is unlikely that the server 677 will begin supporting DNS Push Notifications in the next few 678 minutes, so the retry delay SHOULD be one hour. Note that a 679 server that doesn't implement DNS Push Notifications will most 680 likely not implement this retry delay mechanism using the EDNS(0) 681 TCP Keepalive option either, and in this case the client will fall 682 back to the case described above specifying how to handle 683 SUBSCRIBE responses that do not contain an EDNS(0) TCP Keepalive 684 option. 686 For RCODE = 5 (REFUSED), which occurs on a server that implements 687 DNS Push Notifications, but is currently configured to disallow 688 DNS Push Notifications, the retry delay may be any value selected 689 by the implementer and/or configured by the operator. 690 This is a misconfiguration, since this server is listed in a 691 "_dns-push-tls._tcp." SRV record, but the server itself is 692 not currently configured to support DNS Push Notifications. Since 693 it is possible that the misconfiguration may be repaired at any 694 time, the retry delay should not be set too high. By default, a 695 value of 5 minutes is RECOMMENDED. 697 For RCODE = 9 (NOTAUTH), which occurs on a server that implements 698 DNS Push Notifications, but is not configured to be authoritative 699 for the requested name, the retry delay may be any value selected 700 by the implementer and/or configured by the operator. 701 This is a misconfiguration, since this server is listed in a 702 "_dns-push-tls._tcp." SRV record, but the server itself is 703 not currently configured to support DNS Push Notifications for 704 that zone. Since it is possible that the misconfiguration may be 705 repaired at any time, the retry delay should not be set too high. 706 By default, a value of 5 minutes is RECOMMENDED. 708 For other RCODE values, the retry delay should be set by the 709 server as appropriate for that error condition. By default, a 710 value of 5 minutes is RECOMMENDED. 712 After sending an error response the server MAY close the TCP 713 connection with a FIN, or MAY allow it to remain open. Clients MUST 714 correctly handle both cases. 716 6.3. DNS Push Notification UNSUBSCRIBE 718 To cancel an individual subscription without closing the entire 719 connection, the client sends an UNSUBSCRIBE message over the 720 established TCP connection to the server. The UNSUBSCRIBE message is 721 formatted identically to the SUBSCRIBE message which created the 722 subscription, with the exact same name, type and class, except that 723 the opcode is UNSUBSCRIBE (7) instead of SUBSCRIBE (6). 725 A client MUST NOT send an UNSUBSCRIBE message that does not exactly 726 match the name, type and class of an existing active subscription on 727 that TLS/TCP connection. If a server receives such an UNSUBSCRIBE 728 message this is an error and the server MUST immediately close the 729 connection. 731 No response message is generated as a result of processing an 732 UNSUBSCRIBE message. 734 Having being successfully revoked with a correctly-formatted 735 UNSUBSCRIBE message, the previously referenced subscription is no 736 longer active and the server MAY discard the state associated with it 737 immediately, or later, at the server's discretion. 739 6.4. DNS Push Notification Update Messages 741 Once a subscription has been successfully established, the server 742 generates Push Notification Updates to send to the client as 743 appropriate. An initial Push Notification Update will be sent 744 immediately in the case that the answer set was non-empty at the 745 moment the subscription was established. Subsequent changes to the 746 answer set are then communicated to the client in subsequent Push 747 Notification Updates. 749 The format of Push Notification Updates borrows from the existing DNS 750 Update [RFC2136] protocol, with some simplifications. 752 The following figure shows the existing DNS Update header format: 754 1 1 1 1 1 1 755 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 756 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 757 | ID | 758 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 759 |QR| Opcode | Z | RCODE | 760 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 761 | ZOCOUNT | 762 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 763 | PRCOUNT | 764 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 765 | UPCOUNT | 766 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 767 | ADCOUNT | 768 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 770 Figure 1 772 For DNS Push Notifications the following rules apply: 774 The QR bit MUST be zero, and the Opcode MUST be UPDATE (5). 775 Messages received where this is not true are not Push Notification 776 Update Messages and should be silently ignored for the purposes of 777 Push Notification Update Message handling. 779 ID, the Z bits, and RCODE MUST be zero on transmission, 780 and MUST be silently ignored on reception. 782 ZOCOUNT MUST be zero, and the Zone Section MUST be empty. 783 Any records in the Zone Section MUST be silently ignored. 785 PRCOUNT MUST be zero, and the Prerequisite Section MUST be empty. 786 Any records in the Prerequisite Section MUST be silently ignored. 788 UPCOUNT specifies the number of records in the Update Section. 790 ADCOUNT specifies the number of records in the Additional Data 791 Section. Typically this is zero, but it may be nonzero in some 792 cases, such as when the message includes an EDNS(0) OPT record. 794 The Update Section contains the relevant change information for the 795 client, formatted identically to a DNS Update [RFC2136]. To recap: 797 Delete all RRsets from a name: 798 TTL=0, CLASS=ANY, RDLENGTH=0, TYPE=ANY. 800 Delete an RRset from a name: 801 TTL=0, CLASS=ANY, RDLENGTH=0; 802 TYPE specifies the RRset being deleted. 804 Delete an individual RR from a name: 805 TTL=0, CLASS=NONE; 806 TYPE, RDLENGTH and RDATA specifies the RR being deleted. 808 Add to an RRset: 809 TTL, CLASS, TYPE, RDLENGTH and RDATA specifies the RR being added. 811 When processing the records received in a Push Notification Update 812 Message, the receiving client MUST validate that the records being 813 added or deleted correspond with at least one currently active 814 subscription on that connection. Specifically, the record name MUST 815 match the name given in the SUBSCRIBE request, subject to the usual 816 established DNS case-insensitivity for US-ASCII letters. If the 817 QTYPE in the SUBSCRIBE request was not ANY (255) then the TYPE of the 818 record must match the QTYPE given in the SUBSCRIBE request. If the 819 QCLASS in the SUBSCRIBE request was not ANY (255) then the CLASS of 820 the record must match the QCLASS given in the SUBSCRIBE request. If 821 a matching active subscription on that connection is not found, then 822 that individual record addition/deletion is silently ignored. 823 Processing of other additions and deletions in this message is not 824 affected. The TCP connection is not closed. This is to allow for 825 the race condition where a client sends an outbound UNSUBSCRIBE while 826 inbound Push Notification Updates for that subscription from the 827 server are still in flight. 829 In the case where a single change affects more than one active 830 subscription, only one update is sent. For example, an update adding 831 a given record may match both a SUBSCRIBE request with the same QTYPE 832 and a different SUBSCRIBE request with QTYPE=ANY. It is not the case 833 that two updates are sent because the new record matches two active 834 subscriptions. 836 The server SHOULD encode change notifications in the most efficient 837 manner possible. For example, when three AAAA records are deleted 838 from a given name, and no other AAAA records exist for that name, the 839 server SHOULD send a "delete an RRset from a name" update, not three 840 separate "delete an individual RR from a name" updates. Similarly, 841 when both an SRV and a TXT record are deleted from a given name, and 842 no other records of any kind exist for that name, the server SHOULD 843 send a "delete all RRsets from a name" update, not two separate 844 "delete an RRset from a name" updates. 846 A server SHOULD combine multiple change notifications in a single 847 Update Message when possible, even if those change notifications 848 apply to different subscriptions. Conceptually, a Push Notification 849 Update Message is a connection-level concept, not a subscription- 850 level concept. 852 Push Notification Update Messages MAY contain an EDNS(0) TCP 853 Keepalive option [I-D.ietf-dnsop-edns-tcp-keepalive] if the idle 854 timeout has changed since the last time the server sent an EDNS(0) 855 TCP Keepalive option on this connection. 857 In the event that the server wishes to inform a client of a new idle 858 timeout for the connection, the server MAY combine that with the next 859 message it sends to the client, or the server MAY send an empty Push 860 Notification Update Message (zero records in the Update Section) to 861 carry the EDNS(0) TCP Keepalive option. Clients MUST correctly 862 receive and process the EDNS(0) TCP Keepalive option in both cases. 864 Reception of a Push Notification Update Message does not directly 865 generate a response back to the server. (Updates may indirectly 866 generate other operations; e.g., a Push Notification Update Message 867 declaring the appearance of a PTR record could lead to a query for 868 the SRV record named in the rdata of that PTR record[RFC6763]. 870 The TTL of an added record is stored by the client and decremented as 871 time passes, with the caveat that for as long as a relevant 872 subscription is active, the TTL does not decrement below 1 second. 873 For as long as a relevant subscription remains active, the client 874 SHOULD assume that when a record goes away the server will notify it 875 of that fact. Consequently, a client does not have to poll to verify 876 that the record is still there. Once a subscription is cancelled 877 (individually, or as a result of the TCP connection being closed) 878 record aging resumes and records are removed from the local cache 879 when their TTL reaches zero. 881 6.5. DNS RECONFIRM 883 Sometimes, particularly when used with a Hybrid Proxy 884 [I-D.ietf-dnssd-hybrid], a DNS Zone may contain stale data. When a 885 client encounters data that it believe may be stale (e.g., an SRV 886 record referencing a target host+port that is not responding to 887 connection requests) the client sends a DNS RECONFIRM message to 888 request that the server re-verify that the data is still valid. For 889 a Hybrid Proxy, this causes it to issue new Multicast DNS requests to 890 ascertain whether the target device is still present. For other 891 kinds of DNS server the RECONFIRM operation is currently undefined 892 and SHOULD be silently ignored. 894 A RECONFIRM request is formatted similarly to a conventional DNS 895 QUERY request [RFC1035], except that the opcode is RECONFIRM (8) 896 instead of QUERY (0). QTYPE MUST NOT be the value ANY (255). QCLASS 897 MUST NOT be the value ANY (255). 899 In a RECONFIRM request the DNS Header QR bit MUST be zero. 900 If the QR bit is not zero the message is not a RECONFIRM request. 902 The AA, TC, RD, RA, Z, AD, and CD bits, the ID field, and the RCODE 903 field, MUST be zero on transmission, and MUST be silently ignored on 904 reception. 906 Like a DNS QUERY request, a RECONFIRM request MUST contain exactly 907 one question. Since RECONFIRM requests are sent over TCP, multiple 908 RECONFIRM requests can be concatenated in a single TCP stream and 909 packed efficiently into TCP segments, so the ability to pack multiple 910 RECONFIRM operations into a single DNS message within that TCP stream 911 would add extra complexity for little benefit. 913 ANCOUNT MUST be nonzero, and the Answer Section MUST contain the 914 rdata for the record(s) that the client believes to be in doubt. 916 NSCOUNT MUST be zero, and the Authority Section MUST be empty. 917 Any records in the Authority Section MUST be silently ignored. 919 ARCOUNT specifies the number of records in the Additional Data 920 Section. Typically this is zero, but it may be nonzero in some 921 cases, such as when the request includes an EDNS(0) OPT record. 923 DNS wildcarding is not supported. That is, a wildcard ("*") in a 924 SUBSCRIBE message matches only a wildcard ("*") in the zone, and 925 nothing else. 927 Aliasing is not supported. That is, a CNAME in a SUBSCRIBE message 928 matches only a CNAME in the zone, and nothing else. 930 No response message is generated as a result of processing a 931 RECONFIRM message. 933 If the server receiving the RECONFIRM request determines that the 934 records are in fact no longer valid, then subsequent DNS Push 935 Notification Update Messages will be generated to inform interested 936 clients. Thus, one client discovering that a previously-advertised 937 printer is no longer present has the side effect of informing all 938 other interested clients that the printer in question is now gone. 940 6.6. DNS Push Notification Termination Message 942 If a server is low on resources it MAY simply terminate a client 943 connection with a TCP RST. However, the likely behaviour of the 944 client may be simply to reconnect immediately, putting more burden on 945 the server. Therefore, a server SHOULD instead choose to shed client 946 load by (a) sending a DNS Push Notification Termination Message and 947 then (b) immediately closing the client connection with a TCP FIN 948 instead of RST, thereby facilitating reliable delivery of the 949 Termination Message. 951 The format of a Termination Message is similar to a Push Notification 952 Update. 954 The following figure shows the existing DNS Update header format: 956 1 1 1 1 1 1 957 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 958 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 959 | ID | 960 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 961 |QR| Opcode | Z | RCODE | 962 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 963 | ZOCOUNT | 964 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 965 | PRCOUNT | 966 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 967 | UPCOUNT | 968 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 969 | ADCOUNT | 970 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 972 Figure 2 974 For Termination Messages the following rules apply: 976 The QR bit MUST be zero, and the Opcode MUST be UPDATE (5). 977 Messages received where this is not true are not Termination Messages 978 and should be silently ignored. 980 ID and the Z bits MUST be zero on transmission, 981 and MUST be silently ignored on reception. 983 ZOCOUNT MUST be zero, and the Zone Section MUST be empty. 984 Any records in the Zone Section MUST be silently ignored. 986 PRCOUNT MUST be zero, and the Prerequisite Section MUST be empty. 987 Any records in the Prerequisite Section MUST be silently ignored. 989 UPCOUNT MUST be zero, and the Update Section MUST be empty. 990 Any records in the Update Section MUST be silently ignored. 992 ADCOUNT specifies the number of records in the Additional Data 993 Section, e.g., the EDNS(0) OPT record.. 995 The RCODE MUST contain a nonzero code giving the reason for 996 termination, as indicated below: 998 +----------+-------+------------------------------------------------+ 999 | Mnemonic | Value | Description | 1000 +----------+-------+------------------------------------------------+ 1001 | SERVFAIL | 2 | The server is overloaded due to resource | 1002 | | | exhaustion. | 1003 | REFUSED | 5 | The server has been reconfigured and is no | 1004 | | | longer accepting DNS Push Notification | 1005 | | | requests for one or more of the currently | 1006 | | | subscribed names. | 1007 +----------+-------+------------------------------------------------+ 1009 Termination Response codes 1011 This document specifies only these two RCODE values for Termination 1012 Messages. Servers sending Termination Messages SHOULD use one of 1013 these two values. However, future circumstances may create 1014 situations where other RCODE values are appropriate in Termination 1015 Messages, so clients MUST be prepared to accept Termination Messages 1016 with any RCODE value. In particular, a Termination Message with 1017 RCODE value zero (NOERROR) is still a Termination Message and should 1018 be treated as such. 1020 The Termination Message MUST contain an EDNS(0) TCP Keepalive option 1021 [I-D.ietf-dnsop-edns-tcp-keepalive]. The client MUST wait for the 1022 time indicated in the EDNS(0) TCP Keepalive option's idle timeout 1023 before attempting any new connections to this server. A client that 1024 receives a Termination Message without an EDNS(0) TCP Keepalive 1025 option SHOULD treat it as equivalent to a TCP Keepalive option with a 1026 zero timeout value. 1028 In the case where the server is rejecting some, but not all, of the 1029 existing subscriptions (perhaps because it has been reconfigured and 1030 is no longer authoritative for those names) with a REFUSED (5) RCODE, 1031 the EDNS(0) TCP Keepalive option's idle timeout MAY be zero, 1032 indicating that the client SHOULD attempt to re-establish its 1033 subscriptions immediately. 1035 In the case where a server is terminating a large number of 1036 connections at once (e.g., if the system is restarting) and the 1037 server doesn't want to be inundated with a flood of simultaneous 1038 retries, it SHOULD send different EDNS(0) TCP Keepalive values to 1039 each client. These adjustments MAY be selected randomly, 1040 pseudorandomly, or deterministically (e.g., incrementing the time 1041 value by one for each successive client, yielding a post-restart 1042 reconnection rate of ten clients per second). 1044 7. Security Considerations 1046 TLS support is REQUIRED in DNS Push Notifications. There is no 1047 provision for opportunistic encryption using a mechanism like 1048 "STARTTLS". 1050 DNSSEC is RECOMMENDED for DNS Push Notifications. TLS alone does not 1051 provide complete security. TLS certificate verification can provide 1052 reasonable assurance that the client is really talking to the server 1053 associated with the desired host name, but since the desired host 1054 name is learned via a DNS SRV query, if the SRV query is subverted 1055 then the client may have a secure connection to a rogue server. 1056 DNSSEC can provided added confidence that the SRV query has not been 1057 subverted. 1059 7.1. Security Services 1061 It is the goal of using TLS to provide the following security 1062 services: 1064 Confidentiality: All application-layer communication is encrypted 1065 with the goal that no party should be able to decrypt it except 1066 the intended receiver. 1068 Data integrity protection: Any changes made to the communication in 1069 transit are detectable by the receiver. 1071 Authentication: An end-point of the TLS communication is 1072 authenticated as the intended entity to communicate with. 1074 Deployment recommendations on the appropriate key lengths and cypher 1075 suites are beyond the scope of this document. Please refer to TLS 1076 Recommendations [RFC7525] for the best current practices. Keep in 1077 mind that best practices only exist for a snapshot in time and 1078 recommendations will continue to change. Updated versions or errata 1079 may exist for these recommendations. 1081 7.2. TLS Name Authentication 1083 As described in Section 6.1, the client discovers the DNS Push 1084 Notification server using an SRV lookup for the record name 1085 "_dns-push-tls._tcp.". The server connection endpoint SHOULD 1086 then be authenticated using DANE TLSA records for the associated SRV 1087 record. This associates the target's name and port number with a 1088 trusted TLS certificate [RFC7673]. This procedure uses the TLS Sever 1089 Name Indication (SNI) extension [RFC6066] to inform the server of the 1090 name the client has authenticated through the use of TLSA records. 1091 Therefore, if the SRV record passes DNSSEC validation and a TLSA 1092 record matching the target name is useable, an SNI extension MUST be 1093 used for the target name to ensure the client is connecting to the 1094 server it has authenticated. If the target name does not have a 1095 usable TLSA record, then the use of the SNI extension is optional. 1097 7.3. TLS Compression 1099 In order to reduce the chances of compression related attacks, TLS- 1100 level compression SHOULD be disabled when using TLS versions 1.2 and 1101 earlier. In the draft version of TLS 1.3 [I-D.ietf-tls-tls13], TLS- 1102 level compression has been removed completely. 1104 7.4. TLS Session Resumption 1106 TLS Session Resumption is permissible on DNS Push Notification 1107 servers. The server may keep TLS state with Session IDs [RFC5246] or 1108 operate in stateless mode by sending a Session Ticket [RFC5077] to 1109 the client for it to store. However, once the connection is closed, 1110 any existing subscriptions will be dropped. When the TLS session is 1111 resumed, the DNS Push Notification server will not have any 1112 subscription state and will proceed as with any other new connection. 1113 Use of TLS Session Resumption allows a new TLS connection to be set 1114 up more quickly, but the client will still have to recreate any 1115 desired subscriptions. 1117 8. IANA Considerations 1119 This document defines the service name: "_dns-push-tls._tcp". 1120 It is only applicable for the TCP protocol. 1121 This name is to be published in the IANA Service Name Registry. 1123 This document defines three DNS OpCodes: SUBSCRIBE with (tentative) 1124 value 6, UNSUBSCRIBE with (tentative) value 7, and RECONFIRM with 1125 (tentative) value 8. 1127 9. Acknowledgements 1129 The authors would like to thank Kiren Sekar and Marc Krochmal for 1130 previous work completed in this field. 1132 This draft has been improved due to comments from Ran Atkinson, Tim 1133 Chown, Mark Delany, Ralph Droms, Bernie Holz, Jan Komissar, Manju 1134 Shankar Rao, Markus Stenberg, and Dave Thaler. 1136 10. References 1138 10.1. Normative References 1140 [I-D.ietf-dnsop-5966bis] 1141 Dickinson, J., Dickinson, S., Bellis, R., Mankin, A., and 1142 D. Wessels, "DNS Transport over TCP - Implementation 1143 Requirements", draft-ietf-dnsop-5966bis-06 (work in 1144 progress), January 2016. 1146 [I-D.ietf-dnsop-edns-tcp-keepalive] 1147 Wouters, P., Abley, J., Dickinson, S., and R. Bellis, "The 1148 edns-tcp-keepalive EDNS0 Option", draft-ietf-dnsop-edns- 1149 tcp-keepalive-06 (work in progress), February 2016. 1151 [I-D.ietf-tls-tls13] 1152 Rescorla, E., "The Transport Layer Security (TLS) Protocol 1153 Version 1.3", draft-ietf-tls-tls13-11 (work in progress), 1154 December 2015. 1156 [RFC0768] Postel, J., "User Datagram Protocol", STD 6, RFC 768, DOI 1157 10.17487/RFC0768, August 1980, 1158 . 1160 [RFC0793] Postel, J., "Transmission Control Protocol", STD 7, RFC 1161 793, DOI 10.17487/RFC0793, September 1981, 1162 . 1164 [RFC1034] Mockapetris, P., "Domain names - concepts and facilities", 1165 STD 13, RFC 1034, DOI 10.17487/RFC1034, November 1987, 1166 . 1168 [RFC1035] Mockapetris, P., "Domain names - implementation and 1169 specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, 1170 November 1987, . 1172 [RFC1123] Braden, R., Ed., "Requirements for Internet Hosts - 1173 Application and Support", STD 3, RFC 1123, DOI 10.17487/ 1174 RFC1123, October 1989, 1175 . 1177 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1178 Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/ 1179 RFC2119, March 1997, 1180 . 1182 [RFC2136] Vixie, P., Ed., Thomson, S., Rekhter, Y., and J. Bound, 1183 "Dynamic Updates in the Domain Name System (DNS UPDATE)", 1184 RFC 2136, DOI 10.17487/RFC2136, April 1997, 1185 . 1187 [RFC2782] Gulbrandsen, A., Vixie, P., and L. Esibov, "A DNS RR for 1188 specifying the location of services (DNS SRV)", RFC 2782, 1189 DOI 10.17487/RFC2782, February 2000, 1190 . 1192 [RFC4953] Touch, J., "Defending TCP Against Spoofing Attacks", RFC 1193 4953, DOI 10.17487/RFC4953, July 2007, 1194 . 1196 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 1197 (TLS) Protocol Version 1.2", RFC 5246, DOI 10.17487/ 1198 RFC5246, August 2008, 1199 . 1201 [RFC5966] Bellis, R., "DNS Transport over TCP - Implementation 1202 Requirements", RFC 5966, DOI 10.17487/RFC5966, August 1203 2010, . 1205 [RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS) 1206 Extensions: Extension Definitions", RFC 6066, DOI 1207 10.17487/RFC6066, January 2011, 1208 . 1210 [RFC6195] Eastlake 3rd, D., "Domain Name System (DNS) IANA 1211 Considerations", RFC 6195, DOI 10.17487/RFC6195, March 1212 2011, . 1214 [RFC6891] Damas, J., Graff, M., and P. Vixie, "Extension Mechanisms 1215 for DNS (EDNS(0))", STD 75, RFC 6891, DOI 10.17487/ 1216 RFC6891, April 2013, 1217 . 1219 [RFC7673] Finch, T., Miller, M., and P. Saint-Andre, "Using DNS- 1220 Based Authentication of Named Entities (DANE) TLSA Records 1221 with SRV Records", RFC 7673, DOI 10.17487/RFC7673, October 1222 2015, . 1224 10.2. Informative References 1226 [I-D.ietf-dnssd-hybrid] 1227 Cheshire, S., "Hybrid Unicast/Multicast DNS-Based Service 1228 Discovery", draft-ietf-dnssd-hybrid-03 (work in progress), 1229 November 2015. 1231 [I-D.sekar-dns-llq] 1232 Sekar, K., "DNS Long-Lived Queries", draft-sekar-dns- 1233 llq-01 (work in progress), August 2006. 1235 [IPJ.9-4-TCPSYN] 1236 Eddy, W., "Defenses Against TCP SYN Flooding Attacks", The 1237 Internet Protocol Journal, Cisco Systems, Volume 9, Number 1238 4, December 2006. 1240 [RFC1996] Vixie, P., "A Mechanism for Prompt Notification of Zone 1241 Changes (DNS NOTIFY)", RFC 1996, DOI 10.17487/RFC1996, 1242 August 1996, . 1244 [RFC4287] Nottingham, M., Ed. and R. Sayre, Ed., "The Atom 1245 Syndication Format", RFC 4287, DOI 10.17487/RFC4287, 1246 December 2005, . 1248 [RFC5077] Salowey, J., Zhou, H., Eronen, P., and H. Tschofenig, 1249 "Transport Layer Security (TLS) Session Resumption without 1250 Server-Side State", RFC 5077, DOI 10.17487/RFC5077, 1251 January 2008, . 1253 [RFC6762] Cheshire, S. and M. Krochmal, "Multicast DNS", RFC 6762, 1254 DOI 10.17487/RFC6762, February 2013, 1255 . 1257 [RFC6763] Cheshire, S. and M. Krochmal, "DNS-Based Service 1258 Discovery", RFC 6763, DOI 10.17487/RFC6763, February 2013, 1259 . 1261 [RFC7525] Sheffer, Y., Holz, R., and P. Saint-Andre, 1262 "Recommendations for Secure Use of Transport Layer 1263 Security (TLS) and Datagram Transport Layer Security 1264 (DTLS)", BCP 195, RFC 7525, DOI 10.17487/RFC7525, May 1265 2015, . 1267 [XEP0060] Millard, P., Saint-Andre, P., and R. Meijer, "Publish- 1268 Subscribe", XSF XEP 0060, July 2010. 1270 Authors' Addresses 1272 Tom Pusateri 1273 Seeking affiliation 1274 Hilton Head Island, SC 1275 USA 1277 Phone: +1 843 473 7394 1278 Email: pusateri@bangj.com 1280 Stuart Cheshire 1281 Apple Inc. 1282 1 Infinite Loop 1283 Cupertino, CA 95014 1284 USA 1286 Phone: +1 408 974 3207 1287 Email: cheshire@apple.com