ident
All repositories: gitoria
4.8 KB
# Mission 006 (old 010) — ident per-IP limit + deploy scripts for ident and ticketsOne-shot worker. The architect (Claude Code on Byrodin) verifies your report and does the first realdeploy to Byrodin himself. You do NOT touch Byrodin.## Read first1. `loreana:/media/STORAGE/projects/ident.worldapi.org/` `CONCEPT.md`, `README.md`, `STATUS.md`.2. `loreana:/media/STORAGE/projects/tickets.worldapi.org/` `README.md`, `STATUS.md`.3. `/CONTAINERS/projects/antcolony/README.md` — "Conventions for all apps", "Lessons learned".4. How notes.worldapi.org runs on Byrodin (the model): `/CONTAINERS/projects/notes.worldapi.org/README.md`and `docker-compose.yml` (debian:12-slim, host network, app on 127.0.0.1:<port>, nginx proxies it,TLS ends at nginx; the manifest declares NO baseUrl and NO tls — README explains why).## Hybriel (standard block)Read `/CONTAINERS/projects/antcolony/docs/hybriel-for-app-workers.md` first. Report new Hybriel findingsunder "Hybriel issues"; do not edit that guide.## Part 1 — ident: per-IP limit for code requestsToday the only limit is per email address (3 codes / 10 min), so a public ident could be used to mailmany addresses. Add a limit per client IP on code sends (your numbers; list them).- **Client IP source**: behind nginx on Byrodin every request carries **`X-Client-IP`**, set by nginx(`/CONTAINERS/web/nginx/conf.d/cloudflare-client-ip.conf`): the CF-Connecting-IP when the requestreally came through Cloudflare, else the TCP peer. nginx always overwrites what a client sends, soident trusts `X-Client-IP` and nothing else (never `CF-Connecting-IP` / `X-Forwarded-For` directly).- Without the header (dev on Loreana, no nginx): fall back to the connection's peer address if hl:webexexposes one, else one shared bucket — say which.- Both the web face and any API that triggers a mail are covered. Refusals are visible to the user.- Gate: extend with per-IP cases (two IPs via the header, the limit hits one, not the other; theheader can't be bypassed by sending another IP header). Mail only into the sink.## Part 2 — deploy readiness for BOTH appsTarget on Byrodin (the architect creates it on first deploy):| app | Byrodin folder | container | port (127.0.0.1) ||---|---|---|---|| ident | `/CONTAINERS/projects/ident.worldapi.org` | `ident.worldapi.org` | 45002 || tickets | `/CONTAINERS/projects/tickets.worldapi.org` | `tickets.worldapi.org` | 45003 |For each app:1. A `docker-compose.yml` in the app folder (notes pattern: `debian:12-slim`, `network_mode: host`,`restart: unless-stopped`, whole folder mounted, runs the vendored `bin/hybriel`). The app must bind**127.0.0.1** on Byrodin (check how: HL_HOST or the app's own env; make it configurable, defaultunchanged for dev). Port via env.2. A `deploy.sh` run ON LOREANA: refuses to run if any gate fails (or takes `--skip-tests`, loud);rsyncs the code to `[email protected]:<Byrodin folder>` — **excluding** `storage/`, `.sessions/`,`.env`, `.scratch/`, `server.*`, `testapp/`, logs; then restarts the container over ssh(`docker compose up -d` / `restart`); then checks the public URL answers 200. Print every step.Loreana's ssh to Byrodin: see ident STATUS (`ssh -F /dev/null [email protected]` may be needed).**Write it, check it with `bash -n` and a `--dry-run` mode (rsync -n, no restart) — do NOT run itfor real and do NOT connect to Byrodin.** Dry-run output against Byrodin is also not allowed; testthe dry-run against a local target directory instead (make the target configurable).3. Behind a TLS-terminating proxy: make sure nothing emits `http://` absolute URLs and cookies stillwork on https (notes' lesson). Check ident's session cookie and the selector/CORS code with an`https://tickets.worldapi.org` origin in mind (apps registered with https origins).4. README of each app: "Deploy" section (first deploy is done by the architect; later: `./deploy.sh`).## Mail — IMPORTANT (unchanged)ident's dev server on :8351 sends **real mail**. Never trigger an OTP on :8351. Gates use their ownservers with `IDENT_MAIL_SINK`. **Do not read, print, copy or edit any `.env`.**## Rules- No git. Only kill your own PIDs or the named pid files. Clean up headless Chromes. Scratch in theapp's `.scratch/`. Do NOT POST to the live tickets server. Only ever open COPIES of mpackdb stores (#40).- If any action is refused by the permission system, don't retry or work around it; report it.- All existing gates of both apps must stay green. Restart the dev servers at the end as before(ident: `server.pid`, `testapp/testapp.pid`; tickets: `server.pid`) and check 200.- Update `README.md` / `STATUS.md` of both apps. 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
- d69665f6|||PR ident#34 part 3: shared look classes (wide, avatar, chip/used, conn, choose, who, inboxlink) moved to statics or droppedmre
- 3a64dc48ident#34: chipLook: radius as the same var() string (a bare token name in a static does not compile); selector gate selectormre
- eb039073ident#34: tests: signin and migration find the choice without the classmre
- 4b94a594ident#34: tests: fix selector of the identity choicemre
- bebc88e4ident#34: main.hl drops the unstyled classes inboxlink and whomre
- b4e7ad04ident#34: the identity choice link/button has no class (rule on #chooselist a)mre
- 3c33d6eaident#34: the connection link in inbox has no class (rule on #conns a)mre
- dc97ec0dident#34: the Notif. chip and the Used in link share chipLook (Style.pChip) instead of the classes chip/used/notifmre
- 378bd432ident#34: the identity picture look is a static in styles.hl (Style.pAvatar); sizes stay with each listmre
- 1cf79e7eident#34: the wide page column is a static in styles.hl (Style.pWide), not the class "wide"mre
- ddc7d135Merge branch 'f7-hooks' into mainIdent
- eee0b513|||PR ident#34 part: test-hook classes replaced by name/element/attribute selectors (tests adjusted), the shared lead/message/notice looks are statics in styles.hlmre
- ccd6d0c4ident#34: browser gate: rowButton finds the row's button by namemre
- 24dd414eident#34: the shared lead, message and notice looks are statics in components/styles.hl, imported by the components (lib/looks.hl gone)mre
- 03ed26c7ident#34: access.hl: the remaining lead classes droppedmre
- 1d066c42ident#34: access.hl drops its unstyled lead class (the shared lead rule would otherwise mute it)mre
- 1e1dd7b4ident#34: the access page keeps its lead class string (the page has no ident-card, so its lead line was never muted; a shared rule would change the look)mre
- 89ac6553ident#34: the lead, message and notice lines are named with Style.pLead / pMessage / pNotice (shared bodies in lib/looks.hl) instead of class stringsmre
- e84be3deident#34: browser gate lists the Edit/Delete buttons by namemre
- fb7111faident#34: access page: unstyled test-hook classes (idrow, never, who, whoname, appname, neverrevoke) dropped; the tests use element/name selectorsmre