Skip to content

Improve provisioner jobs RBAC with a PostgreSQL VIEW #16160

Closed as not planned
Closed as not planned

Description

@mafredri

In #16029 we introduced a new RBAC resource called rbac.ResourceProvisionerJobs. However, the scope was limited to owners and template admins for now because proper expression (via RBACObject) requires that we also know the associated template or workspace (jobs refer only to template versions or workspace builds).

If we implement this as a PostgreSQL view which joins in the relevant template or workspace data, we can provisioner jobs to users as well (e.g. builds of their own workspace).

#16029 (comment)

Activity

  1. added
    needs-triage
    on Jan 16, 2025
  2. ibetitsmike commented on May 19, 2025

    @ibetitsmike
    Collaborator

    useful directions for RBACing InsertProvisionerJob from @deansheather

    • template_version_import jobs require either template_version:create on the org (if creating a new template) or template:update and template_version:create on the template (if pushing a new version)
    • template_version_dry_run jobs require permissions to workspace:create in the org as well as template_version:read on the specific template version
    • workspace_build jobs require workspace:update on the specific workspace as well as template_version:read on the specific template version
  3. zenithwolf1000 commented on Nov 16, 2026

    @zenithwolf1000
    Collaborator

    Closing due to inactivity.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triage

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions