fix(ses-actions): condition should use SourceAccount#34081
fix(ses-actions): condition should use SourceAccount#34081mergify[bot] merged 7 commits intoaws:mainfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #34081 +/- ##
==========================================
+ Coverage 83.98% 84.00% +0.01%
==========================================
Files 120 121 +1
Lines 6976 6984 +8
Branches 1178 1179 +1
==========================================
+ Hits 5859 5867 +8
Misses 1005 1005
Partials 112 112
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
f50a82b to
8d4cbdb
Compare
|
Clarification Request please update your assessment |
| conditions: { | ||
| StringEquals: { | ||
| 'aws:Referer': cdk.Aws.ACCOUNT_ID, | ||
| 'aws:SourceAccount': cdk.Aws.ACCOUNT_ID, |
There was a problem hiding this comment.
Breaking change!
| Condition: { | ||
| StringEquals: { | ||
| 'aws:Referer': { | ||
| 'aws:SourceAccount': { |
There was a problem hiding this comment.
Breaking change!
| "Condition": { | ||
| "StringEquals": { | ||
| "aws:Referer": { | ||
| "aws:SourceAccount": { |
There was a problem hiding this comment.
Breaking change! Can you please help us understand this? is the Referer deprecated now?
We do not allow breaking changes in stable modules unless its a changed necessitated by the underlying service.
There was a problem hiding this comment.
I would argue that the existing Referer header is a bug and it should use the SourceAccount property instead. We have an ongoing confused deputy problem because of this and I'm sure the correct behaviour would be to use the SourceAccount property.
Also, if you take a look at the changes made in https://github.com/aws/aws-cdk/pull/29833/files#diff-824a0448a198a71c623bc8daaae829a1cd482701129ebd395fca0ee665e96ffaR102-R112, it was merged without any consideration that it would be a breaking change.
There was a problem hiding this comment.
Makes sense. Can you add a section to the README with a couple of lines explaining this.
Restricts the SES to come through the SourceAccount in question. This will change does not affect bucket policy and ses rule action race condition, reported in aws#30143 and introduced in aws#29833 and reverted in aws#30375. That PR introduced the rule set name into the bucket policy, which added a dependency to the policy to the rule set(while the rule set requires that the policy is created first). Doing this change made a circular dependency between the two resources. This change solves aws#29811
445af73 to
c843674
Compare
QuantumNeuralCoder
left a comment
There was a problem hiding this comment.
LGTM. Ship it.
|
@Mergifyio requeue |
✅ The queue state of this pull request has been cleaned. It can be re-embarked automatically |
|
Hi @paulhcsun, any reason for this pull request not to be merged? (Judging by the label assigned to this PR) |
Hi @Lilja, it was because we wanted to evaluate if this change will break existing CDK applications. After some research, I guess at some point in the past, some SES example code out there uses You mentioned that you are experiencing the confused deputy problem and this change will fix it. Do you mind explaining further in what scenario you believe the confused deputy problem will occur? I suspect we may need to look into adding the |
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
|
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). |
|
This PR has been in the CHANGES REQUESTED state for 3 weeks, and looks abandoned. Note that PRs with failing linting check or builds are not reviewed, please ensure your build is passing To prevent automatic closure:
This PR will automatically close in 14 days if no action is taken. |
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). |
|
Comments on closed issues and PRs are hard for our team to see. |
Issue
#29811
Reason for this change
Restricts the SES to come through the SourceAccount in question.
This will change does not affect bucket policy and ses rule action race condition, reported in #30143 and introduced in #29833 and reverted in #30375. That PR introduced the rule set name into the bucket policy, which added a dependency to the policy to the rule set(while the rule set requires that the policy is created first). Doing this change made a circular dependency between the two resources.
Description of changes
Simply use SourceAccount instead of Referer.
Describe any new or updated permissions being added
n/a
Description of how you validated changes
n/a
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license