Skip to content

Conversation

@hubwoop
Copy link
Contributor

@hubwoop hubwoop commented May 19, 2025

Tried to use this policy:

p, proj:my-proj:my-role, projects, get, my-proj, allow

on a project, but got the following error:

Unable to update project: invalid policy rule 'p, proj:my-proj:my-role, projects, get, my-proj, allow': project resource must be: 'applications', 'applicationsets', 'repositories', 'exec', 'logs' or 'clusters', not 'projects'

which seems to be in line with:

return status.Errorf(codes.InvalidArgument, "invalid policy rule '%s': project resource must be: 'applications', 'applicationsets', 'repositories', 'exec', 'logs' or 'clusters', not '%s'", policy, resource)

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Toolchain Guide
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.
  • Optional. My organization is added to USERS.md.
  • Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).

Unable to update project: invalid policy rule 'p, proj:my-proj:my-role, projects, get, my-proj, allow': project resource must be: 'applications', 'applicationsets', 'repositories', 'exec', 'logs' or 'clusters', not 'projects'

https://github.com/argoproj/argo-cd/blob/ec9b43f9fa8a7231de567d4b9c9e291ff8b7413e/pkg/apis/application/v1alpha1/types.go#L2518

Signed-off-by: Jonas Mai <[email protected]>
@hubwoop hubwoop requested review from a team as code owners May 19, 2025 09:17
@bunnyshell
Copy link

bunnyshell bot commented May 19, 2025

❌ Preview Environment deleted from Bunnyshell

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

@hubwoop hubwoop changed the title Update projects.md Remove projects as an allowed resource type from project level policy declarations documentation May 19, 2025
@hubwoop hubwoop changed the title Remove projects as an allowed resource type from project level policy declarations documentation docs: remove projects as an allowed resource type from project level policy declarations documentation May 19, 2025
@blakepettersson blakepettersson merged commit 899e996 into argoproj:master May 19, 2025
23 of 25 checks passed
@blakepettersson
Copy link
Member

Thanks!

ranakan19 pushed a commit to ranakan19/argo-cd that referenced this pull request May 20, 2025
…policy declarations documentation (argoproj#23036)

Signed-off-by: Jonas Mai <[email protected]>
Signed-off-by: Kanika Rana <[email protected]>
olivergondza pushed a commit to olivergondza/argo-cd that referenced this pull request May 20, 2025
…policy declarations documentation (argoproj#23036)

Signed-off-by: Jonas Mai <[email protected]>
Signed-off-by: Oliver Gondža <[email protected]>
LyhengTep pushed a commit to LyhengTep/argo-cd that referenced this pull request May 24, 2025
…policy declarations documentation (argoproj#23036)

Signed-off-by: Jonas Mai <[email protected]>
Signed-off-by: Lyheng <[email protected]>
tylerrosnett pushed a commit to StateFarmIns/argo-cd that referenced this pull request May 27, 2025
chansuke pushed a commit to chansuke/argo-cd that referenced this pull request Jun 4, 2025
dsuhinin pushed a commit to dsuhinin/argo-cd that referenced this pull request Jun 16, 2025
…policy declarations documentation (argoproj#23036)

Signed-off-by: Jonas Mai <[email protected]>
Signed-off-by: dsuhinin <[email protected]>
dsuhinin pushed a commit to dsuhinin/argo-cd that referenced this pull request Jun 16, 2025
…policy declarations documentation (argoproj#23036)

Signed-off-by: Jonas Mai <[email protected]>
Signed-off-by: dsuhinin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants