diff --git a/README.md b/README.md index 7427f02..05065e9 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,7 @@ In order to use this chart, you will need to: | kbs.secretResources[1].key | string | `"secret/data/hub/passphrase"` | | | kbs.secretResources[1].name | string | `"passphrase"` | | | kbs.snp.enabled | bool | `false` | | +| kbs.snp.vcekKdsUrl | string | `""` | | | kbs.snp.vcekSecrets | list | `[]` | | | kbs.spire.enabled | bool | `false` | | | kbs.spire.adminSocketPath | string | `"/run/spire/sockets/admin.sock"` | | diff --git a/templates/kbs-config-map.yaml b/templates/kbs-config-map.yaml index 7aaeb02..baf9d80 100644 --- a/templates/kbs-config-map.yaml +++ b/templates/kbs-config-map.yaml @@ -55,7 +55,17 @@ data: {{- if .Values.kbs.snp.enabled }} [attestation_service.verifier_config.snp_verifier] - vcek_sources = [{ type = "OfflineStore" }] + {{- $vcekSources := list }} + {{- if .Values.kbs.snp.vcekSecrets }} + {{- $vcekSources = append $vcekSources "{ type = \"OfflineStore\" }" }} + {{- end }} + {{- if .Values.kbs.snp.vcekKdsUrl }} + {{- $vcekSources = append $vcekSources (printf "{ type = \"KDS\", base_url = \"%s\" }" .Values.kbs.snp.vcekKdsUrl) }} + {{- end }} + {{- if not $vcekSources }} + {{- $vcekSources = list "{ type = \"OfflineStore\" }" }} + {{- end }} + vcek_sources = [{{ join ", " $vcekSources }}] {{- end }} [[plugins]] diff --git a/values.yaml b/values.yaml index 4754ed3..0498df2 100644 --- a/values.yaml +++ b/values.yaml @@ -74,17 +74,26 @@ kbs: # 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. + # Enable SNP attestation (VCEK certificate verification) + # When enabled, adds snp_verifier to the KBS config with one or more + # vcek_sources, driven by vcekSecrets (offline) and/or vcekKdsUrl (online). 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) + # When non-empty, adds an OfflineStore vcek_source to the SNP verifier config + # and mounts the VCEK secrets into the KBS pod via kbsLocalCertCacheSpec. vcekSecrets: [] # Example: # - hwid: "abc123def456..." # secretName: "snp-vcek-abc123def456" + # Online AMD Key Distribution Service (KDS) base URL for fetching VCEK + # certificates on connected clusters, e.g. "https://kdsintf.amd.com". + # When set, adds a KDS vcek_source to the SNP verifier config. May be + # combined with vcekSecrets (OfflineStore is tried first, KDS is the + # fallback) or used on its own for fully online attestation. Empty by + # default, which preserves the original offline-only (OfflineStore) behavior. + vcekKdsUrl: "" # SPIRE Delegated Identity plugin configuration # Requires a KBS image built with the spire-plugin cargo feature