Repository navigation
Commit 549ec0e
authored
fix(rvps): read Azure pcr-stash values as flat, TEE-prefixed keys (#41)
* fix(rvps): read Azure pcr-stash values as flat, TEE-prefixed keys
The Azure RVPS section read $secretData.measurements.sha256.pcr03 (and
pcr09/11/12), a nested structure that only the old, now-removed
get-pcr.sh script (and a since-superseded manual bare-metal PCR
collection doc) ever produced. The current collection tool (veritas,
via coco-pattern's collect-firmware-refvals.sh --platform azure)
outputs a flat, already TEE-prefixed structure instead
(tdx_pcr03/snp_pcr03/etc, per veritas's own RVPS reference_value
format) -- so the nested lookup has been resolving to nil since Azure
collection switched to veritas, silently producing broken/empty
snp_pcr03/tdx_pcr03 reference values.
Confirmed via git archaeology: the nested lookup was introduced in the
very first commit of this file (4b0a717) and was never migrated when
3eb756e later moved the analogous bare-metal firmware-reference-values
handling from multi-key to flat single-blob format -- only the
bare-metal path was updated at the time.
Fix: read snp_pcr03/tdx_pcr03/snp_pcr09/tdx_pcr09/snp_pcr11/tdx_pcr11/
snp_pcr12/tdx_pcr12 directly as flat, existence-guarded keys, mirroring
the confirmed-working bare-metal firmwareData pattern (if
$firmwareData.mr_td, etc.) exactly instead of computing one value and
manually duplicating it into both prefixes. This means each prefix is
only populated when veritas actually collected it -- compatible with
both single-TEE and the new default dual-TEE (--tee both) collection.
Also moved the snp_pcr08/tdx_pcr08 block (sourced from the initdata
ConfigMap, unrelated to pcr-stash) outside the 'if $pcrStash' guard,
since it was previously skipped whenever pcr-stash didn't exist yet
even though its actual data source is independent.
Verified with 'helm lint' and 'helm template --show-only' (both clean,
rendered object-templates-raw text confirmed structurally identical in
style to the working bare-metal block). The 'lookup' function only
resolves against a live cluster, so end-to-end verification of the
rendered RVPS ConfigMap needs a live Azure cluster -- no existing
helm-unittest test suite exists in this chart to extend, and neither
helm-unittest nor podman are available in this environment to add one.
* fix: promote to main
Signed-off-by: Chris Butler <chris.butler@redhat.com>
---------
Signed-off-by: Chris Butler <chris.butler@redhat.com>1 parent 4ece12a commit 549ec0e
3 files changed
Lines changed: 30 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
31 | 35 | | |
32 | 36 | | |
33 | 37 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
| 38 | + | |
| 39 | + | |
39 | 40 | | |
40 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
41 | 44 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
47 | 48 | | |
48 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
49 | 52 | | |
50 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
51 | 56 | | |
52 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
53 | 60 | | |
54 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
55 | 64 | | |
56 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
57 | 68 | | |
58 | 69 | | |
| 70 | + | |
59 | 71 | | |
60 | 72 | | |
61 | 73 | | |
| |||
0 commit comments