Glossary · Non-human identity

Least privilege

The principle of least privilege says that every user, process and machine identity should hold only the permissions it needs to do its job, and only for as long as it needs them.

Least privilege limits the damage any one compromised identity can do. An attacker who steals a credential inherits its permissions; if those are narrow, the theft is contained. The principle applies at every layer: database users that can read only their own schema, cloud roles that can write only to one bucket, Kubernetes service accounts bound to a role in one namespace, API keys limited to the scopes a pipeline actually uses, and AI agents entitled only to the tools their task requires. Its time-bound form is just-in-time access: elevated permissions granted for a bounded window and then removed.

How it is used in practice

Teams apply least privilege when granting access, by starting from no permissions and adding what is needed, and when reviewing it, by comparing what an identity can do with what it has done and removing the difference. The first part needs a clear statement of each identity's purpose. The second needs data: the effective access of an identity, meaning everything it can reach once roles, group memberships, trust relationships and role assumptions are followed, and, where the provider records it, its actual usage. The size of what an identity can reach is often called its blast radius.

Common pitfalls

  • Reading one policy document. Declared permissions on one role are not effective access; transitive role assumption and inherited grants are where excess hides.
  • Wildcards. * actions or resources granted "temporarily" tend to stay.
  • Shared identities. When several workloads share a credential, its permissions are the union of what they all need.
  • Removing access without usage data. Cutting permissions blind breaks things, and teams stop trusting the process.
  • Standing privilege for rare tasks. Permissions used once a quarter are better granted on request.

How TrustIvan relates to it

Least privilege shows up across TrustIvan. Its own API keys hold only explicitly granted scopes, and some scopes, such as minting keys or managing policies, cannot be held by any key. In NHI Security, access analysis computes an identity's effective access by walking the identity graph forward over permission, assumption and access relationships, returning one real route to each reachable resource, and blast radius tallies the same walk by sensitivity, with unclassified resources counted as unknown rather than low. An AI agent starts with no tool entitlements, and access grants are time-bounded and approved by someone other than the requester. TrustIvan does not yet recommend permission removals from observed usage. See Access analysis.

Related terms

Guides on Least privilege

On the platform: Access intelligence. All glossary terms

See TrustIvan on your own estate.

Book thirty minutes with an engineer and bring an image, a repository or a cloud account, or start free on the hosted service.