Overview
Argo CD’s RBAC feature restricts access to resources using policy definitions based on Casbin. RBAC requires SSO configuration or local users to be effective.RBAC ConfigMap
RBAC policies are defined in theargocd-rbac-cm ConfigMap:
Built-in Roles
Argo CD provides two pre-defined roles:role:readonly: Read-only access to all resourcesrole:admin: Unrestricted access to all resources
All authenticated users receive at least the permissions granted by
policy.default. This access cannot be blocked by a deny rule.Policy Syntax
Group Assignment
Assign users or groups to roles:Policy Rules
Define permissions for resources:Resource Actions
Application Policies
Application-specific policies use the format<project>/<app-name> for the object:
Fine-Grained Resource Permissions
Grant permissions for specific resource types within an application:Action Permissions
Control access to custom resource actions:Override Permissions
Theoverride action allows syncing arbitrary manifests or different revisions:
ApplicationSet Policies
Control ApplicationSet creation with project-scoped permissions:ApplicationSets cannot be created with templated project fields via API/CLI, making project restrictions via RBAC safe.
Logs and Exec Policies
Log Access
Exec Access
Exec functionality must be enabled separately in the Argo CD configuration.
Extensions Policies
Control access to proxy extensions:Using SSO Groups
Configure which OIDC scopes to examine for RBAC:scopes field controls which OIDC scopes are examined (defaults to [groups]).
Local Users
Assign policies directly to local users:Policy Composition
Compose policies using multiple ConfigMap entries:policy.*.csv entries in alphabetical order.
Match Modes
Configure pattern matching behavior:- glob: Uses glob patterns (default)
- regex: Uses regular expressions
Glob Matching
Glob treats policy tokens as single terms without separators:action/extensions/DaemonSet/test because / is not treated as a separator.
Deny Rules
Deny rules take precedence over allow rules:Default Policy
Set the default role for authenticated users:Anonymous Access
Enable anonymous access with restricted permissions:Validation and Testing
Validate and test RBAC policies using the CLI:Validate Policy
Test Access
Example Policies
Development Team
Operations Team
CI/CD Pipeline
Best Practices
Principle of Least Privilege
Grant only the minimum permissions required. Start with
role:readonly and add specific permissions as needed.Use Projects
Leverage AppProjects to group applications and simplify RBAC policies.
SSO Integration
Use SSO groups for team-based access control rather than managing individual local users.
Test Policies
Use
argocd admin settings rbac commands to validate and test policies before deployment.