<?xml version="1.0" encoding="utf-8"?>
<?xml-model href="rfc7991bis.rnc"?>


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

<rfc
  xmlns:xi="http://www.w3.org/2001/XInclude"
  category="std"
  ipr="trust200902"
  obsoletes=""
  updates=""
  submissionType="IETF"
  xml:lang="en"
  version="3"
  tocInclude="true"
  tocDepth="5"
  symRefs="true"
  sortRefs="true"
  consensus="true"
  docName="draft-ietf-cdni-protected-secrets-metadata-08"
>
   <front>
      <title abbrev="CDNI Protected Secrets Metadata">Content Delivery Network Interconnection (CDNI) Protected Secrets Metadata</title>
      <author initials="B." surname="Rosenblum" fullname="Ben Rosenblum">
         <organization>Vecima</organization>
         <address>
            <postal>
               <street />
               <city />
               <region />
               <code />
               <country>US</country>
            </postal>
            <email>ben@rosenblum.dev</email>
         </address>
      </author>
      <author fullname="Glenn Goldstein" initials="G." surname="Goldstein">
         <organization>Lumen Technologies</organization>
         <address>
            <postal>
               <street />
               <city />
               <region />
               <code />
               <country>US</country>
            </postal>
            <email>glenng1215@gmail.com</email>
         </address>
      </author>

      <date />
      <workgroup>Content Delivery Networks Interconnection</workgroup>
      <abstract>
         <t>
            This document defines Content Delivery Network Interconnection (CDNI) Metadata Interface and Footprint and Capabilities Interface objects that carry secrets, such as encryption keys, either embedded and encrypted to the recipient's certificate or referenced in an external store.
        </t>
      </abstract>
   </front>
<middle>
<section anchor="h.3znysh7">
  <name>Introduction</name>
  <t>Certain objects in both the CDNI Footprint and Capabilities Interface (FCI) <xref target="RFC8008"/> and Metadata Interface (MI) <xref target="RFC8006"/> encapsulate sensitive values, such as credentials and access keys, which should not necessarily be accessible to all parties that can view the advertisement and configuration payloads.</t>
  <t>This document defines two mechanisms to enclose secret values in the context of other FCI and MI objects that may only be viewed by the intended recipients: embedded secrets encrypted using a certificate supplied by a counterparty, and secrets stored in an external service and referenced by a path.</t>
  <t>Either side can share secrets, and the functionality is the same for both sides, so the FCI capabilities are wrappers around the MI objects, similar to how FCI footprints (used in <xref target="RFC8008"/>) reuse the MI.Footprint and registry defined in <xref target="RFC8006"/>.</t>
  <t>The public certificate for the downstream content delivery network (dCDN) is shared via FCI.SecretCertificate and the certificate for the upstream content delivery network (uCDN) is shared via MI.SecretCertificate.</t>
  <t>Overview of the workflow for embedded secrets:</t>
  <ul>
    <li>
      <t>uCDN retrieves an advertisement with FCI.SecretStore and FCI.SecretCertificate. The uCDN has not yet provided a certificate, so the advertisement contains no secret values.</t>
    </li>
    <li>
      <t>uCDN provides configuration including MI.SecretStore, MI.SecretCertificate and MI.SecretValue with values encrypted using the dCDN certificate.</t>
    </li>
    <li>
      <t>uCDN receives an updated advertisement with secret values encrypted using the uCDN certificate.</t>
    </li>
  </ul>
  <figure>
    <name>Bi-directional Protected Secrets Workflow, Embedded Store</name>
   <artset>
      <!--<artwork type="svg" src="figure_1.svg" />-->
      <artwork type="ascii-art"><![CDATA[
+----+                                                           +----+
|uCDN|                                                           |dCDN|
+----+                                                           +----+
   |     Retrieve FCI.SecretStore and FCI.SecretCertificate         |
   |--------------------------------------------------------------->|
   |                                                                |
   |----                                                            |
   |    | Encrypt secrets using provided FCI.SecretCertificate      |
   |<---                                                            |
   |                                                                |
   |     Provide MI.SecretStore, MI.SecretCertificate and           |
   |     MI.SecretValue with encrypted secrets                      |
   |--------------------------------------------------------------->|
   |                                                                |
   |                                                            ----|
   |       Encrypt secrets using provided MI.SecretCertificate |    |
   |                                                            --->|
   |                                                                |
   |     Retrieve FCI objects with encrypted MI.SecretValue         |
   |--------------------------------------------------------------->|
   |                                                                |
+----+                                                           +----+
|uCDN|                                                           |dCDN|
+----+                                                           +----+
  ]]>
      </artwork>
   </artset>
</figure>

  <t>Detailed workflow examples, including modes that reference external services or contain secret values in cleartext, are available in the <xref target="h.1t3h5sf">Workflow Examples</xref> section.</t>
  <t>The sender of a secret validates the recipient's certificate before it uses the certificate (<xref target="h.xipr404k1wdv"/>).</t>
</section><section anchor="requirements">
  <name>Requirements</name>
<t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL"
in this document are to be interpreted as described in BCP 14 <xref target="RFC2119"/>
<xref target="RFC8174"/> when, and only when, they appear in all capitals, as shown here.</t>
<t>Long lines in examples are folded as described in <xref target="RFC8792"/>.</t>
</section><section anchor="h.whuucahungsa">
  <name>Metadata Objects</name>
  <t>MI.SecretStore and MI.SecretCertificate are GenericMetadata objects (<xref target="RFC8006" section="4.1.7"/>). An MI.SecretValue is the value of a property of another MI or FCI object.</t>
  <section anchor="h.j2e9d3rz8xjw">
    <name>MI.SecretStore</name>
    <t>MI.SecretStore instructs the counterparty how to dereference the value of any MI.SecretValue objects linked to the store.</t>
    <t>For embedded stores, MI.SecretStore identifies the certificate used for encrypting the values. For external stores, MI.SecretStore specifies the endpoint that is used with the secret-path property of MI.SecretValue to obtain the secret.</t>
    <t>Additional store types can be registered as CDNI Payload Types <xref target="RFC7736"/>. The specification of a store type defines its secret-store-config object and how linked MI.SecretValue objects are dereferenced. A recipient that does not support the secret-store-type of an MI.SecretStore MUST treat MI.SecretValue objects linked to that store as unavailable.</t>
    <t>Property: secret-store-id</t>
    <ul>
      <li>
        <t>Description: An identifier for this store configuration that is referenced from linked MI.SecretValue objects. This value MUST be unique within the context of the metadata objects and the FCI advertisement.</t>
      </li>
      <li>
        <t>Type: String</t>
      </li>
      <li>
        <t>Mandatory-to-Specify: Yes</t>
      </li>
    </ul>
    <t>Property: secret-store-type</t>
    <ul>
      <li>
        <t>Description: The CDNI Payload Type <xref target="RFC7736"/> of the object contained in the secret-store-config property.</t>
      </li>
      <li>
        <t>Type: String</t>
      </li>
      <li>
        <t>Mandatory-to-Specify: Yes</t>
      </li>
    </ul>
    <t>Property: secret-store-config</t>
    <ul>
      <li>
        <t>Description: An object conforming to the specification associated with the secret-store-type.</t>
      </li>
      <li>
        <t>Type: Object</t>
      </li>
      <li>
        <t>Mandatory-to-Specify: Yes</t>
      </li>
    </ul>
  </section>
  <section anchor="h.5i31qh6yc1n">
    <name>MI.SecretStoreTypeEmbedded</name>
    <t>MI.SecretStoreTypeEmbedded contains the configuration necessary to decrypt embedded secrets in MI.SecretValue.</t>
    <t>The encrypted message format is Cryptographic Message Syntax (CMS) as defined in <xref target="RFC5652"/>. Messages MUST be CMS type "AuthEnvelopedData" <xref target="RFC5083"/>. Messages MUST be base64-encoded (<xref target="RFC4648" section="4"/>) DER <xref target="X.690"/> CMS ContentInfo structures. Implementations MUST support AES-128-GCM <xref target="RFC5084"/> and RSAES-OAEP <xref target="RFC3560"/>. RSA keys MUST be at least 2048 bits long. Other algorithms MAY be used by agreement between the parties.</t>
    <t>A cleartext format is also defined for testing purposes. In this case, the value of an MI.SecretValue object's secret-value property is the cleartext secret. It is NOT RECOMMENDED to use the cleartext format in production environments.</t>
    <t>Property: format</t>
    <ul>
      <li>
        <t>Description: The format of the embedded secret. Other formats require a new store type (<xref target="h.j2e9d3rz8xjw"/>).</t>
      </li>
      <li>
        <t>Type: String. Either "cms" or "cleartext".</t>
      </li>
      <li>
        <t>Mandatory-to-Specify: Yes</t>
      </li>
    </ul>
    <t>Property: secret-certificate-id</t>
    <ul>
      <li>
        <t>Description: The ID of the MI.SecretCertificate used to encrypt secret messages linked with this store configuration.</t>
      </li>
      <li>
        <t>Type: String</t>
      </li>
      <li>
        <t>Mandatory-to-Specify: Yes when format is "cms" and a linked MI.SecretValue contains secret-value, otherwise No.</t>
      </li>
    </ul>
    <t>The following is an example of MI.SecretStore with an MI.SecretStoreTypeEmbedded configuration using CMS:</t>
    <figure>
      <sourcecode><![CDATA[{
  "secret-store-id": "ucdn-store-1",
  "secret-store-type": "MI.SecretStoreTypeEmbedded",
  "secret-store-config": {
      "format": "cms",
      "secret-certificate-id": "dcdn-cert-1"
  }
}]]></sourcecode>
    </figure>
  </section>
  <section anchor="h.6copfrgq185z">
    <name>MI.SecretStoreTypeExternal</name>
    <t>MI.SecretStoreTypeExternal contains the configuration necessary to reference secrets stored in an external key/value secret store.</t>
    <t>MI.SecretValue objects reference secrets stored in the external store using the secret-path property to identify the path and property key. See the <xref target="h.jmu453ctvz0m">MI.SecretValue</xref> section for details.</t>
    <t>This document does not define the protocol to retrieve a secret from an external store or how the recipient authenticates to the store. The parties agree on both. Store types that define them can be registered (<xref target="h.j2e9d3rz8xjw"/>).</t>
    <t>Property: endpoint</t>
    <ul>
      <li>
        <t>Description: The base URL of the external secret store. The URL MUST use the "https" scheme (<xref target="RFC9110" section="4.2.2"/>).</t>
      </li>
      <li>
        <t>Type: String</t>
      </li>
      <li>
        <t>Mandatory-to-Specify: Yes</t>
      </li>
    </ul>
    <t>The following is an example of MI.SecretStore with an MI.SecretStoreTypeExternal configuration:</t>
    <figure>
      <sourcecode><![CDATA[{
  "secret-store-id": "ucdn-store-2",
  "secret-store-type": "MI.SecretStoreTypeExternal",
  "secret-store-config": {
      "endpoint": "https://secrets.example.com/"
  }
}]]></sourcecode>
    </figure>
  </section>
  <section anchor="h.jmu453ctvz0m">
    <name>MI.SecretValue</name>
    <t>MI.SecretValue may be used in any FCI or MI object where sensitive data must be transmitted only to intended recipients.</t>
    <t>An MI.SecretValue MUST NOT contain both secret-value and secret-path. With MI.SecretStoreTypeEmbedded, an MI.SecretValue without secret-value indicates that the secret is not available, for example before the recipient has provided a certificate or after it has removed its certificate. The recipient MUST treat such an MI.SecretValue as unavailable.</t>
    <t>Property: secret-store-id</t>
    <ul>
      <li>
        <t>Description: The ID of MI.SecretStore that contains the configuration defining how to decrypt or access the referenced secret.</t>
      </li>
      <li>
        <t>Type: String</t>
      </li>
      <li>
        <t>Mandatory-to-Specify: Yes</t>
      </li>
    </ul>
    <t>Property: secret-value</t>
    <ul>
      <li>
        <t>Description: Used only for embedded secrets. Format is one of the following:</t>
        <ul>
          <li>
            <t>The cleartext string</t>
          </li>
          <li>
            <t>The base64-encoded DER CMS message, as specified in <xref target="h.5i31qh6yc1n"/>.</t>
          </li>
        </ul>
      </li>
      <li>
        <t>Type: String</t>
      </li>
      <li>
        <t>Mandatory-to-Specify: No</t>
      </li>
    </ul>
    <t>Property: secret-path</t>
    <ul>
      <li>
        <t>Description: Used only for external store secrets, the path to the secret, including the key of the particular property to access as the last path parameter.</t>
      </li>
      <li>
        <t>Type: String</t>
      </li>
      <li>
        <t>Mandatory-to-Specify: Yes when the store type is MI.SecretStoreTypeExternal, No when it is MI.SecretStoreTypeEmbedded.</t>
      </li>
    </ul>
    <t>Property: timeout</t>
    <ul>
      <li>
        <t>Description: If this property is present and the elapsed time since last retrieving the secret value has exceeded this timeout, any cached instance of this secret value MUST be discarded and fetched again from the associated secret store. If this property is absent, the sender sets no limit on how long the recipient caches the secret value. This value has no effect when using an embedded store.</t>
      </li>
      <li>
        <t>Type: Integer duration in seconds.</t>
      </li>
      <li>
        <t>Mandatory-to-Specify: No</t>
      </li>
    </ul>
    <t>The following is an example of MI.SecretValue specifying an embedded value:</t>
    <figure>
      <sourcecode><![CDATA[NOTE: '\' line wrapping per RFC 8792

{
  "secret-store-id": "ucdn-store-1",
  "secret-value": "MIIB4QYLKoZIhvcNAQkQARegggHQMIIBzAIBADGCAXYwggFyA\
    gEAMC8wFzEVMBMGA1UEAwwMZGNkbi5leGFtcGxlAhQtq7Z+mgaIVXjibwZStYXPy\
    f8WXjA4BgkqhkiG9w0BAQcwK6ANMAsGCWCGSAFlAwQCAaEaMBgGCSqGSIb3DQEBC\
    DALBglghkgBZQMEAgEEggEAqk2kskAdPgP12PSFGPYjgGPXeXddMSTgd9hZ3Dk8l\
    4ehP6O+GvjhgMOeNtB/9WN1WjxbGcbLyPgYPJa9hVGhC2KFeJCRMEn8kk4F/k3I1\
    f10Jpx2ILaRTc3AkApuMLaxZSaVbQ63NTxhYXGMh+EVdJaY6+EMzkA2IH9D7k7ZI\
    jb8YX6Myr8r3Cm/eq0HxPHQztukY2Jcr6vg5H6jG4zhsrBZFaHRpAYK6sOErIyjp\
    F28xz88+lQIRipsQhPqkZ1deVFYChs/Ix9mjS3URxrtS/KGj/iZdScyQxb4Y792X\
    tW1XHaePy9o+f6hLHx6rUkddJfxyWvkUIs/wJEsyC6CfjA7BgkqhkiG9w0BBwEwH\
    gYJYIZIAWUDBAEGMBEEDFMmNO9IlChMEqeyCgIBEIAOEDVew3L0nP+Iapd1SfMEE\
    KgqlUi+oRvbBLQ0UXn/c8Y="
}]]></sourcecode>
    </figure>
    <t>The following is an example of MI.SecretValue for an external store:</t>
    <figure>
      <sourcecode><![CDATA[{
  "secret-store-id": "ucdn-store-2",
  "secret-path": "bar/baz/importantsecret",
  "timeout": 3600
}]]></sourcecode>
    </figure>
  </section>
  <section anchor="h.xipr404k1wdv">
    <name>MI.SecretCertificate</name>
    <t>MI.SecretCertificate is used to share an X.509 certificate <xref target="RFC5280"/> to be utilized for encrypting embedded secret messages.</t>
    <t>Before the sender of a secret uses a certificate to encrypt the secret, it MUST validate the certificate in one of these ways:</t>
    <ul>
      <li>
        <t>Certification path validation (<xref target="RFC5280" section="6"/>) to a trust anchor agreed between the parties, and a check that the certificate identifies the counterparty.</t>
      </li>
      <li>
        <t>Comparison with a certificate or public key that the parties exchanged out of band.</t>
      </li>
    </ul>
    <t>The certificate-value property contains one certificate; the parties agree how the sender obtains any intermediate certificates.</t>
    <t>Property: certificate-id</t>
    <ul>
      <li>
        <t>Description: An identifier for this MI.SecretCertificate that is referenced by the secret-certificate-id property of a counterparty's MI.SecretStoreTypeEmbedded configuration. This value MUST be unique within the context of the metadata objects and the FCI advertisement.</t>
      </li>
      <li>
        <t>Type: String</t>
      </li>
      <li>
        <t>Mandatory-to-Specify: Yes</t>
      </li>
    </ul>
    <t>Property: certificate-value</t>
    <ul>
      <li>
        <t>Description: The base64-encoded (<xref target="RFC4648" section="4"/>) DER <xref target="X.690"/> certificate.</t>
      </li>
      <li>
        <t>Type: String</t>
      </li>
      <li>
        <t>Mandatory-to-Specify: Yes</t>
      </li>
    </ul>
    <t>The following is an example of MI.SecretCertificate:</t>
    <figure>
      <sourcecode><![CDATA[NOTE: '\' line wrapping per RFC 8792

{
  "certificate-id": "ucdn-cert-1",
  "certificate-value": "MIIDHDCCAgSgAwIBAgIUfqyKmabtHWTnPBb+UZ8Lt0qC\
    DBEwDQYJKoZIhvcNAQELBQAwFzEVMBMGA1UEAwwMdWNkbi5leGFtcGxlMB4XDTI2\
    MTEwMjE4NDU1MVoXDTM2MTAzMDE4NDU1MVowFzEVMBMGA1UEAwwMdWNkbi5leGFt\
    cGxlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnGkTFuH00aaeaXZm\
    7EaXQlMSn89rkA8xgrnqswZl7S6lULM5GJU+2ECxdsmZhL759YuxYe9R8YXoQoMZ\
    tOgOlbR1YlinxO/sQMAqQk0KkwpK9oowRqFss+KcEvZ8HovhvHATc3OySCd4vVoU\
    KNPX+tH0mZR2whE0qbAHm/1eggL43LPRJRcpTY5gGWBtRkcrt1OGO4ChmC0Cr5Ep\
    L42SFlBDCeEeRUDXBO1EAG28c1ynC9ek27hZt8BOOttK2vYudWp7nRK4LB5fZPfp\
    3nrQb/TM4GZnfzLwMSCNeZBRdRIuwLLGL9+R6+NqFQ69C+2P2AgUiaxm8r8kIJoc\
    SP21qwIDAQABo2AwXjAdBgNVHQ4EFgQUq0JZOFLdE68bsTShXt0weM546IUwHwYD\
    VR0jBBgwFoAUq0JZOFLdE68bsTShXt0weM546IUwDAYDVR0TAQH/BAIwADAOBgNV\
    HQ8BAf8EBAMCBSAwDQYJKoZIhvcNAQELBQADggEBAH+VMRITZwcw80RNtJsiUAGG\
    WMU8F+Ve1olo3z7HwExeq0KOyekU1GzTmBEZopMYfDKCDeF+InDzdLsJL9xeQLab\
    YiWCnfBqyOGmqqEXgg+KcUUdrec/eKzLhnLQVj0HPRTgcBHfTD4sp96KqQu13Ijw\
    hrGNLh2n0khBVex5k/eEb8jycMh4rQq/Dddtxc+shMjFk6afJ6V2hm4R4WcGhbFn\
    QfLkfqO2QDskBeBlMifuB61qutqEJ2n2q/teImuyKiUGAQLVLH7HBYiyOijId0cs\
    VF39LGygRJh5x+TQ3AUsN9I/dy7GdL0PmnJQAENzTXPfQAVvN0ekTAVfh54Rzok="
}]]></sourcecode>
    </figure>
  </section>
</section><section anchor="h.srhn8j90yvp0">
  <name>Capabilities Objects</name>
  <t>These objects are FCI capability objects (<xref target="RFC8008" section="5.1"/>) whose capability-value is the corresponding MI object defined in <xref target="h.whuucahungsa"/>.</t>
  <section anchor="h.ufjifor73s2v">
    <name>FCI.SecretStore</name>
    <t>FCI.SecretStore instructs the uCDN how to dereference the value of any MI.SecretValue objects linked to the store from other FCI objects via an embedded MI.SecretStore object. For further details, see the <xref target="h.j2e9d3rz8xjw">MI.SecretStore</xref> section.</t>
    <t>The following is an example of FCI.SecretStore before the uCDN has provided a certificate (step 1 in <xref target="h.1ph3ib221d39"/>):</t>
    <figure>
      <sourcecode><![CDATA[{
  "capabilities": [
    {
      "capability-type": "FCI.SecretStore",
      "capability-value": {
        "secret-store-id": "dcdn-store-1",
        "secret-store-type": "MI.SecretStoreTypeEmbedded",
        "secret-store-config": {
           "format": "cms"
        }
      }
    }
  ]
}]]></sourcecode>
    </figure>
  </section>
  <section anchor="h.uc08g68lmfqp">
    <name>FCI.SecretCertificate</name>
    <t>FCI.SecretCertificate is used to share an X.509 certificate <xref target="RFC5280"/> to be utilized for encrypting embedded secret messages via an embedded MI.SecretCertificate object. For further details, see the  <xref target="h.xipr404k1wdv">MI.SecretCertificate</xref> section.</t>
    <t>The following is an example of FCI.SecretCertificate:</t>
    <figure>
      <sourcecode><![CDATA[NOTE: '\' line wrapping per RFC 8792

{
  "capabilities": [
    {
      "capability-type": "FCI.SecretCertificate",
      "capability-value": {
        "certificate-id": "dcdn-cert-1",
        "certificate-value": "MIIDHDCCAgSgAwIBAgIULau2fpoGiFV44m8GUr\
          WFz8n/Fl4wDQYJKoZIhvcNAQELBQAwFzEVMBMGA1UEAwwMZGNkbi5leGFt\
          cGxlMB4XDTI2MTEwMjE4NDU1MloXDTM2MTAzMDE4NDU1MlowFzEVMBMGA1\
          UEAwwMZGNkbi5leGFtcGxlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\
          CgKCAQEAvjNpLTTKkWGAYvrO22MPt7UnHHH8ALLSCfrv3hLcYJizYNrPwi\
          7oMwzEUKObPrLxx1dNHBSQKUtWwa/i8MlRjQpyg+hxlbeoVzbwui8iECyI\
          qbkRgjO0U0+FuYByi92Pj1dMJCuFfvvw91ZZ4ZbS+vj6twteVral3yO3XI\
          BbOzljxxVCi2QEtI/H0zVt9MFViDzswQ8xZ8XC32qLIfgIcjP+wsN7ML0R\
          2HCYoGuFK2ZT+Tss3Mzt8Z0a3xN2ZM9cGHi7ujPYQIeolPowd7Lr/TWd4b\
          yV8uyy3RIV91ED6g67rE9mDCw/M/73jx71dcGwGpuBdu2PEDNptiUH1Ap/\
          BQIDAQABo2AwXjAdBgNVHQ4EFgQUgPa2cu1ecgfdoPFvR8fPC3pw41UwHw\
          YDVR0jBBgwFoAUgPa2cu1ecgfdoPFvR8fPC3pw41UwDAYDVR0TAQH/BAIw\
          ADAOBgNVHQ8BAf8EBAMCBSAwDQYJKoZIhvcNAQELBQADggEBAFzyGgbmRi\
          ijJc2NxXhyKmrJjEOu/XPOysbQWPGOOhloTeNjOW4ZVWwF3Leddkp/ympv\
          kbfk1fx4PWYfPdrskhfAhs7EQfWgnBd1sV9FcLJEme3yE0Z94RMbmo2Qjy\
          9V8ji91KE/rQwLxbRsdqIVsOn15uSynUxoxz6SO0HKjyR4aiOXoRvsKZ+Y\
          SUq3w2we0Qmdal+Esk2q/+3ueZM/+ZUhP5aItMxL4yk8fSPKizbLDBmS4F\
          c3i/heacLJEIEnuADDjIjOV+3o40IBWSS9BN8/crikaGyN5wjNkQGsKYCq\
          8M+0qri/sIMp7gT9+MKsZ6/WDbOEuFnhk4DowK7eims="
      }
    }
  ]
}]]></sourcecode>
    </figure>
  </section>
</section><section anchor="h.1t3h5sf">
  <name>Workflow Examples</name>
  <t>The facilities in this document can be used for simple and bidirectional exchange of secret values between a uCDN and a dCDN. The embedded model provides for a secret exchange without reference to out-of-band services, while the external store support allows for reference to secrets stored in an external key/value store.</t>
  <t>Other secret distribution methods can be supported by defining new store types (<xref target="h.j2e9d3rz8xjw"/>).</t>
  <t>Provided below are workflow examples for uCDN -&gt; dCDN and dCDN -&gt; uCDN exchanges of secret values.</t>
  <t>In the embedded model, the RECOMMENDED procedure for key rollover, for example before a certificate expires, is as follows:</t>
  <ul>
    <li>
      <t>The recipient of a secret provides an MI.SecretCertificate with the same certificate-id and a new certificate-value, and keeps the previous private key.</t>
    </li>
    <li>
      <t>The sender of the secret SHOULD then encrypt the linked secrets with the new certificate and update the secret-value properties.</t>
    </li>
    <li>
      <t>The recipient can discard the previous private key when no secret-value that it holds uses it. The RecipientInfo of each CMS message identifies the certificate used (<xref target="RFC5652" section="6.2"/>).</t>
    </li>
  </ul>
  <t>To revoke a certificate, for example after a key compromise, the recipient removes the MI.SecretCertificate. The sender SHOULD then remove the secret-value property from the linked MI.SecretValue objects, as in the initial state before any certificate has been provided.</t>
  <section anchor="h.1ph3ib221d39">
    <name>Workflow: dCDN -&gt; uCDN Embedded</name>
    <ol>
      <li>
        <t>The dCDN advertises FCI.SecretStore with a secret-store-type of MI.SecretStoreTypeEmbedded; other FCI objects may contain MI.SecretValue objects that reference the secret-store-id. MI.SecretValue objects do not presently contain a secret-value property.</t>
      </li>
      <li>
        <t>The uCDN pushes the MI configuration with an MI.SecretCertificate.</t>
      </li>
      <li>
        <t>The dCDN updates the advertised FCI.SecretStore with a secret-certificate-id property that references the uCDN MI.SecretCertificate provided in step 2; any MI.SecretValue objects in other FCI objects now contain a secret-value property with the CMS encrypted secret.</t>
      </li>
    </ol>
    <figure>
      <name>dCDN -&gt; uCDN Workflow, Embedded Store</name>
   <artset>
      <!--<artwork type="svg" src="figure_2.svg" />-->
      <artwork type="ascii-art"><![CDATA[
+----+                                                           +----+
|uCDN|                                                           |dCDN|
+----+                                                           +----+
   |     Retrieve FCI.SecretStore                                   |
   |--------------------------------------------------------------->|
   |                                                                |
   |     Provide MI.SecretCertificate                               |
   |--------------------------------------------------------------->|
   |                                                                |
   |                                                            ----|
   |       Encrypt secrets using provided MI.SecretCertificate |    |
   |                                                            --->|
   |                                                                |
   |     Retrieve FCI objects with encrypted MI.SecretValue         |
   |--------------------------------------------------------------->|
   |                                                                |
+----+                                                           +----+
|uCDN|                                                           |dCDN|
+----+                                                           +----+
  ]]>
      </artwork>
   </artset>
</figure>

  </section>
  <section anchor="h.y0gwt01xzn19">
    <name>Workflow: uCDN -&gt; dCDN Embedded</name>
    <ol>
      <li>
        <t>The dCDN advertises an FCI.SecretCertificate.</t>
      </li>
      <li>
        <t>The uCDN pushes the MI configuration containing MI.SecretStore with a secret-store-type of MI.SecretStoreTypeEmbedded and a secret-certificate-id referencing the FCI.SecretCertificate advertised by the dCDN. Other MI objects may contain MI.SecretValue objects with a secret-value property containing the CMS encrypted secret.</t>
      </li>
    </ol>
    <figure>
      <name>uCDN -&gt; dCDN Workflow, Embedded Store</name>
   <artset>
      <!--<artwork type="svg" src="figure_3.svg" />-->
      <artwork type="ascii-art"><![CDATA[
+----+                                                           +----+
|uCDN|                                                           |dCDN|
+----+                                                           +----+
   |     Retrieve FCI.SecretCertificate                             |
   |--------------------------------------------------------------->|
   |                                                                |
   |----                                                            |
   |    | Encrypt secrets using provided FCI.SecretCertificate      |
   |<---                                                            |
   |                                                                |
   |     Provide MI.SecretStore and MI.SecretValue objects          |
   |--------------------------------------------------------------->|
   |                                                                |
+----+                                                           +----+
|uCDN|                                                           |dCDN|
+----+                                                           +----+
  ]]>
      </artwork>
   </artset>
</figure>

  </section>
  <section anchor="h.yrrrbry1hpcq">
    <name>Workflow: Embedded Cleartext (uCDN and dCDN)</name>
    <ol>
      <li>
        <t>An MI.SecretStore has an MI.SecretStoreTypeEmbedded configuration with format "cleartext".</t>
      </li>
      <li>
        <t>Any MI.SecretValue objects that reference the cleartext store contain a secret-value property with the unencrypted secret.</t>
      </li>
    </ol>
    <figure>
      <name>Embedded Cleartext Workflow</name>
   <artset>
      <!--<artwork type="svg" src="figure_4.svg" />-->
      <artwork type="ascii-art"><![CDATA[
+----+                                                           +----+
|uCDN|                                                           |dCDN|
+----+                                                           +----+
   |  Retrieve FCI.SecretStore ("cleartext") and FCI objects        |
   |  with MI.SecretValue                                           |
   |--------------------------------------------------------------->|
   |                                                                |
   |  Provide MI.SecretStore ("cleartext") and MI.SecretValue       |
   |--------------------------------------------------------------->|
   |                                                                |
+----+                                                           +----+
|uCDN|                                                           |dCDN|
+----+                                                           +----+
  ]]>
      </artwork>
   </artset>
</figure>

  </section>
  <section anchor="h.fqkg6gaqyy99">
    <name>Workflow: dCDN -&gt; uCDN External Store</name>
    <t>The dCDN advertises an FCI.SecretStore with an appropriate configuration for accessing an external secret store accessible to the uCDN. Other FCI objects may contain MI.SecretValue objects that reference the FCI.SecretStore and a secret-path property specifying the secret to retrieve.</t>
    <figure>
      <name>dCDN -&gt; uCDN Workflow, External Store</name>
   <artset>
      <!--<artwork type="svg" src="figure_5.svg" />-->
      <artwork type="ascii-art"><![CDATA[
+----+                                               +----+     +-----+
|uCDN|                                               |dCDN|     |Store|
+----+                                               +----+     +-----+
   |     Retrieve external FCI.SecretStore              |           |
   |     and FCI objects with MI.SecretValue            |           |
   |--------------------------------------------------->|           |
   |                                                    |           |
   |     Retrieve secrets using path provided           |           |
   |     in MI.SecretValue objects                      |           |
   |----------------------------------------------------|---------->|
   |                                                    |           |
+----+                                               +----+     +-----+
|uCDN|                                               |dCDN|     |Store|
+----+                                               +----+     +-----+
  ]]>
      </artwork>
   </artset>
</figure>

  </section>
  <section anchor="h.g4fzyjfyx8fx">
    <name>Workflow: uCDN -&gt; dCDN External Store</name>
    <t>The uCDN provides the MI configuration, including an MI.SecretStore with appropriate configuration for accessing an external secret store accessible to the dCDN. Other MI objects may contain MI.SecretValue objects that reference the MI.SecretStore and a secret-path property specifying the secret to retrieve.</t>
    <figure>
      <name>uCDN -&gt; dCDN Workflow, External Store</name>
   <artset>
      <!--<artwork type="svg" src="figure_6.svg" />-->
      <artwork type="ascii-art"><![CDATA[
+----+                            +----+                        +-----+
|uCDN|                            |dCDN|                        |Store|
+----+                            +----+                        +-----+
   |                                 |                              |
   | Provide external MI.SecretStore |                              |
   | and MI.SecretValue objects      |                              |
   |-------------------------------->|                              |
   |                                 |                              |
   |                                 | Retrieve secrets using path  |
   |                                 | provided in MI.SecretValue   |
   |                                 | objects                      |
   |                                 |----------------------------->|
   |                                 |                              |
+----+                            +----+                        +-----+
|uCDN|                            |dCDN|                        |Store|
+----+                            +----+                        +-----+
  ]]>
      </artwork>
   </artset>
</figure>

  </section>
</section><section anchor="Security">
  <name>Security Considerations</name>
            <t>The objects defined in this document are carried in the FCI and the MI, and the security considerations of <xref target="RFC8008" section="7"/> and <xref target="RFC8006" section="8"/> apply. Both require authentication of the peers and protection of the integrity and confidentiality of the objects. An attacker that can insert, delete, modify or replay MI or FCI objects can, for example, add its own secrets, replace a certificate or a store endpoint, remove a secret, or bring back a replaced secret. As <xref target="RFC8008" section="7"/> assumes, the parties have a preexisting relationship; misuse of a secret by a party authorized to hold it is out of scope.</t>
            <t><xref target="RFC8008" section="7"/> finds no apparent need for further object-level security in bilateral CDNI relationships. The confidentiality of secrets is an exception: MI and FCI payloads are visible to more systems and people than the component that uses a secret, for example when they are stored, logged or shown in management tools. With the "cms" format, only the holder of the recipient's private key can read a secret; with an external store, the secret is not in the payload.</t>
            <t>AuthEnvelopedData protects the confidentiality and integrity of a secret but does not authenticate the sender (<xref target="RFC8551" section="2.4.4"/>): anyone who has the recipient's certificate can create a valid message. The security considerations of <xref target="RFC5652"/>, <xref target="RFC5083"/>, <xref target="RFC5084"/> and <xref target="RFC3560"/> apply. The "cleartext" format provides no protection beyond that of the interfaces.</t>
            <t>An attacker that replaces the certificate in an MI.SecretCertificate or FCI.SecretCertificate with its own receives every secret later encrypted to it; the validation in <xref target="h.xipr404k1wdv"/> protects against this. Removing a certificate (<xref target="h.1t3h5sf"/>) does not protect secrets already encrypted to it, so after a compromise of the recipient's private key the sender SHOULD replace the affected secrets with new values.</t>
            <t>For external stores, the endpoint is an "https" URL (<xref target="h.6copfrgq185z"/>), so the recipient verifies the identity of the store (<xref target="RFC9110" section="4.3.4"/>); the parties agree how the recipient authenticates to the store. The sender supplies the endpoint, so a recipient can be made to send requests, possibly with its store credentials, to other systems, including systems in its own network. Recipients SHOULD send requests only to endpoints agreed between the parties. The availability of a secret in an external store depends on the store; a longer timeout (<xref target="h.jmu453ctvz0m"/>) reduces this dependence but keeps a replaced secret in use for longer.</t>
            <t>A recipient that uses an empty or default value in place of an unavailable secret can remove the protection that the secret provides. Implementations SHOULD NOT log secrets.</t>
        </section><section anchor="IANA">
          <name>IANA Considerations</name>
            <section anchor="IANA.cdni.payload.types">
              <name>CDNI Payload Types</name>
                <t>This document requests the registration of the following entries under the "CDNI Payload Types" registry hosted by IANA:
                </t>
                <table>
                    <name>CDNI Payload Types</name>
                    <thead>
                        <tr><td>Payload Type</td><td>Specification</td></tr>
                    </thead>
                    <tbody>
                        <tr><td>MI.SecretStore</td><td>RFCthis</td></tr>
                        <tr><td>MI.SecretStoreTypeEmbedded</td><td>RFCthis</td></tr>
                        <tr><td>MI.SecretStoreTypeExternal</td><td>RFCthis</td></tr>
                        <tr><td>MI.SecretValue</td><td>RFCthis</td></tr>
                        <tr><td>MI.SecretCertificate</td><td>RFCthis</td></tr>
                        <tr><td>FCI.SecretStore</td><td>RFCthis</td></tr>
                        <tr><td>FCI.SecretCertificate</td><td>RFCthis</td></tr>
                    </tbody>
                 </table>
                <t>[RFC Editor: Please replace RFCthis with the published RFC number for this document.]</t>
            </section>
</section><section anchor="Acknowledgements">
  <name>Acknowledgements</name>
            <t>
                The authors would like to express their gratitude to the members of the Streaming Video Technology Alliance <xref target="SVTA"/> Open Caching Working Group for their contributions and guidance.
            </t>
            <t>The following people contributed to this document:</t>
                <ul>
                    <li>Chris Lemmons (Comcast)</li>
                    <li>Rajeev RK (picoNETS)</li>
                    <li>Yoav Gressel (Qwilt)</li>
                    <li>Arnon Warshavsky (Qwilt)</li>
                    <li>Alfonso Siloniz (Telefonica)</li>
                </ul>
        </section>
   </middle>
   <back>
      <references>
        <name>Normative References</name>
         <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.4648.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.5280.xml"/>
         <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5652.xml"/>
         <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5083.xml"/>
         <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5084.xml"/>
         <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3560.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.9110.xml"/>


         <reference anchor="X.690" target="https://www.itu.int/rec/T-REC-X.690-202102-I/en">
            <front>
               <title>Information technology - ASN.1 encoding rules: Specification of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) and Distinguished Encoding Rules (DER)</title>
               <author><organization>ITU-T</organization></author>
               <date year="2021" month="February" />
            </front>
            <seriesInfo name="ITU-T Recommendation" value="X.690"/>
         </reference>

      </references>
      <references>
        <name>Informative References</name>
        <reference anchor="SVTA" target="https://www.svta.org">
            <front>
               <title>Streaming Video Technology Alliance Home Page</title>
               <author><organization>SVTA</organization></author>
               <date />
            </front>
         </reference>
         <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7736.xml"/>
         <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8551.xml"/>
         <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8792.xml"/>
      </references>
   </back>
</rfc>
