From f633f1806af8e689fc8869a555f85e68d092b65f Mon Sep 17 00:00:00 2001 From: Sambhav Kothari Date: Fri, 4 Dec 2026 03:58:53 +0000 Subject: [PATCH 01/10] docs: propose self-service access and infrastructure management --- .../01-credential-free-previews.md | 28 ++++ .../02-declarative-users-and-roles.md | 65 ++++++++ .../self-service/03-declarative-resources.md | 42 +++++ .../self-service/04-effective-access.md | 32 ++++ .../self-service/05-ownership-and-policies.md | 54 +++++++ .../self-service/06-secure-self-service.md | 32 ++++ .../self-service/07-consensus-integration.md | 44 +++++ docs/proposals/self-service/README.md | 151 ++++++++++++++++++ 8 files changed, 448 insertions(+) create mode 100644 docs/proposals/self-service/01-credential-free-previews.md create mode 100644 docs/proposals/self-service/02-declarative-users-and-roles.md create mode 100644 docs/proposals/self-service/03-declarative-resources.md create mode 100644 docs/proposals/self-service/04-effective-access.md create mode 100644 docs/proposals/self-service/05-ownership-and-policies.md create mode 100644 docs/proposals/self-service/06-secure-self-service.md create mode 100644 docs/proposals/self-service/07-consensus-integration.md create mode 100644 docs/proposals/self-service/README.md diff --git a/docs/proposals/self-service/01-credential-free-previews.md b/docs/proposals/self-service/01-credential-free-previews.md new file mode 100644 index 0000000..68bb03f --- /dev/null +++ b/docs/proposals/self-service/01-credential-free-previews.md @@ -0,0 +1,28 @@ +# 1. Credential-free infrastructure previews + +[Roadmap](README.md) · Implementation: [#292](https://github.com/modelcontextprotocol/access/pull/292) + +PRs need infrastructure feedback without access to production credentials or Pulumi state. + +```mermaid +flowchart LR + A[Base revision] --> C[Mock Pulumi graph] + B[Proposed merge] --> D[Mock Pulumi graph] + C --> E[Resource diff] + D --> E + E --> F[Summary and PR comment] +``` + +Run the actual Pulumi program with SDK mocks and synthetic provider configuration. Record deterministic resource identifiers, inputs, explicit dependencies and supported lifecycle options. Compare additions, removals and changes. + +Run both revisions in network-disabled containers without infrastructure credentials. Publish bounded advisory output through a separate default-branch workflow that never executes PR code. Treat artifacts as untrusted and bind results to the relevant revisions. + +## Done when + +- [ ] All managed integrations are represented and repeated runs are deterministic. +- [ ] Tests cover resource additions, removals and modifications. +- [ ] Fork PRs receive feedback; verify comment publishing after the workflow reaches main. +- [ ] No provider credentials or production state are needed. +- [ ] Existing live preview and deploy workflows are unchanged. + +This is a desired-resource comparison, not a live-state preview, replacement analysis or trusted authorization check. diff --git a/docs/proposals/self-service/02-declarative-users-and-roles.md b/docs/proposals/self-service/02-declarative-users-and-roles.md new file mode 100644 index 0000000..b22ef6d --- /dev/null +++ b/docs/proposals/self-service/02-declarative-users-and-roles.md @@ -0,0 +1,65 @@ +# 2. Declarative users and roles + +[Roadmap](README.md) · Depends on [1](01-credential-free-previews.md) · Implementation: [#291](https://github.com/modelcontextprotocol/access/pull/291) (revise the draft to YAML) + +Split monolithic user and role definitions into files that can be reviewed independently. Keep the existing typed provisioning interfaces during the migration. + +## Configuration + +`config/users/example-user.yaml`: + +```yaml +github: example-user +githubUserId: 12345678 +discord: "123456789012345678" +firstName: Example +lastName: User +``` + +`config/roles/infrastructure-wg/role.yaml`: + +```yaml +description: Infrastructure Working Group +github: + team: infrastructure-wg +discord: + role: infrastructure working group (synced) +``` + +`config/roles/infrastructure-wg/members.yaml`: + +```yaml +users: + - example-user +roles: [] +``` + +Use stable filename/directory identifiers, independent of changes to provider identities. Preserve intentionally separate accounts. Ownership is added in [5](05-ownership-and-policies.md). + +## Inheritance + +The granting role lists nested roles. For example, `working-groups/members.yaml`: + +```yaml +users: [] +roles: + - id: infrastructure-wg + platforms: + - github + - discord +``` + +Preserve existing provider semantics, including Workspace provisioning eligibility inherited via GitHub relationships. Discord-only edges must not create GitHub access; do not introduce inheritance for direct-only grants. + +## Validation and migration + +Use TypeScript runtime schemas (Zod) and inferred types. Discover files automatically. Bound parser input and reject duplicate YAML keys, aliases, custom tags, unknown fields, unsafe paths/symlinks and unexpected files. Validate unique identities (including normalized provider IDs and generated Workspace addresses), references, memberships, provider identifiers, cycles and multiple GitHub parents. + +Keep `MEMBERS` and `ROLES` compatible. Compare all evaluated identity fields, direct memberships, role definitions and inheritance against the original configuration; coordinate with roster changes such as [#252](https://github.com/modelcontextprotocol/access/pull/252). + +## Done when + +- [ ] Existing identity and provisioning fields, roles and memberships are preserved. +- [ ] Invalid configurations fail with useful errors and regression tests. +- [ ] Reproducible semantic comparison and mock preview show no unintended changes. +- [ ] No change to administrative authority or existing access policies. diff --git a/docs/proposals/self-service/03-declarative-resources.md b/docs/proposals/self-service/03-declarative-resources.md new file mode 100644 index 0000000..1c15bfa --- /dev/null +++ b/docs/proposals/self-service/03-declarative-resources.md @@ -0,0 +1,42 @@ +# 3. Declarative infrastructure resources + +[Roadmap](README.md) · Depends on [2](02-declarative-users-and-roles.md) + +Move GitHub repository definitions and grants to individually reviewable configuration. Start with GitHub; extend the same pattern to other providers later. + +`config/resources/github/repositories/ext-example/resource.yaml`: + +```yaml +description: Example MCP extension +visibility: public +managed: true +``` + +`config/resources/github/repositories/ext-example/access.yaml`: + +```yaml +roles: + infrastructure-wg: admin + moderators: maintain + members: triage +``` + +These are illustrative grants, not a delegation policy. + +```mermaid +flowchart LR + U[Users] --> R[Roles] + X[Repository access grants] --> R + X --> P[Repository] +``` + +Resources grant access to roles, not the reverse. Preserve existing direct-user grants where necessary. Defaults, security requirements and provider implementation remain in TypeScript. + +Distinguish new managed resources, access-only management, explicit adoption, rename/transfer and archival/deletion. Never implicitly adopt resources or interpret a directory rename/removal as permission to destroy a resource. Preserve Pulumi names and lifecycle options; validate names, references and permission levels. + +## Done when + +- [ ] Existing repository settings and grants are preserved. +- [ ] New repositories can be defined using validated YAML. +- [ ] Settings and grants are separately reviewable. +- [ ] Semantic and mock graph comparisons show equivalent desired state; lifecycle review confirms no unintended replacement or archival. diff --git a/docs/proposals/self-service/04-effective-access.md b/docs/proposals/self-service/04-effective-access.md new file mode 100644 index 0000000..259481a --- /dev/null +++ b/docs/proposals/self-service/04-effective-access.md @@ -0,0 +1,32 @@ +# 4. Effective-access calculation + +[Roadmap](README.md) · Depends on [2](02-declarative-users-and-roles.md) and [3](03-declarative-resources.md) + +A membership change can grant access across several providers. File diffs alone cannot show its security impact. + +Calculate deterministic effective managed access from the trusted base and proposed configuration, including transitive membership and identity remapping. + +| Provider | Calculate | +| --- | --- | +| GitHub | Nested teams, repository permissions, organization roles | +| Discord | Direct/implied roles, managed role and channel permissions | +| Google Workspace | Groups, provisioning and SSO eligibility | +| Cloudflare | Managed app access and team-based sign-in eligibility | +| npm / PyPI | Declared publishing access; mark manually managed grants | + +Example report: + +```text ++ example-user: GitHub python-sdk (maintain) + via python-sdk → sdk-maintainers ++ example-user: Discord SDK maintainers role +- another-user: GitHub ext-example (push) +``` + +Show the source and inheritance path of grants. Report identity changes even when memberships are unchanged. Clearly distinguish desired managed access from unmanaged or unknown live state; do not claim a complete live permissions audit. + +## Done when + +- [ ] Machine-readable and human-readable diffs explain who gains/loses access and why. +- [ ] Tests cover provider-specific inheritance, overlapping grants and identity changes. +- [ ] Indirect escalation and unknown/unmanaged access are visible to policy evaluation. diff --git a/docs/proposals/self-service/05-ownership-and-policies.md b/docs/proposals/self-service/05-ownership-and-policies.md new file mode 100644 index 0000000..46a97f9 --- /dev/null +++ b/docs/proposals/self-service/05-ownership-and-policies.md @@ -0,0 +1,54 @@ +# 5. Ownership and approval policies + +[Roadmap](README.md) · Depends on [4](04-effective-access.md) + +Introduce administrative ownership without granting provider admin privileges. + +## Ownership + +`config/roles/infrastructure-wg/owners.yaml`: + +```yaml +users: + - example-user +roles: + - infrastructure-wg-leads +``` + +Use the same two-field schema for resources. Owners are resolved against the trusted base, using direct membership by default. Missing/empty ownership means central administration only. Ownership changes remain centrally approved, as do changes that expand administrative authority through an owner-bearing role. + +## Policies + +Keep approval logic in protected TypeScript, not YAML. Illustrative API: + +```ts +minApprovals(1, roleOwners(roleId)); + +allOf( + minApprovals(2, CORE_MAINTAINERS), + minApprovals(1, LEAD_MAINTAINERS), +); +``` + +Support automatic authorization for explicitly allowed low-risk operations; minimum approvals, role-specific approvers, combined requirements, majority/supermajority/unanimity and optional formal consensus. Define electorates, denominators and whether the same person can satisfy multiple requirements. + +Example thresholds for discussion: + +| Operation | Proposed requirement | +| --- | --- | +| Ordinary membership | One role owner | +| Experimental repository creation | Authorized facilitator | +| Routine resource access/settings | Resource owner, within limits | +| Privileged identity / repository admin grant | Two Core Maintainers | +| Inheritance / ownership | Central approval | +| Organization-wide security | Core and Lead approval | +| Formal consensus | Applicable governance policy | + +Evaluate effective access and administrative authority, not just changed paths. Enforce mandatory defaults before any delegated or central approval; unknown operations fail closed. Ordinary membership never needs MCP Voting. + +## Done when + +- [ ] Ownership is separate from membership and provider permissions. +- [ ] Typed policies calculate eligible approvers and requirements per operation. +- [ ] Tests cover owner-bearing roles, inheritance, overlapping requirements and escalation. +- [ ] Existing approval rules remain in force until [6](06-secure-self-service.md). diff --git a/docs/proposals/self-service/06-secure-self-service.md b/docs/proposals/self-service/06-secure-self-service.md new file mode 100644 index 0000000..8bde8b4 --- /dev/null +++ b/docs/proposals/self-service/06-secure-self-service.md @@ -0,0 +1,32 @@ +# 6. Secure delegated self-service + +[Roadmap](README.md) · Depends on [5](05-ownership-and-policies.md) + +Enforce policies with a trusted required GitHub check before permitting delegated changes. + +```mermaid +flowchart TD + A[PR data] --> B[Trusted validation and access diff] + C[Protected base: owners and policies] --> B + B --> D[Required approvals] + E[Verified GitHub reviews] --> F[Verify all requirements] + D --> F + F --> G[Revalidate final merge candidate] + G --> H[Protected main and Pulumi] +``` + +Start with verified identity onboarding, membership changes, compliant experimental repositories, role grants and permitted resource settings. + +Evaluate authority using protected base code, schemas and dependencies; never execute contributed code with credentials. Use verified numeric GitHub IDs linked to stable people, so multiple accounts cannot count as multiple approvals. Prevent self-approval, approval by newly appointed owners and conflicting/withdrawn approvals from satisfying requirements. Bind evidence to the candidate or verified semantic change and revalidate when the base changes. + +Protect policies, workflows and deployment code with separate central review, required checks and appropriate repository/merge controls. Do not let a PR change its own verifier. Audit narrowly restricted emergency bypass. Production deployment uses only protected main. + +## Done when + +- [ ] Authorized routine changes can proceed without central intervention or Voting. +- [ ] Explicitly permitted low-risk operations can be automatically authorized. +- [ ] Unauthorized changes cannot pass the required check. +- [ ] Tests cover identity substitution, self-appointment, nested grants, duplicate accounts, stale reviews, concurrent PRs and lifecycle/security bypass. +- [ ] Final merge candidates are revalidated and production credentials never reach untrusted execution. + +Repository protection and any required GitHub App permissions need maintainer configuration before enabling delegation. diff --git a/docs/proposals/self-service/07-consensus-integration.md b/docs/proposals/self-service/07-consensus-integration.md new file mode 100644 index 0000000..8690a8d --- /dev/null +++ b/docs/proposals/self-service/07-consensus-integration.md @@ -0,0 +1,44 @@ +# 7. Optional automated consensus + +[Roadmap](README.md) · Depends on [5](05-ownership-and-policies.md) and [6](06-secure-self-service.md) + +Reuse [MCP Voting](https://voting.modelcontextprotocol.io/) for decisions that explicitly require formal consensus. Ordinary membership and resource management use GitHub approvals and must not depend on Voting. + +```ts +requireConsensus({ + electorate: CORE_MAINTAINERS, + threshold: 'absolute-majority', + confidentiality: 'confidential-ballot', + duration: '7d', +}); +``` + +Illustrative only: the actual mechanism, duration, electorate, confidentiality and veto rules follow applicable governance policy. Consensus does not necessarily mean unanimity. Sealed results do not by themselves guarantee anonymous ballots. + +```mermaid +sequenceDiagram + participant A as Access + participant V as Voting + participant G as GitHub + A->>V: Create or find poll (change digest) + A->>G: Post link; check pending + Note over V: Voting period + V-->>A: Outcome notification + A->>V: Retrieve and verify decision + A->>G: Update authorization check +``` + +Create polls idempotently, scoped to repository, PR, immutable change digest and policy. Use authenticated notifications and periodic reconciliation; do not occupy a CI runner waiting for votes. + +Verify authenticated structured evidence including electorate, mechanism, affirmative count, threshold, closure, veto and supersession. A displayed winner or contributor-provided URL is insufficient. Distinguish turnout quorum, plurality and absolute majority; preserve ballot confidentiality and avoid transferring individual votes. + +Revalidate before merge; material changes invalidate the relevant evidence. Reject stale, unrelated, incomplete, rejected, vetoed or superseded decisions. If Voting is unavailable, only consensus-required changes remain pending. + +## Done when + +- [ ] Policies can initiate a single poll and asynchronously await a verified outcome. +- [ ] Tests cover replay, changed PRs, missed events, threshold failures and vetoes. +- [ ] Routine self-service works with Voting unavailable. +- [ ] Git remains the source of truth; votes do not directly provision privileges. + +Coordinate the service API and any voting changes with [modelcontextprotocol/voting](https://github.com/modelcontextprotocol/voting). Roster synchronization is out of scope. diff --git a/docs/proposals/self-service/README.md b/docs/proposals/self-service/README.md new file mode 100644 index 0000000..0de235e --- /dev/null +++ b/docs/proposals/self-service/README.md @@ -0,0 +1,151 @@ +# Self-service access and infrastructure management + +Routine access changes should not require a central administrator. Let maintainers and working group leads manage their own memberships and infrastructure, within centrally enforced limits. + +This is a proposal for discussion, not a change to existing access or governance. + +## How it works + +```mermaid +flowchart TD + A[Configuration PR] --> B[Validate and calculate access changes] + B --> C[Ownership and TypeScript policies] + C --> D[GitHub approvals] + C -. Only when consensus is required .-> E[MCP Voting] + D --> F[Trusted authorization check] + E --> F + F --> G[Protected main] + G --> H[Pulumi] + H --> I[GitHub / Discord / Google / Cloudflare] +``` + +Git is the source of truth. YAML describes desired state; TypeScript defines schemas, policies, defaults and enforcement. Resources grant permissions to roles, and roles contain users or other roles. Ownership is separate from membership and provider permissions. + +## Proposed repository structure + +```text +access/ +├── config/ +│ ├── users/ +│ │ └── example-user.yaml +│ ├── roles/ +│ │ ├── core-maintainers/ +│ │ │ ├── role.yaml +│ │ │ ├── members.yaml +│ │ │ └── owners.yaml +│ │ └── infrastructure-wg/ +│ │ ├── role.yaml +│ │ ├── members.yaml +│ │ └── owners.yaml +│ └── resources/ +│ ├── github/ +│ │ └── repositories/ +│ │ └── ext-example/ +│ │ ├── resource.yaml +│ │ ├── access.yaml +│ │ └── owners.yaml +│ ├── discord/channels/ +│ ├── google/groups/ +│ └── cloudflare/applications/ +├── src/ +│ ├── schemas/ +│ │ ├── user.ts +│ │ ├── role.ts +│ │ ├── membership.ts +│ │ ├── ownership.ts +│ │ └── resources/ +│ ├── config/ +│ │ ├── users.ts +│ │ ├── roles.ts +│ │ └── resources.ts +│ ├── policies/ +│ │ ├── identities.ts +│ │ ├── membership.ts +│ │ ├── ownership.ts +│ │ ├── github.ts +│ │ ├── discord.ts +│ │ ├── google.ts +│ │ └── cloudflare.ts +│ ├── effective-access/ +│ ├── authorization/ +│ ├── integrations/ +│ │ └── voting.ts (optional) +│ ├── github.ts +│ ├── discord.ts +│ ├── google.ts +│ ├── cloudflare.ts +│ └── index.ts +├── scripts/ +├── .github/ +│ ├── CODEOWNERS +│ └── workflows/ +│ ├── ci.yml +│ ├── pr-preview.yml +│ ├── preview-comment.yml +│ ├── authorize.yml +│ ├── preview.yml +│ └── deploy.yml +├── Pulumi.yaml +├── Pulumi.prod.yaml +└── README.md +``` + +Illustrative target, not an exhaustive inventory of existing files. + +## What is self-service? + +| File | Purpose | Management | +| --- | --- | --- | +| `users/*.yaml` | Verified identities | Verified onboarding / identity admins | +| `role.yaml` | Role definition | Central | +| `members.yaml` | Membership | Role owners, within policy | +| `owners.yaml` | Administrative ownership | Central | +| `resource.yaml` | Resource settings | Resource owners, within policy | +| `access.yaml` | Access grants | Resource owners, within policy | +| `src/` and workflows | Schemas, policies, enforcement and provisioning | Protected code | + +For example, a role's `members.yaml` might contain: + +```yaml +users: + - example-user +roles: [] +``` + +Its separate `owners.yaml` might contain: + +```yaml +roles: + - infrastructure-wg-leads +``` + +An owner is eligible to approve changes; ownership does not itself grant membership or provider admin permissions. Policies define permitted operations and thresholds (one owner, multiple Core/Lead Maintainers, or automatic authorization for explicitly allowed low-risk changes). These thresholds are proposals for review, not new governance rules. + +## Roadmap + +```mermaid +flowchart TD + A[1. Credential-free previews] --> B[2. Users and roles] + B --> C[3. Resources] + C --> D[4. Effective access] + D --> E[5. Ownership and policies] + E --> F[6. Secure self-service] + F --> G[Self-service ready] + F -. Optional .-> H[7. Automated consensus] +``` + +- [ ] [1. Credential-free previews](01-credential-free-previews.md) — [#292](https://github.com/modelcontextprotocol/access/pull/292) +- [ ] [2. Declarative users and roles](02-declarative-users-and-roles.md) — [#291](https://github.com/modelcontextprotocol/access/pull/291) +- [ ] [3. Declarative resources](03-declarative-resources.md) +- [ ] [4. Effective access](04-effective-access.md) +- [ ] [5. Ownership and policies](05-ownership-and-policies.md) +- [ ] [6. Secure self-service](06-secure-self-service.md) +- [ ] [7. Optional automated consensus](07-consensus-integration.md) + +Each stage is independently reviewable. Preserve existing access through migrations; retain current approval requirements until the enforcement mechanism is ready. + +## Boundaries + +No new configuration database, custom policy language, voting platform or frontend. Existing live preview and deployment are outside the preview refactor. Do not expose privileged credentials to contributed code. Routine membership and infrastructure management must work without MCP Voting. + +The proposal succeeds when ordinary changes can be made by the people responsible for them, without weakening infrastructure security or governance. From b303ebb2ab41d4efd3ce44cbb3f53b5229821f42 Mon Sep 17 00:00:00 2001 From: Sambhav Kothari Date: Fri, 4 Dec 2026 04:05:59 +0000 Subject: [PATCH 02/10] docs: lead self-service proposal with examples and entity relationships --- .../01-credential-free-previews.md | 12 +++ .../02-declarative-users-and-roles.md | 8 +- .../self-service/03-declarative-resources.md | 6 +- .../self-service/04-effective-access.md | 20 ++--- .../self-service/05-ownership-and-policies.md | 18 +++-- .../self-service/06-secure-self-service.md | 14 ++++ .../self-service/07-consensus-integration.md | 6 +- docs/proposals/self-service/README.md | 79 ++++++++++--------- 8 files changed, 104 insertions(+), 59 deletions(-) diff --git a/docs/proposals/self-service/01-credential-free-previews.md b/docs/proposals/self-service/01-credential-free-previews.md index 68bb03f..42781ba 100644 --- a/docs/proposals/self-service/01-credential-free-previews.md +++ b/docs/proposals/self-service/01-credential-free-previews.md @@ -2,6 +2,18 @@ [Roadmap](README.md) · Implementation: [#292](https://github.com/modelcontextprotocol/access/pull/292) +## Example: PR preview + +```text ++ GitHub team membership: infrastructure-wg / example-user +~ GitHub repository: ext-example (description) +- Discord role membership: old-user / infrastructure-wg +``` + +A contributor sees an advisory desired-resource diff, even on a fork PR. + +## Approach + PRs need infrastructure feedback without access to production credentials or Pulumi state. ```mermaid diff --git a/docs/proposals/self-service/02-declarative-users-and-roles.md b/docs/proposals/self-service/02-declarative-users-and-roles.md index b22ef6d..ab1b2c9 100644 --- a/docs/proposals/self-service/02-declarative-users-and-roles.md +++ b/docs/proposals/self-service/02-declarative-users-and-roles.md @@ -2,9 +2,7 @@ [Roadmap](README.md) · Depends on [1](01-credential-free-previews.md) · Implementation: [#291](https://github.com/modelcontextprotocol/access/pull/291) (revise the draft to YAML) -Split monolithic user and role definitions into files that can be reviewed independently. Keep the existing typed provisioning interfaces during the migration. - -## Configuration +## Example: a working group member `config/users/example-user.yaml`: @@ -34,6 +32,10 @@ users: roles: [] ``` +## Approach + +Split monolithic user and role definitions into files that can be reviewed independently. Keep the existing typed provisioning interfaces during the migration. + Use stable filename/directory identifiers, independent of changes to provider identities. Preserve intentionally separate accounts. Ownership is added in [5](05-ownership-and-policies.md). ## Inheritance diff --git a/docs/proposals/self-service/03-declarative-resources.md b/docs/proposals/self-service/03-declarative-resources.md index 1c15bfa..1b154f8 100644 --- a/docs/proposals/self-service/03-declarative-resources.md +++ b/docs/proposals/self-service/03-declarative-resources.md @@ -2,7 +2,7 @@ [Roadmap](README.md) · Depends on [2](02-declarative-users-and-roles.md) -Move GitHub repository definitions and grants to individually reviewable configuration. Start with GitHub; extend the same pattern to other providers later. +## Example: an extension repository `config/resources/github/repositories/ext-example/resource.yaml`: @@ -23,6 +23,10 @@ roles: These are illustrative grants, not a delegation policy. +## Approach + +Move GitHub repository definitions and grants to individually reviewable configuration. Start with GitHub; extend the same pattern to other providers later. + ```mermaid flowchart LR U[Users] --> R[Roles] diff --git a/docs/proposals/self-service/04-effective-access.md b/docs/proposals/self-service/04-effective-access.md index 259481a..ad128d6 100644 --- a/docs/proposals/self-service/04-effective-access.md +++ b/docs/proposals/self-service/04-effective-access.md @@ -2,6 +2,17 @@ [Roadmap](README.md) · Depends on [2](02-declarative-users-and-roles.md) and [3](03-declarative-resources.md) +## Example: effective access diff + +```text ++ example-user: GitHub python-sdk (maintain) + via python-sdk → sdk-maintainers ++ example-user: Discord SDK maintainers role +- another-user: GitHub ext-example (push) +``` + +## Approach + A membership change can grant access across several providers. File diffs alone cannot show its security impact. Calculate deterministic effective managed access from the trusted base and proposed configuration, including transitive membership and identity remapping. @@ -14,15 +25,6 @@ Calculate deterministic effective managed access from the trusted base and propo | Cloudflare | Managed app access and team-based sign-in eligibility | | npm / PyPI | Declared publishing access; mark manually managed grants | -Example report: - -```text -+ example-user: GitHub python-sdk (maintain) - via python-sdk → sdk-maintainers -+ example-user: Discord SDK maintainers role -- another-user: GitHub ext-example (push) -``` - Show the source and inheritance path of grants. Report identity changes even when memberships are unchanged. Clearly distinguish desired managed access from unmanaged or unknown live state; do not claim a complete live permissions audit. ## Done when diff --git a/docs/proposals/self-service/05-ownership-and-policies.md b/docs/proposals/self-service/05-ownership-and-policies.md index 46a97f9..124f621 100644 --- a/docs/proposals/self-service/05-ownership-and-policies.md +++ b/docs/proposals/self-service/05-ownership-and-policies.md @@ -2,9 +2,7 @@ [Roadmap](README.md) · Depends on [4](04-effective-access.md) -Introduce administrative ownership without granting provider admin privileges. - -## Ownership +## Example: who can approve a change? `config/roles/infrastructure-wg/owners.yaml`: @@ -15,15 +13,21 @@ roles: - infrastructure-wg-leads ``` -Use the same two-field schema for resources. Owners are resolved against the trusted base, using direct membership by default. Missing/empty ownership means central administration only. Ownership changes remain centrally approved, as do changes that expand administrative authority through an owner-bearing role. +For an ordinary membership change, a protected policy could require one eligible owner approval: + +```ts +minApprovals(1, roleOwners(roleId)); +``` + +## Ownership + +Introduce administrative ownership without granting provider admin privileges. Use the same two-field schema for resources. Owners are resolved against the trusted base, using direct membership by default. Missing/empty ownership means central administration only. Ownership changes remain centrally approved, as do changes that expand administrative authority through an owner-bearing role. ## Policies -Keep approval logic in protected TypeScript, not YAML. Illustrative API: +Keep approval logic in protected TypeScript, not YAML. For higher-risk changes, the illustrative API can combine approval requirements: ```ts -minApprovals(1, roleOwners(roleId)); - allOf( minApprovals(2, CORE_MAINTAINERS), minApprovals(1, LEAD_MAINTAINERS), diff --git a/docs/proposals/self-service/06-secure-self-service.md b/docs/proposals/self-service/06-secure-self-service.md index 8bde8b4..3a455c7 100644 --- a/docs/proposals/self-service/06-secure-self-service.md +++ b/docs/proposals/self-service/06-secure-self-service.md @@ -2,6 +2,20 @@ [Roadmap](README.md) · Depends on [5](05-ownership-and-policies.md) +## Example: a WG lead approves a membership PR + +```text +Change: add example-user to infrastructure-wg +Policy: one existing role owner +Effective access: ordinary WG permissions +Review: approved by eligible WG lead +Authorization: PASS (no vote required) +``` + +A PR that also appoints its author as owner or grants repository admin access cannot pass under that ordinary-membership policy. + +## Approach + Enforce policies with a trusted required GitHub check before permitting delegated changes. ```mermaid diff --git a/docs/proposals/self-service/07-consensus-integration.md b/docs/proposals/self-service/07-consensus-integration.md index 8690a8d..d360dba 100644 --- a/docs/proposals/self-service/07-consensus-integration.md +++ b/docs/proposals/self-service/07-consensus-integration.md @@ -2,7 +2,7 @@ [Roadmap](README.md) · Depends on [5](05-ownership-and-policies.md) and [6](06-secure-self-service.md) -Reuse [MCP Voting](https://voting.modelcontextprotocol.io/) for decisions that explicitly require formal consensus. Ordinary membership and resource management use GitHub approvals and must not depend on Voting. +## Example: a change requiring formal consensus ```ts requireConsensus({ @@ -15,6 +15,10 @@ requireConsensus({ Illustrative only: the actual mechanism, duration, electorate, confidentiality and veto rules follow applicable governance policy. Consensus does not necessarily mean unanimity. Sealed results do not by themselves guarantee anonymous ballots. +## Approach + +Reuse [MCP Voting](https://voting.modelcontextprotocol.io/) for decisions that explicitly require formal consensus. Ordinary membership and resource management use GitHub approvals and must not depend on Voting. + ```mermaid sequenceDiagram participant A as Access diff --git a/docs/proposals/self-service/README.md b/docs/proposals/self-service/README.md index 0de235e..efb2d18 100644 --- a/docs/proposals/self-service/README.md +++ b/docs/proposals/self-service/README.md @@ -4,6 +4,43 @@ Routine access changes should not require a central administrator. Let maintaine This is a proposal for discussion, not a change to existing access or governance. +## Entity relationships + +```mermaid +flowchart LR + U[User] -->|member of| R[Role] + N[Nested role] -->|member of| R + X[Resource] -->|grants permission to| R + U -->|can be an owner| O[Ownership] + R -->|can be an owner| O + O -->|owns| R + O -->|owns| X + O -->|identifies eligible approvers| A[Change authorization] + P[TypeScript policy] -->|constrains operations and approvals| A +``` + +Membership determines access. Ownership identifies eligible approvers, not provider permissions. Policies determine which changes those owners can authorize. + +## Example: adding a working group member + +Edit `config/roles/infrastructure-wg/members.yaml`: + +```yaml +users: + - example-user +roles: [] +``` + +The existing `owners.yaml` identifies eligible approvers: + +```yaml +users: [] +roles: + - infrastructure-wg-leads +``` + +A protected TypeScript policy could require one eligible owner approval. The PR shows effective access changes; after authorization and merge, Pulumi applies them. No vote is needed for ordinary membership. + ## How it works ```mermaid @@ -23,6 +60,8 @@ Git is the source of truth. YAML describes desired state; TypeScript defines sch ## Proposed repository structure +Most contributors edit only `config/`. Protected implementation details are shown at a high level. + ```text access/ ├── config/ @@ -47,34 +86,13 @@ access/ │ ├── discord/channels/ │ ├── google/groups/ │ └── cloudflare/applications/ -├── src/ +├── src/ # Protected TypeScript │ ├── schemas/ -│ │ ├── user.ts -│ │ ├── role.ts -│ │ ├── membership.ts -│ │ ├── ownership.ts -│ │ └── resources/ │ ├── config/ -│ │ ├── users.ts -│ │ ├── roles.ts -│ │ └── resources.ts │ ├── policies/ -│ │ ├── identities.ts -│ │ ├── membership.ts -│ │ ├── ownership.ts -│ │ ├── github.ts -│ │ ├── discord.ts -│ │ ├── google.ts -│ │ └── cloudflare.ts │ ├── effective-access/ │ ├── authorization/ -│ ├── integrations/ -│ │ └── voting.ts (optional) -│ ├── github.ts -│ ├── discord.ts -│ ├── google.ts -│ ├── cloudflare.ts -│ └── index.ts +│ └── … # Pulumi/provider code and integrations ├── scripts/ ├── .github/ │ ├── CODEOWNERS @@ -104,21 +122,6 @@ Illustrative target, not an exhaustive inventory of existing files. | `access.yaml` | Access grants | Resource owners, within policy | | `src/` and workflows | Schemas, policies, enforcement and provisioning | Protected code | -For example, a role's `members.yaml` might contain: - -```yaml -users: - - example-user -roles: [] -``` - -Its separate `owners.yaml` might contain: - -```yaml -roles: - - infrastructure-wg-leads -``` - An owner is eligible to approve changes; ownership does not itself grant membership or provider admin permissions. Policies define permitted operations and thresholds (one owner, multiple Core/Lead Maintainers, or automatic authorization for explicitly allowed low-risk changes). These thresholds are proposals for review, not new governance rules. ## Roadmap From 15cc8166f3e63e435b1585c9c8df08f44b63d123 Mon Sep 17 00:00:00 2001 From: Sambhav Kothari Date: Fri, 4 Dec 2026 04:08:39 +0000 Subject: [PATCH 03/10] docs: replace entity Mermaid with designed relationship graphic --- docs/proposals/self-service/README.md | 13 +-- .../self-service/entity-relationships.svg | 97 +++++++++++++++++++ 2 files changed, 98 insertions(+), 12 deletions(-) create mode 100644 docs/proposals/self-service/entity-relationships.svg diff --git a/docs/proposals/self-service/README.md b/docs/proposals/self-service/README.md index efb2d18..2c53bf4 100644 --- a/docs/proposals/self-service/README.md +++ b/docs/proposals/self-service/README.md @@ -6,18 +6,7 @@ This is a proposal for discussion, not a change to existing access or governance ## Entity relationships -```mermaid -flowchart LR - U[User] -->|member of| R[Role] - N[Nested role] -->|member of| R - X[Resource] -->|grants permission to| R - U -->|can be an owner| O[Ownership] - R -->|can be an owner| O - O -->|owns| R - O -->|owns| X - O -->|identifies eligible approvers| A[Change authorization] - P[TypeScript policy] -->|constrains operations and approvals| A -``` +![Entity relationships: membership and resource access are separate from ownership and policy-based authorization.](entity-relationships.svg) Membership determines access. Ownership identifies eligible approvers, not provider permissions. Policies determine which changes those owners can authorize. diff --git a/docs/proposals/self-service/entity-relationships.svg b/docs/proposals/self-service/entity-relationships.svg new file mode 100644 index 0000000..43f78e0 --- /dev/null +++ b/docs/proposals/self-service/entity-relationships.svg @@ -0,0 +1,97 @@ + + MCP Access — Entity relationships + Users and nested roles are members of roles. Resources grant permissions to roles. Separately, existing users and roles may own roles or resources. Ownership determines eligible approvers, and protected TypeScript policies determine authorization requirements. + + + + + + + MCP Access · Entity relationships + Separate what people can access from what they can approve. + + + + 01 / ACCESS + Who receives which permissions? + + + + Users & nested roles + Verified people or other roles + users/*.yaml + roles/*/members.yaml + + + member of + + + + Role + Infrastructure WG, maintainers + role.yaml + members.yaml + + + grants + permissions to + + + + Resource + Repository, channel, group, app + resource.yaml + access.yaml + + + + 02 / GOVERNANCE + Who can authorize a proposed change? + + + + Ownership + Existing users or roles + own a role or resource. + owners.yaml + No provider permissions implied + + + eligible + approvers + + + + Change authorization + Verify the proposed change + and required approvals. + GitHub reviews by default + Voting only for formal consensus + + + defines + requirements + + + + Policy + Allowed operations, approval + thresholds and security rules + src/policies/*.ts + Protected TypeScript + + + Membership ≠ ownership. + Owners may approve only changes permitted by centrally enforced policy. + \ No newline at end of file From f3abdfb1255d88123506b6b3f9261731836130d4 Mon Sep 17 00:00:00 2001 From: Sambhav Kothari Date: Fri, 4 Dec 2026 04:14:06 +0000 Subject: [PATCH 04/10] docs: simplify self-service entity relationship graphic --- .../self-service/entity-relationships.svg | 175 ++++++++---------- 1 file changed, 79 insertions(+), 96 deletions(-) diff --git a/docs/proposals/self-service/entity-relationships.svg b/docs/proposals/self-service/entity-relationships.svg index 43f78e0..f8ca449 100644 --- a/docs/proposals/self-service/entity-relationships.svg +++ b/docs/proposals/self-service/entity-relationships.svg @@ -1,97 +1,80 @@ - - MCP Access — Entity relationships - Users and nested roles are members of roles. Resources grant permissions to roles. Separately, existing users and roles may own roles or resources. Ownership determines eligible approvers, and protected TypeScript policies determine authorization requirements. - - - - - - - MCP Access · Entity relationships - Separate what people can access from what they can approve. - - - - 01 / ACCESS - Who receives which permissions? - - - - Users & nested roles - Verified people or other roles - users/*.yaml - roles/*/members.yaml - - - member of - - - - Role - Infrastructure WG, maintainers - role.yaml - members.yaml - - - grants - permissions to - - - - Resource - Repository, channel, group, app - resource.yaml - access.yaml - - - - 02 / GOVERNANCE - Who can authorize a proposed change? - - - - Ownership - Existing users or roles - own a role or resource. - owners.yaml - No provider permissions implied - - - eligible - approvers - - - - Change authorization - Verify the proposed change - and required approvals. - GitHub reviews by default - Voting only for formal consensus - - - defines - requirements - - - - Policy - Allowed operations, approval - thresholds and security rules - src/policies/*.ts - Protected TypeScript - - - Membership ≠ ownership. - Owners may approve only changes permitted by centrally enforced policy. + +MCP Access — self-service access model +Users and nested roles belong to roles. Resources grant permissions to roles. Owners, which are existing users or roles, own roles or resources and identify eligible approvers. Centrally managed TypeScript policies define the requirements for authorizing changes. + + + + + + +MCP Access · Self-service model +Who gets access, who owns it, and who can approve changes. + + + +member of + +grants +permissions to + + +owns + +owns + +eligible +approvers + + +defines approval requirements + + + + + Users + Verified identities + Users or nested roles + users/*.yaml + + + + + Roles + Working groups, maintainers + and other teams + role.yaml · members.yaml + + + + + Resources + GitHub repos, Discord channels + Workspace groups, apps + resource.yaml · access.yaml + + + + + Policies + Allowed changes and thresholds + Protected TypeScript + + + + + Owners + Existing users or roles + owners.yaml + + + + + Authorization + GitHub PR approvals + Voting only for formal consensus + + +Membership determines access. +Ownership determines eligible approvers. +Policy determines sufficient approvals. \ No newline at end of file From e58f516748ae939128b95c48cb15d5fc94a433ff Mon Sep 17 00:00:00 2001 From: Sambhav Kothari Date: Fri, 4 Dec 2026 04:15:41 +0000 Subject: [PATCH 05/10] docs: match compact layered architecture and approval diagrams --- .../self-service/05-ownership-and-policies.md | 4 + .../self-service/06-secure-self-service.md | 11 +-- .../self-service/07-consensus-integration.md | 13 +-- docs/proposals/self-service/README.md | 28 +------ .../self-service/authorization-workflow.svg | 1 + .../self-service/entity-relationships.svg | 81 +------------------ .../self-service/ownership-and-policies.svg | 1 + 7 files changed, 12 insertions(+), 127 deletions(-) create mode 100644 docs/proposals/self-service/authorization-workflow.svg create mode 100644 docs/proposals/self-service/ownership-and-policies.svg diff --git a/docs/proposals/self-service/05-ownership-and-policies.md b/docs/proposals/self-service/05-ownership-and-policies.md index 124f621..9e9a2c9 100644 --- a/docs/proposals/self-service/05-ownership-and-policies.md +++ b/docs/proposals/self-service/05-ownership-and-policies.md @@ -50,6 +50,10 @@ Example thresholds for discussion: Evaluate effective access and administrative authority, not just changed paths. Enforce mandatory defaults before any delegated or central approval; unknown operations fail closed. Ordinary membership never needs MCP Voting. +## How they work together + +![Ownership and policies feed the trusted authorisation engine](ownership-and-policies.svg) + ## Done when - [ ] Ownership is separate from membership and provider permissions. diff --git a/docs/proposals/self-service/06-secure-self-service.md b/docs/proposals/self-service/06-secure-self-service.md index 3a455c7..ae72867 100644 --- a/docs/proposals/self-service/06-secure-self-service.md +++ b/docs/proposals/self-service/06-secure-self-service.md @@ -18,16 +18,7 @@ A PR that also appoints its author as owner or grants repository admin access ca Enforce policies with a trusted required GitHub check before permitting delegated changes. -```mermaid -flowchart TD - A[PR data] --> B[Trusted validation and access diff] - C[Protected base: owners and policies] --> B - B --> D[Required approvals] - E[Verified GitHub reviews] --> F[Verify all requirements] - D --> F - F --> G[Revalidate final merge candidate] - G --> H[Protected main and Pulumi] -``` +![Self-service authorisation workflow](authorization-workflow.svg) Start with verified identity onboarding, membership changes, compliant experimental repositories, role grants and permitted resource settings. diff --git a/docs/proposals/self-service/07-consensus-integration.md b/docs/proposals/self-service/07-consensus-integration.md index d360dba..faa078d 100644 --- a/docs/proposals/self-service/07-consensus-integration.md +++ b/docs/proposals/self-service/07-consensus-integration.md @@ -19,18 +19,7 @@ Illustrative only: the actual mechanism, duration, electorate, confidentiality a Reuse [MCP Voting](https://voting.modelcontextprotocol.io/) for decisions that explicitly require formal consensus. Ordinary membership and resource management use GitHub approvals and must not depend on Voting. -```mermaid -sequenceDiagram - participant A as Access - participant V as Voting - participant G as GitHub - A->>V: Create or find poll (change digest) - A->>G: Post link; check pending - Note over V: Voting period - V-->>A: Outcome notification - A->>V: Retrieve and verify decision - A->>G: Update authorization check -``` +![Self-service authorisation workflow: MCP Voting is required only when policy explicitly calls for consensus](authorization-workflow.svg) Create polls idempotently, scoped to repository, PR, immutable change digest and policy. Use authenticated notifications and periodic reconciliation; do not occupy a CI runner waiting for votes. diff --git a/docs/proposals/self-service/README.md b/docs/proposals/self-service/README.md index 2c53bf4..c4cdf59 100644 --- a/docs/proposals/self-service/README.md +++ b/docs/proposals/self-service/README.md @@ -4,9 +4,9 @@ Routine access changes should not require a central administrator. Let maintaine This is a proposal for discussion, not a change to existing access or governance. -## Entity relationships +## Target architecture -![Entity relationships: membership and resource access are separate from ownership and policy-based authorization.](entity-relationships.svg) +![Target architecture: declarative YAML, protected TypeScript and managed providers.](entity-relationships.svg) Membership determines access. Ownership identifies eligible approvers, not provider permissions. Policies determine which changes those owners can authorize. @@ -32,18 +32,7 @@ A protected TypeScript policy could require one eligible owner approval. The PR ## How it works -```mermaid -flowchart TD - A[Configuration PR] --> B[Validate and calculate access changes] - B --> C[Ownership and TypeScript policies] - C --> D[GitHub approvals] - C -. Only when consensus is required .-> E[MCP Voting] - D --> F[Trusted authorization check] - E --> F - F --> G[Protected main] - G --> H[Pulumi] - H --> I[GitHub / Discord / Google / Cloudflare] -``` +![Self-service authorisation workflow](authorization-workflow.svg) Git is the source of truth. YAML describes desired state; TypeScript defines schemas, policies, defaults and enforcement. Resources grant permissions to roles, and roles contain users or other roles. Ownership is separate from membership and provider permissions. @@ -115,17 +104,6 @@ An owner is eligible to approve changes; ownership does not itself grant members ## Roadmap -```mermaid -flowchart TD - A[1. Credential-free previews] --> B[2. Users and roles] - B --> C[3. Resources] - C --> D[4. Effective access] - D --> E[5. Ownership and policies] - E --> F[6. Secure self-service] - F --> G[Self-service ready] - F -. Optional .-> H[7. Automated consensus] -``` - - [ ] [1. Credential-free previews](01-credential-free-previews.md) — [#292](https://github.com/modelcontextprotocol/access/pull/292) - [ ] [2. Declarative users and roles](02-declarative-users-and-roles.md) — [#291](https://github.com/modelcontextprotocol/access/pull/291) - [ ] [3. Declarative resources](03-declarative-resources.md) diff --git a/docs/proposals/self-service/authorization-workflow.svg b/docs/proposals/self-service/authorization-workflow.svg new file mode 100644 index 0000000..08563b1 --- /dev/null +++ b/docs/proposals/self-service/authorization-workflow.svg @@ -0,0 +1 @@ +Self-service authorisation workflowPolicies determine required approval evidence. Routine changes use GitHub approval or explicit automatic authorization. MCP Voting is optional and used only when formal consensus is required. A trusted check verifies all required evidence before merge and deployment.Self-service requestGitHub PR · configuration changeOwnership + TypeScript policiesDetermine required approvalsGitHub approvalsOwners / Core / LeadDefault path · auto if permittedMCP VotingFormal consensusOnly when requiredVerify authorisationAll required evidence · trusted baseRevalidate final merge candidateReject stale or changed evidenceMerge and Pulumi deploy diff --git a/docs/proposals/self-service/entity-relationships.svg b/docs/proposals/self-service/entity-relationships.svg index f8ca449..7b02aa0 100644 --- a/docs/proposals/self-service/entity-relationships.svg +++ b/docs/proposals/self-service/entity-relationships.svg @@ -1,80 +1 @@ - -MCP Access — self-service access model -Users and nested roles belong to roles. Resources grant permissions to roles. Owners, which are existing users or roles, own roles or resources and identify eligible approvers. Centrally managed TypeScript policies define the requirements for authorizing changes. - - - - - - -MCP Access · Self-service model -Who gets access, who owns it, and who can approve changes. - - - -member of - -grants -permissions to - - -owns - -owns - -eligible -approvers - - -defines approval requirements - - - - - Users - Verified identities - Users or nested roles - users/*.yaml - - - - - Roles - Working groups, maintainers - and other teams - role.yaml · members.yaml - - - - - Resources - GitHub repos, Discord channels - Workspace groups, apps - resource.yaml · access.yaml - - - - - Policies - Allowed changes and thresholds - Protected TypeScript - - - - - Owners - Existing users or roles - owners.yaml - - - - - Authorization - GitHub PR approvals - Voting only for formal consensus - - -Membership determines access. -Ownership determines eligible approvers. -Policy determines sufficient approvals. - \ No newline at end of file +MCP Access — target architectureDeclarative YAML defines users, roles, resource grants and ownership. Protected TypeScript validates and authorizes changes against trusted configuration. Pulumi reconciles protected main to providers.DECLARATIVE CONFIGURATION · YAMLMembershipAccess grantsNestedrolesUsersIdentity detailsRolesDefinitions + membershipResourcesSettings + access grantsOwnersUsers or rolesOwnership delegates approval; it does not grant access.PROTECTED CODE · TYPESCRIPTSchema validationEffective accessSecurity policiesAuthorisationPulumi reconciliationAuthorised changes only · protected mainGitHubDiscordGoogleCloudflare diff --git a/docs/proposals/self-service/ownership-and-policies.svg b/docs/proposals/self-service/ownership-and-policies.svg new file mode 100644 index 0000000..04f43bf --- /dev/null +++ b/docs/proposals/self-service/ownership-and-policies.svg @@ -0,0 +1 @@ +Ownership and policiesOwnership identifies eligible approvers; TypeScript policies determine what they may approve. The authorization engine evaluates both and the effective permission impact against trusted base configuration.OwnershipYAMLWho can manage it?PoliciesTypeScriptWhat can they do?Authorisation engineEvaluate ownership, policy and effective accessagainst trusted base configurationAuthorisedDenied / pending From 8275ad501dbb65b85832fc1940a6785210f8890c Mon Sep 17 00:00:00 2001 From: Sambhav Kothari Date: Fri, 4 Dec 2026 04:17:14 +0000 Subject: [PATCH 06/10] docs: remove stale entity diagram path and use target architecture asset --- docs/proposals/self-service/README.md | 2 +- .../{entity-relationships.svg => target-architecture.svg} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename docs/proposals/self-service/{entity-relationships.svg => target-architecture.svg} (100%) diff --git a/docs/proposals/self-service/README.md b/docs/proposals/self-service/README.md index c4cdf59..91b2f38 100644 --- a/docs/proposals/self-service/README.md +++ b/docs/proposals/self-service/README.md @@ -6,7 +6,7 @@ This is a proposal for discussion, not a change to existing access or governance ## Target architecture -![Target architecture: declarative YAML, protected TypeScript and managed providers.](entity-relationships.svg) +![Target architecture: declarative YAML, protected TypeScript and managed providers.](target-architecture.svg) Membership determines access. Ownership identifies eligible approvers, not provider permissions. Policies determine which changes those owners can authorize. diff --git a/docs/proposals/self-service/entity-relationships.svg b/docs/proposals/self-service/target-architecture.svg similarity index 100% rename from docs/proposals/self-service/entity-relationships.svg rename to docs/proposals/self-service/target-architecture.svg From d6298e6f26fc6ac6fe8eac47032535c0ed340cc3 Mon Sep 17 00:00:00 2001 From: Sambhav Kothari Date: Fri, 4 Dec 2026 04:22:18 +0000 Subject: [PATCH 07/10] docs: consolidate self-service architecture and implementation plan --- .../01-credential-free-previews.md | 40 -- .../02-declarative-users-and-roles.md | 67 ---- .../self-service/03-declarative-resources.md | 46 --- .../self-service/04-effective-access.md | 34 -- .../self-service/05-ownership-and-policies.md | 62 --- .../self-service/06-secure-self-service.md | 37 -- .../self-service/07-consensus-integration.md | 37 -- docs/proposals/self-service/README.md | 358 ++++++++++++++---- 8 files changed, 278 insertions(+), 403 deletions(-) delete mode 100644 docs/proposals/self-service/01-credential-free-previews.md delete mode 100644 docs/proposals/self-service/02-declarative-users-and-roles.md delete mode 100644 docs/proposals/self-service/03-declarative-resources.md delete mode 100644 docs/proposals/self-service/04-effective-access.md delete mode 100644 docs/proposals/self-service/05-ownership-and-policies.md delete mode 100644 docs/proposals/self-service/06-secure-self-service.md delete mode 100644 docs/proposals/self-service/07-consensus-integration.md diff --git a/docs/proposals/self-service/01-credential-free-previews.md b/docs/proposals/self-service/01-credential-free-previews.md deleted file mode 100644 index 42781ba..0000000 --- a/docs/proposals/self-service/01-credential-free-previews.md +++ /dev/null @@ -1,40 +0,0 @@ -# 1. Credential-free infrastructure previews - -[Roadmap](README.md) · Implementation: [#292](https://github.com/modelcontextprotocol/access/pull/292) - -## Example: PR preview - -```text -+ GitHub team membership: infrastructure-wg / example-user -~ GitHub repository: ext-example (description) -- Discord role membership: old-user / infrastructure-wg -``` - -A contributor sees an advisory desired-resource diff, even on a fork PR. - -## Approach - -PRs need infrastructure feedback without access to production credentials or Pulumi state. - -```mermaid -flowchart LR - A[Base revision] --> C[Mock Pulumi graph] - B[Proposed merge] --> D[Mock Pulumi graph] - C --> E[Resource diff] - D --> E - E --> F[Summary and PR comment] -``` - -Run the actual Pulumi program with SDK mocks and synthetic provider configuration. Record deterministic resource identifiers, inputs, explicit dependencies and supported lifecycle options. Compare additions, removals and changes. - -Run both revisions in network-disabled containers without infrastructure credentials. Publish bounded advisory output through a separate default-branch workflow that never executes PR code. Treat artifacts as untrusted and bind results to the relevant revisions. - -## Done when - -- [ ] All managed integrations are represented and repeated runs are deterministic. -- [ ] Tests cover resource additions, removals and modifications. -- [ ] Fork PRs receive feedback; verify comment publishing after the workflow reaches main. -- [ ] No provider credentials or production state are needed. -- [ ] Existing live preview and deploy workflows are unchanged. - -This is a desired-resource comparison, not a live-state preview, replacement analysis or trusted authorization check. diff --git a/docs/proposals/self-service/02-declarative-users-and-roles.md b/docs/proposals/self-service/02-declarative-users-and-roles.md deleted file mode 100644 index ab1b2c9..0000000 --- a/docs/proposals/self-service/02-declarative-users-and-roles.md +++ /dev/null @@ -1,67 +0,0 @@ -# 2. Declarative users and roles - -[Roadmap](README.md) · Depends on [1](01-credential-free-previews.md) · Implementation: [#291](https://github.com/modelcontextprotocol/access/pull/291) (revise the draft to YAML) - -## Example: a working group member - -`config/users/example-user.yaml`: - -```yaml -github: example-user -githubUserId: 12345678 -discord: "123456789012345678" -firstName: Example -lastName: User -``` - -`config/roles/infrastructure-wg/role.yaml`: - -```yaml -description: Infrastructure Working Group -github: - team: infrastructure-wg -discord: - role: infrastructure working group (synced) -``` - -`config/roles/infrastructure-wg/members.yaml`: - -```yaml -users: - - example-user -roles: [] -``` - -## Approach - -Split monolithic user and role definitions into files that can be reviewed independently. Keep the existing typed provisioning interfaces during the migration. - -Use stable filename/directory identifiers, independent of changes to provider identities. Preserve intentionally separate accounts. Ownership is added in [5](05-ownership-and-policies.md). - -## Inheritance - -The granting role lists nested roles. For example, `working-groups/members.yaml`: - -```yaml -users: [] -roles: - - id: infrastructure-wg - platforms: - - github - - discord -``` - -Preserve existing provider semantics, including Workspace provisioning eligibility inherited via GitHub relationships. Discord-only edges must not create GitHub access; do not introduce inheritance for direct-only grants. - -## Validation and migration - -Use TypeScript runtime schemas (Zod) and inferred types. Discover files automatically. Bound parser input and reject duplicate YAML keys, aliases, custom tags, unknown fields, unsafe paths/symlinks and unexpected files. Validate unique identities (including normalized provider IDs and generated Workspace addresses), references, memberships, provider identifiers, cycles and multiple GitHub parents. - -Keep `MEMBERS` and `ROLES` compatible. Compare all evaluated identity fields, direct memberships, role definitions and inheritance against the original configuration; coordinate with roster changes such as [#252](https://github.com/modelcontextprotocol/access/pull/252). - -## Done when - -- [ ] Existing identity and provisioning fields, roles and memberships are preserved. -- [ ] Invalid configurations fail with useful errors and regression tests. -- [ ] Reproducible semantic comparison and mock preview show no unintended changes. -- [ ] No change to administrative authority or existing access policies. diff --git a/docs/proposals/self-service/03-declarative-resources.md b/docs/proposals/self-service/03-declarative-resources.md deleted file mode 100644 index 1b154f8..0000000 --- a/docs/proposals/self-service/03-declarative-resources.md +++ /dev/null @@ -1,46 +0,0 @@ -# 3. Declarative infrastructure resources - -[Roadmap](README.md) · Depends on [2](02-declarative-users-and-roles.md) - -## Example: an extension repository - -`config/resources/github/repositories/ext-example/resource.yaml`: - -```yaml -description: Example MCP extension -visibility: public -managed: true -``` - -`config/resources/github/repositories/ext-example/access.yaml`: - -```yaml -roles: - infrastructure-wg: admin - moderators: maintain - members: triage -``` - -These are illustrative grants, not a delegation policy. - -## Approach - -Move GitHub repository definitions and grants to individually reviewable configuration. Start with GitHub; extend the same pattern to other providers later. - -```mermaid -flowchart LR - U[Users] --> R[Roles] - X[Repository access grants] --> R - X --> P[Repository] -``` - -Resources grant access to roles, not the reverse. Preserve existing direct-user grants where necessary. Defaults, security requirements and provider implementation remain in TypeScript. - -Distinguish new managed resources, access-only management, explicit adoption, rename/transfer and archival/deletion. Never implicitly adopt resources or interpret a directory rename/removal as permission to destroy a resource. Preserve Pulumi names and lifecycle options; validate names, references and permission levels. - -## Done when - -- [ ] Existing repository settings and grants are preserved. -- [ ] New repositories can be defined using validated YAML. -- [ ] Settings and grants are separately reviewable. -- [ ] Semantic and mock graph comparisons show equivalent desired state; lifecycle review confirms no unintended replacement or archival. diff --git a/docs/proposals/self-service/04-effective-access.md b/docs/proposals/self-service/04-effective-access.md deleted file mode 100644 index ad128d6..0000000 --- a/docs/proposals/self-service/04-effective-access.md +++ /dev/null @@ -1,34 +0,0 @@ -# 4. Effective-access calculation - -[Roadmap](README.md) · Depends on [2](02-declarative-users-and-roles.md) and [3](03-declarative-resources.md) - -## Example: effective access diff - -```text -+ example-user: GitHub python-sdk (maintain) - via python-sdk → sdk-maintainers -+ example-user: Discord SDK maintainers role -- another-user: GitHub ext-example (push) -``` - -## Approach - -A membership change can grant access across several providers. File diffs alone cannot show its security impact. - -Calculate deterministic effective managed access from the trusted base and proposed configuration, including transitive membership and identity remapping. - -| Provider | Calculate | -| --- | --- | -| GitHub | Nested teams, repository permissions, organization roles | -| Discord | Direct/implied roles, managed role and channel permissions | -| Google Workspace | Groups, provisioning and SSO eligibility | -| Cloudflare | Managed app access and team-based sign-in eligibility | -| npm / PyPI | Declared publishing access; mark manually managed grants | - -Show the source and inheritance path of grants. Report identity changes even when memberships are unchanged. Clearly distinguish desired managed access from unmanaged or unknown live state; do not claim a complete live permissions audit. - -## Done when - -- [ ] Machine-readable and human-readable diffs explain who gains/loses access and why. -- [ ] Tests cover provider-specific inheritance, overlapping grants and identity changes. -- [ ] Indirect escalation and unknown/unmanaged access are visible to policy evaluation. diff --git a/docs/proposals/self-service/05-ownership-and-policies.md b/docs/proposals/self-service/05-ownership-and-policies.md deleted file mode 100644 index 9e9a2c9..0000000 --- a/docs/proposals/self-service/05-ownership-and-policies.md +++ /dev/null @@ -1,62 +0,0 @@ -# 5. Ownership and approval policies - -[Roadmap](README.md) · Depends on [4](04-effective-access.md) - -## Example: who can approve a change? - -`config/roles/infrastructure-wg/owners.yaml`: - -```yaml -users: - - example-user -roles: - - infrastructure-wg-leads -``` - -For an ordinary membership change, a protected policy could require one eligible owner approval: - -```ts -minApprovals(1, roleOwners(roleId)); -``` - -## Ownership - -Introduce administrative ownership without granting provider admin privileges. Use the same two-field schema for resources. Owners are resolved against the trusted base, using direct membership by default. Missing/empty ownership means central administration only. Ownership changes remain centrally approved, as do changes that expand administrative authority through an owner-bearing role. - -## Policies - -Keep approval logic in protected TypeScript, not YAML. For higher-risk changes, the illustrative API can combine approval requirements: - -```ts -allOf( - minApprovals(2, CORE_MAINTAINERS), - minApprovals(1, LEAD_MAINTAINERS), -); -``` - -Support automatic authorization for explicitly allowed low-risk operations; minimum approvals, role-specific approvers, combined requirements, majority/supermajority/unanimity and optional formal consensus. Define electorates, denominators and whether the same person can satisfy multiple requirements. - -Example thresholds for discussion: - -| Operation | Proposed requirement | -| --- | --- | -| Ordinary membership | One role owner | -| Experimental repository creation | Authorized facilitator | -| Routine resource access/settings | Resource owner, within limits | -| Privileged identity / repository admin grant | Two Core Maintainers | -| Inheritance / ownership | Central approval | -| Organization-wide security | Core and Lead approval | -| Formal consensus | Applicable governance policy | - -Evaluate effective access and administrative authority, not just changed paths. Enforce mandatory defaults before any delegated or central approval; unknown operations fail closed. Ordinary membership never needs MCP Voting. - -## How they work together - -![Ownership and policies feed the trusted authorisation engine](ownership-and-policies.svg) - -## Done when - -- [ ] Ownership is separate from membership and provider permissions. -- [ ] Typed policies calculate eligible approvers and requirements per operation. -- [ ] Tests cover owner-bearing roles, inheritance, overlapping requirements and escalation. -- [ ] Existing approval rules remain in force until [6](06-secure-self-service.md). diff --git a/docs/proposals/self-service/06-secure-self-service.md b/docs/proposals/self-service/06-secure-self-service.md deleted file mode 100644 index ae72867..0000000 --- a/docs/proposals/self-service/06-secure-self-service.md +++ /dev/null @@ -1,37 +0,0 @@ -# 6. Secure delegated self-service - -[Roadmap](README.md) · Depends on [5](05-ownership-and-policies.md) - -## Example: a WG lead approves a membership PR - -```text -Change: add example-user to infrastructure-wg -Policy: one existing role owner -Effective access: ordinary WG permissions -Review: approved by eligible WG lead -Authorization: PASS (no vote required) -``` - -A PR that also appoints its author as owner or grants repository admin access cannot pass under that ordinary-membership policy. - -## Approach - -Enforce policies with a trusted required GitHub check before permitting delegated changes. - -![Self-service authorisation workflow](authorization-workflow.svg) - -Start with verified identity onboarding, membership changes, compliant experimental repositories, role grants and permitted resource settings. - -Evaluate authority using protected base code, schemas and dependencies; never execute contributed code with credentials. Use verified numeric GitHub IDs linked to stable people, so multiple accounts cannot count as multiple approvals. Prevent self-approval, approval by newly appointed owners and conflicting/withdrawn approvals from satisfying requirements. Bind evidence to the candidate or verified semantic change and revalidate when the base changes. - -Protect policies, workflows and deployment code with separate central review, required checks and appropriate repository/merge controls. Do not let a PR change its own verifier. Audit narrowly restricted emergency bypass. Production deployment uses only protected main. - -## Done when - -- [ ] Authorized routine changes can proceed without central intervention or Voting. -- [ ] Explicitly permitted low-risk operations can be automatically authorized. -- [ ] Unauthorized changes cannot pass the required check. -- [ ] Tests cover identity substitution, self-appointment, nested grants, duplicate accounts, stale reviews, concurrent PRs and lifecycle/security bypass. -- [ ] Final merge candidates are revalidated and production credentials never reach untrusted execution. - -Repository protection and any required GitHub App permissions need maintainer configuration before enabling delegation. diff --git a/docs/proposals/self-service/07-consensus-integration.md b/docs/proposals/self-service/07-consensus-integration.md deleted file mode 100644 index faa078d..0000000 --- a/docs/proposals/self-service/07-consensus-integration.md +++ /dev/null @@ -1,37 +0,0 @@ -# 7. Optional automated consensus - -[Roadmap](README.md) · Depends on [5](05-ownership-and-policies.md) and [6](06-secure-self-service.md) - -## Example: a change requiring formal consensus - -```ts -requireConsensus({ - electorate: CORE_MAINTAINERS, - threshold: 'absolute-majority', - confidentiality: 'confidential-ballot', - duration: '7d', -}); -``` - -Illustrative only: the actual mechanism, duration, electorate, confidentiality and veto rules follow applicable governance policy. Consensus does not necessarily mean unanimity. Sealed results do not by themselves guarantee anonymous ballots. - -## Approach - -Reuse [MCP Voting](https://voting.modelcontextprotocol.io/) for decisions that explicitly require formal consensus. Ordinary membership and resource management use GitHub approvals and must not depend on Voting. - -![Self-service authorisation workflow: MCP Voting is required only when policy explicitly calls for consensus](authorization-workflow.svg) - -Create polls idempotently, scoped to repository, PR, immutable change digest and policy. Use authenticated notifications and periodic reconciliation; do not occupy a CI runner waiting for votes. - -Verify authenticated structured evidence including electorate, mechanism, affirmative count, threshold, closure, veto and supersession. A displayed winner or contributor-provided URL is insufficient. Distinguish turnout quorum, plurality and absolute majority; preserve ballot confidentiality and avoid transferring individual votes. - -Revalidate before merge; material changes invalidate the relevant evidence. Reject stale, unrelated, incomplete, rejected, vetoed or superseded decisions. If Voting is unavailable, only consensus-required changes remain pending. - -## Done when - -- [ ] Policies can initiate a single poll and asynchronously await a verified outcome. -- [ ] Tests cover replay, changed PRs, missed events, threshold failures and vetoes. -- [ ] Routine self-service works with Voting unavailable. -- [ ] Git remains the source of truth; votes do not directly provision privileges. - -Coordinate the service API and any voting changes with [modelcontextprotocol/voting](https://github.com/modelcontextprotocol/voting). Roster synchronization is out of scope. diff --git a/docs/proposals/self-service/README.md b/docs/proposals/self-service/README.md index 91b2f38..2895e8a 100644 --- a/docs/proposals/self-service/README.md +++ b/docs/proposals/self-service/README.md @@ -1,121 +1,319 @@ # Self-service access and infrastructure management -Routine access changes should not require a central administrator. Let maintainers and working group leads manage their own memberships and infrastructure, within centrally enforced limits. +Let maintainers and working group leads manage their own memberships and infrastructure through GitHub PRs, without waiting for a central administrator for every routine change. -This is a proposal for discussion, not a change to existing access or governance. +**YAML describes desired state. Protected TypeScript decides what is allowed. Pulumi applies authorised changes.** Formal voting is optional and only used where governance requires consensus. -## Target architecture +Proposal for discussion; no changes to existing access or governance are made by this document. -![Target architecture: declarative YAML, protected TypeScript and managed providers.](target-architecture.svg) +## 1. Target architecture -Membership determines access. Ownership identifies eligible approvers, not provider permissions. Policies determine which changes those owners can authorize. +![Target architecture: users, roles, resources and owners in YAML; protected TypeScript and Pulumi manage infrastructure.](target-architecture.svg) -## Example: adding a working group member +| Concept | Purpose | +| --- | --- | +| User | Verified identity across providers | +| Role | Users and nested roles; provider-specific membership | +| Resource | Infrastructure settings and access grants | +| Owner | Existing user or role eligible to approve changes | +| Policy | Protected rules defining allowed operations and approval requirements | -Edit `config/roles/infrastructure-wg/members.yaml`: +Ownership does not itself grant membership or infrastructure permissions. -```yaml -users: - - example-user -roles: [] -``` - -The existing `owners.yaml` identifies eligible approvers: - -```yaml -users: [] -roles: - - infrastructure-wg-leads -``` - -A protected TypeScript policy could require one eligible owner approval. The PR shows effective access changes; after authorization and merge, Pulumi applies them. No vote is needed for ordinary membership. - -## How it works - -![Self-service authorisation workflow](authorization-workflow.svg) +## 2. Repository structure -Git is the source of truth. YAML describes desired state; TypeScript defines schemas, policies, defaults and enforcement. Resources grant permissions to roles, and roles contain users or other roles. Ownership is separate from membership and provider permissions. - -## Proposed repository structure - -Most contributors edit only `config/`. Protected implementation details are shown at a high level. +Most contributors only need to edit files under `config/`. ```text access/ -├── config/ +├── config/ # Declarative YAML │ ├── users/ │ │ └── example-user.yaml │ ├── roles/ -│ │ ├── core-maintainers/ +│ │ ├── infrastructure-wg/ │ │ │ ├── role.yaml │ │ │ ├── members.yaml │ │ │ └── owners.yaml -│ │ └── infrastructure-wg/ -│ │ ├── role.yaml -│ │ ├── members.yaml -│ │ └── owners.yaml +│ │ ├── infrastructure-wg-leads/ +│ │ └── … │ └── resources/ -│ ├── github/ -│ │ └── repositories/ -│ │ └── ext-example/ -│ │ ├── resource.yaml -│ │ ├── access.yaml -│ │ └── owners.yaml +│ ├── github/repositories/ +│ │ └── ext-example/ +│ │ ├── resource.yaml +│ │ ├── access.yaml +│ │ └── owners.yaml │ ├── discord/channels/ │ ├── google/groups/ │ └── cloudflare/applications/ -├── src/ # Protected TypeScript +├── src/ # Protected TypeScript │ ├── schemas/ │ ├── config/ │ ├── policies/ │ ├── effective-access/ │ ├── authorization/ -│ └── … # Pulumi/provider code and integrations -├── scripts/ -├── .github/ -│ ├── CODEOWNERS -│ └── workflows/ -│ ├── ci.yml -│ ├── pr-preview.yml -│ ├── preview-comment.yml -│ ├── authorize.yml -│ ├── preview.yml -│ └── deploy.yml +│ └── … # Existing Pulumi/provider code +├── .github/ # Protected workflows and CODEOWNERS ├── Pulumi.yaml -├── Pulumi.prod.yaml -└── README.md +└── … +``` + +Illustrative target structure; start with GitHub resources and extend to other providers incrementally. + +## 3. Configuration by example + +### Users + +One stable identifier per user; provider identities can change without renaming the file. + +`config/users/example-user.yaml` + +```yaml +github: example-user +githubUserId: 12345678 +discord: "123456789012345678" +firstName: Example +lastName: User +``` + +### Roles and membership + +`config/roles/infrastructure-wg/role.yaml` + +```yaml +description: Infrastructure Working Group +github: + team: infrastructure-wg +discord: + role: infrastructure working group (synced) +``` + +`config/roles/infrastructure-wg/members.yaml` + +```yaml +users: + - example-user +roles: [] +``` + +Adding a member is a small edit to this file. A role can also contain other roles. For example, the parent role can inherit Infrastructure WG members only for the specified platforms: + +`config/roles/working-groups/members.yaml` + +```yaml +users: [] +roles: + - id: infrastructure-wg + platforms: + - github + - discord ``` -Illustrative target, not an exhaustive inventory of existing files. +Preserve existing provider-specific inheritance, including Workspace provisioning eligibility via GitHub relationships. Discord-only inheritance must not grant GitHub access; direct-only grants must remain direct-only. -## What is self-service? +### Resources and access -| File | Purpose | Management | +`config/resources/github/repositories/ext-example/resource.yaml` + +```yaml +description: Example MCP extension +visibility: public +managed: true +``` + +`config/resources/github/repositories/ext-example/access.yaml` + +```yaml +roles: + infrastructure-wg: admin + moderators: maintain + members: triage +``` + +The resource declares which roles receive which permissions. Preserve existing direct-user grants where needed. These example permissions do not imply that an owner can grant them. + +### Owners + +The same ownership format applies to a role or a resource. + +`config/roles/infrastructure-wg/owners.yaml` + +```yaml +users: [] +roles: + - infrastructure-wg-leads +``` + +An existing lead may approve a membership change if policy allows it. Owners are resolved from the trusted base, using direct role membership by default. Empty or missing ownership means central administration only. + +## 4. Delegation and policies + +![Ownership defines eligible approvers; policies define permitted operations; the authorisation engine evaluates both.](ownership-and-policies.svg) + +| What changes? | Who can manage it? | +| --- | --- | +| User identities | Verified onboarding / identity admins | +| Role definitions | Central maintainers | +| Ordinary role membership | Role owners, within policy | +| Resource settings and access | Resource owners, within policy | +| Ownership and administrative authority | Central maintainers | +| Schemas, policies, workflows, defaults | Protected TypeScript / central review | + +Policies should maximise delegation where it is safe, without allowing contributors to change their own guardrails. + +Illustrative TypeScript policy primitives: + +```ts +// Ordinary membership +minApprovals(1, roleOwners(roleId)); + +// Higher-risk changes +allOf( + minApprovals(2, CORE_MAINTAINERS), + minApprovals(1, LEAD_MAINTAINERS), +); +``` + +**Proposed approval requirements** (for review, not new governance rules): + +| Operation | Requirement | +| --- | --- | +| Explicitly permitted low-risk changes | Automatic authorisation | +| Ordinary membership | One eligible role owner | +| Compliant experimental repository creation | Authorised facilitator | +| Routine resource access/settings | Resource owner, within limits | +| Privileged identity or repository admin grant | Two Core Maintainers | +| Inheritance or ownership changes | Central approval | +| Organisation-wide security changes | Core and Lead approval | +| Formal governance decisions | Applicable consensus policy | + +Support role-specific minimum approvals, combined requirements, and majority, supermajority or unanimity when applicable. Define the electorate, denominator and whether one person can satisfy multiple requirements. Mandatory security defaults apply regardless of approver; unknown operations fail closed. + +## 5. What a contributor sees + +A PR adding an existing user to a working group should expose both the infrastructure diff and the effective access impact. + +**Infrastructure preview** — desired-resource changes: + +```diff ++ GitHub team membership: infrastructure-wg / example-user ++ Discord role membership: example-user / infrastructure-wg +``` + +**Effective access** — who gains or loses permissions, and why: + +```diff ++ example-user: GitHub ext-example (admin) + via infrastructure-wg ++ example-user: Discord Infrastructure WG role +``` + +The admin grant in this illustrative example requires the higher-risk policy above; a seemingly ordinary membership edit must not bypass it. For ordinary WG permissions, the authorisation check could instead report: + +```text +Required: one existing role owner +Review: approved by eligible WG lead +Authorisation: PASS +Voting: not required +``` + +Calculate effective managed access for GitHub (teams, repos, organisation roles), Discord (roles and channels), Workspace (groups, provisioning and SSO), Cloudflare (app access), and declared npm/PyPI publishing grants. Explain inheritance paths, overlapping grants and identity remapping. Mark unmanaged or unknown access explicitly. + +The mock preview is advisory: it compares desired resources, not live state or replacement risk. It is not an authorisation check or a complete live permissions audit. + +## 6. Authorisation and deployment + +![Self-service request, policy evaluation, GitHub approvals or formal consensus, trusted verification and deployment.](authorization-workflow.svg) + +Use a trusted required GitHub check. Evaluate the proposed change against protected base configuration and code, including effective access and administrative authority. Apply changes only from protected main. + +| Guardrail | Enforcement | +| --- | --- | +| No privilege escalation | Evaluate indirect access and changes to owner-bearing roles; no self-approval or newly appointed owners approving their own change. | +| Trusted identity | Verified numeric GitHub IDs mapped to stable people; multiple accounts cannot supply multiple approvals. | +| Valid approval evidence | Reject withdrawn, conflicting or stale reviews; bind evidence to the candidate or verified semantic change. Revalidate the final merge candidate and changes to the base. | +| Protected execution | Untrusted PR code never receives production credentials or state. Policies, schemas, dependencies and workflows cannot be replaced by the PR they authorise. | +| Safe infrastructure lifecycle | Never implicitly adopt, rename, transfer, archive or delete resources; preserve Pulumi identities and lifecycle options. | +| Central safeguards | Required checks, separate central review for protected code, merge controls and audited, narrowly restricted emergency bypass. | + +Repository protection and any required GitHub App permissions must be configured before delegation is enabled. + +### Optional formal consensus + +Reuse [MCP Voting](https://voting.modelcontextprotocol.io/) only for changes explicitly requiring formal consensus. Ordinary membership and resource management continue independently. + +```ts +requireConsensus({ + electorate: CORE_MAINTAINERS, + threshold: 'absolute-majority', + confidentiality: 'confidential-ballot', + duration: '7d', +}); +``` + +Example only; the actual electorate, threshold, duration, mechanism, confidentiality and veto rules follow applicable governance. Consensus is not necessarily unanimity, and sealed results alone do not guarantee anonymous ballots. + +Create or reuse a poll bound to the repository, PR, immutable change digest and policy. Post the link and leave the required check pending. Authenticated notifications plus periodic reconciliation retrieve the outcome without keeping a CI runner alive. + +Verify structured evidence (electorate, mechanism, affirmative count, threshold, closure, veto and supersession), not a displayed winner or submitted URL. Distinguish turnout quorum, plurality and absolute majority; preserve ballot confidentiality. Material changes invalidate evidence; reject stale, unrelated, rejected, incomplete or superseded results. If Voting is unavailable, only consensus-required changes remain pending. Votes never provision privileges directly. + +## 7. Implementation plan + +Deliver each stage independently, retaining existing access and approval rules until the authorisation check is ready. Steps 1–6 are sufficient for self-service; step 7 is optional. + +| Step | Deliverable | Depends on | | --- | --- | --- | -| `users/*.yaml` | Verified identities | Verified onboarding / identity admins | -| `role.yaml` | Role definition | Central | -| `members.yaml` | Membership | Role owners, within policy | -| `owners.yaml` | Administrative ownership | Central | -| `resource.yaml` | Resource settings | Resource owners, within policy | -| `access.yaml` | Access grants | Resource owners, within policy | -| `src/` and workflows | Schemas, policies, enforcement and provisioning | Protected code | +| 1 | [Credential-free previews](#1-credential-free-previews) · #292 | — | +| 2 | [Declarative users and roles](#2-declarative-users-and-roles) · #291 | 1 | +| 3 | [Declarative resources](#3-declarative-resources) | 2 | +| 4 | [Effective access](#4-effective-access) | 2, 3 | +| 5 | [Ownership and policies](#5-ownership-and-policies) | 4 | +| 6 | [Secure self-service](#6-secure-self-service) | 5 | +| 7 | [Optional consensus integration](#7-optional-consensus-integration) | 5, 6 | + +### 1. Credential-free previews + +Existing PR: [#292](https://github.com/modelcontextprotocol/access/pull/292). + +- Run the actual Pulumi program with SDK mocks and synthetic provider configuration for both base and proposed merge revisions, in network-disabled containers. +- Compare deterministic resource identifiers, inputs, explicit dependencies and supported lifecycle options. Publish bounded advisory results through a separate default-branch workflow that never executes PR code; treat artifacts as untrusted and bind them to the revisions. +- **Done when:** all managed integrations are represented, addition/removal/modification tests pass, repeated runs are deterministic, fork PR comments are verified after rollout, and existing live preview/deploy remain unchanged. + +### 2. Declarative users and roles + +Existing PR: [#291](https://github.com/modelcontextprotocol/access/pull/291), revise to YAML. + +- Discover files automatically with TypeScript runtime schemas (Zod) and inferred types; retain compatible `MEMBERS` and `ROLES` interfaces. +- Bound parser inputs; reject duplicate keys, aliases, custom tags, unknown fields, unexpected files and unsafe paths/symlinks. Validate unique normalized identities, generated Workspace addresses, references, provider identifiers, cycles and multiple GitHub parents; preserve intentionally separate accounts. +- **Done when:** original and migrated identities, provisioning fields, role definitions, direct membership and inheritance match semantically; mock preview has no unintended changes; invalid inputs have regression tests. Coordinate roster changes such as [#252](https://github.com/modelcontextprotocol/access/pull/252). + +### 3. Declarative resources + +- Migrate GitHub repository settings and grants to separate files; keep provider defaults and security requirements in TypeScript. +- Distinguish new managed resources, access-only management and explicit adoption, rename/transfer and archival/deletion. Validate names, references and permission levels. +- **Done when:** existing settings/grants are preserved, new repositories can be defined through validated YAML, and semantic/mock comparison plus lifecycle review confirm no unintended replacement or archival. + +### 4. Effective access + +- Calculate deterministic base-versus-proposed managed permissions and identity changes, including transitive memberships and overlapping grants. +- **Done when:** machine-readable and human-readable diffs explain gains/losses and their sources; tests cover provider-specific inheritance, overlapping grants and identity remapping; policy evaluation sees indirect escalation and unmanaged/unknown access. + +### 5. Ownership and policies + +- Introduce the shared ownership schema and typed approval requirements, including automatic authorisation for explicitly permitted changes. Resolve authority from the trusted base. +- **Done when:** ownership remains separate from access; eligible approvers and requirements are computed per operation; tests cover owner-bearing roles, inheritance, overlapping requirements and escalation. Existing approval rules remain in force. -An owner is eligible to approve changes; ownership does not itself grant membership or provider admin permissions. Policies define permitted operations and thresholds (one owner, multiple Core/Lead Maintainers, or automatic authorization for explicitly allowed low-risk changes). These thresholds are proposals for review, not new governance rules. +### 6. Secure self-service -## Roadmap +- Enable the trusted required check and repository protections. Start with verified onboarding, ordinary membership, compliant experimental repositories and permitted grants/settings. +- **Done when:** routine changes can proceed without central intervention or Voting; unauthorised changes cannot pass; regression tests cover identity substitution, self-appointment, nested grants, duplicate accounts, stale reviews, concurrent PRs and lifecycle/security bypass. Final candidates are revalidated and production credentials remain protected. -- [ ] [1. Credential-free previews](01-credential-free-previews.md) — [#292](https://github.com/modelcontextprotocol/access/pull/292) -- [ ] [2. Declarative users and roles](02-declarative-users-and-roles.md) — [#291](https://github.com/modelcontextprotocol/access/pull/291) -- [ ] [3. Declarative resources](03-declarative-resources.md) -- [ ] [4. Effective access](04-effective-access.md) -- [ ] [5. Ownership and policies](05-ownership-and-policies.md) -- [ ] [6. Secure self-service](06-secure-self-service.md) -- [ ] [7. Optional automated consensus](07-consensus-integration.md) +### 7. Optional consensus integration -Each stage is independently reviewable. Preserve existing access through migrations; retain current approval requirements until the enforcement mechanism is ready. +- Coordinate authenticated poll creation, notifications, reconciliation and evidence verification with [modelcontextprotocol/voting](https://github.com/modelcontextprotocol/voting). +- **Done when:** a policy can create a single poll and await a verified decision asynchronously; tests cover replay, changed PRs, missed events, threshold failures and vetoes. Routine self-service remains independent of Voting. -## Boundaries +## Out of scope -No new configuration database, custom policy language, voting platform or frontend. Existing live preview and deployment are outside the preview refactor. Do not expose privileged credentials to contributed code. Routine membership and infrastructure management must work without MCP Voting. +A new configuration database, custom policy language, voting platform or frontend; roster synchronisation; changes to live preview and deployment as part of the credential-free preview refactor. -The proposal succeeds when ordinary changes can be made by the people responsible for them, without weakening infrastructure security or governance. +Success means ordinary changes are managed by the people responsible for them, without weakening infrastructure security or governance. From 3f51a3d85e30fcb808def6fd2d5da53f20760b3b Mon Sep 17 00:00:00 2001 From: Sambhav Kothari Date: Fri, 4 Dec 2026 04:27:29 +0000 Subject: [PATCH 08/10] docs: expand delegated self-service to resource lifecycle and publishing --- docs/proposals/self-service/README.md | 127 ++++++++++++++++++-------- 1 file changed, 90 insertions(+), 37 deletions(-) diff --git a/docs/proposals/self-service/README.md b/docs/proposals/self-service/README.md index 2895e8a..986799d 100644 --- a/docs/proposals/self-service/README.md +++ b/docs/proposals/self-service/README.md @@ -1,8 +1,10 @@ # Self-service access and infrastructure management -Let maintainers and working group leads manage their own memberships and infrastructure through GitHub PRs, without waiting for a central administrator for every routine change. +Let maintainers, working group leads and other authorised contributors **create and manage the infrastructure they are responsible for** through GitHub PRs, without waiting for a central administrator for every change. This includes membership, new experimental and extension repositories, GitHub Pages, package publishing access, and ongoing resource management. -**YAML describes desired state. Protected TypeScript decides what is allowed. Pulumi applies authorised changes.** Formal voting is optional and only used where governance requires consensus. +**YAML describes desired state. Protected TypeScript decides what is allowed. Pulumi applies authorised changes where supported; registry changes that require manual execution follow an approved runbook.** Formal voting is optional and only used where governance requires consensus. + +The aim is self-service across the resource lifecycle: request → create → delegate ownership → manage → retire, with approvals appropriate to the operation and its risk. Proposal for discussion; no changes to existing access or governance are made by this document. @@ -38,13 +40,15 @@ access/ │ │ └── … │ └── resources/ │ ├── github/repositories/ -│ │ └── ext-example/ +│ │ └── experimental-ext-example/ │ │ ├── resource.yaml │ │ ├── access.yaml │ │ └── owners.yaml │ ├── discord/channels/ │ ├── google/groups/ -│ └── cloudflare/applications/ +│ ├── cloudflare/applications/ +│ ├── npm/packages/ +│ └── pypi/projects/ ├── src/ # Protected TypeScript │ ├── schemas/ │ ├── config/ @@ -57,7 +61,7 @@ access/ └── … ``` -Illustrative target structure; start with GitHub resources and extend to other providers incrementally. +Illustrative target structure; start with GitHub repository creation and management, then add Pages and other provider resources incrementally. Package registry declarations use the same configuration pattern even where execution is manual. ## 3. Configuration by example @@ -110,26 +114,65 @@ roles: Preserve existing provider-specific inheritance, including Workspace provisioning eligibility via GitHub relationships. Discord-only inheritance must not grant GitHub access; direct-only grants must remain direct-only. -### Resources and access +### Resources: create, own and manage + +A facilitator or maintainer can propose a new experimental repository, its initial permissions and its owners in one PR. The same files are used for later changes. Example target schema: -`config/resources/github/repositories/ext-example/resource.yaml` +`config/resources/github/repositories/experimental-ext-example/resource.yaml` ```yaml -description: Example MCP extension +description: Experimental MCP extension visibility: public managed: true +topics: + - mcp +pages: + enabled: true + source: + branch: main + path: /docs ``` -`config/resources/github/repositories/ext-example/access.yaml` +Pages is an illustrative proposed addition to the repository schema, not an existing capability of Access. It may be configured when creating the repository or enabled later, subject to policy and source availability. + +`config/resources/github/repositories/experimental-ext-example/access.yaml` ```yaml roles: - infrastructure-wg: admin + infrastructure-wg: maintain moderators: maintain members: triage ``` -The resource declares which roles receive which permissions. Preserve existing direct-user grants where needed. These example permissions do not imply that an owner can grant them. +`config/resources/github/repositories/experimental-ext-example/owners.yaml` + +```yaml +users: [] +roles: + - infrastructure-wg-leads +``` + +The creation policy validates the namespace (e.g. `experimental-ext-*`), required settings, initial grants and eligible owners using existing authority in the trusted base. A new resource cannot authorise its own creation through its proposed owners. Once created, its approved owners can request subsequent settings, Pages and access changes within policy. + +Keep security defaults, naming rules and lifecycle protections in TypeScript. Preserve existing direct-user grants where necessary. Repository ownership in Access is not equivalent to GitHub admin permission. + +### Package registry access + +Use the same pattern for package resources. For example, a maintainer requests publishing access or configures trusted publishing for an experimental package: + +`config/resources/npm/packages/experimental-ext-example/access.yaml` + +```yaml +roles: + infrastructure-wg: publish +trustedPublisher: + repository: modelcontextprotocol/experimental-ext-example + workflow: .github/workflows/release.yml +``` + +Illustrative schema: resolve verified registry identities from roles and enforce centrally maintained baseline maintainers and trusted-publishing policy. Changing a publisher repository or workflow is a sensitive operation, not a routine grant. + +npm and PyPI already have declared publishing access in `src/config/packageAccess.ts`. The current implementation documents interactive npm 2FA for mutations and no PyPI management API. For these providers, self-service means a reviewed, authorised request and declarative desired state, followed by manual execution by an authorised registry administrator and verification/drift reporting where supported. A merged PR alone must not claim that registry access was applied. Preserve unverified roster caveats and do not treat unknown access as absent. ### Owners @@ -143,7 +186,7 @@ roles: - infrastructure-wg-leads ``` -An existing lead may approve a membership change if policy allows it. Owners are resolved from the trusted base, using direct role membership by default. Empty or missing ownership means central administration only. +An existing lead may approve changes to an owned role or resource if policy allows it. Owners are resolved from the trusted base, using direct role membership by default. Empty or missing ownership means central administration only. ## 4. Delegation and policies @@ -154,7 +197,9 @@ An existing lead may approve a membership change if policy allows it. Owners are | User identities | Verified onboarding / identity admins | | Role definitions | Central maintainers | | Ordinary role membership | Role owners, within policy | -| Resource settings and access | Resource owners, within policy | +| New experimental / extension repositories | Eligible facilitators or maintainers under creation policy | +| Existing resources and Pages | Resource owners, within policy | +| Package publishing access / trusted publishers | Package owners and designated publishing approvers, within policy | | Ownership and administrative authority | Central maintainers | | Schemas, policies, workflows, defaults | Protected TypeScript / central review | @@ -166,6 +211,10 @@ Illustrative TypeScript policy primitives: // Ordinary membership minApprovals(1, roleOwners(roleId)); +// Repository creation in an allowed namespace +// Illustrative: resolve authority from the trusted base +minApprovals(1, authorisedFacilitators); + // Higher-risk changes allOf( minApprovals(2, CORE_MAINTAINERS), @@ -179,8 +228,13 @@ allOf( | --- | --- | | Explicitly permitted low-risk changes | Automatic authorisation | | Ordinary membership | One eligible role owner | -| Compliant experimental repository creation | Authorised facilitator | +| Compliant experimental repository creation | Eligible facilitator approval; validated namespace, initial grants and owners | +| Other repository creation / official designation | Applicable project and governance policy | | Routine resource access/settings | Resource owner, within limits | +| GitHub Pages creation or update | Resource owner, within approved publishing constraints | +| Package publishing access | Package owner plus designated publishing approval where required | +| Trusted publisher or release workflow changes | Elevated approval; verify repository/workflow binding | +| Resource retirement, transfer or destructive changes | Explicit central approval; no implicit destruction | | Privileged identity or repository admin grant | Two Core Maintainers | | Inheritance or ownership changes | Central approval | | Organisation-wide security changes | Core and Lead approval | @@ -190,32 +244,29 @@ Support role-specific minimum approvals, combined requirements, and majority, su ## 5. What a contributor sees -A PR adding an existing user to a working group should expose both the infrastructure diff and the effective access impact. - -**Infrastructure preview** — desired-resource changes: - -```diff -+ GitHub team membership: infrastructure-wg / example-user -+ Discord role membership: example-user / infrastructure-wg -``` +A PR creating the experimental repository above shows the desired infrastructure, initial grants and required approvals together. -**Effective access** — who gains or loses permissions, and why: +**Infrastructure preview** ```diff -+ example-user: GitHub ext-example (admin) - via infrastructure-wg -+ example-user: Discord Infrastructure WG role ++ GitHub repository: experimental-ext-example ++ GitHub Pages: main:/docs ++ GitHub repository grant: infrastructure-wg (maintain) ``` -The admin grant in this illustrative example requires the higher-risk policy above; a seemingly ordinary membership edit must not bypass it. For ordinary WG permissions, the authorisation check could instead report: +**Effective access and approval** ```text -Required: one existing role owner -Review: approved by eligible WG lead -Authorisation: PASS ++ Infrastructure WG: maintain repository ++ Infrastructure WG leads: eligible resource owners +Required: eligible facilitator approval +Checks: namespace, settings, initial grants, owners +Authorisation: PASS (after required approval) Voting: not required ``` +A later PR can change settings, add a team grant or enable Pages using the same workflow, with approval from existing resource owners within policy. A membership change also shows any indirect permission gains; higher-risk grants cannot bypass approval merely because they originate in a membership edit. + Calculate effective managed access for GitHub (teams, repos, organisation roles), Discord (roles and channels), Workspace (groups, provisioning and SSO), Cloudflare (app access), and declared npm/PyPI publishing grants. Explain inheritance paths, overlapping grants and identity remapping. Mark unmanaged or unknown access explicitly. The mock preview is advisory: it compares desired resources, not live state or replacement risk. It is not an authorisation check or a complete live permissions audit. @@ -224,7 +275,7 @@ The mock preview is advisory: it compares desired resources, not live state or r ![Self-service request, policy evaluation, GitHub approvals or formal consensus, trusted verification and deployment.](authorization-workflow.svg) -Use a trusted required GitHub check. Evaluate the proposed change against protected base configuration and code, including effective access and administrative authority. Apply changes only from protected main. +Use a trusted required GitHub check. Evaluate the proposed change against protected base configuration and code, including effective access and administrative authority. Apply automated changes only from protected main. For manual-only providers, track execution and verification separately from authorisation. | Guardrail | Enforcement | | --- | --- | @@ -233,6 +284,8 @@ Use a trusted required GitHub check. Evaluate the proposed change against protec | Valid approval evidence | Reject withdrawn, conflicting or stale reviews; bind evidence to the candidate or verified semantic change. Revalidate the final merge candidate and changes to the base. | | Protected execution | Untrusted PR code never receives production credentials or state. Policies, schemas, dependencies and workflows cannot be replaced by the PR they authorise. | | Safe infrastructure lifecycle | Never implicitly adopt, rename, transfer, archive or delete resources; preserve Pulumi identities and lifecycle options. | +| Creation authority | Evaluate the requester, approvers, namespace, initial ownership and grants against trusted base policy. | +| Publishing boundaries | Validate Pages sources, visibility, domains and trusted publisher bindings; protect release and deployment permissions. | | Central safeguards | Required checks, separate central review for protected code, merge controls and audited, narrowly restricted emergency bypass. | Repository protection and any required GitHub App permissions must be configured before delegation is enabled. @@ -288,9 +341,9 @@ Existing PR: [#291](https://github.com/modelcontextprotocol/access/pull/291), re ### 3. Declarative resources -- Migrate GitHub repository settings and grants to separate files; keep provider defaults and security requirements in TypeScript. +- Migrate GitHub repository settings and grants to separate files; support creation and subsequent settings/access management, including Pages configuration. Extend resource schemas to other providers and declared npm/PyPI publishing access; preserve the manual execution/drift workflow for registries. Keep provider defaults and security requirements in TypeScript. - Distinguish new managed resources, access-only management and explicit adoption, rename/transfer and archival/deletion. Validate names, references and permission levels. -- **Done when:** existing settings/grants are preserved, new repositories can be defined through validated YAML, and semantic/mock comparison plus lifecycle review confirm no unintended replacement or archival. +- **Done when:** existing settings/grants are preserved, experimental repositories and their initial access/ownership can be defined through validated YAML, Pages can be enabled under policy, package declarations retain existing publishing safeguards, and semantic/mock comparison plus lifecycle review confirm no unintended replacement or archival. ### 4. Effective access @@ -299,13 +352,13 @@ Existing PR: [#291](https://github.com/modelcontextprotocol/access/pull/291), re ### 5. Ownership and policies -- Introduce the shared ownership schema and typed approval requirements, including automatic authorisation for explicitly permitted changes. Resolve authority from the trusted base. +- Introduce the shared ownership schema and typed approval requirements, including automatic authorisation for explicitly permitted changes. Resolve creation authority and existing ownership from the trusted base; define operation-specific thresholds for creation, subsequent management, publishing and retirement. - **Done when:** ownership remains separate from access; eligible approvers and requirements are computed per operation; tests cover owner-bearing roles, inheritance, overlapping requirements and escalation. Existing approval rules remain in force. ### 6. Secure self-service -- Enable the trusted required check and repository protections. Start with verified onboarding, ordinary membership, compliant experimental repositories and permitted grants/settings. -- **Done when:** routine changes can proceed without central intervention or Voting; unauthorised changes cannot pass; regression tests cover identity substitution, self-appointment, nested grants, duplicate accounts, stale reviews, concurrent PRs and lifecycle/security bypass. Final candidates are revalidated and production credentials remain protected. +- Enable the trusted required check and repository protections. Start with compliant experimental repository creation, initial ownership and grants, subsequent resource management (including Pages), verified onboarding and membership. Add package access requests with manual execution evidence where required. +- **Done when:** policy-compliant creation and ongoing management can proceed without unnecessary central approval or Voting; manual-only operations distinguish authorisation from execution; unauthorised changes cannot pass; regression tests cover identity substitution, self-appointment, nested grants, duplicate accounts, stale reviews, concurrent PRs and lifecycle/security bypass. Final candidates are revalidated and production credentials remain protected. ### 7. Optional consensus integration @@ -316,4 +369,4 @@ Existing PR: [#291](https://github.com/modelcontextprotocol/access/pull/291), re A new configuration database, custom policy language, voting platform or frontend; roster synchronisation; changes to live preview and deployment as part of the credential-free preview refactor. -Success means ordinary changes are managed by the people responsible for them, without weakening infrastructure security or governance. +Success means authorised contributors can create, own and manage resources throughout their lifecycle, with no unnecessary central bottleneck and without weakening infrastructure security or governance. From d8e6bcd2df07bfc0741546b4b8cbb10905e4aa55 Mon Sep 17 00:00:00 2001 From: Sambhav Kothari Date: Fri, 4 Dec 2026 04:36:55 +0000 Subject: [PATCH 09/10] docs: simplify YAML schemas and preserve existing team hierarchy --- docs/proposals/self-service/README.md | 46 +++++++------------ .../self-service/target-architecture.svg | 2 +- 2 files changed, 17 insertions(+), 31 deletions(-) diff --git a/docs/proposals/self-service/README.md b/docs/proposals/self-service/README.md index 986799d..7650a38 100644 --- a/docs/proposals/self-service/README.md +++ b/docs/proposals/self-service/README.md @@ -15,7 +15,7 @@ Proposal for discussion; no changes to existing access or governance are made by | Concept | Purpose | | --- | --- | | User | Verified identity across providers | -| Role | Users and nested roles; provider-specific membership | +| Role | Direct user membership and provider-specific configuration | | Resource | Infrastructure settings and access grants | | Owner | Existing user or role eligible to approve changes | | Policy | Protected rules defining allowed operations and approval requirements | @@ -81,12 +81,15 @@ lastName: User ### Roles and membership +Keep the existing role definition, including GitHub team hierarchy. + `config/roles/infrastructure-wg/role.yaml` ```yaml description: Infrastructure Working Group github: team: infrastructure-wg + parent: working-groups discord: role: infrastructure working group (synced) ``` @@ -94,25 +97,12 @@ discord: `config/roles/infrastructure-wg/members.yaml` ```yaml -users: - - example-user -roles: [] +- example-user ``` -Adding a member is a small edit to this file. A role can also contain other roles. For example, the parent role can inherit Infrastructure WG members only for the specified platforms: +Membership is just a list of user IDs. GitHub team nesting uses `github.parent`; where needed, retain the existing `discordImplies` list in `role.yaml` for Discord-specific implied roles. No generic nested-role or platform-filter schema. -`config/roles/working-groups/members.yaml` - -```yaml -users: [] -roles: - - id: infrastructure-wg - platforms: - - github - - discord -``` - -Preserve existing provider-specific inheritance, including Workspace provisioning eligibility via GitHub relationships. Discord-only inheritance must not grant GitHub access; direct-only grants must remain direct-only. +Preserve existing provider semantics, including Workspace provisioning eligibility through GitHub parent teams and direct-only grants. Discord implications must not grant GitHub access. ### Resources: create, own and manage @@ -122,18 +112,16 @@ A facilitator or maintainer can propose a new experimental repository, its initi ```yaml description: Experimental MCP extension -visibility: public -managed: true topics: - mcp pages: - enabled: true - source: - branch: main - path: /docs + branch: main + path: /docs ``` -Pages is an illustrative proposed addition to the repository schema, not an existing capability of Access. It may be configured when creating the repository or enabled later, subject to policy and source availability. +Use the existing repository settings shape and protected defaults (public visibility by default). A repository with `resource.yaml` is managed; one with only access configuration is access-only. Adoption, removal and retirement still require explicit lifecycle handling; adding or removing a file alone must not silently adopt or archive infrastructure. + +`pages` is a proposed extension, not an existing capability. It can be set at creation or later, subject to policy and source availability. Omission does not silently disable an existing site. `config/resources/github/repositories/experimental-ext-example/access.yaml` @@ -147,7 +135,6 @@ roles: `config/resources/github/repositories/experimental-ext-example/owners.yaml` ```yaml -users: [] roles: - infrastructure-wg-leads ``` @@ -170,18 +157,17 @@ trustedPublisher: workflow: .github/workflows/release.yml ``` -Illustrative schema: resolve verified registry identities from roles and enforce centrally maintained baseline maintainers and trusted-publishing policy. Changing a publisher repository or workflow is a sensitive operation, not a routine grant. +The package directory identifies the package within the configured registry namespace. Resolve verified registry identities from roles and enforce centrally maintained baseline maintainers and trusted-publishing policy. Changing a publisher repository or workflow is a sensitive operation, not a routine grant. npm and PyPI already have declared publishing access in `src/config/packageAccess.ts`. The current implementation documents interactive npm 2FA for mutations and no PyPI management API. For these providers, self-service means a reviewed, authorised request and declarative desired state, followed by manual execution by an authorised registry administrator and verification/drift reporting where supported. A merged PR alone must not claim that registry access was applied. Preserve unverified roster caveats and do not treat unknown access as absent. ### Owners -The same ownership format applies to a role or a resource. +The same ownership format applies to a role or a resource. List existing user IDs under `users` and/or existing role IDs under `roles`; omit unused keys. The example lead role is illustrative and must exist before it can be assigned. `config/roles/infrastructure-wg/owners.yaml` ```yaml -users: [] roles: - infrastructure-wg-leads ``` @@ -335,8 +321,8 @@ Existing PR: [#292](https://github.com/modelcontextprotocol/access/pull/292). Existing PR: [#291](https://github.com/modelcontextprotocol/access/pull/291), revise to YAML. -- Discover files automatically with TypeScript runtime schemas (Zod) and inferred types; retain compatible `MEMBERS` and `ROLES` interfaces. -- Bound parser inputs; reject duplicate keys, aliases, custom tags, unknown fields, unexpected files and unsafe paths/symlinks. Validate unique normalized identities, generated Workspace addresses, references, provider identifiers, cycles and multiple GitHub parents; preserve intentionally separate accounts. +- Discover files automatically with TypeScript runtime schemas (Zod) and inferred types; retain compatible `MEMBERS` and `ROLES` interfaces, existing provider-specific role fields and a plain user-ID membership list. +- Bound parser inputs; reject duplicate keys, aliases, custom tags, unknown fields, unexpected files and unsafe paths/symlinks. Validate unique normalized identities, generated Workspace addresses, references, provider identifiers, GitHub parent and Discord implication cycles; preserve intentionally separate accounts. - **Done when:** original and migrated identities, provisioning fields, role definitions, direct membership and inheritance match semantically; mock preview has no unintended changes; invalid inputs have regression tests. Coordinate roster changes such as [#252](https://github.com/modelcontextprotocol/access/pull/252). ### 3. Declarative resources diff --git a/docs/proposals/self-service/target-architecture.svg b/docs/proposals/self-service/target-architecture.svg index 7b02aa0..d7937d5 100644 --- a/docs/proposals/self-service/target-architecture.svg +++ b/docs/proposals/self-service/target-architecture.svg @@ -1 +1 @@ -MCP Access — target architectureDeclarative YAML defines users, roles, resource grants and ownership. Protected TypeScript validates and authorizes changes against trusted configuration. Pulumi reconciles protected main to providers.DECLARATIVE CONFIGURATION · YAMLMembershipAccess grantsNestedrolesUsersIdentity detailsRolesDefinitions + membershipResourcesSettings + access grantsOwnersUsers or rolesOwnership delegates approval; it does not grant access.PROTECTED CODE · TYPESCRIPTSchema validationEffective accessSecurity policiesAuthorisationPulumi reconciliationAuthorised changes only · protected mainGitHubDiscordGoogleCloudflare +MCP Access — target architectureDeclarative YAML defines users, roles, resource grants and ownership. Protected TypeScript validates and authorizes changes against trusted configuration. Pulumi reconciles protected main to providers.DECLARATIVE CONFIGURATION · YAMLMembershipAccess grantsGitHubparent teamUsersIdentity detailsRolesRole config + user listResourcesSettings + access grantsOwnersUsers or rolesOwnership delegates approval; it does not grant access.PROTECTED CODE · TYPESCRIPTSchema validationEffective accessSecurity policiesAuthorisationPulumi reconciliationAuthorised changes only · protected mainGitHubDiscordGoogleCloudflare From 4e3791a978db185827d83a7f4e64297798ba642b Mon Sep 17 00:00:00 2001 From: Sambhav Kothari Date: Fri, 4 Dec 2026 04:49:59 +0000 Subject: [PATCH 10/10] docs: map resource schemas to existing Pulumi allowlists --- docs/proposals/self-service/README.md | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/docs/proposals/self-service/README.md b/docs/proposals/self-service/README.md index 7650a38..c6506e7 100644 --- a/docs/proposals/self-service/README.md +++ b/docs/proposals/self-service/README.md @@ -119,9 +119,24 @@ pages: path: /docs ``` -Use the existing repository settings shape and protected defaults (public visibility by default). A repository with `resource.yaml` is managed; one with only access configuration is access-only. Adoption, removal and retirement still require explicit lifecycle handling; adding or removing a file alone must not silently adopt or archive infrastructure. +Each resource type exposes a small, typed allowlist of the settings supported by our Pulumi implementation, not the entire provider API. Reuse the existing `RepositorySettings` interface and adapter in [src/config/repoAccess.ts](../../../src/config/repoAccess.ts) and [src/github.ts](../../../src/github.ts). -`pages` is a proposed extension, not an existing capability. It can be set at creation or later, subject to policy and source availability. Omission does not silently disable an existing site. +| YAML | Existing Pulumi mapping | +| --- | --- | +| Directory name | `github.Repository.name` and existing logical resource names | +| `description` | `description` (required) | +| `visibility` | `visibility` (defaults to public; policy restricts changes) | +| `homepage` | `homepageUrl` | +| `topics` | `topics` | +| `template` | `template.repository` (creation only; organisation fixed) | +| `access.yaml` | `github.RepositoryCollaborators` (resolve role IDs to team IDs and user IDs to GitHub usernames) | +| `owners.yaml` | Access authorisation only; not a Pulumi provider argument | + +`pages` above is a proposed addition: add explicit Pulumi support, a typed schema and policy before exposing it. It can be set at creation or later, subject to source availability; omission must not silently disable an existing site. + +Keep `REPOSITORY_DEFAULTS`, organisation security settings, provider credentials and lifecycle options in protected TypeScript. Do not allow arbitrary provider arguments, generic overrides or raw Pulumi options in YAML. Reject unknown fields. Apply the same allowlist-and-adapter pattern to each other resource type as it is implemented. + +A repository with `resource.yaml` is managed; one with only access configuration is access-only. Adoption, removal and retirement still require explicit lifecycle handling; adding or removing a file alone must not silently adopt or archive infrastructure. `config/resources/github/repositories/experimental-ext-example/access.yaml` @@ -327,7 +342,7 @@ Existing PR: [#291](https://github.com/modelcontextprotocol/access/pull/291), re ### 3. Declarative resources -- Migrate GitHub repository settings and grants to separate files; support creation and subsequent settings/access management, including Pages configuration. Extend resource schemas to other providers and declared npm/PyPI publishing access; preserve the manual execution/drift workflow for registries. Keep provider defaults and security requirements in TypeScript. +- Migrate existing GitHub repository settings and grants to separate files, exposing only a typed subset of the existing Pulumi adapter. Add Pages to the protected implementation before exposing its schema. Extend the same pattern to other providers and declared npm/PyPI publishing access; preserve the manual execution/drift workflow for registries. Keep provider defaults and security requirements in TypeScript. - Distinguish new managed resources, access-only management and explicit adoption, rename/transfer and archival/deletion. Validate names, references and permission levels. - **Done when:** existing settings/grants are preserved, experimental repositories and their initial access/ownership can be defined through validated YAML, Pages can be enabled under policy, package declarations retain existing publishing safeguards, and semantic/mock comparison plus lifecycle review confirm no unintended replacement or archival.