draft-sctl-service-registration-01.txt   draft-sctl-service-registration-02.txt 
Internet Engineering Task Force S. Cheshire Internet Engineering Task Force S. Cheshire
Internet-Draft Apple Inc. Internet-Draft Apple Inc.
Intended status: Informational T. Lemon Intended status: Informational T. Lemon
Expires: January 3, 2019 Nibbhaya Consulting Expires: January 15, 2019 Nibbhaya Consulting
July 2, 2018 July 14, 2018
Service Registration Protocol for DNS-Based Service Discovery Service Registration Protocol for DNS-Based Service Discovery
draft-sctl-service-registration-01 draft-sctl-service-registration-02
Abstract Abstract
The DNS-SD Service Registration Protocol uses the standard DNS Update The DNS-SD Service Registration Protocol uses the standard DNS Update
mechanism to enable DNS-Based Service Discovery using only unicast mechanism to enable DNS-Based Service Discovery using only unicast
packets. This eliminates the dependency on Multicast DNS as the packets. This eliminates the dependency on Multicast DNS as the
foundation layer, which greatly improves scalability and improves foundation layer, which greatly improves scalability and improves
performance on networks where multicast service is not an optimal performance on networks where multicast service is not an optimal
choice, particularly 802.11 (WiFi) and 802.15 (IoT) networks. DNS-SD choice, particularly 802.11 (Wi-Fi) and 802.15.4 (IoT) networks.
Service registration uses public keys and SIG(0) to allow services to DNS-SD Service registration uses public keys and SIG(0) to allow
defend their registrations against attack. services to defend their registrations against attack.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on January 3, 2019. This Internet-Draft will expire on January 15, 2019.
Copyright Notice Copyright Notice
Copyright (c) 2018 IETF Trust and the persons identified as the Copyright (c) 2018 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 14 skipping to change at page 2, line 14
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
1. Introduction 1. Introduction
DNS-Based Service Discovery [RFC6763] is a component of Zero DNS-Based Service Discovery [RFC6763] is a component of Zero
Configuration Networking [RFC6760] [ZC] [I-D.cheshire-dnssd-roadmap]. Configuration Networking [RFC6760] [ZC] [I-D.cheshire-dnssd-roadmap].
This document describes an enhancement to DNS-Based Service Discovery
[RFC6763] that allows services to automatically register their
services using the DNS protocol rather than using mDNS. There is
already a large installed base of DNS-SD clients that can do service
discovery using the DNS protocol. This extension makes it much
easier to take advantage of this existing functionality.
This document is intended for three audiences: implementors of
software that provides services that should be advertised using DNS-
SD, implementors of DNS servers that will be used in contexts where
DNS-SD registration is needed, and administrators of networks where
DNS-SD service is required. The document is intended to provide
sufficient information to allow interoperable implementation of the
registration protocol.
DNS-Based Service Discovery (DNS-SD) allows services to advertise the DNS-Based Service Discovery (DNS-SD) allows services to advertise the
fact that they provide service, and to provide the information fact that they provide service, and to provide the information
required to access that service. Clients can then discover the set required to access that service. Clients can then discover the set
of services of a particular type that are available. They can then of services of a particular type that are available. They can then
select a service from among those that are available and obtain the select a service from among those that are available and obtain the
information required to use it. information required to use it.
The DNS-SD Service Registration protocol, described in this document, The DNS-SD Service Registration protocol, described in this document,
provides a reasonably secure mechanism for publishing this provides a reasonably secure mechanism for publishing this
information: what services are offered, and how to use them. Once information. Once published, these services can be readily
published, these services can be readily discovered by clients using discovered by clients using standard DNS lookups.
standard DNS lookups.
In the DNS-Based Service Discovery specification [RFC6763] Section 10 In the DNS-Based Service Discovery specification [RFC6763] Section 10
"Populating the DNS with Information" briefly discusses ways that "Populating the DNS with Information" briefly discusses ways that
services can publish their information in the DNS namespace. In the services can publish their information in the DNS namespace. In the
case of Multicast DNS [RFC6762], allows clients to directly query case of Multicast DNS [RFC6762], it allows services to publish their
services on the local link for names in the ".local" namespace. information on the local link, using names in the ".local" namespace,
which makes their services directly discoverable by peers attached to
that same local link.
RFC6763 also allows clients to discover services using the DNS RFC6763 also allows clients to discover services using the DNS
protocol [RFC1035]; this is done either by having a system protocol [RFC1035]. This can be done by having a system
administrator manually configure service information in the DNS, or administrator manually configure service information in the DNS, but
by using a Discovery Proxy [I-D.ietf-dnssd-hybrid], which performs manually populating DNS authoritative server databases is costly and
mDNS queries on behalf clients issuing queries using DNS. This potentially error-prone, and requires a knowledgable network
eliminats the "link local" limitation of mDNS, but provides no administrator. Consequently, although all DNS-SD client
additional security, and still relies on multicast. implementations of which we are aware support DNS-SD using DNS
queries, in practice it is used much less frequently than mDNS. The
Manual configuration of DNS servers is costly and failure-prone, and Discovery Proxy [I-D.ietf-dnssd-hybrid] provides one way to
requires a knowledgable network administrator. Consequently, automatically populate the DNS namespace, but is only appropriate on
although all DNS-SD implementations of which we are aware support it, networks where services are already advertised using mDNS. This
it is much less frequently used than mDNS. This document describes a document describes a solution more suitable for networks where
solution: a way to provide DNS-SD using DNS that can be as automatic multicast is inefficient, or undesirable for other reasons, by
as multicast DNS, but with better performance, scalability and supporting both offering of services, and discovery of services,
security. using unicast.
2. Service Registration Protocol 2. Service Registration Protocol
Services using the DNS-SD Service Registration Protocol use DNS Services that implement the DNS-SD Service Registration Protocol use
Update [RFC2136] [RFC3007] to publish service information in the DNS. DNS Update [RFC2136] [RFC3007] to publish service information in the
DNS. Two variants exist, one for full-featured devices, and one for
devices designed for "Constrained-Node Networks" [RFC7228].
Full-featured devices are either configured manually, or use the
"dr._dns-sd._udp" query [RFC6763] to learn the default registration
domain from the network. Using the chosen service registration
domain, full-featured devices construct the names of the SRV, TXT,
and PTR records describing their service(s). For these names they
then discover the zone apex of the closest enclosing DNS zone using
SOA queries [I-D.ietf-dnssd-push]. Having discovered the enclosing
DNS zone, they query for the "_dns-update._udp<zone>" SRV record to
discover the server to which they should send DNS updates.
For devices designed for "Constrained-Node Networks" [RFC7228] some
simplifications are used. Instead of being configured with (or
discovering) the service registration domain, the (proposed) special
use domain name [RFC6761] "services.arpa" is used. Instead of
learning the server to which they should send DNS updates, a fixed
IPv6 anycast address is used (value TBD). It is the responsibility
of a "Constrained-Node Network" supporting DNS-SD Service
Registration Protocol to provide appropriate anycast routing to
deliver the DNS updates to the appropriate server. It is the
responsibility of the DNS-SD Service Registration server on a
"Constrained-Node Network" to handle the updates appropriately. In
some network environments, updates may be accepted directly into a
local "services.arpa" zone, which has only local visibility. In
other network environments, updates for names ending in
"services.arpa" may be rewritten internally to names with broader
visibility.
The reason for these different assumptions is that "Constrained-Node
Networks" generally require special egress support, and Anycast
packets captured at the "Constrained-Node Network" egress can be
assumed to have originated locally. Low-power devices that typically
use "Constrained-Node Networks" may have very limited battery power.
The additional DNS lookups required to discover a registration server
and then communicate with it will increase the power required to
advertise a service; for low-power devices, the additional
flexibility this provides does not justify the additional use of
power.
General networks have the potential to have more complicated
topologies at the Internet layer, which makes anycast routing more
difficult. Such networks may or may not have the infrastructure
required to route anycast to a server that can process it. However,
they can be assumed to be able to provide registration domain
discovery and routing. By requiring the use of TCP, the possibility
of off-network spoofing is eliminated.
We will discuss several parts to this process: how to know what to We will discuss several parts to this process: how to know what to
publish, how to know where to publish it (under what name), how to publish, how to know where to publish it (under what name), how to
publish it, how to secure its publication, and how to maintain the publish it, how to secure its publication, and how to maintain the
information once published. information once published.
2.1. What to publish 2.1. What to publish
RFC 6763 describes the details of what is to be published. In We refer to the message that services using the DNSSD Registration
general terms, a service will have a name under which it offers Protocol send as a Registration. Three types of updates appear in a
services ([RFC6763] section 4.1.1) and one or more service names Registration: Service Discovery records, Service Description records,
under which that instance name appears ([RFC6763] section 4.1.2). and Host Description records.
The full details of how this works are described in section 4 of that
document in its entirety. A service publishes its contact
information using an SRV record on the Service Instance Name. It can
also publish TXT records with additional information about the
service; this is discussed in section 6 of RFC 6763.
RFC 6763 is the definitive source for information about what to o Service Discovery records are one or more PTR RRs, mapping from
publish; the reason for mentioning it here is that the reader may the generic service type (or subtype) to the specific Service
prefer to have an overview of the whole service registration process Instance Name.
before digging into the details. Also, the "Service Instance Name"
is an important aspect of first-come, first-serve naming, which we o Service Description records are exactly one SRV RR, and one or
describe later on in this document. more TXT RRs, both with the same name, the Service Instance Name
([RFC6763] section 4.1). In principle Service Description records
can include other record types, with the same Service Instance
Name, though in practice they rarely do. The Service Instance
Name MUST be referenced by one or more Service Discovery PTR
records, unless it is a placeholder service registration for an
intentionally non-discoverable service name.
o The Host Description records for a service are a KEY RR, used to
claim exclusive ownership of the service registration, and one or
more RRs of type A or AAAA, giving the IPv4 or IPv6 address(es) of
the host where the service resides.
RFC 6763 describes the details of what each of these types of updates
contains and is the definitive source for information about what to
publish; the reason for mentioning it here is to provide the reader
with enough information about what will be published that the service
registration process can be understood at a high level without first
learning the full details of DNS-SD. Also, the "Service Instance
Name" is an important aspect of first-come, first-serve naming, which
we describe later on in this document.
2.2. Where to publish it 2.2. Where to publish it
Multicast DNS uses a single namespace, ".local", which is valid on Multicast DNS uses a single namespace, ".local", which is valid on
the local link. This convenience is not available for DNS-SD using the local link. This convenience is not available for DNS-SD using
the DNS protocol: the portion of the DNS namespace in which services the DNS protocol: services must exist in some specific unicast
on the local network are to be published must be discovered by the namespace.
service before it can register itself.
Names published using DNS-SD service registration will be published As described above, full-featured devices are responsible for knowing
under some name other than .local. However, the process of in what domain they should register their services. Devices made for
discovering what that name is is complicated, and for any given "Constrained-Node Networks" register in the (proposed) special use
network it should always be the case that there will be just one domain name [RFC6761] "services.arpa", and let the DNS-SD Service
namespace in which registered names will be published. Rather than Registration server handle rewriting that to a different domain if
requiring the service to discover this name before issuing a necessary.
registration, the service SHOULD simply use the name ".local." The
DNS server that receives the registration request will rewrite all
instances of the terminal label ".local" to use the local
registration domain name. The response to the DNS Update being used
to register the service will contain the rewritten names, instead of
".local". Subsequent updates should still use the ".local" domain
and not the registration domain, since the registration domain may
change over time or when the service is physically moved to a new
network.
2.3. How to publish it 2.3. How to publish it
DNS Updates are very flexible. As a consequence, it is possible to It is possible to issue a DNS Update that does several things at
do the entire registration in a single DNS message. The update once; this means that it's possible to do all the work of adding a
consists of two elements. The first updates the Service Name by PTR resource record to the PTR RRset on the Service Name if it
adding a PTR record pointing to the Service Instance Name. The already exists, or creating one if it doesn't, and creating or
second updates the Service Instance Name. The second creates or updating the Service Instance Name and Host Description in a single
updates the Service Instance Name update adds an SRV record and a KEY transaction.
record, and optionally adds a TXT record with extra information about
the service. The contents of the KEY record are described in the
section on First-Come First-Served Naming (Section 2.4.1). The
update is signed using the private key that corresponds to the public
key in the KEY record, using the SIG(0) protocol [RFC2931].
The update may be rejected. If the chosen service instance name is A Registration is therefore implemented as a single DNS Update
not permitted, or is already taken, the update will be returned with message that contains a service's Service Discovery records, Service
the error code YXDOMAIN. In this case, the service will need to Description records, and Host Description records.
choose a new instance name and try again.
Updates done according to this specification are somewhat different
than regular DNS Updates as defined in RFC2136. RFC2136 assumes that
updating is a fairly heavyweight process, so you might first attempt
to add a name if it doesn't exist, and then in a second message
update the name if it does exist but matches certain preconditions.
Because the registration protocol uses a single transaction, some of
this adaptability is lost.
In order to allow updates to happen in a single transaction,
Registrations do not include update constraints. The constraints
specified in Section 2.4.2 are implicit in the processing of
Registrations, and so there is no need for the service sending the
Registration to put in any explicit constraints.
2.3.1. How DNS-SD Service Registration differs from standard RFC2136
DNS Update
DNS-SD Service Registration is based on standard RFC2136 DNS Update,
with some differences:
o It implements first-come first-served name allocation, protected
using SIG(0).
o It enforces policy about what updates are allowed.
o It optionally performs rewriting of "services.arpa" to some other
domain.
o It optionally performs automatic population of the address-to-name
reverse mapping domains.
o A DNS-SD Service Registration server is not required to implement
general DNS Update prerequsite processing.
o Simplified clients are allowed to send updates to an anycast
address, for names ending in "services.arpa"
2.3.2. Testing using standard RFC2136-compliant servers
It may be useful to set up a DNS server for testing that does not
implement the Registration protocol. This can be done by configuring
the server to listen on the anycast address, or advertising it in the
_dns-update._udp SRV record. It must be configured to be
authoritative for "services.arpa", and to accept updates from hosts
on local networks for names under "services.arpa" without
authentication.
A server configured in this way will be able to successfully accept
and process Registrations from services that send Registrations.
However, no constraints will be applied, and this means that the test
server will accept internally inconsistent Registrations, and will
not stop two Registrations, sent by different services, that claim
the same name(s), from overwriting each other.
2.3.3. How to allow services to update standard RFC2136-compliant
servers
Ordinarily Registrations will fail when sent to any non-Registration
Protocol server because the zone being updated is "services.arpa",
and no DNS server that is not a Registration Protocol server should
normally be configured to be authoritative for "services.arpa".
Therefore, a service that sends a Registration can tell that the
receiving server does not support the Registration Protocol, but does
support RFC2136, because the RCODE will either be NOTZONE, NOTAUTH or
REFUSED, or because there is no response to the update request (when
using the anycast address)
In this case a service MAY attempt to register itself using regular
RFC2136 DNS updates. To do so, it must discover default registration
zone and the DNS server designated to receive updates for that zone,
as described earlier using the _dns-update._udp SRV record. It can
then make the update using the port and host pointed to by the SRV
record, and should use appropriate constraints to avoid overwriting
competing records. Such updates are out of scope for the DNSSD
Registration Protocol, and a service that implements the DNSSD
Registration Protocol MUST first attempt to use the Registration
Protocol to register itself, and should only attempt to use RFC2136
backwards compatibility if that fails.
2.4. How to secure it 2.4. How to secure it
Traditional DNS update is secured using the TSIG protocol, which uses Traditional DNS update is secured using the TSIG protocol, which uses
a secret key shared between the client (which issues the update) and a secret key shared between the client (which issues the update) and
the server (which authenticates it). This model does not work for the server (which authenticates it). This model does not work for
automatic service registration. automatic service registration.
The goal of securing the DNS-SD Registration Protocol is to provide The goal of securing the DNS-SD Registration Protocol is to provide
the best possible security given the constraint that service the best possible security given the constraint that service
skipping to change at page 5, line 13 skipping to change at page 8, line 15
or update the information associated with that Service Instance Name. or update the information associated with that Service Instance Name.
2.4.1.1. Service Behavior 2.4.1.1. Service Behavior
The service generates a public/private key pair. This key pair MUST The service generates a public/private key pair. This key pair MUST
be stored in stable storage; if there is no writable stable storage be stored in stable storage; if there is no writable stable storage
on the client, the client MUST be pre-configured with a public/ on the client, the client MUST be pre-configured with a public/
private key pair that can be used. private key pair that can be used.
When sending DNS updates, the service includes a KEY record When sending DNS updates, the service includes a KEY record
containing the public portion of the key, which is stored as an RRset containing the public portion of the key in each Host Description
under the Service Instance Name. It is permissible for a device that update. The update is signed using SIG(0), using the private key
offers more than one service under more than one Service Instance that corresponds to the public key in the KEY record. The lifetimes
Name to use the same KEY on each such name. of the records in the update is set using the EDNS(0) Update Lease
option.
The update is signed using SIG(0), using the private key that
corresponds to the public key in the KEY record.
The lifetime of the DNS-SD PTR, SRV and TXT records [RFC6763] is The lifetime of the DNS-SD PTR, SRV, A, AAAA and TXT records
typically set to two hours. This means that if a device is [RFC6763] is typically set to two hours. This means that if a device
disconnected from the network, it does not appear in the user is disconnected from the network, it does not appear in the user
interfaces of devices looking for services of that type for too long. interfaces of devices looking for services of that type for too long.
However, the lifetime of its DNS SIG(0) public key should be set to a However, the lifetime of its KEY record should be set to a much
much longer time, typically 14 days. The result of this is that even longer time, typically 14 days. The result of this is that even
though a device may be temporarily unplugged, disappearing from the though a device may be temporarily unplugged, disappearing from the
network for a few days, it makes a claim on its name that lasts much network for a few days, it makes a claim on its name that lasts much
longer. longer.
This way, even if a device is unplugged from the network for a few This way, even if a device is unplugged from the network for a few
days, and its services are not available for that time, no other days, and its services are not available for that time, no other
rogue device can come along and immediately claim its name the moment rogue device can come along and immediately claim its name the moment
it disappears from the network, and yet the name is eventually it disappears from the network. In the event that a device is
cleaned up and made available for re-use. unplugged from the network and permanently discarded, then its name
is eventually cleaned up and made available for re-use.
2.4.1.2. Registration Server Behavior 2.4.2. Registration Server Behavior
The Registration server checks that the DNS update contains a Service The Registration server checks each update in the Registration to see
Instance Name. In principle, each name in the update should be that it contains a Service Discovery update, a Service Description
evaluated as a candidate Service Instance Name. However, some names update, and a Host Description update.
will obviously be Service Names, and these can be skipped when
evaluating candidates. In order for a candidate to actually be a
service instance name, the following conditions must be true:
o There is at least one name that turns out NOT to be a Service An update is a Service Discovery update if it contains
Instance Name for which there is a PTR RRset update that includes
a record pointing to the candidate.
o The candidate includes an SRV record o exactly one RRset update,
o The candidate includes a KEY record o which is for a PTR RR,
o which points to a Service Instance Name
o for which an update is present in the Registration.
If an update does not contain a valid Service Instance Name, or if it An update is a Service Description update if, for the appropriate
contains an update to a PTR RRset that references a name that is not Service Instance Name, it contains
the Service Instance Name being updated, the update is rejected with
the NOTAUTH RCODE.
If an update contains an SRV record that contains an IP address other o exactly one "Delete all RRsets from a name" update,
than the IP address from which the update was recieved, the update is o exactly one SRV RRset update,
rejected with the NOTAUTH RCODE. o one or more TXT RRset updates,
o and the target of the SRV record update references a hostname for
which there is a Host Description update in the Registration.
Once each name for which there are updates in the DNS Update has been An update is a Host Description update if, for the appropriate
considered as a candidate, it should be the case that only one name hostname, it contains
is actually a possible Service Instance Name. If more than one name
is still a possible candidate, then the DNS Update is rejected with
the FORMERR RCODE.
If there is only one candidate, then the server checks to see if that o exactly one "Delete all RRsets from a name" update,
name already exists. If it does already exist, then the server o A or AAAA RR update(s)
checks to see if the KEY record on the name is the same as the one in o a KEY RR update that adds a KEY RR that contains the public key
the update for that name. If it is not, then the DNS Update is corresponding to the private key that was used to sign the
rejected with the YXDOMAIN RCODE. message,
o there is a Service Instance Name update in the Registration that
updates an SRV RR so that it points to the hostname being updated
by this update.
Otherwise, the server validates the update using SIG(0). If the A Registration MUST include at least one Service Name update, at
validation fails, the update is rejected with NOTAUTH. Otherwise, least one Service Description update, and exactly one Host
the update is evaluated according to the rules described in RFC2136 Description update. An update message that does not is not a
for processing DNS updates, and whatever the correct result is is Registration. An update message that contains any other updates, or
returned. any update constraints, is not a Registration. Such messages should
either be processed as regular RFC2136 updates, including access
control checks and constraint checks, if supported, or else rejected
with RCODE=REFUSED.
Note that if the definitions of each of these update types are
followed carefully, this means that many things that look very much
like Registrations nevertheless are not. For example, a Registration
that contains an update to a Service Name and an update to a Service
Instance Name, where the Service Name does not reference the Service
Instance Name, is not a valid Registration message, but may be a
valid RFC2136 update.
Assuming that an update message has been validated with these
conditions and is a valid Registration, the server checks that the
name in the Host Description update exists. If so, then the server
checks to see if the KEY record on the name is the same as the KEY
record in the update. If it is not, then the server MUST reject the
Registration with the YXDOMAIN RCODE.
Otherwise, the server validates the update using SIG(0) on the public
key in the KEY record of the Host Description update. If the
validation fails, the server MUST reject the rejectration rejected
with the REFUSED RCODE. Otherwise, the update is considered valid
and authentic, and is processed according to the method described in
RFC2136. The status that is returned depends on the result of
processing the update.
The server MAY add a Reverse Mapping that corresponds to the Host
Description. This is not required because the Reverse Mapping serves
no protocol function, but it may be useful for debugging, e.g. in
annotating network packet traces or logs.
The server MAY apply additional criteria when accepting updates. In The server MAY apply additional criteria when accepting updates. In
some networks, it may be possible to do out-of-band registration of some networks, it may be possible to do out-of-band registration of
keys, and only accept updates from pre-registered keys. In this keys, and only accept updates from pre-registered keys. In this
case, an update for a key that has not been registered should be case, an update for a key that has not been registered should be
rejected using NOTAUTH. rejected with the REFUSED RCODE.
There are at least two benefits to doing this rather than simply There are at least two benefits to doing this rather than simply
using normal SIG(0) DNS updates. First, the same registration using normal SIG(0) DNS updates. First, the same registration
protocol can be used in both cases, so both use cases can be protocol can be used in both cases, so both use cases can be
addressed by the same implementation. Second, the registration addressed by the same service implementation. Second, the
protocol includes maintenance functionality not present with normal registration protocol includes maintenance functionality not present
DNS updates. with normal DNS updates.
Note that the semantics of using the Registration Protocol in this
way are different than for typical RFC2136 implementations: the KEY
used to sign the update in the Registration Protocol only allows the
client to update records that refer to its Host Description. RFC2136
implementations do not normally provide a way to enforce a constraint
of this type.
The server may also have a dictionary of names or name patterns that The server may also have a dictionary of names or name patterns that
are not permitted. If such a list is used, updates for Service are not permitted. If such a list is used, updates for Service
Instance Names that match entries in the dictionary are rejected with Instance Names that match entries in the dictionary are rejected with
YXDOMAIN. YXDOMAIN.
2.5. Maintenance 2.5. TTL Consistency
2.5.1. Cleaning up stale data All RRs within an RRset are required to have the same TTL
(Clarifications to the DNS Specification [RFC2181], Section 5.2). In
order to avoid inconsistencies, the Registration Protocol places
restrictions on TTLs sent by services and requires that Registration
Protocol Servers enforce consistency.
Services sending Registrations MUST use consistent TTLs in all RRs
within the Registration.
Registration Protocol servers MUST check that the TTLs for all RRs
within the Registration are the same. If they are not, the
Registration MUST be rejected with a REFUSED RCODE.
Additionally, when adding RRs to an RRset, for example when
processing Service Discovery records, the server MUST use the same
TTL on all RRs in the RRset. How this consistency is enforced is up
to the implementation.
2.6. Maintenance
2.6.1. Cleaning up stale data
Because the DNS-SD registration protocol is automatic, and not Because the DNS-SD registration protocol is automatic, and not
managed by humans, some additional bookkeeping is required. When an managed by humans, some additional bookkeeping is required. When an
update is constructed by the client, it MUST include include an update is constructed by the client, it MUST include include an
EDNS(0) Update Lease option and an EDNS(0) Instance Lease option. EDNS(0) Update Lease Option [I-D.sekar-dns-ul]. The Update Lease
Option contains two lease times: the Update Lease Time and the
Instance Lease Time.
These leases are promises, similar to DHCP leases [RFC2131], from the These leases are promises, similar to DHCP leases [RFC2131], from the
client that it will send a new update for the service registration client that it will send a new update for the service registration
before the lease time expires. The Update Lease time is chosen to before the lease time expires. The Update Lease time is chosen to
represent the time after the update during which the registered represent the time after the update during which the registered
records other than the KEY record should be assumed to be valid. The records other than the KEY record should be assumed to be valid. The
Instance Lease time represents the time after the update during which Instance Lease time represents the time after the update during which
the KEY record should be assumed to be valid. the KEY record should be assumed to be valid.
The reasoning behind the different lease times is discussed in the The reasoning behind the different lease times is discussed in the
section on first-come, first-served naming Section 2.4.1. DNS-SD section on first-come, first-served naming Section 2.4.1. DNS-SD
Registration Protocol servers may be configured with limits for these Registration Protocol servers may be configured with limits for these
values. A default limit of two hours for the Update Lease and 30 values. A default limit of two hours for the Update Lease and 14
days for the Instance Lease are currently thought to be good choices. days for the SIG(0) KEY are currently thought to be good choices.
Clients that are going to continue to use names on which they hold Clients that are going to continue to use names on which they hold
leases should update well before the lease ends, in case the leases should update well before the lease ends, in case the
registration service is unavailable or under heavy load. registration service is unavailable or under heavy load.
The Registration Protocol server MUST include an EDNS(0) Update Lease
option in the response if the lease time proposed by the service has
been shortened. The service MUST check for the EDNS(0) Update Lease
option in the response and MUST use the lease times from that option
in place of the options that it sent to the server when deciding when
to update its registration.
Clients should assume that each lease ends N seconds after the update Clients should assume that each lease ends N seconds after the update
was first transmitted, where N is the number included in the option. was first transmitted, where N is the lease duration. Servers should
Servers should assume that each lease ends N seconds after the update assume that each lease ends N seconds after the update that was
that was successfully processed was received. Because the server successfully processed was received. Because the server will always
will always receive the update after the client sent it, this avoids receive the update after the client sent it, this avoids the
the possibility of misunderstandings. possibility of misunderstandings.
DNS-SD Registration Protocol servers SHOULD reject updates that do DNS-SD Registration Protocol servers MUST reject updates that do not
not include a DNS update lease time. Dual-use servers may accept include an EDNS(0) Update Lease option. Dual-use servers MAY accept
updates that don't include leases, but SHOULD differentiate between updates that don't include leases, but SHOULD differentiate between
DNS-SD registration protocol updates and other updates, and SHOULD DNS-SD registration protocol updates and other updates, and MUST
reject updates that are known to be DNS-SD registration protocol reject updates that are known to be DNS-SD Registration Protocol
updates if they do not include leases. updates if they do not include leases.
2.5.2. Sleep Proxy 2.6.2. Sleep Proxy
Another use of Service Registration Protocol is for devices that Another use of Service Registration Protocol is for devices that
sleep to reduce power consumption. sleep to reduce power consumption.
In this case, in addition to the DNS Update Lease option In this case, in addition to the DNS Update Lease option
[I-D.sekar-dns-ul] described above, the device includes an EDNS(0) [I-D.sekar-dns-ul] described above, the device includes an EDNS(0)
OWNER Option [I-D.cheshire-edns0-owner-option]. OWNER Option [I-D.cheshire-edns0-owner-option].
The DNS Update Lease option constitutes a promise by the device that The EDNS(0) Update Lease option constitutes a promise by the device
it will wake up before this time elapses, to renew its records and that it will wake up before this time elapses, to renew its
thereby demonstrate that it is still attached to the network. If it registration and thereby demonstrate that it is still attached to the
fails to renew the records by this time, that indicates that it is no network. If it fails to renew the registration by this time, that
longer attached to the network, and its records should be deleted. indicates that it is no longer attached to the network, and its
registration (except for the KEY in the Host Description) should be
deleted.
The EDNS(0) OWNER Option indicates that the device will be asleep, The EDNS(0) OWNER Option indicates that the device will be asleep,
and will not be receptive to normal network traffic. When a DNS and will not be receptive to normal network traffic. When a DNS
server receives a DNS Update with an EDNS(0) OWNER Option, that server receives a DNS Update with an EDNS(0) OWNER Option, that
signifies that the DNS server should act as a proxy for any IPv4 or signifies that the Registration Protocol server should set up a proxy
IPv6 address records in the DNS Update message. This means that the for any IPv4 or IPv6 address records in the DNS Update message. This
DNS server should send ARP or ND messages claiming ownership of the proxy should send ARP or ND messages claiming ownership of the IPv4
IPv4 and/or IPv6 addresses in the records in question. In addition, and/or IPv6 addresses in the records in question. In addition, proxy
the DNS server should answer future ARP or ND requests for those IPv4 should answer future ARP or ND requests for those IPv4 and/or IPv6
and/or IPv6 addresses, claiming ownership of them. When the DNS addresses, claiming ownership of them. When the DNS server receives
server receives a TCP SYN or UDP packet addressed to one of the IPv4 a TCP SYN or UDP packet addressed to one of the IPv4 or IPv6
or IPv6 addresses for which it proxying, it should then wake up the addresses for which it proxying, it should then wake up the sleeping
sleeping device using the information in the EDNS(0) OWNER Option. device using the information in the EDNS(0) OWNER Option. At present
At present version 0 of the OWNER Option specifies the "Wake-on-LAN version 0 of the OWNER Option specifies the "Wake-on-LAN Magic
Magic Packet" that needs to be sent; future versions could be Packet" that needs to be sent; future versions could be extended to
extended to specify other wakeup mechanisms. specify other wakeup mechanisms.
Note that although the authoritative DNS server that implements the
DNSSD Service Registration Protocol function need not be on the same
link as the sleeping host, the Sleep Proxy must be on the same link.
3. Security Considerations 3. Security Considerations
DNS-SD Service Registration Protocol updates have no authorization DNS-SD Service Registration Protocol updates have no authorization
semantics other than first-come, first-served. This means that if an semantics other than first-come, first-served. This means that if an
attacker from outside of the administrative domain of the server attacker from outside of the administrative domain of the server
knows the server's IP address, it can in principle send updates to knows the server's IP address, it can in principle send updates to
the server that will be processed successfully. Servers should the server that will be processed successfully. Servers should
therefore be configured to reject updates from source addresses therefore be configured to reject updates from source addresses
outside of the administrative domain of the server. outside of the administrative domain of the server.
For Anycast updates, this validation must be enforced by every router
that connects the CDN to the unconstrained portion of the network.
For TCP updates, the initial SYN-SYN+ACK handshake prevents updates
being forged from off-network. In order to ensure that this
handshake happens, Service Discovery Protocol servers MUST NOT accept
0-RTT TCP payloads.
Note that these rules only apply to the validation of DNS-SD Note that these rules only apply to the validation of DNS-SD
registration protocol updates. A server that accepts updates from registration protocol updates. A server that accepts updates from
DNS-SD registration protocol clients may also accept other DNS DNS-SD registration protocol clients may also accept other DNS
updates, and those DNS updates may be validated using different updates, and those DNS updates may be validated using different
rules. However, in the case of a DNS service that accepts automatic rules. However, in the case of a DNS service that accepts automatic
updates, the intersection of the DNS-SD service registration update updates, the intersection of the DNS-SD service registration update
rules and whatever other update rules are present must be considered rules and whatever other update rules are present must be considered
very carefully. very carefully.
For example, a normal, authenticated RFC2136 update to any RR that
was added using the Registration protocol, but that is authenticated
using a different key, could be used to override a promise made by
the registration protocol, by replacing all or part of the service
registration information with information provided by a different
client. An implementation that allows both kinds of updates should
not allow updates to records added by Registrations using different
authentication and authorization credentials.
4. Privacy Considerations 4. Privacy Considerations
5. References 5. Acknowledgments
5.1. Normative References
Thanks to Toke Hoeiland-Joergensen for a thorough technical review,
to Tamara Kemper for doing a nice developmental edit, Tim Wattenberg
for doing a service implementation at the Montreal Hackathon at IETF
102, and [...] more reviewers to come, hopefully.
6. References
6.1. Normative References
[RFC6763] Cheshire, S. and M. Krochmal, "DNS-Based Service [RFC6763] Cheshire, S. and M. Krochmal, "DNS-Based Service
Discovery", RFC 6763, DOI 10.17487/RFC6763, February 2013, Discovery", RFC 6763, DOI 10.17487/RFC6763, February 2013,
<https://www.rfc-editor.org/info/rfc6763>. <https://www.rfc-editor.org/info/rfc6763>.
5.2. Informative References [I-D.sekar-dns-ul]
Sekar, K., "Dynamic DNS Update Leases", draft-sekar-dns-
ul-01 (work in progress), August 2006.
6.2. Informative References
[RFC1034] Mockapetris, P., "Domain names - concepts and facilities",
STD 13, RFC 1034, DOI 10.17487/RFC1034, November 1987,
<https://www.rfc-editor.org/info/rfc1034>.
[RFC1035] Mockapetris, P., "Domain names - implementation and [RFC1035] Mockapetris, P., "Domain names - implementation and
specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, specification", STD 13, RFC 1035, DOI 10.17487/RFC1035,
November 1987, <https://www.rfc-editor.org/info/rfc1035>. November 1987, <https://www.rfc-editor.org/info/rfc1035>.
[RFC2131] Droms, R., "Dynamic Host Configuration Protocol", [RFC2131] Droms, R., "Dynamic Host Configuration Protocol",
RFC 2131, DOI 10.17487/RFC2131, March 1997, RFC 2131, DOI 10.17487/RFC2131, March 1997,
<https://www.rfc-editor.org/info/rfc2131>. <https://www.rfc-editor.org/info/rfc2131>.
[RFC2136] Vixie, P., Ed., Thomson, S., Rekhter, Y., and J. Bound, [RFC2136] Vixie, P., Ed., Thomson, S., Rekhter, Y., and J. Bound,
"Dynamic Updates in the Domain Name System (DNS UPDATE)", "Dynamic Updates in the Domain Name System (DNS UPDATE)",
RFC 2136, DOI 10.17487/RFC2136, April 1997, RFC 2136, DOI 10.17487/RFC2136, April 1997,
<https://www.rfc-editor.org/info/rfc2136>. <https://www.rfc-editor.org/info/rfc2136>.
[RFC2181] Elz, R. and R. Bush, "Clarifications to the DNS
Specification", RFC 2181, DOI 10.17487/RFC2181, July 1997,
<https://www.rfc-editor.org/info/rfc2181>.
[RFC2931] Eastlake 3rd, D., "DNS Request and Transaction Signatures [RFC2931] Eastlake 3rd, D., "DNS Request and Transaction Signatures
( SIG(0)s )", RFC 2931, DOI 10.17487/RFC2931, September ( SIG(0)s )", RFC 2931, DOI 10.17487/RFC2931, September
2000, <https://www.rfc-editor.org/info/rfc2931>. 2000, <https://www.rfc-editor.org/info/rfc2931>.
[RFC3007] Wellington, B., "Secure Domain Name System (DNS) Dynamic [RFC3007] Wellington, B., "Secure Domain Name System (DNS) Dynamic
Update", RFC 3007, DOI 10.17487/RFC3007, November 2000, Update", RFC 3007, DOI 10.17487/RFC3007, November 2000,
<https://www.rfc-editor.org/info/rfc3007>. <https://www.rfc-editor.org/info/rfc3007>.
[RFC3152] Bush, R., "Delegation of IP6.ARPA", BCP 49, RFC 3152,
DOI 10.17487/RFC3152, August 2001,
<https://www.rfc-editor.org/info/rfc3152>.
[RFC6760] Cheshire, S. and M. Krochmal, "Requirements for a Protocol [RFC6760] Cheshire, S. and M. Krochmal, "Requirements for a Protocol
to Replace the AppleTalk Name Binding Protocol (NBP)", to Replace the AppleTalk Name Binding Protocol (NBP)",
RFC 6760, DOI 10.17487/RFC6760, February 2013, RFC 6760, DOI 10.17487/RFC6760, February 2013,
<https://www.rfc-editor.org/info/rfc6760>. <https://www.rfc-editor.org/info/rfc6760>.
[RFC6761] Cheshire, S. and M. Krochmal, "Special-Use Domain Names",
RFC 6761, DOI 10.17487/RFC6761, February 2013,
<https://www.rfc-editor.org/info/rfc6761>.
[RFC6762] Cheshire, S. and M. Krochmal, "Multicast DNS", RFC 6762, [RFC6762] Cheshire, S. and M. Krochmal, "Multicast DNS", RFC 6762,
DOI 10.17487/RFC6762, February 2013, DOI 10.17487/RFC6762, February 2013,
<https://www.rfc-editor.org/info/rfc6762>. <https://www.rfc-editor.org/info/rfc6762>.
[RFC7228] Bormann, C., Ersue, M., and A. Keranen, "Terminology for
Constrained-Node Networks", RFC 7228,
DOI 10.17487/RFC7228, May 2014,
<https://www.rfc-editor.org/info/rfc7228>.
[I-D.ietf-dnssd-hybrid] [I-D.ietf-dnssd-hybrid]
Cheshire, S., "Discovery Proxy for Multicast DNS-Based Cheshire, S., "Discovery Proxy for Multicast DNS-Based
Service Discovery", draft-ietf-dnssd-hybrid-08 (work in Service Discovery", draft-ietf-dnssd-hybrid-08 (work in
progress), March 2018. progress), March 2018.
[I-D.sekar-dns-ul] [I-D.ietf-dnssd-push]
Sekar, K., "Dynamic DNS Update Leases", draft-sekar-dns- Pusateri, T. and S. Cheshire, "DNS Push Notifications",
ul-01 (work in progress), August 2006. draft-ietf-dnssd-push-14 (work in progress), March 2018.
[I-D.cheshire-dnssd-roadmap] [I-D.cheshire-dnssd-roadmap]
Cheshire, S., "Service Discovery Road Map", draft- Cheshire, S., "Service Discovery Road Map", draft-
cheshire-dnssd-roadmap-01 (work in progress), March 2018. cheshire-dnssd-roadmap-01 (work in progress), March 2018.
[I-D.cheshire-edns0-owner-option] [I-D.cheshire-edns0-owner-option]
Cheshire, S. and M. Krochmal, "EDNS0 OWNER Option", draft- Cheshire, S. and M. Krochmal, "EDNS0 OWNER Option", draft-
cheshire-edns0-owner-option-01 (work in progress), July cheshire-edns0-owner-option-01 (work in progress), July
2017. 2017.
skipping to change at page 10, line 19 skipping to change at page 16, line 4
[I-D.cheshire-edns0-owner-option] [I-D.cheshire-edns0-owner-option]
Cheshire, S. and M. Krochmal, "EDNS0 OWNER Option", draft- Cheshire, S. and M. Krochmal, "EDNS0 OWNER Option", draft-
cheshire-edns0-owner-option-01 (work in progress), July cheshire-edns0-owner-option-01 (work in progress), July
2017. 2017.
[ZC] Cheshire, S. and D. Steinberg, "Zero Configuration [ZC] Cheshire, S. and D. Steinberg, "Zero Configuration
Networking: The Definitive Guide", O'Reilly Media, Inc. , Networking: The Definitive Guide", O'Reilly Media, Inc. ,
ISBN 0-596-10100-7, December 2005. ISBN 0-596-10100-7, December 2005.
Authors' Addresses Authors' Addresses
Stuart Cheshire Stuart Cheshire
Apple Inc. Apple Inc.
1 Infinite Loop One Apple Park Way
Cupertino, California 95014 Cupertino, California 95014
USA USA
Phone: +1 408 974 3207 Phone: +1 408 974 3207
Email: cheshire@apple.com Email: cheshire@apple.com
Ted Lemon Ted Lemon
Nibbhaya Consulting Nibbhaya Consulting
P.O. Box 958 P.O. Box 958
Brattleboro, Vermont 05302 Brattleboro, Vermont 05302
 End of changes. 52 change blocks. 
168 lines changed or deleted 428 lines changed or added

This html diff was produced by rfcdiff 1.47. The latest version is available from http://tools.ietf.org/tools/rfcdiff/