Apply Paul's 2026-10-27 rulings to the team provisioning designs
- Ruling 8 re-ruled for Alta, conditional on CARLOS team-scoped credentials (carlos/platform branch team-scoped-credentials); Alta does not ship to production before they exist. Rejected: a separate account; accepting today's reach. - Two-key approval on every run; owner-seed over HTTP is existing-only; team labels are never reused. - Team page: owner-chosen display names, sealed, refusing "@"; unnamed members show role plus short ref; every member of a team reads the list, only owners write; privacy cost stated; no "you've been added" mail from Home. - Slides ships without uploads; team instances share the mail relay; team dashboards blank; Memoria is in the oficina account. - Roster port order: Sheets, Slides, Memoria, Calendar, Calls. - Directory roster initialization stays open as a pre-flight question.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 files changed,
+217
−155
implementation/team-members.md+97 −64implementation/team-provisioning-amendment.md+60 −40implementation/team-provisioning-app.md+60 −51
CI passed — run details
diff --git a/implementation/team-members.md b/implementation/team-members.md| index 71381f0..fbe1dd9 100644 |
| --- a/implementation/team-members.md |
| +++ b/implementation/team-members.md |
| @@ -1,10 +1,15 @@ |
| -# π€ Team members: the owner's Team page, and roster mode in every app |
| +# π€ Team members: the Team page, and roster mode in every app |
| **Status:** PROPOSED, 2026-10-27. Drafted by Claude Opus 5.5 for Paul. Not |
| reviewed; **no code until a top-model review approves it** (AGENTS.md |
| "Review"). Base: Home origin/main `e2ec1ab`; Docs `d867db1`, Sheets |
| `af8deeb`, Slides `ebbb08f`, Calendar `00d8e3d`, Meet/Calls `47afcb9`, |
| Memoria `521ae24`. |
| +**Paul's rulings, 2026-10-27, applied here:** owner-chosen member names, |
| +sealed, refusing `@`; unnamed members show role plus a short ref; **every |
| +member of a team sees its member list, only owners write**; no "you've been |
| +added" mail from Home (owners tell people); port order Sheets, Slides, |
| +Memoria, Calendar, Calls. |
| **Implements** spec ruling 23, Β§10 (`memberships` "written only at the |
| directory origin, by a team owner, behind a fresh-assertion step-up"), Β§14's |
| step-up row, and gate 21. Companions: `team-provisioning-amendment.md` |
| @@ -14,8 +19,9 @@ step-up row, and gate 21. Companions: `team-provisioning-amendment.md` |
| ## 1. Scope |
| -Part A: an owner-only **Team page** on `https://oficina.works` that lists a |
| -team's members and lets an owner add, remove, promote and demote them. |
| +Part A: a **Team page** on `https://oficina.works` that shows a team's |
| +members to every member of that team and lets an owner add, remove, promote, |
| +demote and name them. |
| Part B: the follow-on β **roster team mode** in Sheets, Slides, Calendar, |
| Calls and Memoria, which only Docs has today. Until Part B lands for an app, |
| that app ignores the Team page and keeps admitting by its own allowlist. |
| @@ -23,12 +29,14 @@ that app ignores the Team page and keeps admitting by its own allowlist. |
| ## 2. The page |
| - **Route:** `GET /team?team=<sqid>` (ruling 22: team views carry `?team=`). |
| - Linked from the springboard's account menu as "Team" **only** when the |
| - signed-in person owns the selected team. |
| -- **Who sees it:** a directory session whose subject has `role = owner` in |
| - `memberships` for that team. **Everyone else β a member, a guest, a |
| - stranger, an unknown or malformed sqid β gets the same 404** as an unknown |
| - route (gate 4's pattern; gate 21). No 403 anywhere on this surface. |
| + Linked from the springboard's account menu as "Team" when the signed-in |
| + person is on the selected team. |
| +- **Who sees it:** a directory session whose subject has a `memberships` |
| + row (owner or member) for that team. **Everyone else β a guest, a member |
| + of another team, a stranger, an unknown or malformed sqid β gets the same |
| + 404** as an unknown route (gate 4's pattern). No 403 anywhere. |
| +- **Who writes:** owners only. A member sees no write controls, and a |
| + member's POST to any write route gets the same 404 (gate 21). |
| - **Reading needs a session; writing needs step-up.** Every POST checks the |
| directory session's `auth_time` is within 300 s and not in the future |
| (`fresh-assertion.md`). If it is not, the POST renders the existing |
| @@ -41,13 +49,17 @@ that app ignores the Team page and keeps admitting by its own allowlist. |
| - **Shape (estilo, Calma door rules β sky only on the team header):** |
| ``` |
| + Owner's view |
| Oficina βΎ Lagged [account βΎ] |
| βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ |
| Team [Add person] |
| - Till Owner added 27 Oct [Make member] [Remove] |
| - You Owner added 27 Oct [Make member] |
| - (no label) β¦k7q Member added 28 Oct [Make owner] [Remove] [Label] |
| + Till Owner added 27 Oct [Make member] [Remove] [Name] |
| + You Owner added 27 Oct [Make member] [Name] |
| + Member β¦k7q Member added 28 Oct [Make owner] [Remove] [Name] |
| Changes reach every app in this team within a minute. |
| + |
| + Member's view: the same list, no buttons, and |
| + "Only owners can change who is on this team." |
| ``` |
| ## 3. Rules every write keeps |
| @@ -83,7 +95,7 @@ resolves and signs.** The address is typed on `id.oficina.works`, never on |
| 1. **Directory, `POST /team/add` (owner, fresh).** Stores an add-intent row: |
| hash of a random 32-byte intent id, team id, requester person ref, chosen |
| - role, sealed optional display label (Β§5), expiry 10 minutes. 303s (via |
| + role, sealed optional display name (Β§5), expiry 10 minutes. 303s (via |
| the continuation page) to |
| `https://id.oficina.works/resolve?consumer=directory&intent=<id>`. |
| 2. **Credential, `GET /resolve`.** Requires a complete credential session. |
| @@ -110,57 +122,84 @@ resolves and signs.** The address is typed on `id.oficina.works`, never on |
| it stores the verified result in the sealed inbox and 303s to |
| `GET /team/confirm`. |
| 5. **Directory, `POST /team/confirm`** (same-origin, CSRF, still fresh): |
| - re-checks owner, writes `(team, person_ref, role)` and the sealed label in |
| + re-checks owner, writes `(team, person_ref, role)` and the sealed name in |
| one transaction, deletes the intent. Done. |
| -**Telling the person.** Two options; recommended (a): |
| - |
| -- (a) The credential role sends one fixed mail from step 3: "Someone added |
| - you to a team on Oficina. Sign in at https://oficina.works." No team name, |
| - no inviter (the credential role never renders an account-authored string; |
| - this keeps mail to the same rule). Outbound mail carrying the address is |
| - inherent and already disclosed (Β§3.4). |
| -- (b) No mail; the owner tells them. |
| +**Telling the person: Home sends nothing** (Paul, 2026-10-27). The owner |
| +tells them; the confirm page says so: "Let them know β they sign in at |
| +oficina.works." Rejected: a fixed "you've been added" mail from the |
| +credential role. |
| **What this costs the one rule.** Nothing new at rest: the address is |
| transient on the credential role, as on every sign-in; the directory holds a |
| person ref, as it does for every member. Gate 2 gains a fifth path (resolve) |
| that receives an address and must leave none readable, WAL included. |
| -## 5. What the page can show |
| - |
| -The directory knows a member only as a person ref. Options: |
| - |
| -| | Shows | New at rest | Verdict | |
| -|---|---|---|---| |
| -| A | Role, "You", a short ref tail (`β¦k7q`), added day | Nothing | Always the fallback; unusable past a few people | |
| -| B | **Owner-chosen label per member** ("Till"), sealed like team display names | A sealed `(team, person_ref) β label` column, owners-only | **Recommended** | |
| -| C | A name each person sets for themselves, suite-wide | A per-person preference; a new assertion-adjacent field (Β§8 says keep that set small) | Later, if ever | |
| -| D | The address, fetched from the team's own instances (they may hold addresses, ruling 5), rendered in RAM | No column, but a new homeβinstance call and a cross-instance join | Reject: grows Home, and Home-only members have no address in any instance | |
| -| E | The address, kept by Home | A readable address | **Forbidden** by the one rule | |
| - |
| -**B in detail.** `membership_labels(team_id, person_ref, sealed_label, |
| -updated_at day)` in the directory DB, sealed with the existing ID-bound |
| -helper and a new purpose. 1β64 UTF-8 bytes; **refuse any value containing |
| -`@`**, and say so in the field hint, so a label is not quietly an address. A |
| -determined owner can still type one; it is sealed, so it is not *readable at |
| -rest*, which is the rule's test β but Β§3.2's "Sealed" list gains "member |
| -labels" and the README's published list says owners can name members. Set at |
| -add time (optional) or later via [Label]; visible to owners only; deleted |
| -with the membership row. Labels never ride an assertion, call 8 or a log. |
| +## 5. What the page shows β RULED 2026-10-27 by Paul |
| + |
| +**Owner-chosen display names, sealed at rest; a member without one shows |
| +role plus a short ref** ("Member β¦k7q"). Rejected, recorded so they are not |
| +re-proposed: refs only (unusable past a few people); a name each person sets |
| +for themselves suite-wide (a new per-person preference, Β§8 keeps that set |
| +small); addresses pulled from the team's instances and rendered in RAM |
| +(grows Home, and Home-only members have no address in any instance); an |
| +address kept by Home (forbidden by the one rule). |
| + |
| +**Storage.** `membership_names(team_id, person_ref, sealed_name, |
| +updated_at day)` in the directory DB, FK to `memberships` with |
| +`ON DELETE CASCADE`, sealed with the existing ID-bound helper under a new |
| +purpose (`directory.member-name/v1/<team id>/<person ref>`). 1β64 UTF-8 |
| +bytes; **any value containing `@` is refused** with a field hint saying why, |
| +so a name is not quietly an address. A determined owner can still type |
| +"till at lagged dot biz"; it is sealed, so it is not *readable at rest* β |
| +the rule's test. Set when adding (optional) or later via [Name]; owners |
| +only; deleted with the membership row. Names never ride an assertion, call |
| +8, a log or an error string. |
| + |
| +**Spec text this changes:** Β§3.2's "Sealed" list gains "member display |
| +names"; the README's published list says owners can name members. |
| + |
| +## 5a. Every member sees the list β RULED 2026-10-27 by Paul |
| + |
| +**Checked against the rules:** |
| + |
| +- **The one rule** (no readable address at rest, retains nothing from an |
| + instance): untouched. The list is rendered from the roster and the sealed |
| + names β Home's own records, not instance content β and nothing is added at |
| + rest beyond Β§5's sealed column. |
| +- **Β§2.2's "only to that person" / "no operator view"** governs content an |
| + *instance* hands Home; the roster is not that. The closest honest analogue |
| + is applied anyway: the list is rendered **per request, only to a person |
| + who is on that team**, and never to anyone else β no operator view, no |
| + cross-team view, no export, no API. A guest, a member of another team or |
| + Paul as operator gets 404 like any stranger. |
| +- **Never cross a team:** the query is keyed on the requested team and the |
| + viewer's own membership in it; gate 4 tests the cross-team case. |
| +- **Never a support console:** no path renders another team's list. |
| + |
| +**The privacy cost, stated plainly:** every member learns **who else is on |
| +the team, who the owners are, when each was added, and the name an owner |
| +chose for each person** β including names the named person never saw or |
| +agreed to. An owner's private note used as a name ("Till β contractor, leaving March") |
| +is published to the whole team. The field hint says so: "Everyone on this |
| +team sees this name." Before this ruling only owners learned the roster |
| +from Home; members could already infer much of it from shared items in the |
| +instances, but not owner status or names. |
| ## 6. Gates |
| - **Gate 21** β every write requires a fresh assertion (`auth_time` 301 s |
| - refuses; future refuses); call 2 cannot write `memberships`; a write |
| - naming a team the caller does not own answers the same 404 as an unknown |
| - team; a member (non-owner) gets 404 on GET and every POST. |
| -- **Gate 4** β owner of Acme opening `/team?team=<beta>` gets 404. |
| -- **Gate 2** β resolve path extended; labels with canary addresses-looking |
| - strings are refused, and canary labels appear only as ciphertext. |
| + refuses; future refuses); call 2 cannot write `memberships` or names; a |
| + write naming a team the caller does not own answers the same 404 as an |
| + unknown team; a member (non-owner) can GET the list but gets 404 on every |
| + POST, and the page renders no write control for them. |
| +- **Gate 4** β a member of Acme opening `/team?team=<beta>` gets 404; a |
| + guest of `acme.docs` (no roster row) gets 404 on Acme's list. |
| +- **Gate 2** β resolve path extended; names containing `@` are refused, and |
| + canary names appear only as ciphertext in the file, WAL and SHM. |
| - **Gate 5** β `/resolve` renders no account-authored string (scan with a |
| - canary team name and label present in the directory). |
| -- **Gate 9** β no address, label, team name or person ref fragment in logs. |
| + canary team name and member name present in the directory). |
| +- **Gate 9** β no address, member name, team name or person ref fragment in logs. |
| - **Last-owner** β remove/demote the sole owner refuses; with two owners, |
| either may leave. |
| - **Cross-origin** β receipt replay, wrong `aud`, wrong requester (another |
| @@ -185,13 +224,13 @@ middleware, fingerprint marker) so five apps do not re-implement Docs' |
| | App | Admission today | Port work beyond the shared helper | Hard part | |
| |---|---|---|---| |
| | Sheets | `SHEETS_OWNERS` (everyone is co-owner) | Member = the team rung; grant-only mode for any per-sheet sharing; close live edit channels at lease expiry | None special | |
| -| Slides | `SLIDES_ALLOWED_ADDRESSES` | As Sheets; presigned GETs are valid one hour β cap them at the lease ceiling (60 s) in team mode, or accept and document | Asset URLs outliving removal | |
| +| Slides | `SLIDES_ALLOWED_ADDRESSES` | As Sheets. Team instances ship **without uploads** (no object storage on the account); when storage arrives, cap presigned GETs at the lease ceiling (60 s) | Asset URLs outliving removal, later | |
| | Calendar | `CALENDAR_ALLOWED_ADDRESSES` | Published `.ics` feed tokens stay capability links (like Docs public links) and need an owner revoke; reminders need an address | Home-only members have no address in the instance β reminders need an in-app "email for reminders" the instance stores (ruling 5 allows instances to) | |
| | Calls | `CALLS_ALLOWED_ADDRESSES` | Check standing at room join and on every signaling reconnect; close the signaling socket at lease expiry | Native Mac/iOS clients assume one host; they need a team-host picker and Home sign-in | |
| -| Memoria | `MEMORIA_OWNERS` | Grant-only mode applies to search results and the AI answer's sources; sibling calls already bind to `MEMORIA_TEAM` hosts | AI stays off unless the team owner opts in (see `team-provisioning-app.md` Β§5) | |
| +| Memoria | `MEMORIA_OWNERS` | Grant-only mode applies to search results and the AI answer's sources; sibling calls already bind to `MEMORIA_TEAM` hosts | AI stays off unless the team owner asks and Paul agrees (see `team-provisioning-app.md` Β§5) | |
| -**Order:** Sheets, Slides, Memoria, Calendar, Calls β easiest first; Calls |
| -last because of native clients and live media. |
| +**Order β RULED 2026-10-27 by Paul:** Sheets, Slides, Memoria, Calendar, |
| +Calls. Calls last because of native clients and live media. |
| **Until an app is ported**, its `lagged` instance runs Home sign-in plus its |
| own allowlist holding only the owner's address (Track 1). Alta registers it |
| @@ -214,13 +253,7 @@ Guests (unchanged: instance grants, `kind = guest`); per-team 2FA floor |
| invitations that wait for acceptance (membership is immediate; standing |
| does nothing until the person signs in); suite-wide sign-out. |
| -## 9. Open questions for Paul |
| +## 9. Still open |
| -1. Display: **B (owner-chosen sealed labels)**, or A only? |
| -2. Tell the added person by a fixed Home mail (a), or leave it to the owner |
| - (b)? |
| -3. Should members (not only owners) see the member list? Ruling 23 makes |
| - the page owner-only for writes; reads by members are not ruled. This |
| - design says owners only. |
| -4. Port order β Sheets, Slides, Memoria, Calendar, Calls β or follow what |
| - Till actually uses first? |
| +Nothing for Paul in this file; all four questions were ruled on 2026-10-27 |
| +(names, no mail, members read, port order). Review is still owed. |
diff --git a/implementation/team-provisioning-amendment.md b/implementation/team-provisioning-amendment.md| index 18cfca4..b76976e 100644 |
| --- a/implementation/team-provisioning-amendment.md |
| +++ b/implementation/team-provisioning-amendment.md |
| @@ -2,13 +2,18 @@ |
| **Status:** PROPOSED, 2026-10-27. Drafted by Claude Opus 5.5 for Paul. Not |
| reviewed. **No code until a top-model review approves this file** (AGENTS.md |
| -"Review") and Paul confirms the open questions at the end. Direction approved |
| +"Review") and Paul answers the pre-flight question in Β§12. Direction approved |
| in principle by Paul, 2026-10-27: "the provisioning app creates teams, owners |
| and consumer registrations through a narrow, authenticated Home endpoint, |
| instead of the blocked platform-117 maintenance worker." |
| **Base:** origin/main `e2ec1ab`. Companion files: |
| `team-provisioning-app.md` (the caller, called **Alta** below) and |
| -`team-members.md` (the owner's Team page). |
| +`team-members.md` (the Team page). |
| +**Paul's rulings, 2026-10-27, applied here:** two-key approval (Alta's |
| +signature **and** his fresh Home sign-in on every run); ruling 8 re-ruled |
| +for Alta, conditional on CARLOS team-scoped credentials; the owner must |
| +already exist (`existing_only`); team labels are never reused. One |
| +pre-flight question remains open (Β§12). |
| --- |
| @@ -72,15 +77,22 @@ Each quoted file gains a one-line pointer here when this lands. |
| credential role's consumer-registry digest |
| (`team-provisioning-app.md` Β§7). Same fields, weaker provenance, said so. |
| -**Rules this touches that only Paul can re-rule:** |
| - |
| -- **Ruling 8's Rejected column:** *"A standing console token in a |
| - web-facing app."* Its reason (Β§7) β an RCE on Home's sign-in surface must |
| - never reach instance creation β still holds: Home holds no CARLOS |
| - credential. But **Alta is a web-facing app holding standing CARLOS |
| - credentials**, the rejected alternative read literally. Paul's 2026-10-27 |
| - direction is taken as re-ruling it for a separate, Paul-only app; record |
| - that in Β§1 rather than leave it implicit. |
| +**Rulings this touches:** |
| + |
| +- **Ruling 8 β RE-RULED for Alta by Paul, 2026-10-27.** Its Rejected column |
| + read *"A standing console token in a web-facing app."* Its reason (Β§7) β |
| + an RCE on Home's sign-in surface must never reach instance creation β |
| + still holds: Home holds no CARLOS credential. The re-ruling, to be added |
| + to spec Β§1 as its own row when this lands: **a web-facing app other than |
| + Home (Alta) may hold CARLOS credentials, on condition that CARLOS gains |
| + team-scoped credentials** β able to create, configure, restart and delete |
| + instances, set env and secrets, and attach and detach domains **only** for |
| + named, non-default environments and the instances bound to them, never |
| + the app's default bundle or instances on it. **Alta does not ship to |
| + production until that credential exists.** Rejected: a separate CARLOS |
| + account for team instances; accepting today's app-wide reach. CARLOS |
| + design: `carlos/platform` branch `team-scoped-credentials`, |
| + `implementation/team-scoped-credentials.md`. |
| - **Ruling 7** is unaffected: Alta is the human gate and never auto-drains |
| the signup queue (Β§14's three conditions are unmet). |
| @@ -152,6 +164,11 @@ before any database write: |
| already stores; no new column class). The address itself is dropped after |
| hashing. One open window per role at a time; a second refuses. |
| +**The owner must already exist** (Paul, 2026-10-27): over this endpoint |
| +`credential.owner-seed` accepts only `existing_only: true`, so a typo or a |
| +never-signed-in address refuses and mints no person stub. The native |
| +command's other mode is not reachable here. |
| + |
| Each `/operator/v1` request then names `plan_id` in a header |
| (`Oficina-Plan`), and the role checks β inside the engine's transaction β that |
| the window is open and the verb's decoded input is inside it: the label |
| @@ -276,19 +293,19 @@ additive:** credential `consumers`, `operator_approvals`, |
| Assume an attacker holds Alta's operator key, its prefilter token and its |
| CARLOS service credentials. |
| -- **Without Paul's fresh sign-in:** nothing at Home. No window opens. But |
| - Alta's CARLOS `operate` credentials can rewrite **any** environment of |
| - those apps, including the default bundle Paul's own instances run on (an |
| - attacker adds their address to `DOCS_ALLOWED_ADDRESSES`), and `instance` |
| - can delete Paul's instances. **That is the largest risk in the whole |
| - design, and it is not a Home risk** β Home cannot bound it. |
| - `team-provisioning-app.md` Β§3 lists the options (environment-scoped |
| - credentials, or a separate account). |
| +- **Without Paul's fresh sign-in:** nothing at Home. No window opens. On |
| + the CARLOS side, today's `operate`/`instance` pair would let an attacker |
| + rewrite the default bundle Paul's own instances run on and delete them β |
| + **which is why ruling 8's re-ruling is conditional**: in production Alta |
| + holds only team-scoped credentials, which reach Alta's own environments |
| + and instances and nothing of Paul's. Home cannot bound that risk; CARLOS |
| + does. |
| - **With one window (Paul signs in to a compromised Alta):** for 15 |
| - minutes, one label, the plan's apps: one new team with an owner of the |
| - attacker's choosing, consumers at `<that label>.<app>.oficina.works`, |
| - activated. Costs: a squatted label (no release verb yet), person stubs (a |
| - count), audiences valid only at themselves. **Cannot:** touch any existing |
| + minutes, one label, the plan's apps: one new team owned by an existing |
| + person of the attacker's choosing, consumers at |
| + `<that label>.<app>.oficina.works`, activated. Costs: a label squatted for |
| + good (labels are never released) and audiences valid only at themselves; |
| + no person stubs, since owner-seed is existing-only here. **Cannot:** touch any existing |
| team, instance or consumer (provenance fence); add a member anywhere; read |
| any membership, name, address or content; mint a session; retire |
| `HOME_CONSUMERS` entries; rename. |
| @@ -351,25 +368,28 @@ CARLOS service credentials. |
| - **Alta writing Home's database directly**, or holding any Home key that |
| signs assertions, receipts or roster pages. That makes Alta a third Home |
| origin. |
| -- **Signature only, no approval window.** Simpler; turns Alta's stored key |
| - into a standing ability to mint teams and owners. Kept as open question 1. |
| +- **Signature only, no approval window** β rejected by Paul, 2026-10-27: |
| + it turns Alta's stored key into a standing ability to mint teams and |
| + owners. |
| - **Waiting for platform 117.** Still blocked at platform `57aec0a` |
| (`maintenance-exec.md`: final design approval pending; no command, no |
| route). The native Linux command stays for restore, which this does not |
| cover. |
| -## 12. Open questions for Paul |
| - |
| -1. **Two-key approval or signature only?** This file recommends requiring |
| - your fresh Home sign-in per run. Signature-only is simpler but makes |
| - Alta's stored key a standing ability to create teams. |
| -2. **Has production's directory ever been initialized** (a roster |
| - generation)? If not, the first run is an `initialize` plan with your typed |
| - attestation that it never issued one. Alta checks via `inspect` first. |
| -3. **Owner must already exist?** Recommended: Till signs in once at |
| - oficina.works first, and owner-seed runs `existing_only` β a typo then |
| - fails instead of minting an ownerless team. Otherwise a typo needs an |
| - ownership-transfer verb that does not exist. |
| -4. **Label release on retire.** Retiring every app leaves the team, its |
| - roster and its label reserved (ruling 19). Releasing a label needs its own |
| - design; leave it out of the first cut? |
| +## 12. Ruled, and the one pre-flight question |
| + |
| +**Ruled by Paul, 2026-10-27:** two-key approval on every run (Β§4); owner |
| +must already exist (Β§4); **team labels are never reused** β no label |
| +release verb will be built, and a retired team keeps its label for good |
| +(ruling 19 already reserves it; this makes the reservation permanent); |
| +ruling 8 re-ruled for Alta, conditional (Β§2). |
| + |
| +**Still open β a pre-flight question for Paul before the first production |
| +run:** has production's directory ever been initialized with a roster |
| +generation? Alta's first act is a signed `directory.inspect`. If it reports |
| +no generation, the first run is an `initialize` plan carrying Paul's typed |
| +attestation that this directory database has **never** issued a roster |
| +generation or consumer record (the attestation `home-provisioner.md` |
| +requires; Home cannot prove historical absence after a possible restore). |
| +If Paul cannot attest that, initialization stays unavailable and the |
| +restore procedure β still gated on platform 117 β is the only path. |
diff --git a/implementation/team-provisioning-app.md b/implementation/team-provisioning-app.md| index 10468ae..1c1d637 100644 |
| --- a/implementation/team-provisioning-app.md |
| +++ b/implementation/team-provisioning-app.md |
| @@ -9,6 +9,13 @@ Memoria `521ae24`. It replaces `oficina/teams/provision-team.py` (Track 1, |
| written today) and keeps that script's central rule: **deny by default β a |
| team instance inherits nothing from the app's default bundle unless the key |
| is on that app's SHARED list.** |
| +**Paul's rulings, 2026-10-27, applied here:** ruling 8 re-ruled for Alta on |
| +condition of team-scoped CARLOS credentials, and **Alta does not ship to |
| +production until they exist** (Β§3); every run needs Paul's fresh Home |
| +sign-in; the owner must have signed in once before the team is created; |
| +team labels are never reused; Slides ships without uploads; team instances |
| +share the mail relay; team dashboards stay blank; Memoria is in the |
| +`oficina` account. |
| --- |
| @@ -45,36 +52,37 @@ team with its first owner. First run: label `lagged`, owner |
| ## 3. Credentials it holds, and their reach |
| -**CARLOS.** A service credential holds exactly one role; `instance` creates, |
| -deletes and attaches domains but cannot write config; `operate` writes config |
| -and restarts but cannot create instances. So Alta holds **two per app**, |
| -minted by Paul (owner-only, never expire, rotatable): |
| - |
| - carlos services create --account oficina --role instance --app docs alta-docs-instance |
| - carlos services create --account oficina --role operate --app docs alta-docs-operate |
| - β¦ for sheets, slides, calendar, calls, memoria (12 credentials) |
| - |
| -Stored as Alta secrets `ALTA_CARLOS_<APP>_INSTANCE` / |
| -`ALTA_CARLOS_<APP>_OPERATE`, presented as `Authorization: Bearer` to |
| -`https://console.carloku.com/api/cli/apps/oficina/<app>/β¦`. |
| - |
| -**Their reach is wider than teams, and this is the design's biggest risk.** |
| -`operate` on an app can `PUT /config` for **any** environment, including the |
| -default bundle Paul's own instance runs on; `instance` can `DELETE` Paul's |
| -instance. Alta's code refuses both (Β§8), but a compromised Alta is not |
| -bound by its code. Options, for Paul (open question 1): |
| - |
| -- (a) Accept, with Alta hardened (Paul-only, two-key Home approval, no |
| - public listing). Fastest. |
| -- (b) **Ask the platform for environment-scoped credentials** (a credential |
| - that may only touch instances and config bound to named environments, and |
| - never the default bundle). Recommended for the long term. |
| -- (c) Put team instances in a separate CARLOS account (`oficina-teams`) |
| - with the same apps released there. Strongest isolation; doubles release |
| - work. |
| - |
| -**Memoria's README deploys with `--account bds`**, the others with |
| -`oficina`. Confirm they are the same account before minting. |
| +**Ruling 8 re-ruled for Alta β Paul, 2026-10-27.** Spec ruling 8 rejected |
| +"a standing console token in a web-facing app". Paul re-ruled it for Alta: |
| +a web-facing app **may** hold CARLOS credentials, **on condition** that |
| +CARLOS gains **team-scoped credentials** β a credential that can create, |
| +configure, restart and delete instances, set env and secrets, and attach and |
| +detach domains **only** for named, non-default environments and the |
| +instances bound to them, never the app's default bundle or instances on it. |
| +**Alta must not ship to production until that credential exists.** |
| +Rejected: a separate CARLOS account for team instances (doubles release |
| +work); accepting today's app-wide `instance` + `operate` reach (one RCE in |
| +Alta reaches Paul's production config and instances). The CARLOS design is |
| +on branch `team-scoped-credentials` of `carlos/platform`, |
| +`implementation/team-scoped-credentials.md` (role `tenant`, scope = the |
| +environments the credential's scope owns). |
| + |
| +**With that credential**, Alta holds **one per app**, minted by Paul: |
| + |
| + carlos services create --account oficina --role tenant --app docs --scope alta alta-docs |
| + β¦ sheets, slides, calendar, calls, memoria (6 credentials) |
| + |
| +Stored as Alta secrets `ALTA_CARLOS_<APP>`, presented as `Authorization: |
| +Bearer` to `https://console.carloku.com/api/cli/apps/oficina/<app>/β¦`. |
| +Memoria is in the `oficina` account like the others (its `lagged` instance |
| +was provisioned there on 2026-10-27; its README's `--account bds` is stale). |
| +The hand-made `lagged` environments are handed to Alta's scope with the |
| +person-only `carlos env adopt` the CARLOS design proposes. |
| + |
| +**Before it exists** (development and preview only, never production): |
| +Alta may run against a sandbox account with today's `instance` + `operate` |
| +pair. Β§8's guards are written for that period and stay afterwards as |
| +defence in depth. |
| **Home.** `ALTA_OPERATOR_KEY` (P-256, signs operator requests and plans, |
| context `oficina/home/operator-input/v1` and `β¦/operator-plan/v1`), |
| @@ -128,8 +136,8 @@ MEMORIA): |
| | `<P>_HOME_KEYS_BASE64` | SET from Alta's pinned copy of Home's public assertion keys | |
| | `<P>_HOME_DEK_BASE64` | GENERATED | |
| | `HOME_DIRECTORY_ORIGIN` | SET `https://oficina.works` | |
| -| `OFICINA_DASHBOARD_TEAM` | BLANKED (Paul's value binds Paul's team); SET to the new sqid only if Paul says so (question 7) | |
| -| `CARLOS_SMTP_*` | SHARED (platform mail; sender is the suite's) | |
| +| `OFICINA_DASHBOARD_TEAM` | BLANKED β team dashboards stay blank for now (Paul, 2026-10-27) | |
| +| `CARLOS_SMTP_*` | SHARED β team instances share the suite's mail relay (Paul, 2026-10-27) | |
| Per app (allowlist = the owner's address only, the Track 1 stopgap, until |
| the app has roster mode β `team-members.md` Β§7): |
| @@ -138,7 +146,7 @@ the app has roster mode β `team-members.md` Β§7): |
| |---|---|---|---|---| |
| | Docs | `DOCS_CONTENT_KEY`, `DOCS_TEAM_ROSTER_TOKEN` (from Home, not random) | `DOCS_ALLOWED_ADDRESSES=""` (team mode permits empty); `DOCS_TEAM_ID`=sqid, `DOCS_TEAM_DIRECTORY_ORIGIN`, `DOCS_TEAM_PROVISIONING_BASE64` (signed record), `DOCS_TEAM_OPERATOR_KEYS_BASE64` (directory provisioning public key) | `DOCS_SMTP_*` (Docs reads no `CARLOS_SMTP_*`), `DOCS_SAMPLE_DOCUMENTS` | Team mode writes a fingerprint marker; the instance can never go back to allowlist mode | |
| | Sheets | `SHEETS_DEK` | `SHEETS_OWNERS`=owner | β | | |
| -| Slides | β (no DEK in Slides) | `SLIDES_ALLOWED_ADDRESSES`=owner | `SLIDES_SMTP_*` if present | **Storage:** `CARLOS_STORE_*` must never be Paul's bucket. With `--private-storage` enabled on the app (person-only, once, needs a storage entitlement), each create gets its own bucket and an environment named after the host's first label (`lagged-slides`); Alta then uses that name. Without it, uploads answer 503 β acceptable until enabled. Bucket stays private (presigned GETs, no public URLs exist in Slides) | |
| +| Slides | β (no DEK in Slides) | `SLIDES_ALLOWED_ADDRESSES`=owner | `SLIDES_SMTP_*` if present | **Ships without uploads** (Paul, 2026-10-27: object storage is not approved on the account). Every `CARLOS_STORE_*` key is BLANKED, so uploads answer 503 and Paul's bucket, if one is ever bound, never reaches a team. Private per-instance storage is a later run | |
| | Calendar | `CALENDAR_DEK` | `CALENDAR_ALLOWED_ADDRESSES`=owner | `CALENDAR_SMTP_*` if present | `CARLOS_CONTROL_SOCKET`/`ADMIN_TOKEN` are platform-set per instance | |
| | Calls | `CALLS_DEK` | `CALLS_ALLOWED_ADDRESSES`=owner | `CARLOS_RELAY` (TURN, app-level), `CALLS_ZONE`, `CALLS_QUALITY_REPORTS` | APNs vars are not read by `main.go`; BLANKED anyway | |
| | Memoria | `MEMORIA_DEK` | `MEMORIA_OWNERS`=owner; `MEMORIA_TEAM`=label | β | **AI off:** `MEMORIA_AI` BLANKED, `MEMORIA_TENSORX_KEY` BLANKED (Paul's key never reaches a team), `MEMORIA_SIBLINGS` and every `MEMORIA_SIBLING_TOKEN_*` BLANKED (they point at Paul's apps), `MEMORIA_ALLOW_LOGGED_MAIL` BLANKED. Memoria boots without an origin, so `audit` checks `MEMORIA_ORIGIN` explicitly | |
| @@ -164,7 +172,7 @@ Nothing is inferred from a timeout; nothing is deleted to "clean up". |
| |---|---|---|---| |
| | 0 | Preflight | label regex `^[a-z][a-z0-9-]{1,30}[a-z0-9]$`, not reserved; signed `inspect`: generation present, label free; console: env/instance/domain absent **or** already bound to this team | β | |
| | 1 | Approve | an open window for this plan? | step-up β sign plan β `POST /operator/v1/approve` on both roles | |
| -| 2 | Owner | sealed receipt stored? | `credential.owner-seed` (`existing_only` if Paul agrees) | |
| +| 2 | Owner | sealed receipt stored? | `credential.owner-seed` with `existing_only: true` β the owner must have signed in once (Paul, 2026-10-27); an unknown address fails here and nothing is created | |
| | 3 | Team | team sqid stored? | `directory.inspect` β `directory.seed-team` with the receipt | |
| | per app: | | | | |
| | 4 | Credential consumer | Home replay of the stored request | `credential.register-consumer` `<team>-<app>` | |
| @@ -224,17 +232,21 @@ and says so on the confirm page: the parked database replica and any private |
| bucket (purged only by a CARLOS operator; re-creating the same host is |
| refused until then), the environment bundle (Alta blanks its generated keys |
| **only** after the purge), and the Home team row, roster and label (ruling |
| -19; no release verb yet). A confirm page names the team, lists each app, and |
| -requires typing the label. |
| +19). **Labels are never reused** (Paul, 2026-10-27): a retired team's label |
| +stays reserved for good, and Alta refuses a plan naming any label it has |
| +ever used. A confirm page names the team, lists each app, and requires |
| +typing the label. |
| ## 10. One-time setup (Paul, person-only) |
| -1. Mint the twelve service credentials (Β§3); `carlos secrets set --app alta`. |
| +1. When CARLOS ships team-scoped credentials: mint the six (Β§3), adopt |
| + the `lagged` environments into scope, `carlos secrets set --app alta`. |
| 2. Per app zone: wildcard DNS `*.<app>.oficina.works` β the deployment, and |
| either a wildcard certificate claim or per-name certificates. Check |
| whether console.carloku.com runs with `CARLOS_HOST_CLAIM`, which refuses |
| catch-all and wildcard claims; explicit per-host attach is what Alta uses. |
| -3. Slides: `--private-storage` (needs the storage entitlement). |
| +3. Till signs in once at `https://oficina.works` (owner-seed is |
| + `existing_only`). |
| 4. Home: `HOME_OPERATOR_HTTP` on both roles with Alta's public key and |
| Paul's person ref; enable the directory roster endpoint with its signing |
| keys; add `alta` to `HOME_CONSUMERS` (it is not a team instance). |
| @@ -252,7 +264,7 @@ requires typing the label. |
| New team |
| Label [lagged ] β lagged.docs.oficina.works β¦ |
| Name [Lagged ] |
| - Owner email [till@lagged.biz] (must have signed in once) |
| + Owner email [till@lagged.biz] (must have signed in at oficina.works once) |
| Apps [x] Docs [x] Sheets [x] Slides [x] Calendar [x] Calls [x] Memoria |
| [Review plan] |
| @@ -283,15 +295,12 @@ sealed owner address gone after step 12. End to end on previews: two |
| synthetic teams, both owners sign in, each sees only their team, Paul's |
| existing instances unchanged (config digest before and after). |
| -## 13. Open questions for Paul |
| - |
| -1. CARLOS blast radius: accept (a), ask the platform for |
| - environment-scoped credentials (b), or a separate account (c)? |
| -2. Host for Alta: `alta.oficina.works`, or unlisted on oncarlos.com only? |
| -3. Owner must sign in once before the team is created (`existing_only`)? |
| -4. Is Memoria in the same CARLOS account as the other five? |
| -5. Enable Slides private storage now, or ship Slides without uploads first? |
| -6. SMTP: share the suite's relay credentials with team instances (as Track |
| - 1 does), or give each team its own? |
| -7. Dashboard: should a team instance's `OFICINA_DASHBOARD_TEAM` point at |
| - its own team, or stay blank until the dashboard is reviewed for teams? |
| +## 13. Still open |
| + |
| +1. **Production gate:** CARLOS team-scoped credentials |
| + (`carlos/platform` branch `team-scoped-credentials`) β design, review, |
| + build. Alta ships to production only after. |
| +2. Host for Alta: `alta.oficina.works`, or unlisted on oncarlos.com only |
| + (not ruled). |
| +3. The Home pre-flight question in `team-provisioning-amendment.md` Β§12 |
| + (roster generation initialization). |