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.8.0
version: 0.9.0
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# trustee

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

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

Expand Down Expand Up @@ -31,12 +31,17 @@ In order to use this chart, you will need to:
| global.coco.securityPolicy | string | `"secret/data/hub/securityPolicyConfig"` | |
| global.coco.securityPolicyFlavour | string | `"insecure"` | |
| global.secretStore.backend | string | `""` | |
| kbs.admin.format | string | `"v1.0"` | |
| kbs.azure.abiMajor | string | `"0"` | |
| kbs.azure.abiMinor | string | `"31"` | |
| kbs.azure.singleSocket | string | `"false"` | |
| kbs.azure.smtAllowed | string | `"true"` | |
| kbs.azure.smtEnabled | string | `"true"` | |
| kbs.azure.snpLaunchMeasurement | string | `"qnydpVwThuWxZTsSWXi+2ns/laha6w+d2723g84FaijJ0CHaI5w0pYw6ZXZUJw7v"` | |
| kbs.azure.tsmeEnabled | string | `"true"` | |
| kbs.baremetal.enabled | bool | `false` | |
| kbs.cosignKeys | string | `"secret/data/hub/coSignKeys"` | |
| kbs.extraSecrets[0] | string | `"credential"` | |
| kbs.gpu.enabled | bool | `false` | |
| kbs.publicKey | string | `"secret/data/hub/kbsPublicKey"` | |
| kbs.resourcePolicy.enforceHardware | bool | `true` | |
| kbs.secretResources[0].key | string | `"secret/data/hub/kbsres1"` | |
| kbs.secretResources[0].name | string | `"kbsres1"` | |
Expand Down
117 changes: 53 additions & 64 deletions templates/attestation-policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
namespace: trustee-operator-system
annotations:
argocd.argoproj.io/sync-wave: "4"
kbs.confidentialcontainers.org/migrated-from-v1.1.0: v1.2.0
data:
default_cpu.rego: |
package policy
Expand Down Expand Up @@ -105,98 +106,74 @@ data:

##### Azure vTPM SNP
executables := 3 if {
input["az_snp_vtpm"]

input["az_snp_vtpm"].measurement in query_reference_value("measurement")
input["az_snp_vtpm"].tpm.pcr03 in query_reference_value("snp_pcr03")
input["az_snp_vtpm"].tpm.pcr08 in query_reference_value("snp_pcr08")
input["az_snp_vtpm"].tpm.pcr09 in query_reference_value("snp_pcr09")
input["az_snp_vtpm"].tpm.pcr11 in query_reference_value("snp_pcr11")
input["az_snp_vtpm"].tpm.pcr12 in query_reference_value("snp_pcr12")
input["az-snp-vtpm"]

# measurement check commented out per upstream default (launch measurement is Azure platform constant)
# input["az-snp-vtpm"].measurement in query_reference_value("measurement")
input["az-snp-vtpm"].tpm.pcr03 in query_reference_value("snp_pcr03")
input["az-snp-vtpm"].tpm.pcr08 in query_reference_value("snp_pcr08")
input["az-snp-vtpm"].tpm.pcr09 in query_reference_value("snp_pcr09")
input["az-snp-vtpm"].tpm.pcr11 in query_reference_value("snp_pcr11")
input["az-snp-vtpm"].tpm.pcr12 in query_reference_value("snp_pcr12")
}

hardware := 2 if {
input["az_snp_vtpm"]
input["az-snp-vtpm"]

# Check the reported TCB to validate the ASP FW
count(query_reference_value("tcb_bootloader")) > 0
input["az_snp_vtpm"].reported_tcb_bootloader in query_reference_value("tcb_bootloader")
input["az_snp_vtpm"].reported_tcb_microcode in query_reference_value("tcb_microcode")
input["az_snp_vtpm"].reported_tcb_snp in query_reference_value("tcb_snp")
input["az_snp_vtpm"].reported_tcb_tee in query_reference_value("tcb_tee")
}

# Fallback: TCB reference values not collected for Azure yet
else := 3 if {
input["az_snp_vtpm"]
# TCB checks commented out per upstream default — Azure manages TCB validation
# input["az-snp-vtpm"].reported_tcb_bootloader in query_reference_value("tcb_bootloader")
# input["az-snp-vtpm"].reported_tcb_microcode in query_reference_value("tcb_microcode")
# input["az-snp-vtpm"].reported_tcb_snp in query_reference_value("tcb_snp")
# input["az-snp-vtpm"].reported_tcb_tee in query_reference_value("tcb_tee")
}

# For the 'configuration' trust claim 2 stands for
# "The configuration is a known and approved config."
#
# For this, we compare all the configuration fields.
configuration := 2 if {
input["az_snp_vtpm"]

count(query_reference_value("smt_enabled")) > 0
input["az_snp_vtpm"].platform_smt_enabled in query_reference_value("smt_enabled")
input["az_snp_vtpm"].platform_tsme_enabled in query_reference_value("tsme_enabled")
input["az_snp_vtpm"].policy_abi_major in query_reference_value("abi_major")
input["az_snp_vtpm"].policy_abi_minor in query_reference_value("abi_minor")
input["az_snp_vtpm"].policy_single_socket in query_reference_value("single_socket")
input["az_snp_vtpm"].policy_smt_allowed in query_reference_value("smt_allowed")
}

# Fallback: configuration reference values not available
else := 3 if {
input["az_snp_vtpm"]
input["az-snp-vtpm"]

# Config checks commented out per upstream default — Azure platform constants
# input["az-snp-vtpm"].platform_smt_enabled in query_reference_value("smt_enabled")
# input["az-snp-vtpm"].platform_tsme_enabled in query_reference_value("tsme_enabled")
# input["az-snp-vtpm"].policy_abi_major in query_reference_value("abi_major")
# input["az-snp-vtpm"].policy_abi_minor in query_reference_value("abi_minor")
# input["az-snp-vtpm"].policy_single_socket in query_reference_value("single_socket")
# input["az-snp-vtpm"].policy_smt_allowed in query_reference_value("smt_allowed")
}

##### Azure vTPM TDX
executables := 3 if {
input["az_tdx_vtpm"]
input["az-tdx-vtpm"]

input["az_tdx_vtpm"].tpm.pcr03 in query_reference_value("tdx_pcr03")
input["az_tdx_vtpm"].tpm.pcr08 in query_reference_value("tdx_pcr08")
input["az_tdx_vtpm"].tpm.pcr09 in query_reference_value("tdx_pcr09")
input["az_tdx_vtpm"].tpm.pcr11 in query_reference_value("tdx_pcr11")
input["az_tdx_vtpm"].tpm.pcr12 in query_reference_value("tdx_pcr12")
input["az-tdx-vtpm"].tpm.pcr03 in query_reference_value("tdx_pcr03")
input["az-tdx-vtpm"].tpm.pcr08 in query_reference_value("tdx_pcr08")
input["az-tdx-vtpm"].tpm.pcr09 in query_reference_value("tdx_pcr09")
input["az-tdx-vtpm"].tpm.pcr11 in query_reference_value("tdx_pcr11")
input["az-tdx-vtpm"].tpm.pcr12 in query_reference_value("tdx_pcr12")
}

hardware := 2 if {
input["az_tdx_vtpm"]
input["az-tdx-vtpm"]

# Check the quote is a TDX quote signed by Intel SGX Quoting Enclave
input["az_tdx_vtpm"].quote.header.tee_type == "81000000"
input["az_tdx_vtpm"].quote.header.vendor_id == "939a7233f79c4ca9940a0db3957f0607"
input["az-tdx-vtpm"].quote.header.tee_type == "81000000"
input["az-tdx-vtpm"].quote.header.vendor_id == "939a7233f79c4ca9940a0db3957f0607"

# Check OVMF code hash
count(query_reference_value("mr_td")) > 0
input["az_tdx_vtpm"].quote.body.mr_td in query_reference_value("mr_td")
# mr_td and OVMF checks commented out per upstream default
# input["az-tdx-vtpm"].quote.body.mr_td in query_reference_value("mr_td")

# Check TCB status (covers quote.body.tcb_svn claim check)
input["az_tdx_vtpm"].tcb_status == "UpToDate"
}

# Fallback: mr_td reference values not collected for Azure yet
else := 3 if {
input["az_tdx_vtpm"]

input["az_tdx_vtpm"].quote.header.tee_type == "81000000"
input["az_tdx_vtpm"].quote.header.vendor_id == "939a7233f79c4ca9940a0db3957f0607"
input["az_tdx_vtpm"].tcb_status == "UpToDate"
input["az-tdx-vtpm"].tcb_status == "UpToDate"
}

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

count(query_reference_value("xfam")) > 0
input["az_tdx_vtpm"].quote.body.xfam in query_reference_value("xfam")
# xfam check commented out per upstream default
# input["az-tdx-vtpm"].quote.body.xfam in query_reference_value("xfam")
}

# Fallback: xfam reference values not available
else := 3 if {
input["az_tdx_vtpm"]
input["az-tdx-vtpm"]
}

##### Bare Metal TDX
Expand Down Expand Up @@ -240,6 +217,18 @@ data:
input["tdx"].collateral_expiration_status == "0"
}

# Fallback: TCB OutOfDate — hardware is real TDX but has known advisories
else := 3 if {
input["tdx"]

input["tdx"].quote.header.tee_type == "81000000"
input["tdx"].quote.header.vendor_id == "939a7233f79c4ca9940a0db3957f0607"

input["tdx"].quote.body.mr_td in query_reference_value("mr_td")

input["tdx"].collateral_expiration_status == "0"
}

configuration := 2 if {
input["tdx"]

Expand Down
14 changes: 14 additions & 0 deletions templates/kbs-auth-dummy-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Dummy secret required by Trustee 1.2 operator.
# The operator controller unconditionally creates a volume from
# kbsAuthSecretName. Admin auth is disabled (authorization_mode = "DenyAll"),
# so the content is irrelevant -- only existence matters.
apiVersion: v1
kind: Secret
metadata:
name: kbs-auth-public-key
namespace: trustee-operator-system
annotations:
argocd.argoproj.io/sync-wave: "1"
type: Opaque
data:
publicKey: ""
47 changes: 21 additions & 26 deletions templates/kbs-config-map.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
namespace: trustee-operator-system
annotations:
argocd.argoproj.io/sync-wave: "4"
kbs.confidentialcontainers.org/migrated-from-v1.1.0: v1.2.0
data:
kbs-config.toml: |
[http_server]
Expand All @@ -15,33 +16,19 @@ data:
insecure_http = false
private_key = "/etc/https-key/tls.key"
certificate = "/etc/https-cert/tls.crt"
[admin]
{{- if eq (default "v1.0" .Values.kbs.admin.format) "v1.1" }}
type = "Simple"
insecure_api = false

[[admin.personas]]
id = "admin"
public_key_path = "/etc/auth-secret/publicKey"
{{- else }}
type = "DenyAll"
insecure_api = false
auth_public_key = "/etc/auth-secret/publicKey"
{{- end }}
[admin]
authorization_mode = "DenyAll"

[attestation_token]
insecure_key = false
insecure_header_jwk = false
attestation_token_type = "CoCo"
trusted_certs_paths = ["/etc/attestation-cert/tls.crt"] # Check for location in cert (based on key generated)
trusted_certs_paths = ["/etc/attestation-cert/tls.crt"]

[attestation_service]
type = "coco_as_builtin"
work_dir = "/opt/confidential-containers/attestation-service"
policy_engine = "opa"

[attestation_service.attestation_token_broker]
type = "Ear"
policy_dir = "/opt/confidential-containers/attestation-service/policies"

[attestation_service.attestation_token_broker.signer]
key_path = "/etc/attestation-cert/tls.key"
Expand All @@ -52,20 +39,28 @@ data:

[attestation_service.rvps_config]
type = "BuiltIn"

[attestation_service.rvps_config.storage]
type = "LocalJson"
file_path = "/opt/confidential-containers/rvps/reference-values/reference-values.json"
storage_type = "LocalJson"
file_dir_path = "/opt/confidential-containers/storage/local_json"
{{- if .Values.kbs.gpu.enabled }}

[attestation_service.verifier_config.nvidia_verifier]
type = "Remote"
{{- end }}
{{- if .Values.kbs.tdx.enabled }}

[attestation_service.verifier_config.dcap_verifier]
collateral_service = "{{ .Values.kbs.tdx.collateralService }}"
{{- end }}

[[plugins]]
name = "resource"
type = "LocalFs"
dir_path = "/opt/confidential-containers/kbs/repository"
storage_backend_type = "kvstorage"

[storage_backend]
storage_type = "LocalFs"

[storage_backend.backends.local_fs]
dir_path = "/opt/confidential-containers/storage"

[policy_engine]
policy_path = "/opt/confidential-containers/opa/policy.rego"
[storage_backend.backends.local_json]
dir_path = "/opt/confidential-containers/storage/local_json"
7 changes: 1 addition & 6 deletions templates/kbs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ spec:
{{- end }}
- "security-policy"
- "attestation-status"
- "signing-key"
kbsHttpsKeySecretName: kbs-https-key
kbsHttpsCertSecretName: kbs-https-certificate
kbsResourcePolicyConfigMapName: resource-policy
Expand All @@ -30,12 +31,6 @@ spec:
kbsAttestationKeySecretName: attestation-cert


# TDX specific configuration (optional)
{{- if .Values.kbs.tdx.enabled }}
tdxConfigSpec:
kbsTdxConfigMapName: tdx-config
{{- end }}

# IBM SE specific configuration (optional)
# ibmSEConfigSpec:
# certStorePvc: <persistent-volume-claim>
Expand Down
5 changes: 4 additions & 1 deletion templates/pull-secret-credential-policy.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{{ if eq .Values.global.coco.secured true }}
{{- if and (eq .Values.global.coco.secured true) (ne .Values.global.clusterPlatform "Azure") }}
{{- /* On Azure peer-pods, CDH does not fetch registry credentials from KBS.
Pull secrets are distributed to workload namespace SAs instead
(see sandboxed-policies-chart/pull-secret-distribution.yaml). */ -}}
---
apiVersion: policy.open-cluster-management.io/v1
kind: Policy
Expand Down
3 changes: 2 additions & 1 deletion templates/reference-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ metadata:
namespace: trustee-operator-system
annotations:
argocd.argoproj.io/sync-wave: "4"
kbs.confidentialcontainers.org/migrated-from-v1.1.0: v1.2.0
data:
reference-values.json: '[]'
reference_value: '{}'
{{ end }}
3 changes: 2 additions & 1 deletion templates/resource-policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ metadata:
namespace: trustee-operator-system
annotations:
argocd.argoproj.io/sync-wave: "4"
kbs.confidentialcontainers.org/migrated-from-v1.1.0: v1.2.0
data:
policy.rego: |
resource-policy.rego: |
package policy
import rego.v1

Expand Down
Loading