A single misconfigured role can open the gates for an attacker. Least privilege removes that weakness before it becomes a breach. In a self-hosted deployment, it is not optional—it is the foundation.
Least privilege means every service account, container, and process gets only the access it needs. No admin rights unless required. No wildcard permissions. No trust based on convenience. This reduces the blast radius when something goes wrong and limits lateral movement inside your infrastructure.
For a self-hosted deployment, start with a clear access inventory. Map each component in your stack—databases, caches, queues, APIs. Identify the minimum actions each must perform. Modern orchestration tools let you bind these permissions tightly: Kubernetes Role-Based Access Control (RBAC), Linux capabilities, container-level AppArmor profiles.
Secrets should stay isolated. Use a local secrets manager instead of environment variables in plain text. Rotate often. Audit regularly. Log every privilege escalation event. If an account never needs shell access, remove it. If a service should only read from S3, do not give it write access.