The IAM Permissions Agent: Tightly Scoped Investigations

IAM debugging is plumbing. The agent that walks a request through the permission graph and explains the decision in two paragraphs.

Walk the permission graph

The agent walks the permission graph deterministically. Input: an ARN, an action, a resource. Question: should this combination be allowed; if yes by what path; if no, what is missing. Walk identity policy, group policy, role policy, resource policy, SCP; output an explicit allow or deny path, never “unsure”.

Explain in two paragraphs

Output is two paragraphs. Paragraph one: the answer (allowed or denied) and the controlling policy. Paragraph two: how to change the answer (which policy to modify, which statement to add or remove); the change is always shown as a diff so the human can apply it directly.

What it catches that humans miss

The agent catches the cases humans confuse. SCPs that quietly deny what an identity policy would otherwise allow; resource policies that allow access not granted by identity policies; permission boundaries that limit max-permission below role; implicit deny vs explicit deny because the difference matters for IAM debugging and is often confused.

Safety considerations

The agent is read-only by design. The agent never proposes changes; it explains the current state. The proposed-diff in the explanation is just text and humans implement it; the agent does not have IAM-write capability. The agent’s analysis is logged for audit so “why was this access granted” is reproducible from the audit trail.

Eval cases

Four eval cases cover most permission patterns. Standard allow: identity policy allows; agent confirms. Standard deny: no policy grants; agent confirms. SCP override: identity policy allows but SCP denies; agent identifies the SCP. Resource-policy: identity policy denies but resource policy grants; agent identifies the resource policy.