You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you are reporting any crash or any potential security issue, do not
open an issue in this repo. Please report the issue via ASRC(Alibaba Security Response Center) where the issue will be triaged appropriately.
I have searched the issues of this repository and believe that this is not a duplicate.
Ⅰ. Issue Description
Higress 为 Nacos MCP Registry 中注册的服务所生成的路由使用的是前缀匹配方式,且路由顺序未经过合理排序,导致 A 服务名称被 B 服务名称所包含时,发往 B 服务的请求匹配到 A 服务的路由。
If you are reporting any crash or any potential security issue, do not
open an issue in this repo. Please report the issue via ASRC(Alibaba Security Response Center) where the issue will be triaged appropriately.
Ⅰ. Issue Description
Higress 为 Nacos MCP Registry 中注册的服务所生成的路由使用的是前缀匹配方式,且路由顺序未经过合理排序,导致 A 服务名称被 B 服务名称所包含时,发往 B 服务的请求匹配到 A 服务的路由。
Ⅱ. Describe what happened
重现流程:
sayhello
和sayhello-2
http://higress-gateway-ip/mcp/sayhello-2
,发现请求关联到了sayhello
的 cluster配置信息:
通过请求
http://pilot:15014/debug/configz
和http://gateway:15000/debug/configz
获取线上配置数据发现,sayhello
的路由排在sayhello-2
的路由前面,并且它们都用的是prefix
的匹配方式。这可能就是导致本问题的原因。http://pilot:15014/debug/configz 返回数据节选(顺序未调整):
http://gateway:15000/debug/configz 返回数据节选(顺序未调整):
Ⅲ. Describe what you expected to happen
MCP 请求应关联到正确的后端服务集群。
Ⅳ. How to reproduce it (as minimally and precisely as possible)
见 Ⅱ
Ⅴ. Anything else we need to know?
修复时可以参考现在一般 Ingress 路由生成 VirtualService 时所使用的匹配规则:
Ⅵ. Environment:
higress-registry.cn-hangzhou.cr.aliyuncs.com/higress/higress
镜像使用latest
tag(目的是修复 Nacos 3.x 的认证问题)2.1.2
tag。The text was updated successfully, but these errors were encountered: