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
- Non-human identity (NHI) A non-human identity (NHI) is any identity that authenticates and acts without a person at the keyboard: a service account, IAM role, API key, OAuth application, CI/CD robot, workload identity or AI agent.
- Service account A service account is an identity created for an application, workload or automation to authenticate as, rather than for a person, and granted permissions through roles or bindings.
- Workload identity Workload identity is an identity issued to a running workload, such as a pod, function, VM or CI job, usually by the platform that runs it, and exchanged for short-lived credentials instead of a stored secret.
- AI agent security AI agent security is the set of controls that govern what AI agents, software that uses a model to choose and take actions, can access and do, including their identity, credentials, tool permissions and runtime authorization.
- CSPM (cloud security posture management) Cloud security posture management (CSPM) is the continuous inspection of deployed cloud accounts, through the providers' own APIs, for misconfigurations and risky settings such as public storage, open network rules and over-broad IAM grants.
Guides on Least privilege
- Kubernetes Admission Control for Image Provenance Sign container images in CI, attest how they were built, and refuse unsigned or unpinned images at admission with Kyverno and ValidatingAdmissionPolicy.
- Least Privilege for CI/CD Identities: GitHub Actions OIDC Replace long-lived cloud keys in CI with GitHub Actions OIDC, then scope the trust policy, the role and GITHUB_TOKEN so a pipeline can do only its own job.
On the platform: Access intelligence. All glossary terms