Over-Permissive IAM
A wildcard policy on a boring role is an admin credential with a boring name. Watch a build credential escalate to administrator through role-passing, then replace the wildcard with enumerated permissions and cap it with a boundary.
What Is Over-Permissive IAM?
A wildcard is a promise nobody can audit. A policy granting every action on every resource, attached to something that sounds harmless, is an administrator credential wearing a boring name. This exercise follows the escalation that wildcard makes possible: watch an attacker turn a low-value build credential into full administrative reach, then replace the wildcard with enumerated permissions and add a boundary so the role cannot grant itself more later.
What You'll Learn in Over-Permissive IAM
- A wildcard policy grants what it says, not what the role's name suggests. A boring name does not limit a broad grant.
- Role-passing is a common escalation path because the caller never holds the privileged permission directly, which makes it easy to miss in review.
- Replace wildcards with enumerated actions on named resources. A deny list defaults every new resource to allowed.
- A permission boundary caps what the role can ever hold, so a future policy edit cannot re-grant the escalation.
Over-Permissive IAM — Training Steps
-
A boring set of keys
Bob is working Wyndlar, a freight brokerage that moves several hundred million pounds of carrier settlements a year. What he has is unglamorous: one credential belonging to a build agent, lifted from a pipeline log. A build agent packages artifacts. On paper this is nearly worthless. He checks what it actually is before deciding that.
-
What it is allowed to do
The only way to know a role's reach is to read the policy attached to it. Bob reads it.
-
What else is in the account
A wildcard means Bob can look at everything, so he looks at the roles. He is not after the build agent's own reach. He is after something the build agent can point at.
-
Hand the privileged role to something that will run it
This is the escalation, and it is worth being precise about why it works. Bob never assumes the admin role himself and never needs to. He creates a function and tells the platform to run it as the admin role. The platform is trusted; he is not; the result is the same.
-
What the admin role could see
The function is his code running with someone else's authority. He invokes it.
-
Why the name did not matter
Bob has an administrator's reach from a credential nobody would have bothered to protect.
-
A function nobody created
Wyndlar's platform review flags a function that appeared overnight carrying the break-glass role.
-
Read what the role is actually allowed
The answer is not in the function. It is in the policy on the role that created it.
-
The build agent
Three roles, and one of them is flagged.
-
Everything, on everything
There it is, in one statement.