<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.29 (Ruby 3.4.4) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-michel-srp-remove-all-00" category="std" consensus="true" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.31.0 -->
  <front>
    <title abbrev="SRP Remove All Services Option">SRP Remove All Services EDNS(0) option</title>
    <seriesInfo name="Internet-Draft" value="draft-michel-srp-remove-all-00"/>
    <author fullname="François Michel">
      <organization>Apple</organization>
      <address>
        <email>f_michel@apple.com</email>
      </address>
    </author>
    <author fullname="Esko Dijk">
      <organization>IoTconsultancy.nl</organization>
      <address>
        <email>esko.dijk@iotconsultancy.nl</email>
      </address>
    </author>
    <date year="2025" month="October" day="20"/>
    <area>Internet</area>
    <workgroup>DNSSD</workgroup>
    <keyword>SRP</keyword>
    <keyword>remove</keyword>
    <keyword>all</keyword>
    <keyword>option</keyword>
    <abstract>
      <?line 61?>

<t>This document describes a new EDNS(0) option for an SRP Update to remove all previously registered services for a hostname before adding new services for that same hostname.
This allows an SRP requester to replace all its previous service registrations with new ones using a single
SRP Update.</t>
    </abstract>
    <note removeInRFC="true">
      <name>About This Document</name>
      <t>
        Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-michel-srp-remove-all/"/>.
      </t>
      <t>
        Discussion of this document takes place on the
        DNSSD Working Group mailing list (<eref target="mailto:dnssd@ietf.org"/>),
        which is archived at <eref target="https://mailarchive.ietf.org/arch/browse/dnssd/"/>.
        Subscribe at <eref target="https://www.ietf.org/mailman/listinfo/dnssd/"/>.
      </t>
    </note>
  </front>
  <middle>
    <?line 68?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>Some constrained devices may not afford storing the services, that they have currently registered to an SRP <xref target="SRP"/> registrar, in persistent memory.
Instead, they only store their hostname and their SRP public/private key pair.
Upon a reboot, they ensure no stale service registrations remain on the SRP registrar by first sending an SRP Update to remove all their previously registered services per <xref section="3.2.5.5.1" sectionFormat="of" target="SRP"/>.
Once that is done, they register their current services through another SRP Update.
Since removing all services requires the lease time in the Update Lease option to be zero, and adding any service(s) requires the same option to have a nonzero lease value, SRP effectively prevents the removal of all previous services and registering new services for a same hostname in the same Update (<xref section="3.2.5.5.1" sectionFormat="of" target="SRP"/>).
Therefore, this has to be done using two separate, successive SRP Updates.</t>
      <t>This document defines a new EDNS(0) <xref target="EDNS0"/> option called SRP Remove All Services allowing to include the previous services removal operation in the same SRP Update that registers the new services.
The option also allows an SRP requester to send a single SRP Update that removes all its registered services, while keeping its hostname registered, which is not possible currently with <xref target="SRP"/>.
This significantly reduces the amount of data transmitted over the network for doing these operations and reduces the risk of congestion caused by the operation of SRP in constrained networks.</t>
    </section>
    <section anchor="conventions-and-definitions">
      <name>Conventions and Definitions</name>
      <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>
      <?line -18?>

</section>
    <section anchor="the-srp-remove-all-services-edns0-option">
      <name>The SRP Remove All Services EDNS(0) option</name>
      <t>The SRP Remove All Services Option has a length of zero and therefore has no payload.
Its presence in an SRP Update for a particular hostname (as defined in the Host Description Instruction) signals to the registrar to first remove all published services for that hostname before processing the Service Discovery Instructions and Service Description Instructions contained in the Update.
It is almost equivalent to first sending an SRP Update as defined by <xref section="3.2.5.5.1" sectionFormat="of" target="SRP"/> before sending this Update. The only difference is that when the SRP Remove All Services Option is used, the "Removing All Published Services" operation and the subsequent SRP Update are considered as a single atomic transaction that either entirely succeeds, or fails.</t>
    </section>
    <section anchor="server-side-processing-of-the-srp-remove-all-services-option">
      <name>Server-side processing of the SRP Remove All Services Option</name>
      <t>An SRP registrar receiving a valid SRP Update containing the SRP Remove All Services Option first removes all service registrations for the hostname in the Host Description Instruction.
This includes all SRV/TXT records for all service instance names of which the SRV record has this hostname as a target.
It also includes all PTR records that point to these service instance names.
Then, it processes the remaining instructions of the SRP Update as defined by <xref target="SRP"/>.
In response to an Update containing the SRP Remove All Services Option, the SRP registrar <bcp14>MUST</bcp14> include the option in its SRP Update response to indicate that it is supported. This is done regardless of whether any of the additional operations induced by the option, or the instructions contained in the SRP Update, succeed or fail.</t>
      <section anchor="error-cases">
        <name>Error cases</name>
        <t>If the "Delete All RRsets From A Name" operations induced by the SRP Remove All Services Option results in an error on the SRP registrar, it <bcp14>SHOULD</bcp14> immediately stop processing the SRP Update and <bcp14>MUST</bcp14> return the adequate response code as it would have done when processing a regular "Delete All RRsets From A Name".</t>
        <t>If all the "Delete All RRsets From A Name" operations implied by the option succeed, but the subsequent SRP Update processing fails, then all the implied "Delete All RRsets From A Name" operations are undone and the adequate error response code for the SRP Update failure is returned as defined by <xref target="SRP"/>.</t>
      </section>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>The SRP Remove All Services Option relies on existing security mechanisms defined in <xref target="SRP"/>. The SRP requester <bcp14>MUST</bcp14> be properly authenticated for the hostname contained in the Host Description Instruction before the SRP registrar processes the "Delete All RRsets From A Name" operations induced by the option.</t>
      <t>Since an SRP attacker can replay any SRP Update, it can also replay the "Delete All RRsets From A Name" operations induced by the option.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>IANA is requested to allocate a new OPT RR option code from the DNS EDNS0 Option Codes (OPT) registry for the 'SRP Remove All Services' Option. The Name shall be 'SRP-RAS'. The value shall be allocated by IANA. The meaning shall be 'SRP Remove All Services'. Reference shall refer to this document, once published. IANA shall determine the registration date.</t>
    </section>
  </middle>
  <back>
    <references anchor="sec-normative-references">
      <name>Normative References</name>
      <reference anchor="SRP">
        <front>
          <title>Service Registration Protocol for DNS-Based Service Discovery</title>
          <author fullname="T. Lemon" initials="T." surname="Lemon"/>
          <author fullname="S. Cheshire" initials="S." surname="Cheshire"/>
          <date month="June" year="2025"/>
          <abstract>
            <t>The Service Registration Protocol (SRP) for DNS-based Service Discovery (DNS-SD) uses the standard DNS Update mechanism to enable DNS-SD using only unicast packets. This makes it possible to deploy DNS-SD without multicast, which greatly improves scalability and improves performance on networks where multicast service is not an optimal choice, particularly IEEE 802.11 (Wi-Fi) and IEEE 802.15.4 networks. DNS-SD Service registration uses public keys and SIG(0) to allow services to defend their registrations.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="9665"/>
        <seriesInfo name="DOI" value="10.17487/RFC9665"/>
      </reference>
      <reference anchor="EDNS0">
        <front>
          <title>Extension Mechanisms for DNS (EDNS(0))</title>
          <author fullname="J. Damas" initials="J." surname="Damas"/>
          <author fullname="M. Graff" initials="M." surname="Graff"/>
          <author fullname="P. Vixie" initials="P." surname="Vixie"/>
          <date month="April" year="2013"/>
          <abstract>
            <t>The Domain Name System's wire protocol includes a number of fixed fields whose range has been or soon will be exhausted and does not allow requestors to advertise their capabilities to responders. This document describes backward-compatible mechanisms for allowing the protocol to grow.</t>
            <t>This document updates the Extension Mechanisms for DNS (EDNS(0)) specification (and obsoletes RFC 2671) based on feedback from deployment experience in several implementations. It also obsoletes RFC 2673 ("Binary Labels in the Domain Name System") and adds considerations on the use of extended labels in the DNS.</t>
          </abstract>
        </front>
        <seriesInfo name="STD" value="75"/>
        <seriesInfo name="RFC" value="6891"/>
        <seriesInfo name="DOI" value="10.17487/RFC6891"/>
      </reference>
      <reference anchor="RFC2119">
        <front>
          <title>Key words for use in RFCs to Indicate Requirement Levels</title>
          <author fullname="S. Bradner" initials="S." surname="Bradner"/>
          <date month="March" year="1997"/>
          <abstract>
            <t>In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="2119"/>
        <seriesInfo name="DOI" value="10.17487/RFC2119"/>
      </reference>
      <reference anchor="RFC8174">
        <front>
          <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
          <author fullname="B. Leiba" initials="B." surname="Leiba"/>
          <date month="May" year="2017"/>
          <abstract>
            <t>RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="8174"/>
        <seriesInfo name="DOI" value="10.17487/RFC8174"/>
      </reference>
    </references>
    <?line 136?>

<section numbered="false" anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>TODO acknowledge.</t>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA61Z7XIbtxX9v0+BUj9sdUTKShzXZlwnjCXXmtGHK8lpPJ1O
B9wFSVS7wBbASmY8fpf+63u0L9ZzL7DLpUjJSaaTmZgEgft57rkX0HA4zHZ2
drIdcWyCckaF4aGTsyBOpbsu7K0RV6qqSxlURpsulJGVEmGhvZjpUomZs5Uo
6MQw2MIOl7ZxtGVYOxtsbstRVYhgxVwF4YN0QRUjyIk6WNbMukoGAYGDKOdl
K+PV8OWtdddzZ5san3kJ4gYjNuWNdUIbHbQshVehqfcEDgpryqUwSrFWVegA
Y6FEOx/EtLT5tbAzfFVl4cmQc9o+CDqUasDHPJ2bKpEvpJmr4ltRqF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