You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: rewrite firmware collection to use veritas container approach (#94)
* feat: add label-based exclusion for firmware collection pods
Add exclude block to inject-coco-initdata Kyverno policy to skip
pods with label coco.io/skip-initdata: "true".
Update firmware collection script to add this label to the pod,
preventing Kyverno from trying to inject init_data (which would
fail since the pod doesn't have coco.io/initdata-configmap annotation).
The firmware collection pod doesn't need init_data injection because
it only collects measurements from the TEE device - it doesn't attest
to KBS or request secrets.
Fixes error: mutation policy inject-coco-initdata error: failed to
evaluate preconditions: failed to substitute variables in condition key
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix: rewrite firmware collection to use veritas container approach
Complete rewrite based on Red Hat documentation and veritas usage:
- Runs veritas via podman container (quay.io/openshift_sandboxed_containers/coco-tools:1.12)
- No cluster pods needed - computes firmware values locally from OCP release artifacts
- Auto-detects OCP version from cluster or accepts --ocp-version flag
- Extracts reference-values.json from veritas ConfigMap output
- Saves to ~/.coco-pattern/firmware-reference-values.json
- Uses --hw-xfam-allow x87,sse,avx to prevent attestation failures
Previous approach was fundamentally wrong:
- Tried to run veritas inside a kata pod on the cluster
- Tried to "collect" from /dev/tdx_guest (doesn't work that way)
- Veritas doesn't collect from running hardware - it computes expected
values from OCP release artifacts (kata RPMs, edk2 firmware, etc.)
Now follows the documented approach:
https://docs.redhat.com/en/documentation/openshift_sandboxed_containers/1.12
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix: transform veritas array output to object format for RVPS policy
Veritas outputs firmware reference values as a JSON array:
[{"name": "mr_td", "value": [...]}, ...]
But the trustee-chart RVPS ConfigurationPolicy template expects
an object format:
{"mr_td": [...], "rtmr_1": [...], ...}
Transform the veritas output using jq:
[.[] | {(.name): .value}] | add
This fixes the RVPS policy error:
can't evaluate field mr_td in type []interface {}
Also added jq to prerequisites check.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix: add -r flag to yq for cross-version compatibility
yq v3 (kislyuk/yq) outputs JSON strings with quotes by default,
so the embedded JSON in the YAML ConfigMap stays quoted and jq
receives a string instead of an array. Adding -r outputs the raw
string, which both yq v3 and v4 handle correctly.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: unify reference value collection for azure and baremetal
Generalize collect-firmware-refvals.sh to support both platforms via
--platform flag (baremetal default, azure optional). This replaces
get-pcr.sh for Azure deployments — veritas pulls the same dm-verity
image, verifies its signature via cosign, and extracts PCR values.
Azure: outputs to ~/.coco-pattern/measurements.json (pcrStash secret)
Baremetal: outputs to ~/.coco-pattern/firmware-reference-values.json
Also adds yq -r fix for v3/v4 cross-compatibility and a new
'make collect-azure-refvals' Makefile target.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: update RHDP wrappers to use unified reference value collection
Replace get-pcr.sh call with collect-firmware-refvals.sh --platform azure
in wrapper.sh. Add missing reference value collection step to
wrapper-multicluster.sh (was never collecting PCR values for Vault).
Update RHDP README with prerequisites, env vars, and all deployment modes.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
0 commit comments