<?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 I-D.barnes-hard-problem SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.barnes-hard-problem.xml">
<!ENTITY I-D.ietf-cdni-redirection SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-cdni-redirection.xml">
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC2818 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2818.xml">
<!ENTITY RFC3444 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3444.xml">
<!ENTITY RFC3466 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3466.xml">
<!ENTITY RFC5246 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5246.xml">
<!ENTITY RFC5424 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5424.xml">
<!ENTITY RFC3568 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3568.xml">
<!ENTITY RFC6770 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6770.xml">
<!ENTITY RFC6707 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6707.xml">
<!ENTITY RFC2629 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2629.xml">
<!ENTITY RFC6698 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6698.xml">
<!--<!ENTITY I-D.draft-mglt-lurk-tls-use-cases SYSTEM "https://tools.ietf.org/id/draft-mglt-lurk-tls-use-cases-00.xml">
<!ENTITY I-D.draft-cairns-tls-session-key-interface SYSTEM "https://www.ietf.org/id/draft-cairns-tls-session-key-interface-01.xml">-->
<!ENTITY I-D.ma-cdni-publisher-use-cases SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ma-cdni-publisher-use-cases.xml">
<!ENTITY I-D.ietf-cdni-requirements SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-cdni-requirements.xml">
<!ENTITY I-D.bertrand-cdni-experiments SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.bertrand-cdni-experiments.xml">
<!ENTITY I-D.ietf-cdni-framework SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-cdni-framework.xml">
<!ENTITY I-D.brandenburg-cdni-has SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.brandenburg-cdni-has.xml">
<!ENTITY I-D.ietf-secsh-filexfer SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-secsh-filexfer.xml">
<!ENTITY I-D.narten-iana-considerations-rfc2434bis SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.barnes-hard-problem.xml">
<!ENTITY I-D.leung-cdni-uri-signing SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.leung-cdni-uri-signing.xml">
<!--!ENTITY I-D.lefaucheur-cdni-logging-delivery SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.lefaucheur-cdni-logging-delivery.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="no" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- Display comments -->
<?rfc comments="no"?>
<!-- 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="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="std" docName="draft-fieau-https-delivery-delegation-02">
  <!-- category values: std, bCSP, 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="HTTPS delivery delegation">HTTPS and delegation of encrypted traffic between interconnected CDNs</title>

    <!-- add 'role="editor"' below for the editors if appropriate -->

    <!-- Another author who claims to be an editor -->

    <author fullname="Frederic Fieau" initials="F." 
            surname="Fieau">
      <organization>Orange</organization>

      <address>
        <postal>
          <street>38-40 rue du G&eacute;n&eacute;ral Leclerc</street>

          <!-- Reorder these if your country does things differently -->

          <city>Issy-les-Moulineaux</city>

          <region></region>

          <code>92130</code>

          <country>FR</country>
        </postal>


        <email>frederic.fieau@orange.com</email>

        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>

   
	



    <date day="21" month="March" year="2016" />

    <!-- If the month and year are both specified and are the current ones, xml2rfc will fill
  in the current day for you. If only the current year is specified, xml2rfc will fill
  in the current day and month for you. If the year is not the current one, it is
  necessary to specify at least a month (xml2rfc assumes day="1" if not specified for the
      purpose of calculating the expiry date).  With drafts it is normally sufficient to
  specify just the year. -->

    <!-- Meta-data Declarations -->

    <area>General</area>

    <workgroup>Internet Engineering Task Force</workgroup>

    <!-- WG name at the upperleft corner of the doc,
  IETF is fine for individual submissions.
  If this element is not present, the default is "Network Working Group",
  which is used by the RFC Editor as a nod to the history of the IETF. -->

    <keyword>CDNI, CDN, Interconnection, HTTPS, delegation</keyword>

    <!-- Keywords will be incorporated into HTML output
  files in a meta tag but they have no effect on text or nroff
  output. If you submit your draft to the RFC Editor, the
  keywords will be used for the search engine. -->

    <abstract>
	<t>
	This document discusses approaches to the issue of correct delegation of the encrypted TLS-based traffic requests between CDNs in inter CDN networks and during interactions between client User Agents (UA), and Content Delivery Networks (CDNs).
	</t>
    </abstract>
	
  </front>
  
	<middle>
 	<section title="Introduction">
	<t>
	In the interconnected CDNs context where CDNs are organized into a hierarchy, an upstream CDN (uCDN) that is not able to deliver the requested content for some reasons, may need to delegate the delivery to a downstream CDN (dCDN). When end-users' connections are transported over TLS, this delivery delegation involves security requirements that are presented in the requirements section.
	</t>
	<t>
	A brief survey indicates that there is a multitude of ad hoc approaches for handling TLS-based traffic in CDN environment. However, many of the currently adopted practices seem to have problems of various nature, inhibiting and compromising security, scalability, and ease of operation and maintenance (see e.g. <xref target="HTTPS-CDN" /> and <xref target="SSL-Challenges" />).	
	</t><t>
	This document is intended as a starting point for discussion. It shall review redirection methods introduced in <xref target="RFC3568" /> used in the Interconnected CDNs use case, their impacts on the security of delegation, and the implications of redirection in a secured web environment. It eventually identifies some workarounds, or solutions to the raised issues. 	
	</t>
	</section>
	
	<section title="Requirements">
	<t>
	A trusted and secured delegation of the delivery of content hosted by an uCDN to a downstream CDN (dCDN) must be guaranteed in the CDN interconnection. Actually, this requirement must entail the following:
	</t>
	<t><list style="symbols"><t>
	Legitimacy of redirection: the uCDN must wilfully designate the dCDN to deliver the requested content to ensure the delegation is legitimate. End-users must be warned about any issues in the delegation process, e.g. bad certificate. This is typically ensured by the browser (or player). 
	<!-- Ensure a seamless security scheme when redirecting users' requests from a uCDN to a dCDN, i.e., the certificates received by the browser are valid and are tied to the domain for which the delegation occurs. For instance, an User Agent (UA) might request a piece of content from a upstream CDN (uCDN), and if the uCDN cannot serve the content, it may redirect the request to a downstream CDN (dCDN). Because the uCDN shall trust in that case the dCDN to deliver the content, this delegation should ideally not trigger a security warning in the user's browser.  -->
	</t><t>
	Revocation use case: A revocation might occur when a dCDN is not trusted anymore by the uCDN in case of policy or security concerns, i.e. the dCDN surrogates has unsolved security issues, or the delegation of HTTPS content delivery for a particular CP has been terminated. For instance, in case of revocation, a dCDN must not be able to present the CP or uCDN certificate to the user agent when UA has directly requested a content to the dCDN.
	</t><t>
	CDN configuration/topology visibility: Reduce CDN configuration, topology and meta-data disclosure/visibility towards the end-users. This means to keep this information hidden from each CDNs, and from the end-user browser. As an example, the end-user shall not be aware of the CDNI topology; this may imply for instance to remove data in the redirection messages.
	</t><!-- <t>
	Compliancy: The solution must be compliant with API Stack Program from IAB (Internet Architecture Board)
	</t> -->
	</list></t>
	</section>
  
  	<section title="Redirection methods">
	   <t>
	   In a secured CDN interconnection where uCDN and a dCDN have two distinct domains, the User Agent (UA) tries first to resolve the uCDN domain when it contacts the uCDN for a piece of content. At this step, two types of redirection methods can be considered, both delegating the content delivery to the dCDN (please refer to <xref target="I-D.ietf-cdni-redirection"/>): 
	   </t><t>
	   <list style="symbols">
	   <t>
			using an HTTP-based mechanism, the UA is redirected by the uCDN to the dCDN. Once the uCDN domain is resolved, the UA negotiates a secured connection to the uCDN for that content, and receives the uCDN certificate. Then the uCDN subsequently uses an HTTP redirection method to redirect the UA to a dCDN surrogate content server. Then, the UA resolves the dCDN domain name.
	   </t>
	   <t>
			using DNS routing, the UA is redirected to the dCDN, e.g., with a CNAME sent by the uCDN's authoritative DNS server. 
		</t>
	   </list></t><t>
		Next the UA negotiates a new secured connection with the dCDN, retrieving the dCDN certificate. If the certificate is valid, then the UA will be able to connect to the dCDN surrogate, and the dCDN will deliver the requested piece of content to the UA.		   
	   </t>	

		<section title="HTTP-based redirection methods">
		<t>
		This section deals with HTTP-based redirection methods for secured TLS connections in CDNI.
		</t>	   
			
			<section title="3xx directives">
			<t>		   
			When dealing with redirection over HTTP/S, two sub-cases should be considered:
			</t><t>
			<list style="symbols"> 
			<t> HTTP -> HTTPS:  In this case, the CSP / uCDN from domain A redirects end-users' HTTP requests to the dCDN from domain B, and upgrades the security scheme to HTTPS.</t>
			<t> HTTPS -> HTTPS: In this case, the CSP / uCDN domain A redirects the browsers' request to dCDN domain B. </t>
			</list>
			</t><t>
			Regardless of DNS resolution aspects, in the first sub-case, the initial delegation will not be secured, or trusted: the end user will have no cryptographic assurance that the uCDN is delegating to that dCDN, even though the user may subsequently form a secure connection to the dCDN. The HTTPS upgrade should always be accepted automatically by the browser, on the condition that the certificate is valid and trusted (e.g., not self-signed).	
			</t><t>
			In the second sub-case, the TLS handshake happens before the first HTTP request is sent, therefore, the subsequent traffic including request URI and query parameters will be encrypted. First, the TLS session is established between the UA and the origin uCDN, authenticating the uCDN. Then, the uCDN uses HTTP mechanisms for redirection, using 3xx messages like 302 Found, embedding the new target URI aiming at the CDN surrogate in the Location header. The UA then sets up a separate TLS session with the dCDN surrogate, validating the dCDN certificate. Trust relationship is implied since the redirection message has been received over the authenticated TLS tunnel with the origin uCDN. 
			</t><t>
			The delegation is trusted and legitimate even if two independent TLS sessions will have to be set up in sequence by the UA. Indeed, when tying two sessions together, the authenticated origin uCDN communicates the target URI in the redirection message over an encrypted tunnel, which constitutes a trust delegation endorsement.
			</t><t> 		
			However the issue here is when a uCDN invalidates the delegation to dCDN for some reasons. The dCDN will then still be able to stream the content with a valid certificate if an end-user directly requests content to it.<!-- is when both uCDN and dCDN domains are distinct. Indeed, the browser has received two certificates linked to two distinct domains. Therefore, the browser can't seamlessly assure the end-user that delegation has occurred on the same domain. While browser implementation determines how transparent the delegation may be to an end user, the browser may in most of the cases generate a warning message notifying the user of a secure domain change, which is not a seamless delegation. -->
			</t><t>
			However, mainstream browser implementations support seamless secure redirection via HTTP 3xx responses. Ultimately, the secure delegation from a uCDN to a dCDN is entirely tractable in the HTTPS environment provided that application layer redirection such as HTTP 3xx responses is used.
			</t>		
			</section>
			
			<section title="URL Rewriting">
			<t>
			URL rewriting is a method to compute in a web page destination URLs to point at new web location while this page is rendered on the browser. This modification could typically be caused by a script embedded in the page. Alternatively, a server-side code could modify embedded URLs before the page is retrieved by a browser, including certain classes of web intermediaries. URL rewriting can therefore serves as a form of application-layer redirection.
			</t><t>
			Regarding CDNI, a page served over TLS by an uCDN will prevent intermediaries from modifying URLs without the consent of the user or the uCDN. Client-side scripts pushed by the uCDN will still be secure, and then the redirection to any dCDNs via rewriting would be secure as well.
			</t>			
			<t>
			In the case of HTTP Adaptive Streaming (HAS) techniques where content is chunked in order to be played with multiple  video qualities, a manifest file will describe the way the content was prepared/encoded, e.g. how many qualities, chunks size, and their network location. This manifest is requested by the player prior to any chunks.
			</t><t>
			Regarding CDNI, if the manifest is available on the uCDN domain A, while video chunks are available on the dCDN domain B, the player requesting for chunks will be redirected by the uCDN to the dCDN using 3xx redirection methods (see the previous section). 
			</t><t>
			In another more complex case, both the uCDN and the dCDN may deliver some of the video chunks. 
			</t>	
			</section>
			
			<section title="API Mode, or scripted redirection">
			<t>
			In the API mode (e.g. via AJAX requests, JSONP, etc.), a web page requested by the browser contains a script that "transparently" - from the user's perspective - requests content on another web page.
			</t><t>
			As far as CDNI is concerned, the initial web page and scripts would be located on domain A, whereas content requested by the script would be located on a secondary domain B.
			</t><t>
			Apart from "cross-domain" (CORS) issues that can be fixed with an "Access-Control-Allow-Origin" header, this use case raises also the security issues likewise in other HTTP-based redirection cases.
			</t>
			</section>	
		</section>

		<section title="DNS redirection">
			<t>
			In the case of DNS-based redirection, prior to any HTTP delivery requests, the UA has to first resolve the uCDN domain, then uCDN DNS server answers with the dCDN domain name (e.g., using a CNAME) instead of the uCDN domain, thus realizing the DNS redirection to the dCDN.
			</t><t>			
			In that case, the redirection happens before the establishment of the TLS tunnel. The issue here is that the user UA expects the uCDN's certificate, but instead obtains the dCDN surrogate's certificate during the TLS handshake. Mismatch between the expected origin uCDN URI and the received dCDN domain designated in the obtained certificate causes certificate validation warnings at the UA. Eventually a client UA displays a warning to the end user requiring additional steps, which may compromise the delegation security.
			</t><t>
			The CDNI Redirection draft (<xref target="I-D.ietf-cdni-redirection"/>) specifies that in addition to HTTP, DNS redirection can be used as a means of delegation from a uCDN to a dCDN. In this case, upon querying the hostname associated with the uCDN URL, the DNS resolver will receive a DNS response (such as CNAME) that will direct the client to the dCDN. However, in an HTTPS environment, the client will end up with a domain different than the one originally specified by the URL input by the end user. Consequently, this will result in a security failure when the browser attempts to negotiate TLS with the web server it contacts, as the change in domain name will be indistinguishable from a malicious attacker.
			</t><t>
			Another security related to the "HARD problem" draft <xref target="I-D.barnes-hard-problem" /> ("High Assurance Re-Direction") is where a malicious DNS resolver could return DNS responses (IP addresses/CNAMEs) that steer the User Agent to a malicious server. DNS response hijacking could be used to mount a DoS attack against the CDN/Content Provider as the User Agent won't be able to receive the content that it wants because it is being told to retrieve it from a server that it can't establish a TLS session to.
			</t><t>
			DNSSEC would prevent that because responses would need to be signed and a malicious DNS resolver would therefore not be able to return malicious responses as it would not be able to generate properly signed DNS response.
			</t><t>
			DNSSEC makes it possible to secure DNS redirections. Were CDNI to use DNSSEC for DNS based redirection, the client's resolver would have a strong assurance that the uCDN had explicitly designated the dCDN as its delegate. However, DNSSEC adoption remains limited, and consequently this may not be a practicable solution in the immediate future. While technologies like DANE which build on DNSSEC could help, they remain dependent on DNSSEC adoption.
			</t>
		</section>
		
	</section>


	<section title="Use of Lurk interfaces for CDNI">
		<t>		
		Delegating the delivery of HTTPS traffic to a third party without any certificate issues can be achieved if the dCDN surrogate is able to present the security credentials for the domain name in the user's initial request. 
		</t>
		<t>One of the common practices so far has been for the content provider to directly delegate the storage of the private keys to the CDN that is delivering the content on its behalf. This solution could persist in the CDNI context, but in a scenario where delivery is done through multiple cascaded dCDN, it becomes unlikely that the content provider would be willing to share its private keys with all the parties involved and breaks the delegation revocation use cases.
		</t><t>
		The proposed solution here relies on the introduction of a Private Key Server in the TLS handshake as described in the Lurk draft <xref target="I-D.mglt-lurk-tls-use-cases"/> that suggests several use cases of private key server and protocols implementation.</t>
		<t>Some solutions implementing private Key Servers are being standardized. For instance, the Session Key interface - SKI - draft <xref target="I-D.cairns-tls-session-key-interface"/> shows an example of Lurk interface implementation. Others are commercially deployed and are made publicly available.
		</t><t>
		A Lurk interface implementation for CDNI would allow the private keys to remain under the authority of the content provider (or the uCDN) while the actual content would be served from a dCDN surrogate that is closer to the end user. Indeed, the architecture would introduce a split in the setup of the secure tunnel between the client's browser and the surrogate delivering the content. Since the dCDN would not possess the private keys for the requested certificate, during the setup of the TLS tunnel between the client and the dCDN surrogate. The dCDN would in turn forward a request to get the necessary credentials to establish the secure connection to the end-user and serve the content. 
		</t><t>
		Note that a Lurk interface would allow provisioning certificates to the dCDN and avoids any private keys exchanges between uCDN and the dCDN involved in the delegation. The implementation of Lurk need to be used jointly with DNS redirection. 
		</t>
		
		<section title="Use cases">
			<t>
			Two main use cases shall be considered when implementing Lurk in the CDNI context:
			</t>
			<t>
			<list style="letters">
			<t>
			"Nominal" case for HTTPS delegation: a uCDN delegates the HTTPS content delivery to a dCDN without providing with its private keys for legal/trusting issues. In this case, only the uCDN would need a valid certificate, whereas the dCDN would rely on session key received from the uCDN Key Server (KS) for the TLS session establishment. Therefore the dCDN will deliver HTTPS content using the uCDN certificate.
			</t><t>
			Cascaded HTTPS delivery delegation: This use case has a wider scope that the previous use case. In the context, the content provider delegates the HTTPS content delivery of his content to an uCDN, that in turn delegates the HTTPS delivery to a dCDN. For security reasons, the CP do not want to provide his private keys to all CDNs involved in the interconnection hierarchy. In that case, the uCDN and all dCDN will rely on the CP private keys received from a Key Server (KS) on CP side to deliver HTTPS content.
			</t>
			</list>
			</t>
		</section>
		
		
		<section title="Implementation">
			<t>This section describes basic implementations of Lurk for CDNI secured traffic delegation (case a.). In the following example, the CP has provided his certificate to the uCDN. 
			</t>
			<t><list>
			<t>
			As seen on figure 2, once the DNS resolution is done (i.e., UA is able to resolve dCDN surrogate IP@ steps a to d), the user agent connects to the dCDN surrogate. Also please note that DNS cache is not shown on the figure.
			</t>
			<t>
			1. The client sends a ClientHello, as defined in the TLS protocol <xref target="RFC5246"/>. 
			</t>
			<t>
			2. The surrogate sends a ServerHello.
			</t>
			<t>
			3. The surrogate sends the public certificate to the user agent.  The user agent checks the certificate signature with the public key.
			</t>
			<t>
			In order to prepare the certificate delegation, it may be necessary to provision CP public certificates hosted on the Key Server, on uCDN or CP side, to the dCDN that will be requested the content. Please refer to fig. 3. A request is sent by the dCDN to uCDN KS to get the CP Public certificate.
			</t><t>
			4. The surrogate requests the key server to sign parameters with the private key.</t>
			<t>
			5. The key server returns the signature to the dCDN surrogate over a secure tunnel.
			</t><t>
			6. and 7. the client and the surrogate exchange public DH parameters and compute session keys.
			</t>
			<t>
			8. The end-user terminal and the surrogate establish a secure connection. The user agent issues its request for content over HTTPS.
			</t><t>
			The surrogate then processes the original request.
			</t>	
			</list>
			</t><t>
			Below is an example of the handshake establishment:
			</t>			
<figure><artwork><![CDATA[
+----+               +----+            +-------+                 +----+
| UA |               |dCDN|            |uCDN KS|                 |uCDN|
+----+               +----+            +-------+                 +----+
  |a. DNS A? FQDN CP   |                   |                        |
  |---------------------------------------------------------------->|
  |                    |                   |                        |
  |b. DNS CNAME dCDN   |                   |                        |
  |<----------------------------------------------------------------|
  |                    |                   |                        |
  |c. DNS A? dCDN      |                   |                        |
  |------------------->|                   |                        |
  |                    |                   |                        |
  |d. DNS A IP Surrogate                   |                        |
  |<-------------------|                   |                        |
  |                    |                   |                        |
  |1. ClientHello (Client Random)          |                        |
  |------------------->|                   |                        |
  |                    |                   |                        |
  |2. ServerHello (Server Random)          |                        |			  
  |<-------------------|                   |                        |
  |                    |                   |                        |
  |3. Certificate (Server certificate)     |                        |			  
  |<-------------------|                   |                        | 
  |                    |                   |                        |
  |                    |4. API request for Signature (ECDHHParams)  |			  
  |                    |------------------>|                        |
  |                    |                   |                        |
  |                    |5. API response: signature (ECDHHParams)    |
  |                    |<------------------|                        |
  |                    |                   |                        |			  
  |6. ServerKeyExchange (ECDHParams, Signature)                     |
  |<-------------------|                   |                        |
  |                    |                   |                        |
  |7. ClientKeyExchange (clientDHpublic)   |                        |
  |------------------->|                   |                        |
  |Finished            |                   |                        |
  |<------------------>|                   |                        |
  |                    |                   |                        |
  |8. HTTPS request    |                   |                        |
  |------------------->|                   |                        |
]]></artwork></figure>		
<t>
Figure 2: Overview of Lurk interface with DH handshake in case of regional delivery delegation 
</t>
<t>
As shown on figure 4, a similar implementation can be considered for RSA keys handling.
</t>
<t>
Note that next after step 1, the dCDN may have to retrieve [at least once] the CP public certificate related to the targeted FQDN. This could be done using specific API methods dedicated to certificate retrieval. The certificates may be cached on the dCDN for a given duration. See next figure.
</t>
<t>This Lurk API may have to support both RSA (cf. figure 4) and/or Diffie-Helman (cf. figure 2) connection setup. 
</t>

<figure><artwork><![CDATA[
+----+               +----+            +-------+                 +----+
| UA |               |dCDN|            |uCDN KS|                 |uCDN|
+----+               +----+            +-------+                 +----+
  |                    |                   |                        |
  |1. ClientHello (Client Random)          |                        |
  |------------------->|                   |                        |
  |                    |                   |                        |
  |                    |a. API: Request FQDN CP public certificate  |
  |                    |------------------>|                        |
  |                    |                   |                        |
  |                    |b. API: CP Public certificate (cacheable)   |
  |                    |<------------------|                        |
  | ...                |                   |                        |
]]></artwork></figure>		
	<t>
	Figure 3: Optional steps for a dCDN to get the uCDN public certificate (public certificates may be cached on the dCDN for a given duration)
	</t>	
	
<figure><artwork><![CDATA[
+----+               +----+            +-------+                 +----+
| UA |               |dCDN|            |uCDN KS|                 |uCDN|
+----+               +----+            +-------+                 +----+
  |a. DNS A? FQDN CP   |                   |                        |
  |---------------------------------------------------------------->|
  |                    |                   |                        |
  |b. DNS CNAME dCDN   |                   |                        |
  |<----------------------------------------------------------------|
  |                    |                   |                        |
  |c. DNS A? dCDN      |                   |                        |
  |------------------->|                   |                        |
  |                    |                   |                        |
  |d. DNS A IP Surrogate                   |                        |
  |<-------------------|                   |                        |
  |                    |                   |                        |
  |1. ClientHello (Client Random)          |                        |
  |------------------->|                   |                        |
  |                    |                   |                        |
  |2. ServerHello (Server Random)          |                        |			  
  |<-------------------|                   |                        |
  |                    |                   |                        |
  |3. Certificate (Server certificate)     |                        |			  
  |<-------------------|                   |                        | 
  |                    |                   |                        |
  |4. ClientKeyExchange (Encrypted Premaster Secret)                |
  |------------------->|                   |                        |
  |                    |5. API request for Signature + decrypt premaster secret
  |                    |------------------>|                        |
  |                    |                   |                        |
  |                    |6. API response: signature                  |
  |                    |<------------------|                        |
  |                    |                   |                        |
  |Finished            |                   |                        |
  |<------------------>|                   |                        |
]]></artwork></figure>		
	<t>
	Figure 4: Overview of Lurk implementation with RSA in case of regional delivery delegation 
	</t>
	</section>

	<section title="Discussions">		

		<t><list style="symbols">		
		<t>
		HTTPS: currently, the contents are delivered with the credentials of uCDN or dCDN. The introduction of a key server in the CDNI architecture allows the HTTPS content to be delivered with the origin server certificate. It conforms to the end-to-end HTTPS framework <xref target="RFC2818"/>. 
		</t><t>
		TLS: it does not significantly impact the TLS session establishment duration, while benefiting from TLS session resuming.
		</t><t>
		Certificates: a certificate per CP would be stored and managed by the uCDN (or the CP) in a private KS is needed for the  CDNI. Therefore it avoids the complexity of having multiple certificates and domain names, e.g. one domain name per CDN of the interconnection. As a side effect, it could also prevent certificates mismatches and help warning the user at user agent side, while ensuring the legitimacy of redirection.
		</t><t>
		Security: the dCDN has never access to the uCDN (or CP) private keys, as it rely on the uCDN (or CP) certificate to setup the connection. 
		</t><t>
		Revocation: in the case of an HTTPS delegation revocation, a dCDN has no longer the delegation right to deliver a content for a given CP. The uCDN would then deny access to CP certificates, and therefore the dCDN would not be able to present the CP certificate to the UA.  
		</t><t>
		RSA: the use of RSA scheme is not recommended as the UA needs to share premaster secret key which can be a security flaw.
		</t><t>
		Use cases: other use cases, e.g. the dCDN would manage its own keys/cert in a Key Server that would be requested by the uCDN, will be described in a further version of this draft.
		</t>
		</list></t>
	</section>
		
	</section>			
	
	<section title="CDNI URI Signing">
		<t>Another means of enforcing trust delegation would be to use CDNI URI Signing mechanism. The CDNI URI Signing <xref target="I-D.leung-cdni-uri-signing" /> draft specifies a detailed mechanism to ensure the validation of parameters communicated in the redirection URI. 
		  </t><t>
		  Considering CDNI and HTTPS delegation, this URI signing mechanism could be used as means to enforce trust delegation.
		  </t><t>
		   While this later draft focuses on the validation by the target CDN of the authenticity of the parameters communicated in the redirect URI generated by the origin CSP, CDNI URI Signing mechanism could be extended or used to include the certificate information or hashes either in the provided URI Signing Package Attribute, or in an additional Package Attribute (e.g. Redirect Authentication Attribute), reusing much of the mechanisms detailed in the draft.
		   </t>
	</section>
			
	<section title="Topology hiding">
		<t>
		A further security concern associated with redirection is the question of how much information a uCDN imparts to the browser, and consequently to the end user, about its policy decisions in delegating to a dCDN. However, in order to preserve crucial security properties, it is likely unavoidable that a certain amount of information will be divulged to any browser or client of a CDN system. For example, consider that eventually, content will be downloaded from a dCDN cache at a particular IP address, and that consequently, information about a responsible network will always be revealed to an end user.</t><t>
		The guidance in <xref target="I-D.ietf-cdni-redirection"/> Section 5 considers the possibility of using "probes" of this form, and the potential topology leakage of any redirection interface.
		</t>
	</section>			
	
	<section title="IANA Considerations">
   <t>This document has no IANA considerations.</t>
   </section>
	
	<section title="Security Considerations">
	<t>The entire document is about security.</t>
	</section>

	<section title="Acknowledgments">
	<t>
		The authors would like to thank Iuniana Oprescu and Sergey Slovetskiy for the initial authoring of this draft.</t>
		<t>Many thanks also to Jon Peterson, Jan Seedorf, and Ben Nivens-Jenkins for their help in putting this draft together. 
	</t>
	</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">
      <!--?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?-->
      <!--&RFC2119;
	     
		  &RFC2629;-->
		  &RFC3568;
		  &RFC6698;
		  &RFC2818;
		  &RFC5246;
    </references>

    <references title="Informative References">
      <!-- Here we use entities that we defined at the beginning. -->


		  &I-D.leung-cdni-uri-signing;
		  &I-D.ietf-cdni-redirection;
		  &I-D.barnes-hard-problem;		
		  
		  
		  
		  <?rfc include="reference.I-D.mglt-lurk-tls-use-cases.xml"?>
		  <?rfc include="reference.I-D.cairns-tls-session-key-interface.xml"?>
		  
		
		<!-- references to add		
				   [HTTPS-CDN] J. Liang, J. Jiang, H. Duan, K. Li, T. Wan, and J. Wu,
		   "When HTTPS Meets CDN: A Case of Authentication in Delegated
		   Service," in 2014 IEEE Symposium on Security and Privacy (SP), 2014,
		   pp. 67-82.

		   [SSL-Challenges] J. Clark and P. C. van Oorschot, "SoK: SSL and
		   HTTPS: Revisiting Past Challenges and Evaluating Certificate Trust
		   Model Enhancements," in 2013 IEEE Symposium on Security and Privacy
		   (SP), 2013, pp. 511-525.
		   
		   -->
   
		<reference anchor="HTTPS-CDN">
			<front>
				<title>When HTTPS Meets CDN: A Case of Authentication in Delegated Service
				</title>
				<author>
					<organization>J. Liang, J. Jiang, H. Duan, K. Li, T. Wan, and J. Wu</organization>
				</author>
				<date year="in 2014 IEEE Symposium on Security and Privacy (SP), 2014, pp. 67-82."></date>
				
			</front>
		</reference>	
		<reference anchor="SSL-Challenges">
			<front>
				<title>SoK: SSL and HTTPS: Revisiting Past Challenges and Evaluating Certificate Trust Model Enhancements
				</title>
				<author>
					<organization>J. Clark and P. C. van Oorschot</organization>
				</author>
				<date year="in 2013 IEEE Symposium on Security and Privacy (SP), 2013, pp. 511-525"></date>
				
			</front>
		</reference>		

   
	   <reference anchor="Proposed_Lurk_Charter"
					 target="https://mailarchive.ietf.org/arch/msg/lurk/tJBcaRJlYBGaOe1X6Hsc-smt4OU">
			<front>
			  <title>Proposed Lurk Charter</title>

			  <author fullname="Eric Burger">
				<organization>Eric Burger</organization>
			  </author>

			  <date year=""/>
			</front>
		  </reference>
		

    </references>



    <!-- Change Log

v00 2006-03-15  EBD   Initial version

v01 2006-04-03  EBD   Moved PI location back to position 1 -
                      v3.1 of XMLmind is better with them at this location.
v02 2007-03-07  AH    removed extraneous nested_list attribute,
                      other minor corrections
v03 2007-03-09  EBD   Added comments on null IANA sections and fixed heading capitalization.
                      Modified comments around figure to reflect non-implementation of
                      figure indent control.  Put in reference using anchor="DOMINATION".
                      Fixed up the date specification comments to reflect current truth.
v04 2007-03-09 AH     Major changes: shortened discussion of PIs,
                      added discussion of rfc include.
v05 2007-03-10 EBD    Added preamble to C program example to tell about ABNF and alternative 
                      images. Removed meta-characters from comments (causes
                      problems).
    2015-04-17 AR     updated ipr attribute.  -->
  </back>
  

  </rfc>