← Back to concept explainers

Concept Fable

Principle of least privilege

Conclusion first:The principle of least privilege gives each user, agent, service, or tool only the minimum permissions needed for the current task and time window. In Agent systems, least privilege limits blast radius from prompt injection, bad plans, compromised tools, mistaken autonomy, and insider misuse. It should include scoped credentials, just-in-time access, approvals, and automatic revocation.

Principle of Least Privilege · Security / operations

Read the story first. There is no rush to give a definition here; let the question grow on its own first.

Fable

Only carry the keys needed for the day

The manor steward used to hand the whole ring of keys to the night watchman. Kitchen, pharmacy, money chest, stables, and study were all on one ring because it was convenient. At night, whoever needed to fetch something, the night watchman did not have to ask back and forth.

One day the new night watchman misheard his instructions. He meant to go to the kitchen for lamp oil, but instead opened the medicine room looking for a flint, and left the cash box key on the table. Nothing was stolen, but the manor owner felt a chill down his spine: a single small errand had touched every vital point.

The steward first had the night watchman write a pledge promising not to open doors randomly. The second night he still patrolled the courtyard carrying the whole string of keys. A pledge can remind people, but it cannot reduce the loss after keys are lost or misused.

The old accountant suggested splitting the keys. The person delivering meals would carry only the kitchen key, the person tending the horses only the stable key, the pharmacy key would go with the physician, and the cashbox key would be kept jointly by the steward and the accountant. Temporary assignments would be returned when they expired, and exceptions would be logged.

At first everyone found it troublesome. But when a waiter lost his keys, only the kitchen lock needed changing; the cash box and pharmacy were unaffected. For the first time, the manor owner saw that shrinking authority to just enough would stop errors within a small scope.

Later, the manor did not slow down much, but accidents decreased. The steward understood that reliable management is not about trusting everyone to always be cautious, but about giving each role only the minimum authority needed to complete the current task; exceeding authority must be re-applied for.

The steward also ruled that keys must not be lent out long-term for convenience. Today the roof needs repair, so the warehouse key is borrowed; once the repair is done, it is returned. Next time it is needed, it is claimed again by task. If temporary authority becomes permanent authority, risk quietly grows.

Later, when new servants arrived at the estate, the steward no longer asked "is he trustworthy" before handing over the whole ring of keys, but instead asked "what does he need to accomplish today." Trust still mattered, but the system first narrowed the possible scope of harm. Later, when the estate owner checked the keys, what he saw was not who held a high position, but who was doing what task. Power followed the task, and when the task ended, power was reclaimed—only then would the estate not open all doors because of one small mistake. This give-and-take let the estate get things done without hanging all the risk on one person's shoulders. Later, even longtime employees received keys by task. Familiarity could not replace boundaries. This rule later became common sense at the estate. Steady.

Reveal

This story is about: the principle of least privilege

The principle of least privilege gives each user, agent, service, or tool only the minimum permissions needed for the current task and time window. In Agent systems, least privilege limits blast radius from prompt injection, bad plans, compromised tools, mistaken autonomy, and insider misuse. It should include scoped credentials, just-in-time access, approvals, and automatic revocation.

What matters is that it is not just a term, but a structural problem that repeatedly appears in real AI / Agent systems. Understanding it lets you judge when to add a model, when to change a process, and when to add governance.

Metaphor mapping

  • The whole key ring: overly broad default permissions
  • Night patrol puppet: automated Agent
  • Irrelevant secrets in logs: overly broad permissions lead to data spread
  • Route key for the day: least privilege and task-based authorization
  • Additional key approval: JIT permissions and escalation process
  • Final insight: the more capable an Agent is of acting, the less it should be given long-term, global, untraceable permissions

Andy Ren Xu's judgment

The practical value of this concept is that it helps you break "AI features that look smart" into deliverable, verifiable, and governable units of work.

PermissionsRBACsandboxingsecrets managementapprovalaccess control

Related distinctions

This concept is easily confused with adjacent concepts; it is recommended to continue to the comparison page.

京ICP备2026014272号