AWS Permission Boundaries
AWS Permission Boundaries sets the maximum permission that an entity can have,
Permission Boundaries are attached to a USER and ROLE.
Let's say a user called admin_a has full IAM Access but cannot create any other resources (Let's take EC2 for instance).
So, admin_a can create another user called admin_b and granting admin_b will full access to EC2 resources.
Now, admin_a can log in using admin_b credentials and create EC2 resources.
Let's see that:
Now, I logged in as admin_a user.
As an admin_a user, I cannot access EC2 resources. But, I have IAM full access. So, creating another user admin_b with EC2 full access.
Now, I logged in with the admin_b credential and spun an EC2 instance.
This poses a security risk.
So, to mitigate this issue we are going to set "Permission Boundaries" for the user "admin_a". So, admin_a can have the same or fewer permissions than what he has.
I created a policy called "Permission_Boundary_Demo" which has RO access to IAM and EC2.
This means, that even though the user has IAM Full Permission, he can only perform the actions mentioned in the Permission Boundary(EC2/IAM Read Only).
I logged in as admin_a and tried to update the policy for admin_b.
Another Example:
For example, assume that the IAM user named ShirleyRodriguez
should be allowed to manage only Amazon S3, Amazon CloudWatch, and Amazon EC2.
To enforce this rule, you can use the following policy to set the permissions boundary for the ShirleyRodriguez
user:
ShirleyRodriguez
user, and Shirley tries to create a user, the operation fails. It fails because the permissions boundary does not allow the iam:CreateUser
operation. Given these two policies, Shirley does not have permission to perform any operations in AWS. You must add a different permissions policy to allow actions in other services, such as Amazon S3. Alternatively, you could update the permissions boundary to allow her to create a user in IAM.
Comments
Post a Comment