chore: add permissions to autobuilder & prebuilder to run wsbuild (#18527)

Read organization member and read files is now required for dynamic
param building.
This commit is contained in:
Steven Masley
2025-06-24 08:45:41 -05:00
committed by GitHub
parent 403f1c38fb
commit 45ab265df2

View File

@ -228,6 +228,8 @@ var (
Identifier: rbac.RoleIdentifier{Name: "autostart"},
DisplayName: "Autostart Daemon",
Site: rbac.Permissions(map[string][]policy.Action{
rbac.ResourceOrganizationMember.Type: {policy.ActionRead},
rbac.ResourceFile.Type: {policy.ActionRead}, // Required to read terraform files
rbac.ResourceNotificationMessage.Type: {policy.ActionCreate, policy.ActionRead},
rbac.ResourceSystem.Type: {policy.WildcardSymbol},
rbac.ResourceTemplate.Type: {policy.ActionRead, policy.ActionUpdate},
@ -443,6 +445,7 @@ var (
},
// Should be able to add the prebuilds system user as a member to any organization that needs prebuilds.
rbac.ResourceOrganizationMember.Type: {
policy.ActionRead,
policy.ActionCreate,
},
// Needs to be able to assign roles to the system user in order to make it a member of an organization.
@ -456,6 +459,10 @@ var (
rbac.ResourceOrganization.Type: {
policy.ActionRead,
},
// Required to read the terraform files of a template
rbac.ResourceFile.Type: {
policy.ActionRead,
},
}),
},
}),