ident
All repositories: gitoria
5.2 KB
# Mission 004 (old 007) — ident 3/6: identity selector (ticket #26)One-shot worker. The architect (Claude Code on Byrodin) verifies your report, then the creator tests.## Read first — in this order1. **`loreana:/media/STORAGE/projects/ident.worldapi.org/CONCEPT.md`** — the creator's concept, sourceof truth. Section "Flow 2: identity selector" and "Decided 2026-09-24" are this mission. Do not addfeatures it does not describe; where it is silent, make the smallest choice and list it under"Questions for the creator".2. The app's `README.md` and `STATUS.md` (pieces 1 and 2 done and confirmed by the creator; piece 2 =apps, API key + secret, per-app identity ids, login button, `POST /api/exchange`).3. `/CONTAINERS/projects/antcolony/README.md` (section "Lessons learned").4. Ticket: `GET http://100.77.141.84:8350/api/tickets/26`.## Hybriel (standard block)Read `/CONTAINERS/projects/antcolony/docs/hybriel-for-app-workers.md` first — it lists which docs totrust, the known pitfalls with workarounds (#31 forged face sessions, #36 face names are global), andthe open hybriel tickets. Report new Hybriel findings under "Hybriel issues"; do not edit that guide.## Where- Host Loreana (`ssh loreana`, fish login shell → `bash -c '…'` or script files).- App: `/media/STORAGE/projects/ident.worldapi.org`, dev port **8351**; test app `testapp/` on **8354**.Hybriel repo READ ONLY.## Scope (piece 3 of 6)From the concept:- The app's page includes **a script from ident, configured with the app's public API key**.- The script **fetches from ident** (with credentials). ident answers with the identities of thesigned-in ident user **only if** the request comes from one of that app's registered origins andcarries its API key (CORS: exact origin + credentials, never `*`).- The selector is a **shadow-DOM element in ident's design** that the host page **can restyle**(document how: CSS custom properties and/or `::part`).- It first says **"choose ident"**. **Selecting an identity is the login**: ident hands the script a**one-time code** (same rules as the button flow's code), the script gives it to the host page (e.g. aDOM event); the **host's server exchanges it** with `POST /api/exchange` (key + secret) → per-app id.- **The host tells the selector it is logged in** (`logged-in` attribute / property). The selector setsno cookie of its own. Logout on the website = the host resets the selector.- What happens after login is up to the app: **the test app switches its frontend to logged inwithout a reload** (our apps' behaviour).Where the concept is silent (make the smallest choice, list it): what the selector shows when the useris not signed in to ident (e.g. a link into the existing login button flow); what it shows in thelogged-in state; how the host restyles it.Extend the test app (`testapp/`) to use the selector, keeping its login button too.**Out of scope**: notifications (#27+), foreign-domain / Safari-Firefox third-party cases (all ourapps are same-site; dev ports on one IP count as same-site too), client-only apps.Also, only if you can read it without being refused: fix the 2 obsolete checks in the piece-1 gate`tests/browser.mjs` (ticket #37 — they expect `/login` and `/api/exchange` to be gone; replace themwith checks of the current behaviour). If reading it is refused, leave it and say so.## Mail — IMPORTANT (unchanged)The dev server on :8351 sends **real mail**. Never trigger an OTP on :8351; don't run`tests/dev-smoke.mjs` against it. Your gate starts its own servers with `IDENT_MAIL_SINK`.**Do not read, print, copy or edit any `.env`.** At the end restart :8351 (only the PID in`server.pid`) and the test app (only the PID in `testapp/testapp.pid`) and check both answer 200without logging in.## DataThe dev store holds the creator's account and a registered app. Back up `storage/` (and `.sessions/`)to `.scratch/storage-backup-<ts>/` before the restart; migrate, never wipe. Verify afterwards(read-only, on a copy) that accounts, identities, apps and connections are still there. The testapp's own `testapp/storage/` holds the creator's key/secret setup — keep it.## Rules- No git. Don't touch other project folders. Only kill your own PIDs or the ones in ident's pid files.Clean up headless Chromes (`--disable-gpu`). Scratch in `.scratch/`.- Do NOT POST to the live tickets server (:8350).- A test is the whole process: real headless browsers — signed in to ident on the ident origin, thenthe test app's page on its own origin shows the selector with the right identities, select → code →host exchange → test app switches to logged in without reload → `logged-in` state → host logoutresets. Negatives: unregistered origin / wrong key gets no identities; signed out of ident gets noidentities; forged face sessions (#31); code reuse; a restyle by the host actually changes the look.- Strict API as before. Screenshots at 390px and 1280px (selector closed and open), look at them.- Update `README.md` ("How apps use ident": the selector snippet a host needs) and `STATUS.md`.Do NOT edit `CONCEPT.md`.## Report (final answer, this structure)```## Done## Verified (each: command run + observed output)## Not verified / open## Hybriel issues (repro, observed, expected)## Questions for the creator## Running (URL, PID, log path)```
Branches
Latest commits
- 734ac0a9ident mission 013 step 1: re-vendor Hybriel ce6f2e0a (plugins whole; bin/ is git-ignored)mre
- b37875ccident mission 012 part 3: real-Chrome fixes (brand 44 px, identity form width), e2e walk, report, logmre
- f989c2ebident mission 012: stopgap reload after in-place sign-in/sign-out (until hybriel#193), gates wait for cold start, welcome end reloadsmre
- 443291d4ident mission 012: /start on its own shell (no account), browser gate 152/0, reportmre
- 021dd0fcident mission 012: browser gate waits cold start (IDENT_COLD_MS), header selectors, e2e checks; shell events from a page do not reach it (probe), current not marked, account-bar link 44 pxmre
- 97f77b07ident mission 012 (WIP): onto the layouts theme dbe3de7, shell on AppHeader/MainMenu/UserMenu/Sidebar + ContentFirst, styles cut, check-theme gatemre
- 8e4f435bpaths: projects moved into /media/STORAGE/projects/WorldAPI/mre
- fa288f63ident mission 011: report wording (Intl zone names)mre
- 961fae01ident mission 011: report, LOG, STATUSmre
- 65348039ident#7: delivery gate — console check split at the gate's own server restart (49 checks)mre
- dfa7b783ident#7: README (Delivery, env, gate, files, data), deploy.sh runs tests/delivery.mjsmre
- ab6331f4ident#7: tests/delivery.mjs — fake clock gate: Vienna/New York/Tokyo/UTC 17:00, urgent, mail off, restart, DST days, zone changemre
- 7869f57bident#7: delivery — the daily mail at 17:00 in the user's zone (digests table, once per local day, test clock IDENT_TEST_CLOCK), urgent mailed at once, push hookmre
- 371ef1b5ident#7: lib/mail.hl sendNotificationMail (sink: <sink>.mail, one JSON line per mail)mre
- 39749e0bident#7: time zones through hl:time — server checks isZone, an account without a known zone reads as UTC, allAccountsmre
- 7a54fe72mission brief 011mre
- a6a874cdident mission 010: vendor hybriel 0f396652 (plugins + compose cache volume/tmpfs + deploy URL wait + report)mre
- 4e7cf78emission brief 010mre
- e8b2b0f7docker-compose: init: true (hybriel#156, PID 1 ignored SIGTERM, every restart waited 10 s)mre
- 5fdbb6b2ident mission 009: report — scratch folder notemre