<?xml version='1.0' encoding='UTF-8'?>

<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>

<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-ietf-cdni-https-delegation-subcerts-12" number="9677" submissionType="IETF" consensus="true" category="std" tocInclude="true" symRefs="true" sortRefs="true" version="3" xml:lang="en" obsoletes="" updates="">

  <front>
    <title abbrev="CDNI Metadata for Delegated Credentials">Content Delivery
    Network Interconnection (CDNI) Metadata for Delegated Credentials</title>
    <seriesInfo name="RFC" value="9677"/>

    <author initials="F." surname="Fieau" fullname="Frédéric Fieau">
      <organization>Orange</organization>
      <address>
        <postal>
          <street>40-48, avenue de la République</street>
          <city>Châtillon</city>
          <code>92320</code>
          <country>France</country>
        </postal>
        <email>frederic.fieau@orange.com</email>
      </address>
    </author>
    <author initials="E." surname="Stephan" fullname="Emile Stephan">
      <organization>Orange</organization>
      <address>
        <postal>
          <street>2, avenue Pierre Marzin</street>
          <city>Lannion</city>
          <code>22300</code>
          <country>France</country>
        </postal>
        <email>emile.stephan@orange.com</email>
      </address>
    </author>
    <author initials="G." surname="Bichot" fullname="Guillaume Bichot">
      <organization>Broadpeak</organization>
      <address>
        <postal>
          <street>3771 Boulevard des Alliés</street>
          <city>Cesson-Sévigné</city>
          <code>35510</code>
          <country>France</country>
        </postal>
        <email>guillaume.bichot@broadpeak.tv</email>
      </address>
    </author>
    <author initials="C." surname="Neumann" fullname="Christoph Neumann">
      <organization>Broadpeak</organization>
      <address>
        <postal>
          <street>3771 Boulevard des Alliés</street>
          <city>Cesson-Sévigné</city>
          <code>35510</code>
          <country>France</country>
        </postal>
        <email>christoph.neumann@broadpeak.tv</email>
      </address>
    </author>
    <date month="October" year="2024"/>
    <area>WIT</area>
    <workgroup>cdni</workgroup>

    <keyword>HTTPS</keyword>
    <keyword>TLS</keyword>

    <abstract>
      <t>
The delivery of content over HTTPS involving multiple Content Delivery
Networks (CDNs) raises credential management issues.  This document defines
metadata in the Content Delivery Network Interconnection (CDNI) Control and
Metadata interface to set up HTTPS delegation using delegated credentials from
an upstream CDN (uCDN) to a downstream CDN (dCDN).
</t>
    </abstract>
  </front>
  <middle>
    <section>
      <name>Introduction</name>
      <t>
Content delivery over HTTPS utilizing one or more Content Delivery Networks
(CDNs) along the delivery path necessitates the management of credentials. 
This requirement is particularly pertinent when an entity delegates the delivery of content via HTTPS to another trusted entity.
</t>
      <t>
This document specifies the CDNI Metadata interface for establishing HTTPS delegation through the use of delegated credentials, as defined in  <xref target="RFC9345"/>,
between an upstream CDN (uCDN) and a downstream CDN (dCDN).
</t>
    </section>
    <section anchor="terminology">
      <name>Terminology</name>
        <t>
    The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>",
    "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>",
    "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>",
    "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
    "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be
    interpreted as described in BCP&nbsp;14 <xref target="RFC2119"/> <xref
    target="RFC8174"/> when, and only when, they appear in all capitals, as
    shown here.
        </t>
      <t>
This document uses terminology from the CDNI specifications -- CDNI framework
<xref target="RFC7336"/>, CDNI requirements <xref target="RFC7337"/>, and CDNI
Metadata interface <xref target="RFC8006"/>.
</t>
    </section>
    <section anchor="FCI">
      <name>CDNI Footprint and Capabilities Advertisement Interface (FCI) Capabilities Object for Delegated Credentials</name>
      <t>
A dCDN should advertise its supported delegation methods using the
Footprint and Capabilities Advertisement interface (FCI) as defined in <xref target="RFC8008"/>.
The FCI.Metadata object enables a dCDN to communicate its capabilities and the Metadata interface (MI) objects it supports. 
To indicate support for delegated credentials, the dCDN should announce the support for MI.DelegatedCredentials, as illustrated in the example below.
      </t>
      
<sourcecode><![CDATA[
   {
     "capabilities": [
       {
         "capability-type": "FCI.Metadata",
         "capability-value": {
           "metadata": [
             "MI.DelegatedCredentials",
             "... other supported MI objects ..."
           ]
         },
         "footprints": [
           "Footprint objects"
         ]
       }
     ]
   }
]]></sourcecode>
      <t>
This document also defines an object that informs the uCDN of the number of delegated credentials supported by the dCDN, 
enabling the uCDN to supply the appropriate number of delegated credentials. To this end, the FCI object, FCI.DelegationCredentials, is introduced. 
</t>
      <section anchor="FCI_DelegatedCredentials">
        <name>FCI.DelegatedCredentials</name>
        <t>
The FCI.DelegationCredentials object enables advertising the maximum number of delegated credentials supported by the dCDN.
This number typically (but not necessarily) corresponds to the number of servers designated by the dCDN to support delegated credentials.
</t>
        <t>
The property PrivateKeyEncryptionKey contains a public key provided by the dCDN that <bcp14>MUST</bcp14> be used by the uCDN to
encrypt private keys whenever such private keys are transmitted to the dCDN using MI.DelegatedCredentials (see <xref target="MI"/>).
</t>
        <dl newline="false" spacing="compact">
          <dt>Property: </dt>
          <dd>number-delegated-certs-supported</dd>
          <dt>Description:</dt>
          <dd>Number of delegated credentials supported by the dCDN.</dd>
          <dt>Type:</dt>
          <dd>integer</dd>
          <dt>Mandatory-to-Specify:</dt>
          <dd>Yes</dd>
        </dl>
        <dl newline="false" spacing="compact">
          <dt>Property: </dt>
          <dd>PrivateKeyEncryptionKey</dd>
          <dt>Description:</dt>
          <dd>Public key in JSON Web Key (JWK) format <xref target="RFC7517"/> of the dCDN to be used by the uCDN to encrypt private keys.</dd>
          <dt>Type:</dt>
          <dd>string</dd>
          <dt>Mandatory-to-Specify:</dt>
          <dd>No</dd>
        </dl>
        <t>
The following is an example of the FCI.DelegatedCredentials.
</t>
<sourcecode><![CDATA[
    {
      "capabilities": [
        {
         "capability-type": "FCI.DelegatedCredentials",
         "capability-value": {
            "number-delegated-certs-supported": 10
           }
         "footprints": [
            <Footprint objects>
           ]
        }
      ]
    }
]]></sourcecode>
      </section>
      <section anchor="usage_FCI">
        <name>Expected Usage of the Property Number of Supported Delegated Credentials</name>
        <t>The dCDN uses the FCI.DelegatedCredentials object to announce the number of servers that support delegated credentials.</t>
        <t>When the uCDN receives the FCI.DelegatedCredentials object, it can issue the supported number of delegated credentials to the dCDN.
When configuring the dCDN, the uCDN <bcp14>MAY</bcp14> decide to provide less than the maximum supported delegated credentials to the dCDN.
Note that, within a dCDN, different deployment possibilities of the delegated credentials on the
endpoints exist. The dCDN <bcp14>MAY</bcp14> use one single delegated credential and deploy it on multiple endpoints. 
Alternatively, the dCDN <bcp14>MAY</bcp14> deploy a different delegated credential for each endpoint 
(provided that the uCDN delivers enough different delegated credentials). 
This choice is at the discretion of the dCDN and depends on the number of delegated credentials provided by the uCDN.</t>
        <t>The FCI.DelegationCredentials object does not address expiry or renewal of delegated credentials.
  Once the uCDN has provided
  delegated credentials via the MI, the uCDN <bcp14>SHOULD</bcp14> monitor the provided
  credentials and their expiry times and <bcp14>SHOULD</bcp14> refresh dCDN
  credentials via the MI in a timely manner.
The uCDN may decide not to monitor the validity period of delegated credentials 
and not to refresh the credentials, for example, in cases of short-term one-shot deployments or once it has decided to deprovision a dCDN.
If the delegated credential is not renewed on time by the uCDN, the servers of the dCDN that only have expired delegated credentials <bcp14>MUST</bcp14> refuse 
any new TLS connection that requires an up-to-date delegated credential.
</t>
      </section>
    </section>
    <section anchor="MI">
      <name>CDNI Metadata Interface (MI) Metadata Object for Delegated Credentials</name>
      <t>As expressed in <xref target="RFC9345"/>, when an uCDN has delegated to a dCDN, the dCDN presents the
"delegated_credential" (rather than its own certificate) during the TLS handshake <xref target="RFC8446"/> to the User Agent. This implies that the dCDN is also in the possession of the private key corresponding to the public key in DelegatedCredential.cred <xref target="RFC9345"/>.
This allows the User Agent to verify the signature in a CertificateVerify message (<xref target="RFC8446" sectionFormat="of" section="4.4.3"/>) sent and signed by the dCDN.</t>
      <t>
This section defines the MI.DelegatedCredentials object containing an array of delegated
credentials and optionally the corresponding private keys. 
The CDNI MI <xref target="RFC8006"/> describes the CDNI metadata distribution 
mechanisms according to which a dCDN can retrieve the MI.DelegatedCredentials object 
from the uCDN.
</t>
      <t>
The properties of the MI.DelegatedCredentials object are as follows:
</t>
      <dl newline="false" spacing="compact">
        <dt>Property: </dt>
        <dd>delegated-credentials</dd>
        <dt>Description:</dt>
        <dd>Array of delegated credentials</dd>
        <dt>Type:</dt>
        <dd>Array of DelegatedCredentialObject objects</dd>
        <dt>Mandatory-to-Specify:</dt>
        <dd>Yes</dd>
      </dl>
      <t>
The DelegatedCredentialObject object is composed of the following properties:
</t>
      <dl newline="false" spacing="compact">
        <dt>Property: </dt>
        <dd>delegated-credential</dd>
        <dt>Description:</dt>
        <dd>Base64-encoded (as defined in <xref target="RFC4648" sectionFormat="of" section="4"/>) version of a CertificateEntry as defined in <xref target="RFC8446" sectionFormat="of" section="4.4.2"/>. The CertificateEntry <bcp14>MUST</bcp14> contain a DelegatedCredential structure (as defined in <xref target="RFC9345"/>) using the extension in the CertificateEntry of its end-entity certificate (see <xref target="RFC9345" sectionFormat="of" section="4.1.1"/>).</dd>
        <dt>Type:</dt>
        <dd>string</dd>
        <dt>Mandatory-to-Specify:</dt>
        <dd>Yes</dd>
      </dl>
      <dl newline="false" spacing="compact">
        <dt>Property: </dt>
        <dd>private-key</dd>
        <dt>Description:</dt>
        <dd>Encrypted private key corresponding to the public key contained in the DelegatedCredential. The envelope format for this property is JSON Web Encryption (JWE) <xref target="RFC7516"/> using the base64 compact serialization (<xref target="RFC7516" sectionFormat="of" section="7.1"/>).</dd>
        <dt>Type:</dt>
        <dd>string</dd>
        <dt>Mandatory-to-Specify:</dt>
        <dd>No</dd>
          </dl>
      <t>
The private-key property is not mandatory. If not specified, it is assumed that the dCDN generated the public-private key pair for the delegated credential itself and provided
the public key information with an out-of-band mechanism to the uCDN.
See <xref target="security"/> for constraints regarding the usage of the private key. 
</t>
      <t>
If the private-key property is used, the transported private key <bcp14>MUST</bcp14> be encrypted using the PrivateKeyEncryptionKey specified in FCI.DelegatedCredentials. 
The envelope format for this property <bcp14>MUST</bcp14> use JWE <xref target="RFC7516"/> using the base64 compact serialization (<xref target="RFC7516" sectionFormat="of" section="7.1"/>), whereas the private key is included as JWE Ciphertext in the JWE.
The JWE content-type field <bcp14>MAY</bcp14> be used to signal the media type of the encrypted key.
</t>
      <t>
Below, please see an example of an MI.DelegatedCredentials object.
</t>
<sourcecode><![CDATA[
    {
    "generic-metadata-type": "MI.DelegatedCredentials",
    "generic-metadata-value": {
        "delegated-credentials": [
                {"delegated-credential": 	
                    "cBBfm8KK6pPz/tdgKyedwA...
                    iXCCIAmzMM0R8FLI3Ba0UQ=="},
                {"delegated-credential": 	
                    "4pyIGtjFdys1+9y/4sS/Fg...
                    J+h9lnRY/xgmi65RLGKoRw=="},
                {"delegated-credential": 	
                    "6PWFO0g2AXvUaULXLObcVA...
                    HXoldT/qaYCCNEyCc8JM2A=="}
            ]
        }
    }
]]></sourcecode>
    </section>
    <section anchor="callflow">
      <name>Delegated Credentials Call Flow</name>
      <t>An example call-flow using delegated credentials is depicted in 
<xref target="call-flow"/>. The steps are as follows.</t>
      <ol type="1">
<li>It is assumed that the uCDN has been provisioned and configured
with a certificate. 
   Note that it is out of scope of CDNI and the
   present document how and from where (e.g., which Content 
   Service Provider) the uCDN acquired its certificate.
</li>
<li>The uCDN generates a set of delegated credentials 
(here it is assumed that public keys of the dCDN are known). 
Note that the uCDN may generate this material at different points in time, e.g., in advance to have a pool of delegated 
credentials or on demand when the dCDN announces its maximum number of supported delegated credentials.
</li>
<li>Using the CDNI FCI <xref target="RFC8008"/>, the 
dCDN advertises MI.DelegatedCredentials capabilities to the uCDN.
The dCDN further uses FCI.DelegatedCredentials to advertise the maximum number 
of supported delegated credentials.
</li>
<li>Using the CDNI MI <xref target="RFC8006"/>, the dCDN acquires 
the MI.DelegatedCredentials, retrieving an array of delegated
credentials.
</li>
<li>The client establishes a TLS connection with an endpoint of 
the dCDN according to <xref target="RFC9345"/> using the delegated 
credentials retrieved in step 4.
</li>
<li>When some delegated credentials are about to expire, the uCDN uses the CDNI MI <xref target="RFC8006"/> to provide new, valid delegated credentials.
</li>
      </ol>

      <figure anchor="call-flow">
        <name>Example Call Flow of Delegated Credentials in CDNI</name>
        <artwork align="center"><![CDATA[
User-Agent                  dCDN                 uCDN                 
   |                     |                     |                  
   |                     |      [1. uCDN acquires its certificate
   |                     |            out of scope of CDNI]
   |                     |                     |    
   |                     |             [2. generation of 
   |                     |          delegated credentials]
   |                     |                     |
   |                  3. CDNI FCI used to
   |              advertise support of MI.DelegatedCredentials
   |              and announce number of delegated credentials
   |                 supported using FCI.DelegatedCredentials
   |                     |-------------------->+          
   |                     |                     |                    
   |                 4. CDNI MI used to
   |             provide the MI.DelegatedCredentials object  
   |                     |<--------------------+      
   |                     |                     |    
                         .
                         .
                         .                                                  
  [5. TLS handshake according                  |
          to [RFC9345]]  .                     | 
   |<------------------->|                     |
   |                     |                     |
                         .
                         .
                         .                                               
   |              6. Some delegated credentials about to expire.
   |                    CDNI MI used to
   |             provide new MI.DelegatedCredentials object  
   |                     |<--------------------+    
   |                     |                     |  
]]></artwork>
      </figure>
    </section>
    <section anchor="iana">
      <name>IANA Considerations</name>

      <t>
IANA has registered the following payload types in the "CDNI Payload Types"
registry in the "Content Delivery Network Interconnection (CDNI) Parameters"
registry group.
</t>
<table>
  <thead>
          <tr>
            <th>Payload Type</th>
            <th>Reference</th>
          </tr>
  </thead>
        <tbody>	  
          <tr>
            <td>MI.DelegatedCredentials</td>
            <td>RFC 9677</td>
          </tr>
          <tr>
            <td>FCI.DelegatedCredentials</td>
            <td>RFC 9677</td>
          </tr>
        </tbody>
      </table>

      <t>
Sections <xref target="iana_MI" format="counter"/> and <xref target="iana_FCI"
format="counter"/> provide additional necessary information for the
registration of those CDNI payload types (see <xref target="RFC7736"
sectionFormat="of" section="2.2"/>).
</t>
      <section anchor="iana_MI">
        <name>CDNI MI.DelegatedCredentials Payload Type</name>
        <dl>
          <dt>Purpose:</dt>
          <dd>The purpose of this payload type is to distinguish delegated
credentials MI objects.
</dd>
          <dt>Interface:</dt>
          <dd>MI/FCI</dd>
          <dt>Encoding:</dt>
          <dd>See <xref target="MI"/>.</dd>
        </dl>
      </section>
      <section anchor="iana_FCI">
        <name>CDNI FCI.DelegatedCredentials Payload Type</name>
        <dl>
          <dt>Purpose:</dt>
          <dd>The purpose of this payload type is to advertise the number 
of delegated credentials needed (and any associated capability
advertisement).
</dd>
          <dt>Interface:</dt>
          <dd>FCI</dd>
          <dt>Encoding:</dt>
          <dd>See <xref target="FCI_DelegatedCredentials"/>.</dd>
        </dl>
      </section>
    </section>
    <section anchor="security">
      <name>Security Considerations</name>
      <t>
The extensions defined enable providing delegated credentials to dCDNs. 
A delegated credential can only be used by a dCDN if it is in possession of the associated private key.
Similarly, an attacker requires access to the private key in order to exploit a delegated credential and impersonate dCDN nodes.
Thus, leakage of only the delegated credential without the private key represents a limited security risk.
</t>
      <t>
Delegated credentials and associated private keys are short-lived (per default, the maximum validity period is set to 7 days in <xref target="RFC9345"/>) and as such a single leaked delegated credential with its private key represents a limited security risk.
Still, it is <bcp14>NOT RECOMMENDED</bcp14> to send private keys through the MI. 
Omitting the private key further limits the possible ways an attacker could exploits the delegated credential.
</t>
      <t>
If this recommendation is not followed, i.e., the private key is communicated via the MI, the transported private key <bcp14>MUST</bcp14> be encrypted within a JWE envelope using the encryption key (PrivateKeyEncryptionKey) provided within the FCI.DelegatedCredentials by the dCDN. 
The JWE encryption key (PrivateKeyEncryptionKey) <bcp14>MUST</bcp14> have a strength equal to or larger than the private key it is encrypting for transport.
Note that the specified encryption method does not offer forward secrecy. If the dCDN's encryption key becomes compromised in the future, then all encrypted JWEs will become compromised. Due to the short-lived nature of delegated credentials, the impact is limited.
</t>
      <t>
It is also important to ensure that an attacker is not able to systematically retrieve a consecutive or consistent set of delegated credentials and associated private keys.
Such an attack would allow the attacker to systematically impersonate dCDN nodes. 
The MI objects defined in the present document are transferred via the interfaces defined in CDNI <xref target="RFC8006"/>. 
<xref target="RFC8006"/> describes how to secure these interfaces, protecting the integrity and confidentiality, as well as ensuring the
authenticity of the dCDN and uCDN, which should prevent an attacker from systematically retrieving delegated credentials and associated private keys.
</t>
    </section>
    <section anchor="privacy">
      <name>Privacy Considerations</name>

      <t>
The FCI and MI objects and the information defined in the present document do not contain any personally identifiable information (PII).
   As such, this document does not change or alter the confidentiality and
   privacy considerations outlined in <xref target="RFC8006" section="8.2"/> and 
   <xref target="RFC8008" section="7"/>.
      </t>
      <t>
A single or systematic retrieval of delegated credentials and associated private keys would allow the attacker to decrypt any data sent by the end user intended for the end service, which may include PII.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7516.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7517.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8006.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8008.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8446.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9345.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4648.xml"/>
      </references>
      <references>
        <name>Informative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7336.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7337.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7736.xml"/>
      </references>
    </references>
  </back>
</rfc>
