Skip to content

Commit

Permalink
Merge pull request #22 from jplock/main
Browse files Browse the repository at this point in the history
[fix] Explicitly deny boundary to change boundary
  • Loading branch information
jplock authored Sep 2, 2024
2 parents 0b2a247 + 4acff62 commit 1113d2f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion ci_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ Resources:
PolicyDocument:
Version: "2012-10-17"
Statement:
- Sid: AllowModifyIamRolesWithBoundary
- Sid: EnforceActionsHaveBoundary
Effect: Allow
Action:
- "iam:AttachRolePolicy"
Expand All @@ -282,6 +282,15 @@ Resources:
Condition:
ArnEquals:
"iam:PermissionsBoundary": !Sub "arn:${AWS::Partition}:iam::${AWS::AccountId}:policy/${AWS::StackName}-boundary-${AWS::Region}" # references self
- Sid: DenyChangesToBoundaryPolicy
Effect: Deny
Action:
- "iam:DeletePolicy"
- "iam:CreatePolicyVersion"
- "iam:CreatePolicy"
- "iam:DeletePolicyVersion"
- "iam:SetDefaultPolicyVersion"
Resource: !Sub "arn:${AWS::Partition}:iam::${AWS::AccountId}:policy/${AWS::StackName}-boundary-${AWS::Region}" # references self
- Sid: AllowModifyIamRoles
Effect: Allow
Action:
Expand Down

0 comments on commit 1113d2f

Please sign in to comment.