<?xml version="1.0" encoding="utf-8"?>

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
        <!ENTITY rfc2119 PUBLIC ""
          "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
        <!ENTITY rfc3688 PUBLIC ""
          "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3688.xml">
        <!ENTITY rfc5486 PUBLIC ""
          "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5486.xml">
         <!ENTITY rfc5246 PUBLIC ""
          "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5246.xml">
        <!ENTITY rfc2617 PUBLIC ""
          "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2617.xml">
        <!ENTITY rfc2616 PUBLIC ""
          "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2616.xml">
        <!ENTITY rfc2818 PUBLIC ""
          "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2818.xml">
        <!ENTITY rfc5321 PUBLIC ""
          "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5321.xml">
]>


<rfc category="std" docName="draft-marrache-drinks-spp-protocol-rest-01"  ipr="trust200902">

<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>
<?rfc iprnotified="no" ?>
<?rfc strict="yes" ?>

<front>
    <title abbrev="draft-marrache-drinks-spp-protocol-rest">Session Peering Provisioning (SPP) Protocol over REST</title>
    <author initials='M.M.' surname="Marrache" fullname="Mickael Marrache">
      <organization>Jerusalem College of Technology</organization>
      <address>
        <postal>
          <street>Havaad Haleumi St. 21</street>
          <city>Jerusalem</city> 
		  <region></region> 
          <code>91160</code>
          <country>Israel</country>
        </postal>
      <email>mickaelmarrache@gmail.com</email>
    </address>
  </author>
  <author initials="D.S." surname="Schwartz" fullname="David Schwartz">
    <organization>XConnect</organization>
	<address>
	  <postal>
	    <street>316 Regents Park Road</street>
		<city>London</city>
		<region> </region>
		<code>N3 2XJ</code>
		<country>United Kingdom</country>
       </postal>
	   <email>dschwartz@xconnect.net</email>
	  </address>
	</author>
  <author initials="S.A." surname="Ali" fullname="Syed Wasim Ali">
   <organization>NeuStar</organization>
   <address>
    <postal>
     <street>46000 Center Oak Plaza</street>
     <city>Sterling</city>
     <region>VA</region>
     <code>20166</code>
     <country>USA</country>
    </postal>
    <email>syed.ali@neustar.biz</email>
   </address>
  </author>

    <date year="2012" month="October"/>

    <area>Real-time Applications and Infrastructure Area</area>

    <workgroup>DRINKS</workgroup>
    
    <abstract>
      <t>
	  The Session Peering Provisioning Framework (SPPF) is a framework 
	  that exists to enable the provisioning of session establishment data into  
	  Session Data Registries or SIP Service Provider data stores. This SPP Protocol
	  implementation follows the REST architectural principles over HTTP to allow efficient provisioning of session establishment data. 
	  The benefits include inter alia better performances under high loads through the use of HTTP caches and proxies and less coupling between clients and servers.
	  This document describes the specification of a protocol for transporting SPPF structures over HTTP(s) following REST architectural principles.
	  </t>
    </abstract>
</front>

<middle>
	<section title="Introduction">
      <t>
	  TBD
	  </t>
	</section>
  
    <section anchor="Terminology" title="Terminology">
      <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 anchor="ProtocolArchitecture" title="Protocol Architecture">
	  <t>The following figure illustrates the technical architecture of the RESTful SPP Protocol:</t>
	  <figure anchor="TechnicalArchitectureofSPPP" 
	    title="Layering and Technical Architecture of the RESTful SPP Protocol">
        <artwork align="left"><![CDATA[
                    +-------------+
                (1) |  Transport  |Example:
                    |   Protocol  |  TCP, TLS, BEEP, etc.
                    +-------------+
                           |
                           V
                    +-------------+
                    |     HTTP    |
                    |             |
                    +-------------+
            (2)            |
               +-----------------------+								 
               |                       |
               V                       V
      +----------------+       +----------------+
      | HTTP Request   |   OR  | HTTP Response  |
      |                |       |                |
      +----------------+       +----------------+
       Carries |               Carries  |
               V                        V
        +-------------+          +-------------+
 (3)    |    SPPF     |          |    SPPF     |
        |    Types    |          |    Types    |
        +-------------+          +-------------+
        ]]></artwork>
     </figure>
	 
	 <t>RESTful SPP Protocol is supported by different technologies accross multiple layers as follows:</t>
	 
	 <t>
	 <list style="empty">
       <t>Layer 3: This is the data layer in which are defined the SPPF objects transported by the protocol between the involved components. These objects are defined in <xref target="I-D.draft-ietf-drinks-spp-framework"/>.</t>
	   <t>Layer 2: The application protocol layer uses HTTP to allow clients perform the operations defined in the framework document. These operations are mostly provisioning operations. A client initiates an operation by sending an HTTP request to a server. Then, an HTTP response indicating the results of the operation is sent back by the server to the client. SPPF objects defined in the layer above are eventually carried by these HTTP messages.</t>
	   <t>Layer 1: The transport protocol layer represents the
       communication mechanism between the client and server. SPPF can
       be layered over any transport protocol that provides a set of
       basic requirements defined in the Transport Protocol Requirements
       section. But this document specifies the required mechanism.</t>
	 </list>
	 </t>
	 
	 <t>SPPF is a request/reply framework that allows a client application to submit 
	  provisioning data and query requests to a server. The SPPF data structures are designed
      to be protocol agnostic. Concerns regarding encryption, non-repudiation, and authentication
	  are beyond the scope of this document. For more details, please refer to the
      "Transport Protocol Requirements" section in the framework document.</t>
	</section>
	
	<section anchor="ArchPrinciples" title="Architectural Principles">
	  <section anchor="HTTP" title="Use of HTTP">
	    <t>HTTP(s) is the application protocol used by RESTful web services.
	    HTTP 1.1 includes the &quot;persistent connection&quot; feature, 
	    which allows multiple HTTP request/response pairs to be transported 
        across a single HTTP connection.  This is an important performance 
        optimization feature, particularly when the connection is an HTTPS 
        connection where the relatively time consuming SSL handshake has occurred.  
        Persistent connections SHOULD be used for the SPPF HTTP connections.</t> 
	    <t>HTTP 1.1 <xref target="RFC2616"/> or higher SHOULD be used.</t>
	  </section>
	  
	  <section anchor="SPPFObjectsAsResources" title="SPPF Objects as Resources">
	    <t>As mentioned in the previous section, the application protocol used by this protocol implementation is HTTP. Since HTTP has been conceived to operate on resources exposed on the web, the SPPF objects need to be exposed as resources. The SPPF objects then become available to clients for performing operations defined in the framework document.</t>
		<t>Each resource exposed on the web is identified by a Uniform Resource Identifier (URI). Therefore, a URI is defined for each SPPF object. In order to be able to identify uniquely an SPPF object, the corresponding URI must include the attributes of a candidate key for this SPPF object. The attributes that form the key of each SPPF object are specified in the framework document. These attributes are included in the URI as path parameters.</t>
		
		<section anchor="ServiceURI" title="Service (Root) URI">
		 <t>In the next sections, the service URI may be used. It is the root URI where the RESTful service is located.</t>
		</section>
		
		<section anchor="ResourcesUri" title="Resources URI">
		
		<t>In order to provide a URI for each SPPF object, a URI template is defined for each one of them. The URI templates defined in the following sub-sections are relative to the service URI defined in the Service URI section.</t>
		
		<section anchor="dguri" title="Destination Group">
	      <t>As mentioned in the framework document, a destination group is uniquely identified by the following 
          attributes: the registrant and the destination group's name. Therefore, the destination group resources are identified by the following URI template:</t>
		
		  <t>/{rant}/DG/{name}</t>
		  
		  <t>where:</t>
		  <t>
		    <list style="symbols">
			  <t>rant: registrant organization of the destination group.</t>
			  <t>name: destination group's name.</t>
			</list>
		  </t>
	    </section>
		
		<section anchor="tnuri" title="Telephone Number">
	      <t>As mentioned in the framework document, a telephone number (TN) is uniquely identified by the following 
          attributes: the registrant, the name of the associated destination group if there is, and the telephone
		  number. Therefore, the telephone number resources are identified by the following URI template:</t>
		
		  <t>/{rant}/TN/{dgName};{tn}</t>
		  
		  <t>where:</t>
		  <t>
		    <list style="symbols">
			  <t>rant: registrant organization of the telephone number.</t>
			  <t>dgName: name of the associated destination group.</t>
			  <t>tn: telephone number.</t>
			</list>
		  </t>
	    </section>
		
		<section anchor="tnpuri" title="Telephone Number Prefix">
	      <t>As mentioned in the framework document, a telephone number prefix (TNP) is uniquely identified by the following 
          attributes: the registrant, the name of the associated destination group if there is, and the telephone
		  number prefix. Therefore, the telephone number prefix resources are identified by the following URI template:</t>
		
		  <t>/{rant}/TNP/{dgName};{prefix}</t>
		  
		  <t>where:</t>
		  <t>
		    <list style="symbols">
			  <t>rant: registrant organization of the telephone number prefix.</t>
			  <t>dgName: name of the associated destination group.</t>
			  <t>prefix: telephone number prefix.</t>
			</list>
		  </t>
	    </section>
		
		<section anchor="tnruri" title="Telephone Number Range">
	      <t>As mentioned in the framework document, a telephone number range (TNR) is uniquely identified by the following 
          attributes: the registrant, the name of the associated destination group if there is, the telephone
		  that starts the range and the one that ends the range. Therefore, the telephone number range resources are identified by the following URI template:</t>
		
		  <t>/{rant}/TNR/{dgName};{startTn};{endTn}</t>
		  
		  <t>where:</t>
		  <t>
		    <list style="symbols">
			  <t>rant: registrant organization of the telephone number range.</t>
			  <t>dgName: name of the associated destination group.</t>
			  <t>startTn: first telephone number of the range.</t>
			  <t>endTn: last telephone number of the range.</t>
			</list>
		  </t>
	    </section>
		
		<section anchor="rnuri" title="Routing Number">
	      <t>As mentioned in the framework document, a routing number is uniquely identified by the following 
          attributes: the registrant, the name of the associated destination group if there is, and the routing
		  number. Therefore, the routing number	resources are identified by the following URI template:</t>
		
		  <t>/{rant}/RN/{dgName};{rn}</t>
		  
		  <t>where:</t>
		  <t>
		    <list style="symbols">
			  <t>rant: registrant organization of the routing number.</t>
			  <t>dgName: name of the associated destination group.</t>
			  <t>rn: routing number.</t>
			</list>
		  </t>
	    </section>
		
		<section anchor="uripubiduri" title="URI Public Identifier">
	      <t>As mentioned in the framework document, a public identifier URI is uniquely identified by the following 
          attributes: the registrant, the name of the associated destination group if there is, and the URI. Therefore, the public identifier URI resources are identified by the following URI template:</t>
		
		  <t>/{rant}/URI/{dgName};{uri}</t>
		  
		  <t>where:</t>
		  <t>
		    <list style="symbols">
			  <t>rant: registrant organization of the public identifier URI.</t>
			  <t>dgName: name of the associated destination group.</t>
			  <t>uri: URI.</t>
			</list>
		  </t>
	    </section>
		
		<section anchor="sedgrpuri" title="SED Group">
	      <t>As mentioned in the framework document, a SED Group is uniquely identified by the following 
          attributes: the registrant and the SED Group's name. Therefore, the SED Group resources are identified by the following URI template:</t>
		
		  <t>/{rant}/SG/{name}</t>
		  
		  <t>where:</t>
		  <t>
		    <list style="symbols">
			  <t>rant: registrant organization of the SED Group.</t>
			  <t>name: SED Group's name.</t>
			</list>
		  </t>
	    </section>
		
		<section anchor="sedrecuri" title="SED Record">
	      <t>As mentioned in the framework document, a SED Record is uniquely identified by the following 
          attributes: the registrant and the SED Record's name. Therefore, the SED Record resources are identified by the following URI template:</t>
		
		  <t>/{rant}/SR/{name}</t>
		
		  <t>where:</t>
		  <t>
		    <list style="symbols">
			  <t>rant: registrant organization of the SED Record.</t>
			  <t>name: SED Record's name.</t>
			</list>
		  </t>
		  
		  <t>Note that there is no need to use one URI template per subtype of Sed Record since they are all identified by the same attributes.</t>
	    </section>
		
		<section anchor="sedgrpofferuri" title="SED Group Offer">
	      <t>As mentioned in the framework document, a SED Group Offer is uniquely identified by the following 
          attributes: the offering registrant (i.e. the registrant of the offered SED Group), the name of the offered SED Group and the registrant to which the SED Group is offered. Therefore, the SED Group Offer resources are identified by the following URI template:</t>
		
		  <t>/{rant}/SGOffer/{sedGrpName};{offeredTo}</t>
		  
		  <t>where:</t>
		  <t>
		    <list style="symbols">
			  <t>rant: offering registrant organization.</t>
			  <t>sedGrpName: offered SED Group's name.</t>
			  <t>offeredTo: organization to which the SED Group is offered.</t>
			</list>
		  </t>
	    </section>
		
		<section anchor="sgofferaccept" title="SED Group Offer Acceptation">
		  <t>A SED Group Offer may be accepted by the organization to which the SED Group has been offered. The acceptation of a SED Group Offer is represented by an Acceptation resource. An acceptation is identified by the same attributes that identify a SED Group Offer. Therefore, the Acceptation resources are identified by the following URI template:</t>
		  
		  <t>/{rant}/Acceptation/{sedGrpName};{offeredTo}</t>
		  
		  <t>where:</t>
		  <t>
		    <list style="symbols">
			  <t>rant: offering registrant organization.</t>
			  <t>sedGrpName: offered SED Group's name.</t>
			  <t>offeredTo: organization to which the SED Group is offered.</t>
			</list>
		  </t>
		</section>
		
		<section anchor="sgofferreject" title="SED Group Offer Rejection">
		  <t>A SED Group Offer may be rejected by the organization to which the SED Group has been offered. The rejection of a SED Group Offer is represented by a Rejection resource. A Rejection is identified by the same attributes that identify a SED Group Offer. Therefore, the Rejection resources are identified by the following URI template:</t>
		  
		  <t>/{rant}/Rejection/{sedGrpName};{offeredTo}</t>
		  
		  <t>where:</t>
		  <t>
		    <list style="symbols">
			  <t>rant: offering registrant organization.</t>
			  <t>sedGrpName: offered SED Group's name.</t>
			  <t>offeredTo: organization to which the SED Group is offered.</t>
			</list>
		  </t>
		</section>
		
		<section anchor="serverstatusuri" title="Server Status">
	      <t>The Server Status is exposed as a singleton resource. Therefore, there is no need to define a URI template. The resource is identified by the following URI:</t>
		
		  <t>/ServerStatus</t>
		
		  <t>This resource contains information about the server as described later.</t>
	    </section>
		</section>
		
		<section anchor="ResourcesRepr" title="Resources Representations">
	      <t>For some operations defined by SPPF, resource representations may be present in the HTTP messages. When this is the case, the resource representation is carried in the HTTP message's body. A resource may have many available representations when each one may use a specific format (e.g. XML, JSON).</t>
		  <t>Therefore, HTTP messages that carry resource representations MUST have their Content-Type HTTP header set to the appropriate media type.</t>
	    </section>
	  </section>
	  
	  <section anchor="httpverbs" title="HTTP methods and operations mapping">
		  <t>Most operations exposed by this protocol implementation are regular CRUD operations on resources. As mentioned earlier, an operation on a resource is initiated by a client when he sends an HTTP request that targets the resource's URI. In order to indicate the desired operation to perform on a given resource, a client selects one of the following HTTP methods:</t>
		  <t>
		    <list style="symbols">
		      <t>GET : Retrieve a representation of the resource identified by the URI present in the HTTP request.</t>
		      <t>PUT : If no resource is associated to the URI present in the HTTP request, create the resource using the representation provided in the HTTP request's body, and associate the resource to the URI. Otherwise, update the resource using the provided representation. Since the URI of a non existing resource is known by the client before creation (because the values of the attributes that form the key are known by the client before creation), this HTTP method is also used to create resources (instead of POST).</t>
		      <t>DELETE : Delete the resource identified by the URI present in the HTTP request.</t>
		    </list>
		  </t>
		  
		  <t>Note that not all HTTP methods are allowed on a given resource. For example, a resource may be exposed for read only. In such case, the only HTTP method that is allowed for this resource is GET. The resources that may be targetted by each one of the operations defined above, are as follows:
		  <list style="symbols">
		    <t>GET : allowed for all resources but the SED Group Offer Acceptations and Rejections resources.</t>
			<t>PUT : allowed for all resources but the Server Status resource.</t>
			<t>DELETE : allowed for all resources but the SED Group Offer Acceptations, Rejections and Server Status resources.</t>
		  </list>
		  </t>
		</section>
	</section>
	
    <section anchor="AuthenticationSessionManagement" title="Authentication and Session Management">
      <t>To achieve integrity and privacy, conforming SPP Protocol Clients and Servers MUST support HTTP over TLS <xref target="RFC5246"/> as the secure transport mechanism.  This combination of HTTP and TLS is referred to as HTTPS.  And to accomplish authentication, conforming SPPF Clients and Servers MUST use HTTP Digest Authentication as defined in <xref target="RFC2617"/>.  As a result, the communication session is established through the initial HTTP connection setup, the digest authentication, and the TLS handshake.  When the HTTP connection is broken down, the communication session ends.</t>
    </section>
       
    <section anchor="requestandresponse" title="Operation Request and Response Structures">
      <t> An SPPF client interacts with an SPPF server by using one of the supported transport 
	  mechanisms to send one or more requests to the server and receive corresponding replies from
      the server.  The basic set of operations that an SPPF client can submit to an SPPF server and 
	  the semantics of those operations are defined in the "Framework Operations" section of the 
	  framework document.  The following sub-sections describe how these operations should be performed
	  in the context of this protocol implementation.</t>
         
      <section anchor="addsandmods" title="Add Operation Structure">
        <t>In order to add (update) an object to (present in) the registry, an authorized
		entity sends an add (update) request to the registry. This request consists of an HTTP PUT request
		on the URI that identifies the resource to add (update). The representation of the resource to add (update) is carried in the 
		HTTP request's body. After the operation is performed, the registry sends back 
		an HTTP response to the client indicating if the request has been performed successfully, and if not, 
		the reason of the failure. The following sub-sections describe the expected format of the 
		HTTP requests and responses.</t>
   
        <section anchor="addrqst" title="Add Request">
          <t>The format of an HTTP request used to add (update) an SPPF object to (present in) the registry
		  is as follows:</t>
          <t>
            <figure title="">
              <artwork align="left">
                <![CDATA[
PUT ${ResourceURI}[?clientTransId=${clientTransId}] HTTP/1.1
.....
[minorVer: ${minorVer}]
Content-Type: ?
Content-Length: ?

${ResourceRepresentation}
                 ]]>
              </artwork>
            </figure>
          </t>
        
          <t>The data elements within the HTTP PUT request are described as follows: 
			  <list style="symbols" hangIndent="5">
			    <t>ResourceURI: The relative URI of the resource targeted by the HTTP PUT request. 
				See the Resources URI section.</t>
				<t>clientTransId: An optional query parameter representing a client-generated transaction ID
				that, within the context of the SPPF client, identifies this 
				request. This value can be used at the discretion of the SPPF 
				client to track, log or correlate requests and their responses. 
				SPPF server MUST echo back this value to the client in the 
				corresponding response to the incoming request. SPPF server will
				not check this value for uniqueness.</t>
				<t>minorVer: An optional header parameter representing a minor version identifier, indicating the minor  
				version of the SPPF API that the client is attempting to use. This is
				used in conjunction with the major version identifier in the XML namespace
				to identify the version of SPPF that the client is using. If the element is 
				not present, the server assumes that the client is using the latest minor 
				version supported by the SPPF server for the given major version. The versions
				supported by a given SPPF server can be retrieved by the client using the 
				SPPF server menu operation described later in the document.</t>
				<t>ResourceRepresentation: The representation of the resource to add (update).</t>
			  </list>
          </t>
        </section>
 
        <section anchor="addresponse" title="Add Response">
          <t>The format of an HTTP response to an add (update) request is as follows:</t>
          <t>
            <figure title="">
              <artwork align="left">
                <![CDATA[
HTTP/1.1 ${StatusCode}
....
[clientTransId: ${clientTransId}]
serverTransId: ${serverTransId}]
Content-Length: 0
                ]]>
              </artwork>
            </figure>
          </t>

          <t> The data elements within the HTTP PUT response are described as follows:
		    <list style="symbols" hangIndent="5">
			  <t>StatusCode: One of the available HTTP status codes indicating the result of the request. See Response Codes and Messages section.</t>
              <t>clientTransId: A header parameter representing the client transaction ID of the
			  corresponding HTTP request, if provided. This value is simply an echo of the client
			  transaction ID that SPPF client passed into the SPPF request. When included 
              in the request, the SPPF server MUST return it in the corresponding
              response message.</t>
              <t>serverTransId: A header parameter representing the server transaction ID that
              identifies this request for tracking purposes. This
              value MUST be unique for a given SPPF server.</t>
            </list>
          </t>  
        </section>
	  </section>

      <section anchor="dels" title="Delete Operation Structure">
     	 <t>In order to remove an object from the registry, an authorized entity
         sends a delete request to the registry. This request consists of an HTTP DELETE request
		 on the URI that identifies the resource to delete. The body of the HTTP request is empty
		 since the resource to delete is uniquely identified by the URI included in the request.
		 After the operation is performed, the registry sends back an HTTP response to the client
		 indicating if the request has been performed successfully, and if not, the reason of the failure.
         The following sub-sections describe the expected format of the HTTP requests and responses.</t>

         <section anchor="delrqst" title="Delete Request">
           <t>The format of an HTTP request used to delete an SPPF object from the registry
		   is as follows:</t>
           <t>
             <figure title="">
               <artwork align="left">
                 <![CDATA[
DELETE ${ResourceURI}[?clientTransId=${clientTransId}] HTTP/1.1
.....
[minorVer: ${minorVer}]
Content-Length: 0
                 ]]>
               </artwork>
             </figure>
           </t>
        
           <t>The data elements within the HTTP DELETE request are described as follows: 
             <list style="symbols" hangIndent="5">
			   <t>ResourceURI: The relative URI of the resource targeted by the HTTP DELETE request. 
				See the Resources URI section.</t>
               <t>clientTransId: An optional query parameter representing a client-generated transaction ID
			   that, within the context of the SPPF client, identifies this 
			   request. This value can be used at the discretion of the SPPF 
			   client to track, log or correlate requests and their responses. 
			   SPPF server MUST echo back this value to the client in the 
			   corresponding response to the incoming request. SPPF server will
			   not check this value for uniqueness.</t>
			   <t>minorVer: An optional header parameter representing a minor version identifier, indicating the minor  
			   version of the SPPF API that the client is attempting to use. This is
			   used in conjunction with the major version identifier in the XML namespace
			   to identify the version of SPPF that the client is using. If the element is 
			   not present, the server assumes that the client is using the latest minor 
			   version supported by the SPPF server for the given major version. The versions
			   supported by a given SPPF server can be retrieved by the client using the 
			   SPPF server menu operation described later in the document.</t>
             </list>
           </t>
         </section>
        
		 <section anchor="delresponse" title="Delete Response">
           <t>The format of an HTTP response to a delete request is as follows:</t>
           <t>
             <figure title="">
               <artwork align="left">
                 <![CDATA[
HTTP/1.1 ${StatusCode}
....
[clientTransId: ${clientTransId}]
serverTransId: ${serverTransId}]
Content-Length: 0
                 ]]>
               </artwork>
             </figure>
           </t>
		  
           <t>The data elements within the HTTP DELETE response are described as follows: 
		     <list style="symbols" hangIndent="5">
			   <t>StatusCode: One of the available HTTP status codes indicating the result of the request. See Response Codes and Messages section.</t>
               <t>clientTransId: A header parameter representing the client transaction ID of the
			   corresponding HTTP request, if provided. This 
               value is simply an echo of the client transaction ID that 
               SPPF client passed into the SPPF request. When included 
               in the request, the SPPF server MUST return it in the corresponding
               response message.</t>
               <t>serverTransId: A header parameter representing the server transaction ID that
               identifies this request for tracking purposes. This
               value MUST be unique for a given SPPF server.</t>
             </list>
           </t>  
         </section>
		 </section>
        
       <section anchor="accepts" title="Accept Operation Structure">
         <t>In SPPF, a SED Group Offer can be accepted or rejected by, or on behalf of, the registrant to 
         whom the SED Group has been offered (refer "Framework Data Model Objects" section of the framework
		 document for a description of the SED Group Offer object). The Accept operation is used to accept 
		 such SED Group Offers by, or on behalf of, the Registrant. This request consists of an HTTP PUT request
		 on the URI that identifies the Acceptation resource for the concerned SED Group Offer.
		 After the operation is performed, the registry sends back an HTTP response to the client
		 indicating if the request has been performed successfully, and if not, the reason of the failure.
         The following sub-sections describe the expected format of the HTTP requests and responses.</t>

         <section anchor="acceptrqst" title="Accept Request Structure">
           <t>The format of an HTTP request used to accept a SED Group Offer is as follows:</t>
           <t>
             <figure title="">
               <artwork align="left">
                 <![CDATA[
PUT ${AcceptationURI}[?clientTransId=${clientTransId}] HTTP/1.1
.....
[minorVer: ${minorVer}]
Action: Accept
Content-Length: 0
                 ]]>
               </artwork>
             </figure>
           </t>
		   
           <t>The data elements within the HTTP PUT request are described as follows: 
             <list style="symbols" hangIndent="5">
			   <t>AcceptationURI: The relative URI of the Acceptation resource targeted by the HTTP PUT request. 
				See the Resources URI section.</t>
               <t>clientTransId: An optional query parameter representing a client-generated transaction ID
               that, within the context of the SPPF client, identifies this 
               request. This value can be used at the discretion of the SPPF 
               client to track, log or correlate requests and their responses.
			   SPPF server MUST echo back this value to the client in the corresponding
			   response to the incoming request. SPPF server will not check this 
			   value for uniqueness.</t>
               <t>minorVer: An optional header parameter representing a minor version identifier, indicating the minor  
               version of the SPPF API that the client is attempting to use. This is
               used in conjunction with the major version identifier in
               the XML namespace to identify the version of SPPF that the client 
               is using.  If the element is not present, the server assumes that 
               the client is using the latest minor version supported by the SPPF
               server for the given major version. The versions supported by a 
               given SPPF server can be retrieved by the client using the 
               SPPF server menu operation described later in the document.</t>
             </list>
           </t>
         </section>
           
		 <section anchor="acceptresponse" title="Accept Response">
          <t>The format of an HTTP response to an Accept request is as follows:</t>
          <t>
            <figure title="">
              <artwork align="left">
                <![CDATA[
HTTP/1.1 ${StatusCode}
....
[clientTransId: ${clientTransId}]
serverTransId: ${serverTransId}]
Content-Length: 0
                ]]>
              </artwork>
            </figure>
          </t>

          <t>The data elements within the HTTP PUT response are described as follows:
		    <list style="symbols" hangIndent="5">
			  <t>StatusCode: One of the available HTTP status codes indicating the result of the request. See Response Codes and Messages section.</t>
              <t>clientTransId: A header parameter representing the client transaction ID of the
			   corresponding HTTP request, if provided. This 
              value is simply an echo of the client transaction ID that 
              SPPF client passed into the SPPF request. When included 
              in the request, the SPPF server MUST return it in the corresponding
              response message.</t>
              <t>serverTransId: A header parameter representing the server transaction ID that
              identifies this request for tracking purposes. This
              value MUST be unique for a given SPPF server.</t>
            </list>
          </t>
         </section>
	   </section>
        
	   <section anchor="rejects" title="Reject Operation Structure">
         <t>In SPPF, a SED Group Offer can be accepted or rejected by, or on behalf of, the registrant to 
         whom the SED Group has been offered (refer "Framework Data Model Objects" section of the
		 framework document for a description of the SED Group Offer object). The Reject operation is
		 used to reject such SED Group Offers by, or on behalf of, the Registrant. 
		 This request consists of an HTTP PUT request on the URI that identifies the Rejection resource for the concerned SED Group Offer.
		 After the operation is performed, the registry sends back an HTTP response to the client
		 indicating if the request has been performed successfully, and if not, the reason of the failure.
         The following sub-sections describe the expected format of the HTTP requests and responses.</t>
         
		 <section anchor="rejectrqst" title="Reject Request">
           <t>The format of an HTTP request used to reject a SED Group Offer is as follows:</t>
           <t>
             <figure title="">
               <artwork align="left">
                 <![CDATA[
PUT ${RejectionURI}[?clientTransId=${clientTransId}] HTTP/1.1
.....
[minorVer: ${minorVer}]
Action: Reject
Content-Length: 0          
                 ]]>
               </artwork>
             </figure>
           </t>
		   
           <t>The data elements within the HTTP PUT request are described as follows: 
             <list style="symbols" hangIndent="5">
			   <t>RejectionURI: The relative URI of the Rejection resource targeted by the HTTP PUT request. 
				See the Resources URI section.</t>
               <t>clientTransId: An optional query parameter representing a client-generated transaction ID
               that, within the context of the SPPF client, identifies this 
               request. This value can be used at the discretion of the SPPF 
               client to track, log or correlate requests and their responses. 
			   SPPF server MUST echo back this value to the client in the corresponding
			   response to the incoming request. SPPF server will not check this value for uniqueness.</t>
               <t>minorVer: An optional header parameter representing a minor version identifier, indicating the minor  
               version of the SPPF API that the client is attempting to use. This is
               used in conjunction with the major version identifier in
               the XML namespace to identify the version of SPPF that the client 
               is using.  If the element is not present, the server assumes that 
               the client is using the latest minor version supported by the SPPF
               server for the given major version. The versions supported by a 
               given SPPF server can be retrieved by the client using the 
               SPPF server menu operation described later in the document.</t>
             </list>
           </t>
         </section>
                  
	     <section anchor="rejectresponse" title="Reject Response">
           <t>The format of an HTTP response to a reject request is as follows:</t>
           <t>
             <figure title="">
               <artwork align="left">
                 <![CDATA[
HTTP/1.1 ${StatusCode}
....
[clientTransId: ${clientTransId}]
serverTransId: ${serverTransId}]
Content-Length: 0
                 ]]>
               </artwork>
             </figure>
           </t>

           <t>The data elements within the HTTP PUT response are described as follows:
		     <list style="symbols" hangIndent="5">
			   <t>StatusCode: One of the available HTTP status codes indicating the result of the request. See Response Codes and Messages section.</t>
               <t>clientTransId: A header parameter representing the client transaction ID of the
			   corresponding HTTP request, if provided. This 
               value is simply an echo of the client transaction ID that 
               SPPF client passed into the SPPF request. When included 
               in the request, the SPPF server MUST return it in the corresponding
               response message.</t>
               <t>serverTransId: A header parameter representing the server transaction ID that
               identifies this request for tracking purposes. This
               value MUST be unique for a given SPPF server.</t>
             </list>
           </t>
         </section>
		 </section>
        
       <section anchor="gets" title="Get Operation Structure">
         <t>In order to query the details of an object from the Registry, an authorized entity
         sends a get request to the registry. This request consists of an HTTP GET request
		 targetting the URI that identifies the queried resource.
		 After the operation is performed, the registry sends back an HTTP response to the client
		 indicating if the request has been performed successfully, and if not, the reason of the failure.
		 Moreover, if the queried object is found in the registry, the HTTP response's body contains
		 the representation of the result object.
         The following sub-sections describe the expected format of the HTTP requests and responses.</t>
         
		 <section anchor="getreq" title="Get Request">
		   <t>The format of an HTTP request used to get an SPPF object is as follows:</t>		 
           <t>
             <figure title="">
               <artwork align="left">
                 <![CDATA[
GET ${ResourceURI} HTTP/1.1
.....
[minorVer: ${minorVer}]
Content-Length: 0
                 ]]>
               </artwork>
             </figure>
           </t>
		   
           <t>The data elements within the HTTP GET request are described as follows: 
             <list style="symbols" hangIndent="5">
			   <t>ResourceURI: The relative URI of the resource targeted by the HTTP GET request. 
				See the Resources URI section.</t>
               <t>minorVer: An optional header parameter representing a minor version identifier, indicating the minor  
               version of the SPPF API that the client is attempting to use. This is
               used in conjunction with the major version identifier in
               the XML namespace to identify the version of SPPF that the client 
               is using. If the element is not present, the server assumes that 
               the client is using the latest minor version supported by the SPPF
               server for the given major version. The versions supported by a 
               given SPPF server can be retrieved by the client using the 
               SPPF server menu operation described later in the document.</t>
             </list>
           </t>
         </section>

		 <section anchor="getresponse" title="Get Response">
           <t>The format of an HTTP response to a get request is as follows:</t>
		   <t>
             <figure title="">
               <artwork align="left">
                 <![CDATA[
HTTP/1.1 ${StatusCode}
....
Content-Length: ?

${ResourceRepresentation}
                 ]]>
               </artwork>
             </figure>
           </t>
		   
		   <t>The data elements within the HTTP GET response are described as follows:
		     <list style="symbols" hangIndent="5">
			   <t>StatusCode: One of the available HTTP status codes indicating the result of the request. See Response Codes and Messages section.</t>
               <t>ResourceRepresentation: The representation of the queried resource.</t>
             </list>
           </t>
         </section>
		 </section>
		
       <section anchor="getsedgrpoffers" title="Get SED Group Offers Operation Structure">
         <t>In addition to the ability to query the details of one or more SED Group offers using a SED Group Offer key in
		 a Get request, this operation also provides an additional, more flexible, structure to query for SED Group Offer objects.</t>
		 
         <section anchor="getsedgrpoffersrqst" title="Get SED Group Offers Request">
           <t>Using the details passed into this structure, the server will
           attempt to find SED Group Offer objects that satisfy all the criteria passed into the
           request. If no criteria is passed in then the server will
           return the list of SED Group Offer objects that belong to the 
           registrant. If there are no matching SED Group Offers found then an empty result set
           will be returned.</t>
		   <t>The format of an HTTP request used to get SED Group Offers is as follows:</t>		 
           
           <t>
             <figure title="">
               <artwork align="left">
                 <![CDATA[
GET /SEDGrpOffer[?offeredBy=${offeredBy}[&offeredTo=${offeredTo} \
            [&status=${status}]]] HTTP/1.1
.....
[minorVer: ${minorVer}]
Content-Length: 0
                 ]]>
               </artwork>
             </figure>
           </t>
		   
		   <t>The data elements within the HTTP GET request are described as follows: 
             <list style="symbols" hangIndent="5">
               <t>minorVer: An optional header parameter representing a minor version identifier, indicating the minor  
               version of the SPPF API that the client is attempting to use. This is
               used in conjunction with the major version identifier in
               the XML namespace to identify the version of SPPF that the client 
               is using. If the element is not present, the server assumes that 
               the client is using the latest minor version supported by the SPPF
               server for the given major version. The versions supported by a 
               given SPPF server can be retrieved by the client using the 
               SPPF server menu operation described later in the document.</t>
			   <t>offeredBy: An optional query parameter representing one or more comma separated organization IDs. Only offers
               that are offered by the organization IDs
               in this list should be included in the result set. The
               result set is also subject to other query criteria in
               the request.</t>
               <t>offeredTo: An optional query parameter representing one or more comma separated organization IDs. Only offers
               that are offered to the organization IDs
               in this list should be included in the result set. The
               result set is also subject to other query criteria in
               the request.</t>
               <t>status: An optional query parameter representing an offer status (offered or accepted).
               Only offers in the specified status should be included
               in the result set. If this element is not present then
               the status of the offer should not be considered in the
               query. The result set is also subject to other query
               criteria in the request.</t>
			   <t>SedGrpOfferKey: TBD</t>
             </list>
           </t>
         </section>
		 
         <section anchor="getsedgrpoffersresponse" title="Get SED Group Offers Response">
           <t>The format of an HTTP response to a get SED Group Offers request is as follows:</t>
		   <t>
             <figure title="">
               <artwork align="left">
                 <![CDATA[
HTTP/1.1 ${StatusCode}
....
Content-Length: ?

${SEDGrpOffersRepresentation}
                 ]]>
               </artwork>
             </figure>
           </t>
		   
		   <t>The data elements within the HTTP GET response are described as follows:
		     <list style="symbols" hangIndent="5">
			   <t>StatusCode: One of the available HTTP status codes indicating the result of the request. See Response Codes and Messages section.</t>
               <t>SEDGrpOffersRepresentation: TBD.</t>
             </list>
           </t>
         </section>
       </section>
       
       <section anchor="servermenuopn" title="Get Server Details Operation Structure">
         <t>In order to query certain details of the SPPF server, like the SPPF server's status and the major/minor version supported by the server, the Server Details operation structure SHOULD be used.</t>
         
         <section anchor="servermenurqst" title="Get Server Details Request">
		   <t>The format of an HTTP request used to get the server status is as follows:</t>
           <t>
             <figure title="">
               <artwork align="left">
                 <![CDATA[
GET /ServerStatus HTTP/1.1
.....
[minorVer: ${minorVer}]
Content-Length: 0				 
                 ]]>
               </artwork>
             </figure>
           </t>
        
           <t>The data elements within the HTTP GET request are described as follows:
             <list style="symbols" hangIndent="5">
               <t>minorVer: An optional header parameter representing a minor version identifier, indicating the minor  
               version of the SPPF API that the client is attempting to use. This is
               used in conjunction with the major version identifier in
               the XML namespace to identify the version of SPPF that the client 
               is using. If the element is not present, the server assumes that 
               the client is using the latest minor version supported by the SPPF
               server for the given major version. The versions supported by a 
               given SPPF server can be retrieved by the client using the Get Server Status request 
			   without passing in the minorVer element.</t>
             </list>
           </t>
         </section>
        
         <section anchor="servermenuresp" title="Get Server Details Response">
           <t>The format of an HTTP response to a Get Server Status request is as follows:</t>
           <t>
             <figure title="">
               <artwork align="left">
                 <![CDATA[
HTTP/1.1 ${StatusCode}
....
Content-Length: ?

${ServerStatusRepresentation}
                 ]]>
               </artwork>
             </figure>
           </t>
        
           <t>The data elements within the HTTP GET response are described as follows: 
             <list style="symbols" hangIndent="5">
			   <t>StatusCode: One of the available HTTP status codes indicating the result of the request. See Response Codes and Messages section.</t>
               <t>ServerStatusRepresentation: The representation of the Server Status resource.</t>
             </list>
           </t>
         </section>
       </section>
    </section>

    <section anchor="resultcodes" title="Response Codes and Messages">
      <t>HTTP provides a set of status codes that are used to indicate an overall result of the request to the client. This protocol implementation uses the status codes defined in <xref target="RFC2616"/>.</t>
	  
	  <section anchor="generalsc" title="General Status Codes">
	    <t>The following status codes may be returned in the HTTP responses of all operations defined in this document.</t>
		<t>
		  <list style="symbols">
		    <t>200 OK: For an HTTP PUT request, this status code is returned if the resource has been updated. For an HTTP GET or DELETE request, this status code is returned if the operation has been successfully performed.</t>
		    <t>400 Bad Request: This status code is returned if the HTTP request received by the server is invalid.</t>
			<t>401 Unauthorized: This status code is returned when client authentication is required and has failed or has not yet been provided.</t>
			<t>403 Forbidden: This status code is returned when the client is authenticated but not authorized to perform the desired operation.</t>
			<t>405 Method Not Allowed: This status code is returned if the method present in the HTTP request is not allowed for the resource identified by the given URI.</t>
			<t>500 Internal Server Error: This status code is returned if an unexpected internal system or server error happened.</t>
			<t>503 Service Unavailable: This status code is returned if the server is temporarily unable to process incoming HTTP requests.</t>
		  </list>
		</t>
	  </section>
	  
	  <section anchor="putsc" title="HTTP PUT response Status Codes">
	    <t>
		  <list style="symbols">
		    <t>201 Created: This status code is returned if the resource at the specified URI doesn't exist and therefore has been created (instead of updated).</t>
			<t>415 Unsupported Media Type: This status code is returned if the Content-Type header has a value corresponding to a media type not supported by the server.</t>
		  </list>
		</t>
	  </section>
	  
	   <section anchor="deletesc" title="HTTP DELETE response Status Codes">
	    <t>
		  <list style="symbols">
		    <t>404 Not Found: This status code is returned if the resource identified by the given URI doesn't exist and therefore cannot be deleted.</t>
		  </list>
		</t>
	  </section>
	  
	  <section anchor="getsc" title="HTTP GET response Status Codes">
	    <t>
		  <list style="symbols">
		    <t>404 Not Found: This status code is returned if the resource identified by the given URI doesn't exist and therefore cannot be retrieved.</t>
		  </list>
		</t>
	  </section>
    </section>

	<section anchor="protocol_oper" title="Protocol Operations">
      <t>Refer the "Framework Operations" section of the framework document for a description of
	  all SPPF operations, and any necessary semantics that MUST be adhered to in order to conform
	  with the SPPF specification.</t>
    </section>

    <section anchor="SecurityConsiderations" title="Security Considerations">
      <t>RESTful SPP Protocol is used to query and update session peering data and addresses, so
   the ability to access this protocol should be limited to users and
   systems that are authorized to query and update this data.  Because this 
   data is sent in both directions, it may not be sufficient for just the client 
   or user to be authenticated with the server.  The identity of the server 
   should also be authenticated by the client, which is often accomplished using 
   the TLS certificate exchange and validation described in <xref target="RFC2818"/>.  
   SPP Protocol messages may include sensitive information, routing data, lists of
   resolvable addresses, etc. So when used in a production setting and across non-secure 
   networks, SPP Protocol should only be used over communications channels that provide strong 
   encryption for data privacy.</t>

      <section anchor="IntegrityPrivacyAuthentication" title="Integrity, Privacy, and Authentication">
        <t>The RESTful SPP Protocol relies on an underlying secure
        transport for integrity and privacy.  Such transports are expected to
        include TLS/HTTPS.  In addition to the application level
        authentication imposed by an SPPF server, there are a number of
        options for authentication within the transport layer and the
        messaging envelope.  These include TLS client certificates and HTTP
        Digest Access Authentication headers.</t>

        <t>At a minimum, all conforming RESTful SPP Protocol implementations
        MUST support HTTPS.</t>
      </section>

      <section anchor="Vulnerabilities" title="Vulnerabilities">
	   <t>The above protocols may have various vulnerabilities, and these may
	   be inherited by the RESTful SPP Protocol.  RESTful SPP Protocol itself may have vulnerabilities 
	   because an authorization model is not explicitly specified in the current 
	   specification.</t>
	   <t>
	   Sections 5 and 10.1 describe requirements for HTTPS support using TLS.  Non-anonymous TLS servers can optionally request a certificate from a TLS client; 
	   that option is not a requirement for this protocol.  This presents a denial of service risk in which unauthenticated clients can consume server CPU resources by creating TLS sessions. 
	   The risk is increased if the server supports client-initiated renegotiation. This risk can be mitigated by disabling client-initiated renegotiation on the server and by ensuring that other 
	   means (such as firewall access control lists) are used to restrict unauthenticated client access to servers.</t>
	   <t>In conjunction with the above, it is important that REST SPP Protocol implementations implement an authorization 
	   model that considers the source of each query or update request and 
	   determines whether it is reasonable to authorize that source to perform that
	   specific query or update.</t>
      </section>

      <section anchor="DeploymentEnvironmentSpecifics" title="Deployment Environment Specifics">
	   <t>Some deployments of REST SPP Protocol could choose to use transports
	   without encryption.  This presents vulnerabilities but could be
	   selected for deployments involving closed networks or debugging
	   scenarios.  However, the vulnerabilities of such a deployment could be a 
	   lack of integrity and privacy of the data transported in 
	   this type of deployment.</t>
      </section>
    </section>
 
    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>TBD</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
                &rfc2119;
                &rfc3688;
                &rfc5246;
                &rfc2617;
                &rfc2616;
                <reference anchor="I-D.draft-ietf-drinks-spp-framework">
                        <front>
                          <title>Session Peering Provisioning Framework </title>
    					  <author initials="K.C." surname="Cartwright"/>
    					  <author initials="V.B." surname="Bhatia"/>
						  <author initials="S.A." surname="Ali"/>
						  <author initials="D.S." surname="Schwartz"/>
    					
                       <date month="July" year="2012" />
                        </front>
                        <seriesInfo name="Internet-Draft" value="draft-ietf-drinks-spp-framework-02"/>
                        <format target="http://tools.ietf.org/html/draft-ietf-drinks-spp-framework-02" type="HTML" />
                </reference>
    </references>
    
    <references title="Informative References"> 
                &rfc2818;
				<reference anchor='W3C.REC-xml-20081126' target='http://www.w3.org/TR/2008/REC-xml-20081126'>
					<front>
						<title>Extensible Markup Language (XML) 1.0 (Fifth Edition)</title>

						<author initials='C.' surname='Sperberg-McQueen' fullname='C. M. Sperberg-McQueen'>
							<organization />
						</author>

						<author initials='F.' surname='Yergeau' fullname='François Yergeau'>
							<organization />
						</author>

						<author initials='T.' surname='Bray' fullname='Tim Bray'>
							<organization />
						</author>

						<author initials='E.' surname='Maler' fullname='Eve Maler'>
							<organization />
						</author>

						<author initials='J.' surname='Paoli' fullname='Jean Paoli'>
							<organization />
						</author>

						<date month='November' day='26' year='2008' />
					</front>

					<seriesInfo name='World Wide Web Consortium Recommendation' value='REC-xml-20081126' />
					<format type='HTML' target='http://www.w3.org/TR/2008/REC-xml-20081126' />
				</reference>
				<reference anchor='Roy Fielding' 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' fullname='Fielding, Roy Thomas'>
							<organization />
						</author>

						<date month='' day='' year='2000' />
					</front>

					<seriesInfo name='University of California' value='' />
					<format type='HTML' target='http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm' />
				</reference>
    </references>
  </back>
</rfc>