Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ keywords:
- confidential-containers
name: trustee
# DO NOT EDIT VERSION HERE, IT IS AUTO-GENERATED BY SEMANTIC-RELEASE
version: 0.3.2
version: 0.3.3
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# trustee

![Version: 0.3.2](https://img.shields.io/badge/Version-0.3.2-informational?style=flat-square)
![Version: 0.3.3](https://img.shields.io/badge/Version-0.3.3-informational?style=flat-square)

A Helm chart to provide an opinionated deployment of Trustee in a validated pattern

Expand Down Expand Up @@ -34,6 +34,7 @@ In order to use this chart, you will need to:
| kbs.admin.format | string | `"v1.0"` | |
| kbs.cosignKeys | string | `"secret/data/hub/coSignKeys"` | |
| kbs.extraSecrets | list | `[]` | |
| kbs.gpu.enabled | bool | `false` | |
| kbs.publicKey | string | `"secret/data/hub/kbsPublicKey"` | |
| kbs.secretResources[0].key | string | `"secret/data/hub/kbsres1"` | |
| kbs.secretResources[0].name | string | `"kbsres1"` | |
Expand Down
76 changes: 75 additions & 1 deletion templates/attestation-policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,78 @@ data:

configuration := 2 if {
input["az-tdx-vtpm"]
}
}

##### Baremetal TDX
executables := 3 if {
input["tdx"]
input.init_data in query_reference_value("init_data")
}
hardware := 2 if { input["tdx"] }
configuration := 2 if { input["tdx"] }

##### Baremetal SNP
executables := 3 if {
input["snp"]
input.init_data in query_reference_value("init_data")
}
hardware := 2 if { input["snp"] }
configuration := 2 if { input["snp"] }
{{- if .Values.kbs.gpu.enabled }}

##### GPU Attestation (NVIDIA H100/H200) — CPU-class evidence with GPU data
hardware := 2 if {
input["snp"]
input["gpu"]
}

executables := 3 if {
input["snp"]
input["gpu"]
input.init_data in query_reference_value("init_data")
}

configuration := 2 if {
input["snp"]
input["gpu"]
}
{{- end }}
{{- if .Values.kbs.gpu.enabled }}
default_gpu.rego: |
package policy

import rego.v1

default hardware := 97
default executables := 33
default configuration := 36

trust_claims := {
"executables": executables,
"hardware": hardware,
"configuration": configuration,
}

hardware := 2 if {
input.nvidia
input.nvidia["x-nvidia-gpu-attestation-report-cert-chain"]["x-nvidia-cert-status"] == "valid"
input.nvidia["x-nvidia-gpu-attestation-report-parsed"]
input.nvidia["x-nvidia-gpu-attestation-report-signature-verified"]
input.nvidia["x-nvidia-gpu-arch-check"]
}

configuration := 2 if {
input.nvidia.secboot
input.nvidia.dbgstat == "disabled"
}

executables := 3 if {
input.nvidia["x-nvidia-gpu-driver-rim-fetched"]
input.nvidia["x-nvidia-gpu-driver-rim-schema-validated"]
input.nvidia["x-nvidia-gpu-driver-rim-signature-verified"]
input.nvidia["x-nvidia-gpu-vbios-rim-fetched"]
input.nvidia["x-nvidia-gpu-vbios-rim-schema-validated"]
input.nvidia["x-nvidia-gpu-vbios-rim-signature-verified"]
input.nvidia.measres == "success"
}
{{- end }}
5 changes: 5 additions & 0 deletions templates/kbs-config-map.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ data:
[attestation_service.rvps_config.storage]
type = "LocalJson"
file_path = "/opt/confidential-containers/rvps/reference-values/reference-values.json"
{{- if .Values.kbs.gpu.enabled }}

[attestation_service.verifier_config.nvidia_verifier]
type = "Remote"
{{- end }}

[[plugins]]
name = "resource"
Expand Down
10 changes: 9 additions & 1 deletion templates/resource-policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,15 @@ data:
import rego.v1

default allow := false
{{- if not .Values.kbs.gpu.enabled }}

allow if {
input["submods"]["cpu0"]["ear.status"] == "affirming"
}
}
{{- else }}

allow if {
input["submods"]["cpu0"]["ear.status"] == "affirming"
input["submods"]["gpu0"]["ear.status"] == "affirming"
}
{{- end }}
21 changes: 19 additions & 2 deletions templates/rvps-values-policies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,29 @@ spec:
object-templates-raw: |
{{`{{- $pcr8Hash := fromConfigMap "imperative" "initdata" "PCR8_HASH" -}}`}}
{{`{{- $debugPcr8Hash := fromConfigMap "imperative" "debug-initdata" "PCR8_HASH" -}}`}}
{{`{{- $secretData := (lookup "v1" "Secret" "trustee-operator-system" "pcr-stash").data.json | base64dec | fromJson -}}`}}
{{`{{- $rawHash := fromConfigMap "imperative" "initdata" "RAW_HASH" -}}`}}
{{`{{- $debugRawHash := fromConfigMap "imperative" "debug-initdata" "RAW_HASH" -}}`}}
{{`{{- $rawHashPadded := printf "%s00000000000000000000000000000000" $rawHash -}}`}}
{{`{{- $debugRawHashPadded := printf "%s00000000000000000000000000000000" $debugRawHash -}}`}}
{{`{{- $referenceValues := list (dict "name" "init_data" "expiration" "2027-12-12T00:00:00Z" "value" (list $pcr8Hash $debugPcr8Hash $rawHashPadded $debugRawHashPadded)) -}}`}}
{{`{{- $pcrStash := (lookup "v1" "Secret" "trustee-operator-system" "pcr-stash") -}}`}}
{{`{{- if $pcrStash -}}`}}
{{`{{- $secretData := $pcrStash.data.json | base64dec | fromJson -}}`}}
{{`{{- $pcr03 := $secretData.measurements.sha256.pcr03 -}}`}}
{{`{{- $pcr09 := $secretData.measurements.sha256.pcr09 -}}`}}
{{`{{- $pcr11 := $secretData.measurements.sha256.pcr11 -}}`}}
{{`{{- $pcr12 := $secretData.measurements.sha256.pcr12 -}}`}}
{{`{{- $referenceValues := list (dict "name" "snp_pcr03" "expiration" "2027-12-12T00:00:00Z" "value" (list $pcr03)) (dict "name" "tdx_pcr03" "expiration" "2027-12-12T00:00:00Z" "value" (list $pcr03)) (dict "name" "snp_pcr08" "expiration" "2027-12-12T00:00:00Z" "value" (list $pcr8Hash $debugPcr8Hash)) (dict "name" "tdx_pcr08" "expiration" "2027-12-12T00:00:00Z" "value" (list $pcr8Hash $debugPcr8Hash)) (dict "name" "snp_pcr09" "expiration" "2027-12-12T00:00:00Z" "value" (list $pcr09)) (dict "name" "tdx_pcr09" "expiration" "2027-12-12T00:00:00Z" "value" (list $pcr09)) (dict "name" "snp_pcr11" "expiration" "2027-12-12T00:00:00Z" "value" (list $pcr11)) (dict "name" "tdx_pcr11" "expiration" "2027-12-12T00:00:00Z" "value" (list $pcr11)) (dict "name" "snp_pcr12" "expiration" "2027-12-12T00:00:00Z" "value" (list $pcr12)) (dict "name" "tdx_pcr12" "expiration" "2027-12-12T00:00:00Z" "value" (list $pcr12)) -}}`}}
{{`{{- $referenceValues = append $referenceValues (dict "name" "snp_pcr03" "expiration" "2027-12-12T00:00:00Z" "value" (list $pcr03)) -}}`}}
{{`{{- $referenceValues = append $referenceValues (dict "name" "tdx_pcr03" "expiration" "2027-12-12T00:00:00Z" "value" (list $pcr03)) -}}`}}
{{`{{- $referenceValues = append $referenceValues (dict "name" "snp_pcr08" "expiration" "2027-12-12T00:00:00Z" "value" (list $pcr8Hash $debugPcr8Hash)) -}}`}}
{{`{{- $referenceValues = append $referenceValues (dict "name" "tdx_pcr08" "expiration" "2027-12-12T00:00:00Z" "value" (list $pcr8Hash $debugPcr8Hash)) -}}`}}
{{`{{- $referenceValues = append $referenceValues (dict "name" "snp_pcr09" "expiration" "2027-12-12T00:00:00Z" "value" (list $pcr09)) -}}`}}
{{`{{- $referenceValues = append $referenceValues (dict "name" "tdx_pcr09" "expiration" "2027-12-12T00:00:00Z" "value" (list $pcr09)) -}}`}}
{{`{{- $referenceValues = append $referenceValues (dict "name" "snp_pcr11" "expiration" "2027-12-12T00:00:00Z" "value" (list $pcr11)) -}}`}}
{{`{{- $referenceValues = append $referenceValues (dict "name" "tdx_pcr11" "expiration" "2027-12-12T00:00:00Z" "value" (list $pcr11)) -}}`}}
{{`{{- $referenceValues = append $referenceValues (dict "name" "snp_pcr12" "expiration" "2027-12-12T00:00:00Z" "value" (list $pcr12)) -}}`}}
{{`{{- $referenceValues = append $referenceValues (dict "name" "tdx_pcr12" "expiration" "2027-12-12T00:00:00Z" "value" (list $pcr12)) -}}`}}
{{`{{- end -}}`}}
- complianceType: mustonlyhave
objectDefinition:
apiVersion: v1
Expand Down
3 changes: 2 additions & 1 deletion templates/tdx-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ metadata:
data:
sgx_default_qcnl.conf: |
{
"collateral_service": "{{ .Values.kbs.tdx.collateralService }}"
"collateral_service": "{{ .Values.kbs.tdx.collateralService }}",
"use_secure_cert": false
}
{{- end }}
4 changes: 4 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ kbs:
# exist in the trustee-operator-system namespace.
extraSecrets: []

# NVIDIA GPU confidential computing configuration
gpu:
enabled: false

# Intel TDX (Trust Domain Extensions) configuration
tdx:
# Enable TDX attestation support
Expand Down