idnits 2.17.1 draft-ietf-dnssd-push-14.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 (March 18, 2018) is 2228 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-05 == Outdated reference: A later version (-28) exists of draft-ietf-tls-tls13-26 ** 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 (~~), 6 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: September 19, 2018 Apple Inc. 6 March 18, 2018 8 DNS Push Notifications 9 draft-ietf-dnssd-push-14 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 September 19, 2018. 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", 103 and "OPTIONAL" in this document are to be interpreted as described 104 in "Key words for use in RFCs to Indicate Requirement Levels", 105 when, and only when, they appear in all capitals, as shown here 106 [RFC2119] [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 168 of generating the correct change notifications for a name. 169 It may be a master, slave, or stealth name server [RFC7719]. 170 Consequently, the "_dns-push-tls._tcp." SRV record for a 171 zone MAY reference 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 Queries. 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 defaults, 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. 331 Once the session is made, the client may then add and remove Push 332 Notification subscriptions. In accordance with the current set of 333 active subscriptions the server sends relevant asynchronous Push 334 Notifications to the client. Note that a client MUST be prepared to 335 receive (and silently ignore) Push Notifications for subscriptions it 336 has previously removed, since there is no way to prevent the 337 situation where a Push Notification is in flight from server to 338 client while the client's UNSUBSCRIBE message cancelling that 339 subscription is simultaneously in flight from 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 does not offer DNS Push Notifications 420 then SRV record MUST NOT exist, and the SRV query will return a 421 negative answer. (The "_dns-push-tls._tcp" service type is 422 allocated by IANA for this purpose, and, like any allocated IANA 423 service type, MUST NOT be used for other services. Other 424 services that require an IANA service type should use a unique 425 service type allocated by IANA for that service [RFC6335][ST].) 427 7. If the zone in question is set up to offer DNS Push Notifications 428 then this SRV record MUST exist. (If this SRV record does not 429 exist then the zone is not correctly configured for DNS Push 430 Notifications as specified in this document.) The SRV "target" 431 contains the name of the server providing DNS Push Notifications 432 for the zone. The port number on which to contact the server is 433 in the SRV record "port" field. The address(es) of the target 434 host MAY be included in the Additional Section, however, the 435 address records SHOULD be authenticated before use as described 436 below in Section 7.2 and in the specification for using DANE TLSA 437 Records with SRV Records [RFC7673]. 439 8. More than one SRV record may be returned. In this case, the 440 "priority" and "weight" values in the returned SRV records are 441 used to determine the order in which to contact the servers for 442 subscription requests. As described in the SRV specification 443 [RFC2782], the server with the lowest "priority" is first 444 contacted. If more than one server has the same "priority", the 445 "weight" indicates the weighted probability that the client 446 should contact that server. Higher weights have higher 447 probabilities of being selected. If a server is not willing to 448 accept a subscription request, or is not reachable within a 449 reasonable time, as determined by the client, then a subsequent 450 server is to be contacted. 452 Each time a client makes a new DNS Push Notification subscription 453 session, it SHOULD repeat the discovery process in order to determine 454 the preferred DNS server for subscriptions at that time. However, 455 the client device MUST respect the DNS TTL values on records it 456 receives, and store them in its local cache with this lifetime. This 457 means that, as long as the DNS TTL values on the authoritative 458 records were set to reasonable values, repeated application of this 459 discovery process can be completed nearly instantaneously by the 460 client, using only locally-stored cached data. 462 6.2. DNS Push Notification SUBSCRIBE 464 After connecting, and requesting a longer idle timeout and/or 465 keepalive interval if necessary, a DNS Push Notification client then 466 indicates its desire to receive DNS Push Notifications for a given 467 domain name by sending a SUBSCRIBE request over the established DSO 468 session to the server. A SUBSCRIBE request is encoded in a DSO [DSO] 469 message. This specification defines a DSO TLV for DNS Push 470 Notification SUBSCRIBE Requests/Responses (tentatively DSO Type Code 471 0x40). 473 The entity that initiates a SUBSCRIBE request is by definition the 474 client. A server MUST NOT send a SUBSCRIBE request over an existing 475 session from a client. If a server does send a SUBSCRIBE request 476 over a DSO session initiated by a client, this is a fatal error and 477 the client should immediately abort the connection with a TCP RST (or 478 equivalent for other protocols). 480 6.2.1. SUBSCRIBE Request 482 A SUBSCRIBE request begins with the standard DSO 12-byte header 483 [DSO], followed by the SUBSCRIBE TLV. A SUBSCRIBE request message is 484 illustrated in Figure 1. 486 The MESSAGE ID field MUST be set to a unique value, that the client 487 is not using for any other active operation on this session. For the 488 purposes here, a MESSAGE ID is in use on this session if the client 489 has used it in a request for which it has not yet received a 490 response, or if the client has used it for a subscription which it 491 has not yet cancelled using UNSUBSCRIBE. In the SUBSCRIBE response 492 the server MUST echo back the MESSAGE ID value unchanged. 494 The other header fields MUST be set as described in the DSO 495 specification [DSO]. The DNS Opcode is the DSO Opcode (tentatively 496 6). The four count fields MUST be zero, and the corresponding four 497 sections MUST be empty (i.e., absent). 499 The DSO-TYPE is SUBSCRIBE (tentatively 0x40). The DSO-LENGTH is the 500 length of the DSO-DATA that follows, which specifies the name, type, 501 and class of the record(s) being sought. 503 1 1 1 1 1 1 504 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 505 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ \ 506 | MESSAGE ID | \ 507 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 508 |QR| Opcode | Z | RCODE | | 509 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 510 | QDCOUNT (MUST BE ZERO) | | 511 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ > HEADER 512 | ANCOUNT (MUST BE ZERO) | | 513 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 514 | NSCOUNT (MUST BE ZERO) | | 515 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 516 | ARCOUNT (MUST BE ZERO) | / 517 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / 518 | DSO-TYPE = SUBSCRIBE (tentatively 0x40) | 519 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 520 | DSO-LENGTH (number of octets in DSO-DATA) | 521 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ \ 522 | | \ 523 \ NAME \ | 524 \ \ | 525 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ > DSO-DATA 526 | TYPE | | 527 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 528 | CLASS | / 529 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / 531 Figure 1: SUBSCRIBE Request 533 The DSO-DATA for a SUBSCRIBE request MUST contain exactly one 534 question. The DSO-DATA for a SUBSCRIBE request has no QDCOUNT field 535 to specify more than one question. Since SUBSCRIBE requests are sent 536 over TCP, multiple SUBSCRIBE request messages can be concatenated in 537 a single TCP stream and packed efficiently into TCP segments. 539 If accepted, the subscription will stay in effect until the client 540 cancels the subscription using UNSUBSCRIBE or until the DSO session 541 between the client and the server is closed. 543 SUBSCRIBE requests on a given session MUST be unique. A client MUST 544 NOT send a SUBSCRIBE message that duplicates the NAME, TYPE and CLASS 545 of an existing active subscription on that DSO session. For the 546 purpose of this matching, the established DNS case-insensitivity for 547 US-ASCII letters applies (e.g., "example.com" and "Example.com" are 548 the same). If a server receives such a duplicate SUBSCRIBE message 549 this is an error and the server MUST immediately terminate the 550 connection with a TCP RST (or equivalent for other protocols). 552 DNS wildcarding is not supported. That is, a wildcard ("*") in a 553 SUBSCRIBE message matches only a literal wildcard character ("*") in 554 the zone, and nothing else. 556 Aliasing is not supported. That is, a CNAME in a SUBSCRIBE message 557 matches only a literal CNAME record in the zone, and nothing else. 559 A client may SUBSCRIBE to records that are unknown to the server at 560 the time of the request (providing that the name falls within one of 561 the zone(s) the server is responsible for) and this is not an error. 562 The server MUST accept these requests and send Push Notifications if 563 and when matching records are found in the future. 565 If neither TYPE nor CLASS are ANY (255) then this is a specific 566 subscription to changes for the given NAME, TYPE and CLASS. If one 567 or both of TYPE or CLASS are ANY (255) then this subscription matches 568 any type and/or any class, as appropriate. 570 NOTE: A little-known quirk of DNS is that in DNS QUERY requests, 571 QTYPE and QCLASS 255 mean "ANY" not "ALL". They indicate that the 572 server should respond with ANY matching records of its choosing, not 573 necessarily ALL matching records. This can lead to some surprising 574 and unexpected results, where a query returns some valid answers but 575 not all of them, and makes QTYPE=ANY queries less useful than people 576 sometimes imagine. 578 When used in conjunction with SUBSCRIBE, TYPE and CLASS 255 should be 579 interpreted to mean "ALL", not "ANY". After accepting a subscription 580 where one or both of TYPE or CLASS are 255, the server MUST send Push 581 Notification Updates for ALL record changes that match the 582 subscription, not just some of them. 584 6.2.2. SUBSCRIBE Response 586 Each SUBSCRIBE request generates exactly one SUBSCRIBE response from 587 the server. 589 A SUBSCRIBE response message begins with the standard DSO 12-byte 590 header [DSO], possibly followed by one or more optional TLVs, such as 591 a Retry Delay TLV. 593 The MESSAGE ID field MUST echo the value given in the ID field of the 594 SUBSCRIBE request. This is how the client knows which request is 595 being responded to. 597 A SUBSCRIBE response message MUST NOT include a SUBSCRIBE TLV. If a 598 client receives a SUBSCRIBE response message containing a SUBSCRIBE 599 TLV then the response message is processed but the SUBSCRIBE TLV MUST 600 be silently ignored. 602 In the SUBSCRIBE response the RCODE indicates whether or not the 603 subscription was accepted. Supported RCODEs are as follows: 605 +-----------+-------+-----------------------------------------------+ 606 | Mnemonic | Value | Description | 607 +-----------+-------+-----------------------------------------------+ 608 | NOERROR | 0 | SUBSCRIBE successful. | 609 | FORMERR | 1 | Server failed to process request due to a | 610 | | | malformed request. | 611 | SERVFAIL | 2 | Server failed to process request due to a | 612 | | | problem with the server. | 613 | NXDOMAIN | 3 | NOT APPLICABLE. DNS Push Notification servers | 614 | | | MUST NOT return NXDOMAIN errors in response | 615 | | | to SUBSCRIBE requests. | 616 | NOTIMP | 4 | Server does not implement DSO. | 617 | REFUSED | 5 | Server refuses to process request for policy | 618 | | | or security reasons. | 619 | NOTAUTH | 9 | Server is not authoritative for the requested | 620 | | | name. | 621 | DSOTYPENI | 11 | SUBSCRIBE operation not supported. | 622 +-----------+-------+-----------------------------------------------+ 624 SUBSCRIBE Response codes 626 This document specifies only these RCODE values for SUBSCRIBE 627 Responses. Servers sending SUBSCRIBE Responses SHOULD use one of 628 these values. However, future circumstances may create situations 629 where other RCODE values are appropriate in SUBSCRIBE Responses, so 630 clients MUST be prepared to accept SUBSCRIBE Responses with any RCODE 631 value. 633 If the server sends a nonzero RCODE in the SUBSCRIBE response, that 634 means (a) the client is (at least partially) misconfigured, (b) the 635 server resources are exhausted, or (c) there is some other unknown 636 failure on the server. In any case, the client shouldn't retry the 637 subscription right away. Either end can terminate the session, but 638 the client may want to try this subscription again, or it may have 639 other successful subscriptions that it doesn't want to abandon. If 640 the server sends a nonzero RCODE then it SHOULD append a Retry Delay 641 TLV [DSO] to the response specifying a delay before the client 642 attempts this operation again. Recommended values for the delay for 643 different RCODE values are given below. These recommended values 644 apply both to the default values a server should place in the Retry 645 Delay TLV, and the default values a client should assume if the 646 server provides no Retry Delay TLV. 648 For RCODE = 1 (FORMERR) the delay may be any value selected by the 649 implementer. A value of five minutes is RECOMMENDED, to reduce 650 the risk of high load from defective clients. 652 For RCODE = 2 (SERVFAIL) the delay should be chosen according to 653 the level of server overload and the anticipated duration of that 654 overload. By default, a value of one minute is RECOMMENDED. If a 655 more serious server failure occurs, the delay may be longer in 656 accordance with the specific problem encountered. 658 For RCODE = 4 (NOTIMP), which occurs on a server that doesn't 659 implement DSO [DSO], it is unlikely that the server will begin 660 supporting DSO in the next few minutes, so the retry delay SHOULD 661 be one hour. Note that in such a case, a server that doesn't 662 implement DSO is unlikely to place a Retry Delay TLV in its 663 response, so this recommended value in particular applies to what 664 a client should assume by default. 666 For RCODE = 5 (REFUSED), which occurs on a server that implements 667 DNS Push Notifications, but is currently configured to disallow 668 DNS Push Notifications, the retry delay may be any value selected 669 by the implementer and/or configured by the operator. 670 This is a misconfiguration, since this server is listed in a 671 "_dns-push-tls._tcp." SRV record, but the server itself is 672 not currently configured to support DNS Push Notifications. Since 673 it is possible that the misconfiguration may be repaired at any 674 time, the retry delay should not be set too high. By default, a 675 value of 5 minutes is RECOMMENDED. 677 For RCODE = 9 (NOTAUTH), which occurs on a server that implements 678 DNS Push Notifications, but is not configured to be authoritative 679 for the requested name, the retry delay may be any value selected 680 by the implementer and/or configured by the operator. 682 This is a misconfiguration, since this server is listed in a 683 "_dns-push-tls._tcp." SRV record, but the server itself is 684 not currently configured to support DNS Push Notifications for 685 that zone. Since it is possible that the misconfiguration may be 686 repaired at any time, the retry delay should not be set too high. 687 By default, a value of 5 minutes is RECOMMENDED. 689 For RCODE = 11 (DNS Push SUBSCRIBE operation not supported), which 690 occurs on a server that doesn't implement DNS Push Notifications, 691 it is unlikely that the server will begin supporting DNS Push 692 Notifications in the next few minutes, so the retry delay SHOULD 693 be one hour. 695 For other RCODE values, the retry delay should be set by the 696 server as appropriate for that error condition. By default, a 697 value of 5 minutes is RECOMMENDED. 699 For RCODE = 9 (NOTAUTH), the time delay applies to requests for other 700 names falling within the same zone. Requests for names falling 701 within other zones are not subject to the delay. For all other 702 RCODEs the time delay applies to all subsequent requests to this 703 server. 705 After sending an error response the server MAY allow the session to 706 remain open, or MAY send a DNS Push Notification Retry Delay 707 Operation TLV instructing the client to close the session, as 708 described in the DSO specification [DSO]. Clients MUST correctly 709 handle both cases. 711 6.3. DNS Push Notification Updates 713 Once a subscription has been successfully established, the server 714 generates PUSH messages to send to the client as appropriate. In the 715 case that the answer set was non-empty at the moment the subscription 716 was established, an initial PUSH message will be sent immediately 717 following the SUBSCRIBE Response. Subsequent changes to the answer 718 set are then communicated to the client in subsequent PUSH messages. 720 6.3.1. PUSH Message 722 A PUSH message begins with the standard DSO 12-byte header [DSO], 723 followed by the PUSH TLV. A PUSH message is illustrated in Figure 2. 725 The MESSAGE ID field MUST be zero. There is no client response to a 726 PUSH message. 728 The other header fields MUST be set as described in the DSO 729 specification [DSO]. The DNS Opcode is the DSO Opcode (tentatively 730 6). The four count fields MUST be zero, and the corresponding four 731 sections MUST be empty (i.e., absent). 733 The DSO-TYPE is PUSH (tentatively 0x41). The DSO-LENGTH is the 734 length of the DSO-DATA that follows, which specifies the changes 735 being communicated. 737 The DSO-DATA contains one or more Update records. A PUSH Message 738 MUST contain at least one Update record. If a PUSH Message is 739 received that contains no Update records, this is a fatal error, and 740 the receiver MUST immediately terminate the connection with a TCP RST 741 (or equivalent for other protocols). The Update records are 742 formatted in the customary way for Resource Records in DNS messages. 743 Update records in a PUSH Message are interpreted according to the 744 same rules as for DNS Update [RFC2136] messages, namely: 746 Delete all RRsets from a name: 747 TTL=0, CLASS=ANY, RDLENGTH=0, TYPE=ANY. 749 Delete an RRset from a name: 750 TTL=0, CLASS=ANY, RDLENGTH=0; 751 TYPE specifies the RRset being deleted. 753 Delete an individual RR from a name: 754 TTL=0, CLASS=NONE; 755 TYPE, RDLENGTH and RDATA specifies the RR being deleted. 757 Add to an RRset: 758 TTL, CLASS, TYPE, RDLENGTH and RDATA specifies the RR being added. 760 1 1 1 1 1 1 761 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 762 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ \ 763 | MESSAGE ID | \ 764 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 765 |QR| Opcode | Z | RCODE | | 766 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 767 | QDCOUNT (MUST BE ZERO) | | 768 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ > HEADER 769 | ANCOUNT (MUST BE ZERO) | | 770 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 771 | NSCOUNT (MUST BE ZERO) | | 772 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 773 | ARCOUNT (MUST BE ZERO) | / 774 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / 775 | DSO-TYPE = PUSH (tentatively 0x41) | 776 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 777 | DSO-LENGTH (number of octets in DSO-DATA) | 778 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ \ 779 \ NAME \ \ 780 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 781 | TYPE | | 782 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 783 | CLASS | | 784 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 785 | TTL | | 786 | (32 bits) | > DSO-DATA 787 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 788 | RDLEN | | 789 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 790 \ RDATA \ | 791 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 792 : NAME, TYPE, CLASS, TTL, RDLEN, RDATA : | 793 : Repeated As Necessary : / 794 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / 796 Figure 2: PUSH Message 798 When processing the records received in a PUSH Message, the receiving 799 client MUST validate that the records being added or deleted 800 correspond with at least one currently active subscription on that 801 session. Specifically, the record name MUST match the name given in 802 the SUBSCRIBE request, subject to the usual established DNS case- 803 insensitivity for US-ASCII letters. If the TYPE in the SUBSCRIBE 804 request was not ANY (255) then the TYPE of the record must match the 805 TYPE given in the SUBSCRIBE request. If the CLASS in the SUBSCRIBE 806 request was not ANY (255) then the CLASS of the record must match the 807 CLASS given in the SUBSCRIBE request. If a matching active 808 subscription on that session is not found, then that individual 809 record addition/deletion is silently ignored. Processing of other 810 additions and deletions in this message is not affected. The DSO 811 session is not closed. This is to allow for the unavoidable race 812 condition where a client sends an outbound UNSUBSCRIBE while inbound 813 PUSH messages for that subscription from the server are still in 814 flight. 816 In the case where a single change affects more than one active 817 subscription, only one PUSH message is sent. For example, a PUSH 818 message adding a given record may match both a SUBSCRIBE request with 819 the same TYPE and a different SUBSCRIBE request with TYPE=ANY. It is 820 not the case that two PUSH messages are sent because the new record 821 matches two active subscriptions. 823 The server SHOULD encode change notifications in the most efficient 824 manner possible. For example, when three AAAA records are deleted 825 from a given name, and no other AAAA records exist for that name, the 826 server SHOULD send a "delete an RRset from a name" PUSH message, not 827 three separate "delete an individual RR from a name" PUSH messages. 828 Similarly, when both an SRV and a TXT record are deleted from a given 829 name, and no other records of any kind exist for that name, the 830 server SHOULD send a "delete all RRsets from a name" PUSH message, 831 not two separate "delete an RRset from a name" PUSH messages. 833 A server SHOULD combine multiple change notifications in a single 834 PUSH message when possible, even if those change notifications apply 835 to different subscriptions. Conceptually, a PUSH message is a 836 session-level mechanism, not a subscription-level mechanism. 838 The TTL of an added record is stored by the client and decremented as 839 time passes, with the caveat that for as long as a relevant 840 subscription is active, the TTL does not decrement below 1 second. 841 For as long as a relevant subscription remains active, the client 842 SHOULD assume that when a record goes away the server will notify it 843 of that fact. Consequently, a client does not have to poll to verify 844 that the record is still there. Once a subscription is cancelled 845 (individually, or as a result of the DSO session being closed) record 846 aging resumes and records are removed from the local cache when their 847 TTL reaches zero. 849 6.4. DNS Push Notification UNSUBSCRIBE 851 To cancel an individual subscription without closing the entire DSO 852 session, the client sends an UNSUBSCRIBE message over the established 853 DSO session to the server. The UNSUBSCRIBE message is encoded in a 854 DSO [DSO] message. This specification defines a DSO TLV for DNS Push 855 Notification UNSUBSCRIBE Requests/Responses (tentatively DSO Type 856 Code 0x42). 858 A server MUST NOT initiate an UNSUBSCRIBE request. If a server does 859 send an UNSUBSCRIBE request over a DSO session initiated by a client, 860 this is a fatal error and the client should immediately abort the 861 connection with a TCP RST (or equivalent for other protocols). 863 6.4.1. UNSUBSCRIBE Request 865 An UNSUBSCRIBE request begins with the standard DSO 12-byte header 866 [DSO], followed by the UNSUBSCRIBE TLV. An UNSUBSCRIBE request 867 message is illustrated in Figure 3. 869 The MESSAGE ID field MUST be zero. There is no server response to a 870 UNSUBSCRIBE message. 872 The other header fields MUST be set as described in the DSO 873 specification [DSO]. The DNS Opcode is the DSO Opcode (tentatively 874 6). The four count fields MUST be zero, and the corresponding four 875 sections MUST be empty (i.e., absent). 877 In the UNSUBSCRIBE TLV the DSO-TYPE is UNSUBSCRIBE (tentatively 878 0x42). The DSO-LENGTH is 2 octets. 880 The DSO-DATA contains the MESSAGE ID field of the value given in the 881 ID field of an active SUBSCRIBE request. This is how the server 882 knows which SUBSCRIBE request is being cancelled. After receipt of 883 the UNSUBSCRIBE request, the SUBSCRIBE request is no longer active. 885 It is allowable for the client to issue an UNSUBSCRIBE request for a 886 previous SUBSCRIBE request for which the client has not yet received 887 a SUBSCRIBE response. This is to allow for the case where a client 888 starts and stops a subscription in less than the round-trip time to 889 the server. The client is NOT required to wait for the SUBSCRIBE 890 response before issuing the UNSUBSCRIBE request. 892 1 1 1 1 1 1 893 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 894 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ \ 895 | MESSAGE ID | \ 896 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 897 |QR| Opcode | Z | RCODE | | 898 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 899 | QDCOUNT (MUST BE ZERO) | | 900 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ > HEADER 901 | ANCOUNT (MUST BE ZERO) | | 902 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 903 | NSCOUNT (MUST BE ZERO) | | 904 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 905 | ARCOUNT (MUST BE ZERO) | / 906 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / 907 | DSO-TYPE = UNSUBSCRIBE (tentatively 0x42) | 908 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 909 | DSO-LENGTH (2 octets) | 910 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ \ 911 | SUBSCRIBE MESSAGE ID | > DSO-DATA 912 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / 914 Figure 3: UNSUBSCRIBE Request 916 6.5. DNS Push Notification RECONFIRM 918 Sometimes, particularly when used with a Discovery Proxy [DisProx], a 919 DNS Zone may contain stale data. When a client encounters data that 920 it believe may be stale (e.g., an SRV record referencing a target 921 host+port that is not responding to connection requests) the client 922 can send a RECONFIRM request to ask the server to re-verify that the 923 data is still valid. For a Discovery Proxy, this causes it to issue 924 new Multicast DNS requests to ascertain whether the target device is 925 still present. For other types of DNS server, the RECONFIRM 926 operation is currently undefined, and SHOULD result in a NOERROR 927 response, but otherwise need not cause any action to occur. Frequent 928 RECONFIRM operations may be a sign of network unreliability, or some 929 kind of misconfiguration, so RECONFIRM operations MAY be logged or 930 otherwise communicated to a human administrator to assist in 931 detecting, and remedying, such network problems. 933 If, after receiving a valid RECONFIRM request, the server determines 934 that the disputed records are in fact no longer valid, then 935 subsequent DNS PUSH Messages will be generated to inform interested 936 clients. Thus, one client discovering that a previously-advertised 937 device (like a network printer) is no longer present has the side 938 effect of informing all other interested clients that the device in 939 question is now gone. 941 6.5.1. RECONFIRM Request 943 A RECONFIRM request begins with the standard DSO 12-byte header 944 [DSO], followed by the RECONFIRM TLV. A RECONFIRM request message is 945 illustrated in Figure 4. 947 The MESSAGE ID field MUST be set to a unique value, that the client 948 is not using for any other active operation on this DSO session. For 949 the purposes here, a MESSAGE ID is in use on this session if the 950 client has used it in a request for which it has not yet received a 951 response, or if the client has used it for a subscription which it 952 has not yet cancelled using UNSUBSCRIBE. In the RECONFIRM response 953 the server MUST echo back the MESSAGE ID value unchanged. 955 The other header fields MUST be set as described in the DSO 956 specification [DSO]. The DNS Opcode is the DSO Opcode (tentatively 957 6). The four count fields MUST be zero, and the corresponding four 958 sections MUST be empty (i.e., absent). 960 The DSO-TYPE is RECONFIRM (tentatively 0x43). The DSO-LENGTH is the 961 length of the data that follows, which specifies the name, type, 962 class, and content of the record being disputed. 964 1 1 1 1 1 1 965 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 966 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ \ 967 | MESSAGE ID | \ 968 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 969 |QR| Opcode | Z | RCODE | | 970 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 971 | QDCOUNT (MUST BE ZERO) | | 972 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ > HEADER 973 | ANCOUNT (MUST BE ZERO) | | 974 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 975 | NSCOUNT (MUST BE ZERO) | | 976 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 977 | ARCOUNT (MUST BE ZERO) | / 978 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / 979 | DSO-TYPE = RECONFIRM (tentatively 0x43) | 980 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 981 | DSO-LENGTH (number of octets in DSO-DATA) | 982 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ \ 983 \ NAME \ \ 984 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 985 | TYPE | | 986 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ > DSO-DATA 987 | CLASS | | 988 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 989 \ RDATA \ / 990 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / 992 Figure 4: RECONFIRM Request 994 The DSO-DATA for a RECONFIRM request MUST contain exactly one record. 995 The DSO-DATA for a RECONFIRM request has no count field to specify 996 more than one record. Since RECONFIRM requests are sent over TCP, 997 multiple RECONFIRM request messages can be concatenated in a single 998 TCP stream and packed efficiently into TCP segments. 1000 TYPE MUST NOT be the value ANY (255) and CLASS MUST NOT be the value 1001 ANY (255). 1003 DNS wildcarding is not supported. That is, a wildcard ("*") in a 1004 RECONFIRM message matches only a literal wildcard character ("*") in 1005 the zone, and nothing else. 1007 Aliasing is not supported. That is, a CNAME in a RECONFIRM message 1008 matches only a literal CNAME record in the zone, and nothing else. 1010 6.5.2. RECONFIRM Response 1012 Each RECONFIRM request generates exactly one RECONFIRM response from 1013 the server. 1015 A RECONFIRM response message begins with the standard DSO 12-byte 1016 header [DSO], possibly followed by one or more optional TLVs, such as 1017 a Retry Delay TLV. For suggested values for the Retry Delay TLV, see 1018 Section 6.2.2. 1020 The MESSAGE ID field MUST echo the value given in the ID field of the 1021 RECONFIRM request. This is how the client knows which request is 1022 being responded to. 1024 A RECONFIRM response message MUST NOT include a DSO RECONFIRM TLV. 1025 If a client receives a RECONFIRM response message containing a 1026 RECONFIRM TLV then the response message is processed but the 1027 RECONFIRM TLV MUST be silently ignored. 1029 In the RECONFIRM response the RCODE confirms receipt of the 1030 reconfirmation request. Supported RCODEs are as follows: 1032 +-----------+-------+-----------------------------------------------+ 1033 | Mnemonic | Value | Description | 1034 +-----------+-------+-----------------------------------------------+ 1035 | NOERROR | 0 | RECONFIRM accepted. | 1036 | FORMERR | 1 | Server failed to process request due to a | 1037 | | | malformed request. | 1038 | SERVFAIL | 2 | Server failed to process request due to a | 1039 | | | problem with the server. | 1040 | NXDOMAIN | 3 | NOT APPLICABLE. DNS Push Notification servers | 1041 | | | MUST NOT return NXDOMAIN errors in response | 1042 | | | to RECONFIRM requests. | 1043 | NOTIMP | 4 | Server does not implement DSO. | 1044 | REFUSED | 5 | Server refuses to process request for policy | 1045 | | | or security reasons. | 1046 | NOTAUTH | 9 | Server is not authoritative for the requested | 1047 | | | name. | 1048 | DSOTYPENI | 11 | RECONFIRM operation not supported. | 1049 +-----------+-------+-----------------------------------------------+ 1051 RECONFIRM Response codes 1053 This document specifies only these RCODE values for RECONFIRM 1054 Responses. Servers sending RECONFIRM Responses SHOULD use one of 1055 these values. However, future circumstances may create situations 1056 where other RCODE values are appropriate in RECONFIRM Responses, so 1057 clients MUST be prepared to accept RECONFIRM Responses with any RCODE 1058 value. 1060 Nonzero RCODE values signal some kind of error. 1062 RCODE value FORMERR indicates a message format error, for example 1063 TYPE or CLASS being ANY (255). 1065 RCODE value SERVFAIL indicates that the server has exhausted its 1066 resources or other serious problem occurred. 1068 RCODE values NOTIMP indicates that the server does not support DSO, 1069 and DSO is required for RECONFIRM requests. 1071 RCODE value REFUSED indicates that the server supports RECONFIRM 1072 requests but is currently not configured to accept them from this 1073 client. 1075 RCODE value NOTAUTH indicates that the server is not authoritative 1076 for the requested name, and can do nothing to remedy the apparent 1077 error. Note that there may be future cases in which a server is able 1078 to pass on the RECONFIRM request to the ultimate source of the 1079 information, and in these cases the server should return NOERROR. 1081 RCODE value DSOTYPENI indicates that the server does not support 1082 RECONFIRM requests. 1084 Nonzero RCODE values SERVFAIL, REFUSED and DSOTYPENI are benign from 1085 the client's point of view. The client may log them to aid in 1086 debugging, but otherwise they require no special action. 1088 Nonzero RCODE values other than these three indicate a serious 1089 problem with the client. After sending an error response other than 1090 one of these three, the server SHOULD send a DSO Retry Delay TLV to 1091 end the DSO session, as described in the DSO specification [DSO]. 1093 6.6. Client-Initiated Termination 1095 An individual subscription is terminated by sending an UNSUBSCRIBE 1096 TLV for that specific subscription, or all subscriptions can be 1097 cancelled at once by the client closing the DSO session. When a 1098 client terminates an individual subscription (via UNSUBSCRIBE) or all 1099 subscriptions on that DSO session (by ending the session) it is 1100 signaling to the server that it is longer interested in receiving 1101 those particular updates. It is informing the server that the server 1102 may release any state information it has been keeping with regards to 1103 these particular subscriptions. 1105 After terminating its last subscription on a session via UNSUBSCRIBE, 1106 a client MAY close the session immediately, or it may keep it open if 1107 it anticipates performing further operations on that session in the 1108 future. If a client wishes to keep an idle session open, it MUST 1109 respect the maximum idle time required by the server [DSO]. 1111 If a client plans to terminate one or more subscriptions on a session 1112 and doesn't intend to keep that session open, then as an efficiency 1113 optimization it MAY instead choose to simply close the session, which 1114 implicitly terminates all subscriptions on that session. This may 1115 occur because the client computer is being shut down, is going to 1116 sleep, the application requiring the subscriptions has terminated, or 1117 simply because the last active subscription on that session has been 1118 cancelled. 1120 When closing a session, a client will generally do an abortive 1121 disconnect, sending a TCP RST. This immediately discards all 1122 remaining inbound and outbound data, which is appropriate if the 1123 client no longer has any interest in this data. In the BSD Sockets 1124 API, sending a TCP RST is achieved by setting the SO_LINGER option 1125 with a time of 0 seconds and then closing the socket. 1127 If a client has performed operations on this session that it would 1128 not want lost (like DNS updates) then the client SHOULD do an orderly 1129 disconnect, sending a TLS close_notify followed by a TCP FIN. (In 1130 the BSD Sockets API, sending a TCP FIN is achieved by calling 1131 "shutdown(s,SHUT_WR)" and keeping the socket open until all remaining 1132 data has been read from it.) 1134 7. Security Considerations 1136 The Strict Privacy Usage Profile for DNS over TLS is strongly 1137 recommended for DNS Push Notifications as defined in "Authentication 1138 and (D)TLS Profile for DNS-over-(D)TLS" 1139 [I-D.ietf-dprive-dtls-and-tls-profiles]. The Opportunistic Privacy 1140 Usage Profile is permissible as a way to support incremental 1141 deployment of security capabilities. Cleartext connections for DNS 1142 Push Notifications are not permissible. 1144 DNSSEC is RECOMMENDED for the authentication of DNS Push Notification 1145 servers. TLS alone does not provide complete security. TLS 1146 certificate verification can provide reasonable assurance that the 1147 client is really talking to the server associated with the desired 1148 host name, but since the desired host name is learned via a DNS SRV 1149 query, if the SRV query is subverted then the client may have a 1150 secure connection to a rogue server. DNSSEC can provided added 1151 confidence that the SRV query has not been subverted. 1153 7.1. Security Services 1155 It is the goal of using TLS to provide the following security 1156 services: 1158 Confidentiality: All application-layer communication is encrypted 1159 with the goal that no party should be able to decrypt it except 1160 the intended receiver. 1162 Data integrity protection: Any changes made to the communication in 1163 transit are detectable by the receiver. 1165 Authentication: An end-point of the TLS communication is 1166 authenticated as the intended entity to communicate with. 1168 Deployment recommendations on the appropriate key lengths and cypher 1169 suites are beyond the scope of this document. Please refer to TLS 1170 Recommendations [RFC7525] for the best current practices. Keep in 1171 mind that best practices only exist for a snapshot in time and 1172 recommendations will continue to change. Updated versions or errata 1173 may exist for these recommendations. 1175 7.2. TLS Name Authentication 1177 As described in Section 6.1, the client discovers the DNS Push 1178 Notification server using an SRV lookup for the record name 1179 "_dns-push-tls._tcp.". The server connection endpoint SHOULD 1180 then be authenticated using DANE TLSA records for the associated SRV 1181 record. This associates the target's name and port number with a 1182 trusted TLS certificate [RFC7673]. This procedure uses the TLS Sever 1183 Name Indication (SNI) extension [RFC6066] to inform the server of the 1184 name the client has authenticated through the use of TLSA records. 1185 Therefore, if the SRV record passes DNSSEC validation and a TLSA 1186 record matching the target name is useable, an SNI extension must be 1187 used for the target name to ensure the client is connecting to the 1188 server it has authenticated. If the target name does not have a 1189 usable TLSA record, then the use of the SNI extension is optional. 1191 See Authentication and (D)TLS Profile for DNS-over-(D)TLS 1192 [I-D.ietf-dprive-dtls-and-tls-profiles] for more information on 1193 authenticating domain names. Also note that a DNS Push server is an 1194 authoritative server and a DNS Push client is a standard DNS client. 1195 While the terminology in Authentication and (D)TLS Profile for DNS- 1196 over-(D)TLS [I-D.ietf-dprive-dtls-and-tls-profiles] explicitly states 1197 it does not apply to authoritative servers, it does in this case 1198 apply to DNS Push Notification clients and servers. 1200 7.3. TLS Compression 1202 In order to reduce the chances of compression-related attacks, TLS- 1203 level compression SHOULD be disabled when using TLS versions 1.2 and 1204 earlier. In the draft version of TLS 1.3 [I-D.ietf-tls-tls13], TLS- 1205 level compression has been removed completely. 1207 7.4. TLS Session Resumption 1209 TLS Session Resumption is permissible on DNS Push Notification 1210 servers. The server may keep TLS state with Session IDs [RFC5246] or 1211 operate in stateless mode by sending a Session Ticket [RFC5077] to 1212 the client for it to store. However, once the DSO session is closed, 1213 any existing subscriptions will be dropped. When the TLS session is 1214 resumed, the DNS Push Notification server will not have any 1215 subscription state and will proceed as with any other new DSO 1216 session. Use of TLS Session Resumption allows a new TLS connection 1217 to be set up more quickly, but the client will still have to recreate 1218 any desired subscriptions. 1220 8. IANA Considerations 1222 This document defines the service name: "_dns-push-tls._tcp". 1223 It is only applicable for the TCP protocol. 1224 This name is to be published in the IANA Registry Service Types 1225 [RFC6335][ST]. 1227 This document defines four DNS Stateful Operations TLV types: 1228 SUBSCRIBE with (tentative) value 0x40 (64), PUSH with (tentative) 1229 value 0x41 (65), UNSUBSCRIBE with (tentative) value 0x42 (66), and 1230 RECONFIRM with (tentative) value 0x43 (67). 1232 9. Acknowledgements 1234 The authors would like to thank Kiren Sekar and Marc Krochmal for 1235 previous work completed in this field. 1237 This draft has been improved due to comments from Ran Atkinson, Tim 1238 Chown, Mark Delany, Ralph Droms, Bernie Volz, Jan Komissar, Manju 1239 Shankar Rao, Markus Stenberg, Dave Thaler, Soraia Zlatkovic, Sara 1240 Dickinson, and Andrew Sullivan. 1242 10. References 1244 10.1. Normative References 1246 [DSO] Bellis, R., Cheshire, S., Dickinson, J., Dickinson, S., 1247 Mankin, A., and T. Pusateri, "DNS Stateful Operations", 1248 draft-ietf-dnsop-session-signal-05 (work in progress), 1249 January 2018. 1251 [I-D.ietf-tls-tls13] 1252 Rescorla, E., "The Transport Layer Security (TLS) Protocol 1253 Version 1.3", draft-ietf-tls-tls13-26 (work in progress), 1254 March 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 [ST] "Service Name and Transport Protocol Port Number 1328 Registry", . 1331 10.2. Informative References 1333 [DisProx] Cheshire, S., "Discovery Proxy for Multicast DNS-Based 1334 Service Discovery", draft-ietf-dnssd-hybrid-08 (work in 1335 progress), March 2018. 1337 [I-D.dukkipati-tcpm-tcp-loss-probe] 1338 Dukkipati, N., Cardwell, N., Cheng, Y., and M. Mathis, 1339 "Tail Loss Probe (TLP): An Algorithm for Fast Recovery of 1340 Tail Losses", draft-dukkipati-tcpm-tcp-loss-probe-01 (work 1341 in progress), February 2013. 1343 [I-D.ietf-dprive-dtls-and-tls-profiles] 1344 Dickinson, S., Gillmor, D., and T. Reddy, "Usage and 1345 (D)TLS Profiles for DNS-over-(D)TLS", draft-ietf-dprive- 1346 dtls-and-tls-profiles-11 (work in progress), September 1347 2017. 1349 [LLQ] Sekar, K., "DNS Long-Lived Queries", draft-sekar-dns- 1350 llq-01 (work in progress), August 2006. 1352 [obs] "Observer Pattern", 1353 . 1355 [RFC2308] Andrews, M., "Negative Caching of DNS Queries (DNS 1356 NCACHE)", RFC 2308, DOI 10.17487/RFC2308, March 1998, 1357 . 1359 [RFC4287] Nottingham, M., Ed. and R. Sayre, Ed., "The Atom 1360 Syndication Format", RFC 4287, DOI 10.17487/RFC4287, 1361 December 2005, . 1363 [RFC4953] Touch, J., "Defending TCP Against Spoofing Attacks", 1364 RFC 4953, DOI 10.17487/RFC4953, July 2007, 1365 . 1367 [RFC5077] Salowey, J., Zhou, H., Eronen, P., and H. Tschofenig, 1368 "Transport Layer Security (TLS) Session Resumption without 1369 Server-Side State", RFC 5077, DOI 10.17487/RFC5077, 1370 January 2008, . 1372 [RFC6281] Cheshire, S., Zhu, Z., Wakikawa, R., and L. Zhang, 1373 "Understanding Apple's Back to My Mac (BTMM) Service", 1374 RFC 6281, DOI 10.17487/RFC6281, June 2011, 1375 . 1377 [RFC6762] Cheshire, S. and M. Krochmal, "Multicast DNS", RFC 6762, 1378 DOI 10.17487/RFC6762, February 2013, 1379 . 1381 [RFC6763] Cheshire, S. and M. Krochmal, "DNS-Based Service 1382 Discovery", RFC 6763, DOI 10.17487/RFC6763, February 2013, 1383 . 1385 [RFC6824] Ford, A., Raiciu, C., Handley, M., and O. Bonaventure, 1386 "TCP Extensions for Multipath Operation with Multiple 1387 Addresses", RFC 6824, DOI 10.17487/RFC6824, January 2013, 1388 . 1390 [RFC7413] Cheng, Y., Chu, J., Radhakrishnan, S., and A. Jain, "TCP 1391 Fast Open", RFC 7413, DOI 10.17487/RFC7413, December 2014, 1392 . 1394 [RFC7525] Sheffer, Y., Holz, R., and P. Saint-Andre, 1395 "Recommendations for Secure Use of Transport Layer 1396 Security (TLS) and Datagram Transport Layer Security 1397 (DTLS)", BCP 195, RFC 7525, DOI 10.17487/RFC7525, May 1398 2015, . 1400 [RFC7719] Hoffman, P., Sullivan, A., and K. Fujiwara, "DNS 1401 Terminology", RFC 7719, DOI 10.17487/RFC7719, December 1402 2015, . 1404 [RFC7858] Hu, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D., 1405 and P. Hoffman, "Specification for DNS over Transport 1406 Layer Security (TLS)", RFC 7858, DOI 10.17487/RFC7858, May 1407 2016, . 1409 [RFC8010] Sweet, M. and I. McDonald, "Internet Printing 1410 Protocol/1.1: Encoding and Transport", RFC 8010, 1411 DOI 10.17487/RFC8010, January 2017, 1412 . 1414 [RFC8011] Sweet, M. and I. McDonald, "Internet Printing 1415 Protocol/1.1: Model and Semantics", RFC 8011, 1416 DOI 10.17487/RFC8011, January 2017, 1417 . 1419 [SYN] Eddy, W., "Defenses Against TCP SYN Flooding Attacks", The 1420 Internet Protocol Journal, Cisco Systems, Volume 9, 1421 Number 4, December 2006. 1423 [XEP0060] Millard, P., Saint-Andre, P., and R. Meijer, "Publish- 1424 Subscribe", XSF XEP 0060, July 2010. 1426 Authors' Addresses 1428 Tom Pusateri 1429 Unaffiliated 1430 Raleigh, NC 27608 1431 USA 1433 Phone: +1 919 867 1330 1434 Email: pusateri@bangj.com 1436 Stuart Cheshire 1437 Apple Inc. 1438 1 Infinite Loop 1439 Cupertino, CA 95014 1440 USA 1442 Phone: +1 408 974 3207 1443 Email: cheshire@apple.com