File tree Expand file tree Collapse file tree 3 files changed +33
-2
lines changed Expand file tree Collapse file tree 3 files changed +33
-2
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ module "aws_custom_policies" {
4
4
" IAMServicesSupervisor" = {
5
5
description = " Policy granting IAM services admins permissions to make changes to user accounts"
6
6
filename = " level-4-iam-services-supervisor-policy.json"
7
+ },
8
+ " EnforceMFAForUsers" = {
9
+ description = " Policy enforcing MFA for devops security users"
10
+ filename = " enforce-mfa-for-users-policy.json"
7
11
}
8
12
}
9
13
}
Original file line number Diff line number Diff line change
1
+ {
2
+ "Version" : " 2012-10-17" ,
3
+ "Statement" : [
4
+ {
5
+ "Sid" : " EnforceMFAForUsers" ,
6
+ "Effect" : " Deny" ,
7
+ "NotAction" : [
8
+ " iam:CreateVirtualMFADevice" ,
9
+ " iam:EnableMFADevice" ,
10
+ " iam:GetUser" ,
11
+ " iam:GetMFADevice" ,
12
+ " iam:ListMFADevices" ,
13
+ " iam:ListVirtualMFADevices" ,
14
+ " iam:ResyncMFADevice" ,
15
+ " sts:GetSessionToken"
16
+ ],
17
+ "Resource" : " *" ,
18
+ "Condition" : {
19
+ "BoolIfExists" : {
20
+ "aws:MultiFactorAuthPresent" : " false"
21
+ }
22
+ }
23
+ }
24
+ ]
25
+ }
Original file line number Diff line number Diff line change @@ -5,7 +5,8 @@ module "iam_read_only_group" {
5
5
group_name = " read-only-group"
6
6
policy_arn = {
7
7
" ReadOnlyAccess" = " arn:aws:iam::aws:policy/ReadOnlyAccess" ,
8
- " IAMUserChangePassword" = " arn:aws:iam::aws:policy/IAMUserChangePassword"
8
+ " IAMUserChangePassword" = " arn:aws:iam::aws:policy/IAMUserChangePassword" ,
9
+ " EnforceMFAForUsers" = module.aws_custom_policies.policy_arns[" EnforceMFAForUsers" ]
9
10
}
10
11
}
11
12
@@ -15,7 +16,8 @@ module "iam_services_supervisor_group" {
15
16
16
17
group_name = " iam-services-supervisor-group"
17
18
policy_arn = {
18
- " IAMServicesSupervisor" = module.aws_custom_policies.policy_arns[" IAMServicesSupervisor" ]
19
+ " IAMServicesSupervisor" = module.aws_custom_policies.policy_arns[" IAMServicesSupervisor" ],
20
+ " EnforceMFAForUsers" = module.aws_custom_policies.policy_arns[" EnforceMFAForUsers" ]
19
21
}
20
22
}
21
23
You can’t perform that action at this time.
0 commit comments