After asking this question I did some digging and found a couple of policies with:
{
"Effect":"Allow",
"Action":"*",
"Resource":"*"
}
in them.
Reading through the policies evaluation logic page again the second step stands out to me:
- Evaluate all applicable policies.
The first part of my question is: How does AWS determine what policies are applicable? To my understanding this is done by looking at the Principle and/or Resource keys.
BUT: in IAM these policies have attached entities which are to my understanding the same as Principles. Which gets to the second part of the question:
What does an attached entity do to a policy?
As far as i understand all this does is tell AWS that the policy is applicable to a role, but I do not understand how this works with a "Resource":"*"
in the policy.
so:
- How does AWS determine what policies are applicable?
- What does an attached entity do to a policy?
- Makes the
"Resource":"*"
the policy always applicable?