idnits 2.17.1 draft-ietf-dnssd-srp-10.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- == There is 1 instance of lines with non-ascii characters in the document. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- == There are 2 instances of lines with non-RFC2606-compliant FQDNs in the document. == There are 2 instances of lines with non-RFC3849-compliant IPv6 addresses in the document. If these are example addresses, they should be changed. ** The document seems to lack a both a reference to RFC 2119 and the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. RFC 2119 keyword, line 212: '...rvices using SRP MUST use the domain n...' RFC 2119 keyword, line 215: '...e than one domain name, it MUST NOT be...' RFC 2119 keyword, line 295: '...ce Instance Name MUST be referenced by...' RFC 2119 keyword, line 399: '.../private key pair. This key pair MUST...' RFC 2119 keyword, line 401: '..., the SRP client MUST be pre-configure...' (60 more instances...) Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (12 July 2021) is 1009 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: A later version (-03) exists of draft-sekar-dns-ul-02 -- Possible downref: Non-RFC (?) normative reference: ref. 'SUDN' -- Possible downref: Non-RFC (?) normative reference: ref. 'LSDZ' == Outdated reference: A later version (-02) exists of draft-sctl-advertising-proxy-01 Summary: 1 error (**), 0 flaws (~~), 6 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Internet Engineering Task Force T. Lemon 3 Internet-Draft S. Cheshire 4 Intended status: Standards Track Apple Inc. 5 Expires: 13 January 2022 12 July 2021 7 Service Registration Protocol for DNS-Based Service Discovery 8 draft-ietf-dnssd-srp-10 10 Abstract 12 The Service Registration Protocol for DNS-Based Service Discovery 13 uses the standard DNS Update mechanism to enable DNS-Based Service 14 Discovery using only unicast packets. This makes it possible to 15 deploy DNS Service Discovery without multicast, which greatly 16 improves scalability and improves performance on networks where 17 multicast service is not an optimal choice, particularly 802.11 18 (Wi-Fi) and 802.15.4 (IoT) networks. DNS-SD Service registration 19 uses public keys and SIG(0) to allow services to defend their 20 registrations against attack. 22 Status of This Memo 24 This Internet-Draft is submitted in full conformance with the 25 provisions of BCP 78 and BCP 79. 27 Internet-Drafts are working documents of the Internet Engineering 28 Task Force (IETF). Note that other groups may also distribute 29 working documents as Internet-Drafts. The list of current Internet- 30 Drafts is at https://datatracker.ietf.org/drafts/current/. 32 Internet-Drafts are draft documents valid for a maximum of six months 33 and may be updated, replaced, or obsoleted by other documents at any 34 time. It is inappropriate to use Internet-Drafts as reference 35 material or to cite them other than as "work in progress." 37 This Internet-Draft will expire on 13 January 2022. 39 Copyright Notice 41 Copyright (c) 2021 IETF Trust and the persons identified as the 42 document authors. All rights reserved. 44 This document is subject to BCP 78 and the IETF Trust's Legal 45 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 46 license-info) in effect on the date of publication of this document. 47 Please review these documents carefully, as they describe your rights 48 and restrictions with respect to this document. Code Components 49 extracted from this document must include Simplified BSD License text 50 as described in Section 4.e of the Trust Legal Provisions and are 51 provided without warranty as described in the Simplified BSD License. 53 Table of Contents 55 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 56 2. Service Registration Protocol . . . . . . . . . . . . . . . . 5 57 2.1. Protocol Variants . . . . . . . . . . . . . . . . . . . . 5 58 2.1.1. Full-featured Hosts . . . . . . . . . . . . . . . . . 5 59 2.1.2. Constrained Hosts . . . . . . . . . . . . . . . . . . 6 60 2.1.3. Why two variants? . . . . . . . . . . . . . . . . . . 6 61 2.2. Protocol Details . . . . . . . . . . . . . . . . . . . . 6 62 2.2.1. What to publish . . . . . . . . . . . . . . . . . . . 7 63 2.2.2. Where to publish it . . . . . . . . . . . . . . . . . 7 64 2.2.3. How to publish it . . . . . . . . . . . . . . . . . . 8 65 2.2.4. How to secure it . . . . . . . . . . . . . . . . . . 9 66 2.2.5. Service Behavior . . . . . . . . . . . . . . . . . . 9 67 2.3. SRP Server Behavior . . . . . . . . . . . . . . . . . . . 12 68 2.3.1. Validation of Adds and Deletes . . . . . . . . . . . 12 69 2.3.2. Valid SRP Update Requirements . . . . . . . . . . . . 14 70 2.3.3. FCFS Name And Signature Validation . . . . . . . . . 15 71 2.3.4. SRP Update response . . . . . . . . . . . . . . . . . 16 72 2.3.5. Optional Behavior . . . . . . . . . . . . . . . . . . 16 73 3. TTL Consistency . . . . . . . . . . . . . . . . . . . . . . . 17 74 4. Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . 17 75 4.1. Cleaning up stale data . . . . . . . . . . . . . . . . . 17 76 5. Sleep Proxy . . . . . . . . . . . . . . . . . . . . . . . . . 19 77 6. Security Considerations . . . . . . . . . . . . . . . . . . . 20 78 6.1. Source Validation . . . . . . . . . . . . . . . . . . . . 20 79 6.2. SRP Server Authentication . . . . . . . . . . . . . . . . 21 80 6.3. Required Signature Algorithm . . . . . . . . . . . . . . 21 81 7. Privacy Considerations . . . . . . . . . . . . . . . . . . . 21 82 8. Delegation of 'service.arpa.' . . . . . . . . . . . . . . . . 21 83 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 22 84 9.1. Registration and Delegation of 'service.arpa' as a 85 Special-Use Domain Name . . . . . . . . . . . . . . . . . 22 86 9.2. 'dnssd-srp' Service Name . . . . . . . . . . . . . . . . 22 87 9.3. 'dnssd-srp-tls' Service Name . . . . . . . . . . . . . . 22 88 9.4. Anycast Address . . . . . . . . . . . . . . . . . . . . . 23 89 10. Implementation Status . . . . . . . . . . . . . . . . . . . . 23 90 11. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 24 91 12. Normative References . . . . . . . . . . . . . . . . . . . . 24 92 13. Informative References . . . . . . . . . . . . . . . . . . . 26 93 Appendix A. Testing using standard RFC2136-compliant servers . . 27 94 Appendix B. How to allow services to update standard 95 RFC2136-compliant servers . . . . . . . . . . . . . . . . 28 97 Appendix C. Sample BIND9 configuration for 98 default.service.arpa. . . . . . . . . . . . . . . . . . . 28 99 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 29 101 1. Introduction 103 DNS-Based Service Discovery [RFC6763] is a component of Zero 104 Configuration Networking [RFC6760] [ZC] [I-D.cheshire-dnssd-roadmap]. 106 This document describes an enhancement to DNS-Based Service Discovery 107 [RFC6763] that allows services to register their services using the 108 DNS protocol rather than using Multicast DNS [RFC6762] (mDNS). There 109 is already a large installed base of DNS-SD clients that can discover 110 services using the DNS protocol. 112 This document is intended for three audiences: implementors of 113 software that provides services that should be advertised using 114 DNS-SD, implementors of DNS servers that will be used in contexts 115 where DNS-SD registration is needed, and administrators of networks 116 where DNS-SD service is required. The document is intended to 117 provide sufficient information to allow interoperable implementation 118 of the registration protocol. 120 DNS-Based Service Discovery (DNS-SD) allows services to advertise the 121 fact that they provide service, and to provide the information 122 required to access that service. DNS-SD clients can then discover 123 the set of services of a particular type that are available. They 124 can then select a service from among those that are available and 125 obtain the information required to use it. Although DNS-SD using the 126 DNS protocol (as opposed to mDNS) can be more efficient and 127 versatile, it is not common in practice, because of the difficulties 128 associated with updating authoritative DNS services with service 129 information. 131 Existing practice for updating DNS zones is to either manually enter 132 new data, or else use DNS Update [RFC2136]. Unfortunately DNS Update 133 requires either that the authoritative DNS server automatically trust 134 updates, or else that the DNS Update client have some kind of shared 135 secret or public key that is known to the DNS server and can be used 136 to authenticate the update. Furthermore, DNS Update can be a fairly 137 chatty process, requiring multiple round trips with different 138 conditional predicates to complete the update process. 140 The SRP protocol adds a set of default heuristics for processing DNS 141 updates that eliminates the need for DNS update conditional 142 predicates: instead, the SRP server has a set of default predicates 143 that are applied to the update, and the update either succeeds 144 entirely, or fails in a way that allows the registering service to 145 know what went wrong and construct a new update. 147 SRP also adds a feature called First-Come, First-Served Naming, which 148 allows the registering service to claim a name that is not yet in 149 use, and, using SIG(0) [RFC2931], to authenticate both the initial 150 claim and subsequent updates. This prevents name conflicts, since a 151 second SRP service attempting to claim the same name will not possess 152 the SIG(0) key used by the first service to claim it, and so its 153 claim will be rejected and the second service will have to choose a 154 new name. 156 Finally, SRP adds the concept of a 'lease,' similar to leases in 157 Dynamic Host Configuration Protocol [RFC8415]. The SRP registration 158 itself has a lease which may be on the order of an hour; if the 159 registering service does not renew the lease before it has elapsed, 160 the registration is removed. The claim on the name can have a longer 161 lease, so that another service cannot claim the name, even though the 162 registration has expired. 164 The Service Registration Protocol for DNS-SD (SRP), described in this 165 document, provides a reasonably secure mechanism for publishing this 166 information. Once published, these services can be readily 167 discovered by DNS-SD clients using standard DNS lookups. 169 The DNS-SD specification [RFC6763], Section 10 ("Populating the DNS 170 with Information"), briefly discusses ways that services can publish 171 their information in the DNS namespace. In the case of mDNS, it 172 allows services to publish their information on the local link, using 173 names in the ".local" namespace, which makes their services directly 174 discoverable by peers attached to that same local link. 176 RFC6763 also allows clients to discover services using the DNS 177 protocol [RFC1035]. This can be done by having a system 178 administrator manually configure service information in the DNS, but 179 manually populating DNS authoritative server databases is costly and 180 potentially error-prone, and requires a knowledgable network 181 administrator. Consequently, although all DNS-SD client 182 implementations of which we are aware support DNS-SD using DNS 183 queries, in practice it is used much less frequently than mDNS. 185 The Discovery Proxy [RFC8766] provides one way to automatically 186 populate the DNS namespace, but is only appropriate on networks where 187 services are easily advertised using mDNS. This document describes a 188 solution more suitable for networks where multicast is inefficient, 189 or where sleepy devices are common, by supporting both offering of 190 services, and discovery of services, using unicast. 192 2. Service Registration Protocol 194 Services that implement SRP use DNS Update [RFC2136] [RFC3007] to 195 publish service information in the DNS. Two variants exist, one for 196 full-featured hosts, and one for devices designed for "Constrained- 197 Node Networks" [RFC7228]. An SRP server is most likely an 198 authoritative DNS server, or else is updating an authoritative DNS 199 server. There is no requirement that the server that is receiving 200 SRP requests be the same server that is answering queries that return 201 records that have been registered. 203 2.1. Protocol Variants 205 2.1.1. Full-featured Hosts 207 Full-featured hosts are either configured manually with a 208 registration domain, or use the "dr._dns-sd._udp." query 209 ([RFC6763], Section 11) to learn the default registration domain from 210 the network. RFC6763 says to discover the registration domain using 211 either ".local" or a network-supplied domain name for . 212 Services using SRP MUST use the domain name received through the 213 DHCPv4 Domain Name option ([RFC2132], Section 3.17), if available, or 214 the Neighbor Discovery DNS Search List option [RFC8106]. If the DNS 215 Search List option contains more than one domain name, it MUST NOT be 216 used. If neither option is available, the Service Registration 217 protocol is not available on the local network. 219 Manual configuration of the registration domain can be done either by 220 querying the list of available registration zones ("r._dns-sd._udp") 221 and allowing the user to select one from the UI, or by any other 222 means appropriate to the particular use case being addressed. Full- 223 featured devices construct the names of the SRV, TXT, and PTR records 224 describing their service(s) as subdomains of the chosen service 225 registration domain. For these names they then discover the zone 226 apex of the closest enclosing DNS zone using SOA queries [RFC8765]. 227 Having discovered the enclosing DNS zone, they query for the 228 "_dnssd-srp._tcp." SRV record to discover the server to which 229 they should send DNS updates. Hosts that support SRP updates using 230 TLS use the "_dnssd-srp-tls._tcp." SRV record instead. 232 2.1.2. Constrained Hosts 234 For devices designed for Constrained-Node Networks [RFC7228] some 235 simplifications are available. Instead of being configured with (or 236 discovering) the service registration domain, the (proposed) special- 237 use domain name (see [RFC6761]) "default.service.arpa" is used. The 238 details of how SRP server(s) are discovered will be specific to the 239 constrained network, and therefore we do not suggest a specific 240 mechanism here. 242 SRP clients on constrained networks are expected to receive from the 243 network a list of SRP servers with which to register. It is the 244 responsibility of a Constrained-Node Network supporting SRP to 245 provide one or more SRP server addresses. It is the responsibility 246 of the SRP server supporting a Constrained-Node Network to handle the 247 updates appropriately. In some network environments, updates may be 248 accepted directly into a local "default.service.arpa" zone, which has 249 only local visibility. In other network environments, updates for 250 names ending in "default.service.arpa" may be rewritten internally to 251 names with broader visibility. 253 2.1.3. Why two variants? 255 The reason for these different assumptions is that low-power devices 256 that typically use Constrained-Node Networks may have very limited 257 battery power. The series of DNS lookups required to discover an SRP 258 server and then communicate with it will increase the power required 259 to advertise a service; for low-power devices, the additional 260 flexibility this provides does not justify the additional use of 261 power. It is also fairly typical of such networks that some network 262 service information is obtained as part of the process of joining the 263 network, and so this can be relied upon to provide nodes with the 264 information they need. 266 Networks that are not constrained networks can have more complicated 267 topologies at the Internet layer. Nodes connected to such networks 268 can be assumed to be able to do DNSSD service registration domain 269 discovery. Such networks are generally able to provide registration 270 domain discovery and routing. By requiring the use of TCP, the 271 possibility of off-network spoofing is eliminated. 273 2.2. Protocol Details 275 We will discuss several parts to this process: how to know what to 276 publish, how to know where to publish it (under what name), how to 277 publish it, how to secure its publication, and how to maintain the 278 information once published. 280 2.2.1. What to publish 282 We refer to the DNS Update message sent by services using SRP as an 283 SRP update. Three types of updates appear in an SRP update: Service 284 Discovery records, Service Description records, and Host Description 285 records. 287 * Service Discovery records are one or more PTR RRs, mapping from 288 the generic service type (or subtype) to the specific Service 289 Instance Name. 290 * Service Description records are exactly one SRV RR, exactly one 291 KEY RR, and one or more TXT RRs, all with the same name, the 292 Service Instance Name ([RFC6763], Section 4.1). In principle 293 Service Description records can include other record types, with 294 the same Service Instance Name, though in practice they rarely do. 295 The Service Instance Name MUST be referenced by one or more 296 Service Discovery PTR records, unless it is a placeholder service 297 registration for an intentionally non-discoverable service name. 298 * The Host Description records for a service are a KEY RR, used to 299 claim exclusive ownership of the service registration, and one or 300 more RRs of type A or AAAA, giving the IPv4 or IPv6 address(es) of 301 the host where the service resides. 303 RFC 6763 describes the details of what each of these types of updates 304 contains and is the definitive source for information about what to 305 publish; the reason for summarizing this here is to provide the 306 reader with enough information about what will be published that the 307 service registration process can be understood at a high level 308 without first learning the full details of DNS-SD. Also, the 309 "Service Instance Name" is an important aspect of first-come, first- 310 serve naming, which we describe later on in this document. 312 2.2.2. Where to publish it 314 Multicast DNS uses a single namespace, ".local", which is valid on 315 the local link. This convenience is not available for DNS-SD using 316 the DNS protocol: services must exist in some specific unicast 317 namespace. 319 As described above, full-featured devices are responsible for knowing 320 in what domain they should register their services. Devices made for 321 Constrained-Node Networks register in the (proposed) special use 322 domain name [RFC6761] "default.service.arpa", and let the SRP server 323 handle rewriting that to a different domain if necessary. 325 2.2.3. How to publish it 327 It is possible to issue a DNS Update that does several things at 328 once; this means that it's possible to do all the work of adding a 329 PTR resource record to the PTR RRset on the Service Name, and 330 creating or updating the Service Instance Name and Host Description, 331 in a single transaction. 333 An SRP update takes advantage of this: it is implemented as a single 334 DNS Update message that contains a service's Service Discovery 335 records, Service Description records, and Host Description records. 337 Updates done according to this specification are somewhat different 338 than regular DNS Updates as defined in RFC2136. The RFC2136 update 339 process can involve many update attempts: you might first attempt to 340 add a name if it doesn't exist; if that fails, then in a second 341 message you might update the name if it does exist but matches 342 certain preconditions. Because the registration protocol uses a 343 single transaction, some of this adaptability is lost. 345 In order to allow updates to happen in a single transaction, SRP 346 updates do not include update prerequisites. The requirements 347 specified in Section 2.3 are implicit in the processing of SRP 348 updates, and so there is no need for the service sending the SRP 349 update to put in any explicit prerequisites. 351 2.2.3.1. How DNS-SD Service Registration differs from standard RFC2136 352 DNS Update 354 DNS-SD Service Registration is based on standard RFC2136 DNS Update, 355 with some differences: 357 * It implements first-come first-served name allocation, protected 358 using SIG(0) [RFC2931]. 359 * It enforces policy about what updates are allowed. 360 * It optionally performs rewriting of "default.service.arpa" to some 361 other domain. 362 * It optionally performs automatic population of the address-to-name 363 reverse mapping domains. 364 * An SRP server is not required to implement general DNS Update 365 prerequisite processing. 366 * SRP clients are allowed to send updates to the generic domain 367 "default.service.arpa" 369 2.2.4. How to secure it 371 Traditional DNS update is secured using the TSIG protocol, which uses 372 a secret key shared between the DNS Update client (which issues the 373 update) and the server (which authenticates it). This model does not 374 work for automatic service registration. 376 The goal of securing the DNS-SD Registration Protocol is to provide 377 the best possible security given the constraint that service 378 registration has to be automatic. It is possible to layer more 379 operational security on top of what we describe here, but what we 380 describe here is an improvement over the security of mDNS. The goal 381 is not to provide the level of security of a network managed by a 382 skilled operator. 384 2.2.4.1. First-Come First-Served Naming 386 First-Come First-Serve naming provides a limited degree of security: 387 a service that registers its service using DNS-SD Registration 388 protocol is given ownership of a name for an extended period of time 389 based on the key used to authenticate the DNS Update. As long as the 390 registration service remembers the name and the key used to register 391 that name, no other service can add or update the information 392 associated with that. FCFS naming is used to protect both the 393 Service Description and the Host Description. 395 2.2.5. Service Behavior 397 2.2.5.1. Public/Private key pair generation and storage 399 The service generates a public/private key pair. This key pair MUST 400 be stored in stable storage; if there is no writable stable storage 401 on the SRP client, the SRP client MUST be pre-configured with a 402 public/private key pair in read-only storage that can be used. This 403 key pair MUST be unique to the device. This key pair MUST be unique 404 to the device. A device with rewritable storage should retain this 405 key indefinitely. When the device changes ownership, it may be 406 appropriate to erase the old key and install a new one. Therefore, 407 the SRP client on the device SHOULD provide a mechanism to overwrite 408 the key, for example as the result of a "factory reset." 410 When sending DNS updates, the service includes a KEY record 411 containing the public portion of the key in each Host Description 412 update and each Service Description update. Each KEY record MUST 413 contain the same public key. The update is signed using SIG(0), 414 using the private key that corresponds to the public key in the KEY 415 record. The lifetimes of the records in the update is set using the 416 EDNS(0) Update Lease option [I-D.sekar-dns-ul]. 418 The KEY record in Service Description updates MAY be omitted for 419 brevity; if it is omitted, the SRP server MUST behave as if the same 420 KEY record that is given for the Host Description is also given for 421 each Service Description for which no KEY record is provided. 422 Omitted KEY records are not used when computing the SIG(0) signature. 424 2.2.5.2. Name Conflict Handling 426 Both Host Description records and Service Description Records can 427 have names that result in name conflicts. Service Discovery records 428 cannot have name conflicts. If any Host Description or Service 429 Description record is found by the server to have a conflict with an 430 existing name, the server will respond to the SRP Update with a 431 YXDOMAIN rcode. In this case, the Service MUST either abandon the 432 service registration attempt, or else choose a new name. 434 There is no specific requirement for how this is done; typically, 435 however, the service will append a number to the preferred name. 436 This number could be sequentially increasing, or could be chosen 437 randomly. One existing implementation attempts several sequential 438 numbers before choosing randomly. So for instance, it might try 439 host.service.arpa, then host-1.service.arpa, then host- 440 2.service.arpa, then host-31773.service.arpa. 442 2.2.5.3. Record Lifetimes 444 The lifetime of the DNS-SD PTR, SRV, A, AAAA and TXT records 445 [RFC6763] uses the LEASE field of the Update Lease option, and is 446 typically set to two hours. This means that if a device is 447 disconnected from the network, it does not appear in the user 448 interfaces of devices looking for services of that type for too long. 450 The lifetime of the KEY records is set using the KEY-LEASE field of 451 the Update Lease Option, and should be set to a much longer time, 452 typically 14 days. The result of this is that even though a device 453 may be temporarily unplugged, disappearing from the network for a few 454 days, it makes a claim on its name that lasts much longer. 456 This means that even if a device is unplugged from the network for a 457 few days, and its services are not available for that time, no other 458 device can come along and claim its name the moment it disappears 459 from the network. In the event that a device is unplugged from the 460 network and permanently discarded, then its name is eventually 461 cleaned up and made available for re-use. 463 2.2.5.4. Compression in SRV records 465 Although [RFC2782] requires that the target name in the SRV record 466 not be compressed, an SRP client SHOULD compress the target in the 467 SRV record. The motivation for _not_ compressing in RFC2782 is not 468 stated, but is assumed to be because a caching resolver that does not 469 understand the format of the SRV record might store it as binary data 470 and thus return an invalid pointer in response to a query. This does 471 not apply in the case of SRP: an SRP server needs to understand SRV 472 records in order to validate the SRP update. Compression of the 473 target potentially saves substantial space in the SRP update. 475 2.2.5.5. Removing published services 477 2.2.5.5.1. Removing all published services 479 To remove all the services registered to a particular host, the SRP 480 client retransmits its most recent update with an Update Lease option 481 that has a LEASE value of zero. If the registration is to be 482 permanently removed, KEY-LEASE should also be zero. Otherwise, it 483 should have the same value it had previously; this holds the name in 484 reserve for when the SRP client is once again able to provide the 485 service. 487 SRP clients are normally expected to remove all service instances 488 when removing a host. However, in some cases a SRP client may not 489 have retained sufficient state to know that some service instance is 490 pointing to a host that it is removing. This method of removing 491 services is intended for the case where the client is going offline 492 and does not want its services advertised. Therefore, it is 493 sufficient for the client to send the Host Description Instruction 494 (Section 2.3.1.3). 496 To support this, when removing services based on the lease time being 497 zero, an SRP server MUST remove all service instances pointing to a 498 host when a host is removed, even if the SRP client doesn't list them 499 explicitly. If the key lease time is nonzero, the SRP server MUST 500 NOT delete the KEY records for these SRP clients. 502 2.2.5.5.2. Removing some published services 504 In some use cases a client may need to remove some specific service, 505 without removing its other services. This can be accomplished in one 506 of two ways. To simply remove a specific service, the client sends a 507 valid SRP update where the Service Discovery instruction 508 (Section 2.3.1.1) contains a single Delete an RR from an RRset 509 ([RFC2136], Section 2.5.4) update that deletes the PTR record whose 510 target is the service instance name. The Service Description 511 instruction (Section 2.3.1.2) in this case contains a single Delete 512 all RRsets from a Name ([RFC2136], Section 2.5.3) update to the 513 service instance name. 515 The second alternative is used when some service is being replaced by 516 a different service with a different service instance name. In this 517 case, the old service is deleted as in the first alternative. The 518 new service is added, just as it would be in an update that wasn't 519 deleting the old service. Because both the removal of the old 520 service and the add of the new service consist of a valid Service 521 Discovery instruction and a valid Service Description instruction, 522 the update as a whole is a valid SRP update, and will result in the 523 old service being removed and the new one added, or, to put it 524 differently, in the old service being replaced by the new service. 526 It is perhaps worth noting that if a service is being updated without 527 the service instance name changing, that will look very much like the 528 second alternative above. The difference is that because the target 529 for the PTR record in the Service Discovery instruction is the same 530 for both the Delete An RR From An RRset update and the Add To An 531 RRSet update, these will be seen as a single Service Description 532 instruction, not as two instructions. The same would be true of the 533 Service Description instruction. 535 Whichever of these two alternatives is used, the host lease will be 536 updated with the lease time provided in the SRP update. In neither 537 of these cases is it permissible to delete the host. All services 538 must point to a host. If a host is to be deleted, this must be done 539 using the method described in Section 2.2.5.5.1, which deletes the 540 host and all services that have that host as their target. 542 2.3. SRP Server Behavior 544 2.3.1. Validation of Adds and Deletes 546 The SRP server first validates that the DNS Update is a syntactically 547 and semantically valid DNS Update according to the rules specified in 548 RFC2136. 550 SRP Updates consist of a set of _instructions_ that together add or 551 remove one or more services. Each instruction consists some 552 combination of delete updates and add updates. When an instruction 553 contains a delete and an add, the delete MUST precede the add. 555 The SRP server checks each instruction in the SRP update to see that 556 it is either a Service Discovery update, a Service Description 557 update, or a Host Description update. Order matters in DNS updates. 558 Specifically, deletes must precede adds for records that the deletes 559 would affect; otherwise the add will have no effect. This is the 560 only ordering constraint; aside from this constraint, updates may 561 appear in whatever order is convenient when constructing the update. 563 Because the SRP update is a DNS update, it MUST contain a single 564 question that indicates the zone to be updated. Every delete and 565 update in an SRP update MUST be within the zone that is specified for 566 the SRP Update. 568 2.3.1.1. Service Discovery Instruction 570 An instruction is a Service Discovery Instruction if it contains 572 * exactly one "Add to an RRSet" or exactly one "Delete an RR from an 573 RRSet" ([RFC2136], Section 2.5.1) RR update, 574 * which updates a PTR RR, 575 * which points to a Service Instance Name 576 * for which a Service Description Instruction is present in the SRP 577 Update 578 * if the Service Discovery update is an "Add to an RRSet" 579 instruction, the Service Description Instruction does not match if 580 it does not contain an "Add to an RRset" update for the SRV RR 581 describing that service. 582 * if the Service Discovery Instruction is an "Delete an RR from an 583 RRSet" update, the Service Description Instruction does not match 584 if it contains an "Add to an RRset" update. 585 * Service Discovery Instructions do not contain any other add or 586 delete updates. 588 2.3.1.2. Service Description Instruction 590 An instruction is a Service Description Instruction if, for the 591 appropriate Service Instance Name, it contains 593 * exactly one "Delete all RRsets from a name" update for the service 594 instance name ([RFC2136], Section 2.5.3), 595 * zero or one "Add to an RRset" SRV RR, 596 * zero or one "Add to an RRset" KEY RR that, if present, contains 597 the public key corresponding to the private key that was used to 598 sign the message (if present, the KEY MUST match the KEY RR given 599 in the Host Description), 600 * zero or more "Add to an RRset" TXT RRs, 601 * If there is one "Add to an RRset" SRV update, there MUST be at 602 least one "Add to an RRset" TXT update. 603 * the target of the SRV RR Add, if present points to a hostname for 604 which there is a Host Description Instruction in the SRP Update, 605 or 606 * if there is no "Add to an RRset" SRV RR, then either 607 - the name to which the "Delete all RRsets from a name" applies 608 does not exist, or 610 - there is an existing KEY RR on that name, which matches the key 611 with which the SRP Update was signed. 612 * Service Descriptions Instructions do not modify any other RRs. 614 An SRP server MUST correctly handle compressed names in the SRV 615 target. 617 2.3.1.3. Host Description Instruction 619 An instruction is a Host Description Instruction if, for the 620 appropriate hostname, it contains 622 * exactly one "Delete all RRsets from a name" RR, 623 * one or more "Add to an RRset" RRs of type A and/or AAAA, 624 * A and/or AAAA records must be of sufficient scope to be reachable 625 by all hosts that might query the DNS. If a link-scope address or 626 IPv4 autoconfiguration address is provided by the SRP client, the 627 SRP server MUST treat this as if no address records were received; 628 that is, the Host Description is not valid. 629 * exactly one "Add to an RRset" RR that adds a KEY RR that contains 630 the public key corresponding to the private key that was used to 631 sign the message, 632 * there is a Service Instance Name Instruction in the SRP update for 633 which the SRV RR that is added points to the hostname being 634 updated by this update. 635 * Host Description updates do not modify any other records. 637 2.3.2. Valid SRP Update Requirements 639 An SRP Update MUST include zero or more Service Discovery 640 instructions. For each Service Discovery instruction, there MUST be 641 at least one Service Description instruction. Note that in the case 642 of SRP subtypes Section 7.1 of [RFC6763], it's quite possible that 643 two Service Discovery instructions might reference the same Service 644 Description instruction. For each Service Description instruction 645 there MUST be at least one Service Discovery instruction with its 646 service instance name as the target of its PTR record. There MUST be 647 exactly one Host Description Instruction. Every Service Description 648 instruction must have that Host Description instruction as the target 649 of its SRV record. A DNS Update that does not meet these constraints 650 is not an SRP update. 652 A DNS Update that contains any additional adds or deletes that cannot 653 be identified as Service Discovery, Service Description or Host 654 Description instructions is not an SRP update. A DNS update that 655 contains any prerequisites is not an SRP update. Such messages 656 should either be processed as regular RFC2136 updates, including 657 access control checks and constraint checks, if supported, or else 658 rejected with RCODE=REFUSED. 660 In addition, in order for an update to be a valid SRP update, the 661 target of every Service Discovery Instruction MUST be a Service 662 Description Instruction that is present in the SRP Update. There 663 MUST NOT be any Service Description Instruction to which no Service 664 Discovery Instruction points. The target of the SRV record in every 665 Service Description instruction MUST be the single Host Description 666 Instruction. 668 If the definitions of each of these instructions are followed 669 carefully and the update requirements are validated correctly, many 670 DNS Updates that look very much like SRP updates nevertheless will 671 fail to validate. For example, a DNS update that contains an RRset 672 Add to a Service Name and an RRset Add to a Service Instance Name, 673 where the Service Name does not reference the Service Instance Name, 674 is not a valid SRP update message, but may be a valid RFC2136 update. 676 2.3.3. FCFS Name And Signature Validation 678 Assuming that a DNS Update message has been validated with these 679 conditions and is a valid SRP Update, the server checks that the name 680 in the Host Description Instruction exists. If so, then the server 681 checks to see if the KEY record on that name is the same as the KEY 682 record in the Host Description Instruction. The server performs the 683 same check for the KEY records in any Service Description 684 Instructions. For KEY records that were omitted from Service 685 Description Instructions, the KEY from the Host Description 686 Instruction is used. If any existing KEY record corresponding to a 687 KEY record in the SRP Update does not match the KEY same record in 688 the SRP Update (whether provided or taken from the Host Description 689 Instruction), then the server MUST reject the SRP Update with the 690 YXDOMAIN RCODE. 692 Otherwise, the server validates the SRP Update using SIG(0) on the 693 public key in the KEY record of the Host Description update. If the 694 validation fails, the server MUST reject the SRP Update with the 695 REFUSED RCODE. Otherwise, the SRP update is considered valid and 696 authentic, and is processed according to the method described in 697 RFC2136. 699 KEY record updates omitted from Service Description update are 700 processed as if they had been explicitly present: every Service 701 Description that is updated MUST, after the update, have a KEY RR, 702 and it must be the same KEY RR that is present in the Host 703 Description to which the Service Description refers. 705 2.3.4. SRP Update response 707 The status that is returned depends on the result of processing the 708 update, and can be either SUCCESS or SERVFAIL: all other possible 709 outcomes should already have been accounted for when applying the 710 constraints that qualify the update as an SRP Update. 712 2.3.5. Optional Behavior 714 The server MAY add a Reverse Mapping that corresponds to the Host 715 Description. This is not required because the Reverse Mapping serves 716 no protocol function, but it may be useful for debugging, e.g. in 717 annotating network packet traces or logs. In order for the server to 718 add a reverse mapping update, it must be authoritative for the zone 719 or have credentials to do the update. The SRP client MAY also do a 720 reverse mapping update if it has credentials to do so. 722 The server MAY apply additional criteria when accepting updates. In 723 some networks, it may be possible to do out-of-band registration of 724 keys, and only accept updates from pre-registered keys. In this 725 case, an update for a key that has not been registered should be 726 rejected with the REFUSED RCODE. 728 There are at least two benefits to doing this rather than simply 729 using normal SIG(0) DNS updates. First, the same registration 730 protocol can be used in both cases, so both use cases can be 731 addressed by the same service implementation. Second, the 732 registration protocol includes maintenance functionality not present 733 with normal DNS updates. 735 Note that the semantics of using SRP in this way are different than 736 for typical RFC2136 implementations: the KEY used to sign the SRP 737 update only allows the SRP client to update records that refer to its 738 Host Description. RFC2136 implementations do not normally provide a 739 way to enforce a constraint of this type. 741 The server may also have a dictionary of names or name patterns that 742 are not permitted. If such a list is used, updates for Service 743 Instance Names that match entries in the dictionary are rejected with 744 YXDOMAIN. 746 3. TTL Consistency 748 All RRs within an RRset are required to have the same TTL 749 (Clarifications to the DNS Specification [RFC2181], Section 5.2). In 750 order to avoid inconsistencies, SRP places restrictions on TTLs sent 751 by services and requires that SRP servers enforce consistency. 753 Services sending SRP updates MUST use consistent TTLs in all RRs 754 within the SRP update. 756 SRP update servers MUST check that the TTLs for all RRs within the 757 SRP update are the same. If they are not, the SRP update MUST be 758 rejected with a REFUSED RCODE. 760 Additionally, when adding RRs to an RRset, for example when 761 processing Service Discovery records, the server MUST use the same 762 TTL on all RRs in the RRset. How this consistency is enforced is up 763 to the implementation. 765 TTLs sent in SRP updates are advisory: they indicate the SRP client's 766 guess as to what a good TTL would be. SRP servers may override these 767 TTLs. SRP servers SHOULD ensure that TTLs are reasonable: neither 768 too long nor too short. The TTL should never be longer than the 769 lease time (Section 4.1). Shorter TTLs will result in more frequent 770 data refreshes; this increases latency on the DNS-SD client side, 771 increases load on any caching resolvers and on the authoritative 772 server, and also increases network load, which may be an issue for 773 constrained networks. Longer TTLs will increase the likelihood that 774 data in caches will be stale. TTL minimums and maximums SHOULD be 775 configurable by the operator of the SRP server. 777 4. Maintenance 779 4.1. Cleaning up stale data 781 Because the DNS-SD registration protocol is automatic, and not 782 managed by humans, some additional bookkeeping is required. When an 783 update is constructed by the SRP client, it MUST include an EDNS(0) 784 Update Lease Option [I-D.sekar-dns-ul]. The Update Lease Option 785 contains two lease times: the Lease Time and the Key Lease Time. 787 These leases are promises, similar to DHCP leases [RFC2131], from the 788 SRP client that it will send a new update for the service 789 registration before the lease time expires. The Lease time is chosen 790 to represent the time after the update during which the registered 791 records other than the KEY record should be assumed to be valid. The 792 Key Lease time represents the time after the update during which the 793 KEY record should be assumed to be valid. 795 The reasoning behind the different lease times is discussed in the 796 section on first-come, first-served naming (Section 2.2.4.1). SRP 797 servers may be configured with limits for these values. A default 798 limit of two hours for the Lease and 14 days for the SIG(0) KEY are 799 currently thought to be good choices. Constrained devices with 800 limited battery that wake infrequently are likely to negotiate longer 801 leases. SRP clients that are going to continue to use names on which 802 they hold leases should update well before the lease ends, in case 803 the registration service is unavailable or under heavy load. 805 The lease time applies specifically to the host. All service 806 instances, and all service entries for such service instances, depend 807 on the host. When the lease on a host expires, the host and all 808 services that reference it MUST be removed at the same time-it is 809 never valid for a service instance to remain when the host it 810 references has been removed. If the KEY record for the host is to 811 remain, the KEY record for any services that reference it MUST also 812 remain. However, the service PTR record MUST be removed, since it 813 has no key associated with it, and since it is never valid to have a 814 service PTR record for which there is no service instance on the 815 target of the PTR record. 817 SRP Servers SHOULD also track a lease time per service instance. The 818 reason for doing this is that a client may re-register a host with a 819 different set of services, and not remember that some different 820 service instance had previously been registered. In this case, when 821 that service instance lease expires, the SRP server SHOULD remove the 822 service instance (although the KEY record for the service instance 823 SHOULD be retained until the key lease on that service expires). 824 This is beneficial because if the SRP client continues to renew the 825 host, but never mentions the stale service again, the stale service 826 will continue to be advertised. 828 The SRP server MUST include an EDNS(0) Update Lease option in the 829 response if the lease time proposed by the service has been shortened 830 or lengthened. The service MUST check for the EDNS(0) Update Lease 831 option in the response and MUST use the lease times from that option 832 in place of the options that it sent to the server when deciding when 833 to update its registration. The times may be shorter or longer than 834 those specified in the SRP update; the SRP client must honor them in 835 either case. 837 SRP clients should assume that each lease ends N seconds after the 838 update was first transmitted, where N is the lease duration. Servers 839 should assume that each lease ends N seconds after the update that 840 was successfully processed was received. Because the server will 841 always receive the update after the SRP client sent it, this avoids 842 the possibility of misunderstandings. 844 SRP servers MUST reject updates that do not include an EDNS(0) Update 845 Lease option. Dual-use servers MAY accept updates that don't include 846 leases, but SHOULD differentiate between SRP updates and other 847 updates, and MUST reject updates that would otherwise be SRP updates 848 if they do not include leases. 850 Lease times have a completely different function than TTLs. On an 851 authoritative DNS server, the TTL on a resource record is a constant: 852 whenever that RR is served in a DNS response, the TTL value sent in 853 the answer is the same. The lease time is never sent as a TTL; its 854 sole purpose is to determine when the authoritative DNS server will 855 delete stale records. It is not an error to send a DNS response with 856 a TTL of 'n' when the remaining time on the lease is less than 'n'. 858 5. Sleep Proxy 860 Another use of SRP is for devices that sleep to reduce power 861 consumption. 863 In this case, in addition to the DNS Update Lease option 864 [I-D.sekar-dns-ul] described above, the device includes an EDNS(0) 865 OWNER Option [I-D.cheshire-edns0-owner-option]. 867 The EDNS(0) Update Lease option constitutes a promise by the device 868 that it will wake up before this time elapses, to renew its 869 registration and thereby demonstrate that it is still attached to the 870 network. If it fails to renew the registration by this time, that 871 indicates that it is no longer attached to the network, and its 872 registration (except for the KEY in the Host Description) should be 873 deleted. 875 The EDNS(0) OWNER Option indicates that the device will be asleep, 876 and will not be receptive to normal network traffic. When a DNS 877 server receives a DNS Update with an EDNS(0) OWNER Option, that 878 signifies that the SRP server should set up a proxy for any IPv4 or 879 IPv6 address records in the DNS Update message. This proxy should 880 send ARP or ND messages claiming ownership of the IPv4 and/or IPv6 881 addresses in the records in question. In addition, the proxy should 882 answer future ARP or ND requests for those IPv4 and/or IPv6 883 addresses, claiming ownership of them. When the DNS server receives 884 a TCP SYN or UDP packet addressed to one of the IPv4 or IPv6 885 addresses for which it proxying, it should then wake up the sleeping 886 device using the information in the EDNS(0) OWNER Option. At present 887 version 0 of the OWNER Option specifies the "Wake-on-LAN Magic 888 Packet" that needs to be sent; future versions could be extended to 889 specify other wakeup mechanisms. 891 Note that although the authoritative DNS server that implements the 892 SRP function need not be on the same link as the sleeping host, the 893 Sleep Proxy must be on the same link. 895 It is not required that sleepy nodes on a Constrained-Node Network 896 support sleep proxy. Such devices may have different mechanisms for 897 dealing with sleep and wakeup. An SRP registration for such a device 898 will be useful regardless of the mechanism whereby messages are 899 delivered to the sleepy end device. For example, the message might 900 be held in a buffer for an extended period of time by an intermediate 901 device on a mesh network, and then delivered to the device when it 902 wakes up. The exact details of such behaviors are out of scope for 903 this document. 905 6. Security Considerations 907 6.1. Source Validation 909 SRP updates have no authorization semantics other than first-come, 910 first-served. This means that if an attacker from outside of the 911 administrative domain of the server knows the server's IP address, it 912 can in principle send updates to the server that will be processed 913 successfully. Servers should therefore be configured to reject 914 updates from source addresses outside of the administrative domain of 915 the server. 917 For updates sent to an anycast IP address of an SRP server, this 918 validation must be enforced by every router on the path from the 919 Constrained-Device Network to the unconstrained portion of the 920 network. For TCP updates, the initial SYN-SYN+ACK handshake prevents 921 updates being forged by an off-network attacker. In order to ensure 922 that this handshake happens, Service Discovery Protocol servers 923 relying on three-way-handshake validation MUST NOT accept TCP Fast 924 Open payloads. If the network infrastructure allows it, an SRP 925 server MAY accept TCP Fast Open payloads if all such packets are 926 validated along the path, and the network is able to reject this type 927 of spoofing at all ingress points. 929 Note that these rules only apply to the validation of SRP updates. A 930 server that accepts updates from SRP clients may also accept other 931 DNS updates, and those DNS updates may be validated using different 932 rules. However, in the case of a DNS service that accepts SRP 933 updates, the intersection of the SRP update rules and whatever other 934 update rules are present must be considered very carefully. 936 For example, a normal, authenticated DNS update to any RR that was 937 added using SRP, but that is authenticated using a different key, 938 could be used to override a promise made by the registration 939 protocol, by replacing all or part of the service registration 940 information with information provided by an SRP client. An 941 implementation that allows both kinds of updates should not allow DNS 942 Update clients that are using different authentication and 943 authorization credentialsto to update records added by SRP clients. 945 6.2. SRP Server Authentication 947 This specification does not provide a mechanism for validating 948 responses from DNS servers to SRP clients. In the case of 949 Constrained Network/Constrained Node clients, such validation isn't 950 practical because there's no way to establish trust. In principle, a 951 KEY RR could be used by a non-constrained SRP client to validate 952 responses from the server, but this is not required, nor do we 953 specify a mechanism for determining which key to use. 955 6.3. Required Signature Algorithm 957 For validation, SRP servers MUST implement the ECDSAP256SHA256 958 signature algorithm. SRP servers SHOULD implement the algorithms 959 specified in [RFC8624], Section 3.1, in the validation column of the 960 table, that are numbered 13 or higher and have a "MUST", 961 "RECOMMENDED", or "MAY" designation in the validation column of the 962 table. SRP clients MUST NOT assume that any algorithm numbered lower 963 than 13 is available for use in validating SIG(0) signatures. 965 7. Privacy Considerations 967 Because DNSSD SRP updates can be sent off-link, the privacy 968 implications of SRP are different than for multicast DNS responses. 969 Host implementations that are using TCP SHOULD also use TLS if 970 available. Server implementations MUST offer TLS support. The use 971 of TLS with DNS is described in [RFC7858] and [RFC8310]. 973 Hosts that implement TLS support SHOULD NOT fall back to TCP; since 974 servers are required to support TLS, it is entirely up to the host 975 implementation whether to use it. 977 Public keys can be used as identifiers to track hosts. SRP servers 978 MAY elect not to return KEY records for queries for SRP 979 registrations. 981 8. Delegation of 'service.arpa.' 983 In order to be fully functional, the owner of the 'arpa.' zone must 984 add a delegation of 'service.arpa.' in the '.arpa.' zone [RFC3172]. 985 This delegation should be set up as was done for 'home.arpa', as a 986 result of the specification in Section 7 of [RFC8375]. 988 9. IANA Considerations 990 9.1. Registration and Delegation of 'service.arpa' as a Special-Use 991 Domain Name 993 IANA is requested to record the domain name 'service.arpa.' in the 994 Special-Use Domain Names registry [SUDN]. IANA is requested, with 995 the approval of IAB, to implement the delegation requested in 996 Section 8. 998 IANA is further requested to add a new entry to the "Transport- 999 Independent Locally-Served Zones" subregistry of the the "Locally- 1000 Served DNS Zones" registry [LSDZ]. The entry will be for the domain 1001 'service.arpa.' with the description "DNS-SD Registration Protocol 1002 Special-Use Domain", listing this document as the reference. 1004 9.2. 'dnssd-srp' Service Name 1006 IANA is also requested to add a new entry to the Service Names and 1007 Port Numbers registry for dnssd-srp with a transport type of tcp. No 1008 port number is to be assigned. The reference should be to this 1009 document, and the Assignee and Contact information should reference 1010 the authors of this document. The Description should be as follows: 1012 Availability of DNS Service Discovery Service Registration Protocol 1013 Service for a given domain is advertised using the 1014 "_dnssd-srp._tcp.." SRV record gives the target host and 1015 port where DNSSD Service Registration Service is provided for the 1016 named domain. 1018 9.3. 'dnssd-srp-tls' Service Name 1020 IANA is also requested to add a new entry to the Service Names and 1021 Port Numbers registry for dnssd-srp with a transport type of tcp. No 1022 port number is to be assigned. The reference should be to this 1023 document, and the Assignee and Contact information should reference 1024 the authors of this document. The Description should be as follows: 1026 Availability of DNS Service Discovery Service Registration Protocol 1027 Service for a given domain over TLS is advertised using the 1028 "_dnssd-srp-tls._tcp.." SRV record gives the target host and 1029 port where DNSSD Service Registration Service is provided for the 1030 named domain. 1032 9.4. Anycast Address 1034 IANA is requested to allocate an IPv6 Anycast address from the IPv6 1035 Special-Purpose Address Registry, similar to the Port Control 1036 Protocol anycast address, 2001:1::1. The value TBD should be 1037 replaced with the actual allocation in the table that follows. The 1038 values for the registry are: 1040 +----------------------+-----------------------------+ 1041 | Attribute | value | 1042 +----------------------+-----------------------------+ 1043 | Address Block | 2001:1::TBD/128 | 1044 +----------------------+-----------------------------+ 1045 | Name | DNS-SD Service Registration | 1046 | | Protocol Anycast Address | 1047 +----------------------+-----------------------------+ 1048 | RFC | [this document] | 1049 +----------------------+-----------------------------+ 1050 | Allocation Date | [date of allocation] | 1051 +----------------------+-----------------------------+ 1052 | Termination Date | N/A | 1053 +----------------------+-----------------------------+ 1054 | Source | True | 1055 +----------------------+-----------------------------+ 1056 | Destination | True | 1057 +----------------------+-----------------------------+ 1058 | Forwardable | True | 1059 +----------------------+-----------------------------+ 1060 | Global | True | 1061 +----------------------+-----------------------------+ 1062 | Reserved-by-protocol | False | 1063 +----------------------+-----------------------------+ 1065 Table 1 1067 10. Implementation Status 1069 [Note to the RFC Editor: please remove this section prior to 1070 publication.] 1072 This section records the status of known implementations of the 1073 protocol defined by this specification at the time of posting of this 1074 Internet-Draft, and is based on a proposal described in RFC 7942. 1075 The description of implementations in this section is intended to 1076 assist the IETF in its decision processes in progressing drafts to 1077 RFCs. Please note that the listing of any individual implementation 1078 here does not imply endorsement by the IETF. Furthermore, no effort 1079 has been spent to verify the information presented here that was 1080 supplied by IETF contributors. This is not intended as, and must not 1081 be construed to be, a catalog of available implementations or their 1082 features. Readers are advised to note that other implementations may 1083 exist. 1085 According to RFC 7942, "this will allow reviewers and working groups 1086 to assign due consideration to documents that have the benefit of 1087 running code, which may serve as evidence of valuable experimentation 1088 and feedback that have made the implemented protocols more mature. 1089 It is up to the individual working groups to use this information as 1090 they see fit". 1092 There are two known independent implementations of SRP clients: 1094 * SRP Client for OpenThread: 1095 https://github.com/openthread/openthread/pull/6038 1097 * mDNSResponder open source project: https://github.com/Abhayakara/ 1098 mdnsresponder 1100 There are two related implementations of an SRP server. One acts as 1101 a DNS Update proxy, taking an SRP update and applying it to the 1102 specified DNS zone using DNS update. The other acts as an 1103 Advertising Proxy [I-D.sctl-advertising-proxy]. Both are included in 1104 the mDNSResponder open source project mentioned above. 1106 11. Acknowledgments 1108 Thanks to Toke Høiland-Jørgensen, Jonathan Hui, Esko Dijk, Kangping 1109 Dong and Abtin Keshavarzian for their thorough technical reviews. 1110 Thanks to Kangping and Abtin as well for testing the document by 1111 doing an independent implementation. Thanks to Tamara Kemper for 1112 doing a nice developmental edit, Tim Wattenberg for doing a SRP 1113 client proof-of-concept implementation at the Montreal Hackathon at 1114 IETF 102, and Tom Pusateri for reviewing during the hackathon and 1115 afterwards. 1117 12. Normative References 1119 [I-D.sekar-dns-ul] 1120 Cheshire, S. and T. Lemon, "Dynamic DNS Update Leases", 1121 Work in Progress, Internet-Draft, draft-sekar-dns-ul-02, 2 1122 August 2018, . 1125 [RFC2132] Alexander, S. and R. Droms, "DHCP Options and BOOTP Vendor 1126 Extensions", RFC 2132, DOI 10.17487/RFC2132, March 1997, 1127 . 1129 [RFC2136] Vixie, P., Ed., Thomson, S., Rekhter, Y., and J. Bound, 1130 "Dynamic Updates in the Domain Name System (DNS UPDATE)", 1131 RFC 2136, DOI 10.17487/RFC2136, April 1997, 1132 . 1134 [RFC2931] Eastlake 3rd, D., "DNS Request and Transaction Signatures 1135 ( SIG(0)s )", RFC 2931, DOI 10.17487/RFC2931, September 1136 2000, . 1138 [RFC3172] Huston, G., Ed., "Management Guidelines & Operational 1139 Requirements for the Address and Routing Parameter Area 1140 Domain ("arpa")", BCP 52, RFC 3172, DOI 10.17487/RFC3172, 1141 September 2001, . 1143 [RFC6763] Cheshire, S. and M. Krochmal, "DNS-Based Service 1144 Discovery", RFC 6763, DOI 10.17487/RFC6763, February 2013, 1145 . 1147 [RFC7858] Hu, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D., 1148 and P. Hoffman, "Specification for DNS over Transport 1149 Layer Security (TLS)", RFC 7858, DOI 10.17487/RFC7858, May 1150 2016, . 1152 [RFC8106] Jeong, J., Park, S., Beloeil, L., and S. Madanapalli, 1153 "IPv6 Router Advertisement Options for DNS Configuration", 1154 RFC 8106, DOI 10.17487/RFC8106, March 2017, 1155 . 1157 [RFC8375] Pfister, P. and T. Lemon, "Special-Use Domain 1158 'home.arpa.'", RFC 8375, DOI 10.17487/RFC8375, May 2018, 1159 . 1161 [RFC8624] Wouters, P. and O. Sury, "Algorithm Implementation 1162 Requirements and Usage Guidance for DNSSEC", RFC 8624, 1163 DOI 10.17487/RFC8624, June 2019, 1164 . 1166 [RFC8765] Pusateri, T. and S. Cheshire, "DNS Push Notifications", 1167 RFC 8765, DOI 10.17487/RFC8765, June 2020, 1168 . 1170 [SUDN] "Special-Use Domain Names Registry", July 2012, 1171 . 1174 [LSDZ] "Locally-Served DNS Zones Registry", July 2011, 1175 . 1178 13. Informative References 1180 [RFC1035] Mockapetris, P., "Domain names - implementation and 1181 specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, 1182 November 1987, . 1184 [RFC2131] Droms, R., "Dynamic Host Configuration Protocol", 1185 RFC 2131, DOI 10.17487/RFC2131, March 1997, 1186 . 1188 [RFC2181] Elz, R. and R. Bush, "Clarifications to the DNS 1189 Specification", RFC 2181, DOI 10.17487/RFC2181, July 1997, 1190 . 1192 [RFC2782] Gulbrandsen, A., Vixie, P., and L. Esibov, "A DNS RR for 1193 specifying the location of services (DNS SRV)", RFC 2782, 1194 DOI 10.17487/RFC2782, February 2000, 1195 . 1197 [RFC3007] Wellington, B., "Secure Domain Name System (DNS) Dynamic 1198 Update", RFC 3007, DOI 10.17487/RFC3007, November 2000, 1199 . 1201 [RFC6760] Cheshire, S. and M. Krochmal, "Requirements for a Protocol 1202 to Replace the AppleTalk Name Binding Protocol (NBP)", 1203 RFC 6760, DOI 10.17487/RFC6760, February 2013, 1204 . 1206 [RFC6761] Cheshire, S. and M. Krochmal, "Special-Use Domain Names", 1207 RFC 6761, DOI 10.17487/RFC6761, February 2013, 1208 . 1210 [RFC6762] Cheshire, S. and M. Krochmal, "Multicast DNS", RFC 6762, 1211 DOI 10.17487/RFC6762, February 2013, 1212 . 1214 [RFC7228] Bormann, C., Ersue, M., and A. Keranen, "Terminology for 1215 Constrained-Node Networks", RFC 7228, 1216 DOI 10.17487/RFC7228, May 2014, 1217 . 1219 [RFC8310] Dickinson, S., Gillmor, D., and T. Reddy, "Usage Profiles 1220 for DNS over TLS and DNS over DTLS", RFC 8310, 1221 DOI 10.17487/RFC8310, March 2018, 1222 . 1224 [RFC8415] Mrugalski, T., Siodelski, M., Volz, B., Yourtchenko, A., 1225 Richardson, M., Jiang, S., Lemon, T., and T. Winters, 1226 "Dynamic Host Configuration Protocol for IPv6 (DHCPv6)", 1227 RFC 8415, DOI 10.17487/RFC8415, November 2018, 1228 . 1230 [RFC8766] Cheshire, S., "Discovery Proxy for Multicast DNS-Based 1231 Service Discovery", RFC 8766, DOI 10.17487/RFC8766, June 1232 2020, . 1234 [I-D.cheshire-dnssd-roadmap] 1235 Cheshire, S., "Service Discovery Road Map", Work in 1236 Progress, Internet-Draft, draft-cheshire-dnssd-roadmap-03, 1237 23 October 2018, . 1240 [I-D.cheshire-edns0-owner-option] 1241 Cheshire, S. and M. Krochmal, "EDNS0 OWNER Option", Work 1242 in Progress, Internet-Draft, draft-cheshire-edns0-owner- 1243 option-01, 3 July 2017, 1244 . 1247 [I-D.sctl-advertising-proxy] 1248 Cheshire, S. and T. Lemon, "Advertising Proxy for DNS-SD 1249 Service Registration Protocol", Work in Progress, 1250 Internet-Draft, draft-sctl-advertising-proxy-01, 22 1251 February 2021, . 1254 [ZC] Cheshire, S. and D.H. Steinberg, "Zero Configuration 1255 Networking: The Definitive Guide", O'Reilly Media, Inc. , 1256 ISBN 0-596-10100-7, December 2005. 1258 Appendix A. Testing using standard RFC2136-compliant servers 1260 It may be useful to set up a DNS server for testing that does not 1261 implement SRP. This can be done by configuring the server to listen 1262 on the anycast address, or advertising it in the 1263 _dnssd-srp._tcp. SRV and _dnssd-srp-tls._tcp. record. It 1264 must be configured to be authoritative for "default.service.arpa", 1265 and to accept updates from hosts on local networks for names under 1266 "default.service.arpa" without authentication, since such servers 1267 will not have support for FCFS authentication (Section 2.2.4.1). 1269 A server configured in this way will be able to successfully accept 1270 and process SRP updates from services that send SRP updates. 1271 However, no prerequisites will be applied, and this means that the 1272 test server will accept internally inconsistent SRP updates, and will 1273 not stop two SRP updates, sent by different services, that claim the 1274 same name(s), from overwriting each other. 1276 Since SRP updates are signed with keys, validation of the SIG(0) 1277 algorithm used by the client can be done by manually installing the 1278 client public key on the DNS server that will be receiving the 1279 updates. The key can then be used to authenticate the client, and 1280 can be used as a requirement for the update. An example 1281 configuration for testing SRP using BIND 9 is given in Appendix C. 1283 Appendix B. How to allow services to update standard RFC2136-compliant 1284 servers 1286 Ordinarily SRP updates will fail when sent to an RFC 2136-compliant 1287 server that does not implement SRP because the zone being updated is 1288 "default.service.arpa", and no DNS server that is not an SRP server 1289 should normally be configured to be authoritative for 1290 "default.service.arpa". Therefore, a service that sends an SRP 1291 update can tell that the receiving server does not support SRP, but 1292 does support RFC2136, because the RCODE will either be NOTZONE, 1293 NOTAUTH or REFUSED, or because there is no response to the update 1294 request (when using the anycast address) 1296 In this case a service MAY attempt to register itself using regular 1297 RFC2136 DNS updates. To do so, it must discover the default 1298 registration zone and the DNS server designated to receive updates 1299 for that zone, as described earlier, using the _dns-update._udp SRV 1300 record. It can then make the update using the port and host pointed 1301 to by the SRV record, and should use appropriate prerequisites to 1302 avoid overwriting competing records. Such updates are out of scope 1303 for SRP, and a service that implements SRP MUST first attempt to use 1304 SRP to register itself, and should only attempt to use RFC2136 1305 backwards compatibility if that fails. Although the owner name for 1306 the SRV record specifies the UDP protocol for updates, it is also 1307 possible to use TCP, and TCP should be required to prevent spoofing. 1309 Appendix C. Sample BIND9 configuration for default.service.arpa. 1311 zone "default.service.arpa." { 1312 type master; 1313 file "/etc/bind/master/service.db"; 1314 allow-update { key demo.default.service.arpa.; }; 1315 }; 1317 Figure 1: Zone Configuration in named.conf 1319 $ORIGIN . 1320 $TTL 57600 ; 16 hours 1321 default.service.arpa IN SOA ns3.default.service.arpa. 1322 postmaster.default.service.arpa. ( 1323 2951053287 ; serial 1324 3600 ; refresh (1 hour) 1325 1800 ; retry (30 minutes) 1326 604800 ; expire (1 week) 1327 3600 ; minimum (1 hour) 1328 ) 1329 NS ns3.default.service.arpa. 1330 SRV 0 0 53 ns3.default.service.arpa. 1331 $ORIGIN default.service.arpa. 1332 $TTL 3600 ; 1 hour 1333 _ipps._tcp PTR demo._ipps._tcp 1334 $ORIGIN _ipps._tcp.default.service.arpa. 1335 demo TXT "0" 1336 SRV 0 0 9992 demo.default.service.arpa. 1337 $ORIGIN _udp.default.service.arpa. 1338 $TTL 3600 ; 1 hour 1339 _dns-update PTR ns3.default.service.arpa. 1340 $ORIGIN _tcp.default.service.arpa. 1341 _dnssd-srp PTR ns3.default.service.arpa. 1342 $ORIGIN default.service.arpa. 1343 $TTL 300 ; 5 minutes 1344 ns3 AAAA 2001:db8:0:1::1 1345 $TTL 3600 ; 1 hour 1346 demo AAAA 2001:db8:0:2::1 1347 KEY 513 3 13 ( 1348 qweEmaaq0FAWok5//ftuQtZgiZoiFSUsm0srWREdywQU 1349 9dpvtOhrdKWUuPT3uEFF5TZU6B4q1z1I662GdaUwqg== 1350 ); alg = ECDSAP256SHA256 ; key id = 15008 1351 AAAA ::1 1353 Figure 2: Example Zone file 1355 Authors' Addresses 1357 Ted Lemon 1358 Apple Inc. 1359 One Apple Park Way 1360 Cupertino, California 95014 1361 United States of America 1363 Email: mellon@fugue.com 1364 Stuart Cheshire 1365 Apple Inc. 1366 One Apple Park Way 1367 Cupertino, California 95014 1368 United States of America 1370 Phone: +1 408 974 3207 1371 Email: cheshire@apple.com