Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recommend common further restrictions #156

Open
0xdabbad00 opened this issue Nov 17, 2020 · 0 comments
Open

Recommend common further restrictions #156

0xdabbad00 opened this issue Nov 17, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@0xdabbad00
Copy link
Collaborator

For privileges such as ec2:CreateTags you probably want to restrict this to a resource, restrict this to an action, and restrict this to a set of tags. See example from managed policy.

https://github.com/z0ph/aws_managed_policies/blob/bb9b0ee3473b852e2488a449dc2ae85c53e0d7a1/policies/FMSServiceRolePolicy#L281

{
                    "Effect": "Allow",
                    "Action": "ec2:CreateTags",
                    "Resource": "arn:aws:ec2:*:*:route-table/*",
                    "Condition": {
                        "StringEquals": {
                            "ec2:CreateAction": "CreateRouteTable"
                        },
                        "ForAllValues:StringEquals": {
                            "aws:TagKeys": [
                                "Name",
                                "FMManaged"
                            ]
                        }
                    }
                },
@0xdabbad00 0xdabbad00 added the enhancement New feature or request label Nov 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant