如何删除 WSO2 ESB 上的 ws-security header?

How to remove ws-security header on WSO2 ESB?

我在 WSO2 Enterprise Service Bus 4.9.0 上有一个 ws-security 的代理。

当我尝试调用 WSO2 DSS 时,它响应错误,因为在我的请求负载中有 ws-security header,而 DSS 不能接受这个。

我尝试使用 Header Meadiator 删除 header,但它不起作用。

我在 Stack Overflow 上看到了另一个 post,但它对我没有帮助,因为我的 axis.xml 文件中不存在要删除以解决问题的标签(WSO2 ESB unable to remove ws-security header in the response before DSS call)

如何删除 ws-security header?有什么方法可以停止通过我的代理传播 ws-security header?

检查您的配置,它用于删除 header。它应该类似于以下配置:

<syn:header name="wsse:Security" action="remove" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"/> 

您可以参考 WSO2 文档以获得更多参考 [1][2]

而您在问题中提到的堆栈溢出问题(WSO2 ESB unable to remove ws-security header in the response before DSS call)是关于将错误的模块添加到axis2.xml。它是由用户完成的,并成为该问题的原因。这就是为什么您无法在 axis2.xml.

中找到该模块的原因

请参考文档并相应地更改您的配置。

[1] https://docs.wso2.com/display/ESB490/Sample+100%3A+Using+WS-Security+for+Outgoing+Messages

[2]https://docs.wso2.com/display/ESB490/Sample+200%3A+Using+WS-Security+with+policy+attachments+for+proxy+services