Description
-
higress版本:2.1.3
-
问题描述:mcp-server的鉴权似乎没有按照预期传递
-
复现步骤
(首先声明📢📢📢:我以下截图中,左上图为wasmplugins.extensions.higress.io mcp-server-1.0.0插件配置;左下图为请求mcp tools的命令,为了便于自定义http header我就以curl形式请求;右边的图是rest-api节点的tcpdump抓包情况,用来观察higress请求restapi时携带的header信息)
情况1: mcp-server不配置任何鉴权,客户端自带两个header请求
结果: 随意写的一个a1头默认透传了,Authorization头不会透传
官网文档没有介绍未配置鉴权的时候透传相关的逻辑,不知道这个是否符合预期
情况2: 配置了bearer透传
结果: bearer未透传,不符合预期
情况3: 在上一步的基础上,配置上默认值
结果:还是未透传并且把默认值传过去了,不符合预期
controller日志看过 没有error日志,其他不知道还有没有什么方式可以排查下了,
另外想问一下,如果想自己去编译构建mcp-server/all-in-one:1.0.0来加一些日志debug的话,这个有没有相关文档呢?
-
higress version: 2.1.3
-
Problem Description: The authentication of mcp-server does not seem to be passed as expected
-
Reference documentation: https://higress.cn/ai/mcp-server/
-
Reproduction steps
(First declare 📢📢📢: In my screenshot below, the upper left picture is the wasmplugins.extensions.higress.io mcp-server-1.0.0 plug-in configuration; the lower left picture is the command to request mcp tools. In order to facilitate customizing http header, I request it in the form of curl; the figure on the right is the tcpdump packet capture situation of the rest-api node, which is used to observe the header information carried by the higress request for restapi)
Case 1: mcp-server does not configure any authentication, the client comes with two header requests
Result: A randomly written a1 header is transmitted through the default, and the Authorization header will not be transmitted through the authorization header.
The official website document does not introduce the logic related to the transmission when authentication is not configured. I don’t know if this meets expectations.
Case 2: Bearer transmission is configured
Result: Bearer is not transmitted through, not in line with expectations
Case 3: Based on the previous step, configure the default value
Result: It still did not pass through and passed the default value, which did not meet expectations
I have read the controller log. There is no error log. I don’t know if there is any other way to troubleshoot it.
I would like to ask, if you want to compile and build mcp-server/all-in-one:1.0.0 and add some log debugging by yourself, is there any relevant documentation?