首页 > 解决方案 > 缺少 Anypoint 平台应用程序名称 (flowVars._clientName)

问题描述

我今天遇到了一个奇怪的问题,当我从 AnypointStudio 本地运行我的 MuleSoft 应用程序并从邮递员发出请求时,我收到 403 错误。调试时,我发现应用程序正在检查flowVars._clientName,但是它丢失了。根据这个文档,实际上是flowVars._clientName是预期的。

https://help.mulesoft.com/s/article/How-to-get-the-client-application-name-in-a-flow-based-on-the-client-id-and-client-secret

所以我的应用程序因 403 错误而失败。似乎其他环境运行良好。

是的,它正在使用客户端 ID 强制执行。

有什么线索吗?

标签: muleanypoint-studiomulesoftanypoint-platform

解决方案


Without more details it looks like the issue is inside the logic of your application. The KB article that you referenced is a how to in case you need to obtain the client name. It doesn't say that you have to use for authentication. You don't describe how the application does authentication/authorization. Is it in a flow? Or in a policy? If it is the standard Client ID enforcement policy, the expressions to evaluate client id and secret can be configured, but I don't think the default is not #[flowVars._clientName] nor #[flowVars._clientId].

Note that Exchange is basically a repository of APIs and other artifacts. It doesn't authenticate anything at execution time. Unless your application is trying to use it somehow, but I can't think of a reason for that.


推荐阅读