feat: change firmware reference values to single JSON blob format#30
Open
butler54 wants to merge 1 commit into
Open
feat: change firmware reference values to single JSON blob format#30butler54 wants to merge 1 commit into
butler54 wants to merge 1 commit into
Conversation
Change firmware-reference-values secret consumption from multi-key format (each measurement as a separate base64-encoded JSON array) to single JSON blob format (one 'json' key containing the full structure). This aligns firmware reference values with the pcrStash pattern and enables integration with values-secret.yaml.template path-based secret management. Before: - Vault/K8s secret has keys: mr_td, rtmr_1, rtmr_2, snp_launch_measurement, xfam - Each key individually base64-decoded and parsed After: - Vault/K8s secret has one key: json - Single base64-decode + JSON parse, then access fields directly - Fields are already arrays (no inner fromJson needed) BREAKING CHANGE: Existing deployments must update secret structure from multi-key to single-key format. See coco-pattern firmware collection script for updated workflow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Change firmware-reference-values secret consumption from multi-key format to single JSON blob format, aligning with the pcrStash pattern and enabling values-secret.yaml.template integration.
Problem
The original firmware reference values implementation used a multi-key format where each measurement (mr_td, rtmr_1, etc.) is a separate base64-encoded JSON array in the Kubernetes secret. This does not align with the established pattern used by other secrets in coco-pattern (pcrStash, kbsPublicKey, etc.) which use values-secret.yaml.template with
path:references to local files.Changes
templates/rvps-values-policies.yaml (lines 47-70)
Before (multi-key):
After (single JSON blob):
The secret structure changes from:
jsonkey containing the full JSON object (one decode operation)templates/firmware-refvals-eso.yaml
No changes required - the ESO
extractdirective still works with a singlejsonkey:Companion Changes
This change requires updates in coco-pattern (PR #89):
scripts/collect-firmware-refvals.sh: Full lifecycle script (pod launch, veritas collection, cleanup) saving to~/.coco-pattern/firmware-reference-values.jsonvalues-secret.yaml.template: Single-blob format withpath:reference to local fileMakefile:make collect-firmware-refvalsandmake collect-firmware-refvals-mergetargetsBreaking Change
Migration: Re-run the collection workflow from coco-pattern PR #89:
make collect-firmware-refvals # Uncomment firmwareReferenceValues in ~/values-secret-coco-pattern.yaml make load-secretsThe new script saves to
~/.coco-pattern/firmware-reference-values.jsonand the values-secret template loads it as a single JSON blob to Vault.Testing
jsonkeyDependencies
Related
Part of Wave 2 (firmware hardening) from the bare metal attestation hardening roadmap.
🤖 Generated with Claude Code