<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
     which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!-- One method to get references from the online citation libraries.
     There has to be one entity for each item to be referenced. 
     An alternate method (rfc include) is described in the references. -->
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC3688 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3688.xml">
<!ENTITY RFC5730 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5730.xml">
<!ENTITY RFC5733 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5733.xml">
<!ENTITY RFC7451 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7451.xml">
<!ENTITY I-D.narten-iana-considerations-rfc2434bis SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.narten-iana-considerations-rfc2434bis.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs), 
     please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
     (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space 
     (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="yes" ?>
<!-- keep one blank line between list items -->
<?rfc comments="yes" ?>
<!-- show cref output -->
<?rfc inline="yes" ?>
<!-- inline cref output -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="std" docName="draft-carney-regext-validate-01" ipr="trust200902">
  <!-- category values: std, bcp, info, exp, and historic
     ipr values: full3667, noModification3667, noDerivatives3667
     you can add the attributes updates="NNNN" and obsoletes="NNNN" 
     they will automatically be output with "(if approved)" -->

  <!-- ***** FRONT MATTER ***** -->

  <front>
    <!-- The abbreviated title is used in the page header - it is only necessary if the 
         full title is longer than 39 characters -->

    <title abbrev="Validate">
    Validate Extension for the Extensible Provisioning Protocol (EPP)</title>

    <author fullname="Roger Carney" initials="R.C." surname="Carney">
      <organization>GoDaddy Inc.</organization>

      <address>
        <postal>
          <street>14455 N. Hayden Rd. #219</street>

          <city>Scottsdale</city>

          <region>AZ</region>

          <code>85260</code>

          <country>US</country>
        </postal>

        <email>rcarney@godaddy.com</email>

        <uri>http://www.godaddy.com</uri>
      </address>
    </author>

    <author fullname="Joseph Snitker" initials="J.S." surname="Snitker">
      <organization>GoDaddy Inc.</organization>

      <address>
        <postal>
          <street>14455 N. Hayden Rd. #219</street>

          <city>Scottsdale</city>

          <region>AZ</region>

          <code>85260</code>

          <country>US</country>
        </postal>

        <email>jsnitker@godaddy.com</email>

        <uri>http://www.godaddy.com</uri>
      </address>
    </author>

    <date year="2016"/>

    <!-- Meta-data Declarations -->

    <area>Applications and Real-Time</area>

    <workgroup>Registration Protocols Extensions</workgroup>

    <abstract>
      <t>This document describes an Extensible Provisioning Protocol (EPP)
      extension mapping for the validation of contact and eligibility data.</t>
    </abstract>
    
  </front>

  <middle>
    <section title="Introduction">
      <t>This document describes an extension mapping for version 1.0 of the
      <xref target="RFC5730">Extensible Provisioning Protocol (EPP)</xref>.
      This EPP mapping specifies a flexible schema by which EPP clients and
      servers can reliably validate contact and eligibility data.</t>

      <t>With the increased number of restrictions on contacts and required data
      points (license, ids, etc.) to register a domain name, a way to validate
      the data points prior to issuing a transform command is becoming more
      important.</t>

      <section title="Conventions Used in This Document">
        <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>

        <t>XML is case sensitive. Unless stated otherwise, XML specifications
        and examples provided in this document MUST be interpreted in the
        character case presented in order to develop a conforming
        implementation.</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 a REQUIRED feature of this protocol.
        </t>
      </section>
    </section>

    <section title="Object Attributes">
      <t>This extension adds additional elements to EPP object mappings like the
      EPP domain name mapping <xref target="RFC5733"/>. Only those
      new elements are described here.</t>

      <t>Key Value provides a flexible mechanism to share data between the client
      and the server. The &lt;validate:kv&gt; element defines the data, with two
      required simple attributes, key and value, and an optional contactType
      attribute for specificity in the response, more details below.</t>
      
      <t><list style="symbols">
        <t>An example &lt;validate:kv key="VATID" value="0123456789"/&gt;.</t>
        <t>An example &lt;validate:kv contactType="Admin" key="contact:cc" value="Invalid country code for admin contact, must be MX."/&gt;.</t>
      </list></t>

    </section>

    <section title="EPP Command Mapping">
      <t>A detailed description of the EPP syntax and semantics can be found in
      <xref target="RFC5730"/>. The command mappings described
      here are specifically for the Validate Extension</t>

      <section title="EPP Query Commands">
        <t>EPP provides four commands to retrieve object information: &lt;check&gt;
        to determine if an object is known to the server, &lt;info&gt; to retrieve
        detailed information associated with an object, &lt;poll&gt; to discover
        and retrieve service messages queued by the server, and &lt;transfer&gt;
        to retrieve object transfer status information.</t>
      
        <section title="EPP &lt;check&gt; Command">
          <t>This extension defines additional elements for the EPP &lt;check&gt;
          command.</t>

          <t>The command frame MAY contain an &lt;extension&gt; element which MAY
          contain one child &lt;validate:check&gt; element with the following
          child element(s):</t>

          <t><list style="symbols">
            <t>one or more &lt;validate:contact&gt; element(s) for each contact
            that is to be validated that contains the contact type of the contact
            to be validated.</t>
          </list></t>

          <t>The &lt;validate:contact&gt; element MUST contain the following
          child elements:</t>
          
          <t><list style="symbols">
            <t>one &lt;validate:cd&gt; element.</t>
            <t>zero or more &lt;validate:kv&gt; elements.</t>
          </list></t>

          <t>The &lt;validate:cd&gt; element MUST contain the following child
          elements:</t>

          <t><list style="symbols">
            <t>one &lt;validate:id&gt; element.</t>
            <t>an OPTIONAL &lt;validate:postalInfo&gt; element.</t>
            <t>an OPTIONAL &lt;validate:voice&gt; element.</t>
            <t>an OPTIONAL &lt;validate:fax&gt; element.</t>
            <t>an OPTIONAL &lt;validate:email&gt; element.</t>
            <t>an OPTIONAL &lt;validate:authInfo&gt; element.</t>
            <t>an OPTIONAL &lt;validate:disclose&gt; element.</t>
          </list></t>

          <figure>
            <preamble>The following is an example of the &lt;check&gt; command using
            the &lt;validate&gt; extension.</preamble>
        
            <artwork><![CDATA[
C:<?xml version="1.0" encoding="UTF-8" standalone="no"?>
C:<epp xmlns="urn:ietf:params:xml:ns:epp-1.0"
C:  xmlns:validate="urn:ietf:params:xml:ns:validate-0.1"
C:  xmlns:contact="urn:ietf:params:xml:ns:contact-1.0">
C:  <command>
C:    <check>
C:      <validate:check>
C:        <validate:contact contactType="registrant" tld="COM">
C:          <validate:cd>
C:            <validate:id>sh8013</validate:id>
C:            <validate:postalInfo type="int">
C:              <contact:name>John Doe</contact:name>
C:              <contact:org>Example Inc.</contact:org>
C:              <contact:addr>
C:                <contact:street>123 Example Dr.</contact:street>
C:                <contact:street>Suite 100</contact:street>
C:                <contact:city>Dulles</contact:city>
C:                <contact:sp>VA</contact:sp>
C:                <contact:pc>20166-6503</contact:pc>
C:                <contact:cc>US</contact:cc>
C:              </contact:addr>
C:          </validate:postalInfo>
C:          <validate:voice>+1.7035555555</validate:voice>
C:          <validate:fax>+1.7035555556</validate:fax>
C:          <validate:email>jdoe@example.com</validate:email>
C:          <validate:authInfo>
C:            <contact:pw>2fooBAR</contact:pw>
C:          </validate:authInfo>
C:          <validate:disclose flag="0">
C:            <contact:voice/>
C:            <contact:email/>
C:          </validate:disclose>
C:        </validate:cd>
C:        <validate:kv key="VAT" value="1234567890"/>
C:      </validate:contact>
C:      <validate:contact contactType="tech" tld="COM">
C:        <validate:cd>
C:          <validate:id>sh8013</validate:id>
C:        </validate:cd>
C:      </validate:contact>
C:      <validate:contact contactType="admin" tld="COM">
C:        <validate:cd>
C:          <validate:id>sh8014</validate:id>
C:          <validate:postalInfo type="int">
C:            <contact:name>John Doe</contact:name>
C:            <contact:org>Example Inc.</contact:org>
C:            <contact:addr>
C:              <contact:street>123 Example Dr.</contact:street>
C:              <contact:street>Suite 100</contact:street>
C:              <contact:city>Dulles</contact:city>
C:              <contact:sp>VA</contact:sp>
C:              <contact:pc>20166-6503</contact:pc>
C:              <contact:cc>US</contact:cc>
C:            </contact:addr>
C:          </validate:postalInfo>
C:          <validate:voice>+1.7035555555</validate:voice>
C:          <validate:fax>+1.7035555556</validate:fax>
C:          <validate:email>jdoe@example.com</validate:email>
C:          <validate:authInfo>
C:            <contact:pw>2fooBAR</contact:pw>
C:          </validate:authInfo>
C:          <validate:disclose flag="0">
C:            <contact:voice/>
C:            <contact:email/>
C:          </validate:disclose>
C:        </validate:cd>
C:      </validate:contact>
C:      <validate:contact contactType="billing" tld="COM">
C:        <validate:cd>
C:          <validate:id>sh8014</validate:id>
C:        </validate:cd>
C:      </validate:contact>
C:    </validate:check>
C:    </check>
C:    <clTRID>ABC-12345</clTRID>
C:  </command>
C:</epp>]]>
            </artwork>
          </figure>

          <t>When the server receives a &lt;check&gt; command that includes the
          extension elements described above, its response MUST contain an
          &lt;extension&gt; element, which MUST contain a child &lt;validate:chkData&gt;
          element. The &lt;validate:chkData&gt; element MUST contain a &lt;validate:cd&gt;
          element for each &lt;validate:check&gt; element contained in the
          &lt;check&gt; command. The &lt;validate:cd&gt; element MUST contain the
          following child elements:</t>

          <t><list style="symbols">
            <t>one &lt;validate:id&gt; element.</t>
            <t>one &lt;validate:response&gt; element.</t>
            <t>zero or more &lt;validate:kv&gt; elements.</t>
          </list></t>

          <figure>
            <preamble>The following is an example of the &lt;check&gt; response
            using the &lt;validate&gt; extension.</preamble>

            <artwork><![CDATA[
S:<?xml version="1.0" encoding="UTF-8" standalone="no"?>
S:<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
S:  <response>
S:    <result code="1000">
S:      <msg>Command completed successfully</msg>
S:    </result>
S:    <resData>
S:      <validate:chkData
S:        xmlns:validate="urn:ietf:params:xml:ns:validate-0.1">
S:        <validate:cd>
S:          <validate:id>sh8013</validate:id>
S:          <validate:response>1000</validate:response>
S:        </validate:cd>
S:        <validate:cd>
S:          <validate:id>sh8014</validate:id>
S:          <validate:response>2306</validate:response>
S:          <validate:kv key="contact:city" value="City not valid
S:            for state."/>
S:          <validate:kv contactType="Admin" key="contact:cc"
S:            value="Invalid country code for admin, must be mx."/>
S:          <validate:kv contactType="Billing" key="VAT" value="VAT
S:            required for Billing contact."/>
S:        </validate:cd>
S:      </validate:chkData>
S:    </resData>
S:    <trID>
S:      <clTRID>ABC-12345</clTRID>
S:      <svTRID>54321-ZYX</svTRID>
S:    </trID>
S:  </response>
S:</epp>]]>
            </artwork>
          </figure>

        </section>

        <section title="EPP &lt;info&gt; Command">
          <t>This extension does not add any elements to the EPP &lt;info&gt;
          command or &lt;info&gt; response.</t>
          
        </section>

        <section title="EPP &lt;poll&gt; Command">
          <t>This extension does not add any elements to the EPP &lt;poll&gt;
          command or &lt;poll&gt; response.</t>

        </section>

        <section title="EPP &lt;transfer&gt; Command">
          <t>This extension does not add any elements to the EPP &lt;transfer&gt;
          command or &lt;transfer&gt; response.</t>

        </section>
        
      </section>

      <section title="EPP Query Commands">
        <t>EPP provides five commands to transform objects: &lt;create&gt; to
        create an instance of an object with a server, &lt;delete&gt; to remove
        an instance of an object from a server, &lt;renew&gt; to extend the
        validity period of an object, &lt;transfer&gt; to manage changes in
        client sponsorship of an object, and &lt;update&gt; to change information.</t>

        <section title="EPP &lt;create&gt; Command">
          <t>This extension does not add any elements to the EPP &lt;create&gt;
          command or &lt;create&gt; response.</t>

        </section>

        <section title="EPP &lt;delete&gt; Command">
          <t>This extension does not add any elements to the EPP &lt;delete&gt;
          command or &lt;delete&gt; response.</t>

        </section>

        <section title="EPP &lt;renew&gt; Command">
          <t>This extension does not add any elements to the EPP &lt;renew&gt;
          command or &lt;renew&gt; response.</t>

        </section>

        <section title="EPP &lt;transfer&gt; Command">
          <t>This extension does not add any elements to the EPP &lt;transfer&gt;
          command or &lt;transfer&gt; response.</t>

        </section>

        <section title="EPP &lt;update&gt; Command">
          <t>This extension does not add any elements to the EPP &lt;update&gt;
          command or &lt;update&gt; response.</t>

        </section>

      </section>
      
    </section>

    <section anchor="syntax" title="Formal Syntax">

      <t>One schema is presented here that is the EPP Validate Extension schema.</t>

      <t>The formal syntax presented here is a complete schema representation of
      the object mapping suitable for automated validation of EPP XML instances.
      The BEGIN and END tags are not part of the schema; they are used to note the
      beginning and ending of the schema for URI registration purposes.</t>

      <section title="Validate Extension Schema">

        <figure>
          <artwork><![CDATA[
BEGIN
<?xml version="1.0" encoding="UTF-8"?>
<schema
   targetNamespace="urn:ietf:params:xml:ns:validate-0.1"
   xmlns:validate="urn:ietf:params:xml:ns:validate-0.1"
   xmlns:epp="urn:ietf:params:xml:ns:epp-1.0"
   xmlns:eppcom="urn:ietf:params:xml:ns:eppcom-1.0"
   xmlns:contact="urn:ietf:params:xml:ns:contact-1.0"
   xmlns="http://www.w3.org/2001/XMLSchema"
   elementFormDefault="qualified">

   <annotation>
     <documentation>
       Extensible Provisioning Protocol v1.0
       Validate Object Extension
     </documentation>
   </annotation>

   <!-- Import common element types. -->
   <import namespace="urn:ietf:params:xml:ns:eppcom-1.0"
     schemaLocation="eppcom-1.0.xsd"/>
   <import namespace="urn:ietf:params:xml:ns:epp-1.0"
     schemaLocation="epp-1.0.xsd"/>
   <import namespace="urn:ietf:params:xml:ns:contact-1.0"
     schemaLocation="contact-1.0.xsd"/>

<!--
Child elements of the <check> command.
-->
   <element name="check" type="validate:checkType"/>

   <complexType name="checkType">
     <sequence>
       <element name="contact"
         type="validate:validateContactType"
         maxOccurs="unbounded" />
     </sequence>
   </complexType>

   <complexType name="validateContactType">
     <sequence>
       <element name="cd"
         type="validate:checkDataType"/>
       <element name="kv"
         type="validate:kvType" minOccurs="0"
         maxOccurs="unbounded" />
     </sequence>
     <attribute name="contactType" type="eppcom:labelType"
       use="required"/>
     <attribute name="tld"
       type="eppcom:labelType" use="required"/>
   </complexType>

   <complexType name="checkDataType">
     <sequence>
       <element name="id"
         type="eppcom:clIDType" />
       <element name="postalInfo"
         type="contact:postalInfoType"
         minOccurs="0" maxOccurs="2" />
       <element name="voice"
         type="contact:e164Type" minOccurs="0" />
       <element name="fax"
         type="contact:e164Type" minOccurs="0" />
       <element name="email"
         type="eppcom:minTokenType" minOccurs="0"/>
       <element name="authInfo"
         type="contact:authInfoType"
         minOccurs="0"/>
       <element name="disclose"
         type="contact:discloseType"
         minOccurs="0" />
     </sequence>
   </complexType>

   <complexType name="kvType">
     <attribute name="contactType"
       type="eppcom:labelType" use="optional" />
     <attribute name="key"
       type="validate:keyType" use="required" />
    <attribute name="value"
       type="validate:valueType" use="required" />
   </complexType>

   <simpleType name="keyType">
     <restriction base="token">
       <minLength value="1" />
     </restriction>
   </simpleType>

   <simpleType name="valueType">
     <restriction base="token">
       <minLength value="0" />
     </restriction>
   </simpleType>

<!--
Child elements of the <check> response.
-->
   <element name="chkData" type="validate:chkDataType" />

   <complexType name="chkDataType">
     <sequence>
       <element name="cd"
         type="validate:resCreateDataType" maxOccurs="unbounded" />
     </sequence>
   </complexType>

   <complexType name="resCreateDataType">
     <sequence>
       <element name="id"
         type="eppcom:clIDType" />
       <element name="response"
         type="epp:resultCodeType" />
       <element name="kv"
         type="validate:kvType"
         minOccurs="0" maxOccurs="unbounded" />
     </sequence>
   </complexType>

</schema>
END]]>
          </artwork>
        </figure>
      </section>

    </section>

    <section anchor="IANA" title="IANA Considerations">

    	<section title="XML Namespace">
         <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 assignment is requested of IANA:</t>

         <t>URI: ietf:params:xml:ns:validate-1.0</t>

         <t>Registrant Contact: See the "Author's Address" section of this document.</t>

         <t>XML: See the "Formal Syntax" section of this document.</t>

       </section>

       <section title="EPP Extension Registry">

       	<t>The EPP extension described in this document should be registered by
       	the IANA in the EPP Extension Registry described in <xref target="RFC7451"/>.  The
       	details of the registration are as follows:</t>

        <t>Name of Extension: "Validate Extension for the Extensible Provisioning Protocol (EPP)"</t>

        <t>Document status: Standards Track</t>

        <t>Reference: (insert reference to RFC version of this document)</t>

        <t>Registrant Name and Email Address: IESG, &lt;iesg@ietf.org&gt;</t>

        <t>TLDs: Any</t>

        <t>IPR Disclosure: None</t>

        <t>Status: Active</t>

        <t>Notes: None </t>

       </section>

    </section>

    <section anchor="Security" title="Security Considerations">
      <t>The mapping extensions described in this document do not provide any
      security services beyond those described by <xref target="RFC5730">EPP</xref>
      and protocol layers used by EPP. The security considerations described in
      these other specifications apply to this specification as well.</t>
    </section>

    <section title="Acknowledgements">
      <t>The authors wish to thank the following persons for their feedback and
      suggestions:</t>
      <t><list style="symbols">
        <t>Kevin Allendorf of GoDaddy Inc.</t>
        <t>Jody Kolker of GoDaddy Inc.</t>
        <t>James Gould of Verisign Inc</t>
      </list></t>
    </section>

    <section title="Change History">
    
      <section title="Change from 00 to 01">
        <t>After review and broad feedback, extensive changes have been made
        transforming the original document from a standalone extension command to
        an extension using the &lt;check&gt; command and response framework.</t>
      </section>
      
    </section>

  </middle>

  <!--  *****BACK MATTER ***** -->

  <back>
    <!-- References split into informative and normative -->

    <!-- There are 2 ways to insert reference entries from the citation libraries:
     1. define an ENTITY at the top, and use "ampersand character"RFC2629; here (as shown)
     2. simply use a PI "less than character"?rfc include="reference.RFC.2119.xml"?> here
        (for I-Ds: include="reference.I-D.narten-iana-considerations-rfc2434bis.xml")

     Both are cited textually in the same manner: by using xref elements.
     If you use the PI option, xml2rfc will, by default, try to find included files in the same
     directory as the including file. You can also define the XML_LIBRARY environment variable
     with a value containing a set of directories to search.  These can be either in the local
     filing system or remote ones accessed by http (http://domain/dir/... ).-->

    <references title="Normative References">

      &RFC2119;

      &RFC3688;

      &RFC5730;

      &RFC5733;

      &RFC7451;

    </references>

  </back>
</rfc>


