<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE rfc [
<!ENTITY VERSION "0.01">
]>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" ipr="trust200902" docName="draft-brown-epp-deleg-01" submissionType="independent" category="info" xml:lang="en" indexInclude="true">

<front>

<title abbrev="EPP DELEG Extension">
Extensible Provisioning Protocol (EPP) mapping for DELEG records
</title>

<seriesInfo value="draft-brown-epp-deleg-01" stream="independent" status="informational" name="Internet-Draft"/>

<author initials="G." surname="Brown" fullname="Gavin Brown">
<organization>ICANN</organization>
<address>
<postal>
<street>12025 Waterfront Drive, Suite 300</street>
<city>Los Angeles</city>
<code>90094-2536</code>
<country>US</country>
<region>CA</region>
</postal>
<email>gavin.brown@icann.org</email>
</address>
</author>

<author initials="P." surname="Hoffman" fullname="Paul Hoffman">
<organization>ICANN</organization>
<address>
<postal>
<street>12025 Waterfront Drive, Suite 300</street>
<city>Los Angeles</city>
<code>90094-2536</code>
<country>US</country>
<region>CA</region>
</postal>
<email>paul.hoffman@icann.org</email>
</address>
</author>

<date/>

<area>Internet</area>

<workgroup>Registration Extensions (REGEXT)</workgroup>

<abstract><t>
This document describes an extension to the Extensible Provisioning Protocol (<xref target="STD69"/>) which allows clients to provision <tt>DELEG</tt> records for domain names.
</t></abstract>

<note title="About this draft" removeInRFC="true"><t>
The source for this draft, and an issue tracker, may can be found at <eref target="https://github.com/gbxyz/epp-deleg-extension"/>.
</t></note>

</front>

<middle>

<section anchor="introduction">
<name>Introduction</name>

<t>
The Internet-Draft "Extensible Delegation for DNS" (<xref target="I-D.ietf-deleg"/>) describes an enhanced method of delegation in the DNS to supplement the traditional <tt>NS</tt> record.
</t>

<t>
This document describes an extension to the EPP domain mapping (<xref target="RFC5731"/>) to allow EPP clients to provision <tt>DELEG</tt> records for domain names in an EPP server.
</t>

<t>
EPP provides mechanisms for extending the protocol by (a) adding new properties to existing object mappings and (b) definining new object mappings.
Although EPP supports two different models for traditional <tt>NS</tt> records (host attributes and host objects, as described in <xref section="1.12" sectionFormat="of" target="RFC5731"/>),
this document only uses the former, and does not define a new object mapping for <tt>DELEG</tt> records because the <tt>DELEG</tt> specification itself implements many of the features that would otherwise require an object mapping.
</t>

</section>

<section>
<name>Conventions used in this document</name>

<t>
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" 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>

<t>
In examples, "C:" represents lines sent by a protocol client and "S:" represents lines returned by a protocol server.
Indentation and white space in examples are provided only to illustrate element relationships and are not required features of this protocol.
</t>

<t>
A protocol client that is authorized to manage an existing object is described as a "sponsoring" client throughout this document.
</t>

<t>
XML is case sensitive.
Unless stated otherwise, XML specifications and examples provided in this document <bcp14>MUST</bcp14> be interpreted in the character case presented in order to develop a conforming implementation.
</t>

<t>
EPP uses XML namespaces to provide an extensible object management framework and to identify schemas required for XML instance parsing and validation.
These namespaces and schema definitions are used to identify both the base protocol schema and the schemas for managed objects.
</t>

<t>
The XML namespace prefixes used in examples (such as the string <tt>deleg</tt> in <tt>deleg:create</tt>) are solely for illustrative purposes.
A conforming implementation <bcp14>MUST NOT</bcp14> require the use of these or any other specific namespace prefixes.
</t>

</section>

<section anchor="extension-elements">
<name>Extension elements</name>

<t>
This document defines a new element, <tt>&lt;deleg:deleg&gt;</tt>, which appears in query and transform commands for domain objects.
</t>

<t>
This element is a representation of a <tt>DELEG</tt> record in XML.
The <tt>&lt;deleg:deleg&gt;</tt> element <bcp14>MAY</bcp14> have a single child element, <tt>&lt;deleg:params&gt;</tt>, which corresponds to the <tt>DelegInfos</tt> field of a <tt>DELEG</tt> record.
The attributes in the <tt>&lt;deleg:params&gt;</tt> element are given exactly as the display format for the <tt>DelegInfos</tt> field decribed in <xref target="I-D.ietf-deleg"/>.
</t>

</section>

<section>
<name>Examples</name>

<t>
Examples of the <tt>&lt;deleg:deleg&gt;</tt> element:
</t>

<sourcecode><![CDATA[
<deleg:deleg>
  <deleg:params
    server-ipv4="192.0.2.1"
    server-ipv6="2001:db8::1"/>
</deleg:deleg>

<deleg:deleg>
  <deleg:params
    server-name="ns2.example.net."
    server-name="ns3.example.org."/>
</deleg:deleg>
]]></sourcecode>

</section>

<section>
<name>EPP command mapping</name>

<section>
<name>EPP query commands</name>

<section>
<name>EPP <tt>&lt;info&gt;</tt> command</name>

<t>
This extension defines an additional element for EPP <tt>&lt;info&gt;</tt> responses for domain object.
</t>

<t>
When a server receives a domain or host <tt>&lt;info&gt;</tt> command from a client which included the extension namespace in the <tt>&lt;svcExtension&gt;</tt> element of the <tt>&lt;login&gt;</tt> command, the response <bcp14>MUST</bcp14> contain an <tt>&lt;extension&gt;</tt> element, which <bcp14>MUST</bcp14> contain a <tt>&lt;deleg:infData&gt;</tt> element.
This element <bcp14>MAY</bcp14> contain one or more <tt>&lt;deleg:deleg&gt;</tt> elements as described in <xref target="extension-elements"/>.
</t>

<t>
Example <tt>&lt;info&gt;</tt> response:
</t>

<sourcecode>S:&lt;?xml version="1.0" encoding="utf-8" standalone="no"?&gt;
S:&lt;epp xmlns="urn:ietf:params:xml:ns:epp-1.0"&gt;
S:  &lt;response&gt;
S:    &lt;result code="1000"&gt;
S:      &lt;msg&gt;Command completed successfully&lt;/msg&gt;
S:    &lt;/result&gt;
S:    &lt;resData&gt;
S:      &lt;domain:infData
S:        xmlns:domain="urn:ietf:params:xml:ns:domain-1.0"&gt;
S:        &lt;domain:name&gt;example.com&lt;/domain:name&gt;
S:        &lt;domain:roid&gt;EXAMPLE1-REP&lt;/domain:roid&gt;
S:        &lt;domain:status s="ok"/&gt;
S:        &lt;domain:clID&gt;ClientX&lt;/domain:clID&gt;
S:        &lt;domain:crID&gt;ClientX&lt;/domain:crID&gt;
S:        &lt;domain:crDate&gt;2023-11-08T10:14:55.0Z&lt;/domain:crDate&gt;
S:        &lt;domain:exDate&gt;2024-11-08T10:14:55.0Z&lt;/domain:exDate&gt;
S:      &lt;/domain:infData&gt;
S:    &lt;/resData&gt;
S:    &lt;extension&gt;
S:      &lt;deleg:infData
S:        xmlns:deleg="urn:ietf:params:xml:ns:epp:deleg-0.01"&gt;
S:        &lt;deleg:deleg&gt;
S:          &lt;deleg:params
S:            server-ipv4="192.0.2.1"
S:            server-ipv6="2001:db8::1"/&gt;
S:        &lt;/deleg:deleg&gt;
S:        &lt;deleg:deleg&gt;
S:          &lt;deleg:params
S:            server-name="ns2.example.net.,ns3.example.org."/&gt;
S:        &lt;/deleg:deleg&gt;
S:      &lt;/deleg:infData&gt;
S:    &lt;/extension&gt;
S:    &lt;trID&gt;
S:      &lt;clTRID&gt;ABC-12345&lt;/clTRID&gt;
S:      &lt;svTRID&gt;54322-XYZ&lt;/svTRID&gt;
S:    &lt;/trID&gt;
S:  &lt;/response&gt;
S:&lt;/epp&gt;
</sourcecode>

</section>

</section>

<section>
<name>EPP transform commands</name>

<section>
<name>EPP <tt>&lt;create&gt;</tt> command</name>

<t>
This extension defines an additional element for EPP <tt>&lt;create&gt;</tt> commands for domain objects.
</t>

<t>
The <tt>&lt;command&gt;</tt> element of the <tt>&lt;create&gt;</tt> command frame <bcp14>MAY</bcp14> contain an <tt>&lt;extension&gt;</tt> element which <bcp14>MAY</bcp14> contain a <tt>&lt;deleg:create&gt;</tt> element.
This element <bcp14>MUST</bcp14> contain one or more <tt>&lt;deleg:deleg&gt;</tt> records as described in <xref target="extension-elements"/>.
</t>

<t>
Example <tt>&lt;create&gt;</tt> command:
</t>

<sourcecode>C:&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
C:&lt;epp xmlns="urn:ietf:params:xml:ns:epp-1.0"&gt;
C:  &lt;command&gt;
C:    &lt;create&gt;
C:      &lt;domain:create
C:        xmlns:domain="urn:ietf:params:xml:ns:domain-1.0"&gt;
C:        &lt;domain:name&gt;example.com&lt;/domain:name&gt;
C:        &lt;domain:period unit="y"&gt;1&lt;/domain:period&gt;
C:        &lt;domain:authInfo&gt;
C:          &lt;domain:pw/&gt;
C:        &lt;/domain:authInfo&gt;
C:      &lt;/domain:create&gt;
C:    &lt;/create&gt;
C:    &lt;extension&gt;
C:      &lt;deleg:create
C:        xmlns:deleg="urn:ietf:params:xml:ns:epp:deleg-0.01"&gt;
C:        &lt;deleg:deleg&gt;
C:          &lt;deleg:params
C:            server-ipv4="192.0.2.1"
C:            server-ipv6="2001:db8::1"/&gt;
C:        &lt;/deleg:deleg&gt;
C:        &lt;deleg:deleg&gt;
C:          &lt;deleg:params
C:            server-ipv4="192.0.2.1"
C:            server-ipv6="2001:db8::1"/&gt;
C:        &lt;/deleg:deleg&gt;
C:      &lt;/deleg:create&gt;
C:    &lt;/extension&gt;
C:    &lt;clTRID&gt;ABC-12345&lt;/clTRID&gt;
C:  &lt;/command&gt;
C:&lt;/epp&gt;
</sourcecode>

</section>

<section>
<name>EPP <tt>&lt;update&gt;</tt> command</name>

<t>
This extension defines an additional element for EPP <tt>&lt;update&gt;</tt> commands for domain objects.
</t>

<t>
The <tt>&lt;command&gt;</tt> element of the <tt>&lt;create&gt;</tt> command frame <bcp14>MAY</bcp14> contain an <tt>&lt;extension&gt;</tt> element which <bcp14>MAY</bcp14> contain a <tt>&lt;deleg:update&gt;</tt> element.
</t>

<t>
The <tt>&lt;deleg:update&gt;</tt> element has the following child elements:
</t>

<ul>
  <li>An <bcp14>OPTIONAL</bcp14> <tt>&lt;deleg:add&gt;</tt> element, containing any <tt>&lt;deleg:deleg&gt;</tt> records to be added to the domain; and</li>
  <li>An <bcp14>OPTIONAL</bcp14> <tt>&lt;deleg:rem&gt;</tt> element, containing any <tt>&lt;deleg:deleg&gt;</tt> records to be removed from the domain.</li>
</ul>

<t>
Example <tt>&lt;update&gt;</tt> command, which removes one <tt>&lt;deleg:deleg&gt;</tt> record and adds another:
</t>

<sourcecode>C:&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
C:&lt;epp xmlns="urn:ietf:params:xml:ns:epp-1.0"&gt;
C:  &lt;command&gt;
C:    &lt;update&gt;
C:      &lt;domain:update
C:        xmlns:domain="urn:ietf:params:xml:ns:domain-1.0"&gt;
C:        &lt;domain:name&gt;example.com&lt;/domain:name&gt;
C:      &lt;/domain:update&gt;
C:    &lt;/update&gt;
C:    &lt;extension&gt;
C:      &lt;deleg:update xmlns:deleg="urn:ietf:params:xml:ns:epp:deleg-0.01"&gt;
C:        &lt;deleg:add&gt;
C:          &lt;deleg:deleg&gt;
C:            &lt;deleg:params
C:              server-ipv4="192.0.2.1"
C:              server-ipv6="2001:db8::1"/&gt;
C:          &lt;/deleg:deleg&gt;
C:        &lt;/deleg:add&gt;
C:        &lt;deleg:rem&gt;
C:          &lt;deleg:deleg&gt;
C:            &lt;deleg:params
C:              server-ipv4="192.0.2.1"
C:              server-ipv6="2001:db8::1"/&gt;
C:          &lt;/deleg:deleg&gt;
C:        &lt;/deleg:rem&gt;
C:      &lt;/deleg:update&gt;
C:    &lt;/extension&gt;
C:    &lt;clTRID&gt;ABC-12345&lt;/clTRID&gt;
C:  &lt;/command&gt;
C:&lt;/epp&gt;
</sourcecode>

<t>
Example <tt>&lt;update&gt;</tt> command, which removes one <tt>&lt;deleg:deleg&gt;</tt> record but does not add any:
</t>

<sourcecode>C:&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
C:&lt;epp xmlns="urn:ietf:params:xml:ns:epp-1.0"&gt;
C:  &lt;command&gt;
C:    &lt;update&gt;
C:      &lt;domain:update
C:        xmlns:domain="urn:ietf:params:xml:ns:domain-1.0"&gt;
C:        &lt;domain:name&gt;example.com&lt;/domain:name&gt;
C:      &lt;/domain:update&gt;
C:    &lt;/update&gt;
C:    &lt;extension&gt;
C:      &lt;deleg:update xmlns:deleg="urn:ietf:params:xml:ns:epp:deleg-0.01"&gt;
C:        &lt;deleg:rem&gt;
C:          &lt;deleg:deleg&gt;
C:            &lt;deleg:params
C:              server-ipv4="192.0.2.1"
C:              server-ipv6="2001:db8::1"/&gt;
C:          &lt;/deleg:deleg&gt;
C:        &lt;/deleg:rem&gt;
C:      &lt;/deleg:update&gt;
C:    &lt;/extension&gt;
C:    &lt;clTRID&gt;ABC-12345&lt;/clTRID&gt;
C:  &lt;/command&gt;
C:&lt;/epp&gt;
</sourcecode>

<t>
Example <tt>&lt;update&gt;</tt> command, which adds one <tt>&lt;deleg:deleg&gt;</tt> record but does not remove any:
</t>

<sourcecode>C:&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
C:&lt;epp xmlns="urn:ietf:params:xml:ns:epp-1.0"&gt;
C:  &lt;command&gt;
C:    &lt;update&gt;
C:      &lt;domain:update
C:        xmlns:domain="urn:ietf:params:xml:ns:domain-1.0"&gt;
C:        &lt;domain:name&gt;example.com&lt;/domain:name&gt;
C:      &lt;/domain:update&gt;
C:    &lt;/update&gt;
C:    &lt;extension&gt;
C:      &lt;deleg:update xmlns:deleg="urn:ietf:params:xml:ns:epp:deleg-0.01"&gt;
C:        &lt;deleg:add&gt;
C:          &lt;deleg:deleg&gt;
C:            &lt;deleg:params
C:              server-ipv4="192.0.2.1"
C:              server-ipv6="2001:db8::1"/&gt;
C:          &lt;/deleg:deleg&gt;
C:        &lt;/deleg:add&gt;
C:      &lt;/deleg:update&gt;
C:    &lt;/extension&gt;
C:    &lt;clTRID&gt;ABC-12345&lt;/clTRID&gt;
C:  &lt;/command&gt;
C:&lt;/epp&gt;
</sourcecode>

</section>

</section>

</section>

<section>
<name>Relationship between <tt>DELEG</tt> and host objects/attributes</name>

<t>
It is anticpated that most domains will need both <tt>DELEG</tt> and traditional <tt>NS</tt> records published in their parent zone for the foreseeable future.
</t>

<t>
Therefore, EPP servers <bcp14>SHOULD</bcp14> allow clients to configure domain names to have both <tt>DELEG</tt> records and host objects or host attributes.
</t>

</section>

<section>
<name>Security Considerations</name>

<t>Under the initial design of the <tt>DELEG</tt> record, the security implications of properly carrying the record in EPP,
and name servers using such information in zones, are similar to the security implications for <tt>NS</tt> records.
If there are later extensions to the <tt>DELEG</tt> record, those extension may have different security considerations that will need to be documented.</t>

</section>

<section anchor="formal-syntax">
<name>Formal syntax</name>

<t>
The formal syntax presented here is a complete schema representation of the extension suitable for automated validation of EPP XML instances.
</t>

<sourcecode>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;schema
  xmlns="http://www.w3.org/2001/XMLSchema"
  targetNamespace="urn:ietf:params:xml:ns:epp:deleg-0.01"
  xmlns:deleg="urn:ietf:params:xml:ns:epp:deleg-0.01"
  xmlns:eppcom="urn:ietf:params:xml:ns:eppcom-1.0"
  elementFormDefault="qualified"&gt;
  &lt;annotation&gt;
    &lt;documentation&gt;
      Extensible Provisioning Protocol v1.0 extension
      schema for DELEG records.
    &lt;/documentation&gt;
  &lt;/annotation&gt;

  &lt;import namespace="urn:ietf:params:xml:ns:eppcom-1.0"/&gt;

  &lt;element name="infData" type="deleg:containerType"/&gt;
  &lt;element name="create" type="deleg:containerType"/&gt;
  &lt;element name="update" type="deleg:updateType"/&gt;

  &lt;complexType name="updateType"&gt;
    &lt;sequence&gt;
      &lt;element name="add" type="deleg:containerType"
        minOccurs="0"/&gt;
      &lt;element name="rem" type="deleg:containerType"
        minOccurs="0"/&gt;
    &lt;/sequence&gt;
  &lt;/complexType&gt;

  &lt;complexType name="containerType"&gt;
    &lt;sequence&gt;
      &lt;element name="deleg" type="deleg:delegType"
        minOccurs="0"
        maxOccurs="unbounded"/&gt;
    &lt;/sequence&gt;
  &lt;/complexType&gt;

  &lt;complexType name="delegType"&gt;
    &lt;sequence&gt;
      &lt;element name="params" type="deleg:paramType"
        minOccurs="0"/&gt;
    &lt;/sequence&gt;
    &lt;attribute name="priority" type="unsignedShort"/&gt;
    &lt;attribute name="target" type="eppcom:labelType"/&gt;
  &lt;/complexType&gt;

  &lt;complexType name="paramType"&gt;
    &lt;anyAttribute processContents="skip"/&gt;
  &lt;/complexType&gt;
&lt;/schema&gt;
</sourcecode>

</section>

<section>
<name>IANA considerations</name>

<section>
<name>XML Namespace</name>

<t>
This document uses URNs to describe XML namespaces and XML schemas conforming to a registry mechanism described in <xref target="RFC3688"/>.
The following URI assignments are requested of IANA:
</t>

<t>
Registration for the DELEG namespace:
</t>

<t>
<strong>URI:</strong> <tt>urn:ietf:params:xml:ns:epp:deleg-&VERSION;</tt>
</t>

<t>
<strong>Registrant Contact:</strong> See the author(s) of this document
</t>

<t>
<strong>XML:</strong> None. Namespace URIs do not represent an XML specification
</t>

<t>
Registration for the DELEG XML schema:
</t>

<t>
<strong>URI:</strong>
<tt>urn:ietf:params:xml:schema:epp:deleg-&VERSION;</tt>
</t>

<t>
<strong>Registrant Contact:</strong>
See the author(s) of this document
</t>

<t>
<strong>XML:</strong>
See the "<xref target="formal-syntax" format="title"/>" section of this document
</t>

</section>

<section>
<name>EPP Extension Registry</name>

<t>
The EPP extension described in this document will be registered by the IANA in the Extensions for the "Extensible Provisioning Protocol (EPP)" registry described in <xref target="RFC7451"/>.
The details of the registration are as follows:
</t>

<t>
<strong>Name of Extension:</strong> Extensible Provisioning Protocol (EPP) Mapping for DELEG records
</t>

<t>
<strong>Document Status:</strong>
Standards Track
</t>

<t>
<strong>Reference:</strong>
URL of this document
</t>

<t>
<strong>Registrant Name and Email Address:</strong>
See the author(s) of this document
</t>

<t>
<strong>TLDs:</strong>
Any
</t>

<t>
<strong>IPR Disclosure:</strong>
None
</t>

<t>
<strong>Status:</strong>
Active
</t>

<t>
<strong>Notes:</strong>
None
</t>

</section>

</section>

<section title="Change Log">

<section title="01">
<ul>
<li>Add this section.</li>
<li>Updates to reflect the current state of <xref target="I-D.ietf-deleg"/>.</li>
<li>Example updates.</li>
</ul>
</section>

<section title="00">
<ul>
<li>Initial version.</li>
</ul>
</section>

</section>

</middle>

<back>

<displayreference target="I-D.ietf-deleg" to="DELEG"/>

<references><name>Normative References</name>

<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3688.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7451.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml-rfcsubseries/reference.STD.0069.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml-ids/reference.I-D.ietf-deleg.xml"/>

</references>

</back>

</rfc>
