oficina / home Public

Plan Oficina ID slice 1 Home implementation

Paul Campbell pushed by paul@keymail.dev 2980b39d69f7e4d5352b79b5f8dc5843a5d0dccf parent 64ff990
1 file changed, +57 −0
  • docs/superpowers/plans/2026-11-13-oficina-id-slice1-home.md +57 −0

CI cancelled — superseded by a newer push — run details

diff --git a/docs/superpowers/plans/2026-11-13-oficina-id-slice1-home.md b/docs/superpowers/plans/2026-11-13-oficina-id-slice1-home.md
new file mode 100644
index 0000000..a5cf776
--- /dev/null
+++ b/docs/superpowers/plans/2026-11-13-oficina-id-slice1-home.md
@@ -0,0 +1,57 @@
+# Oficina ID slice 1, part A
+
+Paul approved implementation on 2026-11-13. Work stays on `oficina-id-slice1`;
+no deployment or merge. Equipo and changes to its connect adapter are part B.
+
+## Tasks
+
+1. [ ] Require a new authentication gesture for `max_age=300`; add a protected,
+ fixed-label Continue page for existing sessions. Files: `exchange.go`,
+ `signin.go`, `app.go`, templates, assertion tests. Preserve the closed
+ consumer manifest and 120-second P-256 assertions.
+2. [ ] Add browser-bound, five-minute, single-use direct passkey sign-in and
+ enrollment. Require UV, exact RP/origin, stored person binding and generated
+ WebAuthn names. Keep gated legacy credentials. Files: new Home ceremony
+ handlers/migration/tests, `passkey.go`, `static/passkey.js`, templates.
+3. [ ] Implement 80-bit-or-better recovery codes, persistent atomic account/IP
+ limits, fresh mailbox/browser proof, explicit replacement and atomic
+ credential/session/code revocation. Keep the notice address only in bounded
+ memory, with retry and content-free errors. Files: recovery handlers,
+ migration, ceremony completion, tests.
+4. [ ] Preserve Keymail/platform SMTP and sealed-link storage; strengthen
+ hostile error/address scans and note the later blind-auth-store seam.
+ Make Home sign-out land locally, including directory outage behavior.
+5. [ ] Run local gates, targeted mutations, delegated copy review and Astra
+ security review. Push regularly, poll hosted CI, repair failures, and write
+ `../report.md` in the supplied clone's parent with SHA and remaining work.
+
+## Test sequence
+
+Write each behavior test and record its failure before implementation. Exercise
+virtual authenticators for direct/gated sign-in, registration, wrong origin/RP,
+missing UV, wrong browser/person/purpose, expiry and replay. Test stale and recent
+linking sessions, Keymail gesture times and account swaps. Retain assertion
+signature/audience/expiry/nonce and scriptless browser-return gates.
+
+Recovery tests cover entropy, hashed storage, parallel attempts across app
+reconstruction, account/IP budgets, code replay, mailbox/browser swaps, expired
+proofs, rollback on every replacement write, all-session/code/passkey revocation,
+and notice delivery failure/retry without rollback. Scan live SQLite/WAL/SHM,
+store objects and logs for canary addresses through all new paths.
+
+Run `make test`, then relevant browser gates. Record guard-removal mutations and
+the tests that kill them in `implementation/oficina-id-slice1-validation.md`.
+Existing consumer receipt/link/unlink/admission/pinned-key gates remain part B;
+exercise Home's issuance and local outage boundary here. A hanging issuer, not
+just a refused connection, must prove directory sign-out lands locally.
+
+## Integration choices
+
+Use Home's current `signin.Flow` plus sealed `linkStore`, opaque session subjects,
+and Rastrillo's cryptographic WebAuthn/session primitives. Do not adopt readable
+`auth_links.address`. Keep the mailbox-completion seam explicit for the later
+`blind-auth-store` release. No signing-key publication endpoint.
+
+Copy is reviewed by delegated Astra pass, per Paul's override; no review server.
+Review is source/test-only because Paul forbids deployments. Record that limit
+rather than claiming the repo's deployed-canary review requirement was met.