Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Argo CD CLI Admin Setting RBAC Can AppProject Roles Support (#11950) #19502

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bdun1013
Copy link

@bdun1013 bdun1013 commented Aug 12, 2024

Closes #11950

This PR updates the argocd admin settings rbac can --namespace <namespace> CLI command to include AppProject Roles in RBAC permissions checks involving Application Specific Policies.

This PR does not support reading AppProject's from a file similar to how global policies may be loaded from a file with --policy-file <policy-file> instead of --namespace <namespace. If there is interest in this, I would be open to updating the code to also support it.

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).

Copy link

bunnyshell bot commented Aug 12, 2024

🔴 Preview Environment stopped on Bunnyshell

See: Environment Details | Pipeline Logs

Available commands (reply to this comment):

  • 🔵 /bns:start to start the environment
  • 🚀 /bns:deploy to redeploy the environment
  • /bns:delete to remove the environment

Copy link

bunnyshell bot commented Aug 12, 2024

✅ Preview Environment created on Bunnyshell but will not be auto-deployed

See: Environment Details

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

@bdun1013 bdun1013 marked this pull request as ready for review August 12, 2024 20:12
@bdun1013 bdun1013 requested a review from a team as a code owner August 12, 2024 20:12
@bdun1013 bdun1013 force-pushed the 11950-admin-settings-rbac-can-appproject-policies branch from 08e0e81 to 738d8c7 Compare August 12, 2024 20:33
@bdun1013 bdun1013 requested a review from a team as a code owner August 12, 2024 20:33
@bdun1013 bdun1013 force-pushed the 11950-admin-settings-rbac-can-appproject-policies branch from 738d8c7 to b8bbf64 Compare August 12, 2024 20:45
Copy link

codecov bot commented Aug 12, 2024

Codecov Report

Attention: Patch coverage is 49.27536% with 35 lines in your changes missing coverage. Please review.

Project coverage is 55.20%. Comparing base (635e592) to head (b658818).
Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
cmd/argocd/commands/admin/settings_rbac.go 49.27% 33 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #19502      +/-   ##
==========================================
+ Coverage   55.18%   55.20%   +0.01%     
==========================================
  Files         337      337              
  Lines       57058    57106      +48     
==========================================
+ Hits        31487    31524      +37     
- Misses      22875    22887      +12     
+ Partials     2696     2695       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bdun1013 bdun1013 force-pushed the 11950-admin-settings-rbac-can-appproject-policies branch from b8bbf64 to ed4dbc3 Compare August 13, 2024 12:32
Copy link
Member

@jannfis jannfis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thank you!

Just had a minor question, nothing that would prevent this PR from merging. Please see below.

cmd/argocd/commands/admin/settings_rbac.go Outdated Show resolved Hide resolved
@bdun1013 bdun1013 force-pushed the 11950-admin-settings-rbac-can-appproject-policies branch 3 times, most recently from 094e88a to dda392a Compare August 13, 2024 17:31
@bdun1013 bdun1013 force-pushed the 11950-admin-settings-rbac-can-appproject-policies branch from dda392a to cc59ac2 Compare August 28, 2024 16:11
@bdun1013 bdun1013 force-pushed the 11950-admin-settings-rbac-can-appproject-policies branch 8 times, most recently from a4b5d3d to 7297dd8 Compare December 5, 2024 19:39
@bdun1013 bdun1013 requested a review from jannfis December 5, 2024 19:39
@bdun1013 bdun1013 force-pushed the 11950-admin-settings-rbac-can-appproject-policies branch 4 times, most recently from d64dbfd to 61f5fe1 Compare December 11, 2024 15:57
@bdun1013 bdun1013 force-pushed the 11950-admin-settings-rbac-can-appproject-policies branch 3 times, most recently from 728a198 to 44cdcaa Compare December 18, 2024 20:36
@bdun1013 bdun1013 force-pushed the 11950-admin-settings-rbac-can-appproject-policies branch from 44cdcaa to b658818 Compare December 30, 2024 16:53
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.

Testing RBAC policies for Projects
2 participants