-
Notifications
You must be signed in to change notification settings - Fork 2.9k
docs(aws): scoping the IAM policy to explicitely defined Route53 zones #5663
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
Changes from all commits
62b5a52
4d6310d
9ad952f
681f1f7
fb3c87e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,17 +9,16 @@ Record Sets and Hosted Zones. You'll want to create this Policy in IAM first. In | |
| our example, we'll call the policy `AllowExternalDNSUpdates` (but you can call | ||
| it whatever you prefer). | ||
|
|
||
| If you prefer, you may fine-tune the policy to permit updates only to explicit | ||
| Hosted Zone IDs. | ||
|
|
||
| ```json | ||
| { | ||
| "Version": "2012-10-17", | ||
| "Statement": [ | ||
| { | ||
| "Effect": "Allow", | ||
| "Action": [ | ||
| "route53:ChangeResourceRecordSets" | ||
| "route53:ChangeResourceRecordSets", | ||
| "route53:ListResourceRecordSets", | ||
| "route53:ListTagsForResources" | ||
| ], | ||
| "Resource": [ | ||
| "arn:aws:route53:::hostedzone/*" | ||
|
|
@@ -28,9 +27,7 @@ Hosted Zone IDs. | |
| { | ||
| "Effect": "Allow", | ||
| "Action": [ | ||
| "route53:ListHostedZones", | ||
| "route53:ListResourceRecordSets", | ||
| "route53:ListTagsForResources" | ||
| "route53:ListHostedZones" | ||
| ], | ||
| "Resource": [ | ||
| "*" | ||
|
|
@@ -51,7 +48,9 @@ You can use Attribute-based access control(ABAC) for advanced deployments. | |
| { | ||
| "Effect": "Allow", | ||
| "Action": [ | ||
| "route53:ChangeResourceRecordSets" | ||
| "route53:ChangeResourceRecordSets", | ||
| "route53:ListResourceRecordSets", | ||
| "route53:ListTagsForResources" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will not work with service specific conditions.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ListTagsForResources will not work as it will require healthcheck resource id as well.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should then
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hard to say. IAM is tricky. I just pointed that is not going to work, probably if you have access to AWS, worth to validate a policy.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i do have a live cluster but unfortunately without health checks configured i'm also not really sure how to test it since i've never come across that functionality to be honest so for "Effect": "Allow",
"Action": [
"route53:ListTagsForResources"
],
"Resource": [
"arn:aws:route53:::hostedzone/*",
"arn:aws:route53:::healthcheck/*",
]this way if a user wants to make the policy tighter he has all the needed info to do it please let me know how to proceed
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah |
||
| ], | ||
| "Resource": [ | ||
| "arn:aws:route53:::hostedzone/*" | ||
|
|
@@ -67,9 +66,7 @@ You can use Attribute-based access control(ABAC) for advanced deployments. | |
| { | ||
| "Effect": "Allow", | ||
| "Action": [ | ||
| "route53:ListHostedZones", | ||
| "route53:ListResourceRecordSets", | ||
| "route53:ListTagsForResources" | ||
| "route53:ListHostedZones" | ||
| ], | ||
| "Resource": [ | ||
| "*" | ||
|
|
@@ -79,6 +76,11 @@ You can use Attribute-based access control(ABAC) for advanced deployments. | |
| } | ||
| ``` | ||
|
|
||
| ### Further improvements | ||
|
|
||
| Both policies can be further enhanced by tightening them down following the [principle of least privilege](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege). | ||
| Explicitly providing a list of selected zones instead of `*` you can scope the deployment down allowing changes only to zones from the list hence reducing the blast radius and improving auditability. | ||
|
|
||
| Additional resources: | ||
|
|
||
| - AWS IAM actions [documentation](https://www.awsiamactions.io/?o=route53%3A) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.