GitOps Access Control
What you'll learn: How to leverage Git's built-in permission model to control who can deploy what to your infrastructure.
The Core Idea
In traditional operations, deployment permissions often live in separate tooling—Jenkins roles, custom scripts, or manual SSH access lists. GitOps flips this by making Git itself the security boundary. Since all changes go through Git to reach production, whoever controls Git access controls deployment rights. You're not managing infrastructure permissions—you're managing repository permissions.
How It Works
Think of your Git repository as a velvet rope outside an exclusive venue. Instead of building a custom bouncer system, you use the one Git already provides:
- Branch protection rules prevent direct commits to
mainorproductionbranches - Merge request approvals require senior engineers to review infrastructure changes before they deploy
- CODEOWNERS files automatically assign reviewers based on which files changed (e.g., database configs require DBA approval)
- Repository access levels (read/write/admin) determine who can even propose changes
When someone wants to scale up production, they can't just run a command. They must:
- Fork or branch the repo
- Modify the declarative config (e.g.,
replicas: 10) - Submit a merge request
- Wait for required approvals
- Only then does the GitOps agent pull and apply the change
This creates an audit trail baked into Git history—every deployment shows who proposed it, who approved it, and when it merged.
Access Tiers Example
- Junior devs: read-only on production configs
- Mid-level: can propose changes via MRs
- Seniors: can approve and merge
- Security team: required reviewers for anything touching secrets or network policies
Key Takeaway: GitOps access control means you manage deployment permissions through Git's native features—branch protection, merge approvals, and access levels—turning code review into deployment authorization.