<?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-06"
>
   <front>
      <title abbrev="CDNI Protected Secrets Metadata">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 a simple mechanism for protected secret data (such as salt values or encryption keys) that may be embedded in configuration metadata or capabilities advertisements.
        </t>
      </abstract>
   </front>
<middle>
<section anchor="h.3znysh7">
  <name>Introduction</name>
  <t>Certain objects in both the FCI and MI interfaces 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, including embedded secrets encrypted using a certificate supplied by a counterparty and secrets stored in an external service (support defined in this draft is specifically for HashiCorp Vault), which are accessed via a specified path and a key ID. Refer to <xref target="HCVAULT"/> documentation for details.</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"/>) reutilize 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. As the uCDN has not yet provided a certificate, any embedded secret values in the advertisement are omitted; the dCDN is not yet able to encrypt the secrets, so no secrets are present.</t>
    </li>
    <li>
      <t>uCDN provides configuration including MI.SecretStore and MI.SecretValue with values encrypted using the dCDN certificate.</t>
    </li>
    <li>
      <t>uCDN receives an updated capabilities advertisement; having provided an MI.SecretCertificate, the advertisement SHOULD now contain populated MI.SecretValue objects if secret values are utilized, encrypted with the provided certificate.</t>
    </li>
  </ul>
  <figure title="Bi-directional Protect Secrets Workflow, Embedded Store Type">
   <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 encrypted secrets via MI.SecretValue               |
   |--------------------------------------------------------------->|
   |                                                                |
   |     Provide MI.SecretStore and MI.SecretCertificate            |
   |--------------------------------------------------------------->|
   |                                                                |
   |                                                            ----|
   |       Encrypt secrets using provided MI.SecretCertificate |    |
   |                                                            --->|
   |                                                                |
   |     Retrieve FCI.SecretValue with encrypted secrets            |
   |--------------------------------------------------------------->|
   |                                                                |
┌────┐                                                           ┌────┐
│uCDN│                                                           │dCDN│
└────┘                                                           └────┘
  ]]>
      </artwork>
   </artset>
</figure>

  <t>Detailed workflow examples, including modes that reference external services or contain secret values in plaintext, are available in the <xref target="h.1t3h5sf">Workflow Examples</xref> section.</t>
  <t>The MI.SecretValue objects are utilized in the FCI and MI interfaces, where secrets must be referenced.</t>
  <t>Certificates can be validated based on signatures in production environments, and self-signed certificates can be accepted in testing/lab environments. With this model, no out-of-band communication is required to share secrets.</t>
</section><section anchor="requirements" title="Requirements">
<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>
</section><section anchor="h.whuucahungsa">
  <name>Metadata Objects</name>
  <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 (e.g., HashiCorp Vault), MI.SecretStore specifies the service endpoint that SHOULD be used in conjunction with the MI.SecretValue key path to obtain the secure data.</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: A type discriminator for the configuration object, this property specifies whether the linked MI.SecretValue objects contain embedded secret objects or reference an external store.</t>
      </li>
      <li>
        <t>Type: String. Either "MI.SecretStoreTypeEmbedded" or "MI.SecretStoreTypeHashiCorpVault".</t>
      </li>
      <li>
        <t>Mandatory-to-Specify: Yes</t>
      </li>
    </ul>
    <t>Property: secret-store-config</t>
    <ul>
      <li>
        <t>Description: The appropriate configuration object for the specified store type.</t>
      </li>
      <li>
        <t>Type: Object, with type specified by the secret-store-type property.</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 only currently supported encrypted message format is Cryptographic Message Syntax (CMS) as defined in <xref target="RFC5652"/> Messages MUST be CMS type "EnvelopedData". Messages MUST be encoded as Base64 per section 4 of <xref target="RFC4648"/> Messages MAY also be optionally formatted with encapsulation boundaries as per <xref target="RFC7468"/> It is strongly preferred to utilize the <xref target="RFC7468"/> message formatting when capable.</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 encrypted message.</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", otherwise No.</t>
      </li>
    </ul>
    <t>The following is an example of MI.SecretStoreTypeEmbedded specifying use of CMS:</t>
    <figure>
      <sourcecode><![CDATA[{
  "secret-store-id": "store-1",
  "secret-store-type": "MI.SecretStoreTypeEmbedded",
  "secret-store-config": {
      "format": "cms",
      "secret-certificate-id": "cert-1"
  }
}]]></sourcecode>
    </figure>
  </section>
  <section anchor="h.6copfrgq185z">
    <name>MI.SecretStoreTypeHashiCorpVault</name>
    <t>MI.SecretStoreTypeHashiCorpVault contains the configuration necessary to reference secrets stored in an external instance of a HashiCorp Vault KV store <xref target="HCVAULT"/>.</t>
    <t>MI.SecretValue objects reference secrets stored in the Vault 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>Property: endpoint</t>
    <ul>
      <li>
        <t>Description: The base URL of the Vault instance.</t>
      </li>
      <li>
        <t>Type: String</t>
      </li>
      <li>
        <t>Mandatory-to-Specify: Yes</t>
      </li>
    </ul>
    <t>Property: namespace</t>
    <ul>
      <li>
        <t>Description: The Vault namespace in which secret lookups should be performed.</t>
      </li>
      <li>
        <t>Type: String</t>
      </li>
      <li>
        <t>Mandatory-to-Specify: Yes</t>
      </li>
    </ul>
    <t>Property: version</t>
    <ul>
      <li>
        <t>Description: The Vault KV version.</t>
      </li>
      <li>
        <t>Type: Integer. Valid values: 1 or 2.</t>
      </li>
      <li>
        <t>Mandatory-to-Specify: Yes</t>
      </li>
    </ul>
    <t>The following is an example of MI.SecretStoreTypeHashiCorpVault specifying a version KV-V1 Vault:</t>
    <figure>
      <sourcecode><![CDATA[{
  "secret-store-id": "store-2-vaultv1",
  "secret-store-type": "MI.SecretStoreTypeHashiCorpVault",
  "secret-store-config": {
      "endpoint": "https://vault.example.com/v1/secret",
      "version": 1,
      "namespace": "customer-1"
  }
}]]></sourcecode>
    </figure>
    <t>The following is an example of MI.SecretStoreTypeHashiCorpVault specifying a version KV-V2 Vault:</t>
    <figure>
      <sourcecode><![CDATA[{
  "secret-store-id": "store-3-vaultv2",
  "secret-store-type": "MI.SecretStoreTypeHashiCorpVault",
  "secret-store-config": {
      "endpoint": "https://vault.example.com/v1/secret",
      "version": 2,
      "namespace": "customer-1"
  }
}]]></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. Only one of secret-value or secret-path MUST be specified, depending on the store type.</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 PEM encoded or Base64 encoded value of a CMS message. If the message begins with an <xref target="RFC7468"/> pre-encapsulation boundary of "---BEGIN CMS---", the message MUST be decoded according to <xref target="RFC7468"/> If no pre-encapsulation boundary is present, the message MUST be decoded as per section 4 of <xref target="RFC4648"/> Future versions of this specification will deprecate support for plain <xref target="RFC4648"/> encoding.</t>
          </li>
        </ul>
      </li>
      <li>
        <t>Type: String</t>
      </li>
      <li>
        <t>Mandatory-to-Specify: Yes, if secret-path is not specified.</t>
      </li>
    </ul>
    <t>Property: secret-path</t>
    <ul>
      <li>
        <t>Description: Used only for HashiCorp Vault secrets, the path, not including namespace, 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, if secret-value is not specified.</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. 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[{
  "secret-store-id": "store-1-cms",
  "secret-value": "---BEGIN CMS—
MIIBiQYJKoZIhvcNAQcDoIIBejCCAXYCAQAxggEhMIIBHQIBAD
AFMAACAQEwDQYJKoZIhvcNAQEBBQAEggEApJeXzsUS1jbAyNtQiJ9um9IMIHW5B2g+gHn
XdNSTyd33OEfTR6yLSZihBlFbHpY3qSzK1CX7RF5Oz3SqLDW+r3i1D/aHbVXwQbviWHEv
Hterql8l9VDm2FCNaDx5vihdbtvng3+/vdJNNMMhmovwZL5uhPsK81DkKwZCvznMMWt8Y
dNSFGT62f73ash7Eg/mS54IUyYOJHYrXEkRLSjvl0j+JqcIR8hCOCA78+5bS4MgfdsS9x
xSwQTrPru6EdTivMDKE/jlKg7li8lWdirWqtv0za5gLmH5T+zslXIoklwERAE50Jj8FxZ
D98EikKH8DAa+JeFsBm6Z1+yVFsWucTBMBgkqhkiG9w0BBwEwHQYJYIZIAWUDBAEqBBBw
s1riXA6m336zRbsiKtrVgCA267133v2zD/wjFQHXrKSJfd/2YJaxPskgdmQaVlgWCw==
–--END CMS–--"
}]]></sourcecode>
    </figure>
    <t>The following is an example of MI.SecretValue for a Vault:</t>
    <figure>
      <sourcecode><![CDATA[{
  "secret-store-id": "store-2-vaultv1",
  "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 <xref target="X.509"/> certificate to be utilized for encrypting embedded secret messages.</t>
    <t>In lab and testing environments, this certificate MAY be self-signed, depending on participant agreement.</t>
    <t>In production environments, this SHOULD be a certificate signed by an appropriate certificate authority (CA) and validated by the counterparty.</t>
    <t>Property: certificate-id</t>
    <ul>
      <li>
        <t>Description: A unique ID for this certificate that can be referenced from a corresponding MI.SecretStore configuration defined by a counterparty.</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 PEM encoded OR Base64 encoded certificate.If the value begins with an <xref target="RFC7468"/> pre-encapsulation boundary of "---BEGIN CERTIFICATE---", the message MUST be decoded according to <xref target="RFC7468"/> If no pre-encapsulation boundary is present, the message MUST be decoded as per section 4 of <xref target="RFC4648"/> Future versions of this specification will deprecate support for plain <xref target="RFC4648"/> encoding.</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[{
  "certificate-id": "store-1",
  "certificate-value": "---BEGIN CERTIFICATE---
MIIDZTCCAk2gAwIBAgIUFJokJzAxDgUGsBd8uhSblpMwS
LAwDQYJKoZIhvcNAQELBQAwQjELMAkGA1UEBhMCVVMxEDAOBgNVBAgMB0dlb3JnaWExIT
AfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0yMzAxMjMyMDM2MDNaFw0
yMzAyMjIyMDM2MDNaMEIxCzAJBgNVBAYTAlVTMRAwDgYDVQQIDAdHZW9yZ2lhMSEwHwYD
VQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwggEiMA0GCSqGSIb3DQEBAQUAA4IBD
wAwggEKAoIBAQCT11o9yebJmjiq7mXbLtnr5THpTnyahNpKECI+N8YZSl5+cS9hGa06zK
QV3MNxbjJ15smmeWbgynYGwqhs5ZXGUjzd8S1/M1A08z1VFhEJiODQ00f3BOocpIn25RQ
zFz/BOLREW7sLkrhuz/WVBR3bzp6T1gu3nKcRSNuNxO1p9490gS1LhsZYQKfNvncuxBCP
0GTNbUOXd6xkQ+EX5cEKoODUYWzOMdMAMlEEFb4jUjxYbbJoygwTMHpG2yGAQ2IXpB2/w
rrawivxDHlMHGpML+Ie8o6YBR4PDiOJmlCg9uIsirf65R1zhfcCxmNQ7z/IggC0WNQjZw
ymeZT9cFDdAgMBAAGjUzBRMB0GA1UdDgQWBBQb5eJeYLEpErJetb1eid5BgsS3uTAfBgN
VHSMEGDAWgBQb5eJeYLEpErJetb1eid5BgsS3uTAPBgNVHRMBAf8EBTADAQH/MA0GCSqG
SIb3DQEBCwUAA4IBAQBURnrjVbHVwfV/u/xjzK8p4dTke0xb0oKt0J5YeH95sRa66m3tQ
JYf0jbMNQ8InfXK0IzGM/uUOJX3daeOMQxMbJvaUDZV64kuU6IgkEQuLwkOP5k0Rc9+Su
RMlvWOB2exiyQkd2iHJtURuEtvB39LIr4pPDsicBAYxsm5ybIWCmqNMPkVl8Qks3lAXeF
+xvH11tmciTJSYP0Ud2psbV3lduD76UT2bzDGkr690KqroNS57WbQrHxEhtMbdq0cPfzq
FlxyhckqNYrcw2v1igQDhplQ2eUc4ye0Mvimj1Me2mWjPvilhvS3vDGhrmcx9mlishlI/
RFy6yDI1gtkF7eS
---END CERTIFICATE---"
}]]></sourcecode>
    </figure>
  </section>
</section><section anchor="h.srhn8j90yvp0">
  <name>Capabilities Objects</name>
  <t>These objects are simple capability wrappers around the MI objects defined in this specification.</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.SecretValue object. For further details, see the <xref target="h.j2e9d3rz8xjw">MI.SecretStore</xref> section.</t>
    <t>The following is an example of FCI.SecretStore:</t>
    <figure>
      <sourcecode><![CDATA[{
  "capabilities": [
    {
      "capability-type": "FCI.SecretStore",
      "capability-value": {
        "secret-store-id": "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 <xref target="X.509"/> certificate 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[{
  "capabilities": [
    {
      "capability-type": "FCI.SecretCertificate",
      "capability-value": {
        "certificate-id": "store-1",
        "certificate-value": "---BEGIN CERIFICATE–--
MIIDZTCCAk2gAwIBAgIUFJokJzAxDgUGsBd8uhS
blpMwSLAwDQYJKoZIhvcNAQELBQAwQjELMAkGA1UEBhMCVVMxEDAOBgNVBAgMB0dlb3Jn
aWExITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0yMzAxMjMyMDM2M
DNaFw0yMzAyMjIyMDM2MDNaMEIxCzAJBgNVBAYTAlVTMRAwDgYDVQQIDAdHZW9yZ2lhMS
EwHwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwggEiMA0GCSqGSIb3DQEBAQU
AA4IBDwAwggEKAoIBAQCT11o9yebJmjiq7mXbLtnr5THpTnyahNpKECI+N8YZSl5+cS9h
Ga06zKQV3MNxbjJ15smmeWbgynYGwqhs5ZXGUjzd8S1/M1A08z1VFhEJiODQ00f3BOocp
In25RQzFz/BOLREW7sLkrhuz/WVBR3bzp6T1gu3nKcRSNuNxO1p9490gS1LhsZYQKfNvn
cuxBCP0GTNbUOXd6xkQ+EX5cEKoODUYWzOMdMAMlEEFb4jUjxYbbJoygwTMHpG2yGAQ2I
XpB2/wrrawivxDHlMHGpML+Ie8o6YBR4PDiOJmlCg9uIsirf65R1zhfcCxmNQ7z/IggC0
WNQjZwymeZT9cFDdAgMBAAGjUzBRMB0GA1UdDgQWBBQb5eJeYLEpErJetb1eid5BgsS3u
TAfBgNVHSMEGDAWgBQb5eJeYLEpErJetb1eid5BgsS3uTAPBgNVHRMBAf8EBTADAQH/MA
0GCSqGSIb3DQEBCwUAA4IBAQBURnrjVbHVwfV/u/xjzK8p4dTke0xb0oKt0J5YeH95sRa
66m3tQJYf0jbMNQ8InfXK0IzGM/uUOJX3daeOMQxMbJvaUDZV64kuU6IgkEQuLwkOP5k0
Rc9+SuRMlvWOB2exiyQkd2iHJtURuEtvB39LIr4pPDsicBAYxsm5ybIWCmqNMPkVl8Qks
3lAXeF+xvH11tmciTJSYP0Ud2psbV3lduD76UT2bzDGkr690KqroNS57WbQrHxEhtMbdq
0cPfzqFlxyhckqNYrcw2v1igQDhplQ2eUc4ye0Mvimj1Me2mWjPvilhvS3vDGhrmcx9ml
ishlI/RFy6yDI1gtkF7eS
---END CERTIFICATE---"
      }
    }
  ]
}]]></sourcecode>
    </figure>
    <t> </t>
  </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 uCDN and dCDN participants in an Open Caching system. The embedded model provides for a secret exchange without reference to out-of-band services, while the Vault support allows for external reference to secrets stored in a HashiCorp Vault.</t>
  <t>Participants utilizing a secret distribution method or service not supported here MAY define a Private Feature MI object <xref target="SVTA2038"/> with the necessary configuration for that method or service and then utilize that MI object within MI.SecretStore and FCI.SecretStore</t>
  <t>Provided below are workflow examples for uCDN -&gt; dCDN and dCDN -&gt; uCDN exchanges of secret values.</t>
  <t>Consideration is needed when addressing key rollover, expiration, and revocation in the embedded model. The RECOMMENDED workflow for key rollover is as follows:</t>
  <ul>
    <li>
      <t>When the recipient of a secret provides an updated configuration that no longer contains an MI.SecretCertificate with an ID referenced in an MI.SecretStore used by MI.SecretValue objects, those MI.SecretValue objects SHOULD be reduced to an object with no contained secret-value or secret-path property as they would be in the initial state before any certificate had been provided.</t>
    </li>
    <li>
      <t>If the recipient of a secret  then provides a new MI.SecretCertificate object, the sender of the secret SHOULD update its MI.SecretStore to reference the new certificate-id and then update any referencing MI.SecretValue objects to include an updated secret-value property that contains the newly encrypted values.</t>
    </li>
  </ul>
  <section anchor="h.1ph3ib221d39">
    <name>Workflow: dCDN -&gt; uCDN Embedded</name>
    <ol>
      <li>
        <t>The dCDN advertises FCI.SecretStore with a store-type of MI.SecretStoreTypeEmbedded; other FCI objects may contain MI.SecretValue objects that reference the 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 certificate-id property that references the dCDN MI.SecretCertificate; any MI.SecretValue objects in other FCI objects now contain a secret-value property with the CMS encrypted secret.</t>
      </li>
    </ol>
    <figure title="Figure 2: dCDN -&gt; uCDN Workflow, Embedded Store Type">
   <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.SecretValue with encrypted secrets            |
   |--------------------------------------------------------------->|
   |                                                                |
┌────┐                                                           ┌────┐
│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 store-type of MI.SecretStoreTypeEmbedded and a certificate-id referencing the FCI.SecretCertificate advertised by the uCDN. Other MI objects may contain MI.SecretValue objects with a secret-value property containing the CMS encrypted secret.</t>
      </li>
    </ol>
    <figure title="Figure 3: Figure 3: uCDN -&gt; dCDN Workflow, Embedded Store">
   <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.SecretStoreTypeEmbedded has a defined format of "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 title="Figure 4: Embedded Cleartext Workflow">
   <artset>
      <!--<artwork type="svg" src="figure_4.svg" />-->
      <artwork type="ascii-art"><![CDATA[
┌────┐                                                           ┌────┐
│uCDN│                                                           │dCDN│
└────┘                                                           └────┘
   |  Retrieve FCI.SecretStore ("cleartext") and FCI.SecretValue    |
   |--------------------------------------------------------------->|
   |                                                                |
   |  Provide MI.SecretStore ("cleartext") and MI.SecretValue       |
   |--------------------------------------------------------------->|
   |                                                                |
┌────┐                                                           ┌────┐
│uCDN│                                                           │dCDN│
└────┘                                                           └────┘
  ]]>
      </artwork>
   </artset>
</figure>

  </section>
  <section anchor="h.fqkg6gaqyy99">
    <name>Workflow: dCDN -&gt; uCDN Vault</name>
    <t>The dCDN advertises an FCI.SecretStore with an appropriate configuration for accessing an instance of a HashiCorp Vault 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 title="Figure 5: dCDN -&gt; uCDN Workflow, HashiCorp Vault  Store">
   <artset>
      <!--<artwork type="svg" src="figure_5.svg" />-->
      <artwork type="ascii-art"><![CDATA[
┌────┐                                               ┌─────┐     ┌────┐
│uCDN│                                               │Vault│     │dCDN│
└────┘                                               └─────┘     └────┘
   |     Retrieve FCI.SecretStoreTypeHashiCorpVault     |           |
   |     and FCI.SecretValue objects                    |           |
   |--------------------------------------------------->|           |
   |                                                    |           |
   |     Retrieve secrets using path provided           |           |
   |     in FCI.SecretValue objects                     |           |
   |----------------------------------------------------|---------->|
   |                                                    |           |
┌────┐                                               ┌─────┐     ┌────┐
│uCDN│                                               │Vault│     │dCDN│
└────┘                                               └─────┘     └────┘
  ]]>
      </artwork>
   </artset>
</figure>

  </section>
  <section anchor="h.g4fzyjfyx8fx">
    <name>Workflow: uCDN -&gt; dCDN Vault</name>
    <t>The uCDN provides the MI configuration, including an MI.SecretStore with appropriate configuration for accessing an instance of a HashiCorp Vault 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 title="Figure 6: uCDN -&gt; dCDN Workflow, HashiCorp Vault Store">
   <artset>
      <!--<artwork type="svg" src="figure_6.svg" />-->
      <artwork type="ascii-art"><![CDATA[
┌────┐                            ┌────┐                        ┌─────┐
│uCDN│                            │dCDN│                        │Vault│
└────┘                            └────┘                        └─────┘
   |                                 |                              |
   | Provide MI.SecretStoreTypeVault |                              |
   | and MI.SecretValue objects      |                              |
   |-------------------------------->|                              |
   |                                 |                              |
   |                                 | Retrieve secrets using path  |
   |                                 | provided in MI.SecretValue   |
   |                                 | objects                      |
   |                                 |----------------------------->|
   |                                 |                              |
┌────┐                            ┌────┐                        ┌─────┐
│uCDN│                            │dCDN│                        │Vault│
└────┘                            └────┘                        └─────┘
  ]]>
      </artwork>
   </artset>
</figure>

  </section>
</section><section anchor="Security" title="Security Considerations">
            <t>
            The FCI and MI objects defined in this document are transferred via the interfaces defined in CDNI <xref target="RFC8006"/> which describes how to secure these interfaces by protecting integrity and confidentiality while ensuring the authenticity of the dCDN and uCDN.
            </t>
        </section><section anchor="IANA" title="IANA Considerations">
            <section anchor="IANA.cdni.payload.types" title="CDNI Payload Types">
                <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.SecretStoreTypeVault</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>
            </section>
</section><section anchor="Acknowledgements" title="Acknowledgements">
            <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 the content of this draft:</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 title="Normative References">
         <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.7468.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.5652.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"/>

         <reference anchor="X.509" target="http://www.itu.int/rec/T-REC-X.509">
            <front>
               <title>X.509</title>
               <author><organization>ITU</organization></author>
               <date year="2011" month="February" />
               <keyword>Certificates ITU PKI X509</keyword>
            </front>
         </reference>

          <reference anchor="HCVAULT" target="https://developer.hashicorp.com/vault/docs">
            <front>
               <title>Vault Documentation</title>
               <author><organization>HashiCorp</organization></author>
            </front>
         </reference>
     
      </references>
      <references title="Informative References">
        <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>
          <reference anchor="SVTA2038" target="https://svta.org/documents/SVTA2038">
            <front>
               <title>Private Features Metadata</title>
               <author><organization>SVTA</organization></author>
               <date />
            </front>
         </reference>
      </references>
   </back>
</rfc>
