feat(authz): the catalogue of rights (RBAC step 1) #121

Merged
sharang merged 1 commits from feat/authz-catalogue into main 2026-11-10 21:55:52 +00:00
Owner

RBAC plan step 1: the catalogue of rights, with no behaviour change.

What

  • internal/authz: 40 capabilities named product:resource.action (the scheme the API key scopes use), 13 bundles and the position presets for variants S (5) and L (12), versioned 2026-11-10.1.
    • Assignable today: IT_ADMIN, OWNER, CXO, FINANCE, LEGAL, USER.
    • PSIRT, DEVELOPMENT, QUALITY, PRIVACY, PURCHASING, AUDITOR and EXTERNAL are in the catalogue but not assignable until step 4. EXTERNAL gets Werkmeister rights only through functions (step 5).
    • Effective(bundle, extra) = bundle capabilities + individual capabilities; extras never remove anything.
  • GET /v1/authz/catalogue serves it, in route group authz. No service client has that group yet; granting it (step 2) is an AUTHZ_RULES change in orca-platform and comes separately.

Pins

  • TestTodaysBundlesReproduceThePortalAndWerkmeister: every bundle × capability against a copy of the portal's surfaceRoles and Werkmeister's rbac mapping.
  • TestTheBundlesReproduceTheRegistrysRoleChecks: against the registry's own team, admin, Prüfwerk settings, service read and notify role checks, called directly.
  • Checked by mutation: removing one right from CXO or FINANCE fails the matching pin.

Deliberate deviation

OWNER has no entry in the portal today. Its portal capabilities equal IT_ADMIN's, as decided; the portal picks this up in step 2.

Not a capability

Contract documents (contract_documents.go) are staff-only or gated by the CONTRACT_DOCUMENTS product flag, and read the management role only as AVV data. So they need no tenant capability (checked with the registry's owner session).

🤖 Generated with Claude Code

https://claude.ai/code/session_014aRnCGqELxoix5TfpX8Ejf

RBAC plan step 1: the catalogue of rights, with no behaviour change. ## What - `internal/authz`: 40 capabilities named `product:resource.action` (the scheme the API key scopes use), 13 bundles and the position presets for variants S (5) and L (12), versioned `2026-11-10.1`. - Assignable today: IT_ADMIN, OWNER, CXO, FINANCE, LEGAL, USER. - PSIRT, DEVELOPMENT, QUALITY, PRIVACY, PURCHASING, AUDITOR and EXTERNAL are in the catalogue but not assignable until step 4. EXTERNAL gets Werkmeister rights only through functions (step 5). - `Effective(bundle, extra)` = bundle capabilities + individual capabilities; extras never remove anything. - `GET /v1/authz/catalogue` serves it, in route group `authz`. No service client has that group yet; granting it (step 2) is an `AUTHZ_RULES` change in orca-platform and comes separately. ## Pins - `TestTodaysBundlesReproduceThePortalAndWerkmeister`: every bundle × capability against a copy of the portal's `surfaceRoles` and Werkmeister's `rbac` mapping. - `TestTheBundlesReproduceTheRegistrysRoleChecks`: against the registry's own team, admin, Prüfwerk settings, service read and notify role checks, called directly. - Checked by mutation: removing one right from CXO or FINANCE fails the matching pin. ## Deliberate deviation OWNER has no entry in the portal today. Its portal capabilities equal IT_ADMIN's, as decided; the portal picks this up in step 2. ## Not a capability Contract documents (`contract_documents.go`) are staff-only or gated by the CONTRACT_DOCUMENTS product flag, and read the management role only as AVV data. So they need no tenant capability (checked with the registry's owner session). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_014aRnCGqELxoix5TfpX8Ejf
sharang added 1 commit 2026-11-10 21:46:54 +00:00
feat(authz): the catalogue of rights (RBAC step 1)
ci / shared (pull_request) Successful in 12s
ci / test (pull_request) Successful in 8m8s
ci / image (pull_request) Skipped
19f2300934
Capabilities, bundles and the two position variants, versioned in
code and served as GET /v1/authz/catalogue. Today's six roles are
bundles that reproduce the portal surfaces, the Werkmeister
permissions and the registry's own role checks; pin tests fail if
any of them drifts. Nothing reads the catalogue yet, so no right
changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014aRnCGqELxoix5TfpX8Ejf
sharang merged commit 73c93ae09b into main 2026-11-10 21:55:52 +00:00
sharang deleted branch feat/authz-catalogue 2026-11-10 21:55:52 +00:00
Sign in to join this conversation.