liveBook · Manning

Principle of least privilege

As explained in Generative AI in Action

The principle of least privilege is a security principle that grants a system or component only the minimum access required to perform its intended functions.

The principle of least privilege grants an LLM or system component only the minimum access required for its intended functions. In prompt-injection defenses, privilege controls limit access to backend systems through the application and system APIs. section 13.2.1

Apply the principle with layered controls:

  • Assign identity-based authentication or API tokens for expandable capabilities such as data access and function-level permissions. section 13.2.1
  • Require user confirmation before sensitive operations so indirect injections cannot act without explicit agreement. section 13.2.1
  • Audit and detect attempted injections with application logging, while treating the LLM as unreliable. section 13.2.1
Figure 13.2 Prompt injection threats [4]
figure

Use the threat diagram to relate excessive model access to possible prompt-injection consequences. section 13.2.1

How Generative AI in Action covers it

How deep it goes
Defines minimum required access and connects it to privilege control, authentication, and function-level permissions without implementation detail.
Examples
Uses API tokens, backend-system permissions, sensitive-operation confirmations, and prompt-injection threat diagrams.
What you can do after
Apply it through privilege controls, identity-based authentication, confirmation gates, and audited API access.
How it connects
Connects prompt injection with backend APIs, authentication, human confirmation, ChatML, and application logging.

Also explained in

Compare how 17 books explain principle of least privilege →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Generative AI in Action. The section links point to the parts of the book it draws on.