liveBook · Manning

Confused deputy problem

As explained in Authorization in Action

The confused deputy problem is a security failure in which an authorized intermediary is induced to use its own authority for another principal without correctly applying that principal's permissions.

A manager dashboard may be allowed to call an HR API, but that does not mean every employee using the dashboard may view every department’s salaries. If the API trusts the dashboard’s authority without checking the employee’s permissions, the dashboard can expose data on someone else’s behalf. section 11.1.1

This is the confused deputy problem: a component with legitimate authority is induced to use it for a requester who lacks the required permission. The authorization decision must consider who is behind the action and what authority was delegated, not just whether the intermediary can technically perform it. section 11.1.1 section 13.6.2

Checking a salary request at the gateway

A policy enforcement point (PEP) at the API gateway evaluates Carol’s request before forwarding it to the HR API. It constructs a PARC request: Carol is the principal, viewing salaries is the action, the requested department is the resource, and the dashboard is part of the context. Cedar allows the request when Carol is a manager viewing her own department and denies it for another department. section 11.1.1

Figure 11.1 API Gateway as a centralized enforcement point. Carol’s request moves through the Manager Dashboard to the HR API. The API Gateway functions as the PEP, forwarding a normalized PARC request to the Cedar engine (PDP). The HR API receives the call only if Cedar returns an allow decision.

The diagram follows the request from the dashboard through the gateway to the policy decision point and HR API. section 11.1.1

The same distinction matters in support escalation. A support portal may request escalations, and support tools may be capable of reaching tenant resources, but neither fact grants an engineer access. A short-lived credential carries the approved scope, tenant, and time window; the PEP checks those constraints before the tenant’s usual relationship-based access control rules are applied. section 13.6.2

For service-to-service calls, workload identity identifies the calling service, but policy may also need the initiating principal, tenant, sensitivity label, or delegation context. In a service mesh, sidecar enforcement can check those details at each hop, with operational costs including policy distribution, latency, observability, and failure handling. section 11.1.2

AI agents can choose tools, combine actions, retry, and delegate to subagents, so tool access alone is not sufficient authority for every instruction. For an agent’s tool invocation, the agent can be the principal, the invocation the action, and the target system or data the resource. Context carries the initiating principal, task, delegation, tenant, and other constraints needed for the decision. section 18.2

How Authorization in Action covers it

How deep it goes
Defines the failure and works through gateway, escalation, service-mesh, and agent enforcement scenarios.
Examples
Uses department salary access, tenant support escalation, document indexing, and AI-agent tool invocation as examples.
What you can do after
Evaluate intermediary requests by identifying the initiating authority and constraints that a policy decision must consider.
How it connects
Connects delegated authority with API gateways, workload identity, policy enforcement points, and relationship-based access control.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Authorization in Action. The section links point to the parts of the book it draws on.