Skip to content

Allow-list model and parsing #19850

Closed
Closed

Description

@ThomasK33

Description

  • Support optional allow-lists that restrict the scope of application to specific resources. Accept values *:*, <resource_type>:*, and <resource_type>:<uuid>.
  • Normalize/validate on input; store as strings in allow_list column.

Progress

Remaining work

  • Implement parsing/normalization from user-provided strings (e.g., workspace:<uuid>, template:*, *:*) into the typed representation with validation and helpful errors.
  • Enforce size limits and deduplication; normalize wildcard forms.
  • Integrate parsing in API handlers and CLI/UI; persist normalized string form in DB.
  • Document the final format in admin and API docs.

Key files/areas

  • Parsing/validation helpers in coderd/rbac/ (new package or file, e.g., allowlist.go).
  • Reuse/refactor existing allow-list mechanics from workspace agent tokens where practical.

Acceptance criteria

  • Unit tests cover parsing, normalization, wildcard handling, and invalid input rejection.
  • Large lists are rejected or capped by a sane limit (config or constant).

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