Skip to content

feat: add Everyone access to the MCP Store (ENG-3054) - #1268

Merged
edukmx merged 8 commits into
developfrom
feat/eng-3054-access-everyone
Nov 5, 2026
Merged

edukmx merged 8 commits into
developfrom
feat/eng-3054-access-everyone

Conversation

@edukmx

@edukmx edukmx commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

Refs ENG-3054

Summary

Adds Everyone to the MCP Store: a per-gateway access object that every directory group passes on to its members, except excluded groups and groups whose own policy is none. It only ever adds access.

  • API: GET|PUT /v1/gateways/{gateway_id}/store/everyone with {mode: open|curated, grants: [{catalog_code, registry_id?}], excluded_groups: []}. mode is required; an empty mode removes the object. none, and curated without grants, are refused (422). Grants are validated like Store grants.
  • Storage: new store_everyone table (one row per gateway, FK to gateways with cascade), repository with an outbox marker so writes rebuild the config snapshot.
  • Store level: the caller's own policy still wins. Otherwise the level is the most permissive explicit group policy, or the fallback (legacy claim, gateway default) when no group policy names the caller, raised to Everyone's mode when the caller reaches it. With no Everyone object every caller resolves exactly as before, and Everyone never lowers a level.
  • Grants: the grant Set also allows Everyone's servers (code- or instance-level) to callers who reach it, for search, install, connect, configure and exposure of installed instances. The approver keeps writing explicit grants.
  • Data planes: the snapshot carries the object in a new field 18, so hybrid and DB-less planes evaluate it like grants and policies. A plane built before this field ignores it.
  • Registry delete: after the registry is deleted, its instance grants are pruned from Everyone in one locked read-modify-write; a curated object left without grants is removed.

Design, specs and tasks: openspec/changes/access-everyone/.

Labelled size:exception: one PR for the whole TrustGate side was chosen over a chain. Commits are reviewable units (API, evaluation, snapshot, review fixes), with regenerated OpenAPI docs in their own commits.

Test plan

  • make test (pre-commit hook on every commit)
  • go test -race on changed packages, golangci-lint (0 issues), go vet -tags functional
  • Migration and repository tests against Postgres (-tags functional, PG_TEST_URL)
  • Functional TestEveryone_GrantsTheStoreToPassingGroupKeys: group keys of passing groups see the server, excluded and none groups do not, install without approval, excluded group still files a request, removal takes access away
  • Unit truth table for the level rule (no Everyone = previous result for every case)
  • DEV: save Everyone from the console and check a hybrid plane picks it up

Exploration, proposal, specs, design and tasks for a per-gateway Everyone
Store access and bulk Assign / Remove on Access > Groups.
A gateway can hold one Everyone object: a Store level (open or curated)
and the servers every group passes on, minus excluded groups. This adds
the domain type, the store_everyone table, its repository with an outbox
marker, the service with grant validation, and GET/PUT
/v1/gateways/{gateway_id}/store/everyone. Evaluation and the config
snapshot come next.
A caller reaches Everyone when one of its Store groups is neither excluded
nor on a none policy. The level becomes the most permissive of today's
result and Everyone's mode, so Everyone never lowers anyone's access and
changes nothing when absent. Grant decisions add Everyone's servers for
callers who reach it, through the shared loader; the approver keeps
writing explicit grants. On the control plane the Store module serves
grants, policies and Everyone from one AccessReader.
…s (ENG-3054)

The config snapshot carries each gateway's Everyone object in a new field
18, so hybrid and DB-less planes evaluate it like grants and policies; an
older plane ignores the field. Deleting a registry drops it from
Everyone's grants, and removes the object when a curated one is left
without grants. A functional test covers group keys, exclusions, groups
on none, install without approval and removal.
- Install honours instance-level Everyone grants, named or picked from the
  usable instances, like search and the scoper already did.
- PUT store/everyone requires mode: a body without it is a 422, not a
  removal; an empty mode still removes Everyone.
- Pruning a deleted registry from Everyone is one locked read-modify-write
  in the repository, and runs only after the registry delete commits, so a
  refused delete leaves Everyone untouched.
- The registry cleaner and the Everyone DTOs move to their own files; two
  narrative test comments go.
@edukmx edukmx added the size:exception Exceeds the 400-line review budget, accepted deliberately label Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Trivy code scan — HIGH/CRITICAL

No HIGH or CRITICAL vulnerabilities found. (run)

@edukmx
edukmx marked this pull request as ready for review November 5, 2026 13:36
@edukmx
edukmx merged commit 7d0692c into develop Nov 5, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:exception Exceeds the 400-line review budget, accepted deliberately

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant