ident
All repositories: gitoria
4.9 KB
# Mission 003 (old 006) — ident 2/6: apps and login button (ticket #25)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. Do not add features it does not describe; where it is silent, make the smallest choiceand list it under "Questions for the creator".2. The app's `README.md` and `STATUS.md` (piece 1, mission 002 (old 005), confirmed by the creator).Note `.scratch/removed-mission003/`: the old redirect + one-time-code exchange from mission 001 (old 003) —reuse its mechanics where they fit the concept, not its data model.3. `/CONTAINERS/projects/antcolony/README.md` (section "Lessons learned").4. Ticket: `GET http://100.77.141.84:8350/api/tickets/25`.## Hybriel (standard block)Read `/CONTAINERS/projects/antcolony/docs/hybriel-for-app-workers.md` first — it lists which docs totrust, the known pitfalls with workarounds (note #31: forged face sessions), and the open hybrieltickets. 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**. Hybriel repo READ ONLY.## Scope (piece 2 of 6 only)1. **Apps**: any signed-in ident user can register apps in ident (name + the origin(s) it runs on,used to validate return URLs). Each app gets a **public API key** and a **secret** (shown once orre-viewable — your choice, list it). The user sees and manages their apps (list, edit, regeneratesecret, delete).2. **One identity id per app**: when an identity logs in to an app for the first time, ident createsthe connection with a new, app-specific identity id (not derivable from other apps' ids) andstores when it was created ("when they registered in it" — needed later for the per-app page).3. **Login button flow**: app sends the browser to ident with its API key and a return URL (returnorigin must be one of the app's registered origins, else an error page and no redirect). Notsigned in → ident login first. Signed in → the user chooses one of their identities (with only oneidentity: still show which one is used, one click). Then ident redirects back with a one-time code(short-lived, single use).4. **Exchange**: the app's server posts the code with its API key + secret and gets back **only theapp-specific identity id** — no email, no names (concept: apps ask for extra data themselves).Wrong secret, other app's code, reused/expired code → 400/401.5. A **minimal test app** (separate tiny hybriel app in `testapp/`, own port) that registers as an appand proves the whole flow, incl. that a second app gets a different id for the same identity.**Out of scope**: selector (#26), notifications (#27+), client-only apps.## Mail — IMPORTANTThe dev server on :8351 now sends **real mail** (SMTP via mail.byrod.in, set by the creator).- **Never trigger an OTP on the :8351 dev server.** Do not run `tests/dev-smoke.mjs` against it.- Your gate starts its own servers with `IDENT_MAIL_SINK` set (as the current gate does).- **Do not read, print, copy or edit `.env`** (it holds the SMTP password). If you need other settings,pass them as environment variables to your own test servers.- At the end restart the dev server (kill only the PID in `server.pid`, `setsid nohup ./bin/hybrielproject.hl >> server.log`, update `server.pid`) and check it answers 200 on `/` — without logging in.Leave your test app running on its port so the creator can try the flow; report its URL/PID.## DataThe dev store holds the creator's real account now. Back up `storage/` to `.scratch/storage-backup-<ts>/`before the restart; migrate, never wipe. After the restart verify (read-only, e.g. with a small hybrielscript against the store copy) that the account and its identities are still there.## 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 browser drives register app → login button → identlogin → choose identity → back → exchange → test app shows the id; plus negatives (foreign origin,wrong secret, reused/expired code, other app's code, face-session forging per #31).- Strict API: unknown/missing fields → 400 naming the field; invalid JSON → 400.- Screenshots at 390px and 1280px, look at them. Update `README.md` ("How apps use ident") 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
- b7a61546ident mission 013: e2e — in-place main-menu mark kept as a known gapmre
- 59b43d81ident mission 013: sign out everywhere keeps this browser's own (signed-out) session so the page goes on in placemre
- 716e14ffident mission 013: browser gate — Bob signs out everywhere (no second code request)mre
- 5885f1c9ident mission 013 step 2: stopgap reload removed (in-place sign-in/out reach the shell via emit, notices back, route-marked main menu), gates updatedmre
- 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