idnits 2.17.1 draft-ietf-dnssd-push-16.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 (November 5, 2018) is 1993 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-18 ** 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: May 9, 2019 Apple Inc. 6 November 5, 2018 8 DNS Push Notifications 9 draft-ietf-dnssd-push-16 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 May 9, 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. DNS Stateful Operations TLV Context Summary . . . . . . . 28 75 6.7. Client-Initiated Termination . . . . . . . . . . . . . . 29 76 7. Security Considerations . . . . . . . . . . . . . . . . . . . 30 77 7.1. Security Services . . . . . . . . . . . . . . . . . . . . 30 78 7.2. TLS Name Authentication . . . . . . . . . . . . . . . . . 30 79 7.3. TLS Compression . . . . . . . . . . . . . . . . . . . . . 31 80 7.4. TLS Session Resumption . . . . . . . . . . . . . . . . . 31 81 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 32 82 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 32 83 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 33 84 10.1. Normative References . . . . . . . . . . . . . . . . . . 33 85 10.2. Informative References . . . . . . . . . . . . . . . . . 34 86 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 37 88 1. Introduction 90 Domain Name System (DNS) records may be updated using DNS Update 91 [RFC2136]. Other mechanisms such as a Discovery Proxy [DisProx] can 92 also generate changes to a DNS zone. This document specifies a 93 protocol for DNS clients to subscribe to receive asynchronous 94 notifications of changes to RRSets of interest. It is immediately 95 relevant in the case of DNS Service Discovery [RFC6763] but is not 96 limited to that use case, and provides a general DNS mechanism for 97 DNS record change notifications. Familiarity with the DNS protocol 98 and DNS packet formats is assumed [RFC1034] [RFC1035] [RFC6895]. 100 1.1. Requirements Language 102 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 103 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 104 "OPTIONAL" in this document are to be interpreted as described in 105 "Key words for use in RFCs to Indicate Requirement Levels", when, and 106 only when, they appear in all capitals, as shown here [RFC2119] 107 [RFC8174]. 109 2. Motivation 111 As the domain name system continues to adapt to new uses and changes 112 in deployment, polling has the potential to burden DNS servers at 113 many levels throughout the network. Other network protocols have 114 successfully deployed a publish/subscribe model following the 115 Observer design pattern [obs]. XMPP Publish-Subscribe [XEP0060] and 116 Atom [RFC4287] are examples. While DNS servers are generally highly 117 tuned and capable of a high rate of query/response traffic, adding a 118 publish/subscribe model for tracking changes to DNS records can 119 deliver more timely notification of changes with reduced CPU usage 120 and lower network traffic. 122 Multicast DNS [RFC6762] implementations always listen on a well known 123 link-local IP multicast group, and record changes are sent to that 124 multicast group address for all group members to receive. Therefore, 125 Multicast DNS already has asynchronous change notification 126 capability. However, when DNS Service Discovery [RFC6763] is used 127 across a wide area network using Unicast DNS (possibly facilitated 128 via a Discovery Proxy [DisProx]) it would be beneficial to have an 129 equivalent capability for Unicast DNS, to allow clients to learn 130 about DNS record changes in a timely manner without polling. 132 The DNS Long-Lived Queries (LLQ) mechanism [LLQ] is an existing 133 deployed solution to provide asynchronous change notifications, used 134 by Apple's Back to My Mac Service [RFC6281] introduced in Mac OS X 135 10.5 Leopard in 2007. Back to My Mac was designed in an era when the 136 data center operations staff asserted that it was impossible for a 137 server to handle large numbers of mostly-idle TCP connections, so LLQ 138 was defined as a UDP-based protocol, effectively replicating much of 139 TCP's connection state management logic in user space, and creating 140 its own poor imitations of existing TCP features like the three-way 141 handshake, flow control, and reliability. 143 This document builds on experience gained with the LLQ protocol, with 144 an improved design. Instead of using UDP, this specification uses 145 DNS Stateful Operations (DSO) [DSO] running over TLS over TCP, and 146 therefore doesn't need to reinvent existing TCP functionality. Using 147 TCP also gives long-lived low-traffic connections better longevity 148 through NAT gateways without resorting to excessive keepalive 149 traffic. Instead of inventing a new vocabulary of messages to 150 communicate DNS zone changes as LLQ did, this specification borrows 151 the established syntax and semantics of DNS Update messages 152 [RFC2136]. 154 3. Overview 156 The existing DNS Update protocol [RFC2136] provides a mechanism for 157 clients to add or delete individual resource records (RRs) or entire 158 resource record sets (RRSets) on the zone's server. 160 This specification adopts a simplified subset of these existing 161 syntax and semantics, and uses them for DNS Push Notification 162 messages going in the opposite direction, from server to client, to 163 communicate changes to a zone. The client subscribes for Push 164 Notifications by connecting to the server and sending DNS message(s) 165 indicating the RRSet(s) of interest. When the client loses interest 166 in receiving further updates to these records, it unsubscribes. 168 The DNS Push Notification server for a zone is any server capable of 169 generating the correct change notifications for a name. It may be a 170 primary, secondary, or stealth name server [RFC7719]. Consequently, 171 the "_dns-push-tls._tcp." SRV record for a zone MAY reference 172 the same target host and port as that zone's 173 "_dns-update-tls._tcp." SRV record. When the same target host 174 and port is offered for both DNS Updates and DNS Push Notifications, 175 a client MAY use a single TCP connection to that server for both DNS 176 Updates and DNS Push Notification Subscriptions. 178 Supporting DNS Updates and DNS Push Notifications on the same server 179 is OPTIONAL. A DNS Push Notification server does NOT also have to 180 support DNS Update. 182 DNS Updates and DNS Push Notifications may be handled on different 183 ports on the same target host, in which case they are not considered 184 to be the "same server" for the purposes of this specification, and 185 communications with these two ports are handled independently. 187 Standard DNS Queries MAY be sent over a DNS Push Notification 188 connection. For any zone for which the server is authoritative, it 189 MUST respond authoritatively for queries on names falling within that 190 zone (e.g., the in the "_dns-push-tls._tcp." SRV record) 191 both for DNS Push Notification queries and for normal DNS queries. 192 For names for which the server is acting as a caching resolver, e.g. 193 when the server is the local resolver, for any query for which it 194 supports DNS Push Notifications, it MUST also support standard 195 queries. 197 DNS Push Notification clients are NOT required to implement DNS 198 Update Prerequisite processing. Prerequisites are used to perform 199 tentative atomic test-and-set type operations when a client updates 200 records on a server, and that concept has no applicability when it 201 comes to an authoritative server unilaterally informing a client of 202 changes to DNS records. 204 This DNS Push Notification specification includes support for DNS 205 classes, for completeness. However, in practice, it is anticipated 206 that for the foreseeable future the only DNS class in use will be DNS 207 class "IN", as is the reality today with existing DNS servers and 208 clients. A DNS Push Notification server MAY choose to implement only 209 DNS class "IN". If messages are received for a class other than 210 "IN", and that class is not supported, an error with RCODE NOTIMPL 211 (Not Implemented) should be returned. 213 DNS Push Notifications impose less load on the responding server than 214 rapid polling would, but Push Notifications do still have a cost, so 215 DNS Push Notification clients must not recklessly create an excessive 216 number of Push Notification subscriptions. Specifically: 218 (a) A subscription should only be active when there is a valid reason 219 to need live data (for example, an on-screen display is currently 220 showing the results to the user) and the subscription SHOULD be 221 cancelled as soon as the need for that data ends (for example, when 222 the user dismisses that display). Implementations may want to 223 implement idle timeouts, so that if the user ceases interacting with 224 the device, the subscription is cancelled. 226 (b) A DNS Push Notification client SHOULD NOT routinely keep a DNS 227 Push Notification subscription active 24 hours a day, 7 days a week, 228 just to keep a list in memory up to date so that if the user does 229 choose to bring up an on-screen display of that data, it can be 230 displayed really fast. DNS Push Notifications are designed to be 231 fast enough that there is no need to pre-load a "warm" list in memory 232 just in case it might be needed later. 234 Generally, as described in the DNS Stateful Operations specification 235 [DSO], a client must not keep a session to a server open indefinitely 236 if it has no subscriptions (or other operations) active on that 237 session. A client MAY close a session as soon as it becomes idle, 238 and then if needed in the future, open a new session when required. 239 Alternatively, a client MAY speculatively keep an idle session open 240 for some time, subject to the constraint that it MUST NOT keep a 241 session open that has been idle for more than the session's idle 242 timeout (15 seconds by default). 244 4. Transport 246 Other DNS operations like DNS Update [RFC2136] MAY use either User 247 Datagram Protocol (UDP) [RFC0768] or Transmission Control Protocol 248 (TCP) [RFC0793] as the transport protocol, in keeping with the 249 historical precedent that DNS queries must first be sent over UDP 250 [RFC1123]. This requirement to use UDP has subsequently been relaxed 251 [RFC7766]. 253 In keeping with the more recent precedent, DNS Push Notification is 254 defined only for TCP. DNS Push Notification clients MUST use DNS 255 Stateful Operations (DSO) [DSO] running over TLS over TCP [RFC7858]. 257 Connection setup over TCP ensures return reachability and alleviates 258 concerns of state overload at the server through anonymous 259 subscriptions. All subscribers are guaranteed to be reachable by the 260 server by virtue of the TCP three-way handshake. Flooding attacks 261 are possible with any protocol, and a benefit of TCP is that there 262 are already established industry best practices to guard against SYN 263 flooding and similar attacks [SYN] [RFC4953]. 265 Use of TCP also allows DNS Push Notifications to take advantage of 266 current and future developments in TCP, such as Multipath TCP (MPTCP) 267 [RFC6824], TCP Fast Open (TFO) [RFC7413], Tail Loss Probe (TLP) 268 [I-D.dukkipati-tcpm-tcp-loss-probe], and so on. 270 Transport Layer Security (TLS) [RFC5246] is well understood and 271 deployed across many protocols running over TCP. It is designed to 272 prevent eavesdropping, tampering, and message forgery. TLS is 273 REQUIRED for every connection between a client subscriber and server 274 in this protocol specification. Additional security measures such as 275 client authentication during TLS negotiation MAY also be employed to 276 increase the trust relationship between client and server. 278 5. State Considerations 280 Each DNS Push Notification server is capable of handling some finite 281 number of Push Notification subscriptions. This number will vary 282 from server to server and is based on physical machine 283 characteristics, network bandwidth, and operating system resource 284 allocation. After a client establishes a session to a DNS server, 285 each subscription is individually accepted or rejected. Servers may 286 employ various techniques to limit subscriptions to a manageable 287 level. Correspondingly, the client is free to establish simultaneous 288 sessions to alternate DNS servers that support DNS Push Notifications 289 for the zone and distribute subscriptions at the client's discretion. 290 In this way, both clients and servers can react to resource 291 constraints. 293 6. Protocol Operation 295 The DNS Push Notification protocol is a session-oriented protocol, 296 and makes use of DNS Stateful Operations (DSO) [DSO]. 298 For details of the DSO message format refer to the DNS Stateful 299 Operations specification [DSO]. Those details are not repeated here. 301 DNS Push Notification clients and servers MUST support DSO. A single 302 server can support DNS Queries, DNS Updates, and DNS Push 303 Notifications (using DSO) on the same TCP port. 305 A DNS Push Notification exchange begins with the client discovering 306 the appropriate server, using the procedure described in Section 6.1, 307 and then making a TLS/TCP connection to it. 309 A typical DNS Push Notification client will immediately issue a DSO 310 Keepalive operation to request a session timeout or keepalive 311 interval longer than the the 15-second default, but this is not 312 required. A DNS Push Notification client MAY issue other requests on 313 the session first, and only issue a DSO Keepalive operation later if 314 it determines that to be necessary. However, Push Notification 315 subscriptions can also be used to establish the DSO session. 317 In accordance with the current set of active subscriptions, the 318 server sends relevant asynchronous Push Notifications to the client. 319 Note that a client MUST be prepared to receive (and silently ignore) 320 Push Notifications for subscriptions it has previously removed, since 321 there is no way to prevent the situation where a Push Notification is 322 in flight from server to client while the client's UNSUBSCRIBE 323 message cancelling that subscription is simultaneously in flight from 324 client to server. 326 6.1. Discovery 328 The first step in DNS Push Notification subscription is to discover 329 an appropriate DNS server that supports DNS Push Notifications for 330 the desired zone. 332 The client begins by opening a DSO Session to its normal configured 333 DNS recursive resolver and requesting a Push Notification 334 subscription. This connection is made to the default DNS-over-TLS 335 port as defined in DNS over TLS [RFC7858]. If this connection is 336 successful, then the recursive resolver will make appropriate Push 337 Notification subscriptions on the client's behalf, and the client 338 will receive appropriate results. 340 In many contexts, the local recursive resolver will be able to handle 341 push notifications for all zones that the client may need to follow. 342 In other cases, the client may require Push Notifications from more 343 than one zone, and those zones may be served by different servers. 344 Therefore, it is assumed that the client may need to maintain 345 connections to more than one DNS Push server. 347 In some cases, the recursive resolver may not be able to get answers 348 for a particular zone. In this case, rather than returning SERVFAIL, 349 the resolver returns NOTAUTH. This signals the client that queries 350 for this zone can't be handled by the local caching resolver. For 351 that zone, the client SHOULD contact the zone's DNS Push server 352 itself, even if all other DNS Push queries can be handled by the 353 local resolver. This may be necessary in cases where the client is 354 connected to a VPN, for example, or where the client has a pre- 355 established trust relationship with the owner of the zone that allows 356 the client, but not the local resolver, to successfully get answers 357 for queries in that zone. 359 If the recursive resolver does not support Push Notification 360 subscriptions, then it will return an error code, DSONOTIMPL. This 361 occurs when the local resolver follows the procedure below and does 362 not find an SRV record indicating support for DNS Push Notifications. 364 In case of either failure, the client should proceed to discover the 365 appropriate server for direct communication. The client MUST also 366 determine which TCP port on the server is listening for connections, 367 which need not be (and often is not) the typical TCP port 53 used for 368 conventional DNS, or TCP port 853 used for DNS over TLS. 370 The discovery algorithm described here is an iterative algorithm, 371 which starts with the full name of the record to which the client 372 wishes to subscribe. Successive SOA queries are then issued, 373 trimming one label each time, until the closest enclosing 374 authoritative server is discovered. There is also an optimization to 375 enable the client to take a "short cut" directly to the SOA record of 376 the closest enclosing authoritative server in many cases. 378 1. The client begins the discovery by sending a DNS query to its 379 local resolver, with record type SOA [RFC1035] for the record 380 name to which it wishes to subscribe. As an example, suppose the 381 client wishes to subscribe to PTR records with the name 382 _ipp._tcp.foo.example.com (to discover Internet Printing Protocol 383 (IPP) printers [RFC8010] [RFC8011] being advertised at 384 "foo.example.com"). The client begins by sending an SOA query 385 for _ipp._tcp.foo.example.com to the local recursive resolver. 386 The goal is to determine the server authoritative for the name 387 _ipp._tcp.foo.example.com. The DNS zone containing the name 388 _ipp._tcp.foo.example.com could be example.com, or 389 foo.example.com, or _tcp.foo.example.com, or even 390 _ipp._tcp.foo.example.com. The client does not know in advance 391 where the closest enclosing zone cut occurs, which is why it uses 392 the procedure described here to discover this information. 394 2. If the requested SOA record exists, it will be returned in the 395 Answer section with a NOERROR response code, and the client has 396 succeeded in discovering the information it needs. (This text is 397 not placing any new requirements on DNS recursive resolvers. It 398 is merely describing the existing operation of the DNS protocol 399 [RFC1034] [RFC1035].) 401 3. If the requested SOA record does not exist, the client will get 402 back a NOERROR/NODATA response or an NXDOMAIN/Name Error 403 response. In either case, the local resolver would normally 404 include the SOA record for the zone of the requested name in the 405 Authority Section. If the SOA record is received in the 406 Authority Section, then the client has succeeded in discovering 407 the information it needs. (This text is not placing any new 408 requirements on DNS recursive resolvers. It is merely describing 409 the existing operation of the DNS protocol regarding negative 410 responses [RFC2308].) 412 4. If the client receives a response containing no SOA record, then 413 it proceeds with the iterative approach. The client strips the 414 leading label from the current query name and if the resulting 415 name has at least one label in it, the client sends a new SOA 416 query, and processing continues at step 2 above, repeating the 417 iterative search until either an SOA is received, or the query 418 name is empty. In the case of an empty name, this is a network 419 configuration error which should not happen and the client gives 420 up. The client may retry the operation at a later time, of the 421 client's choosing, such after a change in network attachment. 423 5. Once the SOA is known (either by virtue of being seen in the 424 Answer Section, or in the Authority Section), the client sends a 425 DNS query with type SRV [RFC2782] for the record name 426 "_dns-push-tls._tcp.", where is the owner name of 427 the discovered SOA record. 429 6. If the zone in question is set up to offer DNS Push Notifications 430 then this SRV record MUST exist. (If this SRV record does not 431 exist then the zone is not correctly configured for DNS Push 432 Notifications as specified in this document.) The SRV "target" 433 contains the name of the server providing DNS Push Notifications 434 for the zone. The port number on which to contact the server is 435 in the SRV record "port" field. The address(es) of the target 436 host MAY be included in the Additional Section, however, the 437 address records SHOULD be authenticated before use as described 438 below in Section 7.2 and in the specification for using DANE TLSA 439 Records with SRV Records [RFC7673], if applicable. 441 7. More than one SRV record may be returned. In this case, the 442 "priority" and "weight" values in the returned SRV records are 443 used to determine the order in which to contact the servers for 444 subscription requests. As described in the SRV specification 445 [RFC2782], the server with the lowest "priority" is first 446 contacted. If more than one server has the same "priority", the 447 "weight" indicates the weighted probability that the client 448 should contact that server. Higher weights have higher 449 probabilities of being selected. If a server is not willing to 450 accept a subscription request, or is not reachable within a 451 reasonable time, as determined by the client, then a subsequent 452 server is to be contacted. 454 Each time a client makes a new DNS Push Notification subscription 455 session, it SHOULD repeat the discovery process in order to determine 456 the preferred DNS server for subscriptions at that time. However, 457 the client device MUST respect the DNS TTL values on records it 458 receives, and store them in its local cache with this lifetime. This 459 means that, as long as the DNS TTL values on the authoritative 460 records were set to reasonable values, repeated application of this 461 discovery process can be completed nearly instantaneously by the 462 client, using only locally-stored cached data. 464 6.2. DNS Push Notification SUBSCRIBE 466 After connecting, and requesting a longer idle timeout and/or 467 keepalive interval if necessary, a DNS Push Notification client then 468 indicates its desire to receive DNS Push Notifications for a given 469 domain name by sending a SUBSCRIBE request over the established DSO 470 session to the server. A SUBSCRIBE request is encoded in a DSO [DSO] 471 message. This specification defines a primary DSO TLV for DNS Push 472 Notification SUBSCRIBE Requests (tentatively DSO Type Code 0x40). 474 The entity that initiates a SUBSCRIBE request is by definition the 475 client. A server MUST NOT send a SUBSCRIBE request over an existing 476 session from a client. If a server does send a SUBSCRIBE request 477 over a DSO session initiated by a client, this is a fatal error and 478 the client should immediately abort the connection with a TCP RST (or 479 equivalent for other protocols). 481 6.2.1. SUBSCRIBE Request 483 A SUBSCRIBE request begins with the standard DSO 12-byte header 484 [DSO], followed by the SUBSCRIBE TLV. A SUBSCRIBE request message is 485 illustrated in Figure 1. 487 The MESSAGE ID field MUST be set to a unique value, that the client 488 is not using for any other active operation on this session. For the 489 purposes here, a MESSAGE ID is in use on this session if the client 490 has used it in a request for which it has not yet received a 491 response, or if the client has used it for a subscription which it 492 has not yet cancelled using UNSUBSCRIBE. In the SUBSCRIBE response 493 the server MUST echo back the MESSAGE ID value unchanged. 495 The other header fields MUST be set as described in the DSO 496 specification [DSO]. The DNS Opcode is the DSO Opcode. The four 497 count fields MUST be zero, and the corresponding four sections MUST 498 be empty (i.e., absent). 500 The DSO-TYPE is SUBSCRIBE. The DSO-LENGTH is the length of the DSO- 501 DATA that follows, which specifies the name, type, and class of the 502 record(s) being sought. 504 1 1 1 1 1 1 505 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 506 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ \ 507 | MESSAGE ID | \ 508 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 509 |QR| Opcode | Z | RCODE | | 510 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 511 | QDCOUNT (MUST BE ZERO) | | 512 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ > HEADER 513 | ANCOUNT (MUST BE ZERO) | | 514 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 515 | NSCOUNT (MUST BE ZERO) | | 516 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 517 | ARCOUNT (MUST BE ZERO) | / 518 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / 519 | DSO-TYPE = SUBSCRIBE | 520 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 521 | DSO-LENGTH (number of octets in DSO-DATA) | 522 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ \ 523 | | \ 524 \ NAME \ | 525 \ \ | 526 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ > DSO-DATA 527 | TYPE | | 528 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 529 | CLASS | / 530 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / 532 Figure 1: SUBSCRIBE Request 534 The DSO-DATA for a SUBSCRIBE request MUST contain exactly one NAME, 535 Type, and CLASS. Since SUBSCRIBE requests are sent over TCP, 536 multiple SUBSCRIBE request messages can be concatenated in a single 537 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 | NOTIMP | 4 | Server does not implement DSO. | 614 | REFUSED | 5 | Server refuses to process request for policy | 615 | | | or security reasons. | 616 | NOTAUTH | 9 | Server is not authoritative for the requested | 617 | | | name. | 618 | DSOTYPENI | 11 | SUBSCRIBE operation not supported. | 619 +-----------+-------+-----------------------------------------------+ 621 Table 1: SUBSCRIBE Response codes 623 This document specifies only these RCODE values for SUBSCRIBE 624 Responses. Servers sending SUBSCRIBE Responses SHOULD use one of 625 these values. Note that NXDOMAIN is not a valid RCODE in response to 626 a SUBSCRIBE Request. However, future circumstances may create 627 situations where other RCODE values are appropriate in SUBSCRIBE 628 Responses, so clients MUST be prepared to accept SUBSCRIBE Responses 629 with any other RCODE value. 631 If the server sends a nonzero RCODE in the SUBSCRIBE response, that 632 means 634 a. the client is (at least partially) misconfigured, 635 b. the server resources are exhausted, or 636 c. there is some other unknown failure on the server. 638 In any case, the client shouldn't retry the subscription to this 639 server right away. If multiple SRV records were returned as 640 described in discovery Section 6.1, Paragraph 7, a subsequent server 641 can be tried immediately. 643 If the client has other successful subscriptions to this server, 644 these subscriptions can remain even though additional subscriptions 645 may be refused. Neither the client, nor the server are required to 646 close the connection, although, either end may choose to do so. 648 If the server sends a nonzero RCODE then it SHOULD append a Retry 649 Delay TLV [DSO] to the response specifying a delay before the client 650 attempts this operation again. Recommended values for the delay for 651 different RCODE values are given below. These recommended values 652 apply both to the default values a server should place in the Retry 653 Delay TLV, and the default values a client should assume if the 654 server provides no Retry Delay TLV. 656 For RCODE = 1 (FORMERR) the delay may be any value selected by the 657 implementer. A value of five minutes is RECOMMENDED, to reduce 658 the risk of high load from defective clients. 660 For RCODE = 2 (SERVFAIL) the delay should be chosen according to 661 the level of server overload and the anticipated duration of that 662 overload. By default, a value of one minute is RECOMMENDED. If a 663 more serious server failure occurs, the delay may be longer in 664 accordance with the specific problem encountered. 666 For RCODE = 4 (NOTIMP), which occurs on a server that doesn't 667 implement DSO [DSO], it is unlikely that the server will begin 668 supporting DSO in the next few minutes, so the retry delay SHOULD 669 be one hour. Note that in such a case, a server that doesn't 670 implement DSO is unlikely to place a Retry Delay TLV in its 671 response, so this recommended value in particular applies to what 672 a client should assume by default. 674 For RCODE = 5 (REFUSED), which occurs on a server that implements 675 DNS Push Notifications, but is currently configured to disallow 676 DNS Push Notifications, the retry delay may be any value selected 677 by the implementer and/or configured by the operator. 679 If the server being queried is not the local resolver, this is a 680 misconfiguration, since this server is listed in a 681 "_dns-push-tls._tcp." SRV record, but the server itself is 682 not currently configured to support DNS Push Notifications for 683 that zone. Since it is possible that the misconfiguration may be 684 repaired at any time, the retry delay should not be set too high. 685 By default, a value of 5 minutes is RECOMMENDED. 687 For RCODE = 9 (NOTAUTH), which occurs on a server that implements 688 DNS Push Notifications, but is not configured to be authoritative 689 for the requested name, the retry delay may be any value selected 690 by the implementer and/or configured by the operator. 692 This is a misconfiguration, since this server is listed in a 693 "_dns-push-tls._tcp." SRV record, but the server itself is 694 not currently configured to support DNS Push Notifications for 695 that zone. Since it is possible that the misconfiguration may be 696 repaired at any time, the retry delay should not be set too high. 697 By default, a value of 5 minutes is RECOMMENDED. 699 For RCODE = 11 (DSOTYPENI), which occurs on a server that doesn't 700 implement DNS Push Notifications, it is unlikely that the server 701 will begin supporting DNS Push Notifications in the next few 702 minutes, so the retry delay SHOULD be one hour. 704 For other RCODE values, the retry delay should be set by the 705 server as appropriate for that error condition. By default, a 706 value of 5 minutes is RECOMMENDED. 708 For RCODE = 9 (NOTAUTH), the time delay applies to requests for other 709 names falling within the same zone. Requests for names falling 710 within other zones are not subject to the delay. For all other 711 RCODEs the time delay applies to all subsequent requests to this 712 server. 714 After sending an error response the server MAY allow the session to 715 remain open, or MAY send a DNS Push Notification Retry Delay 716 Operation TLV instructing the client to close the session, as 717 described in the DSO specification [DSO]. Clients MUST correctly 718 handle both cases. 720 6.3. DNS Push Notification Updates 722 Once a subscription has been successfully established, the server 723 generates PUSH messages to send to the client as appropriate. In the 724 case that the answer set was non-empty at the moment the subscription 725 was established, an initial PUSH message will be sent immediately 726 following the SUBSCRIBE Response. Subsequent changes to the answer 727 set are then communicated to the client in subsequent PUSH messages. 729 6.3.1. PUSH Message 731 A PUSH message begins with the standard DSO 12-byte header [DSO], 732 followed by the PUSH TLV. A PUSH message is illustrated in Figure 2. 734 In accordance with the definition of DSO unidirectional messages, the 735 MESSAGE ID field MUST be zero. There is no client response to a PUSH 736 message. 738 The other header fields MUST also be set as described in the DSO 739 specification [DSO]. The DNS Opcode is the DSO Opcode. The four 740 count fields MUST be zero, and the corresponding four sections MUST 741 be empty (i.e., absent). 743 The DSO-TYPE is PUSH (tentatively 0x41). The DSO-LENGTH is the 744 length of the DSO-DATA that follows, which specifies the changes 745 being communicated. 747 The DSO-DATA contains one or more Update records. A PUSH Message 748 MUST contain at least one Update record. If a PUSH Message is 749 received that contains zero Update records, this is a fatal error, 750 and the receiver MUST immediately terminate the connection with a TCP 751 RST (or equivalent for other protocols). The Update records are 752 formatted in the customary way for Resource Records in DNS messages. 753 Update records in a PUSH Message are interpreted according to the 754 same rules as for DNS Update [RFC2136] messages, namely: 756 Delete all RRsets from a name: 757 TTL=0, CLASS=ANY, RDLENGTH=0, TYPE=ANY. 759 Delete an RRset from a name: 760 TTL=0, CLASS=ANY, RDLENGTH=0; 761 TYPE specifies the RRset being deleted. 763 Delete an individual RR from a name: 764 TTL=0, CLASS=NONE; 765 TYPE, RDLENGTH and RDATA specifies the RR being deleted. 767 Add to an RRset: 769 TTL, CLASS, TYPE, RDLENGTH and RDATA specifies the RR being added. 771 1 1 1 1 1 1 772 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 773 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ \ 774 | MESSAGE ID (MUST BE ZERO) | \ 775 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 776 |QR| Opcode | Z | RCODE | | 777 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 778 | QDCOUNT (MUST BE ZERO) | | 779 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ > HEADER 780 | ANCOUNT (MUST BE ZERO) | | 781 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 782 | NSCOUNT (MUST BE ZERO) | | 783 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 784 | ARCOUNT (MUST BE ZERO) | / 785 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / 786 | DSO-TYPE = PUSH | 787 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 788 | DSO-LENGTH (number of octets in DSO-DATA) | 789 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ \ 790 \ NAME \ \ 791 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 792 | TYPE | | 793 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 794 | CLASS | | 795 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 796 | TTL | | 797 | (32 bits) | > DSO-DATA 798 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 799 | RDLEN | | 800 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 801 \ RDATA \ | 802 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 803 : NAME, TYPE, CLASS, TTL, RDLEN, RDATA : | 804 : Repeated As Necessary : / 805 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / 807 Figure 2: PUSH Message 809 When processing the records received in a PUSH Message, the receiving 810 client MUST validate that the records being added or deleted 811 correspond with at least one currently active subscription on that 812 session. Specifically, the record name MUST match the name given in 813 the SUBSCRIBE request, subject to the usual established DNS case- 814 insensitivity for US-ASCII letters. If the TYPE in the SUBSCRIBE 815 request was not ANY (255) then the TYPE of the record must match the 816 TYPE given in the SUBSCRIBE request. If the CLASS in the SUBSCRIBE 817 request was not ANY (255) then the CLASS of the record must match the 818 CLASS given in the SUBSCRIBE request. If a matching active 819 subscription on that session is not found, then that individual 820 record addition/deletion is silently ignored. Processing of other 821 additions and deletions in this message is not affected. The DSO 822 session is not closed. This is to allow for the unavoidable race 823 condition where a client sends an outbound UNSUBSCRIBE while inbound 824 PUSH messages for that subscription from the server are still in 825 flight. 827 In the case where a single change affects more than one active 828 subscription, only one PUSH message is sent. For example, a PUSH 829 message adding a given record may match both a SUBSCRIBE request with 830 the same TYPE and a different SUBSCRIBE request with TYPE=ANY. It is 831 not the case that two PUSH messages are sent because the new record 832 matches two active subscriptions. 834 The server SHOULD encode change notifications in the most efficient 835 manner possible. For example, when three AAAA records are deleted 836 from a given name, and no other AAAA records exist for that name, the 837 server SHOULD send a "delete an RRset from a name" PUSH message, not 838 three separate "delete an individual RR from a name" PUSH messages. 839 Similarly, when both an SRV and a TXT record are deleted from a given 840 name, and no other records of any kind exist for that name, the 841 server SHOULD send a "delete all RRsets from a name" PUSH message, 842 not two separate "delete an RRset from a name" PUSH messages. 844 A server SHOULD combine multiple change notifications in a single 845 PUSH message when possible, even if those change notifications apply 846 to different subscriptions. Conceptually, a PUSH message is a 847 session-level mechanism, not a subscription-level mechanism. 849 The TTL of an added record is stored by the client. While the 850 subscription is active, the TTL is not decremented, because a change 851 to the TTL would produce a new update. For as long as a relevant 852 subscription remains active, the client SHOULD assume that when a 853 record goes away the server will notify it of that fact. 854 Consequently, a client does not have to poll to verify that the 855 record is still there. Once a subscription is cancelled 856 (individually, or as a result of the DSO session being closed) record 857 aging for records covered by the subscription resumes and records are 858 removed from the local cache when their TTL reaches zero. 860 6.4. DNS Push Notification UNSUBSCRIBE 862 To cancel an individual subscription without closing the entire DSO 863 session, the client sends an UNSUBSCRIBE message over the established 864 DSO session to the server. The UNSUBSCRIBE message is encoded as a 865 DSO [DSO] unidirectional message. This specification defines a 866 primary unidirectional DSO TLV for DNS Push Notification UNSUBSCRIBE 867 Requests (tentatively DSO Type Code 0x42). 869 A server MUST NOT initiate an UNSUBSCRIBE request. If a server does 870 send an UNSUBSCRIBE request over a DSO session initiated by a client, 871 this is a fatal error and the client should immediately abort the 872 connection with a TCP RST (or equivalent for other protocols). 874 6.4.1. UNSUBSCRIBE Request 876 An UNSUBSCRIBE request begins with the standard DSO 12-byte header 877 [DSO], followed by the UNSUBSCRIBE TLV. An UNSUBSCRIBE request 878 message is illustrated in Figure 3. 880 The MESSAGE ID field MUST be zero. There is no server response to a 881 UNSUBSCRIBE message. 883 The other header fields MUST be set as described in the DSO 884 specification [DSO]. The DNS Opcode is the DSO Opcode. The four 885 count fields MUST be zero, and the corresponding four sections MUST 886 be empty (i.e., absent). 888 In the UNSUBSCRIBE TLV the DSO-TYPE is UNSUBSCRIBE. The DSO-LENGTH 889 is 2 octets. 891 The DSO-DATA contains the MESSAGE ID field of the value given in the 892 ID field of an active SUBSCRIBE request. This is how the server 893 knows which SUBSCRIBE request is being cancelled. After receipt of 894 the UNSUBSCRIBE request, the SUBSCRIBE request is no longer active. 896 It is allowable for the client to issue an UNSUBSCRIBE request for a 897 previous SUBSCRIBE request for which the client has not yet received 898 a SUBSCRIBE response. This is to allow for the case where a client 899 starts and stops a subscription in less than the round-trip time to 900 the server. The client is NOT required to wait for the SUBSCRIBE 901 response before issuing the UNSUBSCRIBE request. 903 1 1 1 1 1 1 904 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 905 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ \ 906 | MESSAGE ID (MUST BE ZERO) | \ 907 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 908 |QR| Opcode | Z | RCODE | | 909 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 910 | QDCOUNT (MUST BE ZERO) | | 911 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ > HEADER 912 | ANCOUNT (MUST BE ZERO) | | 913 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 914 | NSCOUNT (MUST BE ZERO) | | 915 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 916 | ARCOUNT (MUST BE ZERO) | / 917 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / 918 | DSO-TYPE = UNSUBSCRIBE | 919 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 920 | DSO-LENGTH (2 octets) | 921 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ \ 922 | SUBSCRIBE MESSAGE ID | > DSO-DATA 923 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / 925 Figure 3: UNSUBSCRIBE Request 927 6.5. DNS Push Notification RECONFIRM 929 Sometimes, particularly when used with a Discovery Proxy [DisProx], a 930 DNS Zone may contain stale data. When a client encounters data that 931 it believe may be stale (e.g., an SRV record referencing a target 932 host+port that is not responding to connection requests) the client 933 can send a RECONFIRM request to ask the server to re-verify that the 934 data is still valid. For a Discovery Proxy, this causes it to issue 935 new Multicast DNS requests to ascertain whether the target device is 936 still present. For other types of DNS server, the RECONFIRM 937 operation is currently undefined, and SHOULD result in a NOERROR 938 response, but otherwise need not cause any action to occur. Frequent 939 RECONFIRM operations may be a sign of network unreliability, or some 940 kind of misconfiguration, so RECONFIRM operations MAY be logged or 941 otherwise communicated to a human administrator to assist in 942 detecting, and remedying, such network problems. 944 If, after receiving a valid RECONFIRM request, the server determines 945 that the disputed records are in fact no longer valid, then 946 subsequent DNS PUSH Messages will be generated to inform interested 947 clients. Thus, one client discovering that a previously-advertised 948 device (like a network printer) is no longer present has the side 949 effect of informing all other interested clients that the device in 950 question is now gone. 952 6.5.1. RECONFIRM Request 954 A RECONFIRM request begins with the standard DSO 12-byte header 955 [DSO], followed by the primary DSO RECONFIRM TLV. A RECONFIRM 956 request message is illustrated in Figure 4. 958 The MESSAGE ID field MUST be set to a unique value, that the client 959 is not using for any other active operation on this DSO session. For 960 the purposes here, a MESSAGE ID is in use on this session if the 961 client has used it in a request for which it has not yet received a 962 response, or if the client has used it for a subscription which it 963 has not yet cancelled using UNSUBSCRIBE. In the RECONFIRM response 964 the server MUST echo back the MESSAGE ID value unchanged. 966 The other header fields MUST be set as described in the DSO 967 specification [DSO]. The DNS Opcode is the DSO Opcode. The four 968 count fields MUST be zero, and the corresponding four sections MUST 969 be empty (i.e., absent). 971 The DSO-TYPE is RECONFIRM (tentatively 0x43). The DSO-LENGTH is the 972 length of the data that follows, which specifies the name, type, 973 class, and content of the record being disputed. 975 1 1 1 1 1 1 976 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 977 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ \ 978 | MESSAGE ID | \ 979 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 980 |QR| Opcode | Z | RCODE | | 981 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 982 | QDCOUNT (MUST BE ZERO) | | 983 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ > HEADER 984 | ANCOUNT (MUST BE ZERO) | | 985 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 986 | NSCOUNT (MUST BE ZERO) | | 987 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 988 | ARCOUNT (MUST BE ZERO) | / 989 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / 990 | DSO-TYPE = RECONFIRM | 991 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 992 | DSO-LENGTH (number of octets in DSO-DATA) | 993 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ \ 994 \ NAME \ \ 995 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 996 | TYPE | | 997 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ > DSO-DATA 998 | CLASS | | 999 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 1000 \ RDATA \ / 1001 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / 1003 Figure 4: RECONFIRM Request 1005 The DSO-DATA for a RECONFIRM request MUST contain exactly one record. 1006 The DSO-DATA for a RECONFIRM request has no count field to specify 1007 more than one record. Since RECONFIRM requests are sent over TCP, 1008 multiple RECONFIRM request messages can be concatenated in a single 1009 TCP stream and packed efficiently into TCP segments. 1011 TYPE MUST NOT be the value ANY (255) and CLASS MUST NOT be the value 1012 ANY (255). 1014 DNS wildcarding is not supported. That is, a wildcard ("*") in a 1015 RECONFIRM message matches only a literal wildcard character ("*") in 1016 the zone, and nothing else. 1018 Aliasing is not supported. That is, a CNAME in a RECONFIRM message 1019 matches only a literal CNAME record in the zone, and nothing else. 1021 6.5.2. RECONFIRM Response 1023 Each RECONFIRM request generates exactly one RECONFIRM response from 1024 the server. 1026 A RECONFIRM response message begins with the standard DSO 12-byte 1027 header [DSO], possibly followed by one or more optional TLVs, such as 1028 a Retry Delay TLV. For suggested values for the Retry Delay TLV, see 1029 Section 6.2.2. 1031 The MESSAGE ID field MUST echo the value given in the ID field of the 1032 RECONFIRM request. This is how the client knows which request is 1033 being responded to. 1035 A RECONFIRM response message MUST NOT include a DSO RECONFIRM TLV. 1036 If a client receives a RECONFIRM response message containing a 1037 RECONFIRM TLV then the response message is processed but the 1038 RECONFIRM TLV MUST be silently ignored. 1040 In the RECONFIRM response the RCODE confirms receipt of the 1041 reconfirmation request. Supported RCODEs are as follows: 1043 +-----------+-------+-----------------------------------------------+ 1044 | Mnemonic | Value | Description | 1045 +-----------+-------+-----------------------------------------------+ 1046 | NOERROR | 0 | RECONFIRM accepted. | 1047 | FORMERR | 1 | Server failed to process request due to a | 1048 | | | malformed request. | 1049 | SERVFAIL | 2 | Server failed to process request due to a | 1050 | | | problem with the server. | 1051 | NOTIMP | 4 | Server does not implement DSO. | 1052 | REFUSED | 5 | Server refuses to process request for policy | 1053 | | | or security reasons. | 1054 | NOTAUTH | 9 | Server is not authoritative for the requested | 1055 | | | name. | 1056 | DSOTYPENI | 11 | RECONFIRM operation not supported. | 1057 +-----------+-------+-----------------------------------------------+ 1059 Table 2: RECONFIRM Response codes 1061 This document specifies only these RCODE values for RECONFIRM 1062 Responses. Servers sending RECONFIRM Responses SHOULD use one of 1063 these values. Note that NXDOMAIN is not a valid RCODE in response to 1064 a RECONFIRM Request. However, future circumstances may create 1065 situations where other RCODE values are appropriate in RECONFIRM 1066 Responses, so clients MUST be prepared to accept RECONFIRM Responses 1067 with any other RCODE value. 1069 Nonzero RCODE values signal some kind of error. 1071 RCODE value FORMERR indicates a message format error, for example 1072 TYPE or CLASS being ANY (255). 1074 RCODE value SERVFAIL indicates that the server has exhausted its 1075 resources or other serious problem occurred. 1077 RCODE values NOTIMP indicates that the server does not support DSO, 1078 and DSO is required for RECONFIRM requests. 1080 RCODE value REFUSED indicates that the server supports RECONFIRM 1081 requests but is currently not configured to accept them from this 1082 client. 1084 RCODE value NOTAUTH indicates that the server is not authoritative 1085 for the requested name, and can do nothing to remedy the apparent 1086 error. Note that there may be future cases in which a server is able 1087 to pass on the RECONFIRM request to the ultimate source of the 1088 information, and in these cases the server should return NOERROR. 1090 RCODE value DSOTYPENI indicates that the server does not support 1091 RECONFIRM requests. 1093 Nonzero RCODE values SERVFAIL, REFUSED and DSOTYPENI are benign from 1094 the client's point of view. The client may log them to aid in 1095 debugging, but otherwise they require no special action. 1097 Nonzero RCODE values other than these three indicate a serious 1098 problem with the client. After sending an error response other than 1099 one of these three, the server SHOULD send a DSO Retry Delay TLV to 1100 end the DSO session, as described in the DSO specification [DSO]. 1102 6.6. DNS Stateful Operations TLV Context Summary 1104 This document defines four new DSO TLVs. As suggested in [DSO], 1105 Section 8.2, the valid contexts of these new TLV types are summarized 1106 below. 1108 The client TLV contexts are: 1110 C-P: Client primary TLV 1111 C-U: Client primary unidirectional TLV 1112 C-A: Client additional TLV 1113 CRP: Client response primary TLV 1114 CRA: Client response additional TLV 1116 +-------------+-----+-----+-----+-----+-----+ 1117 | TLV Type | C-P | C-U | C-A | CRP | CRA | 1118 +-------------+-----+-----+-----+-----+-----+ 1119 | SUBSCRIBE | X | | | | | 1120 | PUSH | | | | | | 1121 | UNSUBSCRIBE | | X | | | | 1122 | RECONFIRM | X | | | | | 1123 +-------------+-----+-----+-----+-----+-----+ 1125 Table 3: DSO TLV Client Context Summary 1127 The server TLV contexts are: 1129 S-P: Server primary TLV 1130 S-U: Server primary unidirectional TLV 1131 S-A: Server additional TLV 1132 SRP: Server response primary TLV 1133 SRA: Server response additional TLV 1135 +-------------+-----+-----+-----+-----+-----+ 1136 | TLV Type | S-P | S-U | S-A | SRP | SRA | 1137 +-------------+-----+-----+-----+-----+-----+ 1138 | SUBSCRIBE | | | | | | 1139 | PUSH | | X | | | | 1140 | UNSUBSCRIBE | | | | | | 1141 | RECONFIRM | | | | | | 1142 +-------------+-----+-----+-----+-----+-----+ 1144 Table 4: DSO TLV Server Context Summary 1146 6.7. Client-Initiated Termination 1148 An individual subscription is terminated by sending an UNSUBSCRIBE 1149 TLV for that specific subscription, or all subscriptions can be 1150 cancelled at once by the client closing the DSO session. When a 1151 client terminates an individual subscription (via UNSUBSCRIBE) or all 1152 subscriptions on that DSO session (by ending the session) it is 1153 signaling to the server that it is longer interested in receiving 1154 those particular updates. It is informing the server that the server 1155 may release any state information it has been keeping with regards to 1156 these particular subscriptions. 1158 After terminating its last subscription on a session via UNSUBSCRIBE, 1159 a client MAY close the session immediately, or it may keep it open if 1160 it anticipates performing further operations on that session in the 1161 future. If a client wishes to keep an idle session open, it MUST 1162 respect the maximum idle time required by the server [DSO]. 1164 If a client plans to terminate one or more subscriptions on a session 1165 and doesn't intend to keep that session open, then as an efficiency 1166 optimization it MAY instead choose to simply close the session, which 1167 implicitly terminates all subscriptions on that session. This may 1168 occur because the client computer is being shut down, is going to 1169 sleep, the application requiring the subscriptions has terminated, or 1170 simply because the last active subscription on that session has been 1171 cancelled. 1173 When closing a session, a client will generally do an abortive 1174 disconnect, sending a TCP RST. This immediately discards all 1175 remaining inbound and outbound data, which is appropriate if the 1176 client no longer has any interest in this data. In the BSD Sockets 1177 API, sending a TCP RST is achieved by setting the SO_LINGER option 1178 with a time of 0 seconds and then closing the socket. 1180 If a client has performed operations on this session that it would 1181 not want lost (like DNS updates) then the client SHOULD do an orderly 1182 disconnect, sending a TLS close_notify followed by a TCP FIN. (In 1183 the BSD Sockets API, sending a TCP FIN is achieved by calling 1184 "shutdown(s,SHUT_WR)" and keeping the socket open until all remaining 1185 data has been read from it.) 1187 7. Security Considerations 1189 The Strict Privacy Usage Profile for DNS over TLS is REQUIRED for DNS 1190 Push Notifications as defined in "Usage Profiles for DNS over TLS and 1191 DNS over DTLS" [RFC8310]. Cleartext connections for DNS Push 1192 Notifications are not permissible. Since this is a new protocol, 1193 transition mechanisms from the Opportunistic Privacy profile are 1194 deemed unnecessary. 1196 DNSSEC is RECOMMENDED for the authentication of DNS Push Notification 1197 servers. TLS alone does not provide complete security. TLS 1198 certificate verification can provide reasonable assurance that the 1199 client is really talking to the server associated with the desired 1200 host name, but since the desired host name is learned via a DNS SRV 1201 query, if the SRV query is subverted then the client may have a 1202 secure connection to a rogue server. DNSSEC can provided added 1203 confidence that the SRV query has not been subverted. 1205 7.1. Security Services 1207 It is the goal of using TLS to provide the following security 1208 services: 1210 Confidentiality: All application-layer communication is encrypted 1211 with the goal that no party should be able to decrypt it except 1212 the intended receiver. 1214 Data integrity protection: Any changes made to the communication in 1215 transit are detectable by the receiver. 1217 Authentication: An end-point of the TLS communication is 1218 authenticated as the intended entity to communicate with. 1220 Deployment recommendations on the appropriate key lengths and cypher 1221 suites are beyond the scope of this document. Please refer to TLS 1222 Recommendations [RFC7525] for the best current practices. Keep in 1223 mind that best practices only exist for a snapshot in time and 1224 recommendations will continue to change. Updated versions or errata 1225 may exist for these recommendations. 1227 7.2. TLS Name Authentication 1229 As described in Section 6.1, the client discovers the DNS Push 1230 Notification server using an SRV lookup for the record name 1231 "_dns-push-tls._tcp.". The server connection endpoint SHOULD 1232 then be authenticated using DANE TLSA records for the associated SRV 1233 record. This associates the target's name and port number with a 1234 trusted TLS certificate [RFC7673]. This procedure uses the TLS Sever 1235 Name Indication (SNI) extension [RFC6066] to inform the server of the 1236 name the client has authenticated through the use of TLSA records. 1237 Therefore, if the SRV record passes DNSSEC validation and a TLSA 1238 record matching the target name is useable, an SNI extension must be 1239 used for the target name to ensure the client is connecting to the 1240 server it has authenticated. If the target name does not have a 1241 usable TLSA record, then the use of the SNI extension is optional. 1243 See Usage Profiles for DNS over TLS and DNS over DTLS [RFC8310] for 1244 more information on authenticating domain names. Also note that a 1245 DNS Push server is an authoritative server and a DNS Push client is a 1246 standard DNS client. While the terminology in Usage Profiles for DNS 1247 over TLS and DNS over DTLS [RFC8310] explicitly states it does not 1248 apply to authoritative servers, it does in this case apply to DNS 1249 Push Notification clients and servers. 1251 7.3. TLS Compression 1253 In order to reduce the chances of compression-related attacks, TLS- 1254 level compression SHOULD be disabled when using TLS versions 1.2 and 1255 earlier. In TLS 1.3 [RFC8446], TLS-level compression has been 1256 removed completely. 1258 7.4. TLS Session Resumption 1260 TLS Session Resumption is permissible on DNS Push Notification 1261 servers. The server may keep TLS state with Session IDs [RFC5246] or 1262 operate in stateless mode by sending a Session Ticket [RFC5077] to 1263 the client for it to store. However, closing the TLS connection 1264 terminates the DSO session. When the TLS session is resumed, the DNS 1265 Push Notification server will not have any subscription state and 1266 will proceed as with any other new DSO session. Use of TLS Session 1267 Resumption may allow a TLS connection to be set up more quickly, but 1268 the client will still have to recreate any desired subscriptions. 1270 8. IANA Considerations 1272 This document defines a new service name to be published in the IANA 1273 Registry Service Types [RFC6335][ST] that is only applicable for the 1274 TCP protocol. 1276 +-----------------------+------+----------------------+-------------+ 1277 | Name | Port | Value | Definition | 1278 +-----------------------+------+----------------------+-------------+ 1279 | DNS Push Notification | None | "_dns-push-tls._tcp" | Section 6.1 | 1280 | Service Type | | | | 1281 +-----------------------+------+----------------------+-------------+ 1283 Table 5: IANA Service Type Assignments 1285 This document also defines four new DNS Stateful Operation TLV types 1286 to be recorded in the IANA DSO Type Code Registry. 1288 +-------------+------------------------+---------------+ 1289 | Name | Value | Definition | 1290 +-------------+------------------------+---------------+ 1291 | SUBSCRIBE | TBA (tentatively 0x40) | Section 6.2 | 1292 | PUSH | TBA (tentatively 0x41) | Section 6.3.1 | 1293 | UNSUBSCRIBE | TBA (tentatively 0x42) | Section 6.4 | 1294 | RECONFIRM | TBA (tentatively 0x43) | Section 6.5.1 | 1295 +-------------+------------------------+---------------+ 1297 Table 6: IANA DSO TLV Type Code Assignments 1299 9. Acknowledgements 1301 The authors would like to thank Kiren Sekar and Marc Krochmal for 1302 previous work completed in this field. 1304 This draft has been improved due to comments from Ran Atkinson, Tim 1305 Chown, Mark Delany, Ralph Droms, Bernie Volz, Jan Komissar, Manju 1306 Shankar Rao, Markus Stenberg, Dave Thaler, Soraia Zlatkovic, Sara 1307 Dickinson, and Andrew Sullivan. Ted Lemon provided clarifying text 1308 that was greatly appreciated. 1310 10. References 1312 10.1. Normative References 1314 [DSO] Bellis, R., Cheshire, S., Dickinson, J., Dickinson, S., 1315 Lemon, T., and T. Pusateri, "DNS Stateful Operations", 1316 draft-ietf-dnsop-session-signal-18 (work in progress), 1317 October 2018. 1319 [RFC0768] Postel, J., "User Datagram Protocol", STD 6, RFC 768, 1320 DOI 10.17487/RFC0768, August 1980, 1321 . 1323 [RFC0793] Postel, J., "Transmission Control Protocol", STD 7, 1324 RFC 793, DOI 10.17487/RFC0793, September 1981, 1325 . 1327 [RFC1034] Mockapetris, P., "Domain names - concepts and facilities", 1328 STD 13, RFC 1034, DOI 10.17487/RFC1034, November 1987, 1329 . 1331 [RFC1035] Mockapetris, P., "Domain names - implementation and 1332 specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, 1333 November 1987, . 1335 [RFC1123] Braden, R., Ed., "Requirements for Internet Hosts - 1336 Application and Support", STD 3, RFC 1123, 1337 DOI 10.17487/RFC1123, October 1989, 1338 . 1340 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1341 Requirement Levels", BCP 14, RFC 2119, 1342 DOI 10.17487/RFC2119, March 1997, 1343 . 1345 [RFC2136] Vixie, P., Ed., Thomson, S., Rekhter, Y., and J. Bound, 1346 "Dynamic Updates in the Domain Name System (DNS UPDATE)", 1347 RFC 2136, DOI 10.17487/RFC2136, April 1997, 1348 . 1350 [RFC2782] Gulbrandsen, A., Vixie, P., and L. Esibov, "A DNS RR for 1351 specifying the location of services (DNS SRV)", RFC 2782, 1352 DOI 10.17487/RFC2782, February 2000, 1353 . 1355 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 1356 (TLS) Protocol Version 1.2", RFC 5246, 1357 DOI 10.17487/RFC5246, August 2008, 1358 . 1360 [RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS) 1361 Extensions: Extension Definitions", RFC 6066, 1362 DOI 10.17487/RFC6066, January 2011, 1363 . 1365 [RFC6335] Cotton, M., Eggert, L., Touch, J., Westerlund, M., and S. 1366 Cheshire, "Internet Assigned Numbers Authority (IANA) 1367 Procedures for the Management of the Service Name and 1368 Transport Protocol Port Number Registry", BCP 165, 1369 RFC 6335, DOI 10.17487/RFC6335, August 2011, 1370 . 1372 [RFC6895] Eastlake 3rd, D., "Domain Name System (DNS) IANA 1373 Considerations", BCP 42, RFC 6895, DOI 10.17487/RFC6895, 1374 April 2013, . 1376 [RFC7673] Finch, T., Miller, M., and P. Saint-Andre, "Using DNS- 1377 Based Authentication of Named Entities (DANE) TLSA Records 1378 with SRV Records", RFC 7673, DOI 10.17487/RFC7673, October 1379 2015, . 1381 [RFC7766] Dickinson, J., Dickinson, S., Bellis, R., Mankin, A., and 1382 D. Wessels, "DNS Transport over TCP - Implementation 1383 Requirements", RFC 7766, DOI 10.17487/RFC7766, March 2016, 1384 . 1386 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 1387 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 1388 May 2017, . 1390 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 1391 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 1392 . 1394 [ST] "Service Name and Transport Protocol Port Number 1395 Registry", . 1398 10.2. Informative References 1400 [DisProx] Cheshire, S., "Discovery Proxy for Multicast DNS-Based 1401 Service Discovery", draft-ietf-dnssd-hybrid-08 (work in 1402 progress), March 2018. 1404 [I-D.dukkipati-tcpm-tcp-loss-probe] 1405 Dukkipati, N., Cardwell, N., Cheng, Y., and M. Mathis, 1406 "Tail Loss Probe (TLP): An Algorithm for Fast Recovery of 1407 Tail Losses", draft-dukkipati-tcpm-tcp-loss-probe-01 (work 1408 in progress), February 2013. 1410 [LLQ] Sekar, K., "DNS Long-Lived Queries", draft-sekar-dns- 1411 llq-01 (work in progress), August 2006. 1413 [obs] "Observer Pattern", 1414 . 1416 [RFC2308] Andrews, M., "Negative Caching of DNS Queries (DNS 1417 NCACHE)", RFC 2308, DOI 10.17487/RFC2308, March 1998, 1418 . 1420 [RFC4287] Nottingham, M., Ed. and R. Sayre, Ed., "The Atom 1421 Syndication Format", RFC 4287, DOI 10.17487/RFC4287, 1422 December 2005, . 1424 [RFC4953] Touch, J., "Defending TCP Against Spoofing Attacks", 1425 RFC 4953, DOI 10.17487/RFC4953, July 2007, 1426 . 1428 [RFC5077] Salowey, J., Zhou, H., Eronen, P., and H. Tschofenig, 1429 "Transport Layer Security (TLS) Session Resumption without 1430 Server-Side State", RFC 5077, DOI 10.17487/RFC5077, 1431 January 2008, . 1433 [RFC6281] Cheshire, S., Zhu, Z., Wakikawa, R., and L. Zhang, 1434 "Understanding Apple's Back to My Mac (BTMM) Service", 1435 RFC 6281, DOI 10.17487/RFC6281, June 2011, 1436 . 1438 [RFC6762] Cheshire, S. and M. Krochmal, "Multicast DNS", RFC 6762, 1439 DOI 10.17487/RFC6762, February 2013, 1440 . 1442 [RFC6763] Cheshire, S. and M. Krochmal, "DNS-Based Service 1443 Discovery", RFC 6763, DOI 10.17487/RFC6763, February 2013, 1444 . 1446 [RFC6824] Ford, A., Raiciu, C., Handley, M., and O. Bonaventure, 1447 "TCP Extensions for Multipath Operation with Multiple 1448 Addresses", RFC 6824, DOI 10.17487/RFC6824, January 2013, 1449 . 1451 [RFC7413] Cheng, Y., Chu, J., Radhakrishnan, S., and A. Jain, "TCP 1452 Fast Open", RFC 7413, DOI 10.17487/RFC7413, December 2014, 1453 . 1455 [RFC7525] Sheffer, Y., Holz, R., and P. Saint-Andre, 1456 "Recommendations for Secure Use of Transport Layer 1457 Security (TLS) and Datagram Transport Layer Security 1458 (DTLS)", BCP 195, RFC 7525, DOI 10.17487/RFC7525, May 1459 2015, . 1461 [RFC7719] Hoffman, P., Sullivan, A., and K. Fujiwara, "DNS 1462 Terminology", RFC 7719, DOI 10.17487/RFC7719, December 1463 2015, . 1465 [RFC7858] Hu, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D., 1466 and P. Hoffman, "Specification for DNS over Transport 1467 Layer Security (TLS)", RFC 7858, DOI 10.17487/RFC7858, May 1468 2016, . 1470 [RFC8010] Sweet, M. and I. McDonald, "Internet Printing 1471 Protocol/1.1: Encoding and Transport", STD 92, RFC 8010, 1472 DOI 10.17487/RFC8010, January 2017, 1473 . 1475 [RFC8011] Sweet, M. and I. McDonald, "Internet Printing 1476 Protocol/1.1: Model and Semantics", STD 92, RFC 8011, 1477 DOI 10.17487/RFC8011, January 2017, 1478 . 1480 [RFC8310] Dickinson, S., Gillmor, D., and T. Reddy, "Usage Profiles 1481 for DNS over TLS and DNS over DTLS", RFC 8310, 1482 DOI 10.17487/RFC8310, March 2018, 1483 . 1485 [SYN] Eddy, W., "Defenses Against TCP SYN Flooding Attacks", The 1486 Internet Protocol Journal, Cisco Systems, Volume 9, 1487 Number 4, December 2006. 1489 [XEP0060] Millard, P., Saint-Andre, P., and R. Meijer, "Publish- 1490 Subscribe", XSF XEP 0060, July 2010. 1492 Authors' Addresses 1494 Tom Pusateri 1495 Unaffiliated 1496 Raleigh, NC 27608 1497 USA 1499 Phone: +1 919 867 1330 1500 Email: pusateri@bangj.com 1502 Stuart Cheshire 1503 Apple Inc. 1504 1 Infinite Loop 1505 Cupertino, CA 95014 1506 USA 1508 Phone: +1 408 974 3207 1509 Email: cheshire@apple.com