Skip to content

Commit 818341a

Browse files
authored
SCP-Updates (#419)
* SCP-Updates - Protect CWL SUbscription filters - Enforce EFS encryption (new) - Protect SSM settings - Protect Accelerator KMS keys - Further Protect Accelerator Log Groups - Add note on throttling issue with interface endpoints - add-policy-protection-accel-policies
1 parent 2029e9a commit 818341a

File tree

3 files changed

+82
-10
lines changed

3 files changed

+82
-10
lines changed

docs/installation/installation.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,7 @@ Finally, while we started with a goal of delivering on the 12 guardrails, we bel
427427
- Security Group names were designed to be identical between environments, if you want the VPC name in the SG name, you need to do it manually in the config file
428428
- We only support the subset of yaml that converts to JSON (we do not support anchors)
429429
- We do NOT support changing the `organization-admin-role`, this value must be set to `AWSCloudFormationStackSetExecutionRole` at this time.
430+
- Adding more than approximately 50 _new_ VPC Interface Endpoints across _all_ regions in any one account in any single state machine execution will cause the state machine to fail due to Route 53 throttling errors. If adding endpoints at scale, only deploy 1 region at a time. In this scenario, the stack(s) will fail to properly delete, also based on the throttling, and will require manual removal.
430431

431432
## 3.3. Considerations: Importing existing AWS Accounts / Deploying Into Existing AWS Organizations
432433

reference-artifacts/SCPs/PBMMAccel-Guardrails-Part1.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
}
122122
},
123123
{
124-
"Sid": "DenyKeyRoles",
124+
"Sid": "DenyRoles",
125125
"Effect": "Deny",
126126
"Action": ["iam:*"],
127127
"Resource": [
@@ -139,7 +139,7 @@
139139
}
140140
},
141141
{
142-
"Sid": "DenySSMDel",
142+
"Sid": "DenySSM",
143143
"Effect": "Deny",
144144
"Action": [
145145
"ssm:DeleteParameter",
@@ -164,7 +164,7 @@
164164
}
165165
},
166166
{
167-
"Sid": "DenyLogDel",
167+
"Sid": "DenyLog",
168168
"Effect": "Deny",
169169
"Action": [
170170
"ec2:DeleteFlowLogs",
@@ -176,6 +176,7 @@
176176
"logs:DeleteLogDelivery",
177177
"logs:DeleteDestination",
178178
"logs:PutRetentionPolicy",
179+
"logs:PutSubscriptionFilter",
179180
"logs:DeleteLogStream"
180181
],
181182
"Resource": "*",
@@ -189,7 +190,7 @@
189190
}
190191
},
191192
{
192-
"Sid": "DenyLeaveOrg",
193+
"Sid": "DenyOrg",
193194
"Effect": "Deny",
194195
"Action": "organizations:LeaveOrganization",
195196
"Resource": "*"

reference-artifacts/SCPs/PBMMAccel-Guardrails-Part2.json

Lines changed: 76 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"Version": "2012-10-17",
33
"Statement": [
44
{
5-
"Sid": "BlockMarketplacePMP",
5+
"Sid": "BlockPMP",
66
"Effect": "Deny",
77
"Action": [
88
"aws-marketplace:CreatePrivateMarketplace",
@@ -40,7 +40,7 @@
4040
}
4141
},
4242
{
43-
"Sid": "EnforceEbsEncryption",
43+
"Sid": "EbsEncrypt1",
4444
"Effect": "Deny",
4545
"Action": "ec2:RunInstances",
4646
"Resource": "arn:aws:ec2:*:*:volume/*",
@@ -51,7 +51,7 @@
5151
}
5252
},
5353
{
54-
"Sid": "EnforceEBSVolumeEncryption",
54+
"Sid": "EBSEncrypt2",
5555
"Effect": "Deny",
5656
"Action": "ec2:CreateVolume",
5757
"Resource": "*",
@@ -62,7 +62,18 @@
6262
}
6363
},
6464
{
65-
"Sid": "EnforceRdsEncryption",
65+
"Sid": "EFSEncrypt",
66+
"Effect": "Deny",
67+
"Action": "elasticfilesystem:CreateFileSystem",
68+
"Resource": "*",
69+
"Condition": {
70+
"Bool": {
71+
"elasticfilesystem:Encrypted": "false"
72+
}
73+
}
74+
},
75+
{
76+
"Sid": "RdsEncrypt",
6677
"Effect": "Deny",
6778
"Action": "rds:CreateDBInstance",
6879
"Resource": "arn:aws:rds:*:*:db:*",
@@ -76,7 +87,7 @@
7687
}
7788
},
7889
{
79-
"Sid": "EnforceAuroraEncryption",
90+
"Sid": "AuroraEncrypt",
8091
"Effect": "Deny",
8192
"Action": "rds:CreateDBCluster",
8293
"Resource": "*",
@@ -89,6 +100,32 @@
89100
}
90101
}
91102
},
103+
{
104+
"Action": ["ssm:CreateDocument", "ssm:UpdateDocument", "ssm:DeleteDocument"],
105+
"Effect": "Deny",
106+
"Resource": ["arn:aws:ssm:::document/SSM-SessionManagerRunShell"],
107+
"Condition": {
108+
"ArnNotLike": {
109+
"aws:PrincipalARN": [
110+
"arn:aws:iam::*:role/AWSCloudFormationStackSetExecutionRole",
111+
"arn:aws:iam::*:role/PBMMAccel-*"
112+
]
113+
}
114+
}
115+
},
116+
{
117+
"Effect": "Deny",
118+
"Action": ["kms:DeleteAlias", "kms:UpdateAlias", "kms:DisableKey", "kms:ImportKeyMaterial", "kms:PutKeyPolicy"],
119+
"Resource": "arn:aws:kms:::alias/PBMMAccel*",
120+
"Condition": {
121+
"ArnNotLike": {
122+
"aws:PrincipalARN": [
123+
"arn:aws:iam::*:role/AWSCloudFormationStackSetExecutionRole",
124+
"arn:aws:iam::*:role/PBMMAccel-*"
125+
]
126+
}
127+
}
128+
},
92129
{
93130
"Sid": "DenyRDGWRole",
94131
"Effect": "Deny",
@@ -104,7 +141,40 @@
104141
}
105142
},
106143
{
107-
"Sid": "DenyGDSHFMAAChange",
144+
"Sid": "DenyLog2",
145+
"Effect": "Deny",
146+
"Action": ["logs:AssociateKmsKey", "logs:DisassociateKmsKey", "logs:PutDestination", "logs:PutDestinationPolicy"],
147+
"Resource": "arn:aws:logs:::log-group:*PBMMAccel*",
148+
"Condition": {
149+
"ArnNotLike": {
150+
"aws:PrincipalARN": [
151+
"arn:aws:iam::*:role/AWSCloudFormationStackSetExecutionRole",
152+
"arn:aws:iam::*:role/PBMMAccel-*"
153+
]
154+
}
155+
}
156+
},
157+
{
158+
"Sid": "DenyPolicy",
159+
"Effect": "Deny",
160+
"Action": [
161+
"iam:CreatePolicy",
162+
"iam:DeletePolicy",
163+
"iam:DeletePolicyVersion",
164+
"iam:SetDefaultPolicyVersion",
165+
"iam:CreatePolicyVersion"
166+
],
167+
"Resource": "arn:aws:iam::*:policy/PBMMAccel-*",
168+
"Condition": {
169+
"ArnNotLike": {
170+
"aws:PrincipalARN": [
171+
"arn:aws:iam::*:role/PBMMAccel-*"
172+
]
173+
}
174+
}
175+
},
176+
{
177+
"Sid": "DenySecurity",
108178
"Effect": "Deny",
109179
"Action": [
110180
"guardduty:AcceptInvitation",

0 commit comments

Comments
 (0)