Skip to content

fix(rvps): emit bare-metal SNP TCB reference values - #40

Merged
butler54 merged 3 commits into
validatedpatterns:mainfrom
butler54:fix/snp-baremetal-tcb-refvals
Aug 31, 2026
Merged

fix(rvps): emit bare-metal SNP TCB reference values#40
butler54 merged 3 commits into
validatedpatterns:mainfrom
butler54:fix/snp-baremetal-tcb-refvals

Conversation

@butler54

Copy link
Copy Markdown
Collaborator

What

Pass the four bare-metal SEV-SNP TCB reference values through from the
firmware-reference-values secret into the rvps-reference-values ConfigMap:

  • snp_bootloader
  • snp_microcode
  • snp_snp_svn
  • snp_tee_svn

mirroring the existing snp_launch_measurement handling in
templates/rvps-values-policies.yaml.

Why

templates/attestation-policy.yaml (bare-metal SNP) only sets hardware := 2
when all four reported TCB components are found via query_reference_value(...).
The RVPS builder never emitted these keys, so query_reference_value returned
NULL, the hardware rule fell through to its default (97, contraindicated),
and KBS returned PolicyDeny — even when the SNP report signature and VCEK
endorsement verified successfully. Only snp_launch_measurement (the
executables claim) was configurable before this change.

See #39 for the full analysis and observed attestation-service log.

How

Four if $firmwareData.<key> blocks, identical in shape to the existing
snp_launch_measurement block. Keys are optional (guarded by if), so TDX and
Azure deployments are unaffected. Values flow as JSON numbers (the report TCB
fields are integers, matched with the rego in operator).

Testing

  • helm lint .
  • helm unittest .
  • Manual: with a firmware-reference-values secret containing the four keys,
    confirmed rvps-reference-values now includes them and the bare-metal SNP
    hardware claim reaches 2 (Affirming) for a report whose reported TCB
    matches.

Notes / follow-up (not in this PR)

The configuration := 2 rule compares scalars to query_reference_value(...)
(a list) with ==, e.g. platform_smt_enabled == query_reference_value("snp_smt_enabled"),
which can never match list-valued reference data — bare-metal SNP falls through
to configuration := 3 (still Affirming). Membership-vs-equality worth a
separate look.

Closes #39

butler54 and others added 3 commits August 26, 2026 01:45
The bare-metal SNP attestation policy (default_bm.rego) computes
hardware := 2 only if all four reported TCB components match RVPS
reference values:
  snp_bootloader, snp_microcode, snp_snp_svn, snp_tee_svn

The RVPS builder only passed through snp_launch_measurement from the
firmware-reference-values secret, so those four keys were never present
in the rvps-reference-values ConfigMap. query_reference_value() returned
NULL for snp_bootloader and the hardware rule fell through to the
default (97, contraindicated), producing PolicyDeny even when the VCEK
signature/endorsement verified successfully.

Pass the four SNP TCB keys through from $firmwareData, mirroring the
existing snp_launch_measurement handling. Keys are optional (guarded by
if), so existing TDX/Azure deployments are unaffected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Chris Butler <chris.butler@redhat.com>
@butler54
butler54 merged commit 3d7453c into validatedpatterns:main Aug 31, 2026
4 checks passed
@butler54
butler54 deleted the fix/snp-baremetal-tcb-refvals branch August 31, 2026 10:08
butler54 added a commit to butler54/coco-pattern that referenced this pull request Aug 31, 2026
trustee-chart v0.10.2 (validatedpatterns/trustee-chart#40) landed while
this PR was open. It adds the bare-metal SNP TCB reference values
(snp_bootloader/snp_microcode/snp_snp_svn/snp_tee_svn) that
templates/attestation-policy.yaml requires to ever reach hardware: 2
(Affirming) on bare-metal SNP -- directly relevant to this repo's
baremetal airgap topology, which the 0.10.* wildcard in
values-baremetal.yaml/values-baremetal-hub.yaml already tracks.

Superseding the 0.10.1 pin in the same line this PR already touches
rather than opening a second PR against it.
butler54 added a commit to validatedpatterns/coco-pattern that referenced this pull request Aug 31, 2026
…irror to 0.10.2 (#135)

* fix: pin trustee chart to 0.10.* for azure/trusted-hub, bump airgap mirror to 0.10.1

values-azure.yaml and values-trusted-hub.yaml were still pinned to
chartVersion: 0.9.*, which excludes the 0.10.x line entirely (semver
wildcard is minor-scoped). This was stale from before the trustee-chart
0.10.0 OCI-chart migration (PR #105/#108), which only touched the
baremetal/baremetal-hub values files.

The gap matters now: trustee-chart v0.10.1 (validatedpatterns/trustee-chart#41)
fixes the Azure RVPS pcr-stash reader, which values-azure.yaml directly
layers via overrides/values-trustee-azure.yaml. Azure deployments were
pinned out of ever receiving that fix.

Also bump the airgap oc-mirror imageset pin (quay.io/validatedpatterns/trustee)
from 0.10.0 to 0.10.1 to match, keeping the airgap mirror in sync with the
same 0.10.x line the baremetal values files resolve to.

* fix: bump airgap mirror pin to trustee 0.10.2

trustee-chart v0.10.2 (validatedpatterns/trustee-chart#40) landed while
this PR was open. It adds the bare-metal SNP TCB reference values
(snp_bootloader/snp_microcode/snp_snp_svn/snp_tee_svn) that
templates/attestation-policy.yaml requires to ever reach hardware: 2
(Affirming) on bare-metal SNP -- directly relevant to this repo's
baremetal airgap topology, which the 0.10.* wildcard in
values-baremetal.yaml/values-baremetal-hub.yaml already tracks.

Superseding the 0.10.1 pin in the same line this PR already touches
rather than opening a second PR against it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bare-metal SNP: RVPS builder omits TCB reference values → hardware claim always 97 (PolicyDeny)

1 participant