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

feat(sns): enforce ssl with topic policy #29144

Merged
merged 15 commits into from
Feb 20, 2024

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
{
"Resources": {
"TopicBFC7AF6E": {
"Type": "AWS::SNS::Topic",
"Properties": {
"DisplayName": "fooDisplay",
"TopicName": "fooTopic"
}
},
"TopicPolicyA24B096F": {
"Type": "AWS::SNS::TopicPolicy",
"Properties": {
"PolicyDocument": {
"Statement": [
{
"Action": "sns:Publish",
"Effect": "Allow",
"Principal": {
"Service": "s3.amazonaws.com"
},
"Resource": {
"Ref": "TopicBFC7AF6E"
},
"Sid": "0"
},
{
"Action": "sns:Publish",
"Condition": {
"Bool": {
"aws:SecureTransport": "false"
}
},
"Effect": "Deny",
"Principal": "*",
"Resource": {
"Ref": "TopicBFC7AF6E"
},
"Sid": "AllowPublishThroughSSLOnly"
}
],
"Version": "2012-10-17"
},
"Topics": [
{
"Ref": "TopicBFC7AF6E"
}
]
}
},
"TopicAddPolicy7DB03706": {
"Type": "AWS::SNS::Topic",
"Properties": {
"DisplayName": "topicDisplayNameAddPolicy",
"TopicName": "topicAddPolicy"
}
},
"TopicAddPolicyAEA24A5A": {
"Type": "AWS::SNS::TopicPolicy",
"Properties": {
"PolicyDocument": {
"Statement": [
{
"Action": "sns:Publish",
"Effect": "Allow",
"Principal": {
"Service": "s3.amazonaws.com"
},
"Resource": {
"Ref": "TopicAddPolicy7DB03706"
},
"Sid": "0"
},
{
"Action": "sns:Publish",
"Condition": {
"Bool": {
"aws:SecureTransport": "false"
}
},
"Effect": "Deny",
"Principal": "*",
"Resource": {
"Ref": "TopicAddPolicy7DB03706"
},
"Sid": "AllowPublishThroughSSLOnly"
}
],
"Version": "2012-10-17"
},
"Topics": [
{
"Ref": "TopicAddPolicy7DB03706"
}
]
}
}
},
"Parameters": {
"BootstrapVersion": {
"Type": "AWS::SSM::Parameter::Value<String>",
"Default": "/cdk-bootstrap/hnb659fds/version",
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
}
},
"Rules": {
"CheckBootstrapVersion": {
"Assertions": [
{
"Assert": {
"Fn::Not": [
{
"Fn::Contains": [
[
"1",
"2",
"3",
"4",
"5"
],
{
"Ref": "BootstrapVersion"
}
]
}
]
},
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
}
]
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading