team-scoped-credentials
Team-scoped service credentials (the team role)
What. A team service credential (carlos services create --role team --app A --scope S) is bound to one app and a scope, and reaches only the environments its scope owns, the instances bound to them and their hostnames: thirteen doors registered through cliScopedRoute, one deciding function teamInScope, byte-identical 404s for everything out of scope, and the default bundle, every instance on it and every app-wide verb never in reach. Owned environments (owner_scope, schema 2) render standalone: no default bundle folded in, no inherited exec_delivery, a floor barrier (release.TeamEnvironmentFloor v0.30.0) on create and rebind. Names a record references or a bundle holds cannot be captured; a person binds into an owned environment only with --scope, re-checked under the record lock. Owners adopt, release and fork (carlos env adopt|release|fork). Per Paul's §3a ruling, an owned environment gets its own SES SMTP user and key and its own relay identity, reaped on release and on the app's disable or teardown; the scan callback secret and mail-events key are not delivered; a team cannot write a platform-managed key. Audit rows carry role=team scope=<s>.
Why. Oficina's provisioning app Alta may hold carlos credentials only if they cannot touch Paul's own instances (Paul, 2026-10-27). The design is implementation/team-scoped-credentials.md.
Tests. Every §8 item of the design by name: internal/console/teamdoors_test.go (door table, parity, capture race, person-side scope, floor on create and on the hosting box, platform-managed keys, canary twin, lock-held race), teamcreds_test.go (no-shared-values guard across mail, relay, objstore, scan and mail-events; Apply-caller source scan; revocation), apienv_test.go, internal/appconfig/owned_test.go (render-layer canary, schema 2, writers, fork's verbatim envelopes, root's refusal kept on the unit path), internal/mail/walk_environment_test.go, the relay and svcrole tests, and claim-route fixtures for the ownership doors. The §8.12 mutations were run by hand and each fails its named test.
Reviews. Design: approved by Claude Fable 5.1 in round 3 on #449 (https://amadan.net/carlos/platform/discussions/449). Whole-branch: approved by Fable on #449, two P2s fixed (ownership re-checked under the record lock; IAM user name budgeted to 64 characters). Census: approved by Codex GPT-6-Astra on #280 (https://amadan.net/carlos/platform/discussions/280) at 1cc27cc4a after its one P2 (root keeps its refusal of a hand-staged env file for an owned bundle); re-proposed on main ee0661836's chain with the same units and dispositions, seal 9e0c4a0c → b6f3a369. Paul approved the merge 2026-10-28.
Deviations (design §12): the browser canary twin names no environment (pinned by test); the §8.17 guard treats the SMTP host, port and From as the app's by design; a placement with no fresh box admits at the floor; team creates refuse replicas; secrets set reads the sealing key from the environment's GET; a team credential through the CLI passes --account; the IAM user name's hashed form resolves through the caller index.
Follow-ups (P3): mail.StandaloneUserName's 64-character overflow on main; a team's malformed {host} answers 404 not 400 on the domain doors; a team can learn a name is in use at the cost of a permanent owned bundle; GET /instances truncated counts the whole app; an instance served from outside its placement is judged by the placement at the floor.
Production. The merge creates nothing in AWS. A per-environment IAM user (carlos-mail-<acct>-<app>+e+<env>) and access key appear only when an owned environment is created on an app with mail enabled, and that needs Paul's scoped approval before it first runs. The relay fleet must run this release before a team environment's TURN credential verifies; every box of a placement must run v0.30.0 before an instance can be bound to an owned environment. No release is cut and nothing is deployed by this merge.
Discussions 1 open
Tasks
- No tasks yet.
Activity
- claude agent, operated by paul@keymail.dev replied to Team-scoped service credentials (tenant role): design review
- paul@keymail.dev pushed 158dc0f70 Team-scoped service credentials: the `team` role, standalone owned environments, and per-environment platform credentials (#449)
- claude agent, operated by paul@keymail.dev replied to Team-scoped service credentials (tenant role): design review
- claude agent, operated by paul@keymail.dev replied to Team-scoped service credentials (tenant role): design review
- claude agent, operated by paul@keymail.dev replied to Team-scoped service credentials (tenant role): design review
- claude agent, operated by paul@keymail.dev replied to Team-scoped service credentials (tenant role): design review
- claude agent, operated by paul@keymail.dev replied to Team-scoped service credentials (tenant role): design review
- claude agent, operated by paul@keymail.dev replied to Team-scoped service credentials (tenant role): design review
- claude agent, operated by paul@keymail.dev replied to Team-scoped service credentials (tenant role): design review
- claude agent, operated by paul@keymail.dev replied to Team-scoped service credentials (tenant role): design review
- claude agent, operated by paul@keymail.dev replied to Team-scoped service credentials (tenant role): design review
- claude agent, operated by paul@keymail.dev replied to Team-scoped service credentials (tenant role): design review
- claude agent, operated by paul@keymail.dev replied to Team-scoped service credentials (tenant role): design review
- claude agent, operated by paul@keymail.dev replied to Team-scoped service credentials (tenant role): design review
- claude agent, operated by paul@keymail.dev replied to Team-scoped service credentials (tenant role): design review
- claude agent, operated by paul@keymail.dev replied to Team-scoped service credentials (tenant role): design review
- claude agent, operated by paul@keymail.dev opened Team-scoped service credentials (tenant role): design review