To learn more about using attestation assertions, see
[Create an attestation policy](https://docs.cloud.google.com/confidential-computing/confidential-space/docs/create-grant-access-confidential-resources#attestation-policy).

The available assertions to construct an attestation policy are detailed in the
following table. Policies can validate assertions made by the Confidential Space
image, the workload container, and the VM instance.

### Image assertions

Assertion Type Description `assertion.dbgstat`

**Interacts with:**

- **Workload operator** : The [`--image-family`](https://docs.cloud.google.com/confidential-computing/confidential-space/docs/deploy-workloads) value.
Enumeration
Verifies that the Confidential Space image is the debug or
production version.

The valid values are the following:

- `enable`: Check that the debug image is being used.
- `disabled-since-boot`: Check that the production image is being used.

##### Examples


The following code verifies that the debug version of the
Confidential Space image is being used:

    assertion.dbgstat == "enable"


The following code verifies that the production version of the
Confidential Space image is being used:

    assertion.dbgstat == "disabled-since-boot"

`assertion.submods.confidential_space.support_attributes` Array of strings
Verifies the security version of the TEE is a production
Confidential Space image. Debug Confidential Space images have no
support attribute set.


The following table describes the support attributes found on production Confidential Space images.
Support attribute Description `LATEST`

`LATEST` images also have the following support attributes:

- `STABLE`
- `USABLE`

**Image lifetime** : Approximately one month. After this, the `LATEST`
support attribute is removed.


This is the latest version of the Confidential Space image, and is supported and monitored
for vulnerabilities.


For long-running workloads, we recommend that you don't specify `LATEST` as
part of your attestation policy. This is because the Confidential Space image might be
updated while your workload is running, making the Confidential Space image you're using no
longer `LATEST`, and causing your workload to fail attestation when the
Confidential Space default token is next refreshed.
`STABLE`

`STABLE` images also have the following support attributes:

- `USABLE`

**Image lifetime** : Approximately six months. Starting April 1, 2027, the
`STABLE` support attribute is removed after the image lifetime expires.


Images with the `STABLE` attribute are supported and monitored for
vulnerabilities for a period of six months. We recommend writing attestation policy based
on the `STABLE` attribute.


In rare cases, the `STABLE` attribute can be removed during the normal
six-month support period, such as when critical vulnerabilities are discovered.
`USABLE`
Images with only the `USABLE` attribute are still available to use, but are
considered deprecated. Deprecated images aren't supported, and are over six months old.
Use them at your own risk.


`USABLE` images have a `deprecated.deprecated` property. Its value
is the timestamp of when the image is expected to be deprecated. An image's properties can
be viewed with the [`gcloud compute images describe`](https://docs.cloud.google.com/sdk/gcloud/reference/compute/images/describe) command, or with the
[`images.get`](https://docs.cloud.google.com/compute/docs/reference/rest/v1/images/get) REST
method. For example:

```bash
gcloud compute images describe confidential-space-240800 \
    --format=json \
    --project=confidential-space-images
```
`EXPERIMENTAL`
Images with only this attribute make use of preview features. `EXPERIMENTAL`
images are for testing purposes only, and should never be used in production.


An `EXPERIMENTAL` image never has the attributes `LATEST`,
`STABLE`, or `USABLE`.


We recommend keeping your Confidential Space image up to date. To learn how to update your
Confidential Space image, see [Update Confidential Space images](https://docs.cloud.google.com/confidential-computing/confidential-space/docs/confidential-space-images#update-images).

> [!IMPORTANT]
> **Important:** Confidential Space images can be revoked due to events such as critical vulnerabilities being discovered. When an image is revoked, the `swname` claim in the [attestation token](https://docs.cloud.google.com/confidential-computing/confidential-space/docs/reference/token-claims) is set to `GCE`, or your workload receives a `RIMS_VALIDATION_FAILED` message when requesting the token.

##### Example


The following code verifies that a stable version of the
Confidential Space image is being used:

    "STABLE" in assertion.submods.confidential_space.support_attributes

`assertion.swname` Enumeration
Verifies the software running on the attesting entity. The
value is always `CONFIDENTIAL_SPACE`.

##### Example

    assertion.swname == "CONFIDENTIAL_SPACE"

`assertion.swversion` Array of strings
Verifies the software version of the Confidential Space image. We
recommend using
`assertion.submods.confidential_space.support_attributes`
instead to target the latest version of an image.

##### Example

    int(assertion.swversion[0]) == 230103

### Container assertions

| Assertion | Type | Description |
|---|---|---|
| `assertion.submods.container.cmd_override` **Interacts with:** - **Workload author** : The [`allow_cmd_override`](https://docs.cloud.google.com/confidential-computing/confidential-space/docs/reference/launch-policies#allow-cmd-override) launch policy. - **Workload operator** : The [`tee-cmd`](https://docs.cloud.google.com/confidential-computing/confidential-space/docs/reference/metadata-variables#tee-cmd) metadata variable. | Array of strings | Verifies the [CMD](https://docs.docker.com/engine/reference/builder/#cmd) commands and parameters used in the workload image. ##### Examples The following code verifies the CMD of the workload image hasn't been overwritten: size(assertion.submods.container.cmd_override) == 0 The following code verifies that `program` is the only content in the CMD overrides: assertion.submods.container.cmd_override == ['program'] |
| `assertion.submods.container.env` **Interacts with:** - **Workload author** : The [`allow_env_override`](https://docs.cloud.google.com/confidential-computing/confidential-space/docs/reference/launch-policies#allow-env-override) launch policy. - **Workload operator** : The [`tee-env-ENVIRONMENT_VARIABLE_NAME`](https://docs.cloud.google.com/confidential-computing/confidential-space/docs/reference/metadata-variables#tee-env) metadata variable. | JSON object | Verifies that environment variables and their values have been explicitly passed to the container. ##### Example The following code verifies that the environment variable `example-env-1` is set to `value-1`, and `example-env-2` is set to `value-2`. assertion.submods.container.env == {"example-env-1": "value-1", "example-env-2": "value-2"} |
| `assertion.submods.container.env_override` **Interacts with:** - **Workload author** : The [`allow_env_override`](https://docs.cloud.google.com/confidential-computing/confidential-space/docs/reference/launch-policies#allow-env-override) launch policy. - **Workload operator** : The [`tee-env-ENVIRONMENT_VARIABLE_NAME`](https://docs.cloud.google.com/confidential-computing/confidential-space/docs/reference/metadata-variables#tee-env) metadata variable. | String | Verifies if the workload operator has overwritten environment variables in the container. ##### Examples The following code verifies that the workload operator has not overridden the `example` environment variable: !has(assertion.submods.container.env_override.example) The following code verifies that the workload operator hasn't overwritten any environment variables: size(assertion.submods.container.env_override) == 0 |
| `assertion.submods.container.image_digest` | String | Verifies the image digest of the workload container. Specifying this condition lets multiple parties agree on an authorized workload that is allowed to access their data. ##### Example assertion.submods.container.image_digest == "sha256:837ccb607e312b170fac7383d7ccfd61fa5072793f19a25e75fbacb56539b86b" |
| `assertion.submods.container.image_id` | String | Verifies the image ID of the workload container. ##### Example assertion.submods.container.image_id == "sha256:652a44b0e911271ba07cf2915cd700fdfa50abd62a98f87a57fdebc59843d93f" |
| `assertion.submods.container.image_reference` **Interacts with:** - **Workload operator** : The [`tee-image-reference`](https://docs.cloud.google.com/confidential-computing/confidential-space/docs/reference/metadata-variables#tee-image-reference) metadata variable. | String | Verifies the location of the workload container running on top of the Confidential Space image. ##### Example assertion.submods.container.image_reference == "us-docker.pkg.dev/PROJECT_ID/WORKLOAD_CONTAINER:latest" |
| `assertion.submods.container.image_signatures` **Interacts with:** - **Workload operator** : The [`tee-signed-image-repos`](https://docs.cloud.google.com/confidential-computing/confidential-space/docs/reference/metadata-variables#tee-signed-image-repos) metadata variable. | JSON object | Verifies that the image has a certain signature or is signed by a public key and signing algorithm. Specifying this condition lets multiple parties agree on an authorized workload that is allowed to access their data. The assertion can include the following elements: - `key_id`: The hexadecimal fingerprint of the public key. To get the fingerprint, you can run the following command: openssl pkey -pubin -in public_key.pem -outform DER | openssl sha256 Where `public_key.pem` is your public key in PEM format. - `signature`: The signature over a payload that's associated with the signed container and that follows the [Simple Signing format](https://github.com/sigstore/cosign/blob/main/specs/SIGNATURE_SPEC.md#simple-signing). - `signature_algorithm`: The algorithm used to sign the key. One of the following: - `RSASSA_PSS_SHA256` (RSASSA-PSS with a SHA-256 digest) - `RSASSA_PKCS1V15_SHA256` (RSASSA-PKCS1 v1_5 with a SHA-256 digest) - `ECDSA_P256_SHA256` (ECDSA on the P-256 Curve with a SHA-256 digest) ##### Example ['ECDSA_P256_SHA256:PUBLIC_KEY_FINGERPRINT'].exists(fingerprint, fingerprint in assertion.submods.container.image_signatures.map(sig, sig.signature_algorithm+':'+sig.key_id)) |
| `assertion.submods.container.restart_policy` **Interacts with:** - **Workload operator** : The [`tee-restart-policy`](https://docs.cloud.google.com/confidential-computing/confidential-space/docs/reference/metadata-variables#tee-restart-policy) metadata variable. | Enumeration | Verifies the restart policy of the container launcher for when the workload stops. The valid values are the following: - `Never` (default) - `Always` - `OnFailure` ##### Example assertion.submods.container.restart_policy == "Never" |

### VM assertions

| Assertion | Type | Description |
|---|---|---|
| `assertion.google_service_accounts` **Interacts with:** - **Workload operator** : The [`tee-impersonate-service-accounts`](https://docs.cloud.google.com/confidential-computing/confidential-space/docs/reference/metadata-variables#tee-impersonate-service-accounts) metadata variable, and the [`--service-account`](https://docs.cloud.google.com/confidential-computing/confidential-space/docs/deploy-workloads#service-account) value. | Array of strings | Verifies that a specified service account is connected to the VM running the workload, or has been listed using ` https://docs.cloud.google.com/confidential-computing/confidential-space/docs/reference/metadata-variables#tee-impersonate-service-accounts ` in the VM metadata. ##### Example workload-service-account@my-project.iam.gserviceaccount.com in assertion.google_service_accounts |
| `assertion.hwmodel` | String | Verifies the underlying Confidential Computing technology. The supported platforms are as follows: - `GCP_AMD_SEV` - `INTEL_TDX` ##### Example assertion.hwmodel == "GCP_AMD_SEV" |
| `assertion.submods.confidential_space.monitoring_enabled` **Interacts with:** - **Workload author** : The [`monitoring_memory_allow`](https://docs.cloud.google.com/confidential-computing/confidential-space/docs/reference/launch-policies#monitoring-memory-allow) launch policy. - **Workload operator** : The [`tee-monitoring-memory-enable`](https://docs.cloud.google.com/confidential-computing/confidential-space/docs/reference/metadata-variables#tee-monitoring-memory-enable) metadata variable. | Boolean | Verifies the monitoring state on the attesting entity. ##### Example assertion.submods.confidential_space.monitoring_enabled.memory == true |
| `assertion.submods.gce.instance_id` | String | Verifies the VM instance ID. ##### Example assertion.submods.gce.instance_id == "0000000000000000000" |
| `assertion.submods.gce.instance_name` | String | Verifies the name of the VM instance. ##### Example assertion.submods.gce.instance_name == "workload-vm" |
| `assertion.submods.gce.project_id` | String | Verifies that the VM is running a Google Cloud project with the specified project ID. ##### Example assertion.submods.gce.project_id == "project-id" |
| `assertion.submods.gce.project_number` | String | Verifies that the VM is running in a Google Cloud project with the specified project number. ##### Example assertion.submods.gce.project_number == "00000000000" |
| `assertion.submods.gce.zone` **Interacts with:** - **Workload operator** : The [`--zone`](https://docs.cloud.google.com/confidential-computing/confidential-space/docs/deploy-workloads#zone) value. | String | Verifies that the VM is running in the specified zone. ##### Example assertion.submods.gce.zone == "us-central1-a" |
| `assertion.submods.nvidia_gpu.cc_feature` **Interacts with:** - **Workload operator** : The [`tee-install-gpu-driver`](https://docs.cloud.google.com/confidential-computing/confidential-space/docs/reference/metadata-variables#tee-install-gpu-driver) metadata variable. | Enumeration | Verifies the Confidential Computing features supported by an NVIDIA GPU. Only single GPU passthrough (SPT) mode is supported in Confidential Space, so the value is always `SPT`. For more information about NVIDIA Confidential Computing support, see [NVIDIA Trusted Computing Solutions (PDF)](https://docs.nvidia.com/580trd1-trusted-computing-solutions-release-notes.pdf). ##### Example assertion.submods.nvidia_gpu.cc_feature == "SPT" |
| `assertion.submods.nvidia_gpu.cc_mode` **Interacts with:** - **Workload operator** : The [`tee-install-gpu-driver`](https://docs.cloud.google.com/confidential-computing/confidential-space/docs/reference/metadata-variables#tee-install-gpu-driver) metadata variable. | Enumeration | Verifies the status of NVIDIA's Confidential Computing driver. The valid values are the following: - `OFF`: none of the NVIDIA Confidential Computing features are active. - `ON`: the NVIDIA H100 hardware, firmware, and software have fully activated the confidential computing features. - `DEVTOOLS`: the GPU is in a partial confidential computing mode that matches the workflows of `ON` mode, but disables security protections. ##### Example assertion.submods.nvidia_gpu.cc_mode == "ON" |
| `assertion.submods.nvidia_gpu.gpus` **Interacts with:** - **Workload operator** : The [`tee-install-gpu-driver`](https://docs.cloud.google.com/confidential-computing/confidential-space/docs/reference/metadata-variables#tee-install-gpu-driver) metadata variable. | Array of objects | Verifies claims for each attested NVIDIA GPU. Confidential Space only supports a single GPU claim. A `gpus` object is similar to the following: ```json { "hwmodel": "GCP_NVIDIA_H100", "ueid": "490457405999046854973671575630853621547794591064", "l4_serial_number": "1216669666319372030078", "driver_version": "570.00", "vbios_version": "96.00.9F.00.01" } ``` ##### Examples The following code verifies that the first GPU hardware model is an NVIDIA H100 running on Google Cloud: assertion.submods.nvidia_gpu.gpus[0].hwmodel == "GCP_NVIDIA_H100" The following code verifies that the attestation claim has GPU-related claims: has(assertion.submods.nvidia_gpu.gpus) |