We are trying to convince folks in our company to grant developers full privileges to all services in "dev" account (current policy does not allow developers to create anything in our AWS account, because "security").
Folks say we might grant you full privileges to certain services e.g. S3, but some services (specifically IAM) will be off limits. Argument is users would be able to grant themselves all kind of permissions if they have read/write access to IAM service in our account.
In following scenario:
- There are two S3 buckets (
s1
ands2
) in an AWS account. - User
kashyap
is granted full control overs1
, but nots2
(se he can't see/read/write/access/manages2
at all). - User
kashyap
is granted full control over IAM service.
Questions:
- Can
kashyap
grant himself access tos2
by doing something in IAM? - Can
kashyap
create a new IAM user that has access tos2
? - If answer to either 1 or 2 is yes, then is there a way to prevent it other than revoking all IAM privileges of
kashyap
? Someone suggested Cloud Custodian
Note that S3 is just an example and I know one could work around this using S3 policy. My question is more broad and could be applied to any resource like EC2 instance, Lambda function or Dynamo DB table/instance.
I've read:
- https://stackoverflow.com/questions/71230412/limiting-other-aws-iam-roles-from-interacting-with-resources-privilege-escalatio
- https://stackoverflow.com/questions/70580724/how-to-avoid-privilege-escalation-in-aws
and a few more..