-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
fix(iam): Groups are erroneously accepted as the Principal of a policy (#11479) #12549
fix(iam): Groups are erroneously accepted as the Principal of a policy (#11479) #12549
Conversation
…al or NotPrincipal in an iam policy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will do. Thanks!
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
aws#11479) (aws#12549) closes aws#11479 ---- Hello, picking this up as my first issue to learn about how CDK works: [AWS mentions](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html) that iam groups can't be principals in policies. If a developer doesn't know this, they get an error during deployment. This change will throw an error to help them catch the issue during synthesis time. Note that this doesn't handle the code path where an arn string is specified as the principal, but the method already documents that a group would be invalid. Let me know if there's a cleaner way to fix this.
closes #11479
Hello, picking this up as my first issue to learn about how CDK works:
AWS mentions that iam groups can't be principals in policies. If a developer doesn't know this, they get an error during deployment. This change will throw an error to help them catch the issue during synthesis time.
Note that this doesn't handle the code path where an arn string is specified as the principal, but the method already documents that a group would be invalid.
Let me know if there's a cleaner way to fix this.