86.7 RBAC, AppProjects and SSO awareness
Story. A Deloitte-style bank project in Mumbai gave every developer cluster-admin on day one. Within a month someone synced a toy app into kube-system. They introduced Argo CD AppProjects: the payments team could only sync into payments-* namespaces from their deploy repo. Login moved from the initial admin user toward SSO (OIDC) with Dex — you should know the idea even if class still uses admin.
Why
GitOps without boundaries still lets the wrong person sync the wrong thing.
What
- AppProject — Boundary: which source repos, destinations and cluster resources an app may use.
- RBAC —
argocd-rbac-cmpolicies (roles likerole:developer). - SSO awareness — Dex (or another OIDC path) so people log in with company identity.
- default project — Fine for labs; too open for shared prod clusters.
How
- Create an AppProject for a team.
- Allow only their Git repos and namespaces.
- Map SSO groups to Argo CD roles in real companies.
- Remove reliance on the initial admin password.
Example 1: Tight AppProject (awareness)
apiVersion: argoproj.io/v1alpha1
kind: AppProject
metadata:
name: payments
namespace: argocd
spec:
description: Payments team apps
sourceRepos:
- 'https://git.example.com/payments/*'
destinations:
- namespace: 'payments-*'
server: https://kubernetes.default.svc
clusterResourceWhitelist:
- group: ''
kind: Namespace
What it shows: Payments apps cannot point at a random repo or sync into kube-system.
Example 2: Who am I in the CLI
argocd account get-user-info
Output
Logged In: true
Username: admin
Issuer: argocd
What it shows: Lab login is still local admin. In companies you expect an SSO issuer instead.
Ravindra Bagale's Tip
Never leave the initial admin password as the only long-term login on a shared cluster.
shared cluster वर फक्त initial admin password दीर्घकाळ ठेवू नका.
shared cluster पर सिर्फ initial admin password लंबे समय तक न रखें.
Quick quiz
Q1. What does an AppProject limit?
Allowed source repos, destinations and often cluster resources.
Q2. Why SSO?
So people use company identity instead of a shared admin password.
Q3. Is the default project enough for prod multi-team?
Usually no — it is too open.
Did you understand? Let us try it once more.