Skip to content

Commit 72b1f30

Browse files
crtr109mloiseleur
andauthored
docs(aws): scoping the IAM policy to explicitely defined Route53 zones (#5663)
* scoping the AWS IAM policy to explicitely defined AWS Route53 zones * Apply suggestions from code review Co-authored-by: Michel Loiseleur <[email protected]> * Update aws.md * Update docs/tutorials/aws.md Co-authored-by: Michel Loiseleur <[email protected]> * Update aws.md breaking up lines to make it pass markdown linting --------- Co-authored-by: Michel Loiseleur <[email protected]>
1 parent 490e56f commit 72b1f30

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

docs/tutorials/aws.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,16 @@ Record Sets and Hosted Zones. You'll want to create this Policy in IAM first. In
99
our example, we'll call the policy `AllowExternalDNSUpdates` (but you can call
1010
it whatever you prefer).
1111

12-
If you prefer, you may fine-tune the policy to permit updates only to explicit
13-
Hosted Zone IDs.
14-
1512
```json
1613
{
1714
"Version": "2012-10-17",
1815
"Statement": [
1916
{
2017
"Effect": "Allow",
2118
"Action": [
22-
"route53:ChangeResourceRecordSets"
19+
"route53:ChangeResourceRecordSets",
20+
"route53:ListResourceRecordSets",
21+
"route53:ListTagsForResources"
2322
],
2423
"Resource": [
2524
"arn:aws:route53:::hostedzone/*"
@@ -28,9 +27,7 @@ Hosted Zone IDs.
2827
{
2928
"Effect": "Allow",
3029
"Action": [
31-
"route53:ListHostedZones",
32-
"route53:ListResourceRecordSets",
33-
"route53:ListTagsForResources"
30+
"route53:ListHostedZones"
3431
],
3532
"Resource": [
3633
"*"
@@ -51,7 +48,9 @@ You can use Attribute-based access control(ABAC) for advanced deployments.
5148
{
5249
"Effect": "Allow",
5350
"Action": [
54-
"route53:ChangeResourceRecordSets"
51+
"route53:ChangeResourceRecordSets",
52+
"route53:ListResourceRecordSets",
53+
"route53:ListTagsForResources"
5554
],
5655
"Resource": [
5756
"arn:aws:route53:::hostedzone/*"
@@ -67,9 +66,7 @@ You can use Attribute-based access control(ABAC) for advanced deployments.
6766
{
6867
"Effect": "Allow",
6968
"Action": [
70-
"route53:ListHostedZones",
71-
"route53:ListResourceRecordSets",
72-
"route53:ListTagsForResources"
69+
"route53:ListHostedZones"
7370
],
7471
"Resource": [
7572
"*"
@@ -79,6 +76,11 @@ You can use Attribute-based access control(ABAC) for advanced deployments.
7976
}
8077
```
8178

79+
### Further improvements
80+
81+
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).
82+
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.
83+
8284
Additional resources:
8385

8486
- AWS IAM actions [documentation](https://www.awsiamactions.io/?o=route53%3A)

0 commit comments

Comments
 (0)