<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="4"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std" docName="draft-leung-cdni-uri-signing-02"
     ipr="trust200902">
  <front>
    <title abbrev="CDNI URI Signing">URI Signing for CDN Interconnection
    (CDNI)</title>

    <author fullname="Kent Leung" initials="K" surname="Leung">
      <organization>Cisco Systems</organization>

      <address>
        <postal>
          <street>3625 Cisco Way</street>

          <city>San Jose</city>

          <code>95134</code>

          <country>USA</country>
        </postal>

        <phone>+1 408 526 5030</phone>

        <email>kleung@cisco.com</email>
      </address>
    </author>

    <author fullname="Francois Le Faucheur" initials="F. "
            surname="Le Faucheur">
      <organization>Cisco Systems</organization>

      <address>
        <postal>
          <street>Greenside, 400 Avenue de Roumanille</street>

          <city>Sophia Antipolis</city>

          <code>06410</code>

          <country>France</country>
        </postal>

        <phone>+33 4 97 23 26 19</phone>

        <email>flefauch@cisco.com</email>
      </address>
    </author>

    <author fullname="Bill Downey" initials="B" surname="Downey">
      <organization>Verizon Labs</organization>

      <address>
        <postal>
          <street>60 Sylvan Road</street>

          <city>Waltham</city>

          <region>Massachusetts</region>

          <code>02451</code>

          <country>USA</country>
        </postal>

        <phone>+1 781 466 2475</phone>

        <email>william.s.downey@verizon.com</email>
      </address>
    </author>

    <author fullname="Ray van Brandenburg" initials="R"
            surname="van Brandenburg">
      <organization>TNO</organization>

      <address>
        <postal>
          <street>Brassersplein 2</street>

          <city>Delft</city>

          <region/>

          <code>2612CT</code>

          <country>the Netherlands</country>
        </postal>

        <phone>+31 88 866 7000</phone>

        <email>ray.vanbrandenburg@tno.nl</email>
      </address>
    </author>

    <author fullname="Scott Leibrand" initials="S" surname="Leibrand">
      <organization>Limelight Networks</organization>

      <address>
        <postal>
          <street>222 S Mill Ave</street>

          <city>Tempe</city>

          <region>AZ</region>

          <code>85281</code>

          <country>USA</country>
        </postal>

        <phone>+1 360 419 5185</phone>

        <email>sleibrand@llnw.com</email>
      </address>
    </author>

    <date day="31" month="May" year="2013"/>

    <workgroup>CDNI</workgroup>

    <abstract>
      <t>This document describes how the concept of URI signing supports the
      content access control requirements of CDNI and proposes a candidate URI
      signing scheme.</t>

      <t>The proposed URI signing method specifies the information needed to
      be included in the URI and the algorithm used to authorize and to
      validate access request for the content referenced by the URI. Some of
      the information may be accessed by the CDN via configuration or CDNI
      metadata.</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>This document describes the concept of URI Signing and how it can be
      used to provide access authorization in the case of interconnected CDNs
      (CDNI). The primary goal of URI Signing is to make sure that only
      authorized User Agents (UAs) are able to access the content, with a
      Content Service Provider (CSP) being able to authorize every individual
      request. It should be noted that URI Signing is not a content protection
      scheme; if a CSP wants to protect the content itself, other mechanisms,
      such as DRM, are more appropriate.</t>

      <t/>

      <t>The overall problem space for CDN Interconnection (CDNI) is described
      in <xref target="RFC6707">CDNI Problem Statement</xref>. In this
      document, along with the <xref target="I-D.ietf-cdni-requirements">CDNI
      Requirements</xref> document and the <xref
      target="I-D.ietf-cdni-framework">CDNI Framework </xref> the need for
      interconnected CDNs to be able to implement an access control mechanism
      that enforces the CSP's distribution policy is described.</t>

      <t>Specifically, <xref target="I-D.ietf-cdni-framework">CDNI
      Framework</xref> states:</t>

      <t>"The CSP may also trust the CDN operator to perform actions such as
      ..., and to enforce per-request authorization performed by the CSP using
      techniques such as URI signing."</t>

      <t>In particular, the following requirement is listed in <xref
      target="I-D.ietf-cdni-requirements">CDNI Requirements</xref>:</t>

      <t>"MI-16 [HIGH] The CDNI Metadata Distribution interface shall allow
      signaling of authorization checks and validation that are to be
      performed by the surrogate before delivery. For example, this could
      potentially include:</t>

      <t>* need to validate URI signed information (e.g. Expiry time, Client
      IP address)."</t>

      <t>This document proposes a URI Signing scheme that allows Surrogates in
      interconnected CDNs to enforce a per-request authorization performed by
      the CSP. Splitting the role of performing per-request authorization by
      CSP and the role of validation of this authorization by the CDN allows
      any arbitrary distribution policy to be enforced across CDNs without the
      need of CDNs to have any awareness of the actual CSP distribution
      policy.</t>

      <section title="Terminology">
        <t>This document uses the terminology defined in <xref
        target="RFC6707">CDNI Problem Statement </xref>.</t>

        <t>This document also uses the terminology of <xref
        target="RFC2104">Keyed-Hashing for Message Authentication
        (HMAC)</xref> including the following terms (reproduced here for
        convenience):</t>

        <t><list style="symbols">
            <t>MAC: message authentication code.</t>

            <t>HMAC: Hash-based message authentication code (HMAC) is a
            specific construction for calculating a MAC involving a
            cryptographic hash function in combination with a secret key.</t>

            <t>HMAC-SHA1: HMAC instantiation using SHA1 as the cryptographic
            hash function.</t>

            <t>HMAC-MD5: HMAC instantiation using MD5 as the cryptographic
            hash function.</t>
          </list></t>

        <t>In addition, the following terms are used throughout this
        document:</t>

        <t><list style="symbols">
            <t>URI Signature: Message digest or digital signature that is
            computed with an algorithm for protecting the URI.</t>

            <t>Original URI: The URI before URI Signing is applied.</t>

            <t>Signed URI: Any URI that contains a URI signature.</t>

            <t>Target CDN URI: Embedded URI created by the CSP to direct UA
            towards the Upstream CDN. The Target CDN URI can be signed by the
            CSP and verified by the Upstream CDN.</t>

            <t>Redirection URI: URI created by the Upstream CDN to redirect UA
            towards the Downstream CDN. The Redirection URI can be signed by
            the Upstream CDN and verified by the Downstream CDN. In a cascaded
            CDNI scenario, there can be more than one Redirection URI.</t>
          </list></t>
      </section>

      <section anchor="overview" title="URI Signing Overview">
        <t>The following section provides an informative overview of how URI
        Signing works in CDNI scenarios. In order to do so, URI Signing is
        first explained in terms of a single CDN delivering content on behalf
        of a CSP.</t>

        <t>A CSP and CDN are assumed to have a trust relationship that enables
        the CSP to authorize access to a content item by including a set of
        attributes in the URI before redirecting a UA to the CDN. Using these
        attributes, it is possible for a CDN to check an incoming content
        request to see whether it was authorized by the CSP (e.g. based on the
        UA's IP address or a time window). Of course, the attributes need to
        be added to the URI in a way that prevents a UA from changing the
        attributes, thereby leaving the CDN to think that the request was
        authorized by the CSP when in fact it wasn't. For this reason, a URI
        Signing mechanism includes in the URI a message digest or digital
        signature that allows a CDN to check the authenticity of the URI. The
        message digest or digital signature can be calculated based on a
        shared secret between the CSP and CDN or using asymetric
        public/private keys, respectively.</t>

        <t>Figure 1, shown below, presents an overview of the URI Signing
        mechanism in the case of a CSP with a single CDN. In this particular
        example, the CSP and CDN have exchanged a (symmetric) shared secret
        key. Once the UA sends a content request to the CSP (#1), the CSP
        responds by directing the UA towards the CDN using an embedded Target
        CDN URI (#2). The CSP may include in this URI the IP address of the UA
        and/or a time window. Finally, it signs the URI using the shared
        secret. Once the UA receives the response with the embedded URI, it
        sends a new request using the embedded URI to the CDN (#3). Upon
        receiving the request, the CDN checks to see if the URI is authentic
        by verifying the URI signature. In addition, it checks whether the IP
        address of the UA matches that in the URI and if the time window is
        still valid. After these values are confirmed to be valid, the CDN
        starts the content delivery process (#4).</t>

        <figure title="Figure 1: URI Signing in a CDN Environment">
          <artwork> 

                --------
               /        \
               |   CSP  |&lt; * * * * * * * * * * *
               \        /        Trust         *
                --------      relationship     *
                  ^  |       (symmetric key)   *
                  |  |                         *
       1. Request |  | 2. Signed               *
            for   |  |    URI                  *
          content |  |                         *
                  |  v                         v
                +------+ 3. Signed URI     --------
                | User |-----------------&gt;/        \
                | Agent|                  |  CDN   |
                |      |&lt;-----------------\        /
                +------+ 4. Content        --------
                            Delivery

</artwork>
        </figure>

        <t>In CDNI scenarios, URI Signing operates the same way in the initial
        steps (#1-#3) but the later steps involve multiple CDNs in the process
        of delivering the content. The main difference from the single CDN
        case is a redirection step between the Upstream CDN and the Downstream
        CDN. Depending on whether HTTP-based or DNS-based request routing is
        in use, the Upstream CDN responds by directing the UA towards the
        Downstream CDN using either a Redirection URI or a DNS reply,
        respectively (#4). Once the UA receives the response, it sends the
        Redirection URI/Target CDN URI to the Downstream CDN (#5). The
        received URI is validated by the Downstream CDN before delivering the
        content (#6). This is depicted in the figure below. Note: The CDNI
        call flows are covered in <xref target="operation">Detailed URI
        Signing Operation</xref>.</t>

        <figure title="Figure 2: URI Signing in a CDNI Environment">
          <artwork> 

                --------
               /        \
               |   CSP  |&lt; * * * * * * * * * * *
               \        /        Trust         *
                --------      relationship     *
                  ^  |       (symmetric key)   *
                  |  |                         *
       1. Request |  | 2. Signed               *
            for   |  |    URI                  *
          content |  |                         *
                  |  v   3. Signed URI         v
                +------+    or DNS request --------
                | User |-----------------&gt;/        \
                | Agent|                  |  uCDN  |
                |      |&lt;-----------------\        /
                +------+ 4. Redirection URI--------
                  ^  |      or DNS Reply       ^ 
                  |  |                         * Trust relationship
                  |  |                         *  (symmetric key)
                  |  | 5. Redirection URI      v
                  |  |    or Signed URI    --------
                  |  +-------------------&gt;/        \ [May be
                  |                       |  dCDN  |  cascaded
                  +-----------------------\        /  CDNs]
                       6. Content          --------  
                          delivery
           
</artwork>
        </figure>

        <t>The trust relationships between CSP, Upstream CDN, and Downstream
        CDN have direct implications for URI Signing. In the case shown in
        Figure 2, the CDN that the CSP has a trust relationship with is the
        Upstream CDN. The delivery of the content may be delegated to the
        Downstream CDN, which has a relationship with the Upstream CDN but may
        have no relationship with the CSP.</t>

        <t>In CDNI, there are two methods for request routing: DNS-based and
        HTTP-based. For DNS-based request routing, the Signed URI (i.e. Target
        CDN URI) provided by the CSP reaches the Downstream CDN directly. In
        the case where the Downstream CDN does not have a trust relationship
        with the CSP, this means that only an asymetric public/private key
        method can be used for computing the URI signature because the CSP and
        Downstream CDN are not able to exchange symmetric shared secret keys.
        Since the CSP is unlikely to have relationships with all the
        Downstream CDNs that are delegated to by the Upstream CDN, CSP may
        choose to allow the Authoritative CDN to redistribute the shared key
        to a subset of their Downstream CDNs .</t>

        <t>For HTTP-based request routing, the Signed URI (i.e. Target CDN
        URI) provided by the CSP reaches the Upstream CDN. After this URI has
        been verified to be correct by the Upstream CDN, the Upstream CDN
        creates a new Redirection URI to redirect the UA to the Downstream
        CDN. Since this new URI also has a new URI signature, this new
        signature can be based around the trust relationship between the
        Upstream CDN and Downstream CDN, and the relationship between the
        Downstream CDN and CSP is not relevant. Given the fact that such a
        relationship between Upstream CDN and Downstream CDN always exists,
        both asymmetric public/private keys and symmetric shared secret keys
        can be used for URI Signing.</t>
      </section>
    </section>

    <section anchor="uri_format" title="Signed URI  Format">
      <t>The concept behind URI Signing is based on embedding in the Target
      CDN URI/Redirection URI some attributes that can be validated to ensure
      the UA has legitimate access to the content. In the URI signing
      mechanism that is described in this section, four types of attributes
      may be embedded in the URI:</t>

      <t><list style="symbols">
          <t>Enforcement Attributes: Attributes that are used to enforce a
          distribution policy defined by the CSP. Examples of enforcement
          attributes are IP address of the UA and time window.</t>

          <t>Signature Computation Attributes: Attributes that are used by the
          CDN to verify the URI signature embedded in the received URI. In
          order to verify a URI signature, the CDN requires some attributes
          that describe how the URI signature was generated. Examples of
          Signature Computation Attributes include the used HMAC's hash
          function and/or the key identifier.</t>

          <t>URI Signature Attributes: The attribute that contains the actual
          message digest or digital signature representing the URI signature
          and conveying the integrity and authenticity of the URI.</t>

          <t>URI Signing Token Attribute: The attribute that obfuscates all
          the other URI Signing attributes in the Signed URI.</t>
        </list></t>

      <t>Two types of keys can be used for URI Signing: asymmetric keys and
      symmetric keys. Asymmetric keys are based on a public/private key pair
      mechanism and always contain a private key only known to the CDN (or
      CSP) signing the URI and a public key for the verification of the Signed
      URI. Regardless of the type of key used, the entity that validates the
      URI has to obtain the key. There are very different requirements for key
      distribution with asymmetric keys and with symmetric keys. Key
      distribution for symmetric keys requires confidentiality to prevent
      another party from getting access to the key, since it could then
      generate valid Signed URIs for unauthorized requests. Key distribution
      for asymmetric keys does not require confidentiality since public keys
      can typically be distributed openly (because they cannot be used for URI
      signing) and private keys are kept by the URI signing function.</t>

      <section anchor="enforce_attributes" title="Enforcement Attributes">
        <t>This section identifies the set of attributes that may be needed to
        enforce the CSP distribution policy. These attributes are protected by
        the URI signature. New attributes may be introduced in the future to
        extend the capabilities of the distribution policy.</t>

        <t>In order to provide flexibility in distribution policies to be
        enforced, the exact subset of attributes used for URI signature in a
        given request is a deployment decision. The defined keyword for each
        query string attribute is specified in parenthesis below.</t>

        <t>The following attributes are used to enforce the distribution
        policy:</t>

        <t><list style="symbols">
            <t>Expiry Time (ET) [optional] - Time when the Signed URI expires.
            This is represented in seconds since midnight 1/1/1970 UTC (i.e.
            UNIX epoch). The request is rejected if the received time is later
            than this timestamp. Note: The time including time zone on the
            entities that generate and validate the signed URI need to be in
            sync (e.g. NTP is used).</t>

            <t>Client IP (CIP) [optional] - IP address of the client for which
            this signed URI is generated. This is represented in dotted
            decimal format for IPv4 or canonical text representation for <xref
            target="RFC5952">IPv6 address</xref> . The request is rejected if
            sourced from a client with a different IP address.</t>
          </list></t>

        <t>The Expiry Time attribute ensures that the content authorization
        expires after a predetermined time. This limits the time window for
        content access and prevents replay of the request beyond the
        authorized time window.</t>

        <t>The Client IP attribute is used to restrict content access to a
        particular User Agent, based on its IP address for whom the content
        access was authorized.</t>
      </section>

      <section anchor="compute_attributes"
               title="Signature Computation Attributes">
        <t>This section identifies the set of attributes that may be needed to
        verify the URI (signature). New attributes may be introduced in the
        future if new URI signing algorithms are developed.</t>

        <t>The defined keyword for each query string attribute is specified in
        parenthesis below.</t>

        <t>The following attributes are used to verify the URI
        (signature).</t>

        <t><list style="symbols">
            <t>Version (VER) [optional] - An integer used for identifying the
            version of URI signing method.</t>

            <t>Key ID (KID) [optiona] - A string used for obtaining the key
            (e.g. database lookup, URI reference) which is needed to validate
            the URI signature.</t>

            <t>Hash Function (HF) [optional] - A string used for identifying
            the hash function to compute the URI signature (e.g. "MD5",
            "SHA1") with HMAC.</t>
          </list></t>

        <t>The Version attribute indicates which version of URI signing scheme
        is used (including which attributes and algorithms are supported). The
        present document specifies Version 1. If the Version attribute is not
        present in the Signed URI, the version is considered to have been set
        to 1. More versions may be defined in the future.</t>

        <t>The Key ID attribute is used to retrieved the key which is needed
        as input to the algorithm for validating the Signed URI.</t>

        <t>The Hash Function attribute indicates the hash function to be used
        for HMAC-based message digest computation.</t>
      </section>

      <section anchor="signature_attributes" title="URI Signature Attributes">
        <t>The following attributes are used to convey the actual URI
        signature.</t>

        <t><list style="symbols">
            <t>Message Digest (MD) [mandatory for symmetric key] - A string
            used for the message digest generated by the URI signer.</t>

            <t>Digital Signature (DS) [mandatory for asymmetric keys] - A
            string used for the digital signature provided by the URI
            signer.</t>
          </list></t>

        <t>The Message Digest attribute contains the message digest used to
        validate the Signed URI when symmetric key is used. In the case of
        symmetric key, HMAC algorithm is used for the following reasons: 1)
        Ability to use hash functions (i.e. no changes needed) with well
        understood cryptographic properties that perform well and for which
        code is freely and widely available, 2) Easy to replace the embedded
        hash function in case faster or more secure hash functions are found
        or required, 3) Original performance of the hash function is
        maintained without incurring a significant degradation, and 4) Simple
        way to use and handle keys.</t>

        <t>The Digital Signature attribute contains the digital signature used
        to verify the Signed URI when asymmetric keys are used. In the case of
        asymmetric keys, Elliptic Curve Digital Signature Algorithm (EC DSA) -
        a variant of DSA - is used because of the following reasons: 1) Key
        size is small while still offering good security, 2) Key is easy to
        store, and 3) Computation is faster than DSA or RSA.</t>
      </section>

      <section anchor="token_attribute" title="URI Signing Token Attribute">
        <t>As an option to avoid exposing all the URI Signing attributes in
        the URI, the attributes can be obfuscated by including only the URI
        Signing token in the Signed URI. This also reduces the number of
        attributes that are appended to the Original URI to just one. The
        intent is to hide the information (e.g. IP address) from view for the
        common user who is not aware of the encoding scheme. It is not a
        security method since anyone who knows the encoding scheme is able to
        obtain the clear text.</t>

        <t>The following attribute is used to convey the tokenized set of URI
        Signing attributes in the Signed URI.<list style="symbols">
            <t>URI Signing Token (UST) [optional] - The encoded token
            containing the URI Signing attributes.</t>
          </list></t>

        <t>The URI Signing Token attribute contains the URI Signing attributes
        in <xref target="RFC4648">Base-64 Data Encoding</xref> format. When
        this attribute is used, it is the only URI Signing attribute exposed
        in the Signed URI. The attribute MUST be the last attribute in the
        query string of the URI. The CDNI Metadata Interface may override the
        encoding format used in the "UST" attribute.</t>
      </section>
    </section>

    <section anchor="signing_uri" title="Signing a URI">
      <t>The following procedure for signing a URI defines the algorithms in
      this version of URI Signing. Note that some steps may be skipped if the
      URI Signing attribute is not needed to enforce the distribution policy.
      A URI (as defined in <xref target="RFC3986">URI Generic Syntax</xref>)
      contains the following parts: scheme name, authority, path, query, and
      fragment. The entire URI except the "scheme name" part is protected by
      the URI signature. This allows the URI signature to be validated
      correctly in the case when a client performs a fallback to another
      scheme (e.g. HTTP) for a content referenced by an URI with a specific
      scheme (e.g. RTSP). The benefit is that the content access is protected
      regardless of the type of transport used for delivery.</t>

      <t>Note: The following URI signing steps are specified to generate a
      Signed URI. However, it is possible to use some other algorithm and
      implementation as long as the same result is achieved. An example for
      the Original URI, "http://example.com/content.mov", is used to clarify
      the steps.</t>

      <t>The URI Signing attributes are appended to the protected portion of
      the URI to compute the URI signature.<list style="numbers">
          <t>Copy the Original URI, excluding the "scheme name" part, into a
          buffer to hold the message for performing the operations below.</t>

          <t>Check if the URI already contains a query string. If not, append
          a "?" character. If yes, append an "&amp;" character.</t>

          <t>If the version needs to be specified, then append the string
          "VER=1". This represents the version of URI Signing specified by
          this document.</t>

          <t>If time window enforcement is needed, then perform the this step
          and the next two steps. Append the string "&amp;ET=".</t>

          <t>Get the current time in seconds since epoch (as an integer). Add
          the validity time in seconds as an integer.</t>

          <t>Convert this integer to a string and append to the message.</t>

          <t>If client IP address enforcement is needed, then perform this
          step and the next step. Append the string "&amp;CIP=".</t>

          <t>Convert the client's IP address in dotted decimal notation format
          (i.e. for IPv4 address) or canonical text representation (for <xref
          target="RFC5952">IPv6 address</xref>) to a string and append to the
          message.</t>

          <t>Depending on the type of key used to sign the URI, compute the
          message digest or digital signature for symmetric key or asymmetric
          keys, respectively.<list style="letters">
              <t>For symmetric key, HMAC is used.<list>
                  <t>Obtain the shared key to be used for signing the URI.</t>

                  <t>If the key identifier needs to be specified, then perform
                  this step and the next step. Append the string
                  "&amp;KID=".</t>

                  <t>Append the key identifier (e.g. "example:keys:123")
                  needed by the entity to locate the shared key for validating
                  the URI signature.</t>

                  <t>If the hash function for HMAC needs to be specified, then
                  perform this step and the next step. Append the string
                  "&amp;HF=".</t>

                  <t>Append the string for the type of hash function (e.g.
                  "MD5", "SHA-1")</t>

                  <t>Append the string "&amp;MD=".</t>

                  <t>The message contains the complete section of the URI that
                  is protected. (e.g.
                  "://example.com/content.mov?VER=1&amp;ET=1209422976&amp;CIP=10.0.0.1&amp;KID=example:keys:123&amp;HF=SHA-1&amp;MD=").</t>

                  <t>Compute the message digest (note: this is the URI
                  signature) using the HMAC algorithm with the shared key and
                  message as the two inputs to the hash function which is
                  specified by the "HF" attribute.</t>

                  <t>Convert the message digest to its equivalent human
                  readable value.</t>

                  <t>Append the string for the message digest (e.g.
                  "://example.com/content.mov?VER=1&amp;ET=1209422976&amp;CIP=10.0.0.1&amp;KID=example:keys:123&amp;HF=SHA-1&amp;MD=4fb1c1adf1588fbe11cc6a04c6e69f35").</t>
                </list></t>

              <t>For asymmetric keys, EC DSA is used.<list>
                  <t>Generate the EC private and public key pair. Store the EC
                  public key in a location that's reachable for any entity
                  that needs to validate the URI signature.</t>

                  <t>If the key identifier needs to be specified, then perform
                  this step and the next step. Append the string
                  "&amp;KID=".</t>

                  <t>Append the key identifier (e.g.
                  "http://example.com/public/keys/123") needed by the entity
                  to locate the shared key for validating the URI signature.
                  Note the Key ID URI contains only the "scheme name",
                  "authority", and "path" parts.</t>

                  <t>Append the string "&amp;DS=".</t>

                  <t>The message contains the complete section of the URI that
                  is protected. (e.g.
                  "://example.com/content.mov?VER=1&amp;ET=1209422976&amp;CIP=10.0.0.1&amp;KID=http://example.com/public/keys/123&amp;DS=").</t>

                  <t>Compute the message digest using SHA-1 (without a key)
                  for the message.</t>

                  <t>Compute the digital signature (note: this is the URI
                  signature) using the EC DSA algorithm with the private EC
                  key and message digest (obtained in previous step) as
                  inputs.</t>

                  <t>Convert the digital signature to its equivalent human
                  readable value.</t>

                  <t>Append the string for the digital signature which
                  contains the values for the 'r' and 's' parameters. The
                  (r,s) pair is denoted by ':' (e.g.
                  "://example.com/content.mov?VER=1&amp;ET=1209422976&amp;CIP=10.0.0.1&amp;KID=http://example.com/public/keys/123&amp;DS=r:CFB03EDB33810AB6C79EE3C47FBD86D227D702F25F66C01CF03F59F1E005668D:s:57ED0E8DF7E786C87E39177DD3398A7FB010E6A4C0DC8AA71331A929A29EA24E"
                  )</t>
                </list></t>
            </list></t>

          <t>Generate the Signed URI (i.e. when tokenizing the URI Signing
          attributes is not necessary) by prepending the "scheme name" part to
          the message (e.g.
          http://example.com/content.mov?VER=1&amp;ET=1209422976&amp;CIP=10.0.0.1&amp;KID=http://example.com/public/keys/123&amp;DS=r:CFB03EDB33810AB6C79EE3C47FBD86D227D702F25F66C01CF03F59F1E005668D:s:57ED0E8DF7E786C87E39177DD3398A7FB010E6A4C0DC8AA71331A929A29EA24E"
          ). Note: this is the completed Signed URI.</t>
        </list></t>

      <t>When tokenizing the URI Signing attributes is desired, follow the
      procedure below. <list style="numbers">
          <t>Generate the URI Signing token in this step and the next step.
          Remove the Original URI portion from the message to obtain all the
          URI Signing attributes, including the URI signature
          ("VER=1&amp;ET=1209422976&amp;CIP=10.0.0.1&amp;KID=example:keys:123&amp;HF=SHA-1&amp;MD=4fb1c1adf1588fbe11cc6a04c6e69f35").</t>

          <t>Compute the URI Signing token using <xref
          target="RFC4648">Base-64 Data Encoding</xref> on the message (e.g.
          "VkVSPTEmRVQ9MTIwOTQyMjk3NiZDSVA9MTAuMC4wLjEmS0lEPWZvb2JhcjprZXlzOjEyMyZIRj1TSEEtMSZNRD00ZmIxYzFhZGYxNTg4ZmJlMTFjYzZhMDRjNmU2OWYzNQ==")
          Note: This is the value for the URI Signing token.</t>

          <t>Append the URI Signing token to the Original URI in this step and
          the next three steps. Copy the entire Original URI into a buffer to
          hold the message.</t>

          <t>Check if the URI already contains a query string. If not, append
          a "?" character. If yes, append an "&amp;" character.</t>

          <t>Append the string "UST=" to the message.</t>

          <t>Append the URI Signing token to the message (e.g.
          "http://example.com/content.mov?UST=VkVSPTEmRVQ9MTIwOTQyMjk3NiZDSVA9MTAuMC4wLjEmS0lEPWZvb2JhcjprZXlzOjEyMyZIRj1TSEEtMSZNRD00ZmIxYzFhZGYxNTg4ZmJlMTFjYzZhMDRjNmU2OWYzNQ==").
          Note: This is the complete Signed URI.</t>
        </list></t>
    </section>

    <section anchor="validating_uri" title="Validating a URI Signature">
      <t>The following steps are specified to validate a Signed URI. However,
      it is possible to use some other algorithm and implementation as long as
      the same result is achieved. Note that some steps are to be skipped if
      the corresponding URI Signing attribute is not embedded in the Signed
      URI. The absence of a given attribute indicates enforcement of its
      purpose is not necessary in the distribution policy.</t>

      <t><list style="numbers">
          <t>Extract the value from "UST" attribute if the attribute exists.
          This value is the encoded URI Signing token. If there is no token in
          the URI, then skip the next step.</t>

          <t>Decode the string using <xref target="RFC4648">Base-64 Data
          Encoding</xref> (or another encoding method specified by
          configuration or CDNI metada) to obtain all the URI Signing
          attributes (e.g.
          "VER=1&amp;ET=1209422976&amp;CIP=10.0.0.1&amp;KID=example:keys:123&amp;HF=SHA-1&amp;MD=4fb1c1adf1588fbe11cc6a04c6e69f35").</t>

          <t>Extract the value from "VER" attribute if the attribute exists.
          Determine the version of the URI Signing algorithm used to process
          the Signed URI. If the attribute is not in the URI, then obtain the
          version number in another manner (e.g. configuration or CDNI
          metadata).</t>

          <t>Extract the value from "CIP" attribute if the attribute exists.
          Validate that the request came from the same IP address as indicated
          in the "CIP" attribute. If the IP address is incorrect, then the
          request is denied.</t>

          <t>Extract the value from "ET" attribute if the attribute exists.
          Validate that the request arrived before expiration time based on
          the "ET" attribute. If the time expired, then the request is
          denied.</t>

          <t>Extract the value from "MD" attribute if the attribute exists.
          The attribute indicates symmetric key is used.</t>

          <t>Extract the value from "DS" attribute if the attribute exists.
          The attribute indicates asymmetric key is used.</t>

          <t>If neither "MD" or "DS" attribute is in the URI, then no URI
          signature exists and the request is denied.</t>
        </list></t>

      <t>Validate the URI signature for the Signed URI.<list style="numbers">
          <t>Copy the Original URI, excluding the "scheme name" part, into a
          buffer to hold the message for performing the operations below.</t>

          <t>Remove the "UST" attribute from the message.</t>

          <t>Append the decoded value from "UST" attribute (which contains all
          the URI Signing attributes).</t>

          <t>Depending on the type of key used to sign the URI, validate the
          message digest or digital signature for symmetric key or asymmetric
          keys, respectively.<list style="letters">
              <t>For symmetric key, HMAC algorithm is used.<list>
                  <t>Extract the value from the "KID" attribute if the
                  attribute exists. Use the key identifier (e.g.
                  "example:keys:123") to locate the shared key, which may be
                  one of the keys available to use (i.e. set by configuration
                  or CDNI metadata). If the attribute is not in the URI, then
                  obtain the key in another manner (e.g. configuration or CDNI
                  metadata).</t>

                  <t>Extract the value from the "HF" attribute if the
                  attribute exists. Determine the type of hash function (e.g.
                  "MD5", "SHA-1") to use for HMAC. If the attribute is not in
                  the URI, then obtain the hash function type in another
                  manner (e.g. configuration or CDNI metadata).</t>

                  <t>Extract the value from the "MD" attribute. This is the
                  received message digest.</t>

                  <t>Convert the message digest to binary format. This will be
                  used to compare with the computed value later.</t>

                  <t>Remove the value part of the "MD" attribute (but not the
                  '=' character) from the message. The message is ready for
                  validation of the message digest (e.g.
                  "://example.com/content.mov?VER=1&amp;ET=1209422976&amp;CIP=10.0.0.1&amp;KID=example:keys:123&amp;HF=SHA-1&amp;MD=").</t>

                  <t>Compute the message digest using the HMAC algorithm with
                  the shared key and message as the two inputs to the hash
                  function which is specified by the "HF" attribute.</t>

                  <t>Compare the result with the received message digest to
                  validate the Signed URI.</t>
                </list></t>

              <t>For asymmetric keys, EC DSA is used.<list>
                  <t>Extract the value from the "KID" attribute. Use the key
                  identifier (e.g. "http://example.com/public/keys/123") to
                  obtain the EC public key, which may be one of the keys
                  available to use (i.e. set by configuration or CDNI
                  metadata). If the attribute is not in the URI, then obtain
                  the key in another manner (e.g. configuration or CDNI
                  metadata).</t>

                  <t>Extract the value from the "DS" attribute. This is the
                  digital signature.</t>

                  <t>Convert the digital signature to binary format. This will
                  be used for verification later.</t>

                  <t>Remove the value part of the "DS" attribute (but not the
                  '=' character) from the message. The message is ready for
                  validation of the digital signature (e.g.
                  "://example.com/content.mov?VER=1&amp;ET=1209422976&amp;CIP=10.0.0.1&amp;KID=http://example.com/public/keys/123&amp;DS=").</t>

                  <t>Compute the message digest using SHA-1 (without a key)
                  for the message.</t>

                  <t>Verify the digital signature using the EC DSA algorithm
                  with the public EC key, received digital signature, and
                  message digest (obtained in previous step) as inputs. This
                  validates the Signed URI.</t>
                </list></t>
            </list></t>
        </list></t>
    </section>

    <section anchor="cdni_interfaces"
             title="Considerations for CDNI Interfaces">
      <t>Some of the CDNI Interfaces need enhancements to support URI Signing.
      As an example: A Downstream CDN that supports URI Signing needs to be
      able to advertise this capability to the Upstream CDN. The Upstream CDN
      needs to select a Downstream CDN based on such capability when the CSP
      requires access control to enforce its distribution policy via URI
      Signing. Also, the Upstream CDN needs to be able to distribute via the
      CDNI Metadata interface the information necessary to allow the
      Downstream CDN to validate a Signed URI . Events that pertain to URI
      Signing (e.g. request denial or delivery after access authorization)
      need to be included in the logs communicated through the CDNI Logging
      interface (Editor's Note: Is this within the scope of the CDNI Logging
      Interface?).</t>

      <section anchor="advertisement"
               title="CDNI Request Routing/Footprint &amp; Capabilities Advertisement Interface">
        <t>The Downstream CDN advertises its capability to support URI Signing
        via the CDNI Request Routing/Footprint &amp; Capabilities
        Advertisement Interface (CDNI FCI). The supported version of URI
        Signing needs to be included to allow for future extendebility.</t>

        <t>TBD: To be taken into account by Footprint &amp; Capabilities
        design team working on this area.</t>

        <t><list style="symbols">
            <t>URI Signing version</t>
          </list></t>
      </section>

      <section anchor="redirection"
               title="CDNI Request Routing/Redirection Interface">
        <t>Editor's Note: Check if there is an impact on CDNI RI?</t>

        <t>TBD: CDNI Redirection Interface is work in progress.</t>
      </section>

      <section anchor="metadata" title="CDNI Metadata Interface">
        <t>The following CDNI Metadata objects are specified for URI
        Signing.</t>

        <t>Note that the Key ID information is not needed if only one key is
        provided by the CSP or the Upstream CDN for the content item or set of
        content items covered by the CDNI Metadata object. In the case of
        asymmetric keys, it's easy for any entity to sign the URI for a
        content with a private key and provide the public key in the Signed
        URI. This just confirms that the URI Signer authorized the delivery.
        But it's necessary for the URI Signer to be the content owner. So, the
        CDNI Metadata Interface MUST provide the public key for the content or
        information to authorize the received Key ID attribute.</t>

        <t>TBD: CDNI Metadata Interface is work in progress.</t>

        <t><list style="symbols">
            <t>Content access control indication.</t>

            <t>Type of access control. Specifically, access to content is
            subject to URI Signing. URI Signing required indication means
            Downstream CDN ensures URI must be signed and validated before
            content delivery. Otherwise, Downstream CDN does not perform
            validation regardless if URI is signed or not.</t>

            <t>Version of URI Signing to use for validating the Signed URI</t>

            <t>Key value along with its key index (i.e. Key ID) and type
            (asymmetric or symmetric) used for validating URI signature. There
            may be one or more keys available to use for validation.</t>

            <t>Authorization to distribute the key(s) to Downstream CDNs</t>

            <t>Hash function for HMAC to be used for validation (i.e. enforce
            a specific hash function for security level)</t>

            <t>Encoding format to override the "UST" attribute. (Editor Note:
            Is this needed in CDNI Metadata or defined in a new CDNI
            attribute?)</t>
          </list></t>
      </section>

      <section anchor="logging" title="CDNI Logging Interface">
        <t>The Downstream CDN reports that enforcement of the access control
        was applied to the request for content delivery.</t>

        <t>TBD: CDNI Logging interface is work in progress.</t>

        <t><list style="symbols">
            <t>URI signature validation events (e.g. invalid client IP
            address, expired signed URI, incorrect URI signature, successful
            validation)</t>

            <t>Delivery log with confirmation of access control enforcement
            (i.e Delivery CDN enforced URI Signing before content
            delivery)</t>
          </list></t>
      </section>
    </section>

    <section anchor="operation" title="Detailed URI Signing Operation">
      <t>URI Signing supports both HTTP-based and DNS-based request routing.
      <xref target="RFC2104">HMAC</xref> defines a hash-based message
      authentication code allowing two parties that share a symmetric key or
      asymmetric keys to establish the integrity and authenticity of a set of
      information (e.g. a message) through a cryptographic hash function.</t>

      <section anchor="http" title="HTTP Redirection">
        <t>For HTTP-based request routing, HMAC is applied to a set of
        information that is unique to a given end user content request using
        key information that is specific to a pair of adjacent CDNI hops (e.g.
        between the CSP and the Authoritative CDN, between the Authoritative
        CDN and a Downstream CDN). This allows a CDNI hop to ascertain the
        authenticity of a given request received from a previous CDNI hop.</t>

        <t>The URI signing scheme described below is based on the following
        steps (assuming HTTP redirection, iterative request routing and a CDN
        path with two CDNs). Note that Authoritative CDN and Upstream CDN are
        used exchangeably.</t>

        <figure title="Figure 3: HTTP-based Request Routing with URI Signing">
          <artwork>
   End-User              dCDN                 uCDN                  CSP
      |                    |                    |                    |
      |            1.CDNI RR interface used to  |                    |
      |         advertise URI Signing capability|                    |
      |                    |-------------------&gt;|                    |
      |                    |                    |                    |
      |              2.Provides information to validate URI signature|
      |                    |                    |&lt;-------------------|
      |                    |                    |                    |
      |        3.CDNI Metadata interface used to|                    |
      |           provide URI Signing attributes|                    |
      |                    |&lt;-------------------|                    |
      |4.Authorisation request                  |                    |
      |-------------------------------------------------------------&gt;|
      |                    |                    |  [Apply distribution
      |                    |                    |   policy]          |
      |                    |                    |                    |
      |                    |              (ALT: Authorization decision)
      |5.Request is denied |                    |      &lt;Negative&gt;    |
      |&lt;-------------------------------------------------------------|
      |                    |                    |                    |
      |6.CSP provides signed URI                |      &lt;Positive&gt;    |
      |&lt;-------------------------------------------------------------|
      |                    |                    |                    |
      |7.Content request   |                    |                    |
      |----------------------------------------&gt;| [Validate URI      |
      |                    |                    |  signature]        |
      |                    |                    |                    |
      |                    |    (ALT: Validation result)             |
      |8.Request is denied |          &lt;Negative&gt;|                    |
      |&lt;----------------------------------------|                    |
      |                    |                    |                    |
      |9.Re-sign URI and redirect to  &lt;Positive&gt;|                    |
      |  dCDN (newly signed URI)                |                    |
      |&lt;----------------------------------------|                    |
      |                    |                    |                    |
      |10.Content request  |                    |                    |
      |-------------------&gt;| [Validate URI      |                    |
      |                    |  signature]        |                    |
      |                    |                    |                    |
      |    (ALT: Validation result)             |                    |
      |11.Request is denied| &lt;Negative&gt;         |                    |
      |&lt;-------------------|                    |                    |
      |                    |                    |                    |
      |12.Content delivery | &lt;Positive&gt;         |                    |
      |&lt;-------------------|                    |                    |
      :                    :                    :                    :
      :   (Later in time)  :                    :                    :
      |13.CDNI Logging interface to include URI Signing information  |
      |                    |-------------------&gt;|                    |</artwork>
        </figure>

        <t><list style="numbers">
            <t>Using the CDNI Request Routing/Footprint &amp; Capabilities
            Advertisement interface, the Downstream CDN advertises its
            capabilities including URI Signing support to the Authoritative
            CDN.</t>

            <t>CSP provides to the Authoritative CDN the information needed to
            validate URI signatures from that CSP. For example, this
            information may include a hashing function, algorithm, and a key
            value.</t>

            <t>Using the CDNI Metadata interface, the Authoritative CDN
            communicates to a Downstream CDN the information needed to
            validate URI signatures from the Authoritative CDN for the given
            CSP. For example, this information may include a hashing algorithm
            and private key corresponding to the trust relationship between
            the Authoritative CDN and the Downstream CDN.</t>

            <t>When a UA requests a piece of protected content from the CSP,
            the CSP makes a specific authorization decision for this unique
            request based on its arbitrary distribution policy</t>

            <t>If the authorization decision is negative, the CSP rejects the
            request.</t>

            <t>If the authorization decision is positive, the CSP computes a
            Signed URI that is based on unique parameters of that request and
            conveys it to the end user as the URI to use to request the
            content.</t>

            <t>On receipt of the corresponding content request, the
            authoritative CDN validates the URI Signature in the URI using the
            information provided by the CSP.</t>

            <t>If the validation is negative, the authoritative CDN rejects
            the request</t>

            <t>If the validation is positive, the authoritative CDN computes a
            Signed URI that is based on unique parameters of that request and
            provides to the end user as the URI to use to further request the
            content from the Downstream CDN</t>

            <t>On receipt of the corresponding content request, the Downstream
            CDN validates the URI Signature in the Signed URI using the
            information provided by the Authoritative CDN in the CDNI
            Metadata</t>

            <t>If the validation is negative, the Downstream CDN rejects the
            request and sends an error code (e.g. 403) in the HTTP
            response.</t>

            <t>If the validation is positive, the Downstream CDN serves the
            request and delivers the content.</t>

            <t>At a later time, Downstream CDN reports logging events that
            includes URI signing information.</t>
          </list></t>

        <t>With HTTP-based request routing, URI Signing matches well the
        general chain of trust model of CDNI both with symmetric key and
        asymmetric keys because the key information only need to be specific
        to a pair of adjacent CDNI hops.</t>
      </section>

      <section anchor="dns" title="DNS Redirection">
        <t>For DNS-based request routing, the CSP and Authoritative CDN must
        agree on a trust model appropriate to the security requirements of the
        CSP's particular content. Use of asymmetric public/private keys allows
        for unlimited distribution of the public key to downstream CDNs.
        However, if a shared secret key is preferred, then the CSP may want to
        restrict the distribution of the key to a (possibly empty) subset of
        trusted Downstream CDNs. Authorized Delivery CDNs need to obtain the
        key information to validate the Signed UR, which is computed by the
        CSP based on its distribution policy.</t>

        <t>The URI signing scheme described below is based on the following
        steps (assuming iterative DNS request routing and a CDN path with two
        CDNs). Note that Authoritative CDN and Upstream CDN are used
        exchangeably.</t>

        <figure title="Figure 4: DNS-based Request Routing with URI Signing">
          <artwork>
   End-User              dCDN                 uCDN                  CSP
      |                    |                    |                    |
      |            1.CDNI RR interface used to  |                    |
      |         advertise URI Signing capability|                    |
      |                    |-------------------&gt;|                    |
      |                    |                    |                    |
      |              2.Provides information to validate URI signature|
      |                    |                    |&lt;-------------------|                   |
      |        3.CDNI Metadata interface used to|                    |
      |           provide URI Signing attributes|                    |
      |                    |&lt;-------------------|                    |
      |4.authorisation request                  |                    |
      |-------------------------------------------------------------&gt;|
      |                    |                    |  [Apply distribution
      |                    |                    |   policy]          |
      |                    |                    |                    |
      |                    |              (ALT: Authorization decision)
      |5.Request is denied |                    |      &lt;Negative&gt;    |
      |&lt;-------------------------------------------------------------|
      |                    |                    |                    |
      |6.Provides signed URI                    |      &lt;Positive&gt;    |
      |&lt;-------------------------------------------------------------|
      |                    |                    |                    |
      |7.DNS request       |                    |                    |
      |----------------------------------------&gt;|                    |
      |                    |                    |                    |
      |8.Redirect DNS to dCDN                   |                    |
      |&lt;----------------------------------------|                    |
      |                    |                    |                    |
      |9.DNS request       |                    |                    |
      |-------------------&gt;|                    |                    |
      |                    |                    |                    |
      |10.IP address of Surrogate               |                    |
      |&lt;-------------------|                    |                    |
      |                    |                    |                    |
      |11.Content request  |                    |                    |
      |-------------------&gt;| [Validate URI      |                    |
      |                    |  signature]        |                    |
      |                    |                    |                    |
      |    (ALT: Validation result)             |                    |
      |12.Request is denied| &lt;Negative&gt;         |                    |
      |&lt;-------------------|                    |                    |
      |                    |                    |                    |
      |13.Content delivery | &lt;Positive&gt;         |                    |
      |&lt;-------------------|                    |                    |
      :                    :                    :                    :
      :   (Later in time)  :                    :                    :
      |14.CDNI Logging interface to report URI Signing information   |
      |                    |-------------------&gt;|                    |</artwork>
        </figure>

        <t><list style="numbers">
            <t>Using the CDNI Request Routing interface, the Downstream CDN
            advertises its capabilities including URI Signing support to the
            Authoritative CDN.</t>

            <t>CSP provides to the Authoritative CDN the information needed to
            validate cryptographic signatures from that CSP. For example, this
            information may include a hash function, algorithm, and a key.</t>

            <t>Using the CDNI Metadata interface, the Authoritative CDN
            communicates to a Downstream CDN the information needed to
            validate cryptographic signatures from the CSP. In the case of
            symmetric key, the Authoritative CDN checks if the Downstream CDN
            is allowed by CSP to obtain the shared secret key.</t>

            <t>When a UA requests a piece of protected content from the CSP,
            the CSP makes a specific authorization decision for this unique
            request based on its arbitrary distribution policy.</t>

            <t>If the authorization decision is negative, the CSP rejects the
            request</t>

            <t>If the authorization decision is positive, the CSP computes a
            cryptographic signature that is based on unique parameters of that
            request and includes it in the URI provided to the end user to
            request the content.</t>

            <t>End user sends DNS request to the authoritative CDN.</t>

            <t>On receipt of the DNS request, the authoritative CDN redirects
            the request to the Downstream CDN.</t>

            <t>End user sends DNS request to the Downstream CDN.</t>

            <t>On receipt of the DNS request, the Downstream CDN responds with
            IP address of one of its Surrogates.</t>

            <t>On receipt of the corresponding content request, the Downstream
            CDN validates the cryptographic signature in the URI using the
            information provided by the Authoritative CDN in the CDNI
            Metadata</t>

            <t>If the validation is negative, the Downstream CDN rejects the
            request and sends an error code (e.g. 403) in the HTTP
            response.</t>

            <t>If the validation is positive, the Downstream CDN serves the
            request and delivers the content.</t>

            <t>At a later time, Downstream CDN reports logging events that
            includes URI signing information.</t>
          </list></t>

        <t>With DNS-based request routing, URI Signing matches well the
        general chain of trust model of CDNI when used with asymmetric keys
        because the only key information that need to be distributed across
        multiple CDNI hops including non-adjacent hops is the public key, that
        is generally not confidential.</t>

        <t>With DNS-based request routing, URI Signing does match well the
        general chain of trust model of CDNI when used with symmetric keys
        because the symmetric key information needs to be distributed across
        multiple CDNI hops including non-adjacent hops. This raises a security
        concern for applicability of URI Signing with symmetric keys in case
        of DNS-based inter-CDN request routing.</t>
      </section>
    </section>

    <section title="HTTP Adaptive Bit Rate">
      <t>TBD - HTTP ABR calls for specific support by URI Signing ("flexible
      URI signing") as discussed in <xref target="I-D.brandenburg-cdni-has"/>.
      This will be added in a future version of this document.</t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>[Editor note: (Is there a need to/How to) register official query
      string attribute keywords to be used for URI Signing? Need anything from
      IANA?]</t>

      <t>This document requests IANA to create three new registries for the
      attributes (a.k.a. keywords) and their defined values in the URI Signing
      token.</t>

      <t>This document highlights the use of the following query string
      attribute in the URI to support URI Signing. There is no intention to
      claim any query string attribute for URI beyond the CDNI URI Signing
      context. That means the entities that sign the URI or validate the URI
      signature comply to the keyword specified in the query string for the
      URI Signing function only when URI Signing is used and only in the
      context of CDNI.</t>

      <t>The following Enforcement Attributes names are allocated:<list
          style="symbols">
          <t>ET (Expiry time)</t>

          <t>CIP (Client IP address)</t>
        </list></t>

      <t>The following Signature Computation Attributes names are
      allocated:<list style="symbols">
          <t>VER (Version): 1(Base)</t>

          <t>KID (Key ID)</t>

          <t>HF (Hash Function): "MD5", "SHA1"</t>
        </list></t>

      <t>The following URI Signature Attributes names are allocated:<list
          style="symbols">
          <t>MD (Message Digest)</t>

          <t>DS (Digital Signature)</t>
        </list></t>

      <t>The following URI Signing Token Attributes names are allocated:<list
          style="symbols">
          <t>UST (URI Signing Token)</t>
        </list></t>
    </section>

    <section anchor="security" title="Security Considerations">
      <t>This document describes the concept of URI Signing and how it can be
      used to provide access authorization in the case of interconnected CDNs
      (CDNI). The primary goal of URI Signing is to make sure that only
      authorized UAs are able to access the content, with a Content Service
      Provider (CSP) being able to authorize every individual request. It
      should be noted that URI Signing is not a content protection scheme; if
      a CSP wants to protect the content itself, other mechanisms, such as
      DRM, are more approriate.</t>

      <t>In general it holds that the level of protection against illegitimate
      access can be increased by including more Enforcement Attributes in the
      URI. The current version of this document includes attributes for
      enforcing Client IP Address and Expiration Time, however this list can
      be extended with other, more complex, attributes that are able to
      provide some form of protection against some of the vulnerabilities
      highlighted below.</t>

      <t>That said, there are a number of aspects that limit the level of
      security offered by URI signing and that anybody implementing URI
      signing should be aware of.</t>

      <t><list>
          <t>Replay attacks: Any (valid) Signed URI can be used to perform
          replay attacks. The vulnerability to replay attacks can be reduced
          by picking a relatively short window for the Expiration Time
          attribute, although this is limited by the fact that any HTTP-based
          request needs a window of at least a couple of seconds to prevent
          any sudden network issues from preventing legitimate UAs access to
          the content. One way to reduce exposure to replay attacks is to
          include in the URI a unique one-time access ID. Whenever the
          Downstream CDN receives a request with a given unique access ID, it
          adds that access ID to the list of 'used' IDs. In the case an
          illegitimate UA tries to use the same URI through a replay attack,
          the Downstream CDN can deny the request based on the already-used
          access ID.</t>

          <t>Illegitimate client behind a NAT: In cases where there are
          multiple users behind the same NAT, all users will have the same IP
          address from the point of view of the Downstream CDN. This results
          in the Downstream CDN not being able to distinguish between the
          different users based on Client IP Address and illegitimate users
          being able to access the content. One way to reduce exposure to this
          kind of attack is to not only check for Client IP but also for other
          attributes that can be found in the HTTP headers.</t>

          <t>TBD: ...</t>
        </list></t>

      <t>The shared key between CSP and Authoritative CDN may be distributed
      to Downstream CDNs - including cascaded CDNs. Since this key can be used
      to legitimately sign a URL for content access authorization, it's
      important to know the implications of a compromised shared key.</t>

      <t/>
    </section>

    <section title="Acknowledgements">
      <t>The authors would like to thank the following people for their
      contributions in reviewing this document and providing feedback: Kevin
      Ma, Ben Niven-Jenkins, Thierry Magnien, Dan York, Bhaskar Bhupalam, and
      Matt Caulfield.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include='reference.RFC.6707'
?>

      <?rfc include='reference.I-D.ietf-cdni-use-cases'
?>

      <?rfc include='reference.I-D.ietf-cdni-requirements'
?>

      <?rfc include='reference.I-D.ietf-cdni-framework'
?>

      <?rfc ?>

      <?rfc ?>

      <?rfc include='reference.RFC.4648'?>

      <?rfc include='reference.RFC.2104'?>
    </references>

    <references title="Informative References">
      <?rfc include='reference.RFC.3986'

?>

      <?rfc include='reference.I-D.brandenburg-cdni-has'
?>

      <?rfc include='reference.RFC.5952'?>
    </references>
  </back>
</rfc>
