# Least privilege

> Least privilege is the security principle that every user, key and AI agent should hold only the access it needs for its task, and nothing more.

Source https://rareagentics.com/glossary/least-privilege

## Why does it matter to a buyer?

It limits the damage when something goes wrong, because a stolen key or a misled agent can only reach what it was given. It is why the agents that write code should hold no credentials to merge, deploy or reach production.

## An example

For example, an agent that summarises support tickets needs read access to tickets, and has no reason to hold a key that can delete customer records.

## Related terms

- [Guardrails](https://rareagentics.com/glossary/guardrails)
- [Service role key](https://rareagentics.com/glossary/service-role-key)
- [Production](https://rareagentics.com/glossary/production)
- [Prompt injection](https://rareagentics.com/glossary/prompt-injection)

---

Rare Agentics is a UK software and AI agent engineering firm based in London. Rare Agentics Limited, company number 17494524. Contact hello@rareagentics.com or https://rareagentics.com/contact. Book a call at https://rareagentics.com/book-a-call.
