Skip to content

AppProject RBAC policies use invalid wildcard * for resource type, breaking ArgoCD operations #3105

@heino-kroeger

Description

@heino-kroeger

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

  1. Install APL v3.18.0 on an LKE cluster
  2. Create a team (e.g. kmw-stage)
  3. Open the ArgoCD UI and navigate to the team's project settings
  4. Attempt to modify the sourceRepos for the team's AppProject
  5. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcommunityIssue made by a community member

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions