Skip to content

feat(policy): add CoRIM mappings and optional servTD identity - #1037

Open
haitaohuang wants to merge 5 commits into
intel:mainfrom
haitaohuang:corim-optional-servtd-port
Open

feat(policy): add CoRIM mappings and optional servTD identity#1037
haitaohuang wants to merge 5 commits into
intel:mainfrom
haitaohuang:corim-optional-servtd-port

Conversation

@haitaohuang

Copy link
Copy Markdown
Contributor

Summary

This is a stacked continuation of #1035 and #1032. The new commit in this PR implements the CoRIM TCB-mapping and optional servTD Identity proposals tracked in #929 and #930.

  • keep JSON TCB mappings as the default while adding feature-gated signed CoRIM mappings;
  • verify CoRIM COSE_Sign1 ES384/ESP384 signatures and RFC 9360 x5chain, reject unsupported time claims, and bind the signer to the RTMR1 root-certificate plus leaf-subject anchor from feat(policy): add stable RTMR1 signer anchor and revocation #1035;
  • support direct 48-byte signer-anchor and signed-CoRIM CFV enrollment;
  • apply the locally authoritative servTD CRL to JSON and CoRIM signer chains;
  • transport and authenticate each peer's CoRIM so source initial/current hashes are resolved through the source endorsement, with no JSON fallback after a CoRIM miss;
  • make the simplified JSON servTD Identity optional: SVN-only policies work without it, while date/status rules fail closed;
  • keep optional identity material measured in RTMR2 while leaving independently signed mapping content updateable;
  • preserve compatibility with existing JSON policies whose mapping is signed by the CFV policy issuer, while allowing an explicit mapping signer chain.

No documentation, test-fixture, workflow, or integration-script changes are included.

Validation

  • formatting, cargo check, clippy, cargo-deny, library build, and library tests;
  • policy tests with servtd_corim enabled;
  • all 32 firmware build combinations and all six standalone tools;
  • a policy-v2 CoRIM image build;
  • all 14 emulation workflow scenarios;
  • policy-v2 IGVM build and offline hash generation.

Follow-up

The remaining future work is the release-tooling and coverage work described in #1032: independent policy/mapping/identity signer-rotation coverage and stronger two-phase measurement-generation/hash-stability checks.

haitaohuang and others added 5 commits September 4, 2026 21:41
Use SHA-384 over the complete unmasked TDINFO as the Policy v2 mapping key. Canonicalize policyData once with only the circular mapping removed so runtime verification and offline tooling extend identical RTMR2 bytes.

Verify the signed mapping with the RTMR1-bound policy issuer chain, remove the separate mapping chain and obsolete mapping identity fields, and ignore the legacy outer policy signature as required by the proposal.

Resolve the source's initial and current SERVTD_EXT hashes through its authenticated JSON mapping, allowing an older destination to accept a newer source release without predicting its hash.

Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Assisted-by: GitHub Copilot CLI:GPT-5.6 Sol
Carry authenticated SERVTD_EXT continuity evidence through migration and rebinding. Ignore legacy host-supplied Init_TDINFO after validating its framing, reject lookup misses or SVN rollback, and fail closed when SERVTD_ATTR masking makes the endorsed unmasked hashes inapplicable.

Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Assisted-by: GitHub Copilot CLI:GPT-5.6 Sol
Retain authority-maintained hash history when adding a release, allow multiple hashes at one SVN, and reject conflicting duplicate assignments. Emit deterministic mapping bytes and validate signed mappings before use.

Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Assisted-by: GitHub Copilot CLI:GPT-5.6 Sol
Measure the policy signer as a stable root-certificate plus leaf-subject anchor in both runtime and offline hashing. Add optional authenticated servTD CRL delivery, signer-chain enforcement at initialization and peer validation, and a monotonic servtd CRL policy floor.\n\nPort only the proposal-specific implementation from ms/integration while retaining tcbmapping's existing JSON mapping and identity model.

Assisted-by: GitHub Copilot CLI:GPT-5.6 Sol
Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Add feature-gated signed CoRIM TCB mappings, authenticated peer transport, and direct signer-anchor enrollment. Keep JSON mappings as the default, support optional simplified servTD identity, and fail closed for date or status rules when identity data is unavailable.

Co-authored-by: Haitao Huang <haitaohuang@microsoft.com>

Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>

Assisted-by: GitHub Copilot CLI:GPT-5.6 Sol
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.

2 participants