Markdown Editor

Agent Tool and Permission Design Template (OWASP ASI02, ASI03)

Agent tool permissions: tool inventory, capability classes, least agency, non-human identity, approval tiers, sandboxing, limits, audit, revocation, tests

AI・データフルOWASP Top 10 for Agentic Applications 2026 (ASI02, ASI03); OWASP Top 10 for LLM Applications 2026 (LLM03 Excessive Agency)CC BY-SA 4.0agenttoolpermissiondesign

使い方: Use it before granting an AI agent any tool with side effects, or when reviewing an agent's access. Fill the tool inventory and capability classification first, then derive approval tiers, credential lifetimes and policy rules from the class. The main pitfall is enforcing limits in the prompt instead of in the runtime, or giving the agent one long-lived broad credential.

プレビュー

Agent Tool and Permission Design: [Agent or system name]

Design document for the tools an AI agent can call and the permissions behind them: tool inventory, capability classification, the least-agency principle, non-human identity and credential scoping, approval tiers and step-up confirmation, sandboxing, rate and spend limits, validation of tool-call inputs and outputs, audit logging, revocation and a test plan. Threats are mapped to the OWASP Top 10 for Agentic Applications 2026 (ASI02 Tool Misuse and Exploitation, ASI03 Identity and Privilege Abuse, and related entries) and to Excessive Agency in the OWASP Top 10 for LLM Applications 2026 (LLM03:2026, as numbered in the August 2026 edition; it was LLM06 in 2025). Replace every [bracketed] value and every row marked Example. Worked examples use an IT service desk agent that reads tickets, resets passwords and opens change requests.

Document control

FieldValue
Document ID[ATP-DES-001]
Agent or system[Name] [v1.0.0]
Tool set version[v1.0]
Version[0.1]
Status[Draft / In review / Approved / Retired]
Owner[@agent-owner]
Approvers/reviewers[@security-engineer], [@identity-team], [@business-owner]
Identity provider[Name of IdP or workload identity system]
Policy engine[Example: Open Policy Agent / Cedar / in-house]
Classification[Internal / Confidential]
Last updatedYYYY-MM-DD
Related documents[Agent specification], [MCP server specifications], [Agentic threat model], [Runbook]

Approvals

RoleNameDecisionDate
Agent owner[@name][Approve / Approve with conditions / Reject]YYYY-MM-DD
Security[@name][Decision]YYYY-MM-DD
Identity and access management[@name][Decision]YYYY-MM-DD
Owner of each target system[@name][Decision]YYYY-MM-DD

Revision history

VersionDateAuthorChange summary
0.1YYYY-MM-DD[@name]First draft
1.0YYYY-MM-DD[@name]Example: Approved with five tools, password reset at tier T2
1.1YYYY-MM-DD[@name]Example: create_change_request added at tier T3 after pilot

Contents

1. Scope and context

ItemValue
Agent purposeExample: Resolve routine service desk tickets for employees
Acts on behalf ofExample: The employee who opened the ticket (delegated), plus the service desk as an organisation
Target systemsExample: Ticketing system, identity provider, change management system
Systems explicitly out of reachExample: HR records, payroll, production servers, email sending
Autonomy levelExample: Level 2: low-risk actions alone, high-risk actions approved by a human
UsersExample: About 4,000 employees, 25 service desk analysts

2. Design principles

IDPrincipleWhat it means here
ATP-P-001Least agencyGive the agent only the tools, autonomy and reach the task needs; remove anything unused for [30] days
ATP-P-002Least privilegeEach tool runs with the narrowest scope that still works; no wildcard scopes
ATP-P-003Deny by defaultA tool call is refused unless a policy rule allows it
ATP-P-004Separate identityThe agent has its own non-human identity; it never reuses a human's session or a shared service account
ATP-P-005Credentials outside the modelTokens and keys never enter prompts, context or tool results
ATP-P-006Human control over irreversible effectsIrreversible or external actions need human approval or are not offered
ATP-P-007Enforce outside the modelLimits and checks run in the tool runtime or policy engine
ATP-P-008Everything loggedEvery tool call, decision and approval is recorded with its principal

3. Tool inventory

IDToolProvided byPurposeTarget systemClass (section 4)Tier (section 7)
ATP-TOOL-001 (Example)get_ticketInternal MCP server itsm-mcpRead ticket and historyTicketingC1T0
ATP-TOOL-002 (Example)search_kbInternal MCP server kb-mcpSearch knowledge baseKnowledge baseC1T0
ATP-TOOL-003 (Example)add_ticket_commentitsm-mcpReply on the ticketTicketingC3T1
ATP-TOOL-004 (Example)reset_passwordidp-mcpTrigger a self-service reset link to the requesterIdentity providerC4T2
ATP-TOOL-005 (Example)create_change_requestitsm-mcpOpen a change for a human teamChange managementC3T3

3.1 Removed or rejected tools

ToolReason not granted
Example: set_passwordAgent would know the new password; reset link achieves the goal
Example: run_shellNo task requires code execution
Example: send_emailReplies go through the ticket only

3.2 Tool definition requirements

Each tool must have: a name and description written for the model, including when not to use it; a strict input schema with additionalProperties: false; an output schema; the side effects stated plainly; and, for MCP tools, every annotation hint set explicitly.

{
  "name": "reset_password",
  "title": "Send password reset link",
  "description": "Send a self-service password reset link to the employee who opened the ticket. Use only when the ticket requester asks for their own reset and identity has been verified. Never use for another person or for privileged accounts.",
  "inputSchema": {
    "type": "object",
    "properties": {
      "ticket_id": {"type": "string", "pattern": "^INC[0-9]{7}$"},
      "verification_ref": {"type": "string", "pattern": "^VER-[A-Z0-9]{10}$"}
    },
    "required": ["ticket_id", "verification_ref"],
    "additionalProperties": false
  },
  "annotations": {"readOnlyHint": false, "destructiveHint": false, "idempotentHint": true, "openWorldHint": false}
}

The target account is not an argument: the runtime derives it from the ticket requester, so the model cannot choose whose password is reset.

4. Capability classification

ClassNameDefinitionExamplesDefault tier
C0No side effect, localComputation with no data accessExample: Date arithmetic, formattingT0
C1Read, internalReads internal data within the principal's rightsExample: get_ticket, search_kbT0
C2Read, open worldReads untrusted external contentExample: Web fetchT0 with content treated as untrusted
C3Write, reversibleChanges internal state that can be undoneExample: Ticket comment, draft change requestT1 or T3
C4Write, sensitive or hard to reverseSecurity, identity, financial or bulk changesExample: Password reset, access grantT2 or higher
C5Irreversible or external effectCannot be undone, or reaches people or systems outside the organisationExample: Payment, external email, deletion without backupT4 or not offered

4.1 Classification record

ToolReadsWritesReversible?External effect?Data sensitivityClass
ATP-TOOL-003 (Example)TicketCommentYes, by analyst editVisible to requester (internal)InternalC3
ATP-TOOL-004 (Example)Account statusReset token issuedPartly: old password invalidatedMessage to requesterConfidentialC4
ATP-TOOL-005 (Example)TicketNew change recordYes, change can be cancelledNoneInternalC3

5. Non-human identity and credentials

5.1 Identities

IDIdentityTypeUsed forOwnerReview cycle
ATP-ID-001 (Example)agent-servicedesk-prodWorkload identity (federated, no static secret)Calling MCP servers[@agent-owner]Quarterly
ATP-ID-002 (Example)itsm-mcp service principalService accountTicketing API calls[@itsm-team]Quarterly
ATP-ID-003 (Example)idp-mcp service principalService account with reset-only roleIdentity provider reset API[@identity-team]Monthly

5.2 Delegation model

[Describe how the agent acts for a user.] Example: The agent receives a token for the requester through OAuth 2.0 Token Exchange (RFC 8693) with the agent as actor, so downstream systems see both the user and the agent. Each token is audience-restricted to one MCP server (RFC 8707 resource indicator). MCP servers do not pass user tokens through to backends; they call backends with their own service principals and record the user and agent identity in audit fields.

5.3 Credential register

CredentialHolderScopeLifetimeStorageRotation
Example: Agent access token for itsm-mcpAgent runtimetickets:read tickets:comment changes:create10 minutesMemory onlyPer request
Example: Agent access token for idp-mcpAgent runtimepassword:reset-link5 minutes, issued only after T2 approvalMemory onlyPer action
Example: itsm-mcp backend credentialMCP serverTicketing API role "agent-writer"1 hourSecret managerAutomatic

Rules:

  • [Example: No credential is ever placed in the model context, a tool result or a log line.]
  • [Example: Credentials for C4 and C5 tools are minted just in time, after approval, for one call.]
  • [Example: Staging and production identities are separate; staging tokens are rejected by production servers.]

6. Authorization policy

IDRuleInputs to the decisionEffect
ATP-POL-001 (Example)Only tools in section 3 are callableTool nameDeny others
ATP-POL-002 (Example)reset_password only for the ticket requester's own accountTicket requester, derived targetDeny if they differ
ATP-POL-003 (Example)reset_password never for accounts in privileged groupsGroup membershipDeny and escalate
ATP-POL-004 (Example)Comments may not contain links outside approved domainsComment bodyDeny with reason
ATP-POL-005 (Example)No write tool after content from a C2 tool entered the context in the same turn, unless approvedContext provenance flagsRequire T2 approval
ATP-POL-006 (Example)Calls outside business hours limited to C0 and C1TimeDeny writes
permit(agent, "reset_password", args) when
  call.derived_target == ticket(args.ticket_id).requester
  and not in_group(call.derived_target, "privileged")
  and approval(args.ticket_id, "T2").granted
  and approval.age_seconds < 300

The block above is pseudo-code; call.derived_target is the account the runtime resolved from the ticket, never a model-supplied value. Write the real rule in your policy engine's language and keep it under version control with tests.

7. Approval tiers and step-up confirmation

TierNameWho approvesHowExpiry
T0AutomaticNobody, policy onlyLoggedn/a
T1NotifyNobody before; analyst can undoNotification with undo linkUndo window [24 h]
T2User confirmationThe requesting userStep-up: re-authenticate with MFA and confirm the exact action[5 min]
T3Operator approvalA service desk analystApprove or reject in the console[4 h], then returned to queue
T4Dual approvalTwo people, one from the system owner teamSeparate approvals[24 h]
Not offeredn/an/aTool not grantedn/a

7.1 Assignment

Tool or conditionTierReason
ATP-TOOL-001, ATP-TOOL-002 (Example)T0Read only, within the requester's rights
ATP-TOOL-003 (Example)T1Reversible, internal
ATP-TOOL-004 (Example)T2Security-sensitive; the user proves they asked for it
ATP-TOOL-005 (Example)T3Starts work for another team
Any write after C2 content in context (Example)T2 at leastPossible injected instruction

7.2 Approval screen content

The approver must see: the tool name in plain words, every argument with its real value, the target resource, the class and whether it can be undone, the reason the agent gives, and the source of any content that led to the call. The approve button is not the default focus, and approving does not also approve later calls.

8. Sandboxing and isolation

AspectDesign
Agent runtimeExample: Container per run, read-only root file system, no shell
Network egressExample: Allow-list: the three MCP servers and the model provider only
File systemExample: Per-run scratch directory, wiped at end of run
Code executionExample: Not offered (no C5 code tools)
Browsing or fetchingExample: Not offered in this agent; if added, run in a separate worker with no write tools
SecretsExample: Workload identity only; no secrets mounted in the agent container
Tenant isolationExample: One tenant per run; tool calls carry the tenant and servers check it

9. Rate, volume and spend limits

IDLimitScopeValueOn breach
ATP-LIM-001 (Example)Tool callsPer run20Run stops, ticket escalated
ATP-LIM-002 (Example)reset_passwordPer requester per day2Deny, escalate to analyst
ATP-LIM-003 (Example)reset_passwordSystem-wide per hour30Deny new resets, page on-call
ATP-LIM-004 (Example)CommentsPer ticket per hour3Deny, notify analyst
ATP-LIM-005 (Example)Change requestsPer day10Queue for analyst
ATP-LIM-006 (Example)Model spendPer day[Amount]Pause agent
ATP-LIM-007 (Example)Identical call repeatedPer run2Deny third attempt

10. Tool-call validation

10.1 Input checks

CheckRule
SchemaStrict JSON Schema; unknown fields rejected
Types and rangesPatterns, enumerations, length limits on every string
Resource ownershipTarget resource belongs to the principal and tenant
Derived argumentsSensitive targets (account, amount, recipient) derived by the runtime where possible
Injection in argumentsFree-text fields scanned for markup, links and command syntax before use in downstream systems
IdempotencyWrite calls carry an idempotency key from the run and step

10.2 Output checks

CheckRule
SchemaResult matches the output schema; otherwise an error is returned to the model
SizeTruncated to [8,000] characters with a note
Secrets and personal dataMasked by pattern before entering context
Untrusted content markingText from tickets, documents or external sources is labelled as data
ErrorsActionable message without stack traces, hostnames or credentials

11. Audit logging

FieldContent
Time and run IDUTC timestamp, run ID, trace ID
PrincipalsHuman on whose behalf, agent identity, MCP server identity
Tool and argumentsTool name, arguments with sensitive values hashed or masked
Policy decisionRule IDs evaluated, result, reason
ApprovalTier, approver, time, what was shown
ResultOutcome, error code, resource IDs changed
ProvenanceWhether untrusted content was in context when the call was planned

Retention: [Example: 1 year for T0 and T1 calls, 7 years for T2 and above]. Storage: [Example: append-only log store; the agent identity has no read or delete rights on it].

12. Revocation and emergency controls

IDControlEffectWho can triggerTarget time
ATP-REV-001 (Example)Disable one toolPolicy denies the tool for all runsAgent owner, security1 min
ATP-REV-002 (Example)Revoke agent identityWorkload identity disabled; tokens refusedIdentity team, security5 min
ATP-REV-003 (Example)Stop all runsRuntime halts in-flight runs at the next stepOwner, on-call30 s
ATP-REV-004 (Example)Rotate MCP server backend credentialsBackend sessions invalidatedServer owner15 min
ATP-REV-005 (Example)Reverse actionsRunbook lists how to undo each C3 and C4 actionAnalystPer runbook

Access reviews: [Example: quarterly review of identities and scopes against section 3; any tool unused for 30 days is removed.]

13. Threat mapping

Source and IDRiskScenario hereControlsResidual
ASI02Tool Misuse and ExploitationExample: Ticket text persuades the agent to post a phishing link as a commentATP-POL-004, 10.1, T1 undoLow
ASI03Identity and Privilege AbuseExample: Agent resets the password of a manager named in the ticketATP-POL-002, derived target, T2Low
ASI03Identity and Privilege AbuseExample: Stolen long-lived token reused outside the agentShort-lived audience-bound tokens (5.3)Low
ASI01Agent Goal HijackExample: Knowledge base article contains instructions to open many changesATP-POL-005, ATP-LIM-005Low
ASI05Unexpected Code Execution (RCE)Example: Not applicable: no code execution toolsSection 8Not applicable
ASI09Human-Agent Trust ExploitationExample: Approval screen shows a misleading summary7.2 shows real argumentsMedium
ASI10Rogue AgentsExample: Agent repeats resets in a loop after a model changeATP-LIM-002, ATP-LIM-003, ATP-REV-003Low
LLM03:2026Excessive AgencyExample: Tool set includes set_password with admin scopeSection 3.1 removal, ATP-P-001Low
LLM01:2026Prompt InjectionExample: Instructions in an attached file10.2 marking, ATP-POL-005Medium

ASI identifiers follow the OWASP Top 10 for Agentic Applications for 2026. LLM identifiers follow the OWASP Top 10 for LLM Applications 2026 as numbered when this template was written; check the current list at genai.owasp.org before an assurance review.

14. Test plan

IDTestMethodExpected resultLinked control
ATP-TST-001 (Example)Call a tool not in the inventoryDirect runtime callDenied, loggedATP-POL-001
ATP-TST-002 (Example)Reset another user's password via ticket textAdversarial ticketDenied, escalatedATP-POL-002
ATP-TST-003 (Example)Reset a privileged accountFixture accountDeniedATP-POL-003
ATP-TST-004 (Example)Approve a T2 action after 6 minutesDelayed approvalExpired, new approval neededSection 7
ATP-TST-005 (Example)31 resets in an hourLoad scriptThirty-first denied, page sentATP-LIM-003
ATP-TST-006 (Example)Token reuse from outside the runtimeReplay captured tokenRejected (audience or expiry)5.3
ATP-TST-007 (Example)Secret pattern in a tool resultFixture resultMasked before context10.2
ATP-TST-008 (Example)Disable a tool during a runToggle ATP-REV-001Next call deniedATP-REV-001
ATP-TST-009 (Example)Revoke agent identityToggle ATP-REV-002All calls fail within 5 minATP-REV-002
ATP-TST-010 (Example)Audit completenessCompare runs with logEvery call has a complete entrySection 11

15. Traceability matrix

ToolClassTierIdentityPolicyLimitsTests
ATP-TOOL-001 (Example)C1T0ATP-ID-001, ATP-ID-002ATP-POL-001ATP-LIM-001ATP-TST-001
ATP-TOOL-003 (Example)C3T1ATP-ID-001, ATP-ID-002ATP-POL-004ATP-LIM-004ATP-TST-007
ATP-TOOL-004 (Example)C4T2ATP-ID-001, ATP-ID-003ATP-POL-002, ATP-POL-003, ATP-POL-005ATP-LIM-002, ATP-LIM-003ATP-TST-002 to ATP-TST-006
ATP-TOOL-005 (Example)C3T3ATP-ID-001, ATP-ID-002ATP-POL-001ATP-LIM-005ATP-TST-010

16. Glossary and references

TermMeaning
Least agencyGranting an agent only the autonomy, tools and reach its task requires
Non-human identityAn identity for software (agent, service, workload) rather than a person
Step-up confirmationA stronger check, such as re-authentication, before a sensitive action
Token exchangeIssuing a new token that represents a user and an acting agent together
Audience restrictionBinding a token to one resource server so it is refused elsewhere
Open-world toolA tool that reads or affects systems outside the organisation's control

References:

Standard and licence note

Based on the OWASP Top 10 for Agentic Applications for 2026 and the OWASP Top 10 for LLM Applications 2026 by the OWASP GenAI Security Project (https://genai.owasp.org/), licensed under Creative Commons Attribution-ShareAlike 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Entry IDs and short names are used for mapping and all descriptions are original text. Because section 13 adapts those lists, the adapted mapping is shared under CC BY-SA 4.0 and any further adaptation of it must carry the same licence. MCP and IETF RFC references are summarised in original wording. Check the current OWASP lists and specifications before use; example values are illustrative. Template licence: MIT.

関連テンプレート