Internet Engineering Task Force F. Fieau
Internet-Draft Orange
Intended status: Standards Track March 21, 2016
Expires: September 22, 2016

HTTPS and delegation of encrypted traffic between interconnected CDNs
draft-fieau-https-delivery-delegation-02

Abstract

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).

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at http://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on September 22, 2016.

Copyright Notice

Copyright (c) 2016 IETF Trust and the persons identified as the document authors. All rights reserved.

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.


Table of Contents

1. Introduction

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.

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. [HTTPS-CDN] and [SSL-Challenges]).

This document is intended as a starting point for discussion. It shall review redirection methods introduced in [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.

2. Requirements

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:

3. Redirection methods

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 [I-D.ietf-cdni-redirection]):

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.

3.1. HTTP-based redirection methods

This section deals with HTTP-based redirection methods for secured TLS connections in CDNI.

3.1.1. 3xx directives

When dealing with redirection over HTTP/S, two sub-cases should be considered:

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).

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.

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.

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.

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.

3.1.2. URL Rewriting

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.

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.

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.

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).

In another more complex case, both the uCDN and the dCDN may deliver some of the video chunks.

3.1.3. API Mode, or scripted redirection

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.

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.

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.

3.2. DNS redirection

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.

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.

The CDNI Redirection draft ([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.

Another security related to the "HARD problem" draft [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.

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.

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.

4. Use of Lurk interfaces for CDNI

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.

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.

The proposed solution here relies on the introduction of a Private Key Server in the TLS handshake as described in the Lurk draft [I-D.mglt-lurk-tls-use-cases] that suggests several use cases of private key server and protocols implementation.

Some solutions implementing private Key Servers are being standardized. For instance, the Session Key interface - SKI - draft [I-D.cairns-tls-session-key-interface] shows an example of Lurk interface implementation. Others are commercially deployed and are made publicly available.

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.

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.

4.1. Use cases

Two main use cases shall be considered when implementing Lurk in the CDNI context:

  1. "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.
  2. 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.

4.2. Implementation

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.

Below is an example of the handshake establishment:

+----+               +----+            +-------+                 +----+
| 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    |                   |                        |
  |------------------->|                   |                        |

Figure 2: Overview of Lurk interface with DH handshake in case of regional delivery delegation

As shown on figure 4, a similar implementation can be considered for RSA keys handling.

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.

This Lurk API may have to support both RSA (cf. figure 4) and/or Diffie-Helman (cf. figure 2) connection setup.

+----+               +----+            +-------+                 +----+
| UA |               |dCDN|            |uCDN KS|                 |uCDN|
+----+               +----+            +-------+                 +----+
  |                    |                   |                        |
  |1. ClientHello (Client Random)          |                        |
  |------------------->|                   |                        |
  |                    |                   |                        |
  |                    |a. API: Request FQDN CP public certificate  |
  |                    |------------------>|                        |
  |                    |                   |                        |
  |                    |b. API: CP Public certificate (cacheable)   |
  |                    |<------------------|                        |
  | ...                |                   |                        |

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)

+----+               +----+            +-------+                 +----+
| 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            |                   |                        |
  |<------------------>|                   |                        |

Figure 4: Overview of Lurk implementation with RSA in case of regional delivery delegation

4.3. Discussions

5. CDNI URI Signing

Another means of enforcing trust delegation would be to use CDNI URI Signing mechanism. The CDNI URI Signing [I-D.leung-cdni-uri-signing] draft specifies a detailed mechanism to ensure the validation of parameters communicated in the redirection URI.

Considering CDNI and HTTPS delegation, this URI signing mechanism could be used as means to enforce trust delegation.

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.

6. Topology hiding

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.

The guidance in [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.

7. IANA Considerations

This document has no IANA considerations.

8. Security Considerations

The entire document is about security.

9. Acknowledgments

The authors would like to thank Iuniana Oprescu and Sergey Slovetskiy for the initial authoring of this draft.

Many thanks also to Jon Peterson, Jan Seedorf, and Ben Nivens-Jenkins for their help in putting this draft together.

10. References

10.1. Normative References

[RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, DOI 10.17487/RFC2818, May 2000.
[RFC3568] Barbir, A., Cain, B., Nair, R. and O. Spatscheck, "Known Content Network (CN) Request-Routing Mechanisms", RFC 3568, DOI 10.17487/RFC3568, July 2003.
[RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security (TLS) Protocol Version 1.2", RFC 5246, DOI 10.17487/RFC5246, August 2008.
[RFC6698] Hoffman, P. and J. Schlyter, "The DNS-Based Authentication of Named Entities (DANE) Transport Layer Security (TLS) Protocol: TLSA", RFC 6698, DOI 10.17487/RFC6698, August 2012.

10.2. Informative References

[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..
[I-D.barnes-hard-problem] Barnes, R. and P. Saint-Andre, "High Assurance Re-Direction (HARD) Problem Statement", Internet-Draft draft-barnes-hard-problem-00, July 2010.
[I-D.cairns-tls-session-key-interface] Cairns, K., Mattsson, J., Skog, R. and D. Migault, "Session Key Interface (SKI) for TLS and DTLS", Internet-Draft draft-cairns-tls-session-key-interface-01, October 2015.
[I-D.ietf-cdni-redirection] Niven-Jenkins, B. and R. Brandenburg, "Request Routing Redirection interface for CDN Interconnection", Internet-Draft draft-ietf-cdni-redirection-17, February 2016.
[I-D.leung-cdni-uri-signing] Leung, K., Faucheur, F., Downey, B., Brandenburg, R. and S. Leibrand, "URI Signing for CDN Interconnection (CDNI)", Internet-Draft draft-leung-cdni-uri-signing-05, March 2014.
[I-D.mglt-lurk-tls-use-cases] Migault, D. and K. Ma, "TLS/DTLS Content Provider Edge Server Split Use Case", Internet-Draft draft-mglt-lurk-tls-use-cases-00, January 2016.
[Proposed_Lurk_Charter] Eric Burger, "Proposed Lurk Charter"
[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.

Author's Address

Frederic Fieau Orange 38-40 rue du Général Leclerc Issy-les-Moulineaux, 92130 FR EMail: frederic.fieau@orange.com