feat(elbv2): regex support for listener conditions#36384
feat(elbv2): regex support for listener conditions#36384
Conversation
|
|
||||||||||||||
|
|
||||||||||||||
5ac1a90 to
a0ad791
Compare
921f40d to
a8b48a7
Compare
|
@pahud I've problem figuring out how to resolve the Security Guardian failure, not sure what to do. Any help would be appreciated. |
Hi You don't need to deal with the security guardian issues for now. Just make sure the CodeBulid CI passes, which at this moment is failing. https://github.com/aws/aws-cdk/actions/runs/20754299612/job/59591898496?pr=36384 As long as the CodeBuild CI passes, this PR will be queued for review and more inputs will be provided from the maintainers. Thank you. |
a8b48a7 to
402f51f
Compare
Ah, I thought it was blocking review from the maintainers as it was the only test that failed then; I've have to look into if any of my changes to fix the security guarding issue has caused the error you pointed out; copilot's "explain error" doesn't really point me in any direction I've been poking around in. |
|
@pahud the error seems to be unrelated to my PR: |
click
|
402f51f to
521a273
Compare
bf3fb17 to
fafe14e
Compare
|
@pahud I noticed I had updated yarn.lock, and reverting that seems to solve the issue. |
a69b63d to
01ce9cb
Compare
f6a2303 to
ffbb566
Compare
ffbb566 to
4275238
Compare
c09bc56 to
1c00163
Compare
1c00163 to
e2c6a92
Compare
e2c6a92 to
bbd1aeb
Compare
Add regex-based condition methods for ALB listener rules: - hostHeadersRegex() for host header pattern matching - httpHeaderRegex() for HTTP header pattern matching - pathPatternsRegex() for URL path pattern matching These methods use the regexValues CloudFormation property instead of values, allowing for more flexible pattern matching using regular expressions. Also add comprehensive validation for all listener condition types: - Maximum length validation (128 chars for most values, 40 for header names) - Non-empty value validation where required - Pattern validation for HTTP request methods - Maximum count validation (5 items for path patterns) Includes unit tests and integration tests for all new functionality. closes aws#36363
hoegertn
left a comment
There was a problem hiding this comment.
LGTM; looking forward to the feature.


Issue #36363
Closes #36363
Reason for this change
AWS elbv2 now (since when?) supports regex values for host headers, http headers, and path patterns.
Description of changes
Add regex-based condition methods for ALB listener rules:
hostHeadersRegex()for host header pattern matchinghttpHeaderRegex()for HTTP header pattern matchingpathPatternsRegex()for URL path pattern matchingThese methods use the
regexValuesCloudFormation property instead of values, allowing for more flexible pattern matching using regular expressions.Also add comprehensive validation for all listener condition types:
Describe any new or updated permissions being added
N/A
Description of how you validated changes
Includes unit tests and integration tests for all new functionality.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license