Network Working Group | B. Niven-Jenkins |
Internet-Draft | R. Murray |
Intended status: Standards Track | G. Watson |
Expires: April 03, 2013 | Velocix (Alcatel-Lucent) |
M. Caulfield | |
K. Leung | |
Cisco Systems | |
K.J. Ma | |
Azuki Systems, Inc. | |
October 02, 2012 |
CDN Interconnect Metadata
draft-ietf-cdni-metadata-00
The CDNI Metadata Interface enables interconnected CDNs to exchange content distribution metadata in order to enable content acquisition and delivery. The CDNI metadata associated with a piece of content provides a downstream CDN with sufficient information for the downstream CDN to service content requests on behalf of an upstream CDN. This document describes both the core set of CDNI metadata and the protocol for exchanging that metadata.
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 RFC 2119 [RFC2119].
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 April 03, 2013.
Copyright (c) 2012 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.
CDNI enables a downstream CDN to service content requests on behalf of an upstream CDN. The CDNI metadata associated with a piece of content (or with a set of contents) provides a downstream CDN with sufficient information for servicing content requests on behalf of an upstream CDN in accordance with the policies defined by the upstream CDN.
The CDNI Metadata Interface is introduced by [I-D.ietf-cdni-problem-statement] along with three other interfaces that may be used to compose a CDNI solution (Control, Request Routing and Logging). [I-D.davie-cdni-framework] expands on the information provided in [I-D.ietf-cdni-problem-statement] and describes each interface, and the relationships between them, in more detail. The requirements for the CDNI metadata interface are specified in [I-D.ietf-cdni-requirements]
This document focuses on the CDNI Metadata interface which enables a downstream CDN to obtain CDNI Metadata from an upstream CDN so that the downstream CDN can properly process and respond to:
Specifically this document proposes:
This document reuses the terminology defined in [I-D.ietf-cdni-problem-statement].
Additionally, the following terms are used throughout this document and are defined as follows:
The proposed CDNI Metadata Interface aims to achieve the following design principles:
Cacheability improves the latency of acquiring metadata and therefore improves the latency of serving content requests. The CDNI Metadata Interface uses HTTP to achieve cacheability.
Deterministic mappings from content requests to metadata properties eliminates ambiguity and ensures that the same policies are applied consistently by all downstream CDNs.
Support for both HTTP and DNS redirection ensures that the CDNI Metadata Interface can be used for HTTP and DNS redirection and also meets the same design principles for both HTTP and DNS based redirection schemes.
Minimal duplication of CDNI metadata provides space efficiency on storage in the CDNs, on caches in the network, and across the network between CDNs.
Leveraging existing protocols avoids reinventing common mechanisms such as data structure encoding (e.g. XML, JSON) and data transport (e.g. HTTP).
The CDNI Metadata Model describes a data structure for mapping content requests to metadata properties. Metadata properties describe how to acquire, authorize, and deliver content from a downstream CDN. The data model relies on the assumption that these metadata properties may be aggregated based on the hostname of the content and subsequently on the resource path of the content. The data model associates a set of CDNI Metadata properties with a Hostname to form a default set of metadata properties for content delivered for that Hostname. That default set of metadata properties can be overridden by properties that apply to specific paths within a URI.
Different Hostnames and URI paths will contain different sets of CDNI Metadata properties in order to describe the required behaviour when a dCDN surrogate is processing User Agent requests for content at that Hostname or URI path. As a result of this structure, significant commonality may exist between the CDNI Metadata properties specified for different Hostnames, different URI paths within a Hostname and different URI paths on different Hostnames. For example the definition of which User Agent IP addresses should be treated as being grouped together into a single network or geographic location is likely to be common for a number of different Hostnames. Another example is that although a uCDN is likely to have several different policies configured to express geo-blocking rules, it is likely that a single geo-blocking policy would be applied to multiple Hostnames delivered through the CDN.
In order to enable the CDNI Metadata for a given Hostname or URI Path to be decomposed into sets of CDNI Metadata properties that can be reused by multiple Hostnames and URI Paths, the CDNI Metadata interface specified in this document splits the CDNI Metadata into a number of objects. Efficiency is improved by enabling a single CDNI Metadata object (that is shared across Hostname and/or URI paths) to be retrieved by a dCDN once, even if it is referenced by the CDNI Metadata of multiple Hostnames.
Section 3.1 introduces a high level description of the HostIndex, HostMetadata and PathMetadata objects and describes the relationships between those objects.
Section 3.2 introduces a high level description of the CDNI GenericMetadata object which represents the level at which CDNI Metadata override occurs between HostMetadata and PathMetadata objects.
Section 4 describes in detail the specific CDNI Metadata objects and properties which may be contained within a CDNI GenericMetadata object.
A HostIndex object contains a list of Hostnames (and/or IP addresses) that may be delegated to the downstream CDN. The HostIndex is the starting point for accessing the uCDN's CDNI Metadata data store. It enables surrogates in the dCDN to deterministically discover, on receipt of a User Agent request for content, which other CDNI Metadata objects it requires in order to deliver the requested content.
The HostIndex links Hostnames (and/or IP addresses) to HostMetadata objects via HostMatch objects. HostMetadata objects contain (or reference) the default CDNI Metadata required to serve content for that host. When looking up CDNI Metadata, the downstream CDN looks up the requested Hostname (or IP address) in the HostIndex, from there it can find HostMetadata which describes delivery rules for a host and PathMetadata which may override those rules for given URI paths within the host.
As well as containing the default CDNI Metadata for the specified Hostname, HostMetadata and PathMetadata objects may also contain PathMatch objects which in turn contain PathMetadata objects. PathMatch objects override the CDNI Metadata in the HostMetadata object or one or more preceding PathMetadata objects with more specific CDNI Metadata that applies to content requests matching the pattern defined in that PathMatch object.
For the purposes of retrieving CDNI Metadata all other required CDNI Metadata objects and their properties are discoverable from the appropriate HostMetadata, PathMatch and PathMetadata objects for the requested content.
The relationships between the HostIndex, HostMatch, HostMetadata, PathMatch and PathMetadata objects are described in Figure 1.
+---------+ +---------+ +------------+ |HostIndex+---->|HostMatch|---->|HostMetadata+----------------+ +---------+ +---------+ +------+-----+ | | | V V +---------+ ************************** +--->|PathMatch| *Generic Metadata Objects* | +---------+ ************************** | | ^ | V | | +------------+ | +--|PathMetadata+----------------+ +------------+
Key: ----> = References
Figure 1: Relationships between the HostIndex, HostMetadata & PathMetadata CDNI Metadata Objects
The relationships in Figure 1 are summarised in Table 1 below.
Data Object | Objects it References |
---|---|
HostIndex | 0 or more HostMatch objects. |
HostMatch | 1 HostMetadata object. |
HostMetadata | 0 or more PathMatch objects. 0 or more GenericMetadata objects. |
PathMatch | 1 PathMetadata object. |
PathMetadata | 0 or more PathMatch objects. 0 or more GenericMetadata objects. |
The table below describes the HostIndex, HostMetadata and PathMetadata objects in more detail.
Data Object | Description |
---|---|
HostIndex | A HostIndex object lists the Hostnames (and/or IP addresses) that an upstream CDN can provide CDNI Metadata for and the URIs to use for retrieving that CDNI Metadata. For example, if "example.com" is a content provider, the HostIndex object may include an entry for "example.com" with the URI of the associated HostMetadata object. These hostnames are contained inside a list of HostMatch objects. |
HostMatch | A HostMatch object defines a hostname to match against a requested host, and contains or references a HostMetadata object which contains CDNI Metadata objects to be applied when a content request matches against the hostname. |
HostMetadata | A HostMetadata object contains (or references) the default CDNI Metadata objects for content served from that host, i.e. the CDNI Metadata objects for content requests that do not match any of the PathMatch objects contained or referenced by that HostMetadata object. For example, a HostMetadata object may describe the metadata properties which apply to "example.com" and may contain PathMatches for "example.com/movies/*" and "example.com/music/*" which reference corresponding PathMetadata objects that contain the CDNI Metadata objects for those more specific URI paths. |
PathMatch | A PathMatch object defines a pattern to match against the requested path, and contains or references a PathMetadata object which contains (or references) the CDNI Metadata objects to be applied when a content request matches against the defined URI path pattern. |
PathMetadata | A PathMetadata object contains the CDNI GenericMetadata objects for content served with the associated URI path (defined in a PathMatch object). A PathMetadata object may also contain PathMatch objects in order to recursively define more specific URI paths that require different (e.g. more specific) CDNI Metadata to this one. For example, the PathMetadata object which applies to "example.com/movies/*" may describe CDNI Metadata which apply to that resource path and may contain a PathMatch object for "example.com/movies/hd/*" which would reference the corresponding PathMetadata object for the "example.com/movies/hd/" path prefix. |
GenericMetadata | A GenericMetadata object contains individual CDNI Metadata property objects which define the specific policies and attributes needed to properly deliver the associated content. |
The HostMetadata and PathMetadata objects contain or can reference other CDNI Metadata objects that contain properties which describe how User Agent requests for content should be processed, for example where to acquire the content, authorization rules that should be applied, delivery location restrictions and so on. Each such CDNI Metadata object is a specialization of a CDNI GenericMetadata object. The GenericMetadata object abstracts the basic information required for Metadata override and opaque Metadata distribution, from the specifics of any given property (e.g., property semantics, enforcement options, serialization rules, etc.).
The GenericMetadata object defines the type of properties contained within it as well as whether or not the properties are mandatory to enforce. If the dCDN does not understand or support the property type and the property type is mandatory to enforce, the dCDN MUST NOT serve the content to the User Agent. If the dCDN does not understand or support the property type it is also not going to be able to properly deserialize and reserialize the Metadata for cascaded distribution.
For Metadata which does not require customization, the data representation received off the wire MAY be stored and redistributed without being natively understood or supported by the transit CDN. However, for Metadata which require for translations, transparent redistribution of the uCDN Metadata values may not be appropriate. Certain Metadata may be safely, though possibly not optimially, redistributed unmodified, e.g., source acquisition address may not be optimal if transparently redistributed, but may still work. Redistribution safety MUST be specified for each GenericMetadata.
In the data model, a HostMetadata object may contain (or reference) multiple PathMetadata objects (via PathMatch objects). Each PathMetadata object may in turn contain (or reference) other PathMetadata objects. HostMetadata and PathMetadata objects form an inheritance tree where each node in the tree inherits or overrides the property values set by its parent.
GenericMetadata objects of a given type override all GenericMetadata objects of the same type previously defined by any parent object in the tree. For example, if HostMetadata for the host "example.com" contains GenericMetadata objects of type LocationACL and TimeWindowACL, while a PathMetadata object which applies to "example.com/movies/*" defines an alternate GenericMetadata object of type TimeWindowACL, The PathMetadata defined TimeWindowACL would override the TimeWindowACL defined in the HostMetadata for all User Agent requests for movies.
GenericMetadata objects are identified by their type. The type SHOULD be descriptive, and MAY be hierarchical to support aggregating groups of properties for the purpose of readability and for avoiding name conflicts between vendor extensions. A dotted alpha-numeric notation is suggested for human readability. For example:
Metadata types defined by this document are not hierarchical.
[Ed. It is intended that Metadata capability advertisements will allow either individual Metadata names or Metadata bundle identifiers to be used. Need to have a procedure for defining and distributing bundle information to be used in Metadata capability advertisement.]
Section 4.1 provides the definitions of each object type declared in Section 3. These objects are described as structural objects as they provide the structure for the inheritance tree and identifying which specific properties apply to a given User Agent content request.
Section 4.2 provides the definitions for the set of core metadata objects which may be contained within a GenericMetadata object. These objects are described as property objects as they define the semantics, enforcement options, and serialization rules for specific properties. These properties govern how User Agent requests for content are handled. Property objects may be composed of or contain references to other objects. In those cases the value of the property can be either an object of that type (the object is embedded) or a Link object that contains a URI and relationship that can be dereferenced to retrieve the CDNI Metadata object that represents the value of that property.
Note: In the following sections, the term "mandatory-to-specify" is used to convey which objects or properties must be specified for a given parent object or property. When mandatory-to-specify is set to true, it implies that if the parent object is specified, then the defined object or property MUST also be specified, e.g., a HostMatch object without a host to match against does not make sense, therefore, the host is mandatory-to-specify inside a parent HostMatch object.
Each of the sub-sections below describe the structural objects defined in Table 2.
The HostIndex object is the entry point into the CDNI Metadata hierarchy. An incoming content request is matched against the list of hosts to find the HostMatch object which applies to the request.
The HostMatch object contains a hostname or IP address to match against content requests. The HostMatch object references Metadata objects to apply if a match is found.
The HostMetadata object contains both Metadata that applies to content requests for a particular host and a list of pattern matches for finding more specific Metadata based on the resource path in a content request.
The PathMatch object contains an expression given as a PatternMatch object to match against a resource URI path and Metadata objects to apply if a match is found.
A PathMetadata object contains the CDNI Metadata properties for content served with the associated URI path (defined in a PathMatch object). Note that if CDNI metadata is used as an input to CDNI request routing and DNS-based redirection is employed, then any metadata at the PathMetadata level or below will be inaccessible at request routing time.
A PatternMatch object contains the pattern string and flags that describe the PathMatch expression.
A GenericMetadata object is a abstraction for managing individual CDNI Metadata properties in an opaque manner.
Source Metadata provides the dCDN information about content acquisition e.g. how to contact an uCDN Surrogate or an Origin Server. The sources are not necessarily the actual Origin Servers operated by the CSP but might be a set of Surrogates in the uCDN.
A Source object describes the Source which should be used by the dCDN for content acquisition, e.g. a Surrogate within the uCDN or an alternate Origin Server, the protocol to be used and any authentication method.
LocationACL Metadata defines location-based restrictions.
A LocationRule contains or references a list of Location objects. LocationRule objects are used to construct a LocationACL to apply restrictions to content delivery.
A Location object describes a Location which may be applied by an ACLRule, e.g. a Location may be an IPv4 address range or a geographic location.
[Ed: Location as specified above only supports the Class 1a names described in [I-D.jenkins-cdni-names]. Need to add support for Class 1b names to a later version.]
TimeWindowACL Metadata defines time-based restrictions.
A TimeWindowRule contains or references a list of TimeWindow objects. TimeWindowRule objects are used to construct a TimeWindowACL to apply restrictions to content delivery.
A TimeWindow object describes a time range which may be applied by an ACLRule, e.g. Start 09:00AM 01/01/2000 UTC End 17:00PM 01/01/2000 UTC.
ProtocolACL Metadata defines delivery protocol restrictions.
A ProtocolRule contains or references a list of Protocol objects. ProtocolRule objects are used to construct a ProtocolACL to apply restrictions to content delivery.
Authorization Metadata define content authorization methods.
An Auth object defines authentication and authorization methods to be used during content delivery and content acquisition, e.g. methods such as tokenization and URL Signing.
[Ed. Need to synchronize authentication configuration with CDNI URL signing draft definitions.]
[Ed. Need to consider how to separate protocol specific method configuration (e.g., HTTP basic/digest authentication), which must match the HostMatch protocol, from protocol agnostic method configurations (e.g., URL signing/tokenization).]
This section describes the simpler data types that are used for properties of CDNI Metadata objects.
A link object may be used in place of any of the objects described above. Links can be used to avoid duplication if the same metadata information is repeated within the metadata tree. When a link replaces an object, its href property is set to the URI of the resource, its rel property is set to the name of the property it is replacing, and its type property is set to the type of the object it is replacing.
This type only appears in Links. Links with this type are not machine readable but rather represent particular feature sets of a protocol defined in a specification and implemented in code. The URI contained in the link needs to be defined for each delivery protocol with an associated interoperable feature set.
The following examples are illustrative:
[Editor's Note: It may be more appropriate to use the ‘tag’ URI scheme [RFC4151] for these URIs.]
A hostname (with optional port) or an IP address (with optional port).
Note: All implementations MUST support IPv4 addresses encoded as specified by the 'IPv4address' rule in Section 3.2.2 of [RFC3986] and MUST support all IPv6 address formats specified in [RFC4291]. Server implementations SHOULD use IPv6 address formats specified in [RFC5952].
One of:
Note: Client implementations MUST support IPv4 addresses encoded as specified by the 'IPv4address' rule in Section 3.2.2 of [RFC3986] and MUST support all IPv6 address formats specified in [RFC4291]. Server implementations SHOULD use IPv6 address formats specified in [RFC5952].
A URI as specified in [RFC3986].
A time value expressed in seconds since Unix epoch in the UTC timezone.
This section specifies an interface to enable a Downstream CDN to retrieve CDNI Metadata objects from an Upstream CDN.
The interface can be used by a Downstream CDN to retrieve CDNI Metadata objects either dynamically as required by the Downstream CDN to process received requests (for example in response to receiving a CDNI Request Routing request from an Upstream CDN or in response to receiving a request for content from a User Agent) or in advance of being required.
The CDNI Metadata interface is built on the principles of RESTful web services. This means that requests and responses over the interface are built around the transfer of representations of hyperlinked resources. A resource in the context of the CDNI Metadata interface is any object in the Data Model (as described in Section 3 through Section 4).
In the general case a CDNI Metadata server makes each instance of an addressable CDNI Metadata object available via a unique URI that returns a representation of that instance of that CDNI Metadata object. When an object needs to reference another addressable CDNI Metadata object (for example a HostIndex object referencing a HostMetadata object) it does so by including a link to the referenced object.
CDNI Metadata servers are free to assign whatever structure they desire to the URIs for CDNI Metadata objects and CDNI Metadata clients MUST NOT make any assumptions regarding the structure of CDNI Metadata URIs or the mapping between CDNI Metadata objects and their associated URIs. Therefore any URIs present in the examples below are purely illustrative and are not intended impose a definitive structure on CDNI Metadata interface implementations.
The CDNI Metadata interface uses HTTP as the underlying protocol transport.
The HTTP Method in the request defines the operation the request would like to perform. Servers implementing the CDNI Metadata interface MUST support the HTTP GET and HEAD methods.
The corresponding HTTP Response returns the status of the operation in the HTTP Status Code and returns the current representation of the resource (if appropriate) in the Response Body. HTTP Responses from servers implementing the CDNI Metadata interface that contain a response body SHOULD include an ETag to enable validation of cached versions of returned resources.
The CDNI Metadata interface specified in this document is a read-only interface. Therefore support for other HTTP methods such as PUT, POST and DELETE etc. is not specified. Server implementations of this interface SHOULD reject all methods other than GET and HEAD.
As the CDNI Metadata interface builds on top of HTTP, CDNI Metadata servers may make use of any HTTP feature when implementing the CDNI Metadata interface, for example a CDNI Metadata server may make use of HTTP's caching mechanisms to indicate that the returned response/representation can be reused without re-contacting the CDNI Metadata server.
In the general case a CDNI Metadata server makes each instance of an addressable CDNI Metadata object available via a unique URI and therefore in order to retrieve CDNI Metadata, a CDNI Metadata client first makes a HTTP GET request for the URI of the HostIndex which provides the CDNI Metadata client with a list of Hostnames that the upstream CDN may delegate to the downstream CDN.
In order to retrieve the CDNI Metadata for a particular request the CDNI Metadata client processes the received HostIndex object and finds the corresponding HostMetadata entry (by matching the hostname in the request against the hostnames in the HostIndex). The CDNI metadata client then makes a GET request for the URI specified in the href key of that Host's entry in the HostIndex.
In order to retrieve the most specific metadata for a particular request, the CDNI metadata client inspects the HostMetadata for references to more specific PathMetadata objects. If any PathMetadata match the request, the CDNI metadata client makes another GET request for the PathMetadata. Each PathMetadata object may also include references to yet more specific metadata. If this is the case, the CDNI metadata client continues requesting PathMetadata recursively.
Where a downstream CDN is interconnected with multiple upstream CDNs, the downstream CDN must decide which upstream CDN's CDNI metadata should be used to handle a particular User Agent request.
When application level redirection (e.g. HTTP 302 redirects) is being used between CDNs, it is expected that the downstream CDN will be able to determine the upstream CDN that redirected a particular request from information contained in the received request (e.g. via the URI in case of HTTP redirection across CDNs). With knowledge of which upstream CDN routed the request, the downstream CDN can choose the correct metadata server from which to obtain the HostIndex. Note that the HostIndex served by each uCDN may be unique.
In the case of DNS redirection there is not sufficient information carried in the DNS request from User Agents to determine the upstream CDN that redirected a particular request and therefore downstream CDNs may have to apply local policy when deciding which upstream CDN's metadata to apply.
The URI for the HostIndex object of a given upstream CDN needs to be either discovered by or configured in the downstream CDN. All other objects/resources are then discoverable from the HostIndex object by following the links in the HostIndex object and the referenced HostMetadata and PathMetadata objects.
If the URI for the HostIndex object is not manually configured in the downstream CDN then the HostIndex URI could be discovered via the CDNI Control interface. An upstream CDN would provide the URI of the HostIndex object to the downstream CDN via the CDNI Control Interface.
Object are resources that may be:
In the descriptions of objects we use the term "X contains Y" to mean either Y is directly embedded in X or that Y is linked to by X. It is generally a deployment choice for the uCDN implementation to decide when and which CDNI Metadata objects to embed and which are separately addressable.
All MIME types are prefixed with "application/cdni." The MIME type for each object matches the type name of that object as defined by this document.Table 3 lists a few examples of the MIME Media Type for each object (resource) that is retrievable through the CDNI Metadata interface. The MIME type suffix depends on the metadata encoding, either "+xml" or "+json".
Data Object | MIME Media Type |
---|---|
HostIndex | application/cdni.HostIndex |
HostMatch | application/cdni.HostMatch |
HostMetadata | application/cdni.HostMetadata |
PathMatch | application/cdni.PathMatch |
PathMetadata | application/cdni.PathMetadata |
See http://www.iana.org/assignments/media-types/index.html for reference.
One possible encoding for a CDNI Metadata object is a JSON object containing a dictionary of (key,value) pairs where the keys are the property names and the values are the associated property values.
The keys of the dictionary are the names of the properties associated with the object and are therefore dependent on the specific object being encoded (i.e. dependent on the MIME Media Type of the returned resource). Likewise, the values associated with each key are dependent on the specific object being encoded (i.e. dependent on the MIME Media Type of the returned resource).
Dictionary keys in JSON are case sensitive and therefore any dictionary key defined by this document (for example the names of CDNI Metadata object properties) MUST always be represented in lowercase.
In addition to the properties specific to each object type, the keys defined below may be present in any object.
A downstream CDN may request the HostIndex and receive the following object of type "application/cdni.HostIndex+json":
{ "hosts": [ { "host": "video.example.com", "links": [ { "rel": "host-metadata", "type": "application/cdni.HostMetadata", "href": "http://metadata.example.ucdn.com/video" } ] }, { "host": "images.example.com", "links": [ { "rel": "host-metadata", "type": "application/cdni.HostMetadata", "href": "http://metadata.ucdn.example.com/images" } ] } ] }
If the incoming request has a Host header with "video.example.com" then the downstream CDN would fetch from the next metadata object from "http://metadata.ucdn.example.com/video" expecting a MIME type of "application/cdni.HostMetadata+json":
{ "metadata": [ { "type": "application/cdni.SourceMetadata", "value": { "sources": [ { "links": [{ "rel": "auth", "type": "application/cdni.Auth", "href": "http://metadata.ucdn.example.com/auth1234" }], "endpoint": "acq1.ucdn.example.com", "protocol": "ftp" }, { "links": [{ "rel": "auth", "type": "application/cdni.Auth", "href": "http://metadata.ucdn.example.com/auth1234" }], "endpoint": "acq2.ucdn.example.com", "protocol": "http" } ] } }, { "type": "application/cdni.LocationACL", "value": { "locations": [ { "locations": [ { "iprange": "192.168.0.0/16" } ], "action": "deny" } ] } }, { "type": "application/cdni.ProtocolACL", "value": { "protocols": [ { "protocols": [ "ftp" ], "action": "deny" } ] } } ], "paths": [ { "path-pattern": { "pattern": "/videos/trailers/*" }, "links": [{ "rel": "path-metadata", "type": "application/cdni.PathMetadata", "href": "http://metadata.ucdn.example.com/videos/trailers" }] }, { "path-pattern": { "pattern": "/videos/movies/*" }, "links": [{ "rel": "pathmetadata", "type": "application/cdni.PathMetadata", "href": "http://metadata.ucdn.example.com/videos/movies" }] } ] }
Suppose the path of the requested resource matches the "/video/movies/*" pattern, the next metadata requested would be for "http://metadata.ucdn.example.com/video/movies" with an expected type of "application/cdni.PathMetadata":
{ "metadata": [], "paths": [ { "path-pattern": { "pattern": "/videos/movies/hd/*" }, "links": [{ "rel": "pathmetadata", "type": "application/cdni.PathMetadata", "href": "http://metadata.ucdn.example.com/videos/movies/hd" }] } ] }
Finally, if the path of the requested resource also matches the "/videos/movies/hd/*" pattern, the downstream CDN would also fetch the following object from "http://metadata.ucdn.example.com/videos/movies/hd" with MIME type "application/cdni.PathMetadata":
{ "metadata": [ { "type": "application/cdni.TimeWindowACL", "value": { "times": [ "times": [ { "start": "1213948800", "end": "1327393200" } ], "type": "allow" ] } } ] }
Another possible encoding for a CDNI Metadata object is an XML document containing elements with tag names which match property names and values which match the associated property values.
Tag names of elements are the names of the properties associated with the object and are therefore dependent on the specific object being encoded (i.e. dependent on the MIME Media Type of the returned resource). Likewise, the values associated with each element are dependent on the specific object being encoded (i.e. dependent on the MIME Media Type of the returned resource).
Lists are encoded by repeating the singular form of a property name. For example the "hosts" property is a list of "HostMatch" objects. This list would be encoded as multiple "host" elements.
Link objects are a special case. If a Link object replaces a property then a "link" element replaces the expected element. The properties of the Link object are encoded as XML attributes. The type attribute is set to the MIME type of the target object. The href attribute is set to the URI of the target object. The rel attribute is set to the name of the element being replaced.
A downstream CDN may request the HostIndex and receive the following object of type "application/cdni.HostIndex+xml":
<HostIndex> <host> <host>video.example.com</host> <link rel="host-metadata" type="application/cdni.HostMetadata" href="http://metadata.ucdn.example.com/video"/> </host> <host> <host>images.example.com</host> <link rel="host-metadata" type="application/cdni.HostMetadata" href="http://metadata.ucdn.example.com/images"/> </host> </HostIndex>
If the incoming request has a Host header with "video.example.com" then the downstream CDN would fetch from the next metadata object from "http://metadata.ucdn.example.com/video" expecting a MIME type of "application/cdni.HostMetadata+xml":
<HostMetadata> <metadata> <type>application/cdni.SourceMetadata</type> <value> <sources> <link rel="auth" type="application/cdni.Auth" href="http://metadata.ucdn.example.com/auth1234"/> <endpoint>acq1.ucdn.example.com</endpoint> <protocol>ftp</protocol> </source> <source> <link rel="auth" type="application/cdni.Auth" href="http://metadata.ucdn.example.com/auth1234"/> <endpoint>acq2.ucdn.example.com</endpoint> <protocol>http</protocol> </source> </value> </metadata> <metadata> <type>application/cdni.LocationACL</type> <value> <location> <location> <iprange>192.168.0.0/16</iprange> </location> <action>deny</type> </location> </value> </metadata> <metadata> <type>application/cdni.ProtocolACL</type> <value> <protocol> <protocol>ftp</protocol> <action>deny</action> </protocol> </value> </metadata> <path> <path-pattern> <pattern>/videos/trailers/*"</pattern> </path-pattern> <link rel="path-metadata" type="application/cdni.PathMetadata" href="http://metadata.ucdn.example.com/videos/trailers"/> </path> <path> <path-pattern> <pattern>/videos/movies/*"</pattern> </path-pattern> <link rel="path-metadata" type="application/cdni.PathMetadata" href="http://metadata.ucdn.example.com/videos/movies"/> </path> </HostMetadata>
Suppose the path of the requested resource matches the "/video/movies/*" pattern, the next metadata requested would be for "http://metadata.ucdn.example.com/video/movies" with an expected type of "application/cdni.PathMetadata":
<PathMetadata> <path> <path-pattern> <pattern>/videos/movies/hd/*</pattern> </path-pattern> <link rel="path-metadata" type="application/cdni.PathMetadata" href="http://metadata.ucdn.example.com/videos/movies/hd"/> </path> </PathMetadata>
Finally, if the path of the requested resource also matches the "/videos/movies/hd/*" pattern, the downstream CDN would also fetch the following object from "http://metadata.ucdn.example.com/videos/movies/hd" with MIME type "application/cdni.PathMetadata":
<PathMetadata> <metadata> <type>application/cdni.TimeWindowACL</type> <value> <time> <time> <start>1213948800</start> <end>1327393200</end> </time> <type>allow</type> </time> </metadata> </PathMetadata>
The set of property Metadata may be extended with proprietary and/or custom property Metadata. The GenericMetadata object defined in Section 4.1.7 allows any Metadata property to be included in either the HostMetadata or PathMetadata lists. As described in Section 3.4, it is suggested that proprietary and/or custom property Metadata be identified by the "ext." prefix in an appropriately descriptive type which conveys the organization defining the property Metadata and the function of the property Metadata.
Note: Identification of the property Metadata defining organization in the property Metadata type decreases the possibility of property Metadata type collision.
At any given time, the set of property Metadata supported by the uCDN may not match the set of property Metadata supported by the dCDN. The uCDN may or may not know which property Metadata the dCDN supports. In cases where the uCDN supports Metadata that the dCDN does not, the dCDN MUST be aware of any Metadata marked as "mandatory-to-enforce". If a CDN does not understand or is unable to perform the functions associated with any "mandatory-to-enforce" Metadata, the CDN MUST NOT service any requests for the corresponding content.
Note: Ideally, uCDNs would not delegate content requests to a dCDN which does not support the Metadata associated with the content being requested. However, even if the uCDN has a priori knowledge of the Metadata supported by the dCDN (e.g., via the CDNI capabilities interface or through out-of-band negotiation between CDN operators) Metadata support may fluctuate or be inconsistent (e.g., due to mis-communication, mis-configuration, or temporary outage). The dCDN MUST evaluate all Metadata associated with content requests and reject any requests where "mandatory-to-enforce" Metadata associated with the content cannot be enforced.
It is possible that new Metadata definitions may obsolete or override existing property Metadata (e.g., a future revision of the CDNI Metadata interface may redefine the Auth Metadata or a custom vendor extension may implement an alternate Auth Metadata option). If multiple Metadata (e.g., cdni.v2.Auth, ext.vendor1.Auth, and ext.vendor2.Auth) all override an existing Metadata (e.g., cdni.Auth) and all are marked as "mandatory-to-enforce", it may be ambiguous which Metadata should be applied, especially if the functionality of the Metadata conflict.
As described in Section 3.3, Metadata override only applies to Metadata objects of the same exact type, found in HostMetadata and nested PathMetadata structures. The CDNI Metadata interface does not support enforcement of dependencies between different Metadata types. It is the responsibility of the CSP and the CDN operators to ensure that Metadata assigned to a given content asset do not conflict.
Note: Because Metadata is inherently ordered in GenericMetadata lists, as well as in the PathMetadata hierarchy and PathMatch lists, multiple conflicting Metadata types MAY be used, however, Metadata hierarchies MUST ensure that independent PathMatch root objects are used to prevent ambiguous or conflicting Metadata definitions.
This document requests the registration of the "application/cdni" MIME type.
[Ed. Need to consider a registry for Metadata type identifiers.]
The CDNI Metadata Interface is expected to be secured as a function of the transport protocol (e.g. HTTP authentication, HTTPS, or inter-domain IPSec).
If a malicious metadata server is contacted by a downstream CDN, the malicious server may provide metadata to the downstream CDN which denies service for any piece of content to any user agent. The malicious server may also provide metadata which directs a downstream CDN to a malicious origin server instead of the actual origin server.
A malicious metadata client could request metadata for a piece of content from an upstream CDN. The metadata information may then be used to glean information regarding the uCDN or to contact an upstream origin server. The uCDN is expected to authenticate client requests to prevent this situation.
The authors would like to thank David Ferguson and Francois le Faucheur for their valuable comments and input to this document.
[RFC2119] | Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. |
[RFC4291] | Hinden, R. and S. Deering, "IP Version 6 Addressing Architecture", RFC 4291, February 2006. |
[RFC5952] | Kawamura, S. and M. Kawashima, "A Recommendation for IPv6 Address Text Representation", RFC 5952, August 2010. |
[I-D.ietf-cdni-problem-statement] | Niven-Jenkins, B, Faucheur, F and N Bitar, "Content Distribution Network Interconnection (CDNI) Problem Statement", Internet-Draft draft-ietf-cdni-problem-statement-03, January 2012. |
[I-D.davie-cdni-framework] | Davie, B and L Peterson, "Framework for CDN Interconnection", Internet-Draft draft-davie-cdni-framework-00, July 2011. |
[RFC3986] | Berners-Lee, T., Fielding, R. and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, January 2005. |
[RFC4287] | Nottingham, M. and R. Sayre, "The Atom Syndication Format", RFC 4287, December 2005. |
[RFC4151] | Kindberg, T. and S. Hawke, "The 'tag' URI Scheme", RFC 4151, October 2005. |
[I-D.zyp-json-schema] | Zyp, K and G Court, "A JSON Media Type for Describing the Structure and Meaning of JSON Documents", Internet-Draft draft-zyp-json-schema-03, November 2010. |
[I-D.ietf-cdni-requirements] | Leung, K and Y Lee, "Content Distribution Network Interconnection (CDNI) Requirements", Internet-Draft draft-ietf-cdni-requirements-02, December 2011. |
[XML-BASE] | Marsh, J and R Tobin, "XML Base (Second Edition) - http://www.w3.org/TR/xmlbase/", January 2009. |
Section 6 of [I-D.ietf-cdni-requirements] lists the requirements for the CDNI Metadata Distribution interface. This section outlines which of those requirements are met by the CDNI Metadata interface specified in this document.
All metadata requirements are met either directly or indirectly by the CDNI Metadata Interface described in this document. The following paragraphs describe notable exceptions.
Requirements related to pre-positioning of metadata are not met directly by this document. Triggering metadata pre-positioning is beyond the scope of the CDNI Metadata interface. However, the interface as described by this document supports pulling metadata on-demand for the purpose of pre-positioning.
Requirement META-13 relating to feedback from the downstream CDN to the upstream CDN with respect to metadata is not directly supported by the pull-based interface described in this document. As an alternative, the downstream CDN may use the CDNI Logging interface to convey error conditions related to metadata.
Requirement META-18 relating to surrogate cache behavior parameters is supported via extensibility. However, the example parameters in META-18 are not described in this document.