feat(argo-cd): add minimal RBAC option for server ClusterRole#3641
feat(argo-cd): add minimal RBAC option for server ClusterRole#3641Maharshi-Mimo wants to merge 2 commits intoargoproj:mainfrom
Conversation
Add a new server.rbac.minimal configuration option that restricts argocd-server ClusterRole permissions to a minimal read-only set, removing delete and patch operations on wildcard resources. Changes: - Add server.rbac.minimal boolean flag (default: false) to values.yaml - Update clusterrole.yaml template with conditional logic: * When minimal=false (default): uses existing permissions with delete/patch * When minimal=true: grants only get, list, watch verbs on wildcard resources * Custom rules (when enabled) take precedence over both modes - Minimal mode removes the following dangerous permissions: - delete/* on wildcard resources - patch/* on wildcard resources - create on events (except pods/exec) - create on batch jobs - update/patch on applications/applicationsets Enable with: --set server.rbac.minimal=true This addresses security concerns by allowing operators to restrict the ArgoCD server's permissions to read-only access when appropriate. Tested: Helm template rendering verified with both modes enabled and disabled. cd d:\Code\Contribution\argo-helm; git log --oneline -1 Signed-off-by: Maharshi <maharshid32@gmail.com>
| ## Server RBAC configuration | ||
| rbac: | ||
| # -- Restrict server permissions to minimal set (removes delete/patch on wildcard resources) | ||
| minimal: false |
There was a problem hiding this comment.
minimal is not really explicit, what about "readOnly"?
| minimal: false | |
| readOnly: false |
|
Hi @Maharshi-Mimo , Thanks for this PR and your contribution. I don't think that this makes sense. We provide an option for users who want to harden the Argo CD deployment by using: ## Option 1: Cluster Role rules overrides
server:
clusterRoleRules:
rules:
- # your custom RBAC rules, depending on your use case
controller:
clusterRoleRules:
rules:
- # your custom RBAC rules, depending on your use caseor: ## Option 2: Role rules overrides (for namespaced installations)
controller:
roleRules:
- # your custom RBAC rules, depending on your use caseThere is no generic "minimal" setup for everyone with hardening intents in my opinion since the access depends on what the user of our Helm chart wants to manage with Argo CD. Does that make sense? Another thing I want to bring up: you clicked every checkbox of the contribution template and clearly not follow what you checked. E.g.
Since you made non-functional changes across all Helm charts, you involved all maintainers for all charts. For the next time, please follow the task checkboxes since our review capacity is limited. 🙏 |
Add a new server.rbac.minimal configuration option that restricts argocd-server ClusterRole permissions to a minimal read-only set, removing delete and patch operations on wildcard resources.
Changes:
Enable with: --set server.rbac.minimal=true
This addresses security concerns by allowing operators to restrict the ArgoCD server's permissions to read-only access when appropriate.
closes #3594
Tested: Helm template rendering verified with both modes enabled and disabled.
Checklist: