diff --git a/crates/aienos-evidence/src/rollback.rs b/crates/aienos-evidence/src/rollback.rs index f019c439..2919073f 100644 --- a/crates/aienos-evidence/src/rollback.rs +++ b/crates/aienos-evidence/src/rollback.rs @@ -161,17 +161,15 @@ fn boot_order(v: &Value) -> Vec { /// Returns the full report text and the verdict. pub fn verify(pre: &Value, post: &Value) -> (String, Verdict) { let mut errors: Vec = Vec::new(); - let mut blocked: Vec = Vec::new(); + // Nothing blocks today: Secure Boot is OFF for development (owner decision, + // 2026-10-01), so its state is reported as an observed fact. A release gate + // that requires "enabled" must be added separately. + let blocked: Vec = Vec::new(); - // 1. Secure Boot must be on before and after, and unchanged. + // 1. Secure Boot is observed (reported below), not required to be on during + // development. It must still be unchanged across the candidate boot. let sb_pre = text(pre, "secure_boot").to_lowercase(); let sb_post = text(post, "secure_boot").to_lowercase(); - if sb_pre != "enabled" { - blocked.push(format!("Pre-boot Secure Boot is not enabled: {sb_pre}")); - } - if sb_post != "enabled" { - blocked.push(format!("Post-boot Secure Boot is not enabled: {sb_post}")); - } if sb_pre != sb_post { errors.push(format!( "Secure Boot state changed from '{sb_pre}' to '{sb_post}'" @@ -438,16 +436,23 @@ ESP UUID: e-1 (matched=True)\n"; } #[test] - fn secure_boot_off_blocks_even_with_other_failures() { + fn secure_boot_off_is_observed_not_blocking() { let mut pre = capture(); pre["secure_boot"] = json!("disabled"); let mut post = capture(); - post["boot_next"] = json!("0000"); + post["secure_boot"] = json!("disabled"); let (report, v) = verify(&pre, &post); - assert_eq!(v, Verdict::Blocked); - assert_eq!(v.exit_code(), 3); - assert!(report.contains("* Pre-boot Secure Boot is not enabled: disabled\n")); - assert!(!report.contains("VIOLATIONS")); + assert_eq!(v, Verdict::Pass); + assert!(report.contains("Secure Boot: before=disabled, after=disabled\n")); + } + + #[test] + fn secure_boot_change_is_still_a_violation() { + let mut pre = capture(); + pre["secure_boot"] = json!("disabled"); + let (report, v) = verify(&pre, &capture()); + assert_ne!(v, Verdict::Pass); + assert!(report.contains("Secure Boot state changed")); } #[test] diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index c952412c..ba9b0795 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -72,7 +72,7 @@ Accepted exception: silicon that physically requires vendor-signed firmware (for ## 4. Security -- **Boot trust:** Secure Boot off during early development. Before daily use: firmware verifies the operator's key, the operator's key verifies AIENOS boot artifacts, AIENOS verifies kernel and runtime components. An offline recovery key and recovery media are designed before enforcement. +- **Boot trust:** Secure Boot off during early development (confirmed OFF as of 2026-10-01, owner decision). Before daily use: firmware verifies the operator's key, the operator's key verifies AIENOS boot artifacts, AIENOS verifies kernel and runtime components. An offline recovery key and recovery media are designed before enforcement. - **Encryption at rest:** conversations, Cortex, projects, World state, credentials, agent memories, model-private data, configuration, caches, and swap-equivalents. Unlock at startup; later hardware sealing plus an operator secret. Credentials receive extra protection after unlock. - **Identities from day one:** operator, agent identities, system services, remote Machines, future household users; each with separate capabilities, memory visibility, authority, and provenance. No login screens or profiles in version one. diff --git a/docs/GB10_HARDWARE_QUALIFICATION.md b/docs/GB10_HARDWARE_QUALIFICATION.md index a1380a20..c8b95cd4 100644 --- a/docs/GB10_HARDWARE_QUALIFICATION.md +++ b/docs/GB10_HARDWARE_QUALIFICATION.md @@ -30,7 +30,7 @@ SMMU configuration. 1. The operator approves the run. It runs under `aien-proof hold --resource machine-1`. -2. Secure Boot stays on. TPM state is untouched. +2. Secure Boot is OFF for development (owner decision, 2026-10-01); its state is recorded, not required. TPM state is untouched. 3. Linux storage is untouched. The procedure writes only to a temporary directory and to the evidence output paths the operator names. 4. BootOrder is untouched. No boot entry is created, removed, or reordered. diff --git a/docs/NATIVE_BOOT_ONE_TIME.md b/docs/NATIVE_BOOT_ONE_TIME.md index 3078b83f..5e731c7d 100644 --- a/docs/NATIVE_BOOT_ONE_TIME.md +++ b/docs/NATIVE_BOOT_ONE_TIME.md @@ -1,4 +1,4 @@ -# Machine 1 Native Boot Qualification Procedure: Attended, One-Time, Secure Boot ON +# Machine 1 Native Boot Qualification Procedure: Attended, One-Time, Secure Boot OFF for development (as of 2026-10-01), ON for release This document defines the safe, operator-attended qualification procedure for one-time native candidate boots of AIENOS on NVIDIA DGX Spark ("Machine 1", `spark-b87b`). @@ -10,9 +10,12 @@ This document defines the safe, operator-attended qualification procedure for on HARDWARE_QUALIFICATION_BLOCKED_BY_TRUST_CHAIN ``` +> [!NOTE] +> **Update 2026-10-01 (owner decision):** Secure Boot is OFF on Machine 1 for development, by Drake's decision. The TPM stores were relocked with PCR 7 measured under Secure Boot off (recovery procedure: `~/handoffs/secure-boot-off/after-restart.sh`). Gates now report Secure Boot state as an observed fact and do not fail on it. Any production or release gate must still require Secure Boot ON. The historical warning below describes the 2026-09-24 state and the PCR 7 sealing risk when the setting is flipped. + > [!CAUTION] -> **DO NOT DISABLE SECURE BOOT.** -> On Machine 1, turning Secure Boot off alters TPM PCR 7. On the historical 2026-09-24 first-boot test, changing PCR 7 prevented the TPM from unsealing the volume encryption keys for `atlas-private-storage` and `atlas-forgejo-storage`, locking the filesystem and causing severe service restart loops (`evidence/machine1_core_baseline_2026-09-24.md`). Secure Boot was restored and must remain **ENABLED** at all times. +> **HISTORICAL (2026-09-24): do not flip Secure Boot without re-sealing the TPM stores.** +> On Machine 1, turning Secure Boot off alters TPM PCR 7. On the historical 2026-09-24 first-boot test, changing PCR 7 prevented the TPM from unsealing the volume encryption keys for `atlas-private-storage` and `atlas-forgejo-storage`, locking the filesystem and causing severe service restart loops (`evidence/machine1_core_baseline_2026-09-24.md`). Secure Boot was restored then; as of 2026-10-01 it is OFF for development by owner decision (see note above). > > The native AIENOS boot images (`aienos-handoff.efi`, `aienos-boot.efi`) are not currently signed by a key enrolled in Machine 1's UEFI database (`db`). Direct execution under Secure Boot will fail with `Secure Boot Violation` (`evidence/gate1_machine1_selftest_2026-09-24.md`). > @@ -22,7 +25,7 @@ HARDWARE_QUALIFICATION_BLOCKED_BY_TRUST_CHAIN ## 2. Hard Invariants & Safety Constraints -1. **Secure Boot Enforced:** Machine 1 must report `SecureBoot enabled` (`/sys/firmware/efi/efivars/SecureBoot-*` byte 4 == 1). Any tool or procedure attempting to disable Secure Boot fails closed. +1. **Secure Boot (release only):** a release gate requires `SecureBoot enabled`; during development (OFF since 2026-10-01, owner decision) the state is only recorded. For a release, Machine 1 must report `SecureBoot enabled` (`/sys/firmware/efi/efivars/SecureBoot-*` byte 4 == 1). Any tool or procedure attempting to disable Secure Boot fails closed. 2. **Permanent BootOrder Immutable:** `BootOrder` must not be modified. Linux (Ubuntu GRUB/shim, `Boot0001`) remains the permanent, unchallengeable default. 3. **One-Time Staging Only:** Candidates are invoked strictly via UEFI `BootNext`. Firmware deletes `BootNext` upon boot. 4. **Zero Persistent Storage Mutation:** Candidate execution must not write to Linux root (`/dev/nvme0n1p2`) or alter the EFI System Partition (`/dev/nvme0n1p1`) outside of the staging scratch directory `\EFI\AIENOS`. diff --git a/docs/NATIVE_BOOT_ROLLBACK_CONTRACT.md b/docs/NATIVE_BOOT_ROLLBACK_CONTRACT.md index 587656be..74bf02e5 100644 --- a/docs/NATIVE_BOOT_ROLLBACK_CONTRACT.md +++ b/docs/NATIVE_BOOT_ROLLBACK_CONTRACT.md @@ -20,7 +20,7 @@ Under no circumstances—whether normal completion, kernel panic, CPU exception, - The primary operating system (e.g. Ubuntu Linux under GRUB/shim on Machine 1, or default reference OS in QEMU) is represented by persistent boot variable `Boot0001` (or existing default `BootCurrent`). - The UEFI `BootOrder` variable lists default entries in priority order (e.g. `0001,0003`). - The default boot configuration is immutable with respect to candidate execution. - - Secure Boot state remains enabled (`SecureBoot=1`). + - Secure Boot state is unchanged across the run. It is OFF for development as of 2026-10-01 (owner decision) and is recorded as an observed fact; a release gate requires `SecureBoot=1`. - TPM PCR policies and sealed volume secrets remain intact. 2. **One-Time Candidate Selection:** diff --git a/docs/SEED0B_MACHINE1_QUALIFICATION.md b/docs/SEED0B_MACHINE1_QUALIFICATION.md index abc5216a..75c47142 100644 --- a/docs/SEED0B_MACHINE1_QUALIFICATION.md +++ b/docs/SEED0B_MACHINE1_QUALIFICATION.md @@ -25,7 +25,7 @@ enrolls no key, and it changes no trust state. 1. **TRUST-1 owner-signed boot chain** ([#40](https://github.com/aien-dev/aienos/issues/40)). Native Machine 1 boots are paused by operator decision (2026-09-24): turning Secure Boot off changes TPM PCR 7 and breaks the secrets sealed - to it. **Secure Boot stays on.** The qualification image must therefore + to it. **Secure Boot was kept on at the time of this decision. Update 2026-10-01: Secure Boot is OFF for development by owner decision; the TPM stores were relocked under PCR 7 with it off (`~/handoffs/secure-boot-off/after-restart.sh`). A release image must still be signed by the TRUST-1 chain.** The qualification image must therefore be signed by the owner-controlled chain TRUST-1 defines. Do not disable Secure Boot, enroll the test keys, or relax any other mechanism to run this step.