AppProject RBAC policies use invalid wildcard * for resource type, breaking ArgoCD operations
APL Version
linode/apl-tasks:v3.18.0
Describe the bug
APL generates AppProject resources for teams with RBAC policy rules that use * as the resource type:
p, proj:team-<name>:platform-admin, *, *, team-<name>/*, allow
p, proj:team-<name>:team-member, *, get, team-<name>/*, allow
The ArgoCD version shipped with APL v3.18.0 rejects * in the resource position and requires one of the explicit resource types: applications, applicationsets, repositories, exec, logs, or clusters.
This causes the following error when attempting to update project settings (e.g. changing a team's app-of-apps repository):
Unable to update project: invalid policy rule 'p, proj:team-<name>:platform-admin, *, *, team-<name>/*, allow':
project resource must be: 'applications', 'applicationsets', 'repositories', 'exec', 'logs' or 'clusters', not '*'
Steps to reproduce
- Install APL v3.18.0 on an LKE cluster
- Create a team (e.g.
kmw-stage)
- Open the ArgoCD UI and navigate to the team's project settings
- Attempt to modify the
sourceRepos for the team's AppProject
- Observe the error above
Expected behavior
APL should generate valid AppProject policies using explicit resource types, e.g.:
policies:
- "p, proj:team-<name>:platform-admin, applications, *, team-<name>/*, allow"
- "p, proj:team-<name>:platform-admin, applicationsets, *, team-<name>/*, allow"
- "p, proj:team-<name>:platform-admin, repositories, *, team-<name>/*, allow"
- "p, proj:team-<name>:platform-admin, clusters, *, team-<name>/*, allow"
- "p, proj:team-<name>:platform-admin, logs, *, team-<name>/*, allow"
- "p, proj:team-<name>:platform-admin, exec, *, team-<name>/*, allow"
The same expansion is needed for the team-member role (with action get instead of *).
Actual AppProject generated by APL
roles:
- name: platform-admin
description: Team member privileges to team-<name>
groups:
- platform-admin
- team-<name>
policies:
- p, proj:team-<name>:platform-admin, *, *, team-<name>/*, allow
- name: team-member
description: Team member privileges to team-<name>
groups:
- team-<name>
policies:
- p, proj:team-<name>:team-member, *, get, team-<name>/*, allow
Additional context
- Manual patching of the
AppProject via kubectl patch is immediately reverted by the APL reconciliation loop.
- The
read-only and ci-role roles are unaffected because they already use applications as the explicit resource type.
- This appears to be a regression introduced when ArgoCD was upgraded to a version that enforces strict resource type validation in project-scoped policies.
AppProject RBAC policies use invalid wildcard
*for resource type, breaking ArgoCD operationsAPL Version
linode/apl-tasks:v3.18.0Describe the bug
APL generates
AppProjectresources for teams with RBAC policy rules that use*as the resource type:The ArgoCD version shipped with APL v3.18.0 rejects
*in the resource position and requires one of the explicit resource types:applications,applicationsets,repositories,exec,logs, orclusters.This causes the following error when attempting to update project settings (e.g. changing a team's app-of-apps repository):
Steps to reproduce
kmw-stage)sourceReposfor the team's AppProjectExpected behavior
APL should generate valid AppProject policies using explicit resource types, e.g.:
The same expansion is needed for the
team-memberrole (with actiongetinstead of*).Actual AppProject generated by APL
Additional context
AppProjectviakubectl patchis immediately reverted by the APL reconciliation loop.read-onlyandci-roleroles are unaffected because they already useapplicationsas the explicit resource type.