One document matched: draft-ietf-dnssd-push-09.xml


<?xml version="1.0" encoding="UTF-8"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
    which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!-- One method to get references from the online citation libraries.
    There has to be one entity for each item to be referenced.
    An alternate method (rfc include) is described in the references. -->

<!ENTITY RFC0768 SYSTEM  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.0768.xml">
<!ENTITY RFC0793 SYSTEM  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.0793.xml">
<!ENTITY RFC1034 SYSTEM  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.1034.xml">
<!ENTITY RFC1035 SYSTEM  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.1035.xml">
<!ENTITY RFC1123 SYSTEM  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.1123.xml">
<!ENTITY RFC1996 SYSTEM  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.1996.xml">
<!ENTITY RFC2119 SYSTEM  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC2136 SYSTEM  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2136.xml">
<!ENTITY RFC2782 SYSTEM  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2782.xml">
<!ENTITY RFC4287 SYSTEM  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4287.xml">
<!ENTITY RFC4953 SYSTEM  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4953.xml">
<!ENTITY RFC5077 SYSTEM  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5077.xml">
<!ENTITY RFC5246 SYSTEM  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5246.xml">
<!ENTITY RFC6066 SYSTEM  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6066.xml">
<!ENTITY RFC6895 SYSTEM  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6895.xml">
<!ENTITY RFC6762 SYSTEM  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6762.xml">
<!ENTITY RFC6763 SYSTEM  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6763.xml">
<!ENTITY RFC6824 SYSTEM  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6824.xml">
<!ENTITY RFC7413 SYSTEM  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7413.xml">
<!ENTITY RFC7525 SYSTEM  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7525.xml">
<!ENTITY RFC7673 SYSTEM  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7673.xml">
<!ENTITY RFC7766 SYSTEM  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7766.xml">
<!ENTITY RFC7858 SYSTEM  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7858.xml">
<!ENTITY I-D.dukkipati-tcpm-tcp-loss-probe SYSTEM  "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.dukkipati-tcpm-tcp-loss-probe.xml">
<!ENTITY I-D.sekar-dns-llq                 SYSTEM  "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.sekar-dns-llq.xml">
<!ENTITY I-D.ietf-tls-tls13                SYSTEM  "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-tls-tls13.xml">
<!ENTITY I-D.ietf-dnsop-session-signal     SYSTEM  "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-dnsop-session-signal.xml">
<!ENTITY I-D.ietf-dnssd-hybrid             SYSTEM  "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-dnssd-hybrid.xml">


]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs),
    please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
    (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space
    (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="std" docName="draft-ietf-dnssd-push-09" ipr="trust200902">
 <!-- category values: std, bcp, info, exp, and historic
    ipr values: trust200902, noModificationTrust200902, noDerivativesTrust200902,
       or pre5378Trust200902
    you can add the attributes updates="NNNN" and obsoletes="NNNN"
    they will automatically be output with "(if approved)" -->

 <!-- ***** FRONT MATTER ***** -->

 <front>
   <!-- The abbreviated title is used in the page header - it is only necessary if the
        full title is longer than 39 characters -->

   <title abbrev="DNS Push Notifications">DNS Push Notifications</title>

   <!-- add 'role="editor"' below for the editors if appropriate -->

   <!-- Another author who claims to be an editor -->

   <author fullname="Tom Pusateri" initials="T.J." surname="Pusateri">
     <organization>Seeking affiliation</organization>

     <address>
       <postal>
         <street></street>
         <!-- Reorder these if your country does things differently -->
         <city>Hilton Head Island</city>
         <region>SC</region>
         <code></code>
         <country>USA</country>
       </postal>
       <phone>+1 843 473 7394</phone>
       <email>pusateri@bangj.com</email>
       <!-- uri and facsimile elements may also be added -->
     </address>
   </author>
   <author fullname="Stuart Cheshire" initials="S." surname="Cheshire">
     <organization>Apple Inc.</organization>

     <address>
       <postal>
         <street>1 Infinite Loop</street>
         <!-- Reorder these if your country does things differently -->
         <city>Cupertino</city>
         <region>CA</region>
         <code>95014</code>
         <country>USA</country>
       </postal>
       <phone>+1 408 974 3207</phone>
       <email>cheshire@apple.com</email>
       <!-- uri and facsimile elements may also be added -->
     </address>
   </author>

   <date day='31' month='October' year='2016'/>

   <!-- If the month and year are both specified and are the current ones, xml2rfc will fill
        in the current day for you. If only the current year is specified, xml2rfc will fill
        in the current day and month for you. If the year is not the current one, it is
        necessary to specify at least a month (xml2rfc assumes day="1" if not specified for the
        purpose of calculating the expiry date).  With drafts it is normally sufficient to
        specify just the year. -->

   <!-- Meta-data Declarations -->

   <area>DNSSD</area>

   <workgroup>Internet Engineering Task Force</workgroup>

   <!-- WG name at the upper left corner of the doc,
        IETF is fine for individual submissions.
        If this element is not present, the default is "Network Working Group",
        which is used by the RFC Editor as a nod to the history of the IETF. -->

   <keyword>dns update push notification</keyword>

   <!-- Keywords will be incorporated into HTML output
        files in a meta tag but they have no effect on text or nroff
        output. If you submit your draft to the RFC Editor, the
        keywords will be used for the search engine. -->

   <abstract>
     <t>The Domain Name System (DNS) was designed to return matching records efficiently for queries for data that is relatively static. When those records change frequently, DNS is still efficient at returning the updated results when polled. But there exists no mechanism for a client to be asynchronously notified when these changes occur. This document defines a mechanism for a client to be notified of such changes to DNS records, called DNS Push Notifications.</t>
   </abstract>
 </front>

 <middle>

   <section title="Introduction">

     <t>DNS records may be updated using <xref target="RFC2136">DNS Update</xref>.
     Other mechanisms such as a <xref target="I-D.ietf-dnssd-hybrid">Hybrid Proxy</xref> can also generate changes to a DNS zone.
     This document specifies a protocol for DNS clients to subscribe to receive asynchronous notifications of changes to RRSets of interest. It is immediately relevant in the case of <xref target="RFC6763">DNS Service Discovery</xref> but is not limited to that use case, and provides a general DNS mechanism for DNS record change notifications. Familiarity with the DNS protocol and DNS packet formats is assumed <xref target="RFC1034"/> <xref target="RFC1035"/> <xref target="RFC6895"/>.</t>

<?rfc needLines="7" ?>
     <section title="Requirements Language">
       <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
       "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this
       document are to be interpreted as described in
       <xref target="RFC2119">"Key words for use in RFCs to Indicate Requirement Levels"</xref>.</t>

     </section>
   </section>

   <section title="Motivation">
     <t>As the domain name system continues to adapt to new uses and changes in deployment, polling has the potential to burden DNS servers at many levels throughout the network. Other network protocols have successfully deployed a publish/subscribe model to state changes following the <xref target="obs">Observer design pattern</xref>.
     <xref target="XEP0060">XMPP Publish-Subscribe</xref> and <xref target="RFC4287">Atom</xref> are examples. While DNS servers are generally highly tuned and capable of a high rate of query/response traffic, adding a publish/subscribe model for tracking changes to DNS records can result in more timely notification of changes with reduced CPU usage and lower network traffic.</t>

     <t><xref target="RFC6762">Multicast DNS</xref> implementations always listen on a well known link-local IP multicast group, and new services and updates are sent for all group members to receive. Therefore, Multicast DNS already has asynchronous change notification capability. However, when <xref target="RFC6763">DNS Service Discovery</xref> is used across a wide area network using Unicast DNS (possibly facilitated via a <xref target="I-D.ietf-dnssd-hybrid">Hybrid Proxy</xref>) it would be beneficial to have an equivalent capability for Unicast DNS, to allow clients to learn about DNS record changes in a timely manner without polling.</t>

     <t><xref target="I-D.sekar-dns-llq">DNS Long-Lived Queries (LLQ)</xref> is an existing deployed solution to provide asynchronous change notifications. Even though it can be used over TCP, LLQ is defined primarily as a UDP-based protocol, and as such it defines its own equivalents of existing TCP features like the three-way handshake, flow control, and reliability.
     This document builds on experience gained with the LLQ protocol, with an improved design.
     Instead of using UDP, this specification uses <xref target="I-D.ietf-dnsop-session-signal">long-lived TCP connections</xref>, and therefore doesn't need to reinvent existing TCP functionality.
     Instead of inventing a new vocabulary of messages to communicate DNS zone changes, this specification adopts the syntax and semantics of <xref target="RFC2136">DNS Update messages</xref>.</t>

     <t>DNS Push Notifications impose less load on the responding server than rapid polling would, but Push Notifications do still have a cost, so DNS Push Notification clients MUST NOT recklessly create an excessive number of Push Notification subscriptions. A subscription SHOULD only be active when there is a valid reason to need live data (for example, an on-screen display is currently showing the results to the user) and the subscription SHOULD be cancelled as soon as the need for that data ends (for example, when the user dismisses that display). Implementations MAY want to implement idle timeouts, so that if the user ceases interacting with the device, the display showing the result of the DNS Push Notification subscription is automatically dismissed after a certain period of inactivity. For example, if a user presses the "Print" button on their smartphone, and then leaves the phone showing the printer discovery screen until the phone goes to sleep, then the printer discovery screen should be automatically dismissed as the device goes to sleep. If the user does still intend to print, this will require them to press the "Print" button again when they wake their phone up.</t>

     <t>A DNS Push Notification client MUST NOT routinely keep a DNS Push Notification subscription active 24 hours a day 7 days a week just to keep a list in memory up to date so that it will be really fast if the user does choose to bring up an on-screen display of that data. DNS Push Notifications are designed to be fast enough that there is no need to pre-load a "warm" list in memory just in case it might be needed later.</t>

     <t>Generally, a client SHOULD NOT keep a connection to a server open indefinitely if it has no active subscriptions on that connection. After 30 seconds with no active subscriptions the client SHOULD close the idle connection, and, if needed in the future, open a new connection.</t>

<?rfc needLines="2" ?>
   </section>

   <section title="Overview">
     <t>The existing <xref target="RFC2136">DNS Update protocol</xref> provides a mechanism for clients to add or delete individual resource records (RRs) or entire resource record sets (RRSets) on the zone's server.</t>

     <t>This specification adopts a simplified subset of these existing syntax and semantics, and uses them for DNS Push Notification messages going in the opposite direction, from server to client, to communicate changes to a zone. The client subscribes for Push Notifications by connecting to the server and sending DNS message(s) indicating the RRSet(s) of interest. When the client loses interest in updates to these records, it unsubscribes.</t>

     <t>The DNS Push Notification server for a zone is any server capable<vspace />
     of generating the correct change notifications for a name.<vspace />
     It may be a master, slave, or stealth name server <xref target="RFC1996"/>.
     Consequently, the <spanx style="verb">_dns&nbhy;push&nbhy;tls._tcp.<zone></spanx> SRV record for a<vspace />
     zone MAY reference the same target host and port as that zone's
     <spanx style="verb">_dns&nbhy;update&nbhy;tls._tcp.<zone></spanx> SRV record. When the same target host and port is offered for both DNS Updates and DNS Push Notifications, a client MAY use a single TCP connection to that server for both DNS Updates and DNS Push Notification Queries.</t>

     <t>Supporting DNS Updates and DNS Push Notifications on the same server is OPTIONAL. A DNS Push Notification server does NOT also have to support DNS Update.</t>

     <t>DNS Updates and DNS Push Notifications may be handled on different ports on the same target host, in which case they are not considered to be the "same server" for the purposes of this specification, and communications with these two ports are handled independently.</t>

     <t>Standard DNS Queries MAY be sent over a DNS Push Notification connection, provided that these are queries for names falling within the server's zone (the <zone> in the <spanx style="verb">_dns&nbhy;push&nbhy;tls._tcp.<zone></spanx> SRV record). The RD (Recursion Desired) bit MUST be zero.</t>

     <t>DNS Push Notification clients are NOT required to implement DNS Update Prerequisite processing. Prerequisites are used to perform tentative atomic test-and-set type operations when a client updates records on a server, and that concept has no applicability when it comes to an authoritative server informing a client of changes to DNS records.</t>

     <t>This DNS Push Notification specification includes support for DNS classes, for completeness. However, in practice, it is anticipated that for the foreseeable future the only DNS class in use will be DNS class "IN", as is the reality today with existing DNS servers and clients. A DNS Push Notification server MAY choose to implement only DNS class "IN".</t>
<?rfc needLines="24" ?>
   </section>

   <section title="Transport">
     <t>Implementations of <xref target="RFC2136">DNS Update</xref> MAY use either User Datagram Protocol <xref target="RFC0768">(UDP)</xref> or Transmission Control Protocol <xref target="RFC0793">(TCP)</xref> as the transport protocol, in keeping with the historical precedent that DNS queries must first be sent over UDP <xref target="RFC1123"/>. This requirement to use UDP has subsequently been relaxed <xref target="RFC7766"/>.</t>

     <t>In keeping with the more recent precedent, DNS Push Notification is defined only for TCP. DNS Push Notification clients MUST use TLS over TCP.</t>

     <t>Connection setup over TCP ensures return reachability and alleviates concerns of state overload at the server through anonymous subscriptions. All subscribers are guaranteed to be reachable by the server by virtue of the TCP three-way handshake.
     Flooding attacks are possible with any protocol, and a benefit of TCP is that there are already established industry best practices to guard against SYN flooding and similar attacks <xref target="IPJ.9-4-TCPSYN"/> <xref target="RFC4953"/>.</t>

     <t>Use of TCP also allows DNS Push Notifications to take advantage of current and future developments in TCP, such as
     <xref target="RFC6824">Multipath TCP (MPTCP)</xref>,
     <xref target="RFC7413">TCP Fast Open (TFO)</xref>,
     <xref target="I-D.dukkipati-tcpm-tcp-loss-probe">Tail Loss Probe (TLP)</xref>, and so on.</t>

     <t>Transport Layer Security <xref target="RFC5246">(TLS)</xref> is well understood and deployed across many protocols running over TCP. It is designed to prevent eavesdropping, tampering, or message forgery. TLS is REQUIRED for every connection between a client subscriber and server in this protocol specification. Additional security measures such as client authentication during TLS negotiation MAY also be employed to increase the trust relationship between client and server.</t>

     <t>Additional authentication of the SRV target using DNSSEC verification and DANE TLSA records <xref target="RFC7673"/> is strongly encouraged. See below in <xref target="tls_name_auth"/> for details.</t>
   </section>

   <section title="State Considerations">
     <t>Each DNS Push Notification server is capable of handling some finite number of Push Notification subscriptions. This number will vary from server to server and is based on physical machine characteristics, network bandwidth, and operating system resource allocation. After a client establishes a connection to a DNS server, each record subscription is individually accepted or rejected. Servers may employ various techniques to limit subscriptions to a manageable level. Correspondingly, the client is free to establish simultaneous connections to alternate DNS servers that support DNS Push Notifications for the zone and distribute record subscriptions at its discretion. In this way, both clients and servers can react to resource constraints. Token bucket rate limiting schemes are also effective in providing fairness by a server across numerous client requests.</t>
<?rfc needLines="35" ?>
   </section>

   <section title="Protocol Operation">
     <t>The DNS Push Notification protocol is a session-oriented protocol, and makes use of
     <xref target="I-D.ietf-dnsop-session-signal">DNS Session Signaling</xref>.</t>

     <t>DNS Push Notification clients and servers MUST support DNS Session
     Signaling, but the server must not issue any DNS Session Signaling
     operations until after the client has first initiated a DNS Session
     Signaling operation of its own.
     A single server can support DNS Queries, DNS Updates, and DNS Push
     Notifications (using DNS Session Signaling) on the same TCP port, and
     until the client has sent at least one DNS Session Signaling operation
     the server does not know what kind of client has connected to it.
     Once the client has indicated willingness to use DNS Session Signaling
     operations by sending one of its own, either side of the connection may
     then initiate further Session Signaling operations at any time.</t>

     <t>A DNS Push Notification exchange begins with the client discovering the appropriate server,
     using the procedure described in <xref target="discovery"/>, and then making a TLS/TCP connection to it.</t>

     <t>A typical DNS Push Notification client will immediately issue a DNS
     Session Signaling Idle Timeout operation to request a session timeout
     longer than the the 30-second default, but this is NOT REQUIRED.
     A DNS Push Notification client MAY issue other requests on the
     connection first, and only issue a DNS Session Signaling Idle Timeout
     operation later if it determines that to be necessary.</t>

     <t>Once the connection is made, the client may then add and remove Push Notification subscriptions. In accordance with the current set of active subscriptions the server sends relevant asynchronous Push Notifications to the client. Note that a client MUST be prepared to receive (and silently ignore) Push Notifications for subscriptions it has previously removed, since there is no way to prevent the situation where a Push Notification is in flight from server to client while the client's UNSUBSCRIBE message cancelling that subscription is simultaneously in flight from client to server.</t>

     <t>The exchange between client and server terminates when either end closes the TCP connection with a TCP FIN or RST.</t>

      <section anchor="discovery" title="Discovery">
        <t>The first step in DNS Push Notification subscription is to discover an appropriate DNS server that supports DNS Push Notifications for the desired zone. The client MUST also determine which TCP port on the server is listening for connections, which need not be (and often is not) the typical TCP port 53 used for conventional DNS, or TCP port 853 used for <xref target="RFC7858">DNS over TLS</xref>.</t>
        <t>
          <list style="numbers">
            <t>The client begins the discovery by sending a DNS query to the local resolver with record type <xref target="RFC1035">SOA</xref> for the name of the record it wishes to subscribe.</t>

            <t>If the SOA record exists, it MUST be returned in the Answer Section of the response. If not, the local resolver SHOULD include the SOA record for the zone of the requested name in the Authority Section.</t>

            <t>If no SOA record is returned, the client then strips off the leading label from the requested name. If the resulting name has at least one label in it, the client sends a new SOA query and processing continues at step 2 above. If the resulting name is empty (the root label) then this is a network configuration error and the client gives up. The client MAY retry the operation at a later time.</t>

            <t>Once the SOA is known (either by virtue of being seen in the Answer Section, or in the Authority Section), the client sends a DNS query with type <xref target="RFC2782">SRV</xref> for the record name
            <spanx style="verb">_dns&nbhy;push&nbhy;tls._tcp.<zone></spanx>, where <zone> is the owner name of the discovered SOA record.</t>

            <t>If the zone in question does not offer DNS Push Notifications then SRV record MUST NOT exist and the SRV query will return a negative answer.</t>

            <t>If the zone in question is set up to offer DNS Push Notifications then this SRV record MUST exist.
            The SRV <spanx style="verb">target</spanx> contains the name of the server providing DNS Push Notifications for the zone. The port number on which to contact the server is in the SRV record <spanx style="verb">port</spanx> field. The address(es) of the target host MAY be included in the Additional Section, however, the address records SHOULD be authenticated before use as described below in <xref target="tls_name_auth"/> <xref target="RFC7673"/>.</t>

            <t>More than one SRV record may be returned. In this case, the <spanx style="verb">priority</spanx> and <spanx style="verb">weight</spanx> values in the returned SRV records are used to determine the order in which to contact the servers for subscription requests. As described in <xref target="RFC2782">the SRV specification</xref>, the server with the lowest <spanx style="verb">priority</spanx> is first contacted. If more than one server has the same <spanx style="verb">priority</spanx>, the <spanx style="verb">weight</spanx> indicates the weighted probability that the client should contact that server. Higher weights have higher probabilities of being selected. If a server is not reachable or is not willing to accept a subscription request, then a subsequent server is to be contacted.</t>

          </list>
        </t>

        <t>Each time a client makes a new DNS Push Notification subscription connection, it SHOULD repeat the discovery process in order to determine the preferred DNS server for subscriptions at that time.</t>

        <t>Note that this repeated discovery step is typically very fast and typically results in no queries on the network. The client device MUST respect the DNS TTL values on records it receives, and store them in its local cache with this lifetime. This means that, as long as the DNS TTL values on the authoritative records were set to reasonable values, repeated application of this discovery process can be completed nearly instantaneously by the client, using only locally-stored data.</t>
<?rfc needLines="48" ?>
     </section>

     <section title="DNS Push Notification SUBSCRIBE">
       <t>After connecting, and requesting a longer idle timeout if necessary, a DNS Push Notification client then indicates its desire to receive DNS Push Notifications for a given domain name by sending a SUBSCRIBE request over the established TLS connection to the server. A SUBSCRIBE request is encoded in a <xref target="I-D.ietf-dnsop-session-signal">DNS Session Signaling</xref> message. This specification defines a new DNS Session Signaling TLV for DNS Push Notification SUBSCRIBE Requests/Responses (tentatively Session Signaling Type Code 64).</t>

       <t>A server may not initiate a SUBSCRIBE request.</t>

<?rfc needLines="48" ?>
       <section title="SUBSCRIBE Request">
         <t>A SUBSCRIBE request message begins with the standard
         <xref target="I-D.ietf-dnsop-session-signal">DNS Session Signaling 4-byte header</xref>, followed by the SUBSCRIBE TLV.</t>

         <figure align="center" anchor="subscribe_req"><artwork align="center"><![CDATA[
                                1  1  1  1  1  1
  0  1  2  3  4  5  6  7  8  9  0  1  2  3  4  5
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|                  MESSAGE ID                   |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|QR|   Opcode  |          Z         |   RCODE   |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|             SSOP-TYPE (SUBSCRIBE)             |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|                  SSOP-LENGTH                  |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|                                               |
\                     QNAME                     \
\                                               \
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|                     QTYPE                     |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|                    QCLASS                     |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+]]></artwork>
         </figure>

         <t>The MESSAGE ID field MUST be set to a unique value, that the client is not using for any other active operation on this connection. For the purposes here, a MESSAGE ID is in use on this connection if the client has used it in a request for which it has not yet received a response, or if if the client has used it for a subscription which it has not yet cancelled using UNSUBSCRIBE. In the SUBSCRIBE response the server MUST echo back the MESSAGE ID value unchanged.</t>

         <t>In a request the DNS Header QR bit MUST be zero.</t>

         <t>The DNS Header Opcode field holds the Session Signaling Opcode value (tentatively 6).</t>

         <t>The Z bits MUST be zero on transmission, and MUST be silently ignored on reception.</t>

         <t>The return code (RCODE) field MUST be set to 0 in a request.</t>

         <t>In the SUBSCRIBE TLV the SSOP-TYPE is SUBSCRIBE (tentatively 64). The SSOP-LENGTH is the length of the data that follows, which specifies the name, type, and class of the record(s) being sought.</t>

         <t>A SUBSCRIBE request MUST contain exactly one question. There is no QCOUNT field to specify more than one question. Since SUBSCRIBE requests are sent over TCP, multiple SUBSCRIBE requests can be concatenated in a single TCP stream and packed efficiently into TCP segments.</t>

         <t>If accepted, the subscription will stay in effect until the client cancels the subscription using UNSUBSCRIBE or until the connection between the client and the server is closed.</t>

         <t>SUBSCRIBE requests on a given connection MUST be unique. A client MUST NOT send a SUBSCRIBE message that duplicates the QNAME, QTYPE and QCLASS of an existing active subscription on that TLS/TCP connection. For the purpose of this matching, the established DNS case-insensitivity for US-ASCII letters applies (e.g., "foo.com" and "Foo.com" are the same). If a server receives such a duplicate SUBSCRIBE message this is an error and the server MUST immediately close the TCP connection.</t>

         <t>DNS wildcarding is not supported. That is, a wildcard ("*") in a SUBSCRIBE message matches only a literal wildcard character ("*") in the zone, and nothing else.</t>

         <t>Aliasing is not supported. That is, a CNAME in a SUBSCRIBE message matches only a literal CNAME record in the zone, and nothing else.</t>

         <t>A client may SUBSCRIBE to records that are unknown to the server at the time of the request (providing that the name falls within one of the zone(s) the server is responsible for) and this is not an error. The server MUST accept these requests and send Push Notifications if and when matching records are found in the future.</t>

         <t>If neither QTYPE nor QCLASS are ANY (255) then this is a specific subscription to changes for the given QNAME, QTYPE and QCLASS. If one or both of QTYPE or QCLASS are ANY (255) then this subscription matches any type and/or any class, as appropriate.</t>

         <t>NOTE: A little-known quirk of DNS is that in DNS QUERY requests, QTYPE and QCLASS 255 mean "ANY" not "ALL". They indicate that the server should respond with ANY matching records of its choosing, not necessarily ALL matching records. This can lead to some surprising and unexpected results, were a query returns some valid answers but not all of them, and makes QTYPE=ANY queries less useful than people sometimes imagine.</t>

         <t>When used in conjunction with SUBSCRIBE, QTYPE and QCLASS 255 should be interpreted to mean "ALL", not "ANY". After accepting a subscription where one or both of QTYPE or QCLASS are 255, the server MUST send Push Notification Updates for ALL record changes that match the subscription, not just some of them.</t>
<?rfc needLines="48" ?>
       </section>

       <section title="SUBSCRIBE Response">
         <t>Each SUBSCRIBE request generates exactly one SUBSCRIBE response from the server.</t>

         <t>A SUBSCRIBE response message begins with the standard
         <xref target="I-D.ietf-dnsop-session-signal">DNS Session Signaling 4-byte header</xref>,
         possibly followed by one or more optional modifier TLVs such as a Terminate modifier TLV
         <xref target="I-D.ietf-dnsop-session-signal"/>.</t>

         <figure align="center" anchor="subscribe_resp"><artwork align="center"><![CDATA[
                                1  1  1  1  1  1
  0  1  2  3  4  5  6  7  8  9  0  1  2  3  4  5
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|                  MESSAGE ID                   |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|QR|   Opcode  |          Z         |   RCODE   |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+]]></artwork>
         </figure>

         <t>The MESSAGE ID field MUST echo the value given in the ID field of the SUBSCRIBE request.
         This is how the client knows which request is being responded to.</t>

         <t>In a response the DNS Header QR bit MUST be one.<vspace />
         If the QR bit is not one the message is not a response.</t>

         <t>The DNS Header Opcode field holds the Session Signaling Opcode value (tentatively 6).</t>

         <t>The Z bits MUST be zero on transmission, and MUST be silently ignored on reception.</t>

<?rfc needLines="20" ?>
         <t>In the SUBSCRIBE response the RCODE indicates whether or not the subscription was accepted. Supported RCODEs are as follows:</t>
         <texttable title="SUBSCRIBE Response codes">
         <ttcol align="left">Mnemonic</ttcol>
         <ttcol align="center">Value</ttcol>
         <ttcol align="left">Description</ttcol>
         <c>NOERROR</c><c>0</c><c>SUBSCRIBE successful.</c>
         <c>FORMERR</c><c>1</c><c>Server failed to process request due to a malformed request.</c>
         <c>SERVFAIL</c><c>2</c><c>Server failed to process request due to resource exhaustion.</c>
         <c>NXDOMAIN</c><c>3</c><c>NOT APPLICABLE. DNS Push Notification servers MUST NOT return NXDOMAIN errors in response to SUBSCRIBE requests.</c>
         <c>NOTIMP</c><c>4</c><c>Server does not recognize DNS Session Signaling Opcode.</c>
         <c>REFUSED</c><c>5</c><c>Server refuses to process request for policy or security reasons.</c>
         <c>NOTAUTH</c><c>9</c><c>Server is not authoritative for the requested name.</c>
         <c>SSOPNOTIMP</c><c>11</c><c>SUBSCRIBE operation not supported.</c>
         </texttable>

         <t>This document specifies only these RCODE values for SUBSCRIBE Responses. Servers sending SUBSCRIBE Responses SHOULD use one of these values. However, future circumstances may create situations where other RCODE values are appropriate in SUBSCRIBE Responses, so clients MUST be prepared to accept SUBSCRIBE Responses with any RCODE value.</t>

<?rfc needLines="30" ?>
         <t>If the server sends a nonzero RCODE in the SUBSCRIBE response, either the client is (at least partially) misconfigured or the server resources are exhausted. In either case, the client shouldn't retry the subscription right away. Either end can terminate the connection, but the client may want to try this subscription again or it may have other successful subscriptions that it doesn't want to abandon. If the server sends a nonzero RCODE then it SHOULD append a Terminate modifier TLV
         <xref target="I-D.ietf-dnsop-session-signal"/>
         to the response specifying a delay before the client attempts this operation again. Recommended values for the delay for different RCODE values are given below:
           <list style="bullets">
             <t>For RCODE = 1 (FORMERR) the delay may be any value selected by the implementer. A value of five minutes is RECOMMENDED, to avoid high load from defective clients.</t>

             <t>For RCODE = 2 (SERVFAIL), which occurs due to resource exhaustion, the delay should be chosen according to the level of server overload and the anticipated duration of that overload. By default, a value of one minute is RECOMMENDED.</t>

             <t>For RCODE = 4 (NOTIMP), which occurs on a server that doesn't implement
             <xref target="I-D.ietf-dnsop-session-signal">DNS Session Signaling</xref>,
             it is unlikely that the server will begin supporting DNS Session Signaling
             in the next few minutes, so the retry delay SHOULD be one hour.</t>

             <t>For RCODE = 5 (REFUSED), which occurs on a server that implements DNS Push Notifications, but is currently configured to disallow DNS Push Notifications, the retry delay may be any value selected by the implementer and/or configured by the operator.<vspace />
             This is a misconfiguration, since this server is listed in a <spanx style="verb">_dns&nbhy;push&nbhy;tls._tcp.<zone></spanx> SRV record, but the server itself is not currently configured to support DNS Push Notifications. Since it is possible that the misconfiguration may be repaired at any time, the retry delay should not be set too high. By default, a value of 5 minutes is RECOMMENDED.</t>

             <t>For RCODE = 9 (NOTAUTH), which occurs on a server that implements DNS Push Notifications, but is not configured to be authoritative for the requested name, the retry delay may be any value selected by the implementer and/or configured by the operator.
             <vspace />This is a misconfiguration, since this server is listed in a <spanx style="verb">_dns&nbhy;push&nbhy;tls._tcp.<zone></spanx> SRV record, but the server itself is not currently configured to support DNS Push Notifications for that zone. Since it is possible that the misconfiguration may be repaired at any time, the retry delay should not be set too high. By default, a value of 5 minutes is RECOMMENDED.</t>

             <t>For RCODE = 11 (DNS Push SUBSCRIBE operation not supported),
             which occurs on a server that doesn't implement DNS Push Notifications,
             it is unlikely that the server will begin supporting DNS Push Notifications
             in the next few minutes, so the retry delay SHOULD be one hour.</t>

             <t>For other RCODE values, the retry delay should be set by the server as appropriate for that error condition. By default, a value of 5 minutes is RECOMMENDED.</t>
           </list>
         </t>
         <t>For RCODE = 9 (NOTAUTH), the time delay applies to requests for other names falling within the same zone. Requests for names falling within other zones are not subject to the delay. For all other RCODEs the time delay applies to all subsequent requests to this server.</t>

         <t>After sending an error response the server MAY allow the connection to remain open,
         or MAY send a DNS Push Notification Terminate Session operation TLV and then close the TCP connection,
         as described in the <xref target="I-D.ietf-dnsop-session-signal">DNS Session Signaling specification</xref>.
         Clients MUST correctly handle both cases.</t>

<?rfc needLines="48" ?>
       </section>
     </section>

     <section title="DNS Push Notification Update Messages">
       <t>Once a subscription has been successfully established, the server generates PUSH messages to send to the client as appropriate. An initial PUSH message will be sent immediately in the case that the answer set was non-empty at the moment the subscription was established. Subsequent changes to the answer set are then communicated to the client in subsequent PUSH messages.</t>

       <section title="PUSH Message format">

         <t>A PUSH message begins with the standard
         <xref target="I-D.ietf-dnsop-session-signal">DNS Session Signaling 4-byte header</xref>, followed by the PUSH TLV.</t>

         <t>The format of PUSH messages borrows from the existing <xref target="RFC2136">DNS Update</xref> protocol, with some simplifications.</t>

         <figure align="center" anchor="push"><artwork align="center"><![CDATA[
                                1  1  1  1  1  1
  0  1  2  3  4  5  6  7  8  9  0  1  2  3  4  5
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|                  MESSAGE ID                   |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|QR|   Opcode  |          Z         |   RCODE   |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|               SSOP-TYPE (PUSH)                |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|                  SSOP-LENGTH                  |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|                    UPCOUNT                    |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|                                               |
\              Resource Records...              \
\                                               \
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+]]></artwork>
         </figure>

         <t>The MESSAGE ID field MUST be set to zero on transmission, and silently ignored on reception. A PUSH message could potentially match more than one subscription, or could relate to a subscription that the client has just cancelled with an UNSUBSCRIBE message, so the MESSAGE ID field serves no useful purpose.</t>

         <t>In a PUSH message the DNS Header QR bit MUST be zero.</t>

         <t>The DNS Header Opcode field holds the Session Signaling Opcode value (tentatively 6).</t>

         <t>The Z bits MUST be zero on transmission, and MUST be silently ignored on reception.</t>

         <t>The return code (RCODE) field MUST be set to 0 in a request.</t>

         <t>In the PUSH message TLV the SSOP-TYPE is PUSH (tentatively 65). The SSOP-LENGTH is the length of the SSOP-DATA that follows.</t>

         <t>The SSOP-DATA contains a two-byte count of the number of records that follow, followed by the records, in customary Resource Record format (as used in <xref target="RFC2136">DNS Update</xref> messages).</t>

<?rfc needLines="15" ?>
         <t>The SSOP-DATA contains the relevant change information for the client,
         formatted identically to a <xref target="RFC2136">DNS Update</xref>. To recap:
           <list style="bullets">
             <t>Delete all RRsets from a name:<vspace />
             TTL=0, CLASS=ANY, RDLENGTH=0, TYPE=ANY.</t>
             <t>Delete an RRset from a name:<vspace />
             TTL=0, CLASS=ANY, RDLENGTH=0;<vspace />
             TYPE specifies the RRset being deleted.</t>
             <t>Delete an individual RR from a name:<vspace />
             TTL=0, CLASS=NONE;<vspace />
             TYPE, RDLENGTH and RDATA specifies the RR being deleted.</t>
             <t>Add to an RRset:<vspace />
             TTL, CLASS, TYPE, RDLENGTH and RDATA specifies the RR being added.</t>
           </list>
         </t>
  
         <t>When processing the records received in a PUSH Message, the receiving client MUST validate that the records being added or deleted correspond with at least one currently active subscription on that connection. Specifically, the record name MUST match the name given in the SUBSCRIBE request, subject to the usual established DNS case-insensitivity for US-ASCII letters.
         If the QTYPE in the SUBSCRIBE request was not ANY (255) then the TYPE of the record must match the QTYPE given in the SUBSCRIBE request.
         If the QCLASS in the SUBSCRIBE request was not ANY (255) then the CLASS of the record must match the QCLASS given in the SUBSCRIBE request.
         If a matching active subscription on that connection is not found, then that individual record addition/deletion is silently ignored. Processing of other additions and deletions in this message is not affected. The TCP connection is not closed. This is to allow for the unavoidable race condition where a client sends an outbound UNSUBSCRIBE while inbound PUSH messages for that subscription from the server are still in flight.</t>
  
         <t>In the case where a single change affects more than one active subscription, only one PUSH message is sent. For example, a PUSH message adding a given record may match both a SUBSCRIBE request with the same QTYPE and a different SUBSCRIBE request with QTYPE=ANY. It is not the case that two PUSH messages are sent because the new record matches two active subscriptions.</t>
  
         <t>The server SHOULD encode change notifications in the most efficient manner possible. For example, when three AAAA records are deleted from a given name, and no other AAAA records exist for that name, the server SHOULD send a "delete an RRset from a name" PUSH message, not three separate "delete an individual RR from a name" PUSH messages. Similarly, when both an SRV and a TXT record are deleted from a given name, and no other records of any kind exist for that name, the server SHOULD send a "delete all RRsets from a name" PUSH message, not two separate "delete an RRset from a name" PUSH messages.</t>
  
         <t>A server SHOULD combine multiple change notifications in a single PUSH message when possible, even if those change notifications apply to different subscriptions. Conceptually, a PUSH messages is a connection-level concept, not a subscription-level concept.</t>
  
         <t>Reception of a PUSH message does not directly generate a response back to the server. (Updates may indirectly generate other operations; e.g., a Push Notification Update Message declaring the appearance of a PTR record could lead to a query for the SRV record named in the rdata of that PTR record <xref target="RFC6763"/>.)</t>
  
         <t>The TTL of an added record is stored by the client and decremented as time passes, with the caveat that for as long as a relevant subscription is active, the TTL does not decrement below 1 second. For as long as a relevant subscription remains active, the client SHOULD assume that when a record goes away the server will notify it of that fact. Consequently, a client does not have to poll to verify that the record is still there. Once a subscription is cancelled (individually, or as a result of the TCP connection being closed) record ageing resumes and records are removed from the local cache when their TTL reaches zero.</t>
<?rfc needLines="48" ?>
       </section>
     </section>

     <section title="DNS Push Notification UNSUBSCRIBE">
       <t>To cancel an individual subscription without closing the entire connection, the client sends an UNSUBSCRIBE message over the established TCP connection to the server. The UNSUBSCRIBE message is encoded in a
       <xref target="I-D.ietf-dnsop-session-signal">DNS Session Signaling</xref> message. This specification defines a new DNS Session Signaling TLV for DNS Push Notification UNSUBSCRIBE Requests/Responses (tentatively Session Signaling Type Code 66).</t>

       <t>A server may not initiate an UNSUBSCRIBE request.</t>

<?rfc needLines="48" ?>
       <section title="UNSUBSCRIBE Request">

         <t>An UNSUBSCRIBE request message begins with the standard
         <xref target="I-D.ietf-dnsop-session-signal">DNS Session Signaling 4-byte header</xref>, followed by the UNSUBSCRIBE TLV.</t>

         <figure align="center" anchor="unsub_req"><artwork align="center"><![CDATA[
                                1  1  1  1  1  1
  0  1  2  3  4  5  6  7  8  9  0  1  2  3  4  5
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|                  MESSAGE ID                   |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|QR|   Opcode  |          Z         |   RCODE   |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|            SSOP-TYPE (UNSUBSCRIBE)            |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|                SSOP-LENGTH (0)                |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+]]></artwork>
         </figure>

         <t>The MESSAGE ID field MUST match the value given in the ID field of an active SUBSCRIBE request.
         This is how the server knows which SUBSCRIBE request is being cancelled.
         After receipt of the UNSUBSCRIBE request, the SUBSCRIBE request is no longer active.
         If a server receives an UNSUBSCRIBE message
         where the MESSAGE ID does not match the ID of an active SUBSCRIBE request
         this is an error and the the server MUST return a response containing RCODE = 1 (FORMERR).
         In the UNSUBSCRIBE response the server MUST echo back the MESSAGE ID value unchanged.
         It is allowable for the client to issue an UNSUBSCRIBE request for a previous SUBSCRIBE request
         for which the client has not yet received a SUBSCRIBE response.
         This is to allow for the case where a client starts and stops a subscription in less than the
         round-trip time to the server.
         The client is NOT required to wait for the SUBSCRIBE response before issuing the UNSUBSCRIBE request.</t>

         <t>In a request the DNS Header QR bit MUST be zero.</t>

         <t>The DNS Header Opcode field holds the Session Signaling Opcode value (tentatively 6).</t>

         <t>The Z bits MUST be zero on transmission, and MUST be silently ignored on reception.</t>

         <t>The return code (RCODE) field MUST be set to 0 in a request.</t>

         <t>In the UNSUBSCRIBE TLV the SSOP-TYPE is UNSUBSCRIBE (tentatively 66).</t>

         <t>The SSOP-LENGTH is zero.</t>
<?rfc needLines="48" ?>
       </section>

       <section title="UNSUBSCRIBE Response">
         <t>Each UNSUBSCRIBE request generates exactly one UNSUBSCRIBE response from the server.</t>

         <t>An UNSUBSCRIBE response message contains with the standard
         <xref target="I-D.ietf-dnsop-session-signal">DNS Session Signaling 4-byte header</xref>.</t>

         <figure align="center" anchor="unsub_resp"><artwork align="center"><![CDATA[
                                1  1  1  1  1  1
  0  1  2  3  4  5  6  7  8  9  0  1  2  3  4  5
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|                  MESSAGE ID                   |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|QR|   Opcode  |          Z         |   RCODE   |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+]]></artwork>
         </figure>

         <t>The MESSAGE ID field MUST echo the value given in the ID field of the UNSUBSCRIBE request.
         This is how the client knows which request is being responded to.</t>

         <t>In a response the DNS Header QR bit MUST be one.<vspace />
         If the QR bit is not one the message is not a response.</t>

         <t>The DNS Header Opcode field holds the Session Signaling Opcode value (tentatively 6).</t>

         <t>The Z bits MUST be zero on transmission, and MUST be silently ignored on reception.</t>

         <t>In the UNSUBSCRIBE response the RCODE indicates whether or not the unsubscribe request was successful. Supported RCODEs are as follows:</t>
         <texttable title="UNSUBSCRIBE Response codes">
         <ttcol align="left">Mnemonic</ttcol>
         <ttcol align="center">Value</ttcol>
         <ttcol align="left">Description</ttcol>
         <c>NOERROR</c><c>0</c><c>UNSUBSCRIBE successful.</c>
         <c>FORMERR</c><c>1</c><c>Server failed to process request due to a malformed request.</c>
         <c>NOTIMP</c><c>4</c><c>Server does not recognize DNS Session Signaling Opcode.</c>
         <c>SSOPNOTIMP</c><c>11</c><c>UNSUBSCRIBE operation not supported.</c>
         </texttable>

         <t>This document specifies only these RCODE values for UNSUBSCRIBE Responses. Servers sending UNSUBSCRIBE Responses SHOULD use one of these values. However, future circumstances may create situations where other RCODE values are appropriate in UNSUBSCRIBE Responses, so clients MUST be prepared to accept UNSUBSCRIBE Responses with any RCODE value.</t>

         <t>Having being successfully revoked with a correctly-formatted UNSUBSCRIBE message (resulting in a response with RCODE NOERROR) the previously referenced subscription is no longer active and the server MAY discard the state associated with it immediately, or later, at the server's discretion.</t>

         <t>Nonzero RCODE values signal some kind of error.</t>

         <t>RCODE value FORMERR indicates an incorrect MESSAGE ID or other message format error.</t>

         <t>RCODE values NOTIMP and SSOPNOTIMP should not occur in practice.</t>

         <t>A server would only generate NOTIMP if it did not support Session Signaling, and if the server does not support Session Signaling then it should not be possible for a client to have an active subscription to cancel.</t>

         <t>Similarly, a server would only generate SSOPNOTIMP if it did not support Push Notifications, and if the server does not support Push Notifications then it should not be possible for a client to have an active subscription to cancel.</t>

         <t>All nonzero RCODE values indicate a serious problem with the client. After sending an error response, the server SHOULD send a DNS Push Notification Terminate Session operation TLV and then close the TCP connection, as described in the <xref target="I-D.ietf-dnsop-session-signal">DNS Session Signaling specification</xref>.</t>

<?rfc needLines="48" ?>
       </section>
     </section>

     <section title="DNS Session Signaling Push Notification RECONFIRM">
       <t>Sometimes, particularly when used with a <xref target="I-D.ietf-dnssd-hybrid">Hybrid Proxy</xref>, a DNS Zone may contain stale data. When a client encounters data that it believe may be stale (e.g., an SRV record referencing a target host+port that is not responding to connection requests) the client can send a RECONFIRM message to request that the server re-verify that the data is still valid. For a Hybrid Proxy, this causes it to issue new Multicast DNS requests to ascertain whether the target device is still present. For other types of DNS server, the RECONFIRM operation is currently undefined and SHOULD be silently ignored.</t>

       <t>A RECONFIRM request is formatted identically to a SUBSCRIBE request, except that the TLV type is RECONFIRM (tentatively 67) instead of SUBSCRIBE. Additionally, QTYPE MUST NOT be the value ANY (255) and QCLASS MUST NOT be the value ANY (255).</t>

       <t>Like all <xref target="I-D.ietf-dnsop-session-signal">DNS Session Signaling</xref> requests, a RECONFIRM request MUST contain a unique MESSAGE ID, not currently in use in this session.</t>

       <t>A RECONFIRM request generates exactly one RECONFIRM response from the server, formatted identically to a SUBSCRIBE response, which echoes back the unique MESSAGE ID from the RECONFIRM request.</t>

       <t>In the RECONFIRM response the RCODE indicates whether or not the request was successful. Supported RCODEs are as follows:</t>
       <texttable title="RECONFIRM Response codes">
       <ttcol align="left">Mnemonic</ttcol>
       <ttcol align="center">Value</ttcol>
       <ttcol align="left">Description</ttcol>
       <c>NOERROR</c><c>0</c><c>RECONFIRM successful.</c>
       <c>FORMERR</c><c>1</c><c>Server failed to process request due to a malformed request.</c>
       <c>NOTIMP</c><c>4</c><c>Server does not recognize DNS Session Signaling Opcode.</c>
       <c>SSOPNOTIMP</c><c>11</c><c>RECONFIRM operation not supported.</c>
       </texttable>

       <t>This document specifies only these RCODE values for RECONFIRM Responses. Servers sending RECONFIRM Responses SHOULD use one of these values. However, future circumstances may create situations where other RCODE values are appropriate in RECONFIRM Responses, so clients MUST be prepared to accept RECONFIRM Responses with any RCODE value.</t>

       <t>A correctly-formatted RECONFIRM message results in a response with RCODE NOERROR.</t>

       <t>Nonzero RCODE values signal some kind of error.
       If the server sends a nonzero RCODE then it SHOULD append a Terminate modifier TLV
       <xref target="I-D.ietf-dnsop-session-signal"/>
       to the response specifying a delay before the client attempts this operation again. The RECOMMENDED value for the delay is five minutes. For serious errors, after sending the error response, the server SHOULD send a DNS Push Notification Terminate Session operation TLV and then close the TCP connection, as described in the <xref target="I-D.ietf-dnsop-session-signal">DNS Session Signaling specification</xref>.</t>

       <t>If, after receiving a valid RECONFIRM request, the server determines that the records are in fact no longer valid, then subsequent DNS PUSH Messages will be generated to inform interested clients. Thus, one client discovering that a previously-advertised printer is no longer present has the side effect of informing all other interested clients that the printer in question is now gone.</t>
<?rfc needLines="48" ?>
     </section>

     <section title="Client-Initiated Termination">

       <t>An individual subscription is terminated by sending an UNSUBSCRIBE TLV for that specific subscription, or all subscriptions can be cancelled at once by the client closing the connection. When a client terminates an individual subscription (via UNSUBSCRIBE) or all subscriptions on that connection (by closing the connection) it is signaling to the server that it is longer interested in receiving those particular updates. It is informing the server that the server may release any state information it has been keeping with regards to these particular subscriptions.</t>

       <t>After terminating its last subscription on a connection via UNSUBSCRIBE, a client MAY close the connection immediately, or it may keep it open if it anticipates performing further operations on that connection in the future. If a client wishes to keep an idle connection open, it MUST continue to meet its keepalive obligations
       <xref target="I-D.ietf-dnsop-session-signal"/> or the server is entitled to close the connection (see below).</t>

       <t>If a client plans to terminate one or more subscriptions on a connection and doesn't intend to keep that connection open, then as an efficiency optimization it MAY instead choose to simply close the connection, which implicitly terminates all subscriptions on that connection. This may occur because the client computer is being shut down, is going to sleep, the application requiring the subscriptions has terminated, or simply because the last active subscription on that connection has been cancelled.</t>

       <t>When closing a connection, a client will generally do an abortive disconnect, sending a TCP RST. This immediately discards all remaining inbound and outbound data, which is appropriate if the client no longer has any interest in this data. In the BSD Sockets API, sending a TCP RST is achieved by setting the SO_LINGER option with a time of 0 seconds and then closing the socket.</t>

       <t>If a client has performed operations on this connection that it would not want lost (like DNS updates) then the client SHOULD do an orderly disconnect, sending a TCP FIN. In the BSD Sockets API, sending a TCP FIN is achieved by calling "shutdown(s,SHUT_WR)" and keeping the socket open until all remaining data has been read from it.</t>

     </section>
     <?rfc needLines="18" ?>
   </section>

   <section anchor="Security" title="Security Considerations">
     <t>TLS support is REQUIRED in DNS Push Notifications. There is no provision for opportunistic encryption using a mechanism like <spanx style="verb">STARTTLS</spanx>.</t>

     <t>DNSSEC is RECOMMENDED for DNS Push Notifications. TLS alone does not provide complete security. TLS certificate verification can provide reasonable assurance that the client is really talking to the server associated with the desired host name, but since the desired host name is learned via a DNS SRV query, if the SRV query is subverted then the client may have a secure connection to a rogue server. DNSSEC can provided added confidence that the SRV query has not been subverted.</t>

     <section title="Security Services">
       <t>It is the goal of using TLS to provide the following security services:
         <list style="hanging">
           <t hangText="Confidentiality:">All application-layer communication is encrypted with the goal that no party should be able to decrypt it except the intended receiver.</t>
           <t hangText="Data integrity protection:">Any changes made to the communication in transit are detectable by the receiver.</t>
           <t hangText="Authentication:">An end-point of the TLS communication is authenticated as the intended entity to communicate with.</t>
         </list>
       </t>
       <t>Deployment recommendations on the appropriate key lengths and cypher suites are beyond the scope of this document. Please refer to <xref target="RFC7525">TLS Recommendations</xref> for the best current practices. Keep in mind that best practices only exist for a snapshot in time and recommendations will continue to change. Updated versions or errata may exist for these recommendations.</t>
     </section>

     <section anchor="tls_name_auth" title="TLS Name Authentication">
       <t>As described in <xref target="discovery"/>, the client discovers the DNS Push Notification server using an SRV lookup for the record name <spanx style="verb">_dns&nbhy;push&nbhy;tls._tcp.<zone></spanx>. The server connection endpoint SHOULD then be authenticated using DANE TLSA records for the associated SRV record. This associates the target's name and port number with a trusted TLS certificate <xref target="RFC7673"/>. This procedure uses the TLS Sever Name Indication (SNI) extension <xref target="RFC6066"/> to inform the server of the name the client has authenticated through the use of TLSA records. Therefore, if the SRV record passes DNSSEC validation and a TLSA record matching the target name is useable, an SNI extension MUST be used for the target name to ensure the client is connecting to the server it has authenticated. If the target name does not have a usable TLSA record, then the use of the SNI extension is optional.</t>
     </section>

     <section title="TLS Compression">
       <t>In order to reduce the chances of compression-related attacks, TLS-level compression SHOULD be disabled when using TLS versions 1.2 and earlier. In the draft version of <xref target="I-D.ietf-tls-tls13">TLS 1.3</xref>, TLS-level compression has been removed completely.</t>
     </section>

     <section title="TLS Session Resumption">
       <t>TLS Session Resumption is permissible on DNS Push Notification servers. The server may keep TLS state with Session IDs <xref target="RFC5246"/> or operate in stateless mode by sending a Session Ticket <xref target="RFC5077"/> to the client for it to store. However, once the connection is closed, any existing subscriptions will be dropped. When the TLS session is resumed, the DNS Push Notification server will not have any subscription state and will proceed as with any other new connection. Use of TLS Session Resumption allows a new TLS connection to be set up more quickly, but the client will still have to recreate any desired subscriptions.</t>
<?rfc needLines="9" ?>
     </section>
   </section>

   <section anchor="IANA" title="IANA Considerations">
     <t>This document defines the service name: <spanx style="verb">_dns&nbhy;push&nbhy;tls._tcp</spanx>.<vspace />
     It is only applicable for the TCP protocol.<vspace />
     This name is to be published in the IANA Service Name Registry.</t>
     <t>This document defines three DNS Session Signaling TLV types:
     SUBSCRIBE with (tentative) value 64,
     PUSH with (tentative) value 65,
     UNSUBSCRIBE with (tentative) value 66, and
     RECONFIRM with (tentative) value 67.</t>
   </section>

   <section anchor="Acknowledgements" title="Acknowledgements">
     <t>The authors would like to thank Kiren Sekar and Marc Krochmal for previous work completed in this field.</t>

     <t>This draft has been improved due to comments from Ran Atkinson, Tim Chown, Mark Delany, Ralph Droms, Bernie Volz, Jan Komissar, Manju Shankar Rao, Markus Stenberg, Dave Thaler, and Soraia Zlatkovic.</t>
<?rfc needLines="15" ?>
   </section>
 </middle>

 <!--  *****BACK MATTER ***** -->

 <back>
   <!-- References split into informative and normative -->

   <!-- There are 2 ways to insert reference entries from the citation libraries:
    1. define an ENTITY at the top, and use "ampersand character"RFC2629; here (as shown)
    2. simply use a PI "less than character"?rfc include="reference.RFC.2119.xml"?> here
       (for I-Ds: include="reference.I-D.narten-iana-considerations-rfc2434bis.xml")

    Both are cited textually in the same manner: by using xref elements.
    If you use the PI option, xml2rfc will, by default, try to find included files in the same
    directory as the including file. You can also define the XML_LIBRARY environment variable
    with a value containing a set of directories to search.  These can be either in the local
    filing system or remote ones accessed by http (http://domain/dir/... ).-->

   <references title="Normative References">
     &I-D.ietf-tls-tls13;
     &RFC0768;
     &RFC0793;
     &RFC1034;
     &RFC1035;
     &RFC1123;
     &RFC2119;
     &RFC2136;
     &RFC2782;
     &RFC5246;
     &RFC6066;
     &RFC6895;
     &RFC7673;
     &RFC7766;
     &I-D.ietf-dnsop-session-signal;
   </references>

<!-- Use needLines to make sure "Authors' Addresses" line doesn't appear as the last line on the page -->
<?rfc needLines="9" ?>

   <references title="Informative References">
     &I-D.dukkipati-tcpm-tcp-loss-probe;
     &I-D.sekar-dns-llq;
     &I-D.ietf-dnssd-hybrid;
     &RFC1996;
     &RFC4287;
     &RFC4953;
     &RFC5077;
     &RFC6762;
     &RFC6763;
     &RFC6824;
     &RFC7413;
     &RFC7525;

     <reference anchor="XEP0060">
       <front>
         <title>Publish-Subscribe</title>
         <author initials="P." surname="Millard" fullname="Peter Millard">
           <organization/>
           <address>
             <email/>
           </address>
         </author>
         <author initials="P." surname="Saint-Andre" fullname="Peter Saint-Andre">
           <organization/>
           <address>
             <email>peter@andyet.net</email>
           </address>
         </author>
         <author initials="R." surname="Meijer" fullname="Ralph Meijer">
           <organization/>
           <address>
             <email>ralphm@ik.nu</email>
           </address>
         </author>
         <date day="01" month="July" year="2010"/>
       </front>
       <seriesInfo name="XSF XEP" value="0060"/>
       <format type="HTML" target="http://xmpp.org/extensions/xep-0060.html"/>
     </reference>

     <reference anchor='IPJ.9-4-TCPSYN'>
       <front>
         <title>Defenses Against TCP SYN Flooding Attacks</title>
         <author initials='W.' surname='Eddy' fullname='Wesley Eddy'>
           <organization>Verizon Federal Network Systems</organization>
           <address>
             <email>weddy@grc.nasa.gov</email>
           </address>
         </author>
         <date year='2006' month='December' />
         <keyword>TCP</keyword>
       </front>
       <seriesInfo name="The Internet Protocol Journal," value='Cisco Systems' />
       <seriesInfo name='Volume' value='9' />
       <seriesInfo name='Number' value='4' />
       <format type='PDF' octets='882020' target="http://www.cisco.com/web/about/ac123/ac147/archived_issues/ipj_9-4/ipj_9-4.pdf" />
       <format type='HTML' octets='65566' target="http://www.cisco.com/web/about/ac123/ac147/archived_issues/ipj_9-4/syn_flooding_attacks.html" />
     </reference>

     <reference anchor='obs' target="https://en.wikipedia.org/wiki/Observer_pattern">
       <front>
         <title>Observer Pattern</title>
          <author/>
          <date/>
       </front>
     </reference>

     &RFC7858;

   </references>
 </back>
</rfc>

PAFTECH AB 2003-20262026-04-24 01:18:38