Host-injected auth context loses user.role/organization in child dev:ssr stacks — role/org-gated plugin RPCs 403 (seeded-session suites red through rc.17)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- authentication, backend-api-design, devops
Direzione di ricerca
Start by tracing the host's per-request auth-context injection from the resolved session into child plugin oRPC procedures, then compare the injected role and organization fields with the get-session response and the role-gated getDiscoveryStudio failure. The issue also asks for a design decision on pinning the dev host slot or providing a local-host runner. Done means child dev:ssr stacks receive the session's role and organization context, and a host-pinning approach is defined; no relevant source files or tests are named.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
Follow-up to #527 (closed by the rc.16 null-session fix — that cleared the 307 wall; authed routes now render in child dev:ssr stacks). The remaining half is still red: the host resolves the session but injects a request context without user.role / organization into the child plugins' oRPC procedures. Every role/org-gated procedure 403s, so every seeded-session browser test times out at ~15s. Still reproduces against the rc.17-pinned host (parent republished bos.config.json 2026-10-21 15:47 UTC; host pin manifest gitSha 553a9b2 = the v2.0.0-rc.17 release commit).
Evidence (citynode.app child, extends: bos://dev.everything.near/everything.dev)
- The session is valid and fully resolvable —
get-sessionvia curl returns the full session withrole: "admin"(see #527 repro; still true post-rc.16). - Authed pages render and the client fires data calls — so the 307 wall is gone. But the server-injected context disagrees with the session:
POST /api/rpc/getDiscoveryStudio → 403(Forbidden / Code: FORBIDDEN). The child handler isrequireCurator(context): a missing user failsUNAUTHORIZED; a resolved user without admin/curator failsFORBIDDEN. We observe FORBIDDEN — a user was injected, but not as admin.getDiscoveryStudiois called from the shell layout (use-shell-nav) on every authed page — the client session says admin, the injected context says otherwise.- Org-gated procedures (
requireTenantOwnedByOrg,authorizeNodeAccess) fail the same way; org-switcher specs (needorganization.activeOrganizationId) all fail. - Result: every seeded-cookie spec fails; every signed-out spec passes. Local run 2026-10-21 16:21 UTC (everything-dev rc.17 + the rc.17-pinned host): 55 ✘ / 3 ✓.
- Timeline (child CI on main):
- Green 2026-10-19 (run 39255126057) against the then-current parent host.
- The parent redeployed the host between Oct 19–20. First-red run 39509211093 (2026-10-20 22:35 UTC) shows the skew phase:
[SharedIdentity] Refusing to load plugin "@everything-dev/auth-plugin": shared dependency version skew. every-plugin: expected 3.0.0-rc.9 (from this runtime), got 3.0.0-rc.6→ "Serving without the API: all /api/* routes return 503" (fast total failure). - After the child upgraded (rc.14 → rc.15 → rc.17; every-plugin rc.9/rc.10), plugins load again — but the auth-context failure persists through rc.17. So the regression was introduced host-side with the rc.13-era host and is not covered by the #527 fix.
- The child dev stack composes the parent's production host:
[Config] Could not load local target for "app.host", using production→https://cdn.everything.dev/bundles/dev.everything.near/everything.dev/host/with the parent's SRI pin. The child'splatformpin does not control the dev host slot.
Expected
The host's per-request auth-context injection (session → user.role, organization.activeOrganizationId / member.role) matches what get-session returns, for child plugin oRPC procedures in dev remote-host composition.
Design ask: make the dev host slot pinnable / self-contained for child CI
A child's app.host development target resolves "production" — the CDN serves only "current" root files (overwritten per deploy); versions/*.json entries are metadata, not addressable bundles; and there is no local-host target a child can run (children have no host workspace). Consequences: child dev:ssr CI breaks whenever the parent redeploys (this incident — red since Oct 20 for reasons invisible in the child's diff), and a child cannot pin the host to its platform release. Per ADR 0034 ("one pin, everything derives"), consider:
- serving versioned host bundle URLs, with the child dev stack resolving
app.hostfrom the pinned platform release manifest, or - a first-class local-host runner in everything-dev (so
host: { development: "local:…" }works for children without a host workspace).
Either would have contained this regression to the parent's own CI instead of failing every child's browser suite.
Repro
- citynode.app:
pnpm run test:regression:browser:dev:ssr— seeds an admin session (admin + member cookies viacreateAuthTestInstance), loads/admin, expects role-gated sections; the shell'sgetDiscoveryStudio403s and sections never render. - Any child dev:ssr stack with seeded-cookie sessions composed against the remote parent host.
- Lingua principale
- TypeScript
- Stelle
- 5
- Fork
- 3
- Merge medio
- 9h 55m
- PR unite (30g)
- 108
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di NEARBuilders/everything-dev
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
NEARBuilders/everything-dev#400 ·
I maintainer di solito rispondono entro 1 giorno
-
Parent runtime republished with react 19.2.9 shared deps breaks rc.16-pinned children (SSR composition fails)Forse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
NEARBuilders/everything-dev#546 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 54/100
NEARBuilders/everything-dev#545 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
NEARBuilders/everything-dev#526 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
NEARBuilders/everything-dev#518 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di NEARBuilders/everything-dev
Issue simili
-
area:agent-view area:tui bug platform:macos
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
anthropics/claude-code#104558 ·
I maintainer di solito rispondono entro 1 giorno
-
updater
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
UniversityOfHelsinkiCS/oodikone#5141 ·
-
maintanance
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
inmanta/web-console#7606 ·
I maintainer di solito rispondono entro 1 giorno
-
bug skills
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
equinor/fusion-framework#5846 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 74/100