diff --git a/Chart.yaml b/Chart.yaml index e090f1f..e50fa63 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -6,5 +6,4 @@ keywords: - confidential-computing - confidential-containers name: trustee -# DO NOT EDIT VERSION HERE, IT IS AUTO-GENERATED BY SEMANTIC-RELEASE -version: 0.9.0 +version: 0.10.0 diff --git a/README.md b/README.md index aae31a7..f3ceb62 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # trustee -![Version: 0.9.0](https://img.shields.io/badge/Version-0.9.0-informational?style=flat-square) +![Version: 0.10.0](https://img.shields.io/badge/Version-0.10.0-informational?style=flat-square) A Helm chart to provide an opinionated deployment of Trustee in a validated pattern @@ -42,12 +42,17 @@ In order to use this chart, you will need to: | kbs.cosignKeys | string | `"secret/data/hub/coSignKeys"` | | | kbs.extraSecrets[0] | string | `"credential"` | | | kbs.gpu.enabled | bool | `false` | | +| kbs.registryCa.enabled | bool | `false` | | | kbs.resourcePolicy.enforceHardware | bool | `true` | | | kbs.secretResources[0].key | string | `"secret/data/hub/kbsres1"` | | | kbs.secretResources[0].name | string | `"kbsres1"` | | | kbs.secretResources[1].key | string | `"secret/data/hub/passphrase"` | | | kbs.secretResources[1].name | string | `"passphrase"` | | -| kbs.tdx.collateralService | string | `"https://api.trustedservices.intel.com/sgx/certification/v4/"` | | +| kbs.snp.enabled | bool | `false` | | +| kbs.snp.vcekSecrets | list | `[]` | | +| kbs.tdx.collateralFileName | string | `"platform_collaterals.json"` | | +| kbs.tdx.collateralMountPath | string | `"/opt/confidential-containers/attestation-service/tdx"` | | +| kbs.tdx.collateralService | string | `"file:///opt/confidential-containers/attestation-service/tdx/platform_collaterals.json"` | | | kbs.tdx.enabled | bool | `false` | | | secretStore.kind | string | `"ClusterSecretStore"` | | | secretStore.name | string | `"vault-backend"` | | diff --git a/templates/kbs-config-map.yaml b/templates/kbs-config-map.yaml index 1edc903..935a464 100644 --- a/templates/kbs-config-map.yaml +++ b/templates/kbs-config-map.yaml @@ -50,6 +50,12 @@ data: [attestation_service.verifier_config.dcap_verifier] collateral_service = "{{ .Values.kbs.tdx.collateralService }}" + tcb_update_type = "early" + {{- end }} + {{- if .Values.kbs.snp.enabled }} + + [attestation_service.verifier_config.snp_verifier] + vcek_sources = [{ type = "OfflineStore" }] {{- end }} [[plugins]] diff --git a/templates/kbs.yaml b/templates/kbs.yaml index 1718c95..4c19c8c 100644 --- a/templates/kbs.yaml +++ b/templates/kbs.yaml @@ -45,3 +45,17 @@ spec: # service type (optional, it defaults to ClusterIP) kbsServiceType: ClusterIP + + # Local certificate cache for offline attestation verifiers + {{- if or .Values.kbs.tdx.enabled (and .Values.kbs.snp.enabled .Values.kbs.snp.vcekSecrets) }} + kbsLocalCertCacheSpec: + secrets: + {{- if .Values.kbs.tdx.enabled }} + - secretName: tdx-collateral + mountPath: "{{ .Values.kbs.tdx.collateralMountPath }}" + {{- end }} + {{- range .Values.kbs.snp.vcekSecrets }} + - secretName: "{{ .secretName }}" + mountPath: "/opt/confidential-containers/attestation-service/kds-store/vcek/{{ .hwid }}" + {{- end }} + {{- end }} diff --git a/templates/registry-ca-eso.yaml b/templates/registry-ca-eso.yaml new file mode 100644 index 0000000..ed8b58f --- /dev/null +++ b/templates/registry-ca-eso.yaml @@ -0,0 +1,22 @@ +{{- if .Values.kbs.registryCa.enabled }} +--- +apiVersion: "external-secrets.io/v1" +kind: ExternalSecret +metadata: + annotations: + argocd.argoproj.io/sync-wave: "1" + name: registry-ca-eso + namespace: imperative +spec: + refreshInterval: 15s + secretStoreRef: + name: {{ .Values.secretStore.name }} + kind: {{ .Values.secretStore.kind }} + target: + name: registry-ca + template: + type: Opaque + dataFrom: + - extract: + key: 'secret/data/hub/registryCaCert' +{{- end }} diff --git a/templates/snp-vcek-eso.yaml b/templates/snp-vcek-eso.yaml new file mode 100644 index 0000000..7e0fdfc --- /dev/null +++ b/templates/snp-vcek-eso.yaml @@ -0,0 +1,25 @@ +{{- if .Values.kbs.snp.enabled }} +{{- range .Values.kbs.snp.vcekSecrets }} +--- +apiVersion: "external-secrets.io/v1" +kind: ExternalSecret +metadata: + annotations: + argocd.argoproj.io/sync-wave: "1" + name: {{ .secretName }}-eso + namespace: trustee-operator-system +spec: + refreshInterval: 15s + secretStoreRef: + name: {{ $.Values.secretStore.name }} + kind: {{ $.Values.secretStore.kind }} + target: + name: {{ .secretName }} + template: + type: Opaque + dataFrom: + - extract: + key: 'secret/data/hub/snpVcek-{{ .hwid }}' + decodingStrategy: Base64 +{{- end }} +{{- end }} diff --git a/templates/tdx-collateral-eso.yaml b/templates/tdx-collateral-eso.yaml new file mode 100644 index 0000000..3cb431f --- /dev/null +++ b/templates/tdx-collateral-eso.yaml @@ -0,0 +1,22 @@ +{{- if .Values.kbs.tdx.enabled }} +--- +apiVersion: "external-secrets.io/v1" +kind: ExternalSecret +metadata: + annotations: + argocd.argoproj.io/sync-wave: "1" + name: tdx-collateral-eso + namespace: trustee-operator-system +spec: + refreshInterval: 15s + secretStoreRef: + name: {{ .Values.secretStore.name }} + kind: {{ .Values.secretStore.kind }} + target: + name: tdx-collateral + template: + type: Opaque + dataFrom: + - extract: + key: 'secret/data/hub/tdxCollateral' +{{- end }} diff --git a/values.yaml b/values.yaml index 93fa0aa..5a406da 100644 --- a/values.yaml +++ b/values.yaml @@ -56,10 +56,41 @@ kbs: tdx: # Enable TDX attestation support enabled: false - # PCCS collateral service URL for quote verification - # For Azure: Use https://global.acccache.azure.net/sgx/certification/v4/ - # For bare metal/Intel: Use https://api.trustedservices.intel.com/sgx/certification/v4/ - collateralService: "https://api.trustedservices.intel.com/sgx/certification/v4/" + # DCAP collateral service URL for quote verification. + # Default is file:// mode for offline/disconnected environments: + # Reads pre-collected collateral JSON from the KBS pod filesystem, + # mounted via kbsLocalCertCacheSpec from the tdx-collateral Secret. + # For connected mode, override with: + # https://api.trustedservices.intel.com/sgx/certification/v4/ + # For Azure: https://global.acccache.azure.net/sgx/certification/v4/ + collateralService: "file:///opt/confidential-containers/attestation-service/tdx/platform_collaterals.json" + # Mount path for kbsLocalCertCacheSpec — where the tdx-collateral Secret + # is mounted into the KBS pod. Must match the directory portion of the + # file:// URL in collateralService. + collateralMountPath: "/opt/confidential-containers/attestation-service/tdx" + # Key name in the Vault secret = filename under collateralMountPath. + # Must match the filename portion of the file:// URL in collateralService. + collateralFileName: "platform_collaterals.json" + + # AMD SEV-SNP bare metal attestation configuration + snp: + # Enable SNP offline attestation (VCEK certificate cache) + # When enabled, adds snp_verifier with OfflineStore to KBS config + # and mounts VCEK secrets into the KBS pod via kbsLocalCertCacheSpec. + enabled: false + # VCEK secrets list — populated by `make snp-gen-overrides` in coco-pattern. + # Each entry maps a node's hardware ID to a K8s secret containing vcek.der. + # Collected via: make snp-collect-vcek-urls (cluster) + make snp-download-vcek (internet) + vcekSecrets: [] + # Example: + # - hwid: "abc123def456..." + # secretName: "snp-vcek-abc123def456" + + # Private registry CA certificate injection + # Enable to inject private registry CA cert into imperative namespace for + # initdata generation. Requires registryCaCert in Vault. + registryCa: + enabled: false # Bare metal attestation configuration # Enables firmware reference value collection and enforcement