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

feat(type-safe-api): expose managed rule props to allow consumers to … #712

Merged
merged 4 commits into from
Mar 4, 2024

Conversation

mirgj
Copy link
Contributor

@mirgj mirgj commented Mar 4, 2024

Fixes # NA

This PR introduce the ability to modify the Waf managed rule set provided by the consumers in order to allow customisations that include, for example, the ability to change the individual rule behaviour inside a ruleset.

A common example is related to the AWSManagedRulesCommonRuleSet which has a strict rule named SizeRestrictions_BODY that allow only 8Kb body payload. With the current implementation provided by PDK the only option we have is to either disable Waf altogether or add a different rule set to override the default behaviour. The interface provided by type safe api doesn't provide the ability to modify the ruleset rules.

With this change, consumers can override individual rules in the ruleset as the entire CDK interface is shared to the consumer.

In order to have backwards compatibility this PR keep the usage of both vendor and vendorName properties. In future PDK iterations it's suggested to remove vendor to keep only vendorName using the default interface provided by CDK

Copy link
Member

@cogwirrel cogwirrel left a comment

Choose a reason for hiding this comment

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

Looks great, thank you! Just a couple of minor nit-picks :)

@cogwirrel cogwirrel merged commit 54dc450 into aws:mainline Mar 4, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants