Skip to content

Platform administrators can read every registered repository - #993

Open
zlareb1 wants to merge 3 commits into
mainfrom
fix/platform-admin-repository-read
Open

zlareb1 wants to merge 3 commits into
mainfrom
fix/platform-admin-repository-read

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Improvement

Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):

Platform administrators using their own unscoped authority can read every registered repository, including restricted and closed repositories. Other token scopes and repository write permissions retain their existing rules.

Why

Platform-wide repository inspection should not require a separate membership and namespace claim for each index. The authorization exception belongs in the shared read gate so directory metadata and actual HTTP and MCP reads agree.

Scope and risk

This is a deliberate authorization policy change: an eligible platform administrator can read repository content and status across the deployment's held organizations. Namespace and organization administrator roles do not receive this authority. The new exception does not apply to scoped, delegated or impersonated authority, arbitrary namespaces, collections, mirrors, repository writes or grant management. Existing org-readable repository behavior remains.

Member-write admission explicitly excludes the platform read exception, so a live viewer grant cannot bypass the token’s restricted namespace or organization limits.

The gate identifies registered repositories through the namespace directory. Tenancy, active provisioning, classification availability, token validity and the restricted-serving kill switch remain enforced. A shared helper also identifies the caller's own platform authority for repository administration. Architecture and caller documentation describe the policy.

An alternative is to provision a grant and token claim for every repository. That makes platform inspection depend on membership updates and token refreshes as repositories are added. The read exception avoids that provisioning while retaining narrower token ceilings and write rules.

Compatibility, rollout and rollback

  • Wire: no operation or field changes; existing eligible platform-admin tokens gain repository read authority after rollout. No stored grants or schema changes.
  • Operator steps: update every serving replica before relying on the expanded read policy. During a rolling upgrade, older replicas retain the prior policy.
  • Rollback: reverting restores claim and membership requirements for restricted reads without changing stored data or grants.

Tests

Four regression cases fail on the prior authorization implementation. Earlier component qualification passed 696 focused authorization, listing, HTTP/MCP admission, mirror and package-boundary tests, plus 272 documentation checks. Coverage includes restricted and closed repositories, cross-org reads within held tenancy, dynamic registration, scoped/delegated/impersonated denial, ordinary administrator denial, writes, mirrors, collections, classification failure and the serving kill switch. Nine additional member-write cases cover all three member operations: six reproduce missing-claim or cross-org admission, while three retain legitimate member writes. The current composition preserves provisioning checks before repository admission; four cases cover deactivated or unavailable provisioning for standard and restricted repositories. Current repository, restricted-scope and org-readable regressions pass all 91 cases; formatting, Ruff, focused mypy and prose checks pass. Earlier function-length and documentation checks remain recorded. Full integration and coverage gates remain CI requirements; no database-backed production test is claimed.

AI assistance in the code (leave one; writing this description with AI is fine):

  • AI-generated: Codex wrote the change. Source review and focused tests check the read exception and its authorization boundaries.

  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • Full required CI is green on this head.
  • Architecture and caller documentation describe the intentional policy change.
  • No generated wire, SDK, settings or schema changes.
  • No migration, dashboard or plugin changes.
  • Text contains no deployment-specific operational evidence.
  • Commits are signed off.

@zlareb1
zlareb1 force-pushed the fix/platform-admin-repository-read branch 4 times, most recently from 62dff12 to 82498cd Compare November 20, 2026 02:52
Admit repository viewer reads from a platform administrator using its own unscoped authority. Preserve restricted serving, classification, tenancy, delegated-token and write boundaries.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Keep the ordinary namespace and organization limits when member writes check read access.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Cover refused and unavailable provisioning before the platform repository
read exception for both standard and restricted indexes.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
@zlareb1
zlareb1 force-pushed the fix/platform-admin-repository-read branch from 82498cd to 2e26b04 Compare November 20, 2026 03:40

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant