-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Kong issue with backend routing in Kong 3.7.1 in Service resources vs 2.8.x. other service pathing issues #13402
Comments
The default router flavor is |
@chronolaw Where does Kong's documentation or files state "traditional_compatible mode only supports path_handling = v0" ? And the runtime makes no mention of this either. Kong should be working to make traditional_compatible mode be traditional compatible in all scenarios of Kong configs. |
This is the document: https://docs.konghq.com/gateway/api/admin-oss/latest/#/Routes/list-route |
Gotcha, yeah if I hadn't reviewed that admin api notes section I would not see this: "Note: Path handling algorithms v1 was deprecated in Kong 3.0. From Kong 3.0, when router_flavor is set to expressions, route.path_handling will be unconfigurable and the path handling behavior will be "v0"; when router_flavor is set to traditional_compatible, the path handling behavior will be "v0" regardless of the value of route.path_handling. Only router_flavor = traditional will support path_handling "v1" behavior." So in Kong defaults mode anything v1 path handling gets a breaking change when running Kong's default Case 1: How does a customer appending .0 to a proxy thats just a plain string "/my/proxy/path/v1" mean Kong should append a "/.0" to the backend service path with a random trailing / in the service path? From a common sense perspective in what world does that behavior seem reasonable and make sense ootb? I am not seeing the rational for that behavior at all. Case 2: How does anything in the proxy route resource pathing of a non-regex plain path route like "/my/proxy/path/v1" make sense that when calling a backend host like https://my.api.com/my/service/path/v1.0/ in the service configs with trailing How did these cases pass engineering QA in thinking through common use cases of API proxying? What is Kong's offered solution in these two cases that makes sense vs fixing edge cases that the route+service resources don't make common sense behavior any longer and now obfuscate behavior from expected config(ex: if I configure a backend service with a trailing / I naturally expect Kong to route to what I configured there vs having to study other resources and learn extra ways the route resource now impacts what Kong will do on the backside)? |
hi @jeremyjpj0916 @chronolaw do you have some other things to update for this issue? |
Is there an existing issue for this?
Kong version (
$ kong version
)3.7.1
Current Behavior
Both with route using: "path_handling": "v1", which is deprecated but should still behave with same behavior. And
traditional_compatible
default running 3.7.x2.8.x routing behaviors:
Route in Kong:
/api/clm/apiresource/v2
Service Host +port + path:
myapi.com:443/my/api/v2
Consumer calls:
gateway.com/api/clm/apiresource/v2.0
Kong calls API behind it with:
myapi.com:443/my/api/v2.0
So Kong gets extra
.0
on end of proxy url and appends it to the backend host like people would expect gateways to.3.7.x routing behaviors:
Route in Kong:
/api/clm/apiresource/v2
Service Host +port + path:
myapi.com:443/my/api/v2
Consumer calls:
gateway.com/api/clm/apiresource/v2.0
Kong calls API behind it with:
myapi.com:443/my/api/v2/.0
So Kong gets extra
.0
on end of proxy url and appends/.0
it to the backend host which breaks apis that do v{major}.{minor} proxy URL routing and is not expected.Slightly similar to my other trailing
/
issue but slightly different issue here in breaking change too.Expected Behavior
Kong should always smart append what the customer passes on proxy url appended to backend URLs and not add extra characters. Some of the new routing behaviors of Kong don't seem to make common sense anymore for this issue and the other one I raised.
Steps To Reproduce
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: