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

refactor(WAF): Rename WAF to WAFRegional and Add Global WAF Service #5389

Merged
merged 5 commits into from
Oct 14, 2024

Conversation

HugoPBrito
Copy link
Member

Context

I identified a misconception in how the AWS WAF services and clients were referenced and utilized across our services. Specifically, AWS WAFRegional was being referred to as simply WAF, which led to confusion. Additionally, AWS WAF (global) was not represented separately, which could cause potential issues when differentiating between global and regional WAF services.

Description

This PR addresses the following:

  • Renaming: The existing WAF service and client have been renamed to WAFRegional to align with AWS’s naming convention for regional WAF services.
  • Introducing Global WAF: A new WAF service and client have been introduced to represent AWS WAF (global), ensuring that both regional and global WAF services are distinctly covered.
    This change mirrors the structure used by AWS and is similar approach to how we handleS3 and S3Control services under the same S3 service file with different client files.

Checklist

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Renamed old client  WAF to WAFRegional and added WAF (Global) new client inside the same service.
@HugoPBrito HugoPBrito requested review from a team as code owners October 14, 2024 06:53
@github-actions github-actions bot added the provider/aws Issues/PRs related with the AWS provider label Oct 14, 2024
Copy link

codecov bot commented Oct 14, 2024

Codecov Report

Attention: Patch coverage is 89.65517% with 3 lines in your changes missing coverage. Please review.

Project coverage is 89.43%. Comparing base (3c929bd) to head (f3025e0).
Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
prowler/providers/aws/services/waf/waf_service.py 87.50% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master    #5389    +/-   ##
========================================
  Coverage   89.43%   89.43%            
========================================
  Files        1027     1031     +4     
  Lines       31531    31685   +154     
========================================
+ Hits        28200    28338   +138     
- Misses       3331     3347    +16     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@sergargar sergargar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!
Please, change the waf client that is used in check elbv2_waf_acl_attached to the new regional one.

@HugoPBrito
Copy link
Member Author

Good catch! Please, change the waf client that is used in check elbv2_waf_acl_attached to the new regional one.

Done! I also updated the new client name to avoid any possible confusions.

@sergargar sergargar self-requested a review October 14, 2024 15:11
@sergargar sergargar merged commit 2c0c1f7 into master Oct 14, 2024
11 checks passed
@sergargar sergargar deleted the PRWLR-5033-create-waf-classic-global-service branch October 14, 2024 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
provider/aws Issues/PRs related with the AWS provider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants