-
Notifications
You must be signed in to change notification settings - Fork 4k
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): service principals use unnecessary exceptions (under feature flag) #22819
Conversation
…e flag) We have a database of service principal exceptions in different regions. This database is no longer necessary: all services now use the global service principal name for in-region references, and sometimes a standardized regional service principal name for cross-opt-in-region references. This PR changes the following things: ```ts new ServicePrincipal('service.amazonaws.com') // ➡️ always resolves to 'service.amazonaws.com', regardless of region // or service principal new ServicePrincipal('service.amazonaws.com', { region: 'me-south-1' }) // ➡️ resolves to 'service.me-south-1.amazonaws.com' in case of a // cross-region reference, or just 'service.amazonaws.com' otherwise. ``` Because change is scary (and because we are only 99% sure that this change has made it to all ADC regions), we put the new behavior behind a feature flag: ```json { "context": { "@aws-cdk/aws-iam:standardizedServicePrincipals": true } } ```
(This change will break many snapshots -- I'm working on it) |
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.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
✅ Updated pull request passes all PRLinter validations. Dissmissing previous PRLinter review.
76846de
to
622a2cd
Compare
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.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
✅ Updated pull request passes all PRLinter validations. Dissmissing previous PRLinter review.
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.
vaya con dios
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Thank you for contributing! Your pull request will be updated from main 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 main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
In aws#22819, a feature flag was added to use standardized service principal names instead of using a database lookup. This reference wasn't updated which causes failures in new CDK applications that try to create AppSync resources. This change passes the fully qualified service principal when creating a service role for a new data source. fixes aws#23035
In aws#22819, a feature flag was added to use standardized service principal names instead of using a database lookup. This reference wasn't updated which causes failures in new CDK applications that try to create AppSync resources. This change passes the fully qualified service principal when creating a service role for a new data source. fixes aws#23035
In aws#22819, a feature flag was added to use standardized service principal names instead of using a database lookup. This reference wasn't updated which causes failures in new CDK applications that try to create AppSync resources. This change passes the fully qualified service principal when creating a service role for a new data source. fixes aws#23035
We have a database of service principal exceptions in different regions.
This database is no longer necessary: all services now use the global service principal name for in-region references, and sometimes a standardized regional service principal name for cross-opt-in-region references.
This PR changes the following things:
Because change is scary (and because we are only 99% sure that this change has made it to all ADC regions), we put the new behavior behind a feature flag:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license