-
Notifications
You must be signed in to change notification settings - Fork 97
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
Disallow route to attach to listener if not present in allowed routes. #2314
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2314 +/- ##
=======================================
Coverage 87.74% 87.74%
=======================================
Files 96 96
Lines 6813 6830 +17
Branches 50 50
=======================================
+ Hits 5978 5993 +15
- Misses 778 780 +2
Partials 57 57 ☔ View full report in Codecov by Sentry. |
d7bc096
to
ac6857f
Compare
Did you also check the opposite case: Gateway has a listener that allows HTTPRoute and a GRPCRoute tries to attach to that listener? Also, did you make sure that the positive case still works. In other words, that routes can attach to listeners if they are allowed by the listener? |
Yes, let me add more examples in the description |
ac6857f
to
eaf136a
Compare
@salonichf5 looks like case |
f58aecc
to
75e6ab5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, @salonichf5! Just a few small changes
581a0c0
to
a72f084
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one small nit, but otherwise LGTM
70c60e5
to
38538dc
Compare
Proposed changes
Write a clear and concise description that helps reviewers understand the purpose and impact of your changes. Use the
following format:
Problem: NGF allows all route kinds to attach to a listener regardless of the kinds specified in the listener AllowedRoutes.Kinds field
Solution: Add check to reject a route trying to attach to a listener which doesn't allow its kind.
Testing: Manual testing
Please focus on (optional): If you any specific areas where you would like reviewers to focus their attention or provide
specific feedback, add them here.
Closes #2299
Checklist
Before creating a PR, run through this checklist and mark each as complete.
Release notes
If this PR introduces a change that affects users and needs to be mentioned in the release notes,
please add a brief note that summarizes the change.