WAFv2 AndStatement and OrStatement incorrect validation
See original GitHub issueHi guys,
In the validator for WAFv2 statements, there is a check to see if the number of statements if exactly 2 when it should be looking to see if there are at least 2 statements given.
“You provide more than one Statement within the AndStatement.” Source
AWS requires there to be more than one statement, but does not restrict them to only pairs.
A small change in the logic of the if
statement and the TypeError
message is all that is needed.
Thank you
Issue Analytics
- State:
- Created a year ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
AWS::WAFv2::WebACL OrStatement - AWS CloudFormation
A logical rule statement used to combine other rule statements with OR logic. You provide more than one Statement within the OrStatement ....
Read more >A reference in your rule statement is not valid., field ... - GitHub
Terraform throws an error when trying to create it using the code block as above: Error: Error creating WAFv2 WebACL: WAFInvalidParameterException: Error reason ......
Read more >Protecting Your Web Application Using AWS Managed Rules ...
... the new AWS WAF, explain how the rule writing works using JSON with the WAFv2 API, and how you can migrate easily...
Read more >Changelog — troposphere 4.0.1 documentation - Read the Docs
Fix WAFv2 AndStatement and OrStatement validation (Fixes #2026) ... Fix copy/paste issue resulting in incorrect ECS validator assignment (Fixes #2000).
Read more >woodonggyu/wafv2/aws - Terraform Registry
Inputs ; visibility_config, Defines and enables Amazon CloudWatch metrics and web request sample collection. object({...}) { cloudwatch_metrics_enabled = false
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Fixed in Release 4.0.1
Had to rework the pieces on our end around the creation of the resources, but definitely nice to have all of the features available now.
Not specific to WAFv2, but one thing that did strike me as odd was that resource objects can be successfully initialized without all of the required properties being given. I thought I remembered it erroring out in situations like that, or am I missing something. ?
I thought with a property defined as
if you tried to initialize without defining
Prop1
, it would throw some kind of exception. It seems like you can initialize resource objects without including all of the required properties, or with none at all.Was this always the case, or did something change? If not, could that potentially be a feature request?
Thank you man