Skip to content

RBAC: Introduce composable API key scopes and expansion #19848

Description

@ThomasK33

Description

  • After low-level scopes exist, implement a composable scope container that satisfies rbac.ExpandableScope, e.g., type ComposableScope []ScopeName, whose Expand() merges site-level permissions of each named scope into a single rbac.Scope.
  • Ensure expansions are site-level only; remove any org-level blocks from built-ins.

Key files/areas

  • coderd/rbac/scopes.go (define ComposableScope and related helpers).
  • coderd/rbac/ tests for expansion correctness.

Acceptance criteria

  • Unit tests verify that combining workspace:read + workspace:ssh yields a scope allowing both actions at the Site level only.
  • No negative/deny semantics implemented; expansions are strictly additive.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions