keepcalculator

06 Numbers and Powers

Secure AI Agents with Least Privilege and Approval Gates

Card No. 06·58511 · Updated · Standard formula, shown below

Least-privilege access limits an AI agent to the tools, data, and actions it needs, while approval gates pause consequential actions until a person reviews them. The result is a smaller blast radius if an agent makes a mistake or is misused, without requiring every routine task to stop. Before you begin, identify the agent’s tasks, its connected systems, and who can approve sensitive actions.

What You’ll Need

  • An inventory of the agent’s tasks, tools, data sources, and any actions that change or send information.
  • Access to the identity, permissions, and policy settings for the agent and its connected services.
  • A named owner and at least one authorized reviewer for actions that need human approval.
  • A test environment or non-production data, plus logs that record tool calls, decisions, approvals, and outcomes.

Step-by-Step

  1. Map the agent’s work and classify actions. Write down each task the agent is allowed to perform, then list the data and tools each task uses. Separate read-only actions, such as searching approved documents, from changes such as editing records, sending messages, granting access, or deleting files. Mark actions by impact and reversibility. This list becomes the basis for permissions and approval rules; avoid granting access simply because a connector makes it convenient.
  2. Give the agent its own identity. Use a dedicated service identity or workload identity rather than a staff member’s account, shared login, or personal API key. Keep the identity separate from human administrators and from other agents where practical. Assign an owner responsible for reviewing its access and a clear process to disable it. Do not put passwords, tokens, or other secrets in prompts, source code, or ordinary configuration files.
  3. Grant the minimum permissions for each tool. Start with read-only access to the smallest required set of records, folders, or resources. Add write access only for a specific task that requires it. Prefer resource-scoped permissions over broad account-wide roles, and separate permissions for different tools or environments. If a task does not need a tool, do not expose that tool to the agent. Check both the agent’s direct permissions and permissions inherited through groups or connected applications.
  4. Separate proposing an action from executing it. Where possible, let the agent prepare a draft, proposed change, or structured request while a separate control checks and executes it. Constrain the request to allowed operations, fields, and destinations. For example, permit a draft response but require review before sending; allow a proposed record update but restrict which fields can change. Do not treat instructions in a prompt as an access-control boundary: enforce limits in the tool, service, or policy layer.
  5. Set approval gates for consequential actions. Require an authorized person to approve actions that are external, sensitive, difficult to reverse, or outside a defined routine. Specify exactly what needs approval, such as sending to an external recipient, changing account permissions, publishing content, or deleting data. Show the reviewer the proposed action, relevant context, affected resources, and consequences before they decide. An approval should authorize only that specific action, not grant the agent broader or lasting permissions.
  6. Make approval checks fail closed. If the reviewer is unavailable, the approval service errors, or the request is unclear, the action should remain blocked rather than proceed. Set an expiration for pending requests and require a fresh review if the proposed action changes. Prevent the agent from approving its own requests or bypassing review through a different tool. Provide a safe way to cancel or reject a request, and define what happens to drafts after rejection.
  7. Test access and gates before launch. In a test environment, verify that permitted read and write tasks work, and that attempts outside the scope are denied. Test rejected, expired, missing, and changed approvals, along with unavailable reviewers and service failures. Confirm that an unapproved action cannot be completed through an alternate connector. Use representative data without exposing production secrets, then record the results and fix gaps before enabling real actions.
  8. Monitor use and review access regularly. Log the identity, tool, resource, requested action, approval decision, and result. Protect logs from unauthorized changes and limit sensitive data in them. Alert on denied actions, unusual volumes, repeated approval requests, or activity outside expected times or resources. Review permissions and approval rules on a schedule and whenever the agent’s tasks change. Revoke unused access, rotate credentials as appropriate, and disable the identity promptly if misuse is suspected.

Common Mistakes

  • Using broad roles “temporarily.” Temporary administrator access often persists. Set an expiry where supported, track the owner, and remove it as soon as testing or a specific task is complete.
  • Relying on prompt wording as a security control. A request such as “never delete files” does not prevent a tool call. Enforce allowed actions and resource limits outside the model.
  • Making approval too vague. A blanket “approve agent activity” prompt gives reviewers little basis for a decision. Show the exact action, target, and material context, and scope the approval narrowly.
  • Letting the agent approve itself. The requester and approver should be separate identities. Avoid approval paths the agent can influence or invoke to bypass the gate.
  • Logging too little—or too much. Without action and decision records, investigations are difficult; logging full prompts or sensitive records can expose data. Capture enough to explain what happened while minimizing confidential content.

Tips

  • Begin with read-only access, then add narrowly scoped write permissions only after a specific need is demonstrated.
  • Use different identities and permissions for development, testing, and production where feasible.
  • Keep the approval policy understandable: identify which actions require review, who may approve them, and how long requests remain valid.
  • Review denials as well as successful actions. Repeated denied calls can reveal an overly broad task design or an attempted boundary crossing.
  • Document an emergency disable procedure and test that an owner can revoke the agent’s credentials and tool access.

Troubleshooting

A legitimate task is denied: Check the tool’s error and audit record to identify the missing permission or resource scope. Confirm that the task genuinely needs the requested access, then grant only that specific capability and retest. Do not solve a narrow denial by assigning an administrator role.

An action proceeds without approval: Disable the relevant tool or agent identity while you investigate. Check whether the action used another connector, an inherited permission, or a path that does not call the approval check. Put the enforcement point in the execution layer, test the bypass, and review logs for affected resources.

Approvals are stuck or time out: Verify the reviewer’s identity, notification path, and authorization, and check whether the request expired or the approval service is unavailable. Keep the action blocked until a valid decision is recorded; do not treat a timeout as consent. Re-submit a current, fully described request if needed.

Logs do not explain an outcome: Confirm that records include the agent identity, tool call, target, decision, and result, and that logging is enabled across connected services. Avoid recording unnecessary secrets while improving coverage. If an action cannot be reconstructed, pause high-impact operations until the audit trail is adequate.

Frequently Asked Questions

What does least privilege mean for an AI agent?
It means giving the agent only the identities, resources, and operations needed for its defined tasks, and removing access it no longer needs.

Which actions should require human approval?
Use approval for actions with significant impact, external effects, sensitive data, or difficult recovery. The right boundary depends on the agent’s task and the consequences of an error.

Can a prompt serve as an approval gate?
No. Prompts can guide behavior but are not reliable enforcement. Check and authorize actions in the tool, service, or policy layer before execution.

Should every agent action be approved?
Not necessarily. Routine, low-impact actions can run within tightly defined limits; reserve gates for actions whose impact warrants human review.

How often should access be reviewed?
Review it on a documented schedule and whenever tasks, tools, owners, or connected resources change. Revoke permissions that are no longer justified.

What should happen if an approval system fails?
Keep consequential actions blocked until a valid approval can be recorded. Provide a documented recovery process rather than allowing the agent to continue without review.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →