Repository navigation
CONDITIONS
Baseline. This re-reviews a1d4ce0a against the PASS on 167aa388 (this PR), on arch 15b603e6. The checkout has no arch-map.md, so I found the sections by search. The tree of a1d4ce0a equals the tree of e72bad32 (f9b033ef and a1d4ce0a delete and then restore the tree). pr.diff equals git diff 2505edee a1d4ce0a. In since.diff, the changes to common, minimal-client, minimal and sandbox come from the merge of main, and they are not this PR's. This PR changes one thing since the PASS: e72bad32 flips SecretServiceKey::exportable() from false to true and adds a test that asserts Custody::Refused in a release build.
Governs. Gatehouse §6.10 line 837: hardware custody is a SHOULD where the host offers it, and hardware gives no export. Line 832: the sealing key is non-exportable (hardware-backed, as line 837 describes). Principle 7, architecture.md line 337: safe by default. The repo spec 24-spec-box-egress-proxy uses that SHOULD in BEP-088 (TPM first, then Secret Service, the owner's decision of 2026-11-12). BEP-014 and BEP-059 exempt keys "in Secret Service", and line 265 calls them "the one exception". BEP-089 requires that the key loads from the store that holds it at each start. BEP-090 reports the reduced custody.
Ruling. The flag is now truthful, and that is better for audit exactness than false. But keys::custody decides only on that flag. In a release build, load_with now refuses a stored Secret Service sealing key, and it tells the operator to run bep --replace-key. The replacement generates in Secret Service again, so the refusal repeats. A host with no TPM cannot run a release proxy, which contradicts BEP-088 and BEP-089 and the SHOULD of line 837. The new test pins that refusal (rule 3). C1 keeps the truthful flag and makes custody store-aware. C2 replaces the test. The spec and the design agree, so no spec amendment or escalation is necessary.
Departure. This is not a departure from the PASS on 167aa388. That ruling accepted a Secret Service key that a release build loads. This head removes that behaviour. A return to exportable() == false also restores the behaviour that the PASS accepted. But the trait documents the flag as "whether the store lets the private half out", so C1 is the exact fix.
Not checked. I did not compile or run the tests. The store is not yet chosen at start (bep serve on Linux does not use it, BEP-088 is a later task), so the refusal is latent until that task. I could read only the first 400 characters of each earlier ruling in the ledger.
Conditions
- C1: Keep
SecretServiceKey::exportable()astrue, and make the custody rule store-aware. Incrates/bep/src/keys.rs, addfn software_store(&self) -> bool { false }toHeldKey, and override it to returntrueinimpl HeldKey for SecretServiceKey(crates/bep/src/secret_service.rs). Add the variantCustody::Software("the store holds a software key by design, BEP-088, and BEP-090 reports it"). Makecustody()returnCustody::Softwarefor a key whosesoftware_store()istrue, in both builds, before theexportable()match. Thenload_withdoes not returnStartError::Exportablefor a Secret Service key,keep_generatedkeeps it, and the debug-buildkept the proxy's {role} key although the keychain made it exportablewarning does not print for it. Update the doc comment onexportable()(secret_service.rs line 409-411) to say that custody holds the key as a software key, not that it refuses it. - C2: In
crates/bep/src/secret_service.rs, replace the testsecret_service_key_is_exportable(it assertsCustody::RefusedinBuild::Release, which pins the deviation) witha_release_build_holds_a_secret_service_key. It assertskey.exportable(), assertscustody(&key, Build::Release) == Custody::Software, and asserts thatkeys::load_withover the fakesecret-toolstore, with each key answeringBuild::Releasefrombuild(), loads a stored sealing key and returns noStartError::Exportable. Add akeys.rstest that a non-Secret-Service exportable key is stillCustody::RefusedinBuild::Release, so the macOS keychain rule stays hard.
Ruled at a1d4ce0 against gominimal/arch@15b603e6afb8 by claude-opus-5-5; arch_rulings 1217, job 057c8123-6200-4f5a-a4e0-e78d672124dc.