Repository navigation
igvmfilegen: prepare endorsements and re-sign SNP ID blocks - #4865
Open
Ming-Wei Shih (mingweishih) wants to merge 1 commit into
Open
Ming-Wei Shih (mingweishih) wants to merge 1 commit into
Ming-Wei Shih (mingweishih) wants to merge 1 commit into
Conversation
Support external signing workflows for existing IGVM images without rebuilding them or substituting image identity defaults. Keep CoRIM endorsement preparation separate from SNP ID-block signing. - Add prepare-endorsement and verify-endorsement for SNP, TDX, and VBS, with signing artifacts, hash provenance, and verification of the selected endorsement without permitting unrelated image changes. - Add prepare-snp-id-block with an optional decoded JSON dump and add-snp-id-block --replace-existing for identity-preserving external signatures. Validate existing signatures or unsigned placeholders. - Derive SNP endorsement SVN from an existing ID block, or require an explicit SVN when absent, as for TDX/VBS. Reject mismatches in both CoRIM preparation and ID-block addition or replacement. - Allow explicit firmware DLL resource and language selection for inspection and finalized endorsement verification. - Pin igvm and igvm_defs to upstream revision 568e2719972e, including checked SNP ID-block replacement from microsoft/igvm#137. - Document the independent signing workflows and trust boundaries in the igvmfilegen tool guide. Signature verification does not establish signer authorization or certificate trust. Validation: igvmfilegen Clippy (all targets), rustdoc, all 96 unit tests, cargo xtask fmt --fix, and git diff --check passed. Hardware acceptance was not tested. Signed-off-by: Ming-Wei Shih <mishih@microsoft.com>
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Security-sensitive SNP re-signing and endorsement verification require human review of signer authorization and firmware assumptions, while hardware acceptance remains unvalidated.
No open issues 🎉
What changed in this PR
Extends igvmfilegen with external signing workflows for existing IGVM images, keeping CoRIM endorsement preparation separate from identity-preserving SNP ID-block signing.
Changes:
- Adds endorsement preparation and verification for SNP, TDX, and VBS, with artifact hashes and checks against unrelated image changes.
- Adds SNP signing-payload export and explicit ID-block replacement, including signature validation and guest SVN consistency checks.
- Adds firmware DLL resource selection, updates IGVM dependencies, and documents signing workflows and trust boundaries.
| File | Description |
|---|---|
vm/loader/igvmfilegen/src/snp_id_block.rs |
Adds identity validation, payload export, signature replacement, and SVN checks with tests. |
vm/loader/igvmfilegen/src/prepare_endorsement.rs |
Implements endorsement preparation, artifact publication, and finalized-image verification with tests. |
vm/loader/igvmfilegen/src/main.rs |
Wires new commands and options into the CLI and adds command tests. |
vm/loader/igvmfilegen/src/firmware_dll.rs |
Adds explicit resource and language selection with ambiguity checks and tests. |
vm/loader/igvmfilegen/src/corim_signature/mod.rs |
Exposes signature verification and test helpers for endorsement workflows. |
vm/loader/igvmfilegen/Cargo.toml |
Adds tempfile for artifact publication. |
Guide/src/dev_guide/dev_tools/igvmfilegen.md |
Documents independent signing workflows, verification, resource selection, and trust limits. |
Cargo.toml |
Pins IGVM dependencies to the revision supporting checked ID-block replacement. |
Cargo.lock |
Records updated IGVM dependencies and the tool’s tempfile dependency. |
Review effort: Balanced
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.
Support external signing workflows for existing IGVM images without rebuilding them or substituting image identity defaults. Keep CoRIM endorsement preparation separate from SNP ID-block signing.
Validation: igvmfilegen Clippy (all targets), rustdoc, all 96 unit tests, cargo xtask fmt --fix, and git diff --check passed. Hardware acceptance was not tested.