Skip to content
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

doc: AwsSolutions-CFR6 conflicts with AWS recommendation #1582

Open
EysaN opened this issue Jan 26, 2024 · 5 comments
Open

doc: AwsSolutions-CFR6 conflicts with AWS recommendation #1582

EysaN opened this issue Jan 26, 2024 · 5 comments
Labels
documentation Improvements or additions to documentation feature-request A feature should be added or improved.

Comments

@EysaN
Copy link

EysaN commented Jan 26, 2024

Under RULES.md, the rule AwsSolutions-CFR6 results in the following error when synthesizing CDK app:
AwsSolutions-CFR6: The CloudFront distribution does not use an origin access identity with an S3 origin.

However, AWS Documentation clearly says: We recommend using OAC and it marks OAI as legacy, not recommended.

Currently, we have to manually suppress it to avoid synthesizing failure.

Could you please support OAC instead?

@EysaN EysaN added documentation Improvements or additions to documentation needs-triage This issue or PR still needs to be triaged. labels Jan 26, 2024
@dontirun dontirun added feature-request A feature should be added or improved. and removed needs-triage This issue or PR still needs to be triaged. labels Feb 7, 2024
@dontirun
Copy link
Collaborator

dontirun commented Feb 7, 2024

@EysaN I'll take a look into what needs to be done for this one. Thanks for bringing it up!

@clueleaf
Copy link
Contributor

clueleaf commented Mar 5, 2024

@dontirun
Copy link
Collaborator

I think there will need to be a few changes here

Streaming Distribution

CloudFront Streaming distributions don't seem to support OACs so the rule should be kept the same for Streaming Distributions

Distribution

@clueleaf I think you're correct that we need to check the OriginAccessControlId property on Distributions. Additionally, if the OAC is created in the stack, we should also check if the SigningBehavior isn't set to never

@braidoa
Copy link

braidoa commented May 13, 2024

Hi. Commenting from AWS ProServe Engagement Security:
We will wait until cdk-nag is updated, and then we'll update our guidance to ProServe builders. 😄

@clueleaf
Copy link
Contributor

clueleaf commented May 26, 2024

Since currently we have to use addPropertyOverride to configure OAC, and cdk-nag can not see overridden properties, I think supporting OAC in cdk-nag now will result in a lot of false positives.
Waiting for an L2 construct for OAC. (aws/aws-cdk#21771 aws/aws-cdk-rfcs#617)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation feature-request A feature should be added or improved.
Projects
None yet
Development

No branches or pull requests

4 participants