-
Notifications
You must be signed in to change notification settings - Fork 364
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
add a catch-all route if needed #2586
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2586 +/- ##
==========================================
+ Coverage 63.41% 63.57% +0.16%
==========================================
Files 119 119
Lines 19163 19198 +35
==========================================
+ Hits 12152 12206 +54
+ Misses 6196 6180 -16
+ Partials 815 812 -3 ☔ View full report in Codecov by Sentry. |
Signed-off-by: huabing zhao <zhaohuabing@gmail.com>
6617e4f
to
1c33498
Compare
// For filters without native per-route support, we need to add a catch-all route | ||
// to ensure that these filters are disabled for non-matching requests. | ||
// https://github.com/envoyproxy/gateway/issues/2507 | ||
func addCatchAllRoute(xdsIR map[string]*ir.Xds) { |
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.
cc @mt-inside
Signed-off-by: huabing zhao <zhaohuabing@gmail.com>
Signed-off-by: huabing zhao <zhaohuabing@gmail.com>
82b4268
to
4a2cdbe
Compare
Add a field called `useForRouting` that signals to Envoy Gateway that the headers generated from the claims are used to make routing decisions Internally this field will be used to * insert a catch-all route with a 404 direct response identical to envoyproxy#2586 which makes sure the jwt filter with `claimToHeader` is applied before recomputing routing decision * enable `clear_route_cache` to recompute routing decision https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/filters/http/jwt_authn/v3/config.proto#extensions-filters-http-jwt-authn-v3-jwtprovider Relates to envoyproxy#2452 Signed-off-by: Arko Dasgupta <arko@tetrate.io>
Co-authored-by: Arko Dasgupta <arkodg@users.noreply.github.com> Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>
Signed-off-by: huabing zhao <zhaohuabing@gmail.com>
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.
LGTM thanks @zhaohuabing !
* add a catch-all route if needed Signed-off-by: huabing zhao <zhaohuabing@gmail.com> * fix lint and gen Signed-off-by: huabing zhao <zhaohuabing@gmail.com> * make catch all route name unique across mulitple hosts Signed-off-by: huabing zhao <zhaohuabing@gmail.com> * Update internal/gatewayapi/translator.go Co-authored-by: Arko Dasgupta <arkodg@users.noreply.github.com> Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com> * address comments Signed-off-by: huabing zhao <zhaohuabing@gmail.com> --------- Signed-off-by: huabing zhao <zhaohuabing@gmail.com> Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com> Co-authored-by: Arko Dasgupta <arkodg@users.noreply.github.com> Signed-off-by: Stéphane Cottin <stephane.cottin@vixns.com>
This reverts commit 35e646d.
Add a field called `useForRouting` that signals to Envoy Gateway that the headers generated from the claims are used to make routing decisions Internally this field will be used to * insert a catch-all route with a 404 direct response identical to envoyproxy#2586 which makes sure the jwt filter with `claimToHeader` is applied before recomputing routing decision * enable `clear_route_cache` to recompute routing decision https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/filters/http/jwt_authn/v3/config.proto#extensions-filters-http-jwt-authn-v3-jwtprovider Relates to envoyproxy#2452 Signed-off-by: Arko Dasgupta <arko@tetrate.io>
Add a field called `useForRouting` that signals to Envoy Gateway that the headers generated from the claims are used to make routing decisions Internally this field will be used to * insert a catch-all route with a 404 direct response identical to envoyproxy#2586 which makes sure the jwt filter with `claimToHeader` is applied before recomputing routing decision * enable `clear_route_cache` to recompute routing decision https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/filters/http/jwt_authn/v3/config.proto#extensions-filters-http-jwt-authn-v3-jwtprovider Relates to envoyproxy#2452 Signed-off-by: Arko Dasgupta <arko@tetrate.io>
fix: #2507