DNS-SD (see [RFC6763]) is a component of Zero Configuration Networking
(see [RFC6760], [ZC], and [ROADMAP]).¶
This document describes an enhancement to DNS-SD that
allows servers to register the services they offer using the DNS protocol rather than using Multicast DNS (mDNS) (see [RFC6762]). There is already a large installed base of DNS‑SD clients that can discover services using the DNS
protocol (e.g., Android, Windows, Linux, Apple).¶
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 is required. The document is expected to provide sufficient
information to allow interoperable implementation of the registration protocol.¶
DNS‑SD allows services to advertise the fact that they provide service and to provide
the information required to access that service. DNS‑SD clients can then discover the set of services of a particular
type that are available. They can then select a service from among those that are available and obtain the information
required to use it. Although DNS-SD using the DNS protocol (as opposed to mDNS) can be more efficient and versatile, it is
not common in practice because of the difficulties associated with updating authoritative DNS services with service
information.¶
The existing practice for updating DNS zones is either to manually enter new data or to use a DNS Update
(see [RFC2136]). Unfortunately, a DNS Update requires either:¶
- that the authoritative DNS server automatically trust
updates or¶
- that the DNS Update requestor have some kind of shared secret or public key that is known to the DNS server
and can be used to authenticate the update.¶
Furthermore, the DNS Update can be a fairly chatty process, requiring multiple
roundtrips with different conditional predicates to complete the update process.¶
The Service Registration Protocol (SRP) adds a set of default heuristics for processing DNS updates that eliminates the need for DNS-update-conditional predicates. Instead, the SRP registrar (a DNS server that supports SRP updates) has a set of default predicates
that are applied to the update; and the update either succeeds entirely or fails in a way that allows the requestor to know
what went wrong and construct a new update.¶
SRP also adds a feature called "First Come, First Served Naming" (or "FCFS Naming"), which allows the requestor to:¶
- claim a name that is
not yet in use, and¶
- using SIG(0) ([RFC2931]), authenticate both the initial claim and subsequent
updates.¶
This prevents name conflicts, since a second SRP requestor attempting to claim the same name will not possess the
SIG(0) key used by the first requestor to claim it: so its claim will be rejected, and the second requestor will have to
choose a new name.¶
It is important to understand that "authenticate" here just means that we can tell that an update came from the same source
as the original registration. We have not established trust. This has important implications for what we can and can't do
with data the client sends us. You will notice as you read this document that we only support adding a very restricted set
of records, and the content of those records is further constrained.¶
The reason for this is precisely that we have not established trust. So, we can only publish information that we feel safe in
publishing even though we do not have any basis for trusting the requestor. We reason that mDNS ([RFC6762])
allows arbitrary hosts on a single IP link to advertise services ([RFC6763]), relying on whatever service is
advertised to provide authentication as a part of its protocol rather than in the service advertisement.¶
This is considered reasonably safe because it requires physical presence on the network in order to advertise. An off-network
mDNS attack is simply not possible. Our goal with this specification is to impose similar constraints. Therefore, you will
see in Section 3.3.1 that a very restricted set of records with a very restricted set of relationships are
allowed. You will also see in Section 6.1 that we give advice on how to prevent off-network attacks.¶
This leads us to the disappointing observation that this protocol is not a mechanism for adding arbitrary information to
DNS zones. We have not evaluated the security properties of adding, for example, an SOA record, an MX record, or a CNAME
record; therefore, these are forbidden. A future protocol specification might include analyses for other records and extend
the set of records that can be registered here. Or it might require establishment of trust, and add an authorization model
to the authentication model we now have. But this is work for a future document.¶
Finally, SRP adds the concept of a "lease", similar to leases in DHCP
([RFC8415]). The SRP registration itself has a lease that may be on the order of an hour; if the requestor
does not renew the lease before it has elapsed, the registration is removed. The claim on the name can have a longer
lease so that another requestor cannot claim the name, even though the registration has expired.¶
The SRP for DNS-SD specified in this document provides a reasonably secure mechanism
for publishing this information. Once published, these services can be readily discovered by DNS-SD clients using
standard DNS lookups.¶
The DNS-SD specification (see Section 10 of [RFC6763] briefly discusses ways that servers can publish their information in the DNS namespace. In the case of
mDNS, it allows servers to publish their 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.¶
RFC 6763 also allows clients to discover services using the DNS protocol (see [RFC1035]). This can be done by
having a system administrator manually configure service information in the DNS; however, manually populating DNS authoritative
server databases is costly and potentially error-prone and requires a knowledgeable network administrator. Consequently,
although all DNS-SD client implementations of which we are aware support DNS-SD using DNS queries, in practice, it
is used much less frequently than mDNS.¶
The Discovery Proxy (see [RFC8766]) provides one way to automatically populate the DNS
namespace but is only appropriate on networks where services are easily advertised using mDNS. The present document describes a
solution more suitable for networks where multicast is inefficient or where sleepy devices are common by supporting both the
offering of services and the discovery of services using unicast.¶
All RRs within an RRset are required to have the same TTL
(see Section 5.2 of [RFC2181]).
In order to avoid inconsistencies, SRP places restrictions on TTLs sent by requestors and requires that SRP registrars enforce
consistency.¶
Requestors sending SRP Updates MUST use consistent TTLs in all RRs within the SRP Update.¶
SRP registrars MUST check that the TTLs for all RRs within the SRP Update are the same. If they are not, the SRP
update MUST be rejected with a Refused RCODE.¶
Additionally, when adding RRs to an RRset (for example, when processing Service Discovery records), the SRP registrar MUST use the
same TTL on all RRs in the RRset. How this consistency is enforced is up to the implementation.¶
TTLs sent in SRP Updates are advisory: they indicate the SRP requestor's guess as to what a good TTL would be. SRP registrars may
override these TTLs. SRP registrars SHOULD ensure that TTLs are reasonable: neither too long nor too short. The TTL SHOULD NOT
ever be longer than the lease time (Section 5.1). Shorter TTLs will result in more frequent data refreshes;
this increases latency on the DNS-SD client side, increases load on any caching resolvers and on the authoritative server,
and also increases network load, which may be an issue for constrained networks. Longer TTLs will increase the likelihood
that data in caches will be stale. TTL minimums and maximums SHOULD be configurable by the operator of the SRP registrar.¶
SRP Updates have no authorization semantics other than
FCFS. Thus, if an attacker from outside the administrative
domain of the SRP registrar knows the registrar's IP address, it can, in principle, send updates to the registrar
that will be processed successfully. Therefore, SRP registrars SHOULD be configured to reject updates
from source addresses outside of the administrative domain of the registrar.¶
For TCP updates, the initial SYN-SYN+ACK handshake prevents updates being forged by an off-network attacker. In order to
ensure that this handshake happens, SRP registrars relying on three-way-handshake validation MUST NOT accept TCP Fast Open payloads
(see [RFC7413]). If the network infrastructure allows it, an SRP registrar MAY accept TCP Fast Open payloads if all such packets
are validated along the path, and the network is able to reject this type of spoofing at all ingress points.¶
For UDP updates from constrained devices, spoofing would have to be prevented with appropriate source address filtration
on routers ([RFC2827]). This would ordinarily be accomplished by measures such as those described in
(Section 4.5 of [RFC7084]). For example, a stub router ([SNAC-SIMPLE])
for a constrained network might only accept UDP updates from source addresses known to be on-link on that stub network and might
further validate that the UDP update was actually received on the stub network interface and not the interface connected to
the adjacent infrastructure link.¶
Note that these rules only apply to the validation of SRP Updates.
A server that accepts updates from SRP
requestors may also accept other DNS updates, and those DNS updates may be validated
using different rules. However, in the case of a DNS server that accepts SRP
updates, the intersection of the SRP Update rules and
whatever other update rules are present must be considered very carefully.¶
For example, a normal authenticated DNS update to any RR that was added using SRP, but that is authenticated using a
different key, could be used to override a promise made by the SRP registrar to an SRP requestor by replacing all or part of
the service registration information with information provided by an authenticated DNS update requestor. An implementation
that allows both kinds of updates SHOULD NOT allow DNS Update requestors that are using different authentication and
authorization credentials to update records added by SRP requestors.¶
It is possible to set up SRP updates for a zone that is used for non-DNSSD services. For example, imagine that you set
up SRP service for example.com. SRP hosts can now register names like "www" or "mail" or "smtp" in this domain. In addition,
SRP updates using FCFS naming can insert names that are obscene or offensive into the zone. There is no simple solution to
these problems. However, we have two recommendations to address this problem:¶
- Do not provide SRP service in organization-level zones. Use subdomains of the organizational domain for DNS-SD. This does not prevent registering names as mentioned above but does ensure that genuinely important names
are not accidentally reserved for SRP clients. So, for example, the zone "dnssd.example.com" could be used instead of
"example.com" for SRP updates. Because of the way that DNS-browsing domains are discovered, there is no need for the
DNSSD discovery zone that is updated by SRP to have a user-friendly or important-sounding name.¶
- Configure a dictionary of names that are prohibited. Dictionaries of common obscene and offensive names are no doubt
available and can be augmented with a list of typical "special" names like "www", "mail", "smtp", and so on. Lists of
names are generally available or can be constructed manually.¶
Local links can be protected by managed services such as Router Advertisement Guard (see [RFC6105]), but multicast services like
DHCP, DHCPv6, and IPv6 Neighbor Discovery (see [RFC2131], [RFC8415], and [RFC4861], respectively) are,
in most cases, not authenticated and can't be controlled on unmanaged networks, such as home networks and small office
networks where no network management staff are present. In such situations, the SRP service has comparatively fewer
potential security exposures and, hence, is not the weak link. This is discussed in more detail in
Section 3.2.4.¶
The fundamental protection for networks of this type is the user's choice of what devices to add to the network. Work is
being done in other working groups and standards bodies to improve the state of the art for network on-boarding and device
isolation (e.g., [RFC8520] provides a means for constraining what behaviors are allowed for a device in an
automatic way), but such work is out of scope for this document.¶
This specification does not provide a mechanism for validating responses from SRP registrars to
SRP requestors. In principle, a KEY RR could be used by
a non-constrained SRP requestor to validate responses from the registrar, but this is not required,
nor do we specify a mechanism for determining which key to use.¶
In addition, for DNS-over-TLS connections, out-of-band key pinning as described in
Section 4.2 of [RFC7858] could be used for authentication of the SRP registrar,
e.g., to prevent man-in-the-middle attacks. However, the use of such keys is impractical for an unmanaged service
registration protocol; hence, it is out of scope for this document.¶
For validation, SRP registrars MUST implement the ECDSAP256SHA256 signature algorithm. SRP registrars SHOULD implement the
algorithms that are specified in Section 3.1 of [RFC8624], in the validation column of the
table, that are numbered 13 or higher, and that have a "MUST", "RECOMMENDED", or "MAY" designation in the validation column of
the table.
SRP requestors MUST NOT assume that any algorithm numbered lower than 13 is
available for use in validating SIG(0) signatures.¶
This section specifies considerations for systems involved in domain name resolution when resolving queries for names
ending with ".service.arpa.". Each item in this section addresses some aspect of the DNS or the process of resolving domain
names that would be affected by this special-use allocation. Detailed explanations of these items can be found in Section 5 of [RFC6761].¶
The current proposed use for "service.arpa" does not require special knowledge on the part of the user. While the
"default.service.arpa." subdomain is used as a generic name for registration, users are not expected to see this name in
user interfaces. In the event that it does show up in a user interface, it is just a domain name and requires no special
treatment by the user. Users are not expected to see this name in user interfaces, although it's certainly possible that
they might. If they do, they are not expected to treat it specially.¶
Application software does not need to handle subdomains of "service.arpa" specially. "service.arpa" SHOULD NOT be treated
as more trustworthy than any other insecure DNS domain, simply because it is locally served (or for any other reason). It
is not possible to register a PKI certificate for a subdomain of "service.arpa." because it is a locally served domain
name. So, no such subdomain can be considered to be uniquely identifying a particular host, as would be required for such a
PKI certificate to be issued. If a subdomain of "service.arpa." is returned by an API or entered in an input field of an
application, PKI authentication of the endpoint being identified by the name will not be possible. Alternative methods
and practices for authenticating such endpoints are out of scope for this document.¶
Name resolution APIs and libraries MUST NOT recognize names that end in "service.arpa." as special and MUST NOT treat
them as having special significance, except that it may be necessary that such APIs not bypass the locally configured
recursive resolvers.¶
One or more IP addresses for recursive DNS servers will usually be supplied to the client through router advertisements
or DHCP. For an administrative domain that uses subdomains of "service.arpa.", the recursive resolvers provided by that
domain will be able to answer queries for subdomains of "service.arpa.". Other (non-local) resolvers will not, or they
will provide answers that are not correct within that administrative domain.¶
A host that is configured to use a resolver other than one that has been provided by the local network may not be able to
resolve or may receive incorrect results for subdomains of "service.arpa.". In order to avoid this, it is permissible
that hosts use the resolvers that are locally provided for resolving "service.arpa.", even when they are configured to
use other resolvers.¶
There are three considerations for caching DNS servers that
follow this specification:¶
- For correctness, recursive resolvers at sites using
'service.arpa.' must, in practice, transparently support DNSSEC
queries: queries for DNSSEC records and queries with the DNSSEC OK
(DO) bit set (Section 3.2.1 of [RFC4035]). DNSSEC validation is a Best Current Practice
([RFC9364]): although validation is not required, a
caching recursive resolver that does not validate answers that can
be validated may cache invalid data. In turn, this would prevent
validating stub resolvers from successfully validating
answers. Hence, as a practical matter, recursive resolvers at sites
using "service.arpa" should do DNSSEC validation.¶
-
Unless configured otherwise, recursive resolvers and DNS
proxies MUST behave as described in Locally Served
Zones (Section 3 of [RFC6303]).
That is, queries for "service.arpa." and subdomains of
"service.arpa." MUST NOT be forwarded, with one
important exception: a query for a DS record with the DO bit set
MUST return the correct answer for that question,
including correct information in the authority section that proves
that the record is nonexistent.¶
So, for example, a query for the NS record for "service.arpa."
MUST NOT result in that query being forwarded to an
upstream cache nor to the authoritative DNS server for ".arpa.".
However, as necessary to provide accurate authority information, a
query for the DS record MUST result in forwarding
whatever queries are necessary. Typically, this will just be a
query for the DS record since the necessary authority information
will be included in the authority section of the response if the
DO bit is set.¶
No special processing of "service.arpa." is required for authoritative DNS server implementations. It is possible that an
authoritative DNS server might attempt to check the authoritative servers for "service.arpa." for a delegation beneath that
name before answering authoritatively for such a delegated name. In such a case, because the name always has only local
significance, there will be no such delegation in the "service.arpa." zone; therefore, the server would refuse to answer
authoritatively for such a zone. A server that implements this sort of check MUST be configurable so that either it does
not do this check for the "service.arpa." domain or it ignores the results of the check.¶
DNS server operators MAY configure an authoritative server for "service.arpa." for use with SRP. The operator for the
DNS servers authoritative for "service.arpa." in the global DNS will configure any such servers as described in
Section 9.¶
"service.arpa." is a subdomain of the "arpa" top-level domain, which is operated by IANA under the authority of the
Internet Architecture Board (IAB) according to the rules established in [RFC3172]. There are no other DNS registrars for
".arpa".¶