idnits 2.17.1 draft-ietf-dnssd-push-15.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 seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords -- however, there's a paragraph with a matching beginning. Boilerplate error? (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- The document date (September 17, 2018) is 2047 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 (-20) exists of draft-ietf-dnsop-session-signal-14 ** Obsolete normative reference: RFC 793 (Obsoleted by RFC 9293) ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) -- Possible downref: Non-RFC (?) normative reference: ref. 'ST' == Outdated reference: A later version (-10) exists of draft-ietf-dnssd-hybrid-08 == 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 6824 (Obsoleted by RFC 8684) -- Obsolete informational reference (is this intentional?): RFC 7525 (Obsoleted by RFC 9325) -- Obsolete informational reference (is this intentional?): RFC 7719 (Obsoleted by RFC 8499) Summary: 2 errors (**), 0 flaws (~~), 5 warnings (==), 6 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 Unaffiliated 4 Intended status: Standards Track S. Cheshire 5 Expires: March 21, 2019 Apple Inc. 6 September 17, 2018 8 DNS Push Notifications 9 draft-ietf-dnssd-push-15 11 Abstract 13 The Domain Name System (DNS) was designed to return matching records 14 efficiently for queries for data that are relatively static. When 15 those records change frequently, DNS is still efficient at returning 16 the updated results when polled, as long as the polling rate is not 17 too high. But there exists no mechanism for a client to be 18 asynchronously notified when these changes occur. This document 19 defines a mechanism for a client to be notified of such changes to 20 DNS records, called DNS Push Notifications. 22 Status of This Memo 24 This Internet-Draft is submitted in full conformance with the 25 provisions of BCP 78 and BCP 79. 27 Internet-Drafts are working documents of the Internet Engineering 28 Task Force (IETF). Note that other groups may also distribute 29 working documents as Internet-Drafts. The list of current Internet- 30 Drafts is at https://datatracker.ietf.org/drafts/current/. 32 Internet-Drafts are draft documents valid for a maximum of six months 33 and may be updated, replaced, or obsoleted by other documents at any 34 time. It is inappropriate to use Internet-Drafts as reference 35 material or to cite them other than as "work in progress." 37 This Internet-Draft will expire on March 21, 2019. 39 Copyright Notice 41 Copyright (c) 2018 IETF Trust and the persons identified as the 42 document authors. All rights reserved. 44 This document is subject to BCP 78 and the IETF Trust's Legal 45 Provisions Relating to IETF Documents 46 (https://trustee.ietf.org/license-info) in effect on the date of 47 publication of this document. Please review these documents 48 carefully, as they describe your rights and restrictions with respect 49 to this document. Code Components extracted from this document must 50 include Simplified BSD License text as described in Section 4.e of 51 the Trust Legal Provisions and are provided without warranty as 52 described in the Simplified BSD License. 54 Table of Contents 56 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 57 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3 58 2. Motivation . . . . . . . . . . . . . . . . . . . . . . . . . 4 59 3. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 5 60 4. Transport . . . . . . . . . . . . . . . . . . . . . . . . . . 7 61 5. State Considerations . . . . . . . . . . . . . . . . . . . . 8 62 6. Protocol Operation . . . . . . . . . . . . . . . . . . . . . 9 63 6.1. Discovery . . . . . . . . . . . . . . . . . . . . . . . . 10 64 6.2. DNS Push Notification SUBSCRIBE . . . . . . . . . . . . . 13 65 6.2.1. SUBSCRIBE Request . . . . . . . . . . . . . . . . . . 13 66 6.2.2. SUBSCRIBE Response . . . . . . . . . . . . . . . . . 16 67 6.3. DNS Push Notification Updates . . . . . . . . . . . . . . 19 68 6.3.1. PUSH Message . . . . . . . . . . . . . . . . . . . . 19 69 6.4. DNS Push Notification UNSUBSCRIBE . . . . . . . . . . . . 22 70 6.4.1. UNSUBSCRIBE Request . . . . . . . . . . . . . . . . . 22 71 6.5. DNS Push Notification RECONFIRM . . . . . . . . . . . . . 24 72 6.5.1. RECONFIRM Request . . . . . . . . . . . . . . . . . . 24 73 6.5.2. RECONFIRM Response . . . . . . . . . . . . . . . . . 26 74 6.6. Client-Initiated Termination . . . . . . . . . . . . . . 28 75 7. Security Considerations . . . . . . . . . . . . . . . . . . . 29 76 7.1. Security Services . . . . . . . . . . . . . . . . . . . . 29 77 7.2. TLS Name Authentication . . . . . . . . . . . . . . . . . 29 78 7.3. TLS Compression . . . . . . . . . . . . . . . . . . . . . 30 79 7.4. TLS Session Resumption . . . . . . . . . . . . . . . . . 30 80 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 30 81 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 31 82 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 31 83 10.1. Normative References . . . . . . . . . . . . . . . . . . 31 84 10.2. Informative References . . . . . . . . . . . . . . . . . 33 85 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 35 87 1. Introduction 89 Domain Name System (DNS) records may be updated using DNS Update 90 [RFC2136]. Other mechanisms such as a Discovery Proxy [DisProx] can 91 also generate changes to a DNS zone. This document specifies a 92 protocol for DNS clients to subscribe to receive asynchronous 93 notifications of changes to RRSets of interest. It is immediately 94 relevant in the case of DNS Service Discovery [RFC6763] but is not 95 limited to that use case, and provides a general DNS mechanism for 96 DNS record change notifications. Familiarity with the DNS protocol 97 and DNS packet formats is assumed [RFC1034] [RFC1035] [RFC6895]. 99 1.1. Requirements Language 101 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 102 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 103 "OPTIONAL" in this document are to be interpreted as described in 104 "Key words for use in RFCs to Indicate Requirement Levels", when, and 105 only when, they appear in all capitals, as shown here [RFC2119] 106 [RFC8174]. 108 2. Motivation 110 As the domain name system continues to adapt to new uses and changes 111 in deployment, polling has the potential to burden DNS servers at 112 many levels throughout the network. Other network protocols have 113 successfully deployed a publish/subscribe model following the 114 Observer design pattern [obs]. XMPP Publish-Subscribe [XEP0060] and 115 Atom [RFC4287] are examples. While DNS servers are generally highly 116 tuned and capable of a high rate of query/response traffic, adding a 117 publish/subscribe model for tracking changes to DNS records can 118 deliver more timely notification of changes with reduced CPU usage 119 and lower network traffic. 121 Multicast DNS [RFC6762] implementations always listen on a well known 122 link-local IP multicast group, and record changes are sent to that 123 multicast group address for all group members to receive. Therefore, 124 Multicast DNS already has asynchronous change notification 125 capability. However, when DNS Service Discovery [RFC6763] is used 126 across a wide area network using Unicast DNS (possibly facilitated 127 via a Discovery Proxy [DisProx]) it would be beneficial to have an 128 equivalent capability for Unicast DNS, to allow clients to learn 129 about DNS record changes in a timely manner without polling. 131 The DNS Long-Lived Queries (LLQ) mechanism [LLQ] is an existing 132 deployed solution to provide asynchronous change notifications, used 133 by Apple's Back to My Mac Service [RFC6281] introduced in Mac OS X 134 10.5 Leopard in 2007. Back to My Mac was designed in an era when the 135 data center operations staff asserted that it was impossible for a 136 server to handle large numbers of mostly-idle TCP connections, so LLQ 137 was defined as a UDP-based protocol, effectively replicating much of 138 TCP's connection state management logic in user space, and creating 139 its own poor imitations of existing TCP features like the three-way 140 handshake, flow control, and reliability. 142 This document builds on experience gained with the LLQ protocol, with 143 an improved design. Instead of using UDP, this specification uses 144 DNS Stateful Operations (DSO) [DSO] running over TLS over TCP, and 145 therefore doesn't need to reinvent existing TCP functionality. Using 146 TCP also gives long-lived low-traffic connections better longevity 147 through NAT gateways without resorting to excessive keepalive 148 traffic. Instead of inventing a new vocabulary of messages to 149 communicate DNS zone changes as LLQ did, this specification borrows 150 the established syntax and semantics of DNS Update messages 151 [RFC2136]. 153 3. Overview 155 The existing DNS Update protocol [RFC2136] provides a mechanism for 156 clients to add or delete individual resource records (RRs) or entire 157 resource record sets (RRSets) on the zone's server. 159 This specification adopts a simplified subset of these existing 160 syntax and semantics, and uses them for DNS Push Notification 161 messages going in the opposite direction, from server to client, to 162 communicate changes to a zone. The client subscribes for Push 163 Notifications by connecting to the server and sending DNS message(s) 164 indicating the RRSet(s) of interest. When the client loses interest 165 in receiving further updates to these records, it unsubscribes. 167 The DNS Push Notification server for a zone is any server capable of 168 generating the correct change notifications for a name. It may be a 169 primary, secondary, or stealth name server [RFC7719]. Consequently, 170 the "_dns-push-tls._tcp." SRV record for a zone MAY reference 171 the same target host and port as that zone's 172 "_dns-update-tls._tcp." SRV record. When the same target host 173 and port is offered for both DNS Updates and DNS Push Notifications, 174 a client MAY use a single TCP connection to that server for both DNS 175 Updates and DNS Push Notification Subscriptions. 177 Supporting DNS Updates and DNS Push Notifications on the same server 178 is OPTIONAL. A DNS Push Notification server does NOT also have to 179 support DNS Update. 181 DNS Updates and DNS Push Notifications may be handled on different 182 ports on the same target host, in which case they are not considered 183 to be the "same server" for the purposes of this specification, and 184 communications with these two ports are handled independently. 186 Standard DNS Queries MAY be sent over a DNS Push Notification 187 connection, provided that these are queries for names falling within 188 the server's zone (the in the "_dns-push-tls._tcp." SRV 189 record). The RD (Recursion Desired) bit MUST be zero. If a query is 190 received with the RD bit set, matching records for names falling 191 within the server's zones should be returned with the RA (Recursion 192 Available) bit clear. If the query is for a name not in the server's 193 zone, an error with RCODE NOTAUTH (Not Authoritative) should be 194 returned. 196 DNS Push Notification clients are NOT required to implement DNS 197 Update Prerequisite processing. Prerequisites are used to perform 198 tentative atomic test-and-set type operations when a client updates 199 records on a server, and that concept has no applicability when it 200 comes to an authoritative server unilaterally informing a client of 201 changes to DNS records. 203 This DNS Push Notification specification includes support for DNS 204 classes, for completeness. However, in practice, it is anticipated 205 that for the foreseeable future the only DNS class in use will be DNS 206 class "IN", as is the reality today with existing DNS servers and 207 clients. A DNS Push Notification server MAY choose to implement only 208 DNS class "IN". If messages are received for a class other than 209 "IN", and that class is not supported, an error with RCODE NOTIMPL 210 (Not Implemented) should be returned. 212 DNS Push Notifications impose less load on the responding server than 213 rapid polling would, but Push Notifications do still have a cost, so 214 DNS Push Notification clients must not recklessly create an excessive 215 number of Push Notification subscriptions. Specifically: 217 (a) A subscription should only be active when there is a valid reason 218 to need live data (for example, an on-screen display is currently 219 showing the results to the user) and the subscription SHOULD be 220 cancelled as soon as the need for that data ends (for example, when 221 the user dismisses that display). Implementations MAY want to 222 implement idle timeouts, so that if the user ceases interacting with 223 the device, the display showing the result of the DNS Push 224 Notification subscription is automatically dismissed after a certain 225 period of inactivity. For example, if a user presses the "Print" 226 button on their smartphone, and then leaves the phone showing the 227 printer discovery screen until the phone goes to sleep, then the 228 printer discovery screen should be automatically dismissed as the 229 device goes to sleep. If the user does still intend to print, this 230 will require them to press the "Print" button again when they wake 231 their phone up. 233 (b) A DNS Push Notification client SHOULD NOT routinely keep a DNS 234 Push Notification subscription active 24 hours a day, 7 days a week, 235 just to keep a list in memory up to date so that if the user does 236 choose to bring up an on-screen display of that data, it can be 237 displayed really fast. DNS Push Notifications are designed to be 238 fast enough that there is no need to pre-load a "warm" list in memory 239 just in case it might be needed later. 241 Generally, as described in the DNS Stateful Operations specification 242 [DSO], a client must not keep a session to a server open indefinitely 243 if it has no subscriptions (or other operations) active on that 244 session. A client MAY close a session as soon as it becomes idle, 245 and then if needed in the future, open a new session when required. 246 Alternatively, a client MAY speculatively keep an idle session open 247 for some time, subject to the constraint that it MUST NOT keep a 248 session open that has been idle for more than the session's idle 249 timeout (15 seconds by default). 251 4. Transport 253 Other DNS operations like DNS Update [RFC2136] MAY use either User 254 Datagram Protocol (UDP) [RFC0768] or Transmission Control Protocol 255 (TCP) [RFC0793] as the transport protocol, in keeping with the 256 historical precedent that DNS queries must first be sent over UDP 257 [RFC1123]. This requirement to use UDP has subsequently been relaxed 258 [RFC7766]. 260 In keeping with the more recent precedent, DNS Push Notification is 261 defined only for TCP. DNS Push Notification clients MUST use DNS 262 Stateful Operations (DSO) [DSO] running over TLS over TCP [RFC7858]. 264 Connection setup over TCP ensures return reachability and alleviates 265 concerns of state overload at the server through anonymous 266 subscriptions. All subscribers are guaranteed to be reachable by the 267 server by virtue of the TCP three-way handshake. Flooding attacks 268 are possible with any protocol, and a benefit of TCP is that there 269 are already established industry best practices to guard against SYN 270 flooding and similar attacks [SYN] [RFC4953]. 272 Use of TCP also allows DNS Push Notifications to take advantage of 273 current and future developments in TCP, such as Multipath TCP (MPTCP) 274 [RFC6824], TCP Fast Open (TFO) [RFC7413], Tail Loss Probe (TLP) 275 [I-D.dukkipati-tcpm-tcp-loss-probe], and so on. 277 Transport Layer Security (TLS) [RFC5246] is well understood and 278 deployed across many protocols running over TCP. It is designed to 279 prevent eavesdropping, tampering, and message forgery. TLS is 280 REQUIRED for every connection between a client subscriber and server 281 in this protocol specification. Additional security measures such as 282 client authentication during TLS negotiation MAY also be employed to 283 increase the trust relationship between client and server. 285 5. State Considerations 287 Each DNS Push Notification server is capable of handling some finite 288 number of Push Notification subscriptions. This number will vary 289 from server to server and is based on physical machine 290 characteristics, network bandwidth, and operating system resource 291 allocation. After a client establishes a session to a DNS server, 292 each subscription is individually accepted or rejected. Servers may 293 employ various techniques to limit subscriptions to a manageable 294 level. Correspondingly, the client is free to establish simultaneous 295 sessions to alternate DNS servers that support DNS Push Notifications 296 for the zone and distribute subscriptions at the client's discretion. 297 In this way, both clients and servers can react to resource 298 constraints. Token bucket rate limiting schemes are also effective 299 in providing fairness by a server across numerous client requests. 301 6. Protocol Operation 303 The DNS Push Notification protocol is a session-oriented protocol, 304 and makes use of DNS Stateful Operations (DSO) [DSO]. 306 For details of the DSO message format refer to the DNS Stateful 307 Operations specification [DSO]. Those details are not repeated here. 309 DNS Push Notification clients and servers MUST support DSO, but (as 310 stated in the DSO specification [DSO]) the server SHOULD NOT issue 311 any DSO messages until after the client has first initiated an 312 acknowledged DSO message of its own. A single server can support DNS 313 Queries, DNS Updates, and DNS Push Notifications (using DSO) on the 314 same TCP port, and until the client has sent at least one DSO 315 message, the server does not know what kind of client has connected 316 to it. Once the client has indicated willingness to use DSO by 317 sending one of its own, either side of the session may then initiate 318 further DSO messages at any time. 320 A DNS Push Notification exchange begins with the client discovering 321 the appropriate server, using the procedure described in Section 6.1, 322 and then making a TLS/TCP connection to it. 324 A typical DNS Push Notification client will immediately issue a DSO 325 Keepalive operation to request a session timeout or keepalive 326 interval longer than the the 15-second default, but this is not 327 required. A DNS Push Notification client MAY issue other requests on 328 the session first, and only issue a DSO Keepalive operation later if 329 it determines that to be necessary. However, Push Notification 330 subscriptions can also be used to establish the DSO session. 332 In accordance with the current set of active subscriptions, the 333 server sends relevant asynchronous Push Notifications to the client. 334 Note that a client MUST be prepared to receive (and silently ignore) 335 Push Notifications for subscriptions it has previously removed, since 336 there is no way to prevent the situation where a Push Notification is 337 in flight from server to client while the client's UNSUBSCRIBE 338 message cancelling that subscription is simultaneously in flight from 339 client to server. 341 6.1. Discovery 343 The first step in DNS Push Notification subscription is to discover 344 an appropriate DNS server that supports DNS Push Notifications for 345 the desired zone. 347 The client begins by opening a DSO Session to its normal configured 348 DNS recursive resolver and requesting a Push Notification 349 subscription. If this is successful, then the recursive resolver 350 will make appropriate Push Notification subscriptions on the client's 351 behalf, and the client will receive appropriate results. If the 352 recursive resolver does not support Push Notification subscriptions, 353 then it will return an error code, and the client should proceed to 354 discover the appropriate server for direct communication. The client 355 MUST also determine which TCP port on the server is listening for 356 connections, which need not be (and often is not) the typical TCP 357 port 53 used for conventional DNS, or TCP port 853 used for DNS over 358 TLS [RFC7858]. 360 The algorithm described here is an iterative algorithm, which starts 361 with the full name of the record to which the client wishes to 362 subscribe. Successive SOA queries are then issued, trimming one 363 label each time, until the closest enclosing authoritative server is 364 discovered. There is also an optimization to enable the client to 365 take a "short cut" directly to the SOA record of the closest 366 enclosing authoritative server in many cases. 368 1. The client begins the discovery by sending a DNS query to its 369 local resolver, with record type SOA [RFC1035] for the record 370 name to which it wishes to subscribe. As an example, suppose the 371 client wishes to subscribe to PTR records with the name 372 _ipp._tcp.foo.example.com (to discover Internet Printing Protocol 373 (IPP) printers [RFC8010] [RFC8011] being advertised at 374 "foo.example.com"). The client begins by sending an SOA query 375 for _ipp._tcp.foo.example.com to the local recursive resolver. 376 The goal is to determine the server authoritative for the name 377 _ipp._tcp.foo.example.com. The DNS zone containing the name 378 _ipp._tcp.foo.example.com could be example.com, or 379 foo.example.com, or _tcp.foo.example.com, or even 380 _ipp._tcp.foo.example.com. The client does not know in advance 381 where the closest enclosing zone cut occurs, which is why it uses 382 the procedure described here to discover this information. 384 2. If the requested SOA record exists, it will be returned in the 385 Answer section with a NOERROR response code, and the client has 386 succeeded in discovering the information it needs. (This text is 387 not placing any new requirements on DNS recursive resolvers. It 388 is merely describing the existing operation of the DNS protocol 389 [RFC1034] [RFC1035].) 391 3. If the requested SOA record does not exist, the client will get 392 back a NOERROR/NODATA response or an NXDOMAIN/Name Error 393 response. In either case, the local resolver SHOULD include the 394 SOA record for the zone of the requested name in the Authority 395 Section. If the SOA record is received in the Authority Section, 396 then the client has succeeded in discovering the information it 397 needs. (This text is not placing any new requirements on DNS 398 recursive resolvers. It is merely describing the existing 399 operation of the DNS protocol regarding negative responses 400 [RFC2308].) 402 4. If the client receives a response containing no SOA record, then 403 it proceeds with the iterative approach. The client strips the 404 leading label from the current query name and if the resulting 405 name has at least one label in it, the client sends a new SOA 406 query, and processing continues at step 2 above, repeating the 407 iterative search until either an SOA is received, or the query 408 name is empty. In the case of an empty name, this is a network 409 configuration error which should not happen and the client gives 410 up. The client may retry the operation at a later time, of the 411 client's choosing, such after a change in network attachment. 413 5. Once the SOA is known (either by virtue of being seen in the 414 Answer Section, or in the Authority Section), the client sends a 415 DNS query with type SRV [RFC2782] for the record name 416 "_dns-push-tls._tcp.", where is the owner name of 417 the discovered SOA record. 419 6. If the zone in question is set up to offer DNS Push Notifications 420 then this SRV record MUST exist. (If this SRV record does not 421 exist then the zone is not correctly configured for DNS Push 422 Notifications as specified in this document.) The SRV "target" 423 contains the name of the server providing DNS Push Notifications 424 for the zone. The port number on which to contact the server is 425 in the SRV record "port" field. The address(es) of the target 426 host MAY be included in the Additional Section, however, the 427 address records SHOULD be authenticated before use as described 428 below in Section 7.2 and in the specification for using DANE TLSA 429 Records with SRV Records [RFC7673], if applicable. 431 7. More than one SRV record may be returned. In this case, the 432 "priority" and "weight" values in the returned SRV records are 433 used to determine the order in which to contact the servers for 434 subscription requests. As described in the SRV specification 435 [RFC2782], the server with the lowest "priority" is first 436 contacted. If more than one server has the same "priority", the 437 "weight" indicates the weighted probability that the client 438 should contact that server. Higher weights have higher 439 probabilities of being selected. If a server is not willing to 440 accept a subscription request, or is not reachable within a 441 reasonable time, as determined by the client, then a subsequent 442 server is to be contacted. 444 Each time a client makes a new DNS Push Notification subscription 445 session, it SHOULD repeat the discovery process in order to determine 446 the preferred DNS server for subscriptions at that time. However, 447 the client device MUST respect the DNS TTL values on records it 448 receives, and store them in its local cache with this lifetime. This 449 means that, as long as the DNS TTL values on the authoritative 450 records were set to reasonable values, repeated application of this 451 discovery process can be completed nearly instantaneously by the 452 client, using only locally-stored cached data. 454 6.2. DNS Push Notification SUBSCRIBE 456 After connecting, and requesting a longer idle timeout and/or 457 keepalive interval if necessary, a DNS Push Notification client then 458 indicates its desire to receive DNS Push Notifications for a given 459 domain name by sending a SUBSCRIBE request over the established DSO 460 session to the server. A SUBSCRIBE request is encoded in a DSO [DSO] 461 message. This specification defines a DSO TLV for DNS Push 462 Notification SUBSCRIBE Requests/Responses (tentatively DSO Type Code 463 0x40). 465 The entity that initiates a SUBSCRIBE request is by definition the 466 client. A server MUST NOT send a SUBSCRIBE request over an existing 467 session from a client. If a server does send a SUBSCRIBE request 468 over a DSO session initiated by a client, this is a fatal error and 469 the client should immediately abort the connection with a TCP RST (or 470 equivalent for other protocols). 472 6.2.1. SUBSCRIBE Request 474 A SUBSCRIBE request begins with the standard DSO 12-byte header 475 [DSO], followed by the SUBSCRIBE TLV. A SUBSCRIBE request message is 476 illustrated in Figure 1. 478 The MESSAGE ID field MUST be set to a unique value, that the client 479 is not using for any other active operation on this session. For the 480 purposes here, a MESSAGE ID is in use on this session if the client 481 has used it in a request for which it has not yet received a 482 response, or if the client has used it for a subscription which it 483 has not yet cancelled using UNSUBSCRIBE. In the SUBSCRIBE response 484 the server MUST echo back the MESSAGE ID value unchanged. 486 The other header fields MUST be set as described in the DSO 487 specification [DSO]. The DNS Opcode is the DSO Opcode. The four 488 count fields MUST be zero, and the corresponding four sections MUST 489 be empty (i.e., absent). 491 The DSO-TYPE is SUBSCRIBE. The DSO-LENGTH is the length of the DSO- 492 DATA that follows, which specifies the name, type, and class of the 493 record(s) being sought. 495 1 1 1 1 1 1 496 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 497 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ \ 498 | MESSAGE ID | \ 499 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 500 |QR| Opcode | Z | RCODE | | 501 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 502 | QDCOUNT (MUST BE ZERO) | | 503 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ > HEADER 504 | ANCOUNT (MUST BE ZERO) | | 505 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 506 | NSCOUNT (MUST BE ZERO) | | 507 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 508 | ARCOUNT (MUST BE ZERO) | / 509 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / 510 | DSO-TYPE = SUBSCRIBE | 511 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 512 | DSO-LENGTH (number of octets in DSO-DATA) | 513 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ \ 514 | | \ 515 \ NAME \ | 516 \ \ | 517 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ > DSO-DATA 518 | TYPE | | 519 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 520 | CLASS | / 521 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / 523 Figure 1: SUBSCRIBE Request 525 The DSO-DATA for a SUBSCRIBE request MUST contain exactly one NAME, 526 Type, and CLASS. Since SUBSCRIBE requests are sent over TCP, 527 multiple SUBSCRIBE request messages can be concatenated in a single 528 TCP stream and packed efficiently into TCP segments. 530 If accepted, the subscription will stay in effect until the client 531 cancels the subscription using UNSUBSCRIBE or until the DSO session 532 between the client and the server is closed. 534 SUBSCRIBE requests on a given session MUST be unique. A client MUST 535 NOT send a SUBSCRIBE message that duplicates the NAME, TYPE and CLASS 536 of an existing active subscription on that DSO session. For the 537 purpose of this matching, the established DNS case-insensitivity for 538 US-ASCII letters applies (e.g., "example.com" and "Example.com" are 539 the same). If a server receives such a duplicate SUBSCRIBE message 540 this is an error and the server MUST immediately terminate the 541 connection with a TCP RST (or equivalent for other protocols). 543 DNS wildcarding is not supported. That is, a wildcard ("*") in a 544 SUBSCRIBE message matches only a literal wildcard character ("*") in 545 the zone, and nothing else. 547 Aliasing is not supported. That is, a CNAME in a SUBSCRIBE message 548 matches only a literal CNAME record in the zone, and nothing else. 550 A client may SUBSCRIBE to records that are unknown to the server at 551 the time of the request (providing that the name falls within one of 552 the zone(s) the server is responsible for) and this is not an error. 553 The server MUST accept these requests and send Push Notifications if 554 and when matching records are found in the future. 556 If neither TYPE nor CLASS are ANY (255) then this is a specific 557 subscription to changes for the given NAME, TYPE and CLASS. If one 558 or both of TYPE or CLASS are ANY (255) then this subscription matches 559 any type and/or any class, as appropriate. 561 NOTE: A little-known quirk of DNS is that in DNS QUERY requests, 562 QTYPE and QCLASS 255 mean "ANY" not "ALL". They indicate that the 563 server should respond with ANY matching records of its choosing, not 564 necessarily ALL matching records. This can lead to some surprising 565 and unexpected results, where a query returns some valid answers but 566 not all of them, and makes QTYPE=ANY queries less useful than people 567 sometimes imagine. 569 When used in conjunction with SUBSCRIBE, TYPE and CLASS 255 should be 570 interpreted to mean "ALL", not "ANY". After accepting a subscription 571 where one or both of TYPE or CLASS are 255, the server MUST send Push 572 Notification Updates for ALL record changes that match the 573 subscription, not just some of them. 575 6.2.2. SUBSCRIBE Response 577 Each SUBSCRIBE request generates exactly one SUBSCRIBE response from 578 the server. 580 A SUBSCRIBE response message begins with the standard DSO 12-byte 581 header [DSO], possibly followed by one or more optional TLVs, such as 582 a Retry Delay TLV. 584 The MESSAGE ID field MUST echo the value given in the ID field of the 585 SUBSCRIBE request. This is how the client knows which request is 586 being responded to. 588 A SUBSCRIBE response message MUST NOT include a SUBSCRIBE TLV. If a 589 client receives a SUBSCRIBE response message containing a SUBSCRIBE 590 TLV then the response message is processed but the SUBSCRIBE TLV MUST 591 be silently ignored. 593 In the SUBSCRIBE response the RCODE indicates whether or not the 594 subscription was accepted. Supported RCODEs are as follows: 596 +-----------+-------+-----------------------------------------------+ 597 | Mnemonic | Value | Description | 598 +-----------+-------+-----------------------------------------------+ 599 | NOERROR | 0 | SUBSCRIBE successful. | 600 | FORMERR | 1 | Server failed to process request due to a | 601 | | | malformed request. | 602 | SERVFAIL | 2 | Server failed to process request due to a | 603 | | | problem with the server. | 604 | NXDOMAIN | 3 | NOT APPLICABLE. DNS Push Notification servers | 605 | | | MUST NOT return NXDOMAIN errors in response | 606 | | | to SUBSCRIBE requests. | 607 | NOTIMP | 4 | Server does not implement DSO. | 608 | REFUSED | 5 | Server refuses to process request for policy | 609 | | | or security reasons. | 610 | NOTAUTH | 9 | Server is not authoritative for the requested | 611 | | | name. | 612 | DSOTYPENI | 11 | SUBSCRIBE operation not supported. | 613 +-----------+-------+-----------------------------------------------+ 615 SUBSCRIBE Response codes 617 This document specifies only these RCODE values for SUBSCRIBE 618 Responses. Servers sending SUBSCRIBE Responses SHOULD use one of 619 these values. However, future circumstances may create situations 620 where other RCODE values are appropriate in SUBSCRIBE Responses, so 621 clients MUST be prepared to accept SUBSCRIBE Responses with any RCODE 622 value. 624 If the server sends a nonzero RCODE in the SUBSCRIBE response, that 625 means (a) the client is (at least partially) misconfigured, (b) the 626 server resources are exhausted, or (c) there is some other unknown 627 failure on the server. In any case, the client shouldn't retry the 628 subscription right away. Either end can terminate the session, but 629 the client may want to try this subscription again, or it may have 630 other successful subscriptions that it doesn't want to abandon. If 631 the server sends a nonzero RCODE then it SHOULD append a Retry Delay 632 TLV [DSO] to the response specifying a delay before the client 633 attempts this operation again. Recommended values for the delay for 634 different RCODE values are given below. These recommended values 635 apply both to the default values a server should place in the Retry 636 Delay TLV, and the default values a client should assume if the 637 server provides no Retry Delay TLV. 639 For RCODE = 1 (FORMERR) the delay may be any value selected by the 640 implementer. A value of five minutes is RECOMMENDED, to reduce 641 the risk of high load from defective clients. 643 For RCODE = 2 (SERVFAIL) the delay should be chosen according to 644 the level of server overload and the anticipated duration of that 645 overload. By default, a value of one minute is RECOMMENDED. If a 646 more serious server failure occurs, the delay may be longer in 647 accordance with the specific problem encountered. 649 For RCODE = 4 (NOTIMP), which occurs on a server that doesn't 650 implement DSO [DSO], it is unlikely that the server will begin 651 supporting DSO in the next few minutes, so the retry delay SHOULD 652 be one hour. Note that in such a case, a server that doesn't 653 implement DSO is unlikely to place a Retry Delay TLV in its 654 response, so this recommended value in particular applies to what 655 a client should assume by default. 657 For RCODE = 5 (REFUSED), which occurs on a server that implements 658 DNS Push Notifications, but is currently configured to disallow 659 DNS Push Notifications, the retry delay may be any value selected 660 by the implementer and/or configured by the operator. 662 This is a misconfiguration, since this server is listed in a 663 "_dns-push-tls._tcp." SRV record, but the server itself is 664 not currently configured to support DNS Push Notifications. Since 665 it is possible that the misconfiguration may be repaired at any 666 time, the retry delay should not be set too high. By default, a 667 value of 5 minutes is RECOMMENDED. 669 For RCODE = 9 (NOTAUTH), which occurs on a server that implements 670 DNS Push Notifications, but is not configured to be authoritative 671 for the requested name, the retry delay may be any value selected 672 by the implementer and/or configured by the operator. 674 This is a misconfiguration, since this server is listed in a 675 "_dns-push-tls._tcp." SRV record, but the server itself is 676 not currently configured to support DNS Push Notifications for 677 that zone. Since it is possible that the misconfiguration may be 678 repaired at any time, the retry delay should not be set too high. 679 By default, a value of 5 minutes is RECOMMENDED. 681 For RCODE = 11 (DSOTYPENI), which occurs on a server that doesn't 682 implement DNS Push Notifications, it is unlikely that the server 683 will begin supporting DNS Push Notifications in the next few 684 minutes, so the retry delay SHOULD be one hour. 686 For other RCODE values, the retry delay should be set by the 687 server as appropriate for that error condition. By default, a 688 value of 5 minutes is RECOMMENDED. 690 For RCODE = 9 (NOTAUTH), the time delay applies to requests for other 691 names falling within the same zone. Requests for names falling 692 within other zones are not subject to the delay. For all other 693 RCODEs the time delay applies to all subsequent requests to this 694 server. 696 After sending an error response the server MAY allow the session to 697 remain open, or MAY send a DNS Push Notification Retry Delay 698 Operation TLV instructing the client to close the session, as 699 described in the DSO specification [DSO]. Clients MUST correctly 700 handle both cases. 702 6.3. DNS Push Notification Updates 704 Once a subscription has been successfully established, the server 705 generates PUSH messages to send to the client as appropriate. In the 706 case that the answer set was non-empty at the moment the subscription 707 was established, an initial PUSH message will be sent immediately 708 following the SUBSCRIBE Response. Subsequent changes to the answer 709 set are then communicated to the client in subsequent PUSH messages. 711 6.3.1. PUSH Message 713 A PUSH message begins with the standard DSO 12-byte header [DSO], 714 followed by the PUSH TLV. A PUSH message is illustrated in Figure 2. 716 In accordance with the definition of DSO unidirectional messages, the 717 MESSAGE ID field MUST be zero. There is no client response to a PUSH 718 message. 720 The other header fields MUST also be set as described in the DSO 721 specification [DSO]. The DNS Opcode is the DSO Opcode. The four 722 count fields MUST be zero, and the corresponding four sections MUST 723 be empty (i.e., absent). 725 The DSO-TYPE is PUSH (tentatively 0x41). The DSO-LENGTH is the 726 length of the DSO-DATA that follows, which specifies the changes 727 being communicated. 729 The DSO-DATA contains one or more Update records. A PUSH Message 730 MUST contain at least one Update record. If a PUSH Message is 731 received that contains zero Update records, this is a fatal error, 732 and the receiver MUST immediately terminate the connection with a TCP 733 RST (or equivalent for other protocols). The Update records are 734 formatted in the customary way for Resource Records in DNS messages. 735 Update records in a PUSH Message are interpreted according to the 736 same rules as for DNS Update [RFC2136] messages, namely: 738 Delete all RRsets from a name: 739 TTL=0, CLASS=ANY, RDLENGTH=0, TYPE=ANY. 741 Delete an RRset from a name: 742 TTL=0, CLASS=ANY, RDLENGTH=0; 743 TYPE specifies the RRset being deleted. 745 Delete an individual RR from a name: 746 TTL=0, CLASS=NONE; 747 TYPE, RDLENGTH and RDATA specifies the RR being deleted. 749 Add to an RRset: 751 TTL, CLASS, TYPE, RDLENGTH and RDATA specifies the RR being added. 753 1 1 1 1 1 1 754 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 755 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ \ 756 | MESSAGE ID (MUST BE ZERO) | \ 757 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 758 |QR| Opcode | Z | RCODE | | 759 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 760 | QDCOUNT (MUST BE ZERO) | | 761 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ > HEADER 762 | ANCOUNT (MUST BE ZERO) | | 763 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 764 | NSCOUNT (MUST BE ZERO) | | 765 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 766 | ARCOUNT (MUST BE ZERO) | / 767 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / 768 | DSO-TYPE = PUSH | 769 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 770 | DSO-LENGTH (number of octets in DSO-DATA) | 771 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ \ 772 \ NAME \ \ 773 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 774 | TYPE | | 775 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 776 | CLASS | | 777 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 778 | TTL | | 779 | (32 bits) | > DSO-DATA 780 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 781 | RDLEN | | 782 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 783 \ RDATA \ | 784 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 785 : NAME, TYPE, CLASS, TTL, RDLEN, RDATA : | 786 : Repeated As Necessary : / 787 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / 789 Figure 2: PUSH Message 791 When processing the records received in a PUSH Message, the receiving 792 client MUST validate that the records being added or deleted 793 correspond with at least one currently active subscription on that 794 session. Specifically, the record name MUST match the name given in 795 the SUBSCRIBE request, subject to the usual established DNS case- 796 insensitivity for US-ASCII letters. If the TYPE in the SUBSCRIBE 797 request was not ANY (255) then the TYPE of the record must match the 798 TYPE given in the SUBSCRIBE request. If the CLASS in the SUBSCRIBE 799 request was not ANY (255) then the CLASS of the record must match the 800 CLASS given in the SUBSCRIBE request. If a matching active 801 subscription on that session is not found, then that individual 802 record addition/deletion is silently ignored. Processing of other 803 additions and deletions in this message is not affected. The DSO 804 session is not closed. This is to allow for the unavoidable race 805 condition where a client sends an outbound UNSUBSCRIBE while inbound 806 PUSH messages for that subscription from the server are still in 807 flight. 809 In the case where a single change affects more than one active 810 subscription, only one PUSH message is sent. For example, a PUSH 811 message adding a given record may match both a SUBSCRIBE request with 812 the same TYPE and a different SUBSCRIBE request with TYPE=ANY. It is 813 not the case that two PUSH messages are sent because the new record 814 matches two active subscriptions. 816 The server SHOULD encode change notifications in the most efficient 817 manner possible. For example, when three AAAA records are deleted 818 from a given name, and no other AAAA records exist for that name, the 819 server SHOULD send a "delete an RRset from a name" PUSH message, not 820 three separate "delete an individual RR from a name" PUSH messages. 821 Similarly, when both an SRV and a TXT record are deleted from a given 822 name, and no other records of any kind exist for that name, the 823 server SHOULD send a "delete all RRsets from a name" PUSH message, 824 not two separate "delete an RRset from a name" PUSH messages. 826 A server SHOULD combine multiple change notifications in a single 827 PUSH message when possible, even if those change notifications apply 828 to different subscriptions. Conceptually, a PUSH message is a 829 session-level mechanism, not a subscription-level mechanism. 831 The TTL of an added record is stored by the client and decremented as 832 time passes, with the caveat that for as long as a relevant 833 subscription is active, the TTL does not decrement below 1 second. 834 For as long as a relevant subscription remains active, the client 835 SHOULD assume that when a record goes away the server will notify it 836 of that fact. Consequently, a client does not have to poll to verify 837 that the record is still there. Once a subscription is cancelled 838 (individually, or as a result of the DSO session being closed) record 839 aging resumes and records are removed from the local cache when their 840 TTL reaches zero. 842 6.4. DNS Push Notification UNSUBSCRIBE 844 To cancel an individual subscription without closing the entire DSO 845 session, the client sends an UNSUBSCRIBE message over the established 846 DSO session to the server. The UNSUBSCRIBE message is encoded as a 847 DSO [DSO] unidirectional message. This specification defines a DSO 848 TLV for DNS Push Notification UNSUBSCRIBE Requests/Responses 849 (tentatively DSO Type Code 0x42). 851 A server MUST NOT initiate an UNSUBSCRIBE request. If a server does 852 send an UNSUBSCRIBE request over a DSO session initiated by a client, 853 this is a fatal error and the client should immediately abort the 854 connection with a TCP RST (or equivalent for other protocols). 856 6.4.1. UNSUBSCRIBE Request 858 An UNSUBSCRIBE request begins with the standard DSO 12-byte header 859 [DSO], followed by the UNSUBSCRIBE TLV. An UNSUBSCRIBE request 860 message is illustrated in Figure 3. 862 The MESSAGE ID field MUST be zero. There is no server response to a 863 UNSUBSCRIBE message. 865 The other header fields MUST be set as described in the DSO 866 specification [DSO]. The DNS Opcode is the DSO Opcode. The four 867 count fields MUST be zero, and the corresponding four sections MUST 868 be empty (i.e., absent). 870 In the UNSUBSCRIBE TLV the DSO-TYPE is UNSUBSCRIBE. The DSO-LENGTH 871 is 2 octets. 873 The DSO-DATA contains the MESSAGE ID field of the value given in the 874 ID field of an active SUBSCRIBE request. This is how the server 875 knows which SUBSCRIBE request is being cancelled. After receipt of 876 the UNSUBSCRIBE request, the SUBSCRIBE request is no longer active. 878 It is allowable for the client to issue an UNSUBSCRIBE request for a 879 previous SUBSCRIBE request for which the client has not yet received 880 a SUBSCRIBE response. This is to allow for the case where a client 881 starts and stops a subscription in less than the round-trip time to 882 the server. The client is NOT required to wait for the SUBSCRIBE 883 response before issuing the UNSUBSCRIBE request. 885 1 1 1 1 1 1 886 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 887 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ \ 888 | MESSAGE ID (MUST BE ZERO) | \ 889 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 890 |QR| Opcode | Z | RCODE | | 891 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 892 | QDCOUNT (MUST BE ZERO) | | 893 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ > HEADER 894 | ANCOUNT (MUST BE ZERO) | | 895 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 896 | NSCOUNT (MUST BE ZERO) | | 897 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 898 | ARCOUNT (MUST BE ZERO) | / 899 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / 900 | DSO-TYPE = UNSUBSCRIBE | 901 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 902 | DSO-LENGTH (2 octets) | 903 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ \ 904 | SUBSCRIBE MESSAGE ID | > DSO-DATA 905 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / 907 Figure 3: UNSUBSCRIBE Request 909 6.5. DNS Push Notification RECONFIRM 911 Sometimes, particularly when used with a Discovery Proxy [DisProx], a 912 DNS Zone may contain stale data. When a client encounters data that 913 it believe may be stale (e.g., an SRV record referencing a target 914 host+port that is not responding to connection requests) the client 915 can send a RECONFIRM request to ask the server to re-verify that the 916 data is still valid. For a Discovery Proxy, this causes it to issue 917 new Multicast DNS requests to ascertain whether the target device is 918 still present. For other types of DNS server, the RECONFIRM 919 operation is currently undefined, and SHOULD result in a NOERROR 920 response, but otherwise need not cause any action to occur. Frequent 921 RECONFIRM operations may be a sign of network unreliability, or some 922 kind of misconfiguration, so RECONFIRM operations MAY be logged or 923 otherwise communicated to a human administrator to assist in 924 detecting, and remedying, such network problems. 926 If, after receiving a valid RECONFIRM request, the server determines 927 that the disputed records are in fact no longer valid, then 928 subsequent DNS PUSH Messages will be generated to inform interested 929 clients. Thus, one client discovering that a previously-advertised 930 device (like a network printer) is no longer present has the side 931 effect of informing all other interested clients that the device in 932 question is now gone. 934 6.5.1. RECONFIRM Request 936 A RECONFIRM request begins with the standard DSO 12-byte header 937 [DSO], followed by the RECONFIRM TLV. A RECONFIRM request message is 938 illustrated in Figure 4. 940 The MESSAGE ID field MUST be set to a unique value, that the client 941 is not using for any other active operation on this DSO session. For 942 the purposes here, a MESSAGE ID is in use on this session if the 943 client has used it in a request for which it has not yet received a 944 response, or if the client has used it for a subscription which it 945 has not yet cancelled using UNSUBSCRIBE. In the RECONFIRM response 946 the server MUST echo back the MESSAGE ID value unchanged. 948 The other header fields MUST be set as described in the DSO 949 specification [DSO]. The DNS Opcode is the DSO Opcode. The four 950 count fields MUST be zero, and the corresponding four sections MUST 951 be empty (i.e., absent). 953 The DSO-TYPE is RECONFIRM (tentatively 0x43). The DSO-LENGTH is the 954 length of the data that follows, which specifies the name, type, 955 class, and content of the record being disputed. 957 1 1 1 1 1 1 958 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 959 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ \ 960 | MESSAGE ID | \ 961 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 962 |QR| Opcode | Z | RCODE | | 963 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 964 | QDCOUNT (MUST BE ZERO) | | 965 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ > HEADER 966 | ANCOUNT (MUST BE ZERO) | | 967 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 968 | NSCOUNT (MUST BE ZERO) | | 969 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 970 | ARCOUNT (MUST BE ZERO) | / 971 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / 972 | DSO-TYPE = RECONFIRM | 973 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 974 | DSO-LENGTH (number of octets in DSO-DATA) | 975 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ \ 976 \ NAME \ \ 977 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 978 | TYPE | | 979 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ > DSO-DATA 980 | CLASS | | 981 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 982 \ RDATA \ / 983 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / 985 Figure 4: RECONFIRM Request 987 The DSO-DATA for a RECONFIRM request MUST contain exactly one record. 988 The DSO-DATA for a RECONFIRM request has no count field to specify 989 more than one record. Since RECONFIRM requests are sent over TCP, 990 multiple RECONFIRM request messages can be concatenated in a single 991 TCP stream and packed efficiently into TCP segments. 993 TYPE MUST NOT be the value ANY (255) and CLASS MUST NOT be the value 994 ANY (255). 996 DNS wildcarding is not supported. That is, a wildcard ("*") in a 997 RECONFIRM message matches only a literal wildcard character ("*") in 998 the zone, and nothing else. 1000 Aliasing is not supported. That is, a CNAME in a RECONFIRM message 1001 matches only a literal CNAME record in the zone, and nothing else. 1003 6.5.2. RECONFIRM Response 1005 Each RECONFIRM request generates exactly one RECONFIRM response from 1006 the server. 1008 A RECONFIRM response message begins with the standard DSO 12-byte 1009 header [DSO], possibly followed by one or more optional TLVs, such as 1010 a Retry Delay TLV. For suggested values for the Retry Delay TLV, see 1011 Section 6.2.2. 1013 The MESSAGE ID field MUST echo the value given in the ID field of the 1014 RECONFIRM request. This is how the client knows which request is 1015 being responded to. 1017 A RECONFIRM response message MUST NOT include a DSO RECONFIRM TLV. 1018 If a client receives a RECONFIRM response message containing a 1019 RECONFIRM TLV then the response message is processed but the 1020 RECONFIRM TLV MUST be silently ignored. 1022 In the RECONFIRM response the RCODE confirms receipt of the 1023 reconfirmation request. Supported RCODEs are as follows: 1025 +-----------+-------+-----------------------------------------------+ 1026 | Mnemonic | Value | Description | 1027 +-----------+-------+-----------------------------------------------+ 1028 | NOERROR | 0 | RECONFIRM accepted. | 1029 | FORMERR | 1 | Server failed to process request due to a | 1030 | | | malformed request. | 1031 | SERVFAIL | 2 | Server failed to process request due to a | 1032 | | | problem with the server. | 1033 | NXDOMAIN | 3 | NOT APPLICABLE. DNS Push Notification servers | 1034 | | | MUST NOT return NXDOMAIN errors in response | 1035 | | | to RECONFIRM requests. | 1036 | NOTIMP | 4 | Server does not implement DSO. | 1037 | REFUSED | 5 | Server refuses to process request for policy | 1038 | | | or security reasons. | 1039 | NOTAUTH | 9 | Server is not authoritative for the requested | 1040 | | | name. | 1041 | DSOTYPENI | 11 | RECONFIRM operation not supported. | 1042 +-----------+-------+-----------------------------------------------+ 1044 RECONFIRM Response codes 1046 This document specifies only these RCODE values for RECONFIRM 1047 Responses. Servers sending RECONFIRM Responses SHOULD use one of 1048 these values. However, future circumstances may create situations 1049 where other RCODE values are appropriate in RECONFIRM Responses, so 1050 clients MUST be prepared to accept RECONFIRM Responses with any RCODE 1051 value. 1053 Nonzero RCODE values signal some kind of error. 1055 RCODE value FORMERR indicates a message format error, for example 1056 TYPE or CLASS being ANY (255). 1058 RCODE value SERVFAIL indicates that the server has exhausted its 1059 resources or other serious problem occurred. 1061 RCODE values NOTIMP indicates that the server does not support DSO, 1062 and DSO is required for RECONFIRM requests. 1064 RCODE value REFUSED indicates that the server supports RECONFIRM 1065 requests but is currently not configured to accept them from this 1066 client. 1068 RCODE value NOTAUTH indicates that the server is not authoritative 1069 for the requested name, and can do nothing to remedy the apparent 1070 error. Note that there may be future cases in which a server is able 1071 to pass on the RECONFIRM request to the ultimate source of the 1072 information, and in these cases the server should return NOERROR. 1074 RCODE value DSOTYPENI indicates that the server does not support 1075 RECONFIRM requests. 1077 Nonzero RCODE values SERVFAIL, REFUSED and DSOTYPENI are benign from 1078 the client's point of view. The client may log them to aid in 1079 debugging, but otherwise they require no special action. 1081 Nonzero RCODE values other than these three indicate a serious 1082 problem with the client. After sending an error response other than 1083 one of these three, the server SHOULD send a DSO Retry Delay TLV to 1084 end the DSO session, as described in the DSO specification [DSO]. 1086 6.6. Client-Initiated Termination 1088 An individual subscription is terminated by sending an UNSUBSCRIBE 1089 TLV for that specific subscription, or all subscriptions can be 1090 cancelled at once by the client closing the DSO session. When a 1091 client terminates an individual subscription (via UNSUBSCRIBE) or all 1092 subscriptions on that DSO session (by ending the session) it is 1093 signaling to the server that it is longer interested in receiving 1094 those particular updates. It is informing the server that the server 1095 may release any state information it has been keeping with regards to 1096 these particular subscriptions. 1098 After terminating its last subscription on a session via UNSUBSCRIBE, 1099 a client MAY close the session immediately, or it may keep it open if 1100 it anticipates performing further operations on that session in the 1101 future. If a client wishes to keep an idle session open, it MUST 1102 respect the maximum idle time required by the server [DSO]. 1104 If a client plans to terminate one or more subscriptions on a session 1105 and doesn't intend to keep that session open, then as an efficiency 1106 optimization it MAY instead choose to simply close the session, which 1107 implicitly terminates all subscriptions on that session. This may 1108 occur because the client computer is being shut down, is going to 1109 sleep, the application requiring the subscriptions has terminated, or 1110 simply because the last active subscription on that session has been 1111 cancelled. 1113 When closing a session, a client will generally do an abortive 1114 disconnect, sending a TCP RST. This immediately discards all 1115 remaining inbound and outbound data, which is appropriate if the 1116 client no longer has any interest in this data. In the BSD Sockets 1117 API, sending a TCP RST is achieved by setting the SO_LINGER option 1118 with a time of 0 seconds and then closing the socket. 1120 If a client has performed operations on this session that it would 1121 not want lost (like DNS updates) then the client SHOULD do an orderly 1122 disconnect, sending a TLS close_notify followed by a TCP FIN. (In 1123 the BSD Sockets API, sending a TCP FIN is achieved by calling 1124 "shutdown(s,SHUT_WR)" and keeping the socket open until all remaining 1125 data has been read from it.) 1127 7. Security Considerations 1129 The Strict Privacy Usage Profile for DNS over TLS is strongly 1130 recommended for DNS Push Notifications as defined in "Usage Profiles 1131 for DNS over TLS and DNS over DTLS" [RFC8310]. The Opportunistic 1132 Privacy Usage Profile is permissible as a way to support incremental 1133 deployment of security capabilities. Cleartext connections for DNS 1134 Push Notifications are not permissible. 1136 DNSSEC is RECOMMENDED for the authentication of DNS Push Notification 1137 servers. TLS alone does not provide complete security. TLS 1138 certificate verification can provide reasonable assurance that the 1139 client is really talking to the server associated with the desired 1140 host name, but since the desired host name is learned via a DNS SRV 1141 query, if the SRV query is subverted then the client may have a 1142 secure connection to a rogue server. DNSSEC can provided added 1143 confidence that the SRV query has not been subverted. 1145 7.1. Security Services 1147 It is the goal of using TLS to provide the following security 1148 services: 1150 Confidentiality: All application-layer communication is encrypted 1151 with the goal that no party should be able to decrypt it except 1152 the intended receiver. 1154 Data integrity protection: Any changes made to the communication in 1155 transit are detectable by the receiver. 1157 Authentication: An end-point of the TLS communication is 1158 authenticated as the intended entity to communicate with. 1160 Deployment recommendations on the appropriate key lengths and cypher 1161 suites are beyond the scope of this document. Please refer to TLS 1162 Recommendations [RFC7525] for the best current practices. Keep in 1163 mind that best practices only exist for a snapshot in time and 1164 recommendations will continue to change. Updated versions or errata 1165 may exist for these recommendations. 1167 7.2. TLS Name Authentication 1169 As described in Section 6.1, the client discovers the DNS Push 1170 Notification server using an SRV lookup for the record name 1171 "_dns-push-tls._tcp.". The server connection endpoint SHOULD 1172 then be authenticated using DANE TLSA records for the associated SRV 1173 record. This associates the target's name and port number with a 1174 trusted TLS certificate [RFC7673]. This procedure uses the TLS Sever 1175 Name Indication (SNI) extension [RFC6066] to inform the server of the 1176 name the client has authenticated through the use of TLSA records. 1177 Therefore, if the SRV record passes DNSSEC validation and a TLSA 1178 record matching the target name is useable, an SNI extension must be 1179 used for the target name to ensure the client is connecting to the 1180 server it has authenticated. If the target name does not have a 1181 usable TLSA record, then the use of the SNI extension is optional. 1183 See Usage Profiles for DNS over TLS and DNS over DTLS [RFC8310] for 1184 more information on authenticating domain names. Also note that a 1185 DNS Push server is an authoritative server and a DNS Push client is a 1186 standard DNS client. While the terminology in Usage Profiles for DNS 1187 over TLS and DNS over DTLS [RFC8310] explicitly states it does not 1188 apply to authoritative servers, it does in this case apply to DNS 1189 Push Notification clients and servers. 1191 7.3. TLS Compression 1193 In order to reduce the chances of compression-related attacks, TLS- 1194 level compression SHOULD be disabled when using TLS versions 1.2 and 1195 earlier. In TLS 1.3 [RFC8446], TLS-level compression has been 1196 removed completely. 1198 7.4. TLS Session Resumption 1200 TLS Session Resumption is permissible on DNS Push Notification 1201 servers. The server may keep TLS state with Session IDs [RFC5246] or 1202 operate in stateless mode by sending a Session Ticket [RFC5077] to 1203 the client for it to store. However, once the DSO session is closed, 1204 any existing subscriptions will be dropped. When the TLS session is 1205 resumed, the DNS Push Notification server will not have any 1206 subscription state and will proceed as with any other new DSO 1207 session. Use of TLS Session Resumption allows a new TLS connection 1208 to be set up more quickly, but the client will still have to recreate 1209 any desired subscriptions. 1211 8. IANA Considerations 1213 This document defines a new service name to be published in the IANA 1214 Registry Service Types [RFC6335][ST] that is only applicable for the 1215 TCP protocol. 1217 This document also defines four new DNS Stateful Operation TLV types 1218 to be recorded in the IANA DSO Type Code Registry. 1220 +----------------------------+----------------------+---------------+ 1221 | Name | Value | Definition | 1222 +----------------------------+----------------------+---------------+ 1223 | DNS Push Notifcation | "_dns-push-tls._tcp" | Section 6.1 | 1224 | Service Type | | | 1225 | SUBSCRIBE | TBA (tentatively | Section 6.2 | 1226 | | 0x40) | | 1227 | PUSH | TBA (tentatively | Section 6.3.1 | 1228 | | 0x41) | | 1229 | UNSUBSCRIBE | TBA (tentatively | Section 6.4 | 1230 | | 0x42) | | 1231 | RECONFIRM | TBA (tentatively | Section 6.5.1 | 1232 | | 0x43) | | 1233 +----------------------------+----------------------+---------------+ 1235 Table 1: IANA Assignments 1237 9. Acknowledgements 1239 The authors would like to thank Kiren Sekar and Marc Krochmal for 1240 previous work completed in this field. 1242 This draft has been improved due to comments from Ran Atkinson, Tim 1243 Chown, Mark Delany, Ralph Droms, Bernie Volz, Jan Komissar, Manju 1244 Shankar Rao, Markus Stenberg, Dave Thaler, Soraia Zlatkovic, Sara 1245 Dickinson, and Andrew Sullivan. 1247 10. References 1249 10.1. Normative References 1251 [DSO] Bellis, R., Cheshire, S., Dickinson, J., Dickinson, S., 1252 Lemon, T., and T. Pusateri, "DNS Stateful Operations", 1253 draft-ietf-dnsop-session-signal-14 (work in progress), 1254 August 2018. 1256 [RFC0768] Postel, J., "User Datagram Protocol", STD 6, RFC 768, 1257 DOI 10.17487/RFC0768, August 1980, 1258 . 1260 [RFC0793] Postel, J., "Transmission Control Protocol", STD 7, 1261 RFC 793, DOI 10.17487/RFC0793, September 1981, 1262 . 1264 [RFC1034] Mockapetris, P., "Domain names - concepts and facilities", 1265 STD 13, RFC 1034, DOI 10.17487/RFC1034, November 1987, 1266 . 1268 [RFC1035] Mockapetris, P., "Domain names - implementation and 1269 specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, 1270 November 1987, . 1272 [RFC1123] Braden, R., Ed., "Requirements for Internet Hosts - 1273 Application and Support", STD 3, RFC 1123, 1274 DOI 10.17487/RFC1123, October 1989, 1275 . 1277 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1278 Requirement Levels", BCP 14, RFC 2119, 1279 DOI 10.17487/RFC2119, March 1997, 1280 . 1282 [RFC2136] Vixie, P., Ed., Thomson, S., Rekhter, Y., and J. Bound, 1283 "Dynamic Updates in the Domain Name System (DNS UPDATE)", 1284 RFC 2136, DOI 10.17487/RFC2136, April 1997, 1285 . 1287 [RFC2782] Gulbrandsen, A., Vixie, P., and L. Esibov, "A DNS RR for 1288 specifying the location of services (DNS SRV)", RFC 2782, 1289 DOI 10.17487/RFC2782, February 2000, 1290 . 1292 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 1293 (TLS) Protocol Version 1.2", RFC 5246, 1294 DOI 10.17487/RFC5246, August 2008, 1295 . 1297 [RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS) 1298 Extensions: Extension Definitions", RFC 6066, 1299 DOI 10.17487/RFC6066, January 2011, 1300 . 1302 [RFC6335] Cotton, M., Eggert, L., Touch, J., Westerlund, M., and S. 1303 Cheshire, "Internet Assigned Numbers Authority (IANA) 1304 Procedures for the Management of the Service Name and 1305 Transport Protocol Port Number Registry", BCP 165, 1306 RFC 6335, DOI 10.17487/RFC6335, August 2011, 1307 . 1309 [RFC6895] Eastlake 3rd, D., "Domain Name System (DNS) IANA 1310 Considerations", BCP 42, RFC 6895, DOI 10.17487/RFC6895, 1311 April 2013, . 1313 [RFC7673] Finch, T., Miller, M., and P. Saint-Andre, "Using DNS- 1314 Based Authentication of Named Entities (DANE) TLSA Records 1315 with SRV Records", RFC 7673, DOI 10.17487/RFC7673, October 1316 2015, . 1318 [RFC7766] Dickinson, J., Dickinson, S., Bellis, R., Mankin, A., and 1319 D. Wessels, "DNS Transport over TCP - Implementation 1320 Requirements", RFC 7766, DOI 10.17487/RFC7766, March 2016, 1321 . 1323 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 1324 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 1325 May 2017, . 1327 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 1328 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 1329 . 1331 [ST] "Service Name and Transport Protocol Port Number 1332 Registry", . 1335 10.2. Informative References 1337 [DisProx] Cheshire, S., "Discovery Proxy for Multicast DNS-Based 1338 Service Discovery", draft-ietf-dnssd-hybrid-08 (work in 1339 progress), March 2018. 1341 [I-D.dukkipati-tcpm-tcp-loss-probe] 1342 Dukkipati, N., Cardwell, N., Cheng, Y., and M. Mathis, 1343 "Tail Loss Probe (TLP): An Algorithm for Fast Recovery of 1344 Tail Losses", draft-dukkipati-tcpm-tcp-loss-probe-01 (work 1345 in progress), February 2013. 1347 [LLQ] Sekar, K., "DNS Long-Lived Queries", draft-sekar-dns- 1348 llq-01 (work in progress), August 2006. 1350 [obs] "Observer Pattern", 1351 . 1353 [RFC2308] Andrews, M., "Negative Caching of DNS Queries (DNS 1354 NCACHE)", RFC 2308, DOI 10.17487/RFC2308, March 1998, 1355 . 1357 [RFC4287] Nottingham, M., Ed. and R. Sayre, Ed., "The Atom 1358 Syndication Format", RFC 4287, DOI 10.17487/RFC4287, 1359 December 2005, . 1361 [RFC4953] Touch, J., "Defending TCP Against Spoofing Attacks", 1362 RFC 4953, DOI 10.17487/RFC4953, July 2007, 1363 . 1365 [RFC5077] Salowey, J., Zhou, H., Eronen, P., and H. Tschofenig, 1366 "Transport Layer Security (TLS) Session Resumption without 1367 Server-Side State", RFC 5077, DOI 10.17487/RFC5077, 1368 January 2008, . 1370 [RFC6281] Cheshire, S., Zhu, Z., Wakikawa, R., and L. Zhang, 1371 "Understanding Apple's Back to My Mac (BTMM) Service", 1372 RFC 6281, DOI 10.17487/RFC6281, June 2011, 1373 . 1375 [RFC6762] Cheshire, S. and M. Krochmal, "Multicast DNS", RFC 6762, 1376 DOI 10.17487/RFC6762, February 2013, 1377 . 1379 [RFC6763] Cheshire, S. and M. Krochmal, "DNS-Based Service 1380 Discovery", RFC 6763, DOI 10.17487/RFC6763, February 2013, 1381 . 1383 [RFC6824] Ford, A., Raiciu, C., Handley, M., and O. Bonaventure, 1384 "TCP Extensions for Multipath Operation with Multiple 1385 Addresses", RFC 6824, DOI 10.17487/RFC6824, January 2013, 1386 . 1388 [RFC7413] Cheng, Y., Chu, J., Radhakrishnan, S., and A. Jain, "TCP 1389 Fast Open", RFC 7413, DOI 10.17487/RFC7413, December 2014, 1390 . 1392 [RFC7525] Sheffer, Y., Holz, R., and P. Saint-Andre, 1393 "Recommendations for Secure Use of Transport Layer 1394 Security (TLS) and Datagram Transport Layer Security 1395 (DTLS)", BCP 195, RFC 7525, DOI 10.17487/RFC7525, May 1396 2015, . 1398 [RFC7719] Hoffman, P., Sullivan, A., and K. Fujiwara, "DNS 1399 Terminology", RFC 7719, DOI 10.17487/RFC7719, December 1400 2015, . 1402 [RFC7858] Hu, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D., 1403 and P. Hoffman, "Specification for DNS over Transport 1404 Layer Security (TLS)", RFC 7858, DOI 10.17487/RFC7858, May 1405 2016, . 1407 [RFC8010] Sweet, M. and I. McDonald, "Internet Printing 1408 Protocol/1.1: Encoding and Transport", STD 92, RFC 8010, 1409 DOI 10.17487/RFC8010, January 2017, 1410 . 1412 [RFC8011] Sweet, M. and I. McDonald, "Internet Printing 1413 Protocol/1.1: Model and Semantics", STD 92, RFC 8011, 1414 DOI 10.17487/RFC8011, January 2017, 1415 . 1417 [RFC8310] Dickinson, S., Gillmor, D., and T. Reddy, "Usage Profiles 1418 for DNS over TLS and DNS over DTLS", RFC 8310, 1419 DOI 10.17487/RFC8310, March 2018, 1420 . 1422 [SYN] Eddy, W., "Defenses Against TCP SYN Flooding Attacks", The 1423 Internet Protocol Journal, Cisco Systems, Volume 9, 1424 Number 4, December 2006. 1426 [XEP0060] Millard, P., Saint-Andre, P., and R. Meijer, "Publish- 1427 Subscribe", XSF XEP 0060, July 2010. 1429 Authors' Addresses 1431 Tom Pusateri 1432 Unaffiliated 1433 Raleigh, NC 27608 1434 USA 1436 Phone: +1 919 867 1330 1437 Email: pusateri@bangj.com 1439 Stuart Cheshire 1440 Apple Inc. 1441 1 Infinite Loop 1442 Cupertino, CA 95014 1443 USA 1445 Phone: +1 408 974 3207 1446 Email: cheshire@apple.com