|
| 1 | +# The manifest |
| 2 | + |
| 3 | +The manifest is the configuration file for the Coordinator, defining your confidential deployment. |
| 4 | +It's automatically generated from your deployment by the Contrast CLI and uses JSON format (`manifest.json`). |
| 5 | + |
| 6 | +## `Policies` |
| 7 | + |
| 8 | +The identities of your Pods, represented by the hashes of their respective initdata documents. |
| 9 | + |
| 10 | +### `Policies.*.SANs` {#policies-sans} |
| 11 | + |
| 12 | +The Coordinator will add the Subject Alternative Names (SANs) to the workload certificate for the workload with the respective policy hash after verification. |
| 13 | +Allowed values are: |
| 14 | + |
| 15 | +- IP addresses |
| 16 | +- URIs |
| 17 | +- DNS names |
| 18 | + |
| 19 | +By default, the Contrast CLI will add two SANs for each workload on generate: The pod name as DNS name under which the pod can be reached inside the cluster, and a wildcard DNS name `*` to allow the certificate to be used with any other hostname (for example an external load balancer). |
| 20 | +As DNS is untrusted in the context of Contrast, issuing a wildcard certificate won't weaken the security of your workload. |
| 21 | + |
| 22 | +To enable IP-based certificate verification, insert the desired IP address into the list of SANs. |
| 23 | +The change could look like this: |
| 24 | + |
| 25 | +```diff |
| 26 | + "Policies": { |
| 27 | + ... |
| 28 | + "99dd77cbd7fe2c4e1f29511014c14054a21a376f7d58a48d50e9e036f4522f6b": { |
| 29 | + "SANs": [ |
| 30 | + "web", |
| 31 | +- "*" |
| 32 | ++ "*", |
| 33 | ++ "203.0.113.34" |
| 34 | + ], |
| 35 | + }, |
| 36 | +``` |
| 37 | + |
| 38 | +Some authentication and authorization schemes rely on URI SANs in X.509 certificates. |
| 39 | +For example, [SPIFFE IDs] are URIs and are often found as certificate SANs. |
| 40 | +The change to add such an URI SAN to the manifest could look like this: |
| 41 | + |
| 42 | +```diff |
| 43 | + "Policies": { |
| 44 | + ... |
| 45 | + "99dd77cbd7fe2c4e1f29511014c14054a21a376f7d58a48d50e9e036f4522f6b": { |
| 46 | + "SANs": [ |
| 47 | + "web", |
| 48 | +- "*" |
| 49 | ++ "*", |
| 50 | ++ "spiffe://acme.com/billing/payments" |
| 51 | + ], |
| 52 | + }, |
| 53 | +``` |
| 54 | + |
| 55 | +[SPIFFE IDs]: https://spiffe.io/docs/latest/spiffe-about/spiffe-concepts/#spiffe-id |
| 56 | + |
| 57 | +### `Policies.*.WorkloadSecretID` {#policies-workload-secret-id} |
| 58 | + |
| 59 | +The `WorkloadSecretID` is used in addition to the secret seed to derive the workload secret. |
| 60 | +It's a non-interpreted string and defaults to the qualified Kubernetes resource name of the pod. |
| 61 | +As long as the `WorkloadSecretID` remains unchanged, the derived workload secret will remain stable across manifest updates and Coordinator recovery. |
| 62 | + |
| 63 | +See [Workload secrets](../secrets.md#workload-secrets) for more information. |
| 64 | + |
| 65 | +### `Policies.*.Role` |
| 66 | + |
| 67 | +Contrast role assigned to the workload. |
| 68 | +The only supported value is `coordinator`, which identifies the Coordinator within the manifest. |
| 69 | +Workloads don't set this field. |
| 70 | + |
| 71 | +## `ReferenceValues` |
| 72 | + |
| 73 | +The remote attestation reference values for the confidential micro-VM that's the runtime environment of your Pods. |
| 74 | +The reference values cover both the platform configuration as well as the guest TCB. |
| 75 | +They're independent from the workload executed inside the Contrast pod VM and only differ between platforms or Contrast versions. |
| 76 | + |
| 77 | +The reference values are grouped by confidential computing technology, there is a `snp` and a `tdx` section. |
| 78 | +Each of those sections contains a list of reference value sets. |
| 79 | +The Coordinator will accept a workload if its attestation report matches _any_ of the listed reverence value sets exactly. |
| 80 | + |
| 81 | +### `ReferenceValues.snp.*.ProductName` {#snp-product-name} |
| 82 | + |
| 83 | +The product name of your platform. |
| 84 | +`Milan` and `Genoa` are supported by Contrast. |
| 85 | + |
| 86 | +### `ReferenceValues.snp.*.TrustedMeasurement` {#snp-trusted-measurement} |
| 87 | + |
| 88 | +The `TrustedMeasurement` is a hash over the initial memory contents and state of the confidential VM. |
| 89 | +It covers the guest firmware, the initrd and kernel as well as the kernel command line. |
| 90 | +The kernel command line contains the dm-verity hash of the root filesystem, which contains all Contrast components that run inside the guest. |
| 91 | + |
| 92 | +It's the (launch) `MEASUREMENT` from the SNP `ATTESTATION_REPORT`, according to Table 23 in the [SEV ABI Spec]. |
| 93 | + |
| 94 | +### `ReferenceValues.snp.*.MinimumTCB` {#snp-minimum-tcb} |
| 95 | + |
| 96 | +The `MinimumTCB` defines the minimum secure version numbers (SVNs) for the platform components. |
| 97 | +The Contrast Coordinator compares these value against both the `COMMITTED_TCB` and `LAUNCH_TCB`, |
| 98 | +where the `LAUNCH_TCB` is the TCB that was committed when the VM was first launched, |
| 99 | +and the `COMMITTED_TCB` is the TCB that's currently committed on the platform. |
| 100 | +Provisional firmware isn't considered, as it can be rolled back by a malicious platform operator at any time. |
| 101 | + |
| 102 | +AMD doesn't provide an accessible way to acquire the latest TCB values for your platform. |
| 103 | +Visit the [AMD SEV developer portal](https://www.amd.com/en/developer/sev.html) and download the latest firmware package for your processor family. |
| 104 | +Unpack and inspect the contained release notes, which state the SNP firmware SVN (called `SPL` (security patch level) in that document). |
| 105 | +Contact your hardware vendor or BIOS firmware provider for information about the other TCB components |
| 106 | + |
| 107 | +To check the current TCB level of your platform, use [`snphost`]: |
| 108 | + |
| 109 | +```sh |
| 110 | +snphost show tcb |
| 111 | +``` |
| 112 | +```console |
| 113 | +Reported TCB: TCB Version: |
| 114 | + Microcode: 72 |
| 115 | + SNP: 23 |
| 116 | + TEE: 0 |
| 117 | + Boot Loader: 9 |
| 118 | + FMC: None |
| 119 | +Platform TCB: TCB Version: |
| 120 | + Microcode: 72 |
| 121 | + SNP: 23 |
| 122 | + TEE: 0 |
| 123 | + Boot Loader: 9 |
| 124 | + FMC: None |
| 125 | +``` |
| 126 | + |
| 127 | +The values listed as `Reported TCB` to should be greater or equal to the `MinimumTCB` values in `manifest.json`. |
| 128 | +The `Platform TCB` can be higher than the `Reported TCB`, in this case, the platform has provisional firmware enrolled. |
| 129 | +Contrast relies on the committed TCB values, as provisional firmware can be rolled back anytime by the platform operator. |
| 130 | + |
| 131 | +:::warning |
| 132 | + |
| 133 | +The TCB values observed on the target platform using `snphost` might not be trustworthy. |
| 134 | +Your channel to the system or the system itself might be compromised. |
| 135 | +The deployed firmware could be outdated and vulnerable. |
| 136 | + |
| 137 | +::: |
| 138 | + |
| 139 | +#### `ReferenceValues.snp.*.MinimumTCB.BootloaderVersion` |
| 140 | + |
| 141 | +SVN of the bootloader of the secure processor. |
| 142 | +See [SEV ABI Spec], Section 2.2. |
| 143 | + |
| 144 | +#### `ReferenceValues.snp.*.MinimumTCB.TEEVersion` |
| 145 | + |
| 146 | +SVN of the OS of the secure processor. |
| 147 | +See [SEV ABI Spec], Section 2.2. |
| 148 | + |
| 149 | +#### `ReferenceValues.snp.*.MinimumTCB.SNPVersion` |
| 150 | + |
| 151 | +SVN of the SNP firmware. |
| 152 | +See [SEV ABI Spec], Section 2.2. |
| 153 | + |
| 154 | +#### `ReferenceValues.snp.*.MinimumTCB.MicrocodeVersion` |
| 155 | + |
| 156 | +SVN of the CPU microcode. |
| 157 | +See [SEV ABI Spec], Section 2.2. |
| 158 | + |
| 159 | +#### `ReferenceValues.snp.*.MinimumTCB.FMCVersion` |
| 160 | + |
| 161 | +Always `None` for Milan and Genoa platforms. |
| 162 | + |
| 163 | +### `ReferenceValues.snp.*.GuestPolicy` {#snp-guest-policy} |
| 164 | + |
| 165 | +This is the guest policy according to Section 4.3 of the [SEV ABI Spec]. |
| 166 | +It's enforced during the launch of the confidential VM. |
| 167 | + |
| 168 | +The guest policy is currently static in Contrast, values can't be changed. |
| 169 | + |
| 170 | +#### `ReferenceValues.snp.*.GuestPolicy.ABIMinor` |
| 171 | +#### `ReferenceValues.snp.*.GuestPolicy.ABIMajor` |
| 172 | +#### `ReferenceValues.snp.*.GuestPolicy.SMT` |
| 173 | +#### `ReferenceValues.snp.*.GuestPolicy.MigrateMA` |
| 174 | +#### `ReferenceValues.snp.*.GuestPolicy.Debug` |
| 175 | +#### `ReferenceValues.snp.*.GuestPolicy.SingleSocket` |
| 176 | +#### `ReferenceValues.snp.*.GuestPolicy.CXLAllowed` |
| 177 | +#### `ReferenceValues.snp.*.GuestPolicy.MemAES256XTS` |
| 178 | +#### `ReferenceValues.snp.*.GuestPolicy.RAPLDis` |
| 179 | +#### `ReferenceValues.snp.*.GuestPolicy.CipherTextHidingDRAM` |
| 180 | +#### `ReferenceValues.snp.*.GuestPolicy.PageSwapDisable` |
| 181 | + |
| 182 | +### `ReferenceValues.snp.*.PlatformInfo` {#snp-platform-info} |
| 183 | + |
| 184 | +The `PLATFORM_INFO` structure according to Table 24 in the [SEV ABI Spec]. |
| 185 | + |
| 186 | +This has some overlap with the `GuestPolicy`, but is checked as part of the attestation report. |
| 187 | + |
| 188 | +#### `ReferenceValues.snp.*.PlatformInfo.SMTEnabled` |
| 189 | +#### `ReferenceValues.snp.*.PlatformInfo.TSMEEnabled` |
| 190 | +#### `ReferenceValues.snp.*.PlatformInfo.ECCEnabled` |
| 191 | +#### `ReferenceValues.snp.*.PlatformInfo.RAPLDisabled` |
| 192 | +#### `ReferenceValues.snp.*.PlatformInfo.CiphertextHidingDRAMEnabled` |
| 193 | +#### `ReferenceValues.snp.*.PlatformInfo.AliasCheckComplete` |
| 194 | +#### `ReferenceValues.snp.*.PlatformInfo.TIOEnabled` |
| 195 | + |
| 196 | +### `ReferenceValues.tdx.*.MrTd` {#tdx-mr-td} |
| 197 | + |
| 198 | +### `ReferenceValues.tdx.*.MrSeam` {#tdx-mr-seam} |
| 199 | + |
| 200 | +`MrSeam` is the SHA384 hash of the TDX module. |
| 201 | +You should retrieve the TDX module via a trustworthy channel from Intel, for example by downloading the TDX module from [Intel's GitHub repository] and hashing the module on a trusted machine. |
| 202 | +You can also reproduce the release artifact by following the build instructions linked in the release notes. |
| 203 | + |
| 204 | +You can check the hash of the in-use TDX module by executing |
| 205 | + |
| 206 | +```sh |
| 207 | +sha384sum /boot/efi/EFI/TDX/TDX-SEAM.so | cut -d' ' -f1 |
| 208 | +``` |
| 209 | + |
| 210 | +:::warning |
| 211 | + |
| 212 | +The TDX module hash (`MrSeam`) observed on the target platform might not be trustworthy. |
| 213 | +Your channel to the system or the system itself might be compromised. |
| 214 | +Make sure to retrieve or reproduce the value on a trusted machine. |
| 215 | + |
| 216 | +::: |
| 217 | + |
| 218 | +[Intel's GitHub repository]: https://github.com/intel/confidential-computing.tdx.tdx-module/releases |
| 219 | + |
| 220 | +### `ReferenceValues.tdx.*.Rtmrs[4]` {#tdx-rtmrs} |
| 221 | + |
| 222 | +### `ReferenceValues.tdx.*.TdAttributes` {#tdx-td-attributes} |
| 223 | + |
| 224 | +### `ReferenceValues.tdx.*.Xfam` {#tdx-xfam} |
| 225 | + |
| 226 | + |
| 227 | +## `WorkloadOwnerKeyDigests` {#workload-owner-key-digests} |
| 228 | + |
| 229 | +A list of workload owner public key digests. |
| 230 | +Used for authenticating subsequent manifest updates. |
| 231 | + |
| 232 | +By default, the list contains the digest of the key that was passed to the Contrast CLI on `contrast generate` via the `--add-workload-owner-key` flag. |
| 233 | +If the flag wasn't used, the workload owner key was generated and stored in the workspace as `workload-owner.pem`. |
| 234 | + |
| 235 | +The Coordinator uses this list to authenticate manifest updates submitted via `contrast set`. |
| 236 | +If multiple workload owner keys are specified, any of the corresponding private keys can be used to set a new manifest. |
| 237 | + |
| 238 | +If the manifest is generated with the `--disable-updates` flag, the `WorkloadOwnerKeyDigests` list is empty. |
| 239 | +In this case, updates to the manifest are disabled and the [deployment is immutable](../../howto/immutable-deployments.md). |
| 240 | + |
| 241 | +## `SeedshareOwnerKeys` {#seedshare-owner-keys} |
| 242 | + |
| 243 | +Public keys of seed share owners. |
| 244 | +Used to authenticate user recovery and permission to handle the secret seed. |
| 245 | + |
| 246 | +Setting a manifest where the `WorkloadOwnerKeyDigests` has been removed will render the deployment [immutable](../../howto/immutable-deployments.md). |
| 247 | +Doing the same for the `SeedshareOwnerKeys` field makes Coordinator recovery and workload secret recovery impossible. |
| 248 | + |
| 249 | +[`snphost`]: https://github.com/virtee/snphost |
| 250 | +[SEV ABI Spec]: https://www.amd.com/content/dam/amd/en/documents/developer/56860.pdf |
0 commit comments