In plain words
Least privilege means every account, service, token and agent gets only the permissions its job requires, for only as long as it needs them, so a mistake or a stolen key can do limited damage.
Where you see it
Harbor's invoice worker connects to Postgres as the database owner, so a bug in it could drop any table. A role that can read orders and write invoices, and nothing else, turns that disaster into a failed query.
What goes wrong
- One master key for everything
When every service shares the admin database login or a cloud key with full access, a leak anywhere is a leak everywhere. Give each service its own credentials, scoped to what it touches.
- Access that only ever grows
People change teams and keep their production access, and old tokens keep working years later. Review access every quarter, and make tokens expire by default.
- Agents with all of your permissions
An agent running with your cloud credentials or the database owner login can do anything you can, including by mistake. Give it a scoped role, read-only where possible, and approve destructive commands yourself.
What to tell your agent
Quick check
Sign in to earn +10 XP for itHarbor's invoice worker is compromised through a vulnerable dependency. Which setup limits the damage most?