diff --git a/specs/epics/lumen-payload-cms/README.md b/specs/epics/lumen-payload-cms/README.md index def415f..a7a5c3f 100644 --- a/specs/epics/lumen-payload-cms/README.md +++ b/specs/epics/lumen-payload-cms/README.md @@ -31,6 +31,7 @@ read. | Decisions locked | (1) Payload is a deployable **beside** the fleet, not a bounded context inside it. (2) It reads through its **own cache-disabled Hyperdrive config**. (3) Its schema is **SQL in the `db-migrate` lane**, in schema `cms`. (4) Payload is pinned to **3.89.0**. (5) The admin is **closed by default**; the owner opens it. | | Gate | PC1 and PC2 are invisible (a database path and a schema). PC3 is the first visible change: `/admin` and `/health` answer on stage and prod. | | Shipped as | sourceplane/lumen-payload#6 (spec), #7 (database path), #8 (schema), #9 (the CMS), #14 (the record), #15 and #16 (media on R2) | +| Superseded in part | Decision (1): `lumen-payload-console` (PX) makes the Payload admin the console, signed in with Lumen accounts. Everything else here stands. | ## Read order diff --git a/specs/epics/lumen-payload-console/IMPLEMENTATION-STATUS.md b/specs/epics/lumen-payload-console/IMPLEMENTATION-STATUS.md new file mode 100644 index 0000000..b3a9b86 --- /dev/null +++ b/specs/epics/lumen-payload-console/IMPLEMENTATION-STATUS.md @@ -0,0 +1,17 @@ +# lumen-payload-console (PX) — Implementation status + +As-built ≠ intent. This file records what actually shipped, and every place +the code departed from `design.md`. + +| Milestone | State | PR | +|---|---|---| +| PX0 — the spec | In review | — | +| PX1 — Lumen sign-in | Not started | — | +| PX2 — your account and organization | Not started | — | +| PX3 — billing and plan | Not started | — | +| PX4 — the front door | Not started | — | +| PX5 — the record | Not started | — | + +## Departures from the design + +None yet. diff --git a/specs/epics/lumen-payload-console/README.md b/specs/epics/lumen-payload-console/README.md new file mode 100644 index 0000000..2b5344f --- /dev/null +++ b/specs/epics/lumen-payload-console/README.md @@ -0,0 +1,51 @@ +# Epic: lumen-payload-console (PX) + +**Opening lumen-payload today shows Lumen's console (organizations, projects, +usage, settings), and Payload sits beside it at its own URL with its own +accounts. This epic makes Payload the console: the product URL opens the +Payload admin, a Lumen account signs you in with no second password, and the +Lumen pages the product actually serves in Solo mode (your account, your +organization, billing and plan, notifications, security activity) become pages +inside the Payload admin. The idea that makes it small enough: Payload's +custom auth strategy delegates sign-in to Lumen's identity plane through +`api-edge`, server to server, so the Lumen session never reaches browser +JavaScript; and Payload's custom admin views render Lumen's account surface +inside the admin, calling the same API the console calls today.** + +This follows the recommendation of the CMS research (orun-cloud +`ai/proposals/cms-landscape-comparison-2026-10-24.md` §9.3 and §9.5): Payload +generates its own admin, so `web-console-next` is not reused, and identity is +delegated through a custom strategy. It also corrects a decision of +`lumen-payload-cms`, which put Payload *beside* the console (its decision 1); +the CMS, its schema and its media stay exactly as that epic built them. + +## Status + +| Field | Value | +|-------|-------| +| Status | Proposed | +| Cluster | **PX** (PX0–PX5) | +| Owner(s) | `apps/cms` (the console now) · `apps/identity-worker` (its OAuth return allowlist) · `apps/web-console-next` (retired to a redirect) · `packages/db` (one migration) | +| Builds on | `lumen-payload-cms` (PC0–PC5) and Solo mode (`specs/profiles/solo-m0.md`) | +| Changes | The CMS gains Lumen sign-in and the account pages; the Lumen console's URL redirects to the CMS. api-edge and every bounded-context worker are unchanged. | +| Decisions locked | (1) The **Payload admin is the console**; the Lumen console UI is retired to a redirect. (2) **Lumen identity is the only sign-in**: Payload's local strategy is off. (3) The CMS calls `api-edge` **server to server**; the Lumen session lives only in an httpOnly cookie on the CMS host. (4) **Roles stay Payload's**: a new account is *pending* until an admin grants editor or admin, and the first admin still needs the owner's setup token. (5) Only the **Solo-mode surface** moves; what Solo mode hides at the edge stays hidden. | +| Gate | PX1 is the first visible change: `/admin` asks for a Lumen sign-in on stage and prod. PX4 is the one users notice: the product URL opens Payload. | +| Shipped as | — | + +## Read order + +1. `design.md` — sign-in, the strategy and the session, roles, the pages, the front door, security, what is out of scope +2. `implementation-plan.md` — the milestones and what "done" means for each +3. `risks-and-open-questions.md` — what could go wrong and what was decided +4. `IMPLEMENTATION-STATUS.md` — what actually shipped (kept distinct from intent) + +## Milestones at a glance + +| Milestone | What it lands | Done when | +|---|---|---| +| PX0 — the spec | this doc set | merged to `main` | +| PX1 — Lumen sign-in | the `lumen` auth strategy, the sign-in page (email code, GitHub, Google), the session cookie, account mapping and pending accounts (migration `206_cms_lumen_identity`), sign-out | on stage, an email-code sign-in lands in the admin as *pending*; with setup opened it lands as admin; sign-out revokes the Lumen session | +| PX2 — your account and organization | Profile, Security activity, Organization and Notifications as admin pages | on stage, a signed-in user edits their display name and notification settings from the admin and reads their organization and security events | +| PX3 — billing and plan | Billing & plan in the admin: summary, entitlements, invoices, change plan, the provider's portal | on stage, the page shows the plan and opens checkout and the portal | +| PX4 — the front door | the Lumen console URL redirects to the CMS; the CMS root opens the admin; product URLs, OAuth return and billing return point at the CMS; branding | opening `lumen-payload-web-console-next-` lands in the Payload admin on stage and prod | +| PX5 — the record | operations guide, component docs, AGENTS.md, status | the status file reads shipped | diff --git a/specs/epics/lumen-payload-console/design.md b/specs/epics/lumen-payload-console/design.md new file mode 100644 index 0000000..57d2a7c --- /dev/null +++ b/specs/epics/lumen-payload-console/design.md @@ -0,0 +1,230 @@ +# lumen-payload-console — design + +## 0. What changes, and what does not + +Today a visitor to lumen-payload meets two products: + +| | URL | Accounts | What it shows | +|---|---|---|---| +| The Lumen console | `lumen-payload-web-console-next-` (the product URL in `intent.yaml`) | Lumen accounts, a 30-day bearer token in `localStorage` | Solo mode: the personal organization's settings, billing and plan, notifications; the account and its security activity | +| The Payload admin | `lumen-payload-cms-/admin` | its own `cms.users`, a password, a `payload-token` cookie | pages, posts, categories, media | + +After this epic there is one: the Payload admin, at the product URL, signed in +with a Lumen account, with the Lumen pages inside it. What stays: + +- **Every worker behind `api-edge`**, and `api-edge` itself. The CMS becomes one + more client of the public API, like the console was. Identity, membership, + billing and notifications keep their rules; nothing is re-implemented in + Payload. +- **Solo mode.** `api-edge` keeps suppressing projects, usage, members, + invitations, API keys, webhooks and integrations, so none of them is ported. +- **The CMS as `lumen-payload-cms` built it:** its Hyperdrive config, schema + `cms`, media on R2, its collections and their access rules. +- **One content space per deployment.** This is a customer-owned deployment + (proposal §16): staff of the one product edit one site. Separate content per + Lumen organization is out of scope (§8). + +## 1. Sign-in + +Payload's local strategy is turned off (`auth.disableLocalStrategy: { +enableFields: true }` on `users`, so no column changes), which removes the +password form, `first-register` and password reset. The admin's login view is +replaced (`admin.components.views.login`) by **Sign in with your Lumen +account**: + +| Way | Steps | +|---|---| +| Email code | The page calls `api-edge` from the browser, as the console does: `POST /v1/auth/login/start {email}`, then `POST /v1/auth/login/complete {challengeId, code}` → `{token, expiresAt, user}`. The page posts the token once to the CMS's `POST /auth/lumen/session` and forgets it. | +| GitHub, Google | `GET /v1/auth/oauth/providers` lists them. The button navigates to `api-edge` `/v1/auth/oauth//start?return_to=/auth/lumen/callback`. identity-worker redirects back to `/auth/lumen/callback#token=…`; that page reads the fragment, removes it from history, and posts the token to `/auth/lumen/session`. | + +Why the browser and not the CMS server: `api-edge` rate-limits unauthenticated +auth calls per client IP. Proxied through the CMS Worker, every sign-in would +share one bucket. So sign-in stays where it is today. `api-edge` CORS gains +the CMS origin, and identity-worker's `OAUTH_ALLOWED_CONSOLE_ORIGINS` gains the +CMS origin for the return. + +`POST /auth/lumen/session` (CMS route, same origin only): + +1. It validates the token with `GET /v1/auth/session` (bearer) and gets `{session, user}`. +2. It sets **`lumen_session`** = the token, `HttpOnly; Secure; SameSite=Lax; Path=/`, + with `Max-Age` up to the Lumen session's own expiry (30 days). The cookie is + host-only on the CMS host, and nothing else stores the token. +3. It answers `303` to the `redirect` the admin asked for, which must be a + relative path under `/admin`. + +**Sign-out** (`POST /auth/lumen/logout`, which the admin's logout button +posts to): + +1. It calls `POST /v1/auth/logout` with the token, which revokes the session + server-side, unlike most of today's console, which only forgets it. +2. It clears the cookie. +3. It answers `303` to `/admin/login`. + +## 2. The strategy and the session + +`users.auth.strategies = [lumen]`. On every request the admin, REST and +GraphQL make, the strategy: + +1. Reads `lumen_session` from the request's cookies. If there is none, it returns `{ user: null }`. +2. Resolves it with `GET /v1/auth/session` over a **service binding** + (`LUMEN_API` → `lumen-payload-api-edge-`). That call is authenticated, + so `api-edge` rate-limits it per token, and it never leaves Cloudflare. +3. Caches the answer per isolate for **30 seconds**, keyed on + `sha256(token)`, the same window `api-edge` uses for its own actor cache. A + revoked session stops working within 30 seconds. +4. Maps the Lumen user to a `users` row (§3) and returns + `{ ...doc, collection: 'users', _strategy: 'lumen' }`. + +The token is never put on `req.user`, because Payload hands `req.user` to the +browser. The account pages read the cookie themselves (`lumenTokenFrom(req)`, +server only). + +## 3. Accounts and roles + +`users` gains **`lumenUserId`** (`usr_…`, unique, read-only), and `role` +becomes optional with no default: an account with **no role is pending**. Both +come from migration `206_cms_lumen_identity`, converted like every CMS +migration. A new enum value is avoided on purpose: db-migrate runs each +migration in one transaction, and Postgres refuses to use an enum value added +in the same transaction (for example as a column default). Mapping a signed-in +Lumen user: + +1. **A row with that `lumenUserId`:** that is the user. +2. **A row with the same email and no `lumenUserId`:** link it. This covers + accounts made before this epic; stage and prod have none. +3. **Otherwise:** create one with `email`, `name` (the Lumen display name) and + `lumenUserId`. + - If **no admin exists and the request carries a valid setup cookie**, the + role is `admin`. The owner opens setup with `CMS_SETUP_TOKEN`, exactly as + today. + - Otherwise it has no role: pending. + - The same rule promotes an existing *pending* user who signs in through + setup while there is still no admin. + +`access.admin` lets in `admin` and `editor` only. A pending user who signs in +sees a short page, *Signed in as … — an admin has to give you access*, with a +sign-out button; that is Payload's `unauthorized` view replaced. Admins change +roles in *Users*, as before. Signing up for Lumen therefore never grants access +to anyone's content. + +The existing `firstUserGate` and `firstUserIsAdmin` hooks go: they guarded +`first-register`, which no longer exists. Their rule (the first admin needs +the setup token) moves into step 3. + +## 4. Lumen pages inside the admin + +Each page is a custom admin view: a server component that checks `req.user` +and `canAccessAdmin` itself (Payload does not for custom views), renders inside +Payload's `DefaultTemplate` (nav, header), and calls `api-edge` server-side +with the cookie's token through `@saas/sdk`. They appear under an **Account** +group in the nav (`admin.components.afterNavLinks`). + +The pages and the `api-edge` calls behind them: + +| Page | Path | Reads | Changes | +|---|---|---|---| +| Profile (replaces Payload's `account` view) | `/admin/account` | `GET /v1/auth/profile` | display name: `PATCH /v1/auth/profile` | +| Security activity | `/admin/account/security` | `GET /v1/auth/security-events?cursor` | — | +| Organization | `/admin/organization` | `GET /v1/organizations` (Solo: the one personal org) | — (renaming is not in the API) | +| Notifications | `/admin/organization/notifications` | `GET /v1/notifications/preferences?orgId` | `PUT /v1/notifications/preferences` | +| Billing & plan | `/admin/organization/billing` | `GET O/billing/{summary,entitlements,invoices,plans}` | `POST O/billing/{checkout,portal,reconcile}`, `POST O/billing/subscription/{change,cancel}` | + +`O` is `/v1/organizations/:orgId`. + +Changes go through CMS route handlers under `/lumen/…`. The page's form posts +to them, and each handler: + +- accepts only same-origin requests (the `Origin` header must be the CMS); +- accepts only a Payload user with access; +- calls `api-edge` with the token and answers `303` back to the page, with a + status line. + +Checkout and the portal answer with the payment provider's URL; the handler +redirects there, and the provider returns to the billing page. The billing +return goes from the console root to the CMS billing page (PX4). Read-only +data is fetched per request, with no cache: these pages are low-traffic and +must show the truth. + +The console's pure, unit-tested models are reused where they are framework-free: +- `billing/plan-actions.ts` +- `notifications/preferences.ts` +- `security/security-events.ts` +- `account/profile.ts` + +Its React components are not: Payload's admin is `@payloadcms/ui` and SCSS, +not Tailwind and Radix. + +## 5. The front door + +- **The CMS root** `/` redirects to `/admin`. The CMS's own landing page goes; + `/admin` keeps its path, which is smaller than moving Payload's generated + routes to the root. +- **The Lumen console** keeps its Worker name and URL and answers every path + with a `308` to the same path's place in the CMS: `/` and anything unknown + go to `/admin`, and `/auth/callback` goes to `/auth/lumen/callback` + (fragment kept by the browser). Bookmarks and old links land in Payload. Its + UI and tests are removed in the same change. The parked + `cloudflare-domain` component, which depends on the console Worker, is + pointed at the CMS. +- **The product URL** in `intent.yaml` (`stage.url`, `prod.url`) becomes the + CMS URL. +- **The billing provider's fallback return** (`POLAR_SUCCESS_URL`) becomes + the CMS billing page. +- **Branding.** The admin's title reads *Lumen Payload* + (`admin.meta.titleSuffix`), and its logo and icon are the product's mark, + from `.rebrand/values.json` (read, not edited). + +## 6. Security + +- **Custody of the Lumen token.** It is in browser memory only for the moment + between sign-in and the post to `/auth/lumen/session`, which is shorter than + today, where `localStorage` keeps it for 30 days. After that it lives in an + httpOnly cookie on one host, is sent to `api-edge` only by the CMS server, + and never appears on `req.user` or in logs. +- **CSRF.** The cookie is `SameSite=Lax`. Payload's `csrf` allowlist is set to + the CMS origin; it is empty today, which accepts cookie auth from any + origin. Every `/lumen/…` and `/auth/lumen/…` POST also checks `Origin`. + Sibling Workers on `nexo-7be.workers.dev` share the site, so SameSite alone + would not separate them. +- **identity-worker has no public URL** (sourceplane/lumen-payload#20). The + strategy relies on `api-edge` being the only way in. +- **Stage hands out sign-in codes** (`DEBUG_DELIVERY=true`). On stage anyone + can sign in as any email. That only ever yields a *pending* account, and + stays a stage property. +- **The request-scoped Postgres pool** (`requestScopedPg`) is unchanged. The + strategy's lookups use `req.payload` like everything else. + +## 7. Verifying it + +On stage, through the API and a browser: + +1. `/admin` redirects to the Lumen sign-in page; a password form is nowhere. +2. An email-code sign-in (stage returns the code) lands on the *pending* page. +3. With setup opened (`/setup?token=…`), the same sign-in lands in the admin + as admin. A second account signs in as *pending*, and the admin makes it an + editor. +4. Profile: the display name changes in the admin and `GET /v1/auth/profile` + shows it. +5. Billing & plan shows the plan, and *Manage plan* reaches the provider. +6. Sign-out: `GET /v1/auth/session` with the old token answers 401. +7. The Lumen console URL lands in the Payload admin. + +Prod is verified read-only: the sign-in page renders, `/health` is ok, and the +console URL redirects. + +## 8. Out of scope + +- **What Solo mode hides**: projects, environments, usage and quotas, members + and invitations, API keys, webhooks, integrations, audit. They stay off at + the edge; turning Solo mode off is its own decision, and would bring them + back as more admin pages. +- **Config** (settings, feature flags, secrets) is reachable in Solo mode and + the console shows it; it is a later admin page. +- **Content per Lumen organization** (a hosted multi-tenant CMS, proposal + §11). This deployment has one content space. Scoping collections by + organization is a separate epic with its own isolation questions + (`payloadcms/payload#17335`). +- **The LMS** (`multi-tenant-saas-2`) inherits this in its own epic. Its + learners keep their own `learners` accounts; only staff move to Lumen + sign-in. +- **A custom domain.** Everything stays on workers.dev. diff --git a/specs/epics/lumen-payload-console/implementation-plan.md b/specs/epics/lumen-payload-console/implementation-plan.md new file mode 100644 index 0000000..33f6be7 --- /dev/null +++ b/specs/epics/lumen-payload-console/implementation-plan.md @@ -0,0 +1,100 @@ +# lumen-payload-console — implementation plan + +Each milestone is one task with its contract in `tasks/`, one pull request, and +a live check after its merge. One milestone is in flight at a time. The order +keeps the product usable throughout: Payload gains the Lumen pages first, and +the console URL moves only in PX4, once everything the console showed is in +the admin. + +## PX0 — the spec + +This doc set. **Done when** it is on `main`. + +## PX1 — Lumen sign-in + +- `users`: + - `auth.disableLocalStrategy: { enableFields: true }` and the `lumen` strategy + - `lumenUserId` + - `role` optional with no default (no role means pending) + - `access.admin` for admin and editor only +- Migration `206_cms_lumen_identity`, converted from Payload's migration. +- The sign-in view (email code, GitHub, Google), `/auth/lumen/callback`, + `/auth/lumen/session` and `/auth/lumen/logout`. +- The pending page (Payload's `unauthorized` view replaced) and the logout + button. +- The setup rule moves into account provisioning; `firstUserGate` and + `firstUserIsAdmin` go. +- Wiring: the `LUMEN_API` service binding and Payload's `csrf` allowlist. +- In other components: + - `api-edge` CORS and identity-worker `OAUTH_ALLOWED_CONSOLE_ORIGINS` gain + the CMS origin + - `tests/api-edge` and `tests/identity-worker` cover the new origin +- `tests/cms` covers the strategy (cache, mapping, roles, setup rule, no token + on the user), the session route (origin check, redirect check, cookie + attributes) and logout. + +**Done when:** +- on stage, an email-code sign-in reaches the pending page; +- with setup open, it reaches the admin as admin; +- a second account is pending until promoted; +- after sign-out the old token answers 401 at `GET /v1/auth/session`; +- prod's `/admin` shows the Lumen sign-in page. + +## PX2 — your account and organization + +- Profile (Payload's `account` view replaced), Security activity, + Organization and Notifications pages. +- The *Account* nav group. +- `/lumen/profile` and `/lumen/notifications` handlers. +- The console's framework-free models (profile, preferences, security events) + are moved to a small shared module both can read, or copied with their + tests. + +**Done when**, on stage: +- the display name and a notification toggle change from the admin and read + back through the API; +- the organization and security events render. + +## PX3 — billing and plan + +- The Billing & plan page: summary, entitlements, invoices, plans. +- `/lumen/billing/{checkout,portal,change,cancel,reconcile}`, with redirects + to the provider and back. +- The provider's return lands on the page, which reconciles once. + +**Done when**, on stage: +- the page shows the current plan and invoices; +- *Manage plan* reaches the provider's portal, and *Upgrade* reaches checkout; + the provider's own pages are not driven further. + +## PX4 — the front door + +- `/` → `/admin` on the CMS. +- The console Worker becomes path-preserving `308` redirects to the CMS, and + its UI and its tests are removed. +- `intent.yaml` `stage.url` / `prod.url` → the CMS. +- `POLAR_SUCCESS_URL` → the CMS billing page. +- `cloudflare-domain` depends on the CMS. +- Branding: the title, logo and icon. + +**Done when:** +- on stage and prod, the console URL, its old paths and its OAuth callback + path land in the CMS; +- the admin's title reads *Lumen Payload*. + +## PX5 — the record + +- `ai/context/operations.md` (how to sign in, open setup, grant access, where + the account pages are). +- The CMS's docs, the console's tombstone README, AGENTS.md. +- This epic's status file. + +**Done when** the status file reads shipped. + +## Sequencing note + +PX1 changes who can reach the admin, so it lands alone and is verified before +anything builds on it. PX2 and PX3 only add pages. PX4 is the only step a user +of the old console notices, and it waits until the admin has everything the +console showed. The LMS repository (`multi-tenant-saas-2`) ports the result +afterwards, in its own epic. diff --git a/specs/epics/lumen-payload-console/risks-and-open-questions.md b/specs/epics/lumen-payload-console/risks-and-open-questions.md new file mode 100644 index 0000000..9c21ae1 --- /dev/null +++ b/specs/epics/lumen-payload-console/risks-and-open-questions.md @@ -0,0 +1,78 @@ +# lumen-payload-console — risks and open questions + +## PX-A — Payload with no local strategy has no login form (SETTLED) + +With `disableLocalStrategy`, Payload 3.89 still renders its login view but +without a form, and `first-register` and password reset answer 403. The view is +replaced (`admin.components.views.login`) by the Lumen sign-in page. +`enableFields: true` keeps the auth columns, so the schema only gains +`lumen_user_id` and a role value. + +## PX-B — Two records of a person (DECIDED) + +A person is a Lumen user (`identity.users`) and a Payload user (`cms.users`). +Lumen is the source of truth for who they are and whether they are signed in; +Payload holds only what the content plane needs (role, display name, the link). +The link is `lumenUserId`. Email is used once, to adopt a pre-existing row with +no link, and never to switch a linked row to another Lumen user. + +## PX-C — The Lumen token in a cookie (DECIDED) + +The token grants the whole Lumen account for 30 days. It moves from the +console's `localStorage`, which any script on that origin can read, to an +httpOnly, Secure cookie on the CMS host, which no script can read. The risk +left is a sibling Worker on the same `workers.dev` site reading requests to the +CMS host. A sibling cannot do that: a host-only cookie is only ever sent to the +CMS host. + +## PX-D — The strategy runs on every admin request (DECIDED) + +Payload calls `/api/users/me` on every admin page, and every REST call +authenticates. Each would be one `api-edge` round trip. The strategy caches the +session per isolate for 30 seconds by token hash, the same window `api-edge` +gives its own actor cache. + +## PX-E — Sign-in rate limits are per IP (DECIDED) + +`api-edge` limits unauthenticated auth calls per client IP. A server-side proxy +through the CMS would put every user in one bucket. Sign-in therefore stays in +the browser, as it is today, and only authenticated calls go server to server. + +## PX-F — Solo mode makes every account its own organization (ACCEPTED) + +In Solo mode each Lumen account has one personal organization with its own +billing. The Organization and Billing pages show the signed-in person's own, +exactly as the console does. For a customer-owned deployment the owner's +account is the one that pays; editors see their own (empty) plan. Revisit if +Solo mode is turned off. + +## PX-G — Stage hands out sign-in codes (ACCEPTED) + +`DEBUG_DELIVERY=true` on stage returns the email code in the API response, so +anyone can sign in to stage as any email. Through the CMS that yields a +*pending* account and nothing else. It also makes the stage check automatable. + +## PX-H — Retiring the console touches other components (OPEN until PX4) + +These depend on the console and change in PX4: +- `cloudflare-domain` (parked) depends on the console Worker; +- `api-edge` and identity-worker list its origin; +- `POLAR_SUCCESS_URL` returns to it; +- `intent.yaml` names its URL. + +The console Worker keeps its name as a redirect, so nothing that links to it +breaks. Its code and tests are removed rather than left to rot. + +## PX-I — Content per organization (OUT OF SCOPE, recorded) + +A hosted multi-tenant CMS, with each Lumen organization getting its own pages +and media, is the shape the proposal rated weakest (§11: isolation 2/5 pooled) +and the one where `payloadcms/payload#17335` becomes a cross-tenant leak. This +epic keeps one content space per deployment. If that changes, it is a new epic +with its own isolation tests. + +## PX-J — The LMS inherits (FOLLOW-UP) + +`multi-tenant-saas-2` is built on this CMS and has the same console. It ports +the result in its own epic once PX4 is live. Its learner accounts (`learners`) +are a separate auth collection and do not change. diff --git a/tasks/PX-1.TaskContract.yaml b/tasks/PX-1.TaskContract.yaml new file mode 100644 index 0000000..867c929 --- /dev/null +++ b/tasks/PX-1.TaskContract.yaml @@ -0,0 +1,14 @@ +apiVersion: orun.io/v1 +kind: TaskContract +metadata: + name: PX-1 + title: "PX0: the spec for Payload as the console" +spec: + goal: "The lumen-payload-console design set is on main: sign-in, the strategy and session, roles, the Lumen pages in the admin, the front door, security and scope." + affects: + - "specs/epics/lumen-payload-console/**" + - "specs/epics/lumen-payload-cms/README.md" + - "tasks/PX-1.TaskContract.yaml" + doneWhen: + - "the five documents are merged to main" + gates: []