Skip to content
Beskid Platform specification

Beskid

Jump to a Beskid service

Beskid

Jump to a Beskid service

GitHub repo owner gates catalog admin

Platform spec ADR

GitHub repo owner gates catalog admin

Spec standingStandard

Owner
Piotr Mikstacki
Submitter
Piotr Mikstacki

GitNexus used a static admin roster for catalog mutations. Beskid Nexus indexes public graphs for many repositories — administration should follow GitHub ownership, not a deployment-time username list that does not scale across contributors and org repos.

Instance operators still need bootstrap authority for auth hub pairing and secrets — distinct from day-to-day repo administration.

  1. POST/PATCH/DELETE /api/admin/catalog* and POST .../analyze and POST .../refresh-docs require the session user to be owner or admin of the entry’s gitUrl per GitHub API (GET /repos/{owner}/{repo} with hub user token).
  2. GET /api/auth/me must expose ownedRepoIds — catalog ids the user may administer — for UI gating.
  3. requireAdmin (env roster) is retained only for POST /api/admin/auth/pair and first-run setup endpoints.
  4. Ownership verification may be cached up to 15 minutes per (login, gitUrl).
  5. Non-owners receive 403 on mutating routes.
  • github-ownership.ts centralizes URL parsing and API checks.
  • Frontend admin sheet gates on ownedRepoIds.includes(activeEntry.id).
  • Public catalog and graph routes remain unauthenticated.

Accepted — reference implementation in beskid_nexus/gitnexus/src/server/nexus/github-ownership.ts.