draft-ietf-dnssd-srp-02.txt | draft-ietf-dnssd-srp-03.txt | |||
---|---|---|---|---|
Internet Engineering Task Force S. Cheshire | Internet Engineering Task Force T. Lemon | |||
Internet-Draft Apple Inc. | Internet-Draft Nibbhaya Consulting | |||
Intended status: Informational T. Lemon | Intended status: Informational S. Cheshire | |||
Expires: January 9, 2020 Nibbhaya Consulting | Expires: January 14, 2021 Apple Inc. | |||
July 8, 2019 | July 13, 2020 | |||
Service Registration Protocol for DNS-Based Service Discovery | Service Registration Protocol for DNS-Based Service Discovery | |||
draft-ietf-dnssd-srp-02 | draft-ietf-dnssd-srp-03 | |||
Abstract | Abstract | |||
The Service Registration Protocol for DNS-Based Service Discovery | The Service Registration Protocol for DNS-Based Service Discovery | |||
uses the standard DNS Update mechanism to enable DNS-Based Service | uses the standard DNS Update mechanism to enable DNS-Based Service | |||
Discovery using only unicast packets. This makes it possible to | Discovery using only unicast packets. This makes it possible to | |||
deploy DNS Service Discovery without multicast, which greatly | deploy DNS Service Discovery without multicast, which greatly | |||
improves scalability and improves performance on networks where | improves scalability and improves performance on networks where | |||
multicast service is not an optimal choice, particularly 802.11 | multicast service is not an optimal choice, particularly 802.11 | |||
(Wi-Fi) and 802.15.4 (IoT) networks. DNS-SD Service registration | (Wi-Fi) and 802.15.4 (IoT) networks. DNS-SD Service registration | |||
skipping to change at page 1, line 39 ¶ | skipping to change at page 1, line 39 ¶ | |||
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 9, 2020. | This Internet-Draft will expire on January 14, 2021. | |||
Copyright Notice | Copyright Notice | |||
Copyright (c) 2019 IETF Trust and the persons identified as the | Copyright (c) 2020 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 | |||
carefully, as they describe your rights and restrictions with respect | carefully, as they describe your rights and restrictions with respect | |||
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 | |||
skipping to change at page 2, line 19 ¶ | skipping to change at page 2, line 19 ¶ | |||
Table of Contents | Table of Contents | |||
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 | |||
2. Service Registration Protocol . . . . . . . . . . . . . . . . 4 | 2. Service Registration Protocol . . . . . . . . . . . . . . . . 4 | |||
2.1. What to publish . . . . . . . . . . . . . . . . . . . . . 5 | 2.1. What to publish . . . . . . . . . . . . . . . . . . . . . 5 | |||
2.2. Where to publish it . . . . . . . . . . . . . . . . . . . 6 | 2.2. Where to publish it . . . . . . . . . . . . . . . . . . . 6 | |||
2.3. How to publish it . . . . . . . . . . . . . . . . . . . . 6 | 2.3. How to publish it . . . . . . . . . . . . . . . . . . . . 6 | |||
2.3.1. How DNS-SD Service Registration differs from standard | 2.3.1. How DNS-SD Service Registration differs from standard | |||
RFC2136 DNS Update . . . . . . . . . . . . . . . . . 7 | RFC2136 DNS Update . . . . . . . . . . . . . . . . . 7 | |||
2.3.2. Testing using standard RFC2136-compliant servers . . 7 | 2.4. How to secure it . . . . . . . . . . . . . . . . . . . . 7 | |||
2.3.3. How to allow services to update standard | 2.4.1. First-Come First-Served Naming . . . . . . . . . . . 8 | |||
RFC2136-compliant servers . . . . . . . . . . . . . . 8 | 2.4.2. Removing published services . . . . . . . . . . . . . 9 | |||
2.4. How to secure it . . . . . . . . . . . . . . . . . . . . 8 | 2.4.3. SRP Server Behavior . . . . . . . . . . . . . . . . . 9 | |||
2.4.1. First-Come First-Served Naming . . . . . . . . . . . 9 | ||||
2.4.2. SRP Server Behavior . . . . . . . . . . . . . . . . . 10 | ||||
2.5. TTL Consistency . . . . . . . . . . . . . . . . . . . . . 12 | 2.5. TTL Consistency . . . . . . . . . . . . . . . . . . . . . 12 | |||
2.6. Maintenance . . . . . . . . . . . . . . . . . . . . . . . 13 | 2.6. Maintenance . . . . . . . . . . . . . . . . . . . . . . . 13 | |||
2.6.1. Cleaning up stale data . . . . . . . . . . . . . . . 13 | 2.6.1. Cleaning up stale data . . . . . . . . . . . . . . . 13 | |||
2.6.2. Sleep Proxy . . . . . . . . . . . . . . . . . . . . . 14 | 2.6.2. Sleep Proxy . . . . . . . . . . . . . . . . . . . . . 14 | |||
3. Security Considerations . . . . . . . . . . . . . . . . . . . 15 | 3. Security Considerations . . . . . . . . . . . . . . . . . . . 15 | |||
3.1. Source Validation . . . . . . . . . . . . . . . . . . . . 15 | 3.1. Source Validation . . . . . . . . . . . . . . . . . . . . 15 | |||
3.2. SIG(0) signature validation . . . . . . . . . . . . . . . 16 | 3.2. SIG(0) signature validation . . . . . . . . . . . . . . . 16 | |||
3.3. Required Signature Algorithm . . . . . . . . . . . . . . 16 | 3.3. Required Signature Algorithm . . . . . . . . . . . . . . 16 | |||
4. Privacy Considerations . . . . . . . . . . . . . . . . . . . 16 | 4. Privacy Considerations . . . . . . . . . . . . . . . . . . . 16 | |||
5. Delegation of 'service.arpa.' . . . . . . . . . . . . . . . . 17 | 5. Delegation of 'service.arpa.' . . . . . . . . . . . . . . . . 16 | |||
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17 | 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 16 | |||
6.1. Registration and Delegation of 'service.arpa' as a | 6.1. Registration and Delegation of 'service.arpa' as a | |||
Special-Use Domain Name . . . . . . . . . . . . . . . . . 17 | Special-Use Domain Name . . . . . . . . . . . . . . . . . 17 | |||
6.2. 'dnssd-srp' Service Name . . . . . . . . . . . . . . . . 17 | 6.2. 'dnssd-srp' Service Name . . . . . . . . . . . . . . . . 17 | |||
6.3. 'dnssd-srp-tls' Service Name . . . . . . . . . . . . . . 18 | 6.3. 'dnssd-srp-tls' Service Name . . . . . . . . . . . . . . 17 | |||
6.4. Anycast Address . . . . . . . . . . . . . . . . . . . . . 18 | 6.4. Anycast Address . . . . . . . . . . . . . . . . . . . . . 17 | |||
7. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 18 | 7. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 18 | |||
8. References . . . . . . . . . . . . . . . . . . . . . . . . . 18 | 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 18 | |||
8.1. Normative References . . . . . . . . . . . . . . . . . . 18 | 8.1. Normative References . . . . . . . . . . . . . . . . . . 18 | |||
8.2. Informative References . . . . . . . . . . . . . . . . . 19 | 8.2. Informative References . . . . . . . . . . . . . . . . . 19 | |||
Appendix A. Sample BIND9 configuration for default.service.arpa. 21 | Appendix A. Testing using standard RFC2136-compliant servers . . 20 | |||
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 22 | Appendix B. How to allow services to update standard | |||
RFC2136-compliant servers . . . . . . . . . . . . . 21 | ||||
Appendix C. Sample BIND9 configuration for default.service.arpa. 21 | ||||
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 23 | ||||
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 | This document describes an enhancement to DNS-Based Service Discovery | |||
[RFC6763] that allows services to automatically register their | [RFC6763] that allows services to automatically register their | |||
services using the DNS protocol rather than using Multicast DNS | services using the DNS protocol rather than using Multicast DNS | |||
[RFC6762] (mDNS). There is already a large installed base of DNS-SD | [RFC6762] (mDNS). There is already a large installed base of DNS-SD | |||
skipping to change at page 4, line 49 ¶ | skipping to change at page 4, line 49 ¶ | |||
apex of the closest enclosing DNS zone using SOA queries | apex of the closest enclosing DNS zone using SOA queries | |||
[I-D.ietf-dnssd-push]. Having discovered the enclosing DNS zone, | [I-D.ietf-dnssd-push]. Having discovered the enclosing DNS zone, | |||
they query for the "_dnssd-srp._tcp<zone>" SRV record to discover the | they query for the "_dnssd-srp._tcp<zone>" SRV record to discover the | |||
server to which they should send DNS updates. Hosts that support SRP | server to which they should send DNS updates. Hosts that support SRP | |||
updates using TLS use the "_dnssd-srp-tls._tcp<zone>" SRV record | updates using TLS use the "_dnssd-srp-tls._tcp<zone>" SRV record | |||
instead. | instead. | |||
For devices designed for Constrained-Node Networks [RFC7228] some | For devices designed for Constrained-Node Networks [RFC7228] some | |||
simplifications are available. Instead of being configured with (or | simplifications are available. Instead of being configured with (or | |||
discovering) the service registration domain, the (proposed) special- | discovering) the service registration domain, the (proposed) special- | |||
use domain name (see [RFC6761]) "default.service.arpa" is used. | use domain name (see [RFC6761]) "default.service.arpa" is used. The | |||
Instead of learning the server to which they should send DNS updates, | details of how SRP server(s) are discovered will be specific to the | |||
a fixed IPv6 anycast address is used (value TBD). Anycasts are sent | constrained network, and therefore we do not suggest a specific | |||
using UDP unless TCP is required due to the size of the update. It | mechanism here. | |||
is the responsibility of a Constrained-Node Network supporting SRP to | ||||
provide appropriate anycast routing to deliver the DNS updates to the | ||||
appropriate server. It is the responsibility of the SRP server | ||||
supporting a Constrained-Node Network to handle the updates | ||||
appropriately. In some network environments, updates may be accepted | ||||
directly into a local "default.service.arpa" zone, which has only | ||||
local visibility. In other network environments, updates for names | ||||
ending in "default.service.arpa" may be rewritten internally to names | ||||
with broader visibility. | ||||
The reason for these different assumptions is that Constrained-Node | SRP clients on constrained networks are expected to receive from the | |||
Networks generally require special egress support, and Anycast | network a list of SRP servers with which to register. It is the | |||
packets captured at the Constrained-Node Network egress can be | responsibility of a Constrained-Node Network supporting SRP to | |||
assumed to have originated locally. Low-power devices that typically | provide one or more SRP server addresses. It is the responsibility | |||
use Constrained-Node Networks may have very limited battery power. | of the SRP server supporting a Constrained-Node Network to handle the | |||
The additional DNS lookups required to discover an SRP server and | updates appropriately. In some network environments, updates may be | |||
then communicate with it will increase the power required to | accepted directly into a local "default.service.arpa" zone, which has | |||
advertise a service; for low-power devices, the additional | only local visibility. In other network environments, updates for | |||
names ending in "default.service.arpa" may be rewritten internally to | ||||
names with broader visibility. | ||||
The reason for these different assumptions is that low-power devices | ||||
that typically use Constrained-Node Networks may have very limited | ||||
battery power. The series of DNS lookups required to discover an SRP | ||||
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 | flexibility this provides does not justify the additional use of | |||
power. | power. It is also fairly typical of such networks that some network | |||
service information is obtained as part of the process of joining the | ||||
network, and so this can be relied upon to provide nodes with the | ||||
information they need. | ||||
General networks have the potential to have more complicated | Networks that are not constrained networks can more complicated | |||
topologies at the Internet layer, which makes anycast routing more | topologies at the Internet layer. Nodes connected to such networks | |||
difficult. Such networks may or may not have the infrastructure | can be assumed to be able to do DNSSD service registration domain | |||
required to route anycast to a server that can process it. However, | discovery. Such networks are generally able to provide registration | |||
they can be assumed to be able to provide registration domain | domain discovery and routing. By requiring the use of TCP, the | |||
discovery and routing. By requiring the use of TCP, the possibility | possibility of off-network spoofing is eliminated. | |||
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 | |||
We refer to the DNS Update message sent by services using SRP as an | We refer to the DNS Update message sent by services using SRP as an | |||
SRP update. Three types of updates appear in an SRP update: Service | SRP update. Three types of updates appear in an SRP update: Service | |||
skipping to change at page 6, line 50 ¶ | skipping to change at page 6, line 50 ¶ | |||
once; this means that it's possible to do all the work of adding a | once; this means that it's possible to do all the work of adding a | |||
PTR resource record to the PTR RRset on the Service Name, and | PTR resource record to the PTR RRset on the Service Name, and | |||
creating or updating the Service Instance Name and Host Description, | creating or updating the Service Instance Name and Host Description, | |||
in a single transaction. | in a single transaction. | |||
An SRP update takes advantage of this: it is implemented as a single | An SRP update takes advantage of this: it is implemented as a single | |||
DNS Update message that contains a service's Service Discovery | DNS Update message that contains a service's Service Discovery | |||
records, Service Description records, and Host Description records. | records, Service Description records, and Host Description records. | |||
Updates done according to this specification are somewhat different | Updates done according to this specification are somewhat different | |||
than regular DNS Updates as defined in RFC2136. RFC2136 uses a | than regular DNS Updates as defined in RFC2136. The RFC2136 update | |||
fairly heavyweight process for updating: you might first attempt to | process can involve many update attempts: you might first attempt to | |||
add a name if it doesn't exist; if that fails, then in a second | add a name if it doesn't exist; if that fails, then in a second | |||
message you might update the name if it does exist but matches | message you might update the name if it does exist but matches | |||
certain preconditions. Because the registration protocol uses a | certain preconditions. Because the registration protocol uses a | |||
single transaction, some of this adaptability is lost. | single transaction, some of this adaptability is lost. | |||
In order to allow updates to happen in a single transaction, SRP | In order to allow updates to happen in a single transaction, SRP | |||
updates do not include update prerequisites. The specified in | updates do not include update prerequisites. The requirements | |||
Section 2.4.2 are implicit in the processing of SRP updates, and so | specified in Section 2.4.3 are implicit in the processing of SRP | |||
there is no need for the service sending the SRP update to put in any | updates, and so there is no need for the service sending the SRP | |||
explicit prerequisites. | update to put in any explicit prerequisites. | |||
2.3.1. How DNS-SD Service Registration differs from standard RFC2136 | 2.3.1. How DNS-SD Service Registration differs from standard RFC2136 | |||
DNS Update | DNS Update | |||
DNS-SD Service Registration is based on standard RFC2136 DNS Update, | DNS-SD Service Registration is based on standard RFC2136 DNS Update, | |||
with some differences: | with some differences: | |||
o It implements first-come first-served name allocation, protected | o It implements first-come first-served name allocation, protected | |||
using SIG(0) [RFC2931]. | using SIG(0) [RFC2931]. | |||
skipping to change at page 7, line 35 ¶ | skipping to change at page 7, line 35 ¶ | |||
o It optionally performs rewriting of "default.service.arpa" to some | o It optionally performs rewriting of "default.service.arpa" to some | |||
other domain. | other domain. | |||
o It optionally performs automatic population of the address-to-name | o It optionally performs automatic population of the address-to-name | |||
reverse mapping domains. | reverse mapping domains. | |||
o An SRP server is not required to implement general DNS Update | o An SRP server is not required to implement general DNS Update | |||
prerequsite processing. | prerequsite processing. | |||
o Simplified clients are allowed to send updates to an anycast | o Clients are allowed to send updates to the generic domain | |||
address, for names ending in "default.service.arpa" | "default.service.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 SRP. This can be done by configuring the server to listen | ||||
on the anycast address, or advertising it in the | ||||
_dnssd-srp._tcp.<zone> SRV and _dnssd-srp-tls._tcp.<zone> record. It | ||||
must be configured to be authoritative for "default.service.arpa", | ||||
and to accept updates from hosts on local networks for names under | ||||
"default.service.arpa" without authentication, since such servers | ||||
will not have support for FCFS authentication Section 2.4.1. | ||||
A server configured in this way will be able to successfully accept | ||||
and process SRP updates from services that send SRP updates. | ||||
However, no prerequisites will be applied, and this means that the | ||||
test server will accept internally inconsistent SRP updates, and will | ||||
not stop two SRP updates, sent by different services, that claim the | ||||
same name(s), from overwriting each other. | ||||
Since SRP updates are signed with keys, validation of the SIG(0) | ||||
algorithm used by the client can be done by manually installing the | ||||
client public key on the DNS server that will be receiving the | ||||
updates. The key can then be used to authenticate the client, and | ||||
can be used as a requirement for the update. An example | ||||
configuration for testing SRP using BIND 9 is given in Appendix A. | ||||
2.3.3. How to allow services to update standard RFC2136-compliant | ||||
servers | ||||
Ordinarily SRP updates will fail when sent to an RFC 2136-compliant | ||||
server that does not implement SRP because the zone being updated is | ||||
"default.service.arpa", and no DNS server that is not an SRP server | ||||
should normally be configured to be authoritative for | ||||
"default.service.arpa". Therefore, a service that sends an SRP | ||||
update can tell that the receiving server does not support SRP, 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 the 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 prerequisites to | ||||
avoid overwriting competing records. Such updates are out of scope | ||||
for SRP, and a service that implements SRP MUST first attempt to use | ||||
SRP to register itself, and should only attempt to use RFC2136 | ||||
backwards compatibility if that fails. Although the owner name for | ||||
the SRV record specifies the UDP protocol for updates, it is also | ||||
possible to use TCP, and TCP should be required to prevent spoofing. | ||||
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 | |||
registration has to be automatic. It is possible to layer more | registration has to be automatic. It is possible to layer more | |||
operational security on top of what we describe here, but what we | operational security on top of what we describe here, but what we | |||
describe here improves upon the security of mDNS. The goal is not to | describe here is an improvement over the security of mDNS. The goal | |||
provide the level of security of a network managed by a skilled | is not to provide the level of security of a network managed by a | |||
operator. | skilled operator. | |||
2.4.1. First-Come First-Served Naming | 2.4.1. First-Come First-Served Naming | |||
First-Come First-Serve naming provides a limited degree of security: | First-Come First-Serve naming provides a limited degree of security: | |||
a service that registers its service using DNS-SD Registration | a service that registers its service using DNS-SD Registration | |||
protocol is given ownership of a name for an extended period of time | protocol is given ownership of a name for an extended period of time | |||
based on the key used to authenticate the DNS Update. As long as the | based on the key used to authenticate the DNS Update. As long as the | |||
registration service remembers the name and the key used to register | registration service remembers the name and the key used to register | |||
that name, no other service can add or update the information | that name, no other service can add or update the information | |||
associated with that. FCFS naming is used to protect both the | associated with that. FCFS naming is used to protect both the | |||
skipping to change at page 10, line 7 ¶ | skipping to change at page 8, line 52 ¶ | |||
interfaces of devices looking for services of that type for too long. | interfaces of devices looking for services of that type for too long. | |||
The lifetime of the KEY records is set using the KEY-LEASE field of | The lifetime of the KEY records is set using the KEY-LEASE field of | |||
the Update Lease Option, and should be set to a much longer time, | the Update Lease Option, and should be set to a much longer time, | |||
typically 14 days. The result of this is that even though a device | typically 14 days. The result of this is that even though a device | |||
may be temporarily unplugged, disappearing from the network for a few | may be temporarily unplugged, disappearing from the network for a few | |||
days, it makes a claim on its name that lasts much longer. | days, it makes a claim on its name that lasts much longer. | |||
This means that even if a device is unplugged from the network for a | This means that even if a device is unplugged from the network for a | |||
few days, and its services are not available for that time, no other | few days, and its services are not available for that time, no other | |||
rogue device can come along and immediately claim its name the moment | device can come along and claim its name the moment it disappears | |||
it disappears from the network. In the event that a device is | from the network. In the event that a device is unplugged from the | |||
unplugged from the network and permanently discarded, then its name | network and permanently discarded, then its name is eventually | |||
is eventually cleaned up and made available for re-use. | cleaned up and made available for re-use. | |||
2.4.2. SRP Server Behavior | 2.4.2. Removing published services | |||
The SRP server first validates that the SRP update is a syntactically | To remove a service registration, the client retransmits its most | |||
recent update with an Update Lease option that has a LEASE value of | ||||
zero. If the registration is to be permanently removed, KEY-LEASE | ||||
should also be zero. Otherwise, it should have the same value it had | ||||
previously; this holds the name in reserve for when the client is | ||||
once again able to provide the service. | ||||
SRP clients are normally expected to remove all service instances | ||||
when removing a host. However, in some cases a client may not have | ||||
retained sufficient state to know that some service instance is | ||||
pointing to a host that it is removing. Nevertheless, removing the | ||||
host can be assumed to mean that all service instances pointing to it | ||||
are no longer valid. Therefore, SRP servers MAY remove all service | ||||
instances pointing to a host when a host is removed, even if the | ||||
client doesn't remove them explicitly. | ||||
2.4.3. SRP Server Behavior | ||||
2.4.3.1. Validation of Adds | ||||
The SRP server first validates that the DNS Update is a syntactically | ||||
and semantically valid DNS Update according to the rules specified in | and semantically valid DNS Update according to the rules specified in | |||
RFC2136. | RFC2136. | |||
The SRP server checks each update in the SRP update to see that it | SRP Updates consist of a set of Instructions that together add one or | |||
contains a Service Discovery update, a Service Description update, | more services. Each instruction consists either of a single add, or | |||
and a Host Description update. Order matters in DNS updates. | a delete followed by an add. When an instruction contains a delete | |||
and an add, the delete MUST precede the add. | ||||
The SRP server checks each Instruction in the SRP update to see that | ||||
it is either a Service Discovery update, a Service Description | ||||
update, or a Host Description update. Order matters in DNS updates. | ||||
Specifically, deletes must precede adds for records that the deletes | Specifically, deletes must precede adds for records that the deletes | |||
would affect; otherwise the add will have no effect. This is the | would affect; otherwise the add will have no effect. This is the | |||
only ordering constraint; aside from this constraint, updates may | only ordering constraint; aside from this constraint, updates may | |||
appear in whatever order is convenient when constructing the update. | appear in whatever order is convenient when constructing the update. | |||
Because the SRP update is a DNS update, it MUST contain a single | Because the SRP update is a DNS update, it MUST contain a single | |||
question that indicates the zone to be updated. Every delete and | question that indicates the zone to be updated. Every delete and | |||
update in an SRP update MUST be within the zone that is specified for | update in an SRP update MUST be within the zone that is specified for | |||
the SRP Update. | the SRP Update. | |||
An update is a Service Discovery update if it contains | An Instruction is a Service Discovery Instruction if it contains | |||
o exactly one RRset update, | o exactly one "Add to an RRSet" ([RFC2136] Section 2.5.1) RR, | |||
o which is for a PTR RR, | o which is a PTR RR, | |||
o which points to a Service Instance Name | o which points to a Service Instance Name | |||
o for which an update is present in the SRP update. | o for which a Service Description Instruction is present in the SRP | |||
o Service Discovery updates do not contain any deletes, and do not | Update. | |||
contain any other updates. | o Service Discovery Instructions do not contain any deletes, and do | |||
not contain any other adds. | ||||
An update is a Service Description update if, for the appropriate | An Instruction is a Service Description Instruction if, for the | |||
Service Instance Name, it contains | appropriate Service Instance Name, it contains | |||
o exactly one "Delete all RRsets from a name" update, | o exactly one "Delete all RRsets from a name" update for the service | |||
o exactly one SRV RRset update, | instance name [RFC2136] Section 2.5.3, | |||
o zero or one KEY RR update that adds a KEY RR that contains the | o exactly one "Add to an RRset" SRV RR, | |||
public key corresponding to the private key that was used to sign | o zero or one "Add to an RRset" KEY RR that contains the public key | |||
the message (if present, the KEY MUST match the KEY RR given in | corresponding to the private key that was used to sign the message | |||
the Host Description), | (if present, the KEY MUST match the KEY RR given in the Host | |||
o one or more TXT RRset updates, | Description), | |||
o and the target of the SRV record update references a hostname for | o one or more "Add to an RRset" TXT RRs, | |||
which there is a Host Description update in the SRP update. | o and the target of the SRV RR Add points to a hostname for which | |||
o Service Descriptions do not update any other records. | there is a Host Description Instruction in the SRP Update. | |||
o Service Descriptions Instructions do not modify any other RRs. | ||||
An update is a Host Description update if, for the appropriate | An Instruction is a Host Description Instruction if, for the | |||
hostname, it contains | appropriate hostname, it contains | |||
o exactly one "Delete all RRsets from a name" update, | o exactly one "Delete all RRsets from a name" RR, | |||
o one or more A or AAAA RR update(s) | o one or more "Add to an RRset" RRs of type A and/or AAAA, | |||
o exactly one KEY RR update that adds a KEY RR that contains the | o exactly one "Add to an RRset" RR that adds a KEY RR that contains | |||
public key corresponding to the private key that was used to sign | the public key corresponding to the private key that was used to | |||
the message, | sign the message, | |||
o there is a Service Instance Name update in the SRP update that | o there is a Service Instance Name Instruction in the SRP update for | |||
updates an SRV RR so that it points to the hostname being updated | which the SRV RR that is added points to the hostname being | |||
by this update. | updated by this update. | |||
o Host Description updates do not update any other records. | o Host Description updates do not modify any other records. | |||
An SRP update MUST include at least one Service Discovery update, at | An SRP Update MUST include at least one Service Discovery | |||
least one Service Description update, and exactly one Host | Instruction, at least one Service Description Instruction, and | |||
Description update. An update message that does not is not an SRP | exactly one Host Description Instruction. A DNS Update that does not | |||
update. An update message that contains any other updates, any other | is not an SRP update. A DNS Update that contains any other adds, any | |||
deletes, or any update prerequisites, is not an SRP update. Such | other deletes, or any prerequisites, is not an SRP update. Such | |||
messages should either be processed as regular RFC2136 updates, | messages should either be processed as regular RFC2136 updates, | |||
including access control checks and constraint checks, if supported, | including access control checks and constraint checks, if supported, | |||
or else rejected with RCODE=REFUSED. | or else rejected with RCODE=REFUSED. | |||
Note that if the definitions of each of these update types are | Note that if the definitions of each of these update types are | |||
followed carefully, this means that many things that look very much | followed carefully, this means that many things that look very much | |||
like SRP updates nevertheless are not. For example, a DNS update | like SRP updates nevertheless are not. For example, a DNS update | |||
that contains an update to a Service Name and an update to a Service | that contains an RRset Add to a Service Name and an RRset Add to a | |||
Instance Name, where the Service Name does not reference the Service | Service Instance Name, where the Service Name does not reference the | |||
Instance Name, is not a valid SRP update message, but may be a valid | Service Instance Name, is not a valid SRP update message, but may be | |||
RFC2136 update. | a valid RFC2136 update. | |||
Assuming that an update message has been validated with these | Assuming that a DNS Update message has been validated with these | |||
conditions and is a valid SRP update, the server checks that the name | conditions and is a valid SRP Update, the server checks that the name | |||
in the Host Description update exists. If so, then the server checks | in the Host Description Instruction exists. If so, then the server | |||
to see if the KEY record on the name is the same as the KEY record in | checks to see if the KEY record on that name is the same as the KEY | |||
the update. The server performs the same check for the KEY records | record in the Host Description Instruction. The server performs the | |||
in any Service Description update. For KEY records that were | same check for the KEY records in any Service Description | |||
omitted, the KEY from the Host Description update is used. If any | Instrructions. For KEY records that were omitted from Service | |||
existing KEY record corresponding to a KEY record in the SRP update | Description Instructions, the KEY from the Host Description | |||
does not match the KEY record in the SRP update, then the server MUST | Instruction is used. If any existing KEY record corresponding to a | |||
reject the SRP update with the YXDOMAIN RCODE. | KEY record in the SRP Update does not match the KEY same record in | |||
the SRP Update (whether provided or taken from the Host Description | ||||
Instruction), then the server MUST reject the SRP Update with the | ||||
YXDOMAIN RCODE. | ||||
Otherwise, the server validates the SRP update using SIG(0) on the | Otherwise, the server validates the SRP Update using SIG(0) on the | |||
public key in the KEY record of the Host Description update. If the | public key in the KEY record of the Host Description update. If the | |||
validation fails, the server MUST reject the SRP Update with the | validation fails, the server MUST reject the SRP Update with the | |||
REFUSED RCODE. Otherwise, the SRP update is considered valid and | REFUSED RCODE. Otherwise, the SRP update is considered valid and | |||
authentic, and is processed according to the method described in | authentic, and is processed according to the method described in | |||
RFC2136. | RFC2136. | |||
KEY record updates omitted from Service Description update are | KEY record updates omitted from Service Description update are | |||
processed as if they had been explicitly present: every Service | processed as if they had been explicitly present: every Service | |||
Description that is updated MUST, after the update, have a KEY RR, | Description that is updated MUST, after the update, have a KEY RR, | |||
and it must be the same KEY RR that is present in the Host | and it must be the same KEY RR that is present in the Host | |||
skipping to change at page 19, line 34 ¶ | skipping to change at page 19, line 15 ¶ | |||
[SUDN] "Special-Use Domain Names Registry", July 2012, | [SUDN] "Special-Use Domain Names Registry", July 2012, | |||
<https://www.iana.org/assignments/special-use-domain- | <https://www.iana.org/assignments/special-use-domain- | |||
names/special-use-domain-names.xhtml>. | names/special-use-domain-names.xhtml>. | |||
[LSDZ] "Locally-Served DNS Zones Registry", July 2011, | [LSDZ] "Locally-Served DNS Zones Registry", July 2011, | |||
<https://www.iana.org/assignments/locally-served-dns- | <https://www.iana.org/assignments/locally-served-dns- | |||
zones/locally-served-dns-zones.xhtml>. | zones/locally-served-dns-zones.xhtml>. | |||
8.2. Informative References | 8.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)", | |||
skipping to change at page 20, line 17 ¶ | skipping to change at page 19, line 40 ¶ | |||
<https://www.rfc-editor.org/info/rfc2181>. | <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", | [RFC6761] Cheshire, S. and M. Krochmal, "Special-Use Domain Names", | |||
RFC 6761, DOI 10.17487/RFC6761, February 2013, | RFC 6761, DOI 10.17487/RFC6761, February 2013, | |||
<https://www.rfc-editor.org/info/rfc6761>. | <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, | |||
skipping to change at page 21, line 7 ¶ | skipping to change at page 20, line 27 ¶ | |||
DOI 10.17487/RFC8310, March 2018, | DOI 10.17487/RFC8310, March 2018, | |||
<https://www.rfc-editor.org/info/rfc8310>. | <https://www.rfc-editor.org/info/rfc8310>. | |||
[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-10 (work in | Service Discovery", draft-ietf-dnssd-hybrid-10 (work in | |||
progress), March 2019. | progress), March 2019. | |||
[I-D.ietf-dnssd-push] | [I-D.ietf-dnssd-push] | |||
Pusateri, T. and S. Cheshire, "DNS Push Notifications", | Pusateri, T. and S. Cheshire, "DNS Push Notifications", | |||
draft-ietf-dnssd-push-21 (work in progress), July 2019. | draft-ietf-dnssd-push-25 (work in progress), October 2019. | |||
[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-03 (work in progress), October | cheshire-dnssd-roadmap-03 (work in progress), October | |||
2018. | 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. | |||
[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. | |||
Appendix A. Sample BIND9 configuration for default.service.arpa. | Appendix A. Testing using standard RFC2136-compliant servers | |||
zone "default.service.arpa." { | It may be useful to set up a DNS server for testing that does not | |||
type master; | implement SRP. This can be done by configuring the server to listen | |||
file "/etc/bind/master/service.db"; | on the anycast address, or advertising it in the | |||
allow-update { key demo.default.service.arpa.; }; | _dnssd-srp._tcp.<zone> SRV and _dnssd-srp-tls._tcp.<zone> record. It | |||
}; | must be configured to be authoritative for "default.service.arpa", | |||
and to accept updates from hosts on local networks for names under | ||||
"default.service.arpa" without authentication, since such servers | ||||
will not have support for FCFS authentication Section 2.4.1. | ||||
A server configured in this way will be able to successfully accept | ||||
and process SRP updates from services that send SRP updates. | ||||
However, no prerequisites will be applied, and this means that the | ||||
test server will accept internally inconsistent SRP updates, and will | ||||
not stop two SRP updates, sent by different services, that claim the | ||||
same name(s), from overwriting each other. | ||||
Since SRP updates are signed with keys, validation of the SIG(0) | ||||
algorithm used by the client can be done by manually installing the | ||||
client public key on the DNS server that will be receiving the | ||||
updates. The key can then be used to authenticate the client, and | ||||
can be used as a requirement for the update. An example | ||||
configuration for testing SRP using BIND 9 is given in Appendix C. | ||||
Appendix B. How to allow services to update standard RFC2136-compliant | ||||
servers | ||||
Ordinarily SRP updates will fail when sent to an RFC 2136-compliant | ||||
server that does not implement SRP because the zone being updated is | ||||
"default.service.arpa", and no DNS server that is not an SRP server | ||||
should normally be configured to be authoritative for | ||||
"default.service.arpa". Therefore, a service that sends an SRP | ||||
update can tell that the receiving server does not support SRP, 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 the 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 prerequisites to | ||||
avoid overwriting competing records. Such updates are out of scope | ||||
for SRP, and a service that implements SRP MUST first attempt to use | ||||
SRP to register itself, and should only attempt to use RFC2136 | ||||
backwards compatibility if that fails. Although the owner name for | ||||
the SRV record specifies the UDP protocol for updates, it is also | ||||
possible to use TCP, and TCP should be required to prevent spoofing. | ||||
Appendix C. Sample BIND9 configuration for default.service.arpa. | ||||
zone "default.service.arpa." { | ||||
type master; | ||||
file "/etc/bind/master/service.db"; | ||||
allow-update { key demo.default.service.arpa.; }; | ||||
}; | ||||
Zone Configuration in named.conf | Zone Configuration in named.conf | |||
$ORIGIN . | $ORIGIN . | |||
$TTL 57600 ; 16 hours | $TTL 57600 ; 16 hours | |||
default.service.arpa IN SOA ns3.default.service.arpa. postmaster.default.service.arpa. ( | default.service.arpa IN SOA ns3.default.service.arpa. | |||
2951053287 ; serial | postmaster.default.service.arpa. ( | |||
3600 ; refresh (1 hour) | 2951053287 ; serial | |||
1800 ; retry (30 minutes) | 3600 ; refresh (1 hour) | |||
604800 ; expire (1 week) | 1800 ; retry (30 minutes) | |||
3600 ; minimum (1 hour) | 604800 ; expire (1 week) | |||
) | 3600 ; minimum (1 hour) | |||
NS ns3.default.service.arpa. | ) | |||
SRV 0 0 53 ns3.default.service.arpa. | NS ns3.default.service.arpa. | |||
$ORIGIN default.service.arpa. | SRV 0 0 53 ns3.default.service.arpa. | |||
$TTL 3600 ; 1 hour | $ORIGIN default.service.arpa. | |||
_ipps._tcp PTR demo._ipps._tcp | $TTL 3600 ; 1 hour | |||
$ORIGIN _ipps._tcp.default.service.arpa. | _ipps._tcp PTR demo._ipps._tcp | |||
demo TXT "0" | $ORIGIN _ipps._tcp.default.service.arpa. | |||
SRV 0 0 9992 demo.default.service.arpa. | demo TXT "0" | |||
$ORIGIN _udp.default.service.arpa. | SRV 0 0 9992 demo.default.service.arpa. | |||
$TTL 3600 ; 1 hour | $ORIGIN _udp.default.service.arpa. | |||
_dns-update PTR ns3.default.service.arpa. | $TTL 3600 ; 1 hour | |||
$ORIGIN _tcp.default.service.arpa. | _dns-update PTR ns3.default.service.arpa. | |||
_dnssd-srp PTR ns3.default.service.arpa. | $ORIGIN _tcp.default.service.arpa. | |||
$ORIGIN default.service.arpa. | _dnssd-srp PTR ns3.default.service.arpa. | |||
$TTL 300 ; 5 minutes | $ORIGIN default.service.arpa. | |||
ns3 AAAA 2001:db8:0:1::1 | $TTL 300 ; 5 minutes | |||
$TTL 3600 ; 1 hour | ns3 AAAA 2001:db8:0:1::1 | |||
demo AAAA 2001:db8:0:2::1 | $TTL 3600 ; 1 hour | |||
KEY 513 3 13 ( | demo AAAA 2001:db8:0:2::1 | |||
qweEmaaq0FAWok5//ftuQtZgiZoiFSUsm0srWREdywQU | KEY 513 3 13 ( | |||
9dpvtOhrdKWUuPT3uEFF5TZU6B4q1z1I662GdaUwqg== | qweEmaaq0FAWok5//ftuQtZgiZoiFSUsm0srWREdywQU | |||
); alg = ECDSAP256SHA256 ; key id = 15008 | 9dpvtOhrdKWUuPT3uEFF5TZU6B4q1z1I662GdaUwqg== | |||
AAAA ::1 | ); alg = ECDSAP256SHA256 ; key id = 15008 | |||
AAAA ::1 | ||||
Example Zone file | Example Zone file | |||
Authors' Addresses | Authors' Addresses | |||
Ted Lemon | ||||
Nibbhaya Consulting | ||||
P.O. Box 958 | ||||
Brattleboro, Vermont 05302 | ||||
United States of America | ||||
Email: mellon@fugue.com | ||||
Stuart Cheshire | Stuart Cheshire | |||
Apple Inc. | Apple Inc. | |||
One Apple Park Way | 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 | ||||
Nibbhaya Consulting | ||||
P.O. Box 958 | ||||
Brattleboro, Vermont 05302 | ||||
United States of America | ||||
Email: mellon@fugue.com | ||||
End of changes. 39 change blocks. | ||||
216 lines changed or deleted | 249 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/ |