0

我今天遇到了一个奇怪的问题,当我从 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 强制执行。

有什么线索吗?

4

2 回答 2

1

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.

于 2020-04-16T21:54:12.440 回答
0

只有重新下载 Anypoint Studio 和 mule 运行时才能解决该问题。很奇怪,它只发生在一个应用程序上,而不是其他应用程序。创建一个新的工作区没有帮助,删除应用程序并重新克隆和安装没有帮助,甚至在新目录中重新克隆也没有帮助。只有使用新的 Anypoint Studio 和运行时安装才能解决它(即使使用旧代码库)......

于 2020-04-17T09:26:47.963 回答