{
  "id": "least-privilege",
  "title": "Least Privilege",
  "lang": "en",
  "source_lang": "en",
  "summary": "Least privilege is a security principle that limits each user, process, or service to the permissions necessary for its authorized tasks, for no longer than necessary.",
  "category": "computer-science",
  "subcategory": "networks-security",
  "type": "concept",
  "aliases": [
    "Principle of least privilege",
    "Principle of minimal privilege",
    "Least authority",
    "POLP"
  ],
  "generated_at": "2026-11-04",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/least-privilege/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/least-privilege/",
      "json": "https://aiwiki.page/zh/least-privilege.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "Least privilege is a principle of information security under which a user, program, device, or other entity receives only the authority necessary to perform its intended tasks. Restrictions can apply to the resources accessible, the operations permitted, the circumstances of access, and the duration of authorization. Its purpose is to limit the consequences of mistakes, misuse, and compromise without preventing legitimate work.\n\nThe principle applies both to organizational permissions and to the internal design of software. An employee may need to view records without changing them; a service may need to read one storage location without accessing others; a program component may need to process untrusted input without authority to modify system files."
    },
    {
      "heading": "Meaning and scope",
      "text": "Least privilege concerns effective authority: what an entity can actually cause a system to do, rather than merely the permissions explicitly listed on its account. Authority may arise through group membership, inherited policies, delegated credentials, executable programs, or control over another identity.\n\nAn access control decision commonly involves:\n\n- Subject: the user, process, service, or device requesting access.\n- Resource: the file, record, service, device, or other object being accessed.\n- Action: an operation such as reading, modifying, deleting, executing, or administering.\n- Context: conditions such as time, session, device state, or approval status.\n\nLeast privilege narrows these dimensions to match an authorized task. Permission to read one report does not imply permission to read every report; permission to restart a service does not necessarily imply permission to modify its executable.\n\n“Least” is relative to a defined task and security policy. It is not generally a uniquely calculable minimum. Requirements change, and several permission configurations may support the same function with different operational and security consequences.\n\nAuthentication and authorization\n\nAuthentication establishes or verifies an identity. Authorization determines which actions that identity may perform. Least privilege primarily constrains authorization.\n\nStrong authentication does not compensate for excessive permissions: a correctly authenticated account can still have unnecessarily broad authority. Conversely, narrowly scoped permissions can reduce the consequences of stolen credentials, although they do not prevent credential theft itself."
    },
    {
      "heading": "Historical development",
      "text": "Least privilege predates contemporary cloud and identity-management systems. It developed within the broader effort to protect shared computing environments, where users and programs had to coexist without unrestricted access to one another’s data or to system controls.\n\nJerome H. Saltzer and Michael D. Schroeder included least privilege among the design principles discussed in their 1975 paper The Protection of Information in Computer Systems. Their formulation applied to both programs and users and emphasized operating with only the privileges needed to complete a task.\n\nSubsequent implementations have ranged from account permissions in operating systems to restricted database roles, application sandboxes, and cloud authorization policies. The underlying principle remains the same even when the mechanisms used to express and enforce permissions differ."
    },
    {
      "heading": "Security rationale",
      "text": "Least privilege limits the consequences of a failure rather than assuming that failures can always be prevented. If a compromised service can read only one dataset, the attacker does not automatically acquire authority over every dataset available to the organization.\n\nIts principal benefits include:\n\n- Containment of compromise: restricting the resources and operations available through a compromised identity.\n- Reduction of accidental damage: preventing routine mistakes from affecting resources outside a person’s or program’s responsibilities.\n- Reduced opportunity for abuse: limiting actions available to insiders and other authorized users.\n- More specific accountability: making permissions and privileged actions easier to associate with particular responsibilities.\n\nThese benefits depend on enforcement. A narrow permission policy provides little protection if a security vulnerability allows an attacker to bypass it.\n\nLeast privilege is therefore part of defense in depth, not a substitute for other controls. It also supports zero trust architecture, but the concepts are not equivalent: zero trust encompasses broader decisions about trust, identity, resource access, and ongoing evaluation."
    },
    {
      "heading": "Implementation mechanisms",
      "text": "Accounts, roles, and policies\n\nRole-based access control groups permissions into roles associated with responsibilities. A reporting role, for example, may allow reading approved records but prohibit changing them. Roles can simplify administration, but an excessively broad role can reproduce the same problems as an overprivileged individual account.\n\nAttribute-based access control evaluates attributes of subjects, resources, actions, and environmental conditions. It can express restrictions such as allowing access only to records belonging to a particular project. Its effectiveness depends on the accuracy of those attributes and the interaction of policy rules.\n\nNeither model automatically achieves least privilege. Effective access can expand through nested groups, overlapping roles, inherited policies, or resource-specific grants.\n\nOperating-system controls\n\nOperating systems enforce boundaries through user identities, groups, file permissions, process isolation, and other mechanisms.\n\nIn Unix and Linux systems, ordinary processes can run under accounts that lack unrestricted administrative authority. Linux capabilities divide some powers traditionally associated with the root account into separately assignable units. These mechanisms permit finer distinctions, although some individual capabilities still confer substantial authority.\n\nMicrosoft Windows provides mechanisms including access tokens, security descriptors, and integrity levels. Separating ordinary activity from administrative elevation reduces routine exposure of privileged authority; it does not guarantee that every elevated operation is narrowly scoped.\n\nPrivilege separation and sandboxing\n\nPrivilege separation divides a program into components with different authority. A small component may perform a privileged operation while a larger component handles untrusted input with fewer permissions. This can reduce the amount of complex code that directly possesses sensitive authority.\n\nSandboxing constrains a program’s interaction with its environment, potentially restricting files, network connections, device access, and operating-system interfaces. A sandbox can implement least privilege, but only to the extent that its permitted operations match the workload’s needs and its boundary remains effective.\n\nCapability-based security represents authority through unforgeable references that grant access to particular objects or operations. Passing a component only the capabilities it requires can make authority more explicit than systems in which programs implicitly inherit broad account permissions.\n\nTemporary and task-specific access\n\nPermissions can be limited in time as well as scope. Just-in-time access makes authority available when needed rather than leaving it continuously enabled. Just-enough access restricts the operations that the temporary authority permits.\n\nShort-lived credentials reduce the period during which a credential remains usable, but they do not inherently narrow its permissions. A short-lived credential with administrator authority remains broadly powerful while valid. Similarly, withdrawing a permission may not immediately terminate established sessions or invalidate all previously issued credentials."
    },
    {
      "heading": "Applications",
      "text": "Databases\n\nA database account used by an application may require access to only a subset of tables, views, or stored procedures. A reporting service may need read access but not permission to alter the database schema or manage other accounts.\n\nDepending on the database system, restrictions can operate at the table, column, or row level. A stored procedure can expose a narrow operation without granting direct access to underlying data, although execution under a more privileged identity can also create unintended authority.\n\nCloud services and distributed applications\n\nIn cloud computing, permissions often govern resource-management interfaces as well as access to data. Authority to create workloads, attach identities, modify policies, or retrieve credentials may enable indirect access to resources that an identity cannot access directly.\n\nSeparate workload identities can distinguish the authority of individual services. Narrow API permissions can limit both the operations and resources available to each service. However, policy names alone do not establish effective privilege: trust relationships and permission to impersonate other identities also matter.\n\nDevelopment and deployment systems\n\nBuild and deployment systems may possess authority to retrieve source code, publish artifacts, or modify production services. Separating these functions can limit the consequences of a compromised build job or dependency.\n\nA deployment identity can remain highly privileged even if it lacks direct database access. If it can deploy arbitrary application code, it may be able to cause that code to use the application’s database permissions. Least-privilege analysis therefore includes indirect control over privileged software."
    },
    {
      "heading": "Evaluation and maintenance",
      "text": "Least privilege is an ongoing property rather than a one-time account configuration. Permissions can accumulate as people change responsibilities, temporary exceptions persist, and services acquire new features. This accumulation is commonly called privilege creep.\n\nAssessment distinguishes several forms of authority:\n\n- Assigned permissions: grants recorded in policies and account configuration.\n- Effective permissions: authority resulting from all applicable grants, restrictions, inheritance, and delegation.\n- Exercised permissions: operations observed during a particular period.\n\nObserved activity can help identify unnecessary access, but absence of use does not prove that a permission is unnecessary. Rare recovery procedures, infrequent business operations, and seasonal tasks may not appear in a short observation window.\n\nA threat model helps identify which identities, resources, and delegation paths require particular scrutiny. Reviews can examine whether an identity can modify a privileged executable, change a policy, assume another identity, or obtain credentials. Testing must consider both intended access and operations that should be denied."
    },
    {
      "heading": "Limitations and trade-offs",
      "text": "Least privilege requires a sufficiently accurate understanding of legitimate work. Underspecified requirements can produce overly restrictive policies, operational failures, and pressure to create broad exceptions. Highly granular policies can also become difficult to maintain and audit.\n\nThe principle cannot prevent every harmful use of authorized access. An account permitted to read sensitive records may still disclose those records. An administrator performing a legitimate task may make a damaging mistake within the authorized scope.\n\nNor does low privilege necessarily imply low impact. An unprivileged process may still access valuable data or consume resources. An exploitable kernel defect may undermine the boundary that is supposed to contain it.\n\nLeast privilege is distinct from separation of duties, which divides sensitive activities among multiple parties so that no single actor can complete them alone. It is also distinct from default deny, which specifies that access is prohibited unless explicitly allowed. A default-deny system can still grant excessively broad exceptions; least privilege concerns whether those grants are appropriately limited."
    }
  ],
  "links": [
    "information-security",
    "access-control",
    "authentication",
    "operating-system",
    "security-vulnerability",
    "defense-in-depth",
    "zero-trust-architecture",
    "attribute-based-access-control",
    "unix",
    "linux",
    "microsoft-windows",
    "sandbox-computer-security",
    "capability-based-security",
    "database",
    "database-schema",
    "cloud-computing",
    "application-programming-interface",
    "source-code",
    "kernel-operating-system"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}