Skip to content

Commit 213fffc

Browse files
authored
feat(route53): DNSSEC zone signing (#28604)
This makes it possible to enable DNSSEC signing for a Route 53 hosted zone. A new `KeySigningKey` construct is created to enable generally creating KSKs. Additionally, an `enableDnssec` method is added to `HostedZone` that provides an easier interface. The later will create the KSK and further create the necessary `AWS::Route53::DNSSEC` resource to actually enable signing on the resource. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 178e481 commit 213fffc

16 files changed

+1188
-3
lines changed

packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.dnssec.js.snapshot/aws-cdk-route53-dnssec.assets.json

+19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
{
2+
"Resources": {
3+
"KmsKskBaseF6291F14": {
4+
"Type": "AWS::KMS::Key",
5+
"Properties": {
6+
"KeyPolicy": {
7+
"Statement": [
8+
{
9+
"Action": "kms:*",
10+
"Effect": "Allow",
11+
"Principal": {
12+
"AWS": {
13+
"Fn::Join": [
14+
"",
15+
[
16+
"arn:",
17+
{
18+
"Ref": "AWS::Partition"
19+
},
20+
":iam::",
21+
{
22+
"Ref": "AWS::AccountId"
23+
},
24+
":root"
25+
]
26+
]
27+
}
28+
},
29+
"Resource": "*"
30+
},
31+
{
32+
"Action": [
33+
"kms:DescribeKey",
34+
"kms:GetPublicKey",
35+
"kms:Sign"
36+
],
37+
"Condition": {
38+
"ArnEquals": {
39+
"aws:SourceArn": {
40+
"Fn::Join": [
41+
"",
42+
[
43+
"arn:",
44+
{
45+
"Ref": "AWS::Partition"
46+
},
47+
":route53:::hostedzone/",
48+
{
49+
"Ref": "HostedZoneDB99F866"
50+
}
51+
]
52+
]
53+
}
54+
}
55+
},
56+
"Effect": "Allow",
57+
"Principal": {
58+
"Service": "dnssec-route53.amazonaws.com"
59+
},
60+
"Resource": "*"
61+
},
62+
{
63+
"Action": "kms:CreateGrant",
64+
"Condition": {
65+
"Bool": {
66+
"kms:GrantIsForAWSResource": true
67+
}
68+
},
69+
"Effect": "Allow",
70+
"Principal": {
71+
"Service": "dnssec-route53.amazonaws.com"
72+
},
73+
"Resource": "*"
74+
}
75+
],
76+
"Version": "2012-10-17"
77+
},
78+
"KeySpec": "ECC_NIST_P256",
79+
"KeyUsage": "SIGN_VERIFY"
80+
},
81+
"UpdateReplacePolicy": "Retain",
82+
"DeletionPolicy": "Retain"
83+
},
84+
"HostedZoneDB99F866": {
85+
"Type": "AWS::Route53::HostedZone",
86+
"Properties": {
87+
"Name": "cdk.test."
88+
}
89+
},
90+
"HostedZoneKeySigningKey3418AFB4": {
91+
"Type": "AWS::Route53::KeySigningKey",
92+
"Properties": {
93+
"HostedZoneId": {
94+
"Ref": "HostedZoneDB99F866"
95+
},
96+
"KeyManagementServiceArn": {
97+
"Fn::GetAtt": [
98+
"KmsKskBaseF6291F14",
99+
"Arn"
100+
]
101+
},
102+
"Name": "awscdkroute53dnssecHostedZoneKeySigningKeyEE4B885F",
103+
"Status": "ACTIVE"
104+
}
105+
},
106+
"HostedZoneDNSSEC79297416": {
107+
"Type": "AWS::Route53::DNSSEC",
108+
"Properties": {
109+
"HostedZoneId": {
110+
"Ref": "HostedZoneDB99F866"
111+
}
112+
},
113+
"DependsOn": [
114+
"HostedZoneKeySigningKey3418AFB4"
115+
]
116+
}
117+
},
118+
"Parameters": {
119+
"BootstrapVersion": {
120+
"Type": "AWS::SSM::Parameter::Value<String>",
121+
"Default": "/cdk-bootstrap/hnb659fds/version",
122+
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
123+
}
124+
},
125+
"Rules": {
126+
"CheckBootstrapVersion": {
127+
"Assertions": [
128+
{
129+
"Assert": {
130+
"Fn::Not": [
131+
{
132+
"Fn::Contains": [
133+
[
134+
"1",
135+
"2",
136+
"3",
137+
"4",
138+
"5"
139+
],
140+
{
141+
"Ref": "BootstrapVersion"
142+
}
143+
]
144+
}
145+
]
146+
},
147+
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
148+
}
149+
]
150+
}
151+
}
152+
}

packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.dnssec.js.snapshot/cdk.out

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.dnssec.js.snapshot/integ.json

+14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.dnssec.js.snapshot/integtestDefaultTestDeployAssert24D5C536.assets.json

+19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.dnssec.js.snapshot/integtestDefaultTestDeployAssert24D5C536.template.json

+36
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.dnssec.js.snapshot/manifest.json

+131
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)