<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Least Privilege on RockB</title><link>https://baeseokjae.github.io/tags/least-privilege/</link><description>Recent content in Least Privilege on RockB</description><image><title>RockB</title><url>https://baeseokjae.github.io/images/og-default.png</url><link>https://baeseokjae.github.io/images/og-default.png</link></image><generator>Hugo</generator><language>en-us</language><lastBuildDate>Mon, 15 Jun 2026 12:05:27 +0000</lastBuildDate><atom:link href="https://baeseokjae.github.io/tags/least-privilege/index.xml" rel="self" type="application/rss+xml"/><item><title>How to Build Secure AI Agents with Least Privilege in 2026</title><link>https://baeseokjae.github.io/posts/secure-ai-agents-least-privilege-2026/</link><pubDate>Mon, 15 Jun 2026 12:05:27 +0000</pubDate><guid>https://baeseokjae.github.io/posts/secure-ai-agents-least-privilege-2026/</guid><description>A practical least-privilege architecture for secure AI agents, scoped tools, short-lived credentials, approvals, and audit logs.</description><content:encoded><![CDATA[<p>Secure AI agents with least privilege by giving each agent a scoped identity, limiting tools and data, enforcing policy outside the prompt, using short-lived credentials, requiring approvals for high-impact actions, sandboxing execution, and logging every tool call for continuous permission review.</p>
<h2 id="why-does-least-privilege-matter-more-for-ai-agents-in-2026">Why does least privilege matter more for AI agents in 2026?</h2>
<p>Least privilege for AI agents is the practice of giving an autonomous workflow only the identity, data, tools, network access, memory, and approval rights it needs for a specific task. Gartner predicts that by 2028, 33% of enterprise software applications will include agentic AI, up from less than 1% in 2024, so the blast radius of one over-permissioned agent is becoming a mainstream production risk. Traditional apps usually execute known code paths. Agents choose tools, summarize context, recover from failed calls, and may act on untrusted instructions hidden in emails, tickets, pages, or documents. That flexibility is useful, but it turns every tool call into an authorization decision. The goal is not to make prompts perfect. The goal is to make a malicious or mistaken prompt unable to read secrets, mutate production data, approve payments, or exfiltrate broad datasets. The takeaway: secure AI agents least privilege starts with limiting what the agent can actually do.</p>
<p>I treat agents as untrusted workers inside a controlled runtime. They may be useful, fast, and mostly correct, but they should not receive the same access as the engineer, analyst, or operator who requested the work. The practical shift is simple: stop asking, &ldquo;Can this model follow policy?&rdquo; and start asking, &ldquo;What can this runtime enforce if the model ignores policy?&rdquo;</p>
<h2 id="what-is-the-agent-threat-model-for-prompts-tools-data-memory-and-identity">What is the agent threat model for prompts, tools, data, memory, and identity?</h2>
<p>An AI agent threat model is a map of how instructions, credentials, tools, retrieved data, stored memory, and external systems can be abused when the model is allowed to act. OWASP&rsquo;s 2025 LLM Top 10 calls out excessive agency as a core risk because agents can cause damage when they receive too much functionality, permission, or autonomy. The highest-risk path is usually not a model hallucination by itself. It is a model hallucination or prompt injection connected to a real API token, a write-capable database tool, an email sender, a browser session, a code execution environment, or an internal search index. Agents also inherit risk from memory: a poisoned note, copied secret, or stale authorization assumption can influence later runs. Identity completes the model because every agent action lands somewhere as a credentialed request. The takeaway: model behavior matters, but production risk comes from the systems the agent can reach.</p>
<p>Use the same discipline you would use for a privileged backend service, then add controls for ambiguity. The agent may read untrusted text, infer intent from partial context, and choose between tools dynamically. That means your threat model should include indirect prompt injection, tool parameter abuse, retrieval overreach, cross-tenant data exposure, credential reuse, unsafe generated code, and silent permission creep.</p>
<table>
  <thead>
      <tr>
          <th>Threat surface</th>
          <th>Example failure</th>
          <th>Least-privilege control</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Prompt input</td>
          <td>A support ticket tells the agent to export customer data</td>
          <td>Treat retrieved text as untrusted and enforce tool policy outside the prompt</td>
      </tr>
      <tr>
          <td>Tool access</td>
          <td>A broad <code>run_sql</code> tool allows arbitrary updates</td>
          <td>Replace it with task-specific read and write functions</td>
      </tr>
      <tr>
          <td>Data retrieval</td>
          <td>Agent searches all tenants to answer one tenant&rsquo;s request</td>
          <td>Apply tenant, role, purpose, and row-level filters before retrieval</td>
      </tr>
      <tr>
          <td>Memory</td>
          <td>Agent stores a secret from a prior task</td>
          <td>Classify memory and block secret persistence</td>
      </tr>
      <tr>
          <td>Identity</td>
          <td>Agent uses a human admin token</td>
          <td>Use a separate short-lived agent identity</td>
      </tr>
  </tbody>
</table>
<h2 id="how-should-every-agent-get-its-own-scoped-identity">How should every agent get its own scoped identity?</h2>
<p>An agent identity is a non-human principal that represents one agent, workflow, or task class when it calls tools, APIs, databases, and internal services. In 2025, Okta reported that 96% of its technology-industry customers used multi-factor authentication in Workforce Identity Cloud, which is a useful reminder that strong human access controls are now normal; agents need equivalent rigor with service identities. Do not let an agent borrow a developer&rsquo;s token, a shared service account, or a broad integration secret. Create identities such as <code>agent-support-triage-readonly</code>, <code>agent-invoice-draft-writer</code>, or <code>agent-code-review-sandbox</code>, then attach purpose-bound scopes to each one. The identity should appear in logs, policy decisions, audit reviews, and incident response records as itself. If the agent performs work on behalf of a user, carry the user as a delegated subject, not as the credential. The takeaway: separate agent identity from human identity before you grant any permissions.</p>
<p>In implementation, this usually means issuing workload identity credentials from your cloud IAM, identity provider, or internal auth service. The token should encode agent id, environment, tenant or project boundary, allowed tools, expiration, and delegated user when relevant. That gives your policy engine enough context to answer, &ldquo;Is this exact agent allowed to perform this exact action right now?&rdquo;</p>
<h2 id="how-do-you-split-read-write-admin-and-external-action-permissions">How do you split read, write, admin, and external-action permissions?</h2>
<p>Permission splitting means separating low-impact observation from state-changing, privilege-changing, and externally visible actions so an agent cannot escalate from &ldquo;helpful assistant&rdquo; to &ldquo;unreviewed operator.&rdquo; IBM&rsquo;s 2025 Cost of a Data Breach report found that breaches involving shadow AI cost $4.63 million on average, which makes uncontrolled agent permissions more than a theoretical design smell. A support summarization agent may need read access to tickets and knowledge-base snippets, but it does not need to refund invoices, update account roles, send legal notices, or change retention settings. A code assistant may need repository read access and a sandboxed test runner, but not production deploy rights. Split permissions by action impact, data sensitivity, environment, and reversibility. Read-only scopes can often be automated. Writes need narrower schemas. Admin and external actions need stricter approvals. The takeaway: privilege boundaries should follow business impact, not the convenience of one broad integration token.</p>
<p>This split becomes easier when you model agent actions as capabilities. A capability is not &ldquo;database access.&rdquo; It is &ldquo;read open support tickets for assigned tenant,&rdquo; &ldquo;draft reply without sending,&rdquo; or &ldquo;create pull request in sandbox branch.&rdquo; Capabilities should be composable, auditable, and revocable without editing the prompt.</p>
<table>
  <thead>
      <tr>
          <th>Permission class</th>
          <th>Typical examples</th>
          <th>Default control</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Read</td>
          <td>Search docs, read ticket metadata, inspect logs</td>
          <td>Automated with tenant and purpose filters</td>
      </tr>
      <tr>
          <td>Write</td>
          <td>Draft response, update status, create branch</td>
          <td>Narrow tool schema and validation</td>
      </tr>
      <tr>
          <td>Admin</td>
          <td>Change roles, rotate secrets, approve deploy</td>
          <td>Deny by default, require human approval</td>
      </tr>
      <tr>
          <td>External action</td>
          <td>Send email, charge card, post publicly</td>
          <td>Approval or policy gate with preview</td>
      </tr>
  </tbody>
</table>
<h2 id="why-must-policy-enforcement-live-outside-the-prompt">Why must policy enforcement live outside the prompt?</h2>
<p>Policy enforcement outside the prompt means the runtime, gateway, tool server, or authorization layer decides whether an action is allowed, independent of what the model claims it should do. OWASP&rsquo;s Authorization Cheat Sheet recommends deny-by-default and validating permissions on every request; that rule applies directly to AI agents because every tool call is a request. A system prompt that says &ldquo;never export secrets&rdquo; is useful guidance, but it is not a security boundary. The model can be confused by indirect prompt injection, incomplete context, or competing instructions. A policy engine can reliably check agent id, user delegation, environment, resource owner, action type, risk score, and approval state before the tool executes. Put guardrails in code, not only in natural language. The model can propose an action; the platform must authorize it. The takeaway: prompts shape behavior, but policy gates enforce security.</p>
<p>A practical pattern is to route all tool calls through a broker. The broker validates arguments, applies authorization rules, redacts sensitive outputs, emits an audit event, and returns only the allowed result. If a tool call is denied, return a boring, structured denial message. Do not ask the model to decide whether to bypass the policy; make bypass impossible in the runtime.</p>
<h2 id="how-do-you-restrict-tools-with-narrow-schemas-and-safe-defaults">How do you restrict tools with narrow schemas and safe defaults?</h2>
<p>Tool restriction is the process of exposing small, purpose-built functions with typed parameters, validated inputs, fixed defaults, and bounded outputs instead of giving an agent broad command access. OWASP&rsquo;s LLM guidance treats excessive agency as a risk when agents receive too much functionality, permission, or autonomy, and a tool named <code>execute_command</code> or <code>query_database</code> is usually the start of that problem. Prefer <code>get_customer_invoice_summary(customer_id)</code> over arbitrary SQL, <code>draft_refund_request(invoice_id, amount_cents, reason_code)</code> over a payment admin API, and <code>search_docs(collection, query, max_results)</code> with approved collections over global search. Narrow schemas reduce both malicious abuse and ordinary model mistakes. Safe defaults should include read-only mode, result limits, deny-listed fields, tenant binding, dry-run previews, and explicit idempotency keys for writes. The takeaway: fewer sharper tools are safer than one flexible tool with a polite prompt.</p>
<p>For MCP servers, browser agents, and internal tool plugins, review the tool contract like you would review a public API. Ask whether each parameter can widen scope, whether defaults are dangerous, whether output contains secrets, and whether the agent can chain harmless-looking calls into a harmful workflow. Then remove the unnecessary surface.</p>
<h2 id="how-should-retrieval-memory-and-context-access-be-limited">How should retrieval, memory, and context access be limited?</h2>
<p>Retrieval control limits which documents, records, embeddings, files, and memory entries an agent can place into its context window for a specific task. The Cloud Security Alliance&rsquo;s 2025 State of AI and Security Survey found that 55% of organizations had fully deployed generative AI solutions and 34% had partially deployed them, which means retrieval systems are now production data planes, not experiments. An agent that can search every customer contract, Slack export, source repository, and ticket archive may answer questions well, but it can also create cross-tenant leakage or expose sensitive data after prompt injection. Filter retrieval before ranking, not after the model sees the text. Bind queries to tenant, user, project, data classification, retention policy, and task purpose. Treat memory as another datastore with access control, expiration, classification, and deletion. The takeaway: an agent should only remember and retrieve what the current task is allowed to know.</p>
<p>Context is not harmless because it is &ldquo;just text.&rdquo; Once sensitive data enters the prompt, it can influence tool choices, appear in outputs, or be stored in memory. Use retrieval gateways that enforce row-level and document-level permissions, redact known secret patterns, and attach provenance to every retrieved chunk so downstream logs can explain what the model saw.</p>
<h2 id="how-do-short-lived-credentials-and-just-in-time-grants-reduce-risk">How do short-lived credentials and just-in-time grants reduce risk?</h2>
<p>Short-lived credentials are time-bound tokens issued for a specific agent, action, resource, and environment, while just-in-time grants provide temporary access only when a task actually needs it. IBM reported that organizations using AI and automation extensively in security reduced average breach costs by $1.9 million compared with organizations that did not use those capabilities, but automation only helps when credentials are controllable. A long-lived agent token copied into a workflow runner, vector database connector, or MCP server becomes another durable secret to steal. Instead, mint credentials at runtime with five-minute or fifteen-minute lifetimes, attach narrow scopes, and revoke them automatically when the task completes. For unusual actions, require a grant request that records purpose, approver, expiration, and exact resource. The agent should never store refresh tokens, admin keys, or broad cloud credentials in memory. The takeaway: temporary access makes agent compromise easier to contain and investigate.</p>
<p>JIT access also gives you cleaner permission reviews. If an agent needs write access only twice a month, that access should not sit permanently on its identity. Track grants as events. When the workflow changes, old grants expire naturally instead of becoming invisible standing privilege.</p>
<h2 id="when-should-secure-ai-agents-require-human-approval">When should secure AI agents require human approval?</h2>
<p>Human approval is a control that pauses an agent before high-impact, irreversible, externally visible, or privilege-changing actions and asks an accountable person or policy workflow to approve the exact proposed operation. The Cloud Security Alliance reported that 62% of organizations had an AI incident response plan in 2025, and approval design should be part of that operational posture before the first serious incident. Do not approve vague intents such as &ldquo;fix the account.&rdquo; Approve concrete diffs, recipients, amounts, roles, commands, files, or API calls. Human review is appropriate for payments, refunds above a threshold, production deploys, public posts, customer emails, legal notices, user deletion, permission changes, data exports, and destructive database writes. Low-impact reads should not drown reviewers in noise. Risk-based approval keeps the agent useful while blocking the actions that create real business exposure. The takeaway: approval gates work when they review exact actions, not general agent confidence.</p>
<p>The approval payload should include who requested the task, which agent proposed the action, what data informed it, what will change, whether the action is reversible, and what policy rule triggered review. Store the approval result next to the tool-call log so incident responders can reconstruct the chain later.</p>
<h2 id="how-do-you-sandbox-execution-browsing-and-code-generation-agents">How do you sandbox execution, browsing, and code-generation agents?</h2>
<p>Sandboxing is the isolation of agent-run code, browser sessions, shell commands, file access, and network connections inside an environment that limits what the agent can read, write, execute, and contact. Microsoft&rsquo;s agentic AI security guidance highlights new attack paths from autonomous planning, plugins, memory, and delegated actions; code and browser agents combine several of those risks in one runtime. A code agent that can run tests should not automatically receive production secrets, host filesystem access, package-publish credentials, or unrestricted outbound network access. A browser agent should use a controlled profile, domain allowlists, download restrictions, and credential separation. A data-analysis agent should run in a container with mounted input files, output quotas, blocked metadata endpoints, and no ambient cloud identity. Sandboxes should be recreated often and treated as disposable. The takeaway: execution agents need operating-system and network boundaries, not only application-level instructions.</p>
<p>For developer workflows, I usually separate &ldquo;analysis,&rdquo; &ldquo;patch,&rdquo; &ldquo;test,&rdquo; and &ldquo;publish&rdquo; capabilities. The agent can inspect and modify a working tree, run bounded test commands, and produce a pull request. It cannot push directly to protected branches, publish packages, or read unrelated secrets unless a separate policy grants that access.</p>
<h2 id="what-should-you-log-for-every-agent-tool-call">What should you log for every agent tool call?</h2>
<p>Agent tool-call logging is the structured recording of who initiated a task, which agent acted, what tool was requested, which arguments were supplied, what policy decision was made, what resource was touched, and what result or error occurred. NIST&rsquo;s AI Risk Management Framework Generative AI Profile maps generative AI risk management to governance, context mapping, measurement, mitigation, monitoring, and incident response; logs are the connective tissue across those functions. Without tool-call logs, least privilege becomes guesswork because you cannot see which permissions are used, unused, denied, or abused. Log before and after authorization. Include correlation ids across model calls, retrieval events, approvals, credentials, and downstream API requests. Redact secrets, but preserve enough metadata for forensics. Review logs continuously to trim permissions and detect anomalies such as unusual tools, tenants, volumes, hours, or denied-action bursts. The takeaway: telemetry is part of least privilege because unused and abnormal access must be visible.</p>
<p>Good logs should answer practical questions quickly: What did the agent try to do? Was it allowed? Why? Which user or workflow caused it? What data did it see first? Which credential was used? Could the action be reversed? If you cannot answer those questions, your agent platform is not ready for sensitive work.</p>
<h2 id="what-is-a-practical-least-privilege-checklist-for-production-ai-agents">What is a practical least-privilege checklist for production AI agents?</h2>
<p>A production least-privilege checklist is a release gate that verifies agent identity, data access, tool scope, credential lifetime, policy enforcement, approval flow, sandboxing, and telemetry before an agent handles real users or sensitive systems. McKinsey&rsquo;s 2025 global AI survey reported that 78% of respondents said their organizations used AI in at least one business function, up from 55% in 2023, so many teams are moving from prototypes to operations faster than their security process can adapt. The checklist below is intentionally concrete: it asks whether the agent can be identified, constrained, observed, revoked, and reviewed. A secure pilot should pass the same categories as a secure production rollout, even if the initial scopes are smaller. Do the checklist per agent workflow, not once per model vendor. The takeaway: secure AI agents least privilege becomes manageable when every launch repeats the same permission review.</p>
<table>
  <thead>
      <tr>
          <th>Control</th>
          <th>Pass condition</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Agent identity</td>
          <td>Unique non-human identity per workflow and environment</td>
      </tr>
      <tr>
          <td>Data scope</td>
          <td>Tenant, project, role, and classification filters enforced before retrieval</td>
      </tr>
      <tr>
          <td>Tool scope</td>
          <td>Narrow functions, typed schemas, bounded outputs, safe defaults</td>
      </tr>
      <tr>
          <td>Credentials</td>
          <td>Short-lived tokens with no stored refresh or admin secrets</td>
      </tr>
      <tr>
          <td>Authorization</td>
          <td>Deny-by-default policy checked on every tool call</td>
      </tr>
      <tr>
          <td>Approval</td>
          <td>Exact-action review for high-impact operations</td>
      </tr>
      <tr>
          <td>Sandbox</td>
          <td>Isolated filesystem, process, browser, and network where applicable</td>
      </tr>
      <tr>
          <td>Logging</td>
          <td>Correlated logs for retrieval, policy, tool calls, approvals, and credentials</td>
      </tr>
      <tr>
          <td>Review</td>
          <td>Regular trimming of unused scopes and expired grants</td>
      </tr>
  </tbody>
</table>
<p>Run this checklist again after adding a new tool, data connector, tenant, memory store, or external action. Most agent incidents I have seen come from &ldquo;small&rdquo; capability additions that skipped the original security review.</p>
<h2 id="what-common-mistakes-break-least-privilege-for-ai-agents">What common mistakes break least privilege for AI agents?</h2>
<p>Common least-privilege failures happen when teams give agents shared service accounts, broad MCP tools, prompt-only guardrails, unrestricted retrieval, durable secrets, or unreviewed write access because the prototype worked in a narrow demo. CISA and international partners frame secure AI as a lifecycle problem involving data governance, access controls, supply-chain controls, monitoring, and incident response, which is the right lens for these mistakes. The dangerous pattern is convenience becoming architecture: one admin token, one generic browser, one global search index, one tool that can run arbitrary SQL, and one system prompt promising responsible behavior. That design may ship fast, but it removes the boundaries you need when prompt injection reaches the agent. Replace shared accounts with scoped identities, replace broad tools with capability APIs, and replace trust in the prompt with policy checks. The takeaway: most agent privilege failures are ordinary access-control shortcuts made worse by autonomy.</p>
<p>The other mistake is failing to revisit permissions after launch. Agents evolve quickly: new tools, new datasets, new prompts, new teams, and new integrations. If you do not expire grants and review usage, a once-minimal permission set becomes a pile of historical exceptions.</p>
<h2 id="what-does-a-policy-controlled-agent-runtime-look-like">What does a policy-controlled agent runtime look like?</h2>
<p>A policy-controlled agent runtime is an architecture where the model plans and proposes actions, but identity, authorization, retrieval, tool execution, approvals, credentials, sandboxing, and logging are handled by deterministic services around it. NIST&rsquo;s generative AI profile emphasizes governance, mapping, measurement, management, and monitoring; this runtime turns those categories into enforceable components. The model receives task context and allowed tool descriptions. A tool broker intercepts calls, validates schemas, asks a policy engine for a decision, obtains short-lived credentials when needed, executes through a sandbox or connector, redacts outputs, and logs the full event. Retrieval flows through a gateway that enforces tenant and classification boundaries before text reaches the model. High-impact actions route to an approval service. Security teams review usage and trim grants through the same control plane. The takeaway: the model should be inside the security architecture, not the security architecture itself.</p>
<p>Here is the minimal reference pattern I would start with:</p>
<table>
  <thead>
      <tr>
          <th>Layer</th>
          <th>Responsibility</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Agent identity service</td>
          <td>Issues task-bound non-human identities and delegated-user claims</td>
      </tr>
      <tr>
          <td>Retrieval gateway</td>
          <td>Applies access filters, provenance, redaction, and result limits</td>
      </tr>
      <tr>
          <td>Tool broker</td>
          <td>Validates schemas, calls policy, executes tools, and records results</td>
      </tr>
      <tr>
          <td>Policy engine</td>
          <td>Makes deny-by-default decisions from identity, action, resource, and risk</td>
      </tr>
      <tr>
          <td>Credential broker</td>
          <td>Mints short-lived tokens and records grants</td>
      </tr>
      <tr>
          <td>Approval service</td>
          <td>Captures exact-action reviews and approval evidence</td>
      </tr>
      <tr>
          <td>Sandbox runtime</td>
          <td>Isolates code, browser, files, and network</td>
      </tr>
      <tr>
          <td>Audit pipeline</td>
          <td>Correlates model, retrieval, policy, tool, approval, and downstream events</td>
      </tr>
  </tbody>
</table>
<p>This architecture does not require one vendor. It requires one rule: no agent calls a sensitive system directly without passing through an enforceable control.</p>
<h2 id="what-are-the-final-recommendations-for-secure-ai-agent-rollouts">What are the final recommendations for secure AI agent rollouts?</h2>
<p>Secure AI agent rollout means starting with low-risk capabilities, proving the least-privilege control plane works, and expanding autonomy only after identity, data, tools, approvals, and logs are operating correctly. IBM&rsquo;s 2025 breach research put the global average breach cost at $4.44 million, while shadow AI breaches averaged $4.63 million, so the cost of skipping controls is not abstract. Begin with read-only or draft-only workflows. Give each workflow a separate agent identity. Expose only narrow tools. Put retrieval behind access filters. Mint short-lived credentials. Require approval for irreversible and external actions. Sandbox execution. Log everything. Review usage after real traffic and remove unused scopes. The best agent security programs do not try to predict every bad prompt; they assume bad instructions will arrive and make dangerous actions unavailable or reviewable. The takeaway: least privilege is the operating model that lets agents be useful without becoming uncontrolled insiders.</p>
<p>My strongest practical advice is to design the permission lifecycle before adding more autonomy. Discover what the agent needs, grant the smallest capability, observe real usage, trim unused access, expire temporary grants, and repeat. That loop is less glamorous than a new reasoning model, but it is what keeps agent systems governable in production.</p>
<h2 id="faq">FAQ</h2>
<p>AI agent least privilege refers to limiting an agent&rsquo;s identity, data, tools, memory, credentials, network access, and autonomy to the smallest set required for a defined workflow. Gartner&rsquo;s forecast that agentic AI will appear in 33% of enterprise software applications by 2028 makes this a near-term architecture concern for teams shipping production agents in 2026. The FAQ below answers the questions developers usually ask when moving from a demo agent to an operational one: whether prompts are enough, how to handle MCP servers, where approvals belong, and how often to review permissions. The same principle applies across support agents, code agents, browser agents, data agents, and workflow agents. If the model is allowed to call tools or retrieve private data, least privilege must be enforced by the surrounding system. The takeaway: agent security is practical access control applied to autonomous software.</p>
<h3 id="are-system-prompts-enough-to-enforce-least-privilege">Are system prompts enough to enforce least privilege?</h3>
<p>System prompts are not enough to enforce least privilege because prompts guide behavior but cannot reliably block a tool call, revoke a credential, or prevent access to a resource. Use prompts to describe expected behavior, then enforce permissions in the tool broker, policy engine, retrieval gateway, and identity layer.</p>
<h3 id="should-an-agent-use-the-end-users-token">Should an agent use the end user&rsquo;s token?</h3>
<p>An agent should not directly reuse the end user&rsquo;s long-lived token because that makes logs confusing and can over-delegate privileges. Use a separate agent identity with delegated-user claims, task purpose, resource scope, and short expiration so authorization can consider both the agent and the human requester.</p>
<h3 id="how-do-mcp-servers-fit-into-least-privilege">How do MCP servers fit into least privilege?</h3>
<p>MCP servers should be treated as privileged tool surfaces, not harmless adapters. Expose only the tools an agent workflow needs, narrow every parameter schema, validate inputs on the server side, apply policy before execution, and avoid generic filesystem, shell, browser, or database tools unless they run in a tight sandbox.</p>
<h3 id="what-actions-should-always-require-approval">What actions should always require approval?</h3>
<p>Approval should be required for actions that are irreversible, externally visible, financially material, privilege-changing, destructive, or legally sensitive. Common examples include production deploys, payment movement, refunds above a threshold, user deletion, role changes, public posts, customer emails, bulk exports, and destructive database writes.</p>
<h3 id="how-often-should-agent-permissions-be-reviewed">How often should agent permissions be reviewed?</h3>
<p>Agent permissions should be reviewed continuously through logs and formally after every material workflow change. At minimum, review tool usage, denied calls, unused scopes, active grants, approval rates, retrieval sources, and credential issuance monthly for sensitive agents and after every new connector or tool is added.</p>
]]></content:encoded></item></channel></rss>