Skip to content

feat(attestation): measured boot + remote attestation (canon L0 Genesis binding) - #561

Merged
mdheller merged 1 commit into
masterfrom
feat/boot-attestation-l0
Aug 4, 2026
Merged

feat(attestation): measured boot + remote attestation (canon L0 Genesis binding)#561
mdheller merged 1 commit into
masterfrom
feat/boot-attestation-l0

Conversation

@mdheller

@mdheller mdheller commented Aug 4, 2026

Copy link
Copy Markdown
Member

Summary

Executes atlas step 2 — the canon's L0 Genesis binding. The server can already build a BootProofRecord (the measured-boot chain), but nothing attested it. This adds the fail-closed verifier: a device is trustworthy from power-on only if every stage it ran was pinned and matched.

What's here

  • src/services/bootAttestation.tsattestBoot(record, policy) verifies the measured chain against a pinned golden policy:
    • outcome = success; every stage verdict = verified;
    • every pinned stage present with a matching contentHash;
    • fail-closed: no stage may run that isn't pinned (an unpinned stage is an unmeasured surface);
    • an empty policy attests nothing (anti-theater — a policy that pins nothing could "attest" anything).
  • Closes the loop with verified-immutable corpus (PP #1367 dm-verity): the rootfs stage's measured hash must equal the pinned dm-verity root — so "the base is immutable" and "the base that booted is the pinned one" become one chain of evidence, not two assertions.
  • test/boot-attestation.test.mjs (11 checks): happy path + rejects non-success outcome, tampered/failed verdict, hash mismatch, unpinned stage, missing stage, dm-verity mismatch, empty policy; enforces requireSignature. Gated in builder-contract-tests.yml.

Conforms to the vendored BootProofRecord contract.

Next

Bind attestation to device enrollment (DeviceIdentity) under the quorum (#1370), and require a valid attestation before the build/device admission (#557) — so no image is built by, and no device enrolls from, an unattested node.

Touches a workflow — flagged for human review; not auto-merging.

…is binding)

The server can build a BootProofRecord (the measured-boot chain) but nothing ATTESTED
it. This adds the fail-closed verifier — a device is trustworthy from power-on only if
every stage it ran was pinned and matched.

- src/services/bootAttestation.ts — attestBoot(record, policy) verifies the measured
  chain against a pinned golden policy: outcome=success; every stage verdict=verified;
  every pinned stage present with a matching contentHash; and — fail-closed — NO stage
  may run that isn't pinned (an unpinned stage is an unmeasured surface). Emits a sealed
  attestation. An empty policy attests nothing (anti-theater).

- Closes the loop with the verified-immutable corpus (mount-intent dm-verity, PP #1367):
  the rootfs stage's measured hash MUST equal the pinned dm-verity root, so "the base is
  immutable" and "the base that booted is the pinned one" become ONE chain of evidence.

- test/boot-attestation.test.mjs (11 checks): happy path + rejects non-success outcome,
  tampered/failed verdict, hash mismatch, unpinned stage, missing stage, dm-verity
  mismatch, empty policy, and enforces requireSignature. Gated in builder-contract-tests.yml.

Conforms to the vendored BootProofRecord contract (verdict enum verified/skipped/failed/
tampered). Next: bind attestation to device enrollment (DeviceIdentity) under the quorum,
and require a valid attestation before the build/device admission.
@mdheller
mdheller merged commit 510ac86 into master Aug 4, 2026
16 checks passed
@mdheller
mdheller deleted the feat/boot-attestation-l0 branch August 4, 2026 07:49
mdheller added a commit that referenced this pull request Aug 4, 2026
…um (cloud adapter) (#567)

A device joins the fleet only if BOTH hold:
  1. boot attests (measured chain matches the per-arch pinned golden policy, rootfs
     hash bound to dm-verity root) via bootAttestation.ts (PR #561).
  2. a validator quorum co-signs THIS enrollment (payload hash bound to device +
     attested boot hash so the vote can't be replayed to another device or boot).

New files:
  src/services/quorum.ts         — TS twin of PP #1370 quorum.py; conforms to the
                                   same authoritative QuorumProof shape; no 2nd verifier.
  src/services/deviceEnrollment.ts — enrollDevice() fuses attestation × quorum;
                                   arch-neutral (policy keyed by archClass with platform
                                   fallback); fail-closed on missing arch policy.
  src/contracts/schemas/QuorumProof.json — vendored from mcp-a2a-zero-trust (authoritative);
                                   provenance file included.
  test/device-enrollment.test.mjs — 21 checks: happy path (time-frozen for deterministic
                                   sealed hash), tampered rootfs, wrong outcome,
                                   sub-threshold quorum, wrong payload hash, missing
                                   arch policy, enrollmentPayloadHash binds device+attest,
                                   platform fallback, quorum unit tests.

CI (.github/workflows/builder-contract-tests.yml):
  Added "device enrollment gate" step; new service + test paths in path filters.

Canon Genesis binding closes the loop: boot attestation (dm-verity ↔ measured chain)
PLUS quorum co-signature = ONE evidence chain that the fleet only admits a device that
ran the verified, pinned base AND was co-signed by enough validators.

Co-authored-by: Michael Heller <charles.peterson@socioprophet.ai>
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.

1 participant