Principle:AIPentest CyberStrikeAI MCP Tool RBAC Authorization
| Knowledge Sources | |
|---|---|
| Domains | Security, Authorization, RBAC |
| Last Updated | 2026-10-19 04:10 GMT |
Overview
A per-tool authorization model that maps each tool call to a required permission and resource, then verifies the authenticated principal holds that permission and can access the named resource within an optional project boundary.
Description
In a multi-tool agent platform, simply allowing "tool execution" is too coarse: a webshell write, a vulnerability record, and a C2 task are wildly different risks. RBAC authorization inserts a single chokepoint that, for every tool name, determines the required permission (e.g. webshell:write), the resource type and argument key (e.g. the connection_id), and an optional project-scope boundary. It then checks that the principal has the permission, that the user can access the specific resource, and that the resource belongs to the project the conversation is bound to.
External (federated) MCP tools are gated separately: they require a global-scope mcp:external:execute permission, because their effects are not individually modelled. Builtin tools without a registered policy are refused by default, and tools outside the builtin set require agent:local-execute.
Usage
Use this principle when an agent can invoke tools with materially different risk profiles and you must enforce least privilege per tool, per resource, and per project scope. It is the right choice whenever "who may call this tool" must be answered with finer granularity than a single execute permission.
Theoretical Basis
Authorization is a three-part decision per tool call:
principal = PrincipalFromContext(ctx)
permission = requiredPermission(toolName) -- e.g. "webshell:write"
resource = (resourceType, argumentKey) -- e.g. ("webshell", "connection_id")
resourceID = args[argumentKey]
allow iff principal.HasPermission(permission)
and db.UserCanAccessResource(principal.UserID, principal.ScopeFor(permission), resourceType, resourceID)
and authorizeProjectBoundary(ctx, resourceType, resourceID) == nil
For external tools the decision collapses to: allow iff principal.HasPermission("mcp:external:execute") and ScopeFor(...) == RBACScopeAll.
'C2 action permissions are derived from the action argument: list/get/get_result/wait → c2:read, delete/delete_batch → c2:delete, otherwise c2:write.
Practical Guide
- Centralize the switch-on-tool in one authorizer so the policy surface is auditable.
- Derive permission from both tool name and action argument for action-style tools.
- Enforce a project boundary on top of resource access to prevent cross-project reach.
- Refuse builtin tools with no registered policy rather than defaulting to allow.