我有几个后端 REST 服务,必须通过 WSO2 ESB 使用它们。我在后端使用基本授权 header 。我已经在 ESB 中创建了该服务,当我通过 firefox RESTClient 插件调用它时,它工作正常。配置如下:
<proxy name="ADocumentLibraryAuth" transports="https http" startOnLoad="true" trace="disable">
<target>
<inSequence>
<property name="Authorization" expression="fn:concat('Basic ', base64Encode('xxx:xxx'))" scope="transport"/>
<send>
<endpoint name="test">
<address uri="http://xxxxxx:8080/alfresco/s/slingshot/datalists/lists/xx/xx/xx"/>
</endpoint>
</send>
</inSequence>
<outSequence>
<send/>
</outSequence>
</target>
</proxy>
现在我想通过 ESB 保护此服务(例如使用 usernameToken 安全性)。我可以轻松启用此功能,但我不知道如何调用/使用此服务。我应该为此生成 wsdl 客户端并调用它吗?
最佳答案
默认情况下,您创建的代理服务是 SOAP 服务,因此当您添加任何类型的 WS-Security 时,您可以通过使用 WSDL 生成客户端来调用它。 WSDL 附加了所应用的安全策略。
问候, /女宛
关于rest - WSO2 ESB 和 REST 服务安全,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12350260/