Skip to content

docs: decide the project permission model under the platform root - #3539

Merged
fforootd merged 10 commits into
mainfrom
claude/platform-resource-adr
Dec 2, 2026
Merged

fforootd merged 10 commits into
mainfrom
claude/platform-resource-adr

Conversation

@fforootd

@fforootd fforootd commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

Context

Summary

ADR 094 (Proposed) decides:

  1. One model per project. The platform enters only as operator from platform on project.admin. No rule names the platform project.
  2. The catalog, in OpenFGA form, with a session type.
    • Its project and user are implied from the session's row: no tuples are written, and ValidateAssignment refuses any.
    • The resolver resolves admin from project with the existing project Check, so the operator SQL path does not change.
    • Additive migrations in all three dialects. Lists need no new predicate.
  3. Sessions are read and revoked by their own user and the project's admins, operators included. Viewers and editors stop reading them. listMySessions is new.
  4. Writes that can take over or lock out a user (the credential tier, identifier changes, deletion) need admin. The caller must also cover every role the target holds. This generalizes "only an operator sets an operator's password", closes openCredentialTier, and applies to owning-team membership (Team membership - adding a member to a Team that owns a Project does not follow ADR 054 #3470).
  5. One rule for which credential an operation takes, decided by the user on 2026-12-02. Every management operation takes a person's token (consent), a PAT or a machine identity and is an MCP tool. The credential's scopes and the principal's permissions decide. Only application sign-in and the public flow stay out. Operations that take or return a secret are marked, never hidden: their scopes are never preselected on consent, and their events record the mark. New scopes: session.read, session.delete, user.set_password and platform.read.
  6. Who skips consent: on the platform issuer, configuration names the clients that skip consent. An application's own first_party flag doesn't count there, because an admin of the platform project can set it.
  7. The platform as a resource: getPlatform, listPlatformOperators (operators only) and a project's kind.
  8. Effective access on getProject and listMyProjects, in the form access.role plus access.sources. It replaces the Console's GET /projects/{id} probe.
  9. A table of where the permission catalog and the gate contract disagree, and which record wins on each decision.
  10. Twelve escalation paths, each with how the ADR closes it.

Decided on 2026-12-02 and folded in: operators only for the platform project's sign-in configuration; the consented scope gates risky calls, in two stages; configuration names who skips consent on the platform issuer; the cover check on every project; identifier changes ask admin; passkey registration stays on the application plane; PATs and machine identities wait for their own ADR; request ip and user_agent in events go to admins only. A section records the role, project secret, invitation and search decisions for the roles ADR.

Decided later on 2026-12-02: an owning team's own members and operators add members to it (an admin of the platform project only through ADR 054 §8's recovery path); another platform-project user's credentials and deletion are operators' only; effective access lists every source. The ADR has no open questions left. The roles ADR waits until someone builds help-desk permissions.

Note: open PR #2985 also uses number 094 (094-project-webhooks.md); whichever merges second renumbers.

Validation

  • node scripts/check-adrs-index.mjs passes.
  • node scripts/check-pr-title.mjs passes.
  • No code changes. The function, file and test names the ADR cites were checked against the tree on this branch.

https://claude.ai/code/session_0137eGmTDLdAX6MvNFrobbNT


Generated by Claude Code

… read

ADR 094 proposes a platform resource (getPlatform, listPlatformOperators and
a project's kind), the reads a person's credential takes beside a project
secret, and the /users/me reads with a person's token, so that an agent
signed in as a person finds its projects, who runs the deployment, and where
a person signed in.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0137eGmVSt2DgYJj2CjZbi1U
@vercel

vercel Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cloud Ready Ready Preview Dec 2, 2026 4:52am UTC

Request Review

@github-actions

github-actions Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ No Changeset found

Latest commit: 250de07

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

A person learns how they hold a project from its effective role and sources,
platform_operator among them, as ADR 054 §9 and Console ADR 0004 §5 planned,
not from a capability read ADR 075 rejected. Sessions get a type of their own,
read and revoked by their user and the project's administrators, operators
included, in place of every viewer. Only operators list operators. The CLI's
release-time writes take a person's token, variable writes are kept out of
MCP tools, and setUserPassword, deactivateTeam and the operations that answer
with a credential stay as they are, each with its reason.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0137eGmVSt2DgYJj2CjZbi1U
@fforootd fforootd changed the title docs: decide how the API presents the platform, and what a person may read docs: decide how the API presents the platform, and what a person may do Dec 2, 2026
@fforootd
fforootd marked this pull request as ready for review December 2, 2026 01:03
Copilot AI balanced review requested due to automatic review settings December 2, 2026 01:03
A project owner is admin on the project, operators included. setUserPassword
takes a person at admin, raised from editor, and nobody but an operator sets
an operator's password.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0137eGmVSt2DgYJj2CjZbi1U

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Password resets lack a dedicated token scope and MCP secret-input protection, while the proposed authorization reporting cannot reliably capture all active access sources.

3 open issues
What changed in this PR

Proposes ADR 094 to define platform discovery and person-based access across the API, Console, CLI and MCP. No runtime behavior changes.

Changes:

  • Defines platform resources and effective project access.
  • Proposes session ownership rules and expanded person-token reads and writes.
  • Records security constraints, implementation sequencing and open questions.
File Description
docs/​adrs/​094-platform-as-a-resource.md Adds the proposed platform and person-access contracts.
docs/​adrs/​README.md Indexes ADR 094 and summarizes its decisions.

Review effort: Balanced

Comment thread docs/adrs/094-platform-as-a-resource.md Resolved
Comment thread docs/adrs/094-platform-as-a-resource.md Resolved
Comment thread docs/adrs/094-platform-as-a-resource.md Resolved
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-12-02T01:08:33.382453Z a52891f Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

…rm root

Projects carry the workload, so the model is stated per project and the
platform enters only as `operator from platform`. Adds the session type with
implied tuplesets and its migrations, a cover check for writes that can take
over or lock out a user, one credential-class rule, pinned first-party
clients for credentials in an answer, the effective-access shape, a table of
where the catalog and the gate contract disagree, and the escalation paths.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0137eGmTDLdAX6MvNFrobbNT
@fforootd fforootd changed the title docs: decide how the API presents the platform, and what a person may do docs: decide the project permission model under the platform root Dec 2, 2026
…s a secret

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0137eGmTDLdAX6MvNFrobbNT
Every management operation takes a person's token, a PAT or a machine
identity and is an MCP tool; marks on secret-bearing operations warn instead
of hiding. The pinned first-party list now only decides who skips consent on
the platform issuer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0137eGmTDLdAX6MvNFrobbNT
…the platform project's configuration and credentials to operators

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0137eGmTDLdAX6MvNFrobbNT
Operators only for the platform project's sign-in configuration; the
consented scope gates risky calls, in two stages; configuration names who
skips consent; the cover check on every project; identifier changes ask
admin; passkey registration stays on the application plane; PATs and
machine identities wait for their own ADR; events show IP and user agent to
admins only. Records the role, project secret, invitation and search
decisions for the roles ADR. Three questions remain open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0137eGmTDLdAX6MvNFrobbNT
Owning-team members and operators add members; another platform-project
user's credentials and deletion are operators' only; effective access lists
every source. Records the cancelInvitation, secret rotation and invitation
replacement decisions, and that the roles ADR waits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0137eGmTDLdAX6MvNFrobbNT
@fforootd
fforootd added this pull request to the merge queue Dec 2, 2026
Merged via the queue into main with commit fe1eeb3 Dec 2, 2026
17 of 18 checks passed
@fforootd
fforootd deleted the claude/platform-resource-adr branch December 2, 2026 05:36
@github-project-automation github-project-automation Bot moved this from Inbox to Done in Engineering Kanban Dec 2, 2026
fforootd pushed a commit that referenced this pull request Dec 2, 2026
…cope

Picks up what landed on main in between: #3541, #3539, #3543 and #3542.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0137eGmVSt2DgYJj2CjZbi1U
fforootd pushed a commit that referenced this pull request Dec 2, 2026
Picks up what landed on main in between: #3538, #3541, #3539 and #3543.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0137eGmVSt2DgYJj2CjZbi1U

This branch was successfully deployed

1 active deployment
Preview — 250de078 Deployed Dec 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants