(aws_wafv2): FieldToMatchProperty missing headerOrder property on CDK/CFN but is available on API
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 74
Description
### Describe the feature
The generated L1 construct for WAFv2 fieldToMatch property is missing the headerOrder optional property.
## Description
The AWS WAFv2 API includes an optional `headerOrder` property in the `FieldToMatch` object, but this property is not present in the CDK's L1 construct.
## References
### WAFv2 API Reference
- [FieldToMatch](https://docs.aws.amazon.com/waf/latest/APIReference/API_FieldToMatch.html)
- [HeaderOrder](https://docs.aws.amazon.com/waf/latest/APIReference/API_HeaderOrder.html)
### CloudFormation
[WAFv2 WebACL FieldToMatch](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-fieldtomatch.html#cfn-wafv2-webacl-fieldtomatch-allqueryarguments)
### CDK
[CfnWebACL.FieldToMatchProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_wafv2.CfnWebACL.FieldToMatchProperty.html)
## Expected Behavior
The L1 construct for WAFv2 `FieldToMatch` should include the `headerOrder` property to align with the WAFv2 API.
## Actual Behavior
The `headerOrder` property is missing from the L1 construct.
## Proposed Solution
Update the L1 construct to include the `headerOrder` property, allowing users to specify header order when configuring WAFv2 rules.
### Use Case
The headerOrder property allows inspection of a string containing the list of the request's header names, ordered as they appear in the web request that AWS WAF receives for inspection.
This feature is currently available in the WAFv2 API but is missing from the CDK and CloudFormation implementations.
### Proposed Solution
_No response_
### Other Information
_No response_
### Acknowledgements
- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### CDK version used
2.177.0
### Environment details (OS name and version, etc.)
Linux
Contributor guide
Research direction
Start with the CfnWebACL.FieldToMatchProperty documentation and compare it with the AWS WAFv2 FieldToMatch and HeaderOrder API references linked in the issue. Locate the generated L1 construct definition and its related tests or snapshots. Done means users can configure headerOrder through the WAFv2 FieldToMatch property and the relevant checks pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud, infrastructure
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100