Skip to content

docs(azure): document Docker IGVM reproducibility - #227

Open
Haitao Huang (haitaohuang) wants to merge 32 commits into
microsoft:integrationfrom
haitaohuang:docs/reproducible-build-current
Open

Haitao Huang (haitaohuang) wants to merge 32 commits into
microsoft:integrationfrom
haitaohuang:docs/reproducible-build-current

Conversation

@haitaohuang

@haitaohuang Haitao Huang (haitaohuang) commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • remove doc/reproducible_build.md so the shared documentation matches intel/main
  • add Docker-only Azure IGVM reproducibility guidance under sh_script/Azure/
  • document the current dependency-locking, builder-image, and CI limitations
  • update the Dockerfile and workflow references to the Azure-specific document

Validation

Documentation and references were checked against the current Azure Dockerfile, build wrapper, Makefile, and reproducibility workflow.

Haitao Huang (haitaohuang) and others added 30 commits July 25, 2026 20:50
Centralize SPDM transport finalization, preserve replay protection, tear down failed sessions, and safely truncate oversized structured log messages.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Normalize embedded build paths, support current GCC toolchains, and exclude generated collateral and image outputs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Adopt tdinfo_hash as the canonical mapping key, collapse RTMR2 to one redacted policyData extend, and keep runtime and offline measurements byte-identical.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Document the canonical policy measurement, tdinfo_hash lookup model, and policy-v2 measurement contract.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Verify signed one-hash endorsements against the RTMR1 trust anchor, remove the legacy outer policy signature dependency, and enforce local signer revocation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Measure and verify a stable root-certificate plus leaf-EKU signer anchor while preserving precise policy initialization failures.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Enroll signer anchors directly, accept CoRIM-only policies, and match the measured anchor against any asserted non-generic leaf EKU.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Do not require destination policy mappings to predict future source MigTD images during signer rotations. Also fix the policy redesign document references.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Raise the raw VMCALL transfer size for Azure and add regression coverage for chunking and offset validation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Add the AzCVMEmu policy matrix, mock-quote controls, reproducible IGVM workflow, and Azure image build configuration as one cohesive integration layer.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Package the Azure TiP dependencies, loopback migration tests, startup checks, ServTD prebinding checks, and publication helpers.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Capture reusable TiP lab-blade and cross-node SPDM transport diagnostics without embedding user-specific aliases.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Add the reusable environment bootstrap and operator-facing functionality, coverage, and reproducible-build guidance.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Collect architecture knowledge, porting workflows, security-review guidance, and the CI parity runner using generic user references.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Record that init and current SVNs must be resolved through the authenticated source mapping, distinguish that from the removed destination-local allowlist, and document the current implementation gap.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Resolve the initial and current MigTD hashes through the authenticated source policy for migration and rebinding, and fail closed on missing or reversed mappings. Keep legacy Init_TDINFO only for wire compatibility and populate SERVTD_EXT in migration emulation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove the superseded combined proposal and point implementation references at the focused TCB-mapping and signer-anchor design documents.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Re-enable the test-mode policy bypasses, BC trace points, and expanded log truncation window on the dedicated one_hash_test branch.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Verify full-form host requests are accepted for both StartMigration and StartRebinding while the supplied init TDINFO is cleared before dispatch.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Move durable repository rules into the root AGENTS.md, preserve the one-hash SVN-ordering guidance, and centralize the WSL authentication note. Retarget knowledge references and remove the obsolete AGENT_NOTES entry point.

Combines Microsoft one_hash commits 16aa7ed and 59a4edd.

Assisted-by: GitHub Copilot CLI:gpt-5.6-sol [migtd-port] [migtd-review]
Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Make Azure builders tolerate transient package failures, bootstrap CA trust, prepare attestation sources without Git metadata, and prune linux-sgx only when the selected feature set permits it. Add regression coverage for every supported pruning mode.

Combines Microsoft one_hash commits 979f04f, 8e44f69, 49a8a6f, 5ad7576, and fb0c743.

Assisted-by: GitHub Copilot CLI:gpt-5.6-sol [migtd-port] [migtd-review]
Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Retain authority-maintained historical tdinfo_hash entries when adding a release, canonicalize mapping order for signing, reject conflicting duplicates, and require explicit hash revocation.

Route Azure, AzCVMEmu, TiP, and manual release workflows through the Rust updater so authenticated source policies map both initial and current MigTD hashes. Fixes microsoft#199.

Ported from Microsoft one_hash commit 9d8b4af.

Assisted-by: GitHub Copilot CLI:gpt-5.6-sol [migtd-port] [migtd-review]
Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Retain verified CoRIM x5chain material and apply the measured local servTD CRL during initialization and peer authentication. Accept the legacy nested CRL location while keeping peer-delivered CRLs out of revocation and anti-rollback decisions.

Fixes microsoft#200. Ported from Microsoft one_hash commit 3f57c86.

Assisted-by: GitHub Copilot CLI:gpt-5.6-sol [migtd-port] [migtd-review]
Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Use the TCB-mapping CoRIM SVN for Azure policy evaluation when TD identity evidence is absent. Add release-policy coverage, CoRIM-only migration and rebind EMU flows, firmware-volume fixtures, and an inline CI gate for the production feature set.

Combines Microsoft one_hash commits 9715ba8, 5b368dd, 505542e, and 9f824f4.

Assisted-by: GitHub Copilot CLI:gpt-5.6-sol [migtd-port] [migtd-review]
Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Delete the unused verify_init_migtd_data_policy_binding API now that one-hash ServtdExt validation owns init/current SVN ordering.

Partial port of microsoft#218; intentionally retain its unrelated fail-closed and log-truncation changes for separate consideration.

Assisted-by: GitHub Copilot CLI:gpt-5.6-sol [migtd-port] [migtd-review]
Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Upgrade vulnerable OpenSSL, quinn-proto, and bytes lockfile entries detected by the AP signing Windows scan.

Assisted-by: GitHub Copilot CLI:GPT-5.6 Sol
Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
(cherry picked from commit 497aed5)
Document why MigTD applies spdm-rs serialization patches to td-shim's ring source and update agent guidance to use the current API names.

Assisted-by: GitHub Copilot CLI:GPT-5.6 Sol [migtd-review]

Copilot-Session: a6817bca-828a-435d-aba7-85d72ec9ec63
Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Keep the signed servtdIdentity envelope and its issuer chain in the canonical policyData measurement. This prevents replay of an older valid JSON identity while leaving the CoRIM-only SVN policy unchanged.

Fixes microsoft#198

Assisted-by: GitHub Copilot CLI:GPT-5.6 Sol [migtd-review]
Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Remove jwt-cpp before SERVTD_ATTEST compilation so CI verifies that the attestation library does not depend on its headers or implementation. Extend the pruning safety test with the same path.

Assisted-by: GitHub Copilot CLI:GPT-5.6 Sol
Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Describe TCB-mapping CoRIMs as production release artifacts and remove implementation-specific tool references.

Assisted-by: GitHub Copilot CLI:GPT-5.6 Sol

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 047c0ad8-f29d-44c1-8b1d-f95f92c51a64
Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Reject CWT nbf and exp claims because MigTD has no trusted wall clock.

Fixes microsoft#201

Assisted-by: GitHub Copilot CLI:GPT-5.6 Sol

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 047c0ad8-f29d-44c1-8b1d-f95f92c51a64
Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Remove the integration-only general reproducible-build document so the shared
documentation matches intel/main. Add Azure-specific guidance for the Docker
IGVM build, including its dependency-locking and CI limitations.

Assisted-by: GitHub Copilot CLI:gpt-5.6-sol [migtd-review]
Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
@haitaohuang
Haitao Huang (haitaohuang) force-pushed the docs/reproducible-build-current branch from 03ad747 to e46d240 Compare August 3, 2026 23:27
@haitaohuang

Copy link
Copy Markdown
Collaborator Author

Nix feasibility investigation

Nix can provide a stronger reproducible Azure IGVM build than the current Dockerfile. A committed flake.lock can pin nixpkgs, the Rust-toolchain provider, and Rust dependency tooling; Nix store paths then identify exact compiler and system-package inputs. Sandboxed builds also prevent undeclared network or host dependencies. This addresses the current gap where only Cargo dependency versions are tracked by Cargo.lock, while APT and rustup artifacts can change when the builder image is rebuilt.

Proposed implementation

  1. Add flake.nix and flake.lock for x86_64-linux, pinning nixpkgs, crane, and rust-overlay or fenix.
  2. Import Rust 1.88.0, rust-src, and x86_64-unknown-none from the pinned Rust input. Declare Clang, LLVM, NASM, GCC/build tools, OpenSSL, OCaml, Autotools, CMake, Perl, Python, jq, and the SGX/DCAP build dependencies from pinned nixpkgs.
  3. Include recursive Git submodules in the Nix source. Replace preparation steps that require submodule .git directories (git reset, git clean, and git apply) with an explicit derivation patch phase that applies the td-shim and spdm-rs ring patches to a writable source tree.
  4. Use crane to vendor all registry and Git Cargo dependencies from Cargo.lock, then run Cargo with --locked and offline access inside the sandbox.
  5. Define a custom Azure IGVM derivation that invokes the exact build-igvm target and installs migtd.igvm, its SHA-256, measurements, and build log into the Nix output.
  6. Add CI using nix build .#azure-igvm --rebuild --keep-failed, and also compare builds from independent clean Nix stores or runners. During migration, compare the Nix-produced IGVM with the current Docker-produced IGVM before making Nix authoritative.
  7. Optionally generate a Docker builder with dockerTools.buildImage if the existing Docker interface must remain available; the IGVM derivation itself does not require Docker.

The main engineering risks are the Git-dependent submodule preparation, mutable SGX/DCAP build tree, and any build scripts that assume an FHS filesystem. These need explicit Nix patch/build phases. Generated keys, signatures, and collateral must remain fixed inputs; Nix cannot make intentionally generated cryptographic material deterministic.

References: Nix reproducibility checking, Nix Docker image tooling, crane, and rust-overlay.

This is a feasibility/design result only; Nix is not installed in the current environment, so no prototype was built in this PR.

@haitaohuang Haitao Huang (haitaohuang) changed the title docs(migtd): document current reproducible build design docs(azure): document Docker IGVM reproducibility Aug 3, 2026
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