least privilege

Giving every program and person only the access they need, and nothing more.

In more detail

Each extra permission is something an attacker or a mistake can use. Granting only what a task needs shrinks the damage any one failure can do.

Examples

Connect as an ordinary user and become root only for the tasks that need it; give each person the vault passwords for only the environments they run.
Non-root containers, signing keys only on the identity server, public keys only on microservices.
On a Linux host this means narrow sudo rules instead of root shells, group access instead of world-writable files, few setuid programs and firewalls that allow only required ports. Each step shrinks what an attacker gains from one mistake.
Few identities should be able to create CronJobs, webhooks or role bindings.
One action (s3:GetObject) on one prefix (arn:aws:s3:::reports/*) instead of s3:* on *
In Terraform: Pipelines that only plan should hold read-only credentials; only the protected apply job needs write access, and nobody should be able to destroy production from a laptop.

Related terms

Taught in

References

Certification courses