ArgoCD
Topics in this category
ArgoCD
RBAC
Check the user's group claims (via the token/SSO), confirm matching `g` bindings and `p` rules in policy.csv, verify the object scope (project/app) matches, and remember deny-by-default. The scopes setting must reference the correct claim (e.g., groups). Enabling debug logging on the API server shows which policy decision was made.
Real-world example
A user denied sync is fixed by correcting the scopes setting so their SSO group claim is read and mapped to a role.
RBAC
Multi-cluster
Applications
For applications you can control get (view), create, update, delete, sync, override (override a running operation), and action/* (run resource actions like restart). Fine-grained control lets you, for example, allow developers to view and sync but reserve create/delete for platform admins.
p, role:dev, applications, action/apps/Deployment/restart, '*/*', allow
Real-world example
Developers are allowed to restart Deployments via ArgoCD actions but not to delete applications.
Applications
Sync & Health
RBAC
policy.default sets the role applied to any authenticated user who has no explicit grant. Setting it to role:readonly gives safe view-only default access; leaving it empty denies by default. It's the fallback that determines baseline permissions.
data:
policy.default: role:readonly
Real-world example
Unmapped SSO users get read-only access because policy.default is role:readonly.
Applications
Multi-cluster
RBAC
Add a g line binding the group to role:admin in the policy: `g, <group>, role:admin`. The group name must match the claim from SSO (per the scopes setting). This grants that group full ArgoCD access.
policy.csv: |
g, platform-admins, role:admin
Real-world example
The platform-admins SSO group is bound to role:admin so its members manage all of ArgoCD.
Multi-cluster
Applications
RBAC
RBAC covers applications, applicationsets, clusters, repositories, projects, accounts, certificates, gpgkeys, logs, and exec. This lets you separately govern who can register clusters, add repos, manage projects, view logs, or open pod shells—not just act on apps.
p, role:repo-admin, repositories, *, *, allow
Real-world example
A role can manage repository connections but has no permission over clusters or app deletion.
Multi-cluster
Applications
RBAC
Define policy lines granting only get on that project's apps: `p, role:viewer-a, applications, get, team-a/*, allow`, then bind users/groups with a g line. They can view team-a apps but not sync or modify them, and nothing outside the project.
p, role:viewer-a, applications, get, team-a/*, allow
g, team-a-viewers, role:viewer-a
Real-world example
Auditors get read-only visibility into team A's apps without any change rights.
Applications
Multi-cluster
RBAC
The scopes field in argocd-rbac-cm tells ArgoCD which token claims to read for subject matching (commonly groups, sometimes email). If it doesn't reference the claim your IdP sends, g bindings won't match and users fall to the default role. Correct scopes are essential for SSO group RBAC to work.
data:
scopes: '[groups, email]'
Real-world example
Adding groups to scopes fixes users landing on readonly because their group claim wasn't being read.
Multi-cluster
Applications
RBAC
Local accounts are ArgoCD-managed users (defined in argocd-cm) with passwords or tokens, used for automation or break-glass access when SSO is unavailable. They should be limited and carefully permissioned; SSO is preferred for humans, local accounts for specific service/automation needs.
# argocd-cm
data:
accounts.ci-bot: apiKey
Real-world example
A ci-bot local account issues an API token for the pipeline, separate from human SSO logins.
Applications
Multi-cluster
RBAC
AppProject roles define scoped policies for that project, and you generate JWT tokens bound to a role. CI uses such a token to, say, sync only that project's apps—no admin account needed. This confines automation to exactly the actions and objects it requires.
roles:
- name: deployer
policies: [ 'p, proj:team-a:deployer, applications, sync, team-a/*, allow' ]
Real-world example
The pipeline's project-scoped token can sync team-a apps only, never affecting other projects.
Applications
Multi-cluster
RBAC
Store the argocd-rbac-cm ConfigMap (policy.csv, policy.default, scopes) in Git and let ArgoCD (or the install) apply it, so access-control changes go through pull requests and review. This versions permissions and provides an audit trail of who changed access and when.
Real-world example
Granting a new team access is a reviewed PR to the argocd-rbac-cm manifest, not a manual console change.
GitOps Principles
Applications
RBAC