Executive Summary & Key Architectural Takeaways
- Linguistic capability is never institutional authority: a model that can infer how to call a privileged API must never hold ambient permission to execute it.
- Restrict probabilistic reasoning cores to emitting untrusted, strongly typed ActionProposals with zero direct access to credentials or external state.
- Strip tenant IDs, principal roles, and security scopes from model-visible tool schemas; bind them cryptographically from the Layer 1 session context.
- Enforce the Authority Intersection Rule and context taint tracking in OPA or AWS Cedar before issuing a Proof-Carrying Action Envelope.
Action Proposal vs. Authorized Execution Boundary
1. Capability Is Not Authority: Anatomy of the Confused-Deputy Vulnerability
The single most consequential category error in enterprise AI engineering is equating a foundation model’s linguistic capability to formulate a tool call with institutional authority to execute it. An agent runtime equipped with API clients for CRM updates, customer refunds, wire transfers, or IAM role modifications is a privileged execution deputy. When that deputy decides what to execute based on tokens inside its context window, every piece of untrusted external text that enters the prompt becomes a potential command channel.
Why Prompt Guardrails Collapse Under Indirect Injection
Large language models process system instructions, developer guidelines, authenticated user queries, and retrieved external content (inbound emails, vendor PDFs, web pages, support tickets, and third-party MCP server responses) within the same attention mechanism. No matter how emphatically a system prompt instructs the model to ignore malicious instructions in retrieved documents, a sufficiently crafted indirect prompt injection can persuade the model to emit a syntactically valid tool invocation targeting another customer’s record or exfiltrating sensitive attributes.
Ambient Service Accounts as Force Multipliers for Attackers
In naive agent deployments, the tool executor runs under a single shared backend service account with broad read/write privileges across tenants. If the tool schema accepts tenant_id, customer_id, or approver_override as LLM-populated arguments, an attacker who hijacks the model’s reasoning turn immediately inherits the ambient authority of the backend service account—a classic confused-deputy escalation.
2. Architectural Separation: Untrusted ActionProposal vs. Authorized Commit
To eliminate confused-deputy escalation structurally rather than statistically, the 5-Layer Production Agent Architecture enforces a hard cryptographic and process boundary between proposing an action and executing it. Layer 2 (the Bounded Agent Orchestration plane) is treated as an untrusted reasoning sandbox: it can interpret ambiguous input, synthesize retrieved evidence, and emit a strongly typed ActionProposal candidate, but it possesses zero network egress to enterprise systems of record and zero access to IAM credentials.
The Layer 2 Proposal Contract
When a model decides that an external tool should be invoked, its output is captured as an inert data structure—never executed directly. The proposal records what the model wants to do, the business parameters it extracted, and the span-level evidence citations it relied upon, but carries zero execution authority of its own.
Stripping Security Context from Model-Visible Tool Schemas
Any parameter that determines security scope—such as tenant_id, principal_uri, organization_unit, or max_autonomous_limit—is completely omitted from the tool declaration presented to the language model. Instead, those attributes are bound at Layer 1 (the Delivery & Identity Boundary) from the verified OAuth/OIDC session token and injected directly into the Layer 3 evaluation context outside the prompt. The model cannot forge or overwrite a tenant identifier that does not exist in its schema.
3. Enforcing the Authority Intersection Rule and Taint Tracking at Layer 3
Every candidate ActionProposal emitted by Layer 2 is intercepted by the Layer 3 Deterministic Control Shell. Before any downstream API is contacted, Layer 3 evaluates formal policy-as-code in Open Policy Agent (Rego) or AWS Cedar using the Authority Intersection Rule:
EffectiveAuthority = ActorPermission(L1_Principal) ∩ TenantIsolationScope(L1_Tenant) ∩ WorkflowStepEnvelope(L2_FSM_State) ∩ SpecialistAgentRoleScope(L2_Subagent)
Four-Way Permission Intersection
Under this invariant, authority can only narrow as execution flows deeper into a multi-agent workflow (`Scope(Child) ⊂ Scope(Parent)`). A low-privilege customer support session cannot launder privileges by delegating a task to a high-privilege billing specialist subagent, because the intersection with the originating ActorPermission and TenantIsolationScope remains strictly enforced at the Layer 3 gate.
Neutralizing the Lethal Trifecta via Context Taint Labels
Indirect prompt injection becomes catastrophic whenever a single agent turn combines three capabilities—the Lethal Trifecta: (1) access to private internal data, (2) ingestion of untrusted external content, and (3) external communication or state mutation. During Layer 2 context compilation, the runtime attaches deterministic provenance taint labels (VERIFIED_INTERNAL_ONLY vs. UNTRUSTED_EXTERNAL_INGEST) to every context segment. When the Layer 3 Cedar/OPA policy engine observes that context_taint_level != "VERIFIED_INTERNAL_ONLY", it automatically blocks autonomous high-blast-radius writes and outbound webhooks, routing the proposal to a human verification gate.
4. Canonical Entity Resolution and Closed-World SHACL Pre-Checks
Authorization policies cannot be evaluated reliably over raw natural-language strings or unverified entity names. If an agent proposes issuing a credit to "Acme Corp North", evaluating an access-control rule before resolving which canonical account URI that string refers to invites homonym confusion and cross-account leakage.
Inside the Layer 3 Semantic Control Shell, authorization always follows a strict four-stage sequence: (1) JSON Schema structural validation of the proposal payload, (2) deterministic entity resolution mapping surface strings to canonical Knowledge Graph URIs, (3) closed-world W3C SHACL shape validation confirming that all mandatory domain invariants, cardinality bounds, and canonical ledger price/rate equalities hold against current graph state, and finally (4) OPA/Cedar evaluation over the resolved target resource URI and its graph relationships to the authenticated principal.
5. Proof-Carrying Action Envelopes and Asynchronous Cosign Escalation
When a proposal passes all four deterministic checks within the autonomous risk envelope (for example, a customer credit adjustment under $250 for a tenured account with verified internal provenance), Layer 3 mints a short-lived, cryptographically signed Proof-Carrying Action Envelope. Layer 4 kinetic adapters reject any mutation request that lacks this signed envelope containing the correlation ID, the authenticated ActorContext, the SHA-256 digest of the compiled context, the passing SHACL validation report URI, the policy ALLOW decision ID, and the write-boundary idempotency key.
Conversely, when the proposed action falls into the supervised tier (such as an adjustment between $250 and $5,000, or any mutation proposed while untrusted context taint is present), the policy gate returns APPROVAL_REQUIRED. The control shell persists a durable checkpoint and renders a Trust UX confirmation card displaying the exact pre-commit diff and provenance spans. Only when an authorized human operator provides a cryptographic cosign token does Layer 3 mint the Proof-Carrying Action Envelope—guaranteeing that the model never self-authorizes consequential enterprise state changes.