<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC2818 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2818.xml">
<!ENTITY RFC2616 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2616.xml">
<!ENTITY RFC5280 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5280.xml">
<!ENTITY RFC1034 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.1034.xml">
<!ENTITY RFC3152 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3152.xml">
<!ENTITY RFC4033 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4033.xml">
<!ENTITY RFC4034 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4034.xml">
]>

<?rfc strict="yes" ?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<rfc category="info" docName="draft-manderson-rdns-xml-02" ipr="trust200902">

  <front>

    <title abbrev="Abbreviated Title">XML Schemas for Reverse DNS Management</title>


    <author fullname="Terry Manderson" initials="T." surname="Manderson">
      <organization>ICANN</organization>

      <address>
        <email>terry.manderson@icann.org</email>
      </address>
    </author>

    <date month="June" year="2015" />

    <area>General</area>

    <workgroup>Internet Engineering Task Force</workgroup>

    <abstract>
      <t>This document defines an Extensible Markup Language (XML) Schema for
   Reverse DNS Management in a tightly controlled Representational State Transfer (REST) environment. This document describes a schema that has been developed and deployed by ICANN in a "RESTful" based system since 2011 and is being used by the registries responsible for reverse DNS (rDNS) delegations underneath IN-ADDR.ARPA and IP6.ARPA through an X.509 certificate mediated HTTPS transaction.  
      </t>
    </abstract>
  </front>

  <middle>

      <section title="Requirements Language">
        <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
        "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
        document are to be interpreted as described in <xref
        target="RFC2119">RFC 2119</xref>.</t>
      </section>

    <section title="Introduction">
      <t>This document defines an Extensible Markup Language (XML) Schema for
   Reverse DNS Management in a tightly controlled Representational State Transfer (REST)  <xref target="REST"></xref> environment. This document describes a schema that has been developed and deployed by ICANN in a "RESTful" based system since 2011 and is being used by the registries responsible for reverse DNS (rDNS) delegations underneath IN-ADDR.ARPA <xref target="RFC1034"></xref> and IP6.ARPA <xref target="RFC3152"></xref> through an X.509 <xref target="RFC5280"></xref> certificate mediated HTTPS <xref target="RFC2818"></xref> transaction.  
      </t>

      <t> As DNSSEC <xref target="RFC4033"></xref>  adoption progresses the necessity to interact with a delegation in the IN-ADDR.ARPA and IP6.APRA zones becomes more frequent given that updates to DS records in the parent zone for child delegations follow the key rollover and expiry of the child zone. The modification of such critical areas at a relative high frequency requires a system that allows the administrative holders of such delegations to make such changes in a secure and trustworthy manner where the chain of trust for submitting the necessary information remains unbroken between the IN-ADDR.ARPA and IP6.APRA zone maintainers and the zone customers.  </t>

<t>At the request of the Regional Internet Registries to automate reverse DNS updates with ICANN, a REST based HTTPS service was deployed that:</t>
<t><list style="symbols">
      <t>Provides for a secure authenticated mechanism to update zone data (NS and DS records)</t>
	<t>Provides a well-formed data structure for both the IN-ADDR.ARPA and IP6.ARPA zones</t>
	<t>Allows for "out of band" acknowledgement and notification of updates</t>
</list></t>

    </section>

    <section title="Implementation">
	<t>The implemented system allows the entity responsible for its rDNS delegations to effect changes in the reverse DNS zones IN-ADDR.ARPA and IP6.ARPA by submitting an XML document to an atomic RESTful service via a HTTPS <xref target="RFC2818"></xref> connection. In this service the HTTPS layer provides the end-to-end security of the transaction and it further provides authentication by use of mandatory X.509 <xref target="RFC5280"></xref> client certificates with a known server certificate issued by a Certificate Authority administered by the service operator.</t>

	<t> Certificates for use in this system, issued by the system operator, are specific to the entity responsible for the delegations in the zone.</t>

	<t> Updates are made to the system by using the HTTP <xref target="RFC2616"></xref> GET, PUT, and DELETE operations over HTTP 1.1 <xref target="RFC2616"></xref> via HTTPS <xref target="RFC2818"></xref> only. These operations are sent to a resource Uniform Resource Identifier (URI) in the form of:</t>
	<figure align="center">

        <artwork align="left"><![CDATA[
	https://host.example.org/<ipversion>/<zone>
	            ]]></artwork>

      </figure>

	<t>A synthetic example of an XML document submitted to the deployed system might take the following form (including all optional attributes) as per the schema in <xref target="update-schema" />.</t>

	<figure align="center">

        <artwork align="left"><![CDATA[
<zone xmlns="http://download.research.icann.org/rdns/1.1" 
  name="10.in-addr.arpa" cust="IANA" ipversion="ipv4" 
  version="1.1" modified="2012-01-18T01:00:06" 
  state="active" href="https://host.example.org/ipv4/10">
  <nserver>
    <fqdn>BLACKHOLE-1.IANA.ORG.</fqdn>
  </nserver>
  <nserver>
    <fqdn>BLACKHOLE-2.IANA.ORG.</fqdn>
  </nserver>
  <ds>
    <rdata>33682 5 1 ea8afb5fce7caf381ab101039</rdata>
  </ds>
  <ds>
    <rdata>33682 5 2 7d44874f1d93aaceb793a88001739a</rdata>
  </ds>
</zone>
	            ]]></artwork>

      </figure>

	<t> When PUT and DELETE operations are used, the well formed XML is required to be sent with the appropriate content-length headers. The GET operation requires only the URI.</t>

	<t>One requirement of the system was to allow the separation of update and approval with an out of band notification mechanism. When such options are configured for a customer of the service, submitted updates may be queued for later approval. When a customer has queued updates pending approval, the customer may submit a GET request to retrieve either an individual entry, or a full listing of all queued entries.</t>

	<t>To fetch a listing of the customer's queue the customer would GET a URI in the form of:</t>
		<figure align="center">

        <artwork align="left"><![CDATA[
	https://host.example.org/queuelist
	            ]]></artwork>

      </figure>

	<t>To fetch an individual queue entry the customer would GET the canonical URL (as per the schema) for this queue record:</t>
		<figure align="center">

        <artwork align="left"><![CDATA[
	https://host.example.org/queue/<identifier>
	            ]]></artwork>

      </figure>

	<t>Were &lt;identifier&gt; is a system generated and system specific value that identifies this particular queue entry. All XML returned from from queue based operations ('queue' and 'queuelist') would return an XML document following the specification in <xref target="q-schema" />. A synthetic example from a GET of 'queuelist' would be:</t>

<figure align="center">

        <artwork align="left"><![CDATA[
<queuelist xmlns="http://download.research.icann.org/rq/1.0" 
 version="1.0">
 <queue xmlns="http://download.research.icann.org/rq/1.0"
  name="10.in-addr.arpa" cust="IANA" ipversion="ipv4" 
  version="1.0" submitted="2013-01-11T05:22:15" 
  state="pending" method="PUT"
  ack="https://host.example.org/ack/25a531f50e5ba45"
  href="https://host.example.org/queue/25a531f50e5ba45">
  <nserver>
    <fqdn>BLACKHOLE-1.IANA.ORG.</fqdn>
  </nserver>
  <nserver>
    <fqdn>BLACKHOLE-2.IANA.ORG.</fqdn>
  </nserver>
  <ds>
    <rdata>33682 5 1 ea8afb5fce7caf381ab101039</rdata>
  </ds>
  <ds>
    <rdata>33682 5 2 7d44874f1d93aaceb793a88001739a</rdata>
  </ds>
 </queue>
</queuelist>
]]></artwork>

      </figure>



    </section>




    <!-- This PI places the pagebreak correctly (before the section title) in the text output. -->

    <?rfc needLines="8" ?>

    <section anchor="IANA" title="IANA Considerations">
      <t>This memo includes no request to IANA. This section may be removed by the RFC Editor prior to publication.</t>

    </section>

    <section anchor="Security" title="Security Considerations">
      <t>This document provides an XML schema for facilitating the management of reverse DNS delegations in the IN-ADDR.ARPA and IP6.APRA zones. The schema itself contains no authentication data and all other information contained is considered public data as it is either published in DNS, or propagated to other public information sources like WHOIS.</t>

	<t>The system which implements this XML schema requires HTTPS to be used and also uses known server and client X.509 certificates for authentication to protect against message modification, message insertion/deletion, man-in-the-middle, and replay attacks. Authorisation for which delegations the X.509 certificate authentication sessions can affect are out of scope of this document, along with any denial of service type attack vectors.</t>
    </section>

<section anchor="Acknowledgements" title="Acknowledgements">
      <t>An XML schema was initially provided by APNIC, however necessity required a branch and as such a new namespace and schema has been created. Recognition goes to APNIC for prior efforts in this area.</t>
	
	<t>The author acknowledges feedback from a collective made up of various RIR technical folk, however heartfelt thanks goes to Anand Buddhdev of the RIPE-NCC and Robert Loomans of APNIC for being both alpha and beta testers and providing valuable feedback.</t>
    </section>

  </middle>



  <!--  *****BACK MATTER ***** -->

  <back>
    <!-- References split into informative and normative -->

    <references title="Normative References">
      
	&RFC2119;
 	&RFC2818;
	&RFC5280;
	&RFC2616;
	&RFC1034;
	&RFC3152;
	&RFC4033;
	&RFC4034;

    </references>

    <references title="Informative References">
      <!-- Here we use entities that we defined at the beginning. -->

	 <reference anchor="REST"
                 target="http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm">
        <front>
          <title>Architectural Styles and the Design of Network-based Software Architectures</title>

          <author initials="R.T" surname="Fielding">
            <organization></organization>
	  </author>

          <date year="2000" />
        </front>
      </reference>

	 <reference anchor="RELAXNG"
                 target="https://www.oasis-open.org/committees/relax-ng/compact-20021121.html">
        <front>
          <title>RELAX NG Compact Specification</title>

          <author>
            <organization>The Organization for the Advancement of Structured Information Standards [OASIS]</organization>
	  </author>

          <date year="2002" />
        </front>
      </reference>

     </references>

    <section anchor="update-schema" title="Schema Definition for rDNS updates">
      <t> The following Schema, used for PUT, GET, and DELETE operations, is an XML document using the RelaxNG Compact <xref target="RELAXNG"></xref> specification.
      </t>

      <figure align="center">

        <artwork align="left"><![CDATA[
default namespace = "http://download.research.icann.org/rdns/1.1"

# A document may either be a single zone (update) or 
# a collection of zones (view)
start = zone | zonelist | zonereflist

# A list of zone names for view only.
zonereflist = element zonereflist {
  attribute version {
    xsd:decimal { minInclusive="1.1" fractionDigits="1" }
  },
  zoneref*
}

# A bulk list of zones for view only.
zonelist = element zonelist {
  attribute version {
    xsd:decimal { minInclusive="1.1" fractionDigits="1" }
  },
  zone*
}

# A zone reference (accepted by REST engine for query)
zoneref = element zoneref {
  attribute name { text },
  attribute href { xsd:anyURI }
}

# A single zone record
zone = element zone {
  # The zone record's name, eg 10.in-addr.arpa
  attribute name { text },
  # The customer, optional, it is derived from known state.
  attribute cust { text }?,
  # The canonical URL for this zone record (optional)
  attribute href { xsd:anyURI }?,
  # The address IP version for the zone record (optional)
  attribute ipversion { "ipv4" | "ipv6" }?,
  # The administrative state of the zone (optional)
  attribute state { "active" | "pending" | "error" }?,
  # The last modified timestamp in UTC (optional)
  attribute modified  { xsd:dateTime }?,
  # The schema version (optional)
  attribute version {
    xsd:decimal { minInclusive="1.1" fractionDigits="1" }
  }?,
  # A zone NS RRset MUST have at least two NS records
  nserver,
  nserver+,
  # It MAY contain some DS records
  ds*
}

# DNS-SEC records
ds = element ds {
  # rdata MUST contain  
  #  <Keytag> | <Algorithm> | <Digest type> | <Digest>
  # as per RFC4034
  # 
  element rdata { text }
}


# A single name server
nserver = element nserver {
  # An nserver entry MUST contain a DNS FQDN 
  # for a NS RR (RFC 1035)
  element fqdn { text }
}

            ]]></artwork>

      </figure>

    </section>

   <section anchor="q-schema" title="Schema Definition for rDNS Queue Entries">
      <t>The XML schema definition below, in RelaxNG Compact <xref target="RELAXNG"></xref> form is used for queue interaction operations.
      </t>

      <figure align="center">

        <artwork align="left"><![CDATA[
default namespace = "http://download.research.icann.org/rq/1.0"

# A document MAY either be a single queue entry 
#  or a collection of queued entries 
start = queue | queuelist

# A list of zone names for view only.
queuelist = element queuelist {
  attribute version {
    xsd:decimal { minInclusive="1.0" fractionDigits="0" }
  },
  queue*
}

# A single queued zone record
queue = element queue {
  # The zone record's name, eg 10.in-addr.arpa
  attribute name { text },
  # The customer, optional, derived from known state.
  attribute cust { text }?,
  # The canonical URL for this queue record (optional)
  attribute href { xsd:anyURI }?,
  # The acknowlgement URL for this queue record (optional)
  attribute ack { xsd:anyURI }?,
  # The address IP version for the zone record (optional)
  attribute ipversion { "ipv4" | "ipv6" }?,
  # The state of the zone (optional, and for a queue 
  # SHOULD always be pending)
  attribute state { "pending" }?,
  # The submitted  timestamp (optional)
  attribute submitted  { xsd:dateTime }?,
  # The HTTP method used to update 
  attribute method { "PUT" | "DELETE" },
  # The schema version (1.0) (optional)
  attribute version {
    xsd:decimal { minInclusive="1.0" fractionDigits="1" }
  }?,
  # A zone NS RRset must have at least two NS records
  nserver,
  nserver+,
  # It MAY contain some DS records
  ds*
}

# DNS-SEC records
ds = element ds {
  # rdata MUST contain  Flags | Protocol | Algorithm | Public Key
  # as per RFC4034
  # 
  element rdata { text }
}

# A single name server
nserver = element nserver {
  # An nserver entry MUST contain a DNS FQDN 
  # for a NS RR (RFC 1035)
  element fqdn { text }
}


            ]]></artwork>

      </figure>

    </section>

    <!-- Change Log

v00 2013-03-01 TJM Initial version 
v01 2013-03-18 TJM Internal review, nits
v02 2015-06-23 TJM ISE review

    -->

  </back>
</rfc>
