<?xml version="1.0"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd"
[
  <!ENTITY rfc0793 PUBLIC ''
   'http://xml.resource.org/public/rfc/bibxml/reference.RFC.0793.xml'>
  <!ENTITY rfc2119 PUBLIC ''
   'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml'>
  <!ENTITY rfc2246 PUBLIC ''
   'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2246.xml'>
  <!ENTITY rfc2581 PUBLIC ''
   'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2581.xml'>
  <!ENTITY rfc2914 PUBLIC ''
   'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2914.xml'>
  <!ENTITY rfc3280 PUBLIC ''
   'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3280.xml'>
  <!ENTITY rfc3734 PUBLIC ''
   'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3734.xml'>
  <!ENTITY rfc4346 PUBLIC ''
   'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4346.xml'>

  <!ENTITY I-D.hollenbeck-epp-rfc3730bis PUBLIC ''
   'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.hollenbeck-epp-rfc3730bis.xml'>
]>

<?xml-stylesheet type="text/xsl" href="rfc2629.xslt"?>

<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="4"?>
<?rfc rfcedstyle="yes"?>
<?rfc subcompact="yes"?>
<?rfc sortrefs="yes"?>
<?rfc symrefs="yes"?>

<rfc number="4934" obsoletes="3734" category="std">
  <front>
    <title abbrev="EPP TCP Transport">
    Extensible Provisioning Protocol (EPP) Transport over TCP</title>
    <author initials="S." surname="Hollenbeck" fullname="Scott Hollenbeck">
      <organization>VeriSign, Inc.</organization>
      <address>
        <postal>
          <street>21345 Ridgetop Circle</street>
          <city>Dulles</city>
          <region>VA</region>
          <code>20166-6503</code>
          <country>US</country>
        </postal>
        <email>shollenbeck@verisign.com</email>
      </address>
    </author>

    <date year="2007" month="May"/>
    <area>General</area>
    <keyword>EPP</keyword>
    <keyword>Extensible Provisioning Protocol</keyword>
    <keyword>XML</keyword>
    <keyword>TCP</keyword>
    <keyword>TLS</keyword>

    <abstract>
      <t>This document describes how an Extensible Provisioning Protocol (EPP)
      session is mapped onto a single Transmission Control Protocol (TCP)
      connection.  This mapping requires use of the Transport Layer
      Security (TLS) protocol to protect information exchanged between an
      EPP client and an EPP server.  This document obsoletes RFC 3734.</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>This document describes how the Extensible Provisioning Protocol
      (EPP) is mapped onto a single client-server TCP connection.  Security
      services beyond those defined in EPP are provided by the Transport
      Layer Security (TLS) Protocol <xref target="RFC2246"/>.  EPP is described in
      <xref target="RFC4930"/>.  TCP is described in <xref target="RFC0793"/>.
      This document obsoletes RFC 3734 <xref target="RFC3734"/>.</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"/>.</t>
      </section>
    </section>

    <section title="Session Management">
      <t>Mapping EPP session management facilities onto the TCP service is
      straightforward.  An EPP session first requires creation of a TCP
      connection between two peers, one that initiates the connection
      request and one that responds to the connection request.  The
      initiating peer is called the "client", and the responding peer is
      called the "server".  An EPP server MUST listen for TCP connection
      requests on a standard TCP port assigned by IANA.</t>

      <t>The client MUST issue an active OPEN call, specifying the TCP port
      number on which the server is listening for EPP connection attempts.
      The EPP server MUST return an EPP &lt;greeting&gt; to the client
      after the TCP session has been established.</t>

      <t>An EPP session is normally ended by the client issuing an EPP
      &lt;logout&gt; command.  A server receiving an EPP &lt;logout&gt;
      command MUST end the EPP session and close the TCP connection with
      a CLOSE call. A client MAY end an EPP session by issuing a CLOSE call.</t>

      <t>A server MAY limit the life span of an established TCP connection.
      EPP sessions that are inactive for more than a server-defined period
      MAY be ended by a server issuing a CLOSE call.  A server MAY
      also close TCP connections that have been open and active for longer
      than a server-defined period.</t>
    </section>

    <section title="Message Exchange">
      <t>With the exception of the EPP server greeting, EPP messages are
      initiated by the EPP client in the form of EPP commands.  An EPP
      server MUST return an EPP response to an EPP command on the same TCP
      connection that carried the command.  If the TCP connection is closed
      after a server receives and successfully processes a command but
      before the response can be returned to the client, the server MAY
      attempt to undo the effects of the command to ensure a consistent
      state between the client and the server.  EPP commands are
      idempotent, so processing a command more than once produces the same
      net effect on the repository as successfully processing the command
      once.</t>

      <t>An EPP client streams EPP commands to an EPP server on an established
      TCP connection.  A client MUST NOT distribute commands from a single
      EPP session over multiple TCP connections.  A client MAY establish
      multiple TCP connections to support multiple EPP sessions with each
      session mapped to a single connection.  A server SHOULD limit a client
      to a maximum number of TCP connections based on server capabilities
      and operational load.</t>

      <t>EPP describes client-server interaction as a command-response
      exchange where the client sends one command to the server and the
      server returns one response to the client.  A client might be able to
      realize a slight performance gain by pipelining (sending more than
      one command before a response for the first command is received)
      commands with TCP transport, but this feature does not change the
      basic single command, single response operating mode of the core
      protocol.</t>

      <t>Each EPP data unit MUST contain a single EPP message.  Commands MUST
      be processed independently and in the same order as sent from the
      client.</t>

      <t>A server SHOULD impose a limit on the amount of time required for a
      client to issue a well-formed EPP command.  A server SHOULD end an
      EPP session and close an open TCP connection if a well-formed command
      is not received within the time limit.</t>

      <t>A general state machine for an EPP server is described in Section 2
      of <xref target="RFC4930"/>.  General client-server
      message exchange using TCP transport is illustrated in Figure 1.</t>

      <figure>
	<artwork>                    Client                  Server
               |                                     |
               |                Connect              |
               | &gt;&gt;-------------------------------&gt;&gt; |
               |                                     |
               |             Send Greeting           |
               | &lt;&lt;-------------------------------&lt;&lt; |
               |                                     |
               |             Send &lt;login&gt;            |
               | &gt;&gt;-------------------------------&gt;&gt; |
               |                                     |
               |             Send Response           |
               | &lt;&lt;-------------------------------&lt;&lt; |
               |                                     |
               |             Send Command            |
               | &gt;&gt;-------------------------------&gt;&gt; |
               |                                     |
               |             Send Response           |
               | &lt;&lt;-------------------------------&lt;&lt; |
               |                                     |
               |            Send Command X           |
               | &gt;&gt;-------------------------------&gt;&gt; |
               |                                     |
               |    Send Command Y                   |
               | &gt;&gt;---------------+                  |
               |                  |                  |
               |                  |                  |
               |            Send Response X          |
               | &lt;&lt;---------------(---------------&lt;&lt; |
               |                  |                  |
               |                  |                  |
               |                  +---------------&gt;&gt; |
               |                                     |
               |            Send Response Y          |
               | &lt;&lt;-------------------------------&lt;&lt; |
               |                                     |
               |             Send &lt;logout&gt;           |
               | &gt;&gt;-------------------------------&gt;&gt; |
               |                                     |
               |     Send Response & Disconnect      |
               | &lt;&lt;-------------------------------&lt;&lt; |
               |                                     |

            Figure 1: TCP Client-Server Message Exchange</artwork>
      </figure>
    </section>

    <section title="Data Unit Format">
      <t>The EPP data unit contains two fields: a 32-bit header that describes the
      total length of the data unit, and the EPP XML instance. The length of
      the EPP XML instance is determined by subtracting four octets from the
      total length of the data unit.  A receiver must successfully read that
      many octets to retrieve the complete EPP XML instance before processing
      the EPP message.</t>

      <t>EPP Data Unit Format (one tick mark represents one bit position):
      <vspace blankLines="1"/></t>

      <figure>
	<artwork>    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                           Total Length                        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         EPP XML Instance                      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+</artwork>
      </figure>

      <t>Total Length (32 bits): The total length of the EPP data unit
      measured in octets in network (big endian) byte order.  The octets
      contained in this field MUST be included in the total length
      calculation.</t>

      <t>EPP XML Instance (variable length): The EPP XML instance carried in
      the data unit.</t>
    </section>

    <section title="Transport Considerations">
      <t>Section 2.1 of the EPP core protocol specification <xref target="RFC4930"/>
      describes considerations to be addressed by protocol transport
      mappings.  This mapping addresses each of the considerations using a
      combination of features described in this document and features
      provided by TCP as follows:</t>

      <t><list style="hanging">
	<t hangText="-">TCP includes features to provide reliability, flow control,
	 ordered delivery, and congestion control.  Section 1.5 of RFC 793
	 <xref target="RFC0793"/> describes these features in detail; congestion control
	 principles are described further in RFC 2581 <xref target="RFC2581"/> and RFC
	 2914 <xref target="RFC2914"/>.  TCP is a connection-oriented protocol, and
	 Section 2 of this mapping describes how EPP sessions are mapped to
	 TCP connections.
	 <vspace blankLines="1"/></t>

	<t hangText="-">Sections 2 and 3 of this mapping describe how the stateful nature
	 of EPP is preserved through managed sessions and controlled
	 message exchanges.
	 <vspace blankLines="1"/></t>

	<t hangText="-">Section 3 of this mapping notes that command pipelining is
	 possible with TCP, though batch-oriented processing (combining
	 multiple EPP commands in a single data unit) is not permitted.
	 <vspace blankLines="1"/></t>

	<t hangText="-">Section 4 of this mapping describes features to frame data units
	 by explicitly specifying the number of octets used to represent a
	 data unit.</t>
      </list></t>
    </section>

    <section title="Internationalization Considerations">
      <t>This mapping does not introduce or present any internationalization
       or localization issues.</t>
    </section>

    <section title="IANA Considerations">
      <t>System port number 700 has been assigned by the IANA for mapping EPP
      onto TCP.</t>

      <t>User port number 3121 (which was used for development and test
      purposes) has been reclaimed by the IANA.</t>
    </section>

    <section title="Security Considerations">
      <t>EPP as-is provides only simple client authentication services using
      identifiers and plain text passwords.  A passive attack is sufficient
      to recover client identifiers and passwords, allowing trivial command
      forgery.  Protection against most other common attacks MUST be
      provided by other layered protocols.</t>

      <t>When layered over TCP, the Transport Layer Security (TLS) Protocol
      version 1.0 <xref target="RFC2246"/> or its successors (such as TLS 1.1
      <xref target="RFC4346"/>), using the latest version supported by both parties,
      MUST be used to provide integrity, confidentiality, and mutual strong
      client-server authentication. Implementations of TLS often contain a weak
      cryptographic mode that SHOULD NOT be used to protect EPP.  Clients and
      servers desiring high security SHOULD instead use TLS with cryptographic
      algorithms that are less susceptible to compromise.</t>

      <t>Mutual client and server authentication using the TLS Handshake
      Protocol is REQUIRED.  Signatures on the complete certification path
      for both client machine and server machine MUST be validated as part
      of the TLS handshake. Information included in the client and server
      certificates, such as validity periods and machine names, MUST also
      be validated.  A complete description of the issues associated with
      certification path validation can be found in RFC 3280 <xref target="RFC3280"/>.
      EPP service MUST NOT be granted until successful completion of a TLS
      handshake and certificate validation, ensuring that both the client
      machine and the server machine have been authenticated and cryptographic
      protections are in place.</t>

      <t>Authentication using the TLS Handshake Protocol confirms the identity
      of the client and server machines.  EPP uses an additional client
      identifier and password to identify and authenticate the client's
      user identity to the server, supplementing the machine authentication
      provided by TLS.  The identity described in the client certificate and
      the identity described in the EPP client identifier can differ, as a
      server can assign multiple user identities for use from any particular
      client machine.  Acceptable certificate identities MUST be negotiated
      between client operators and server operators using an out-of-band
      mechanism.  Presented certificate identities MUST match negotiated
      identities before EPP service is granted.</t>

      <t>There is a risk of login credential compromise if a client does not
      properly identify a server before attempting to establish an EPP session.
      Before sending login credentials to the server, a client needs to confirm
      that the server certificate received in the TLS handshake is an expected
      certificate for the server.  A client also needs to confirm that the
      greeting received from the server contains expected identification
      information.  After establishing a TLS session and receiving an EPP
      greeting on a protected TCP connection, clients MUST compare the
      certificate subject and/or subjectAltName to expected server identification
      information and abort processing if a mismatch is detected.  If certificate
      validation is successful, the client then needs to ensure that the
      information contained in the received certificate and greeting is consistent
      and appropriate.  As described above, both checks typically require an
      out-of-band exchange of information between client and server to identify
      expected values before in-band connections are attempted.</t>

      <t>EPP TCP servers are vulnerable to common TCP denial-of-service
      attacks including TCP SYN flooding.  Servers SHOULD take steps to
      minimize the impact of a denial-of-service attack using combinations
      of easily implemented solutions, such as deployment of firewall
      technology and border router filters to restrict inbound server
      access to known, trusted clients.</t>
    </section>

    <section title="Acknowledgements">
      <t>This document was originally written as an individual submission
      Internet-Draft.  The PROVREG working group later adopted it as a
      working group document and provided many invaluable comments and
      suggested improvements.  The author wishes to acknowledge the efforts
      of WG chairs Edward Lewis and Jaap Akkerhuis for their process and
      editorial contributions.</t>

      <t>Specific suggestions that have been incorporated into this document
      were provided by Chris Bason, Randy Bush, Patrik Faltstrom, Ned
      Freed, James Gould, Dan Manley, and John Immordino.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      &rfc0793;
      &rfc2119;
      &rfc2246;
<!--      &I-D.hollenbeck-epp-rfc3730bis; -->
<reference anchor='RFC4930'>
<front>
<title>Extensible Provisioning Protocol (EPP)</title>

<author initials='S' surname='Hollenbeck' fullname='Scott Hollenbeck'>
    <organization />
</author>

<date month='May' year='2007'/>

<abstract><t>This document describes an application layer client-server protocol for the pr\
ovisioning and management of objects stored in a shared central repository. Specified in XM\
L, the protocol defines generic object management operations and an extensible framework th\
at maps protocol operations to objects. This document includes a protocol specification, an\
 object mapping template, and an XML media type registration. This document obsoletes RFC 3\
730 if approved.</t></abstract>

</front>

<seriesInfo name='RFC' value='4930' />

</reference>


    </references>

    <references title="Informative References">
      &rfc2581;
      &rfc2914;
      &rfc3280;
      &rfc3734;
      &rfc4346;
    </references>

<?rfc needLines="100"?>
    <section title="Changes from RFC 3734">
      <t><list style="numbers">
        <t>Minor reformatting as a result of converting I-D source format from nroff to XML.
        <vspace blankLines="1"/>
        </t>

        <t>Updated Security Considerations to include strong authentication among the list of needed
        security services.  Removed paragraph describing replay attacks because it's not specific
        to TCP.  New text has been added to RFC 4930 to describe this issue.
        <vspace blankLines="1"/>
        </t>

        <t>Modified description of TCP operation as a result of IESG evaluation.
        <vspace blankLines="1"/>
        </t>

        <t>Moved RFCs 2581 and 2914 from the normative reference section to the informative
        reference section.
        <vspace blankLines="1"/>
        </t>

        <t>Added informative references to RFCs 3280 and 4346 and descriptive text for each as a
        result of IESG evaluation.
        <vspace blankLines="1"/>
        </t>

        <t>Revised security considerations as a result of IESG evaluation.
        <vspace blankLines="1"/>
        </t>

        <t>Updated EPP references.</t>
      </list></t>
    </section>
  </back>
</rfc>
