简体   繁体   English

WSO2 ESB-已实现ws安全的代理服务

[英]WSO2 ESB - Proxy service with ws security implemented

I have a question about registering an existing web service with ws security implemented in wso2. 我有一个关于在wso2中实现的具有ws安全性的现有Web服务注册的问题。

This image represent what i have and what I need. 此图像代表我所拥有和我所需要的。

I use the client to invoke original service and everything is ok. 我使用客户端调用原始服务,一切正常。 I create a proxy service (Pass Through Proxy) with the existing WSDL and when I invoke the service with the same client (I change wsdl and end point in the client) the response is: 我使用现有的WSDL创建代理服务(直通代理),并使用相同的客户端(在客户端中更改wsdl和端点)调用该服务时,响应为:

    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
   <env:Header></env:Header>
   <env:Body>
      <env:Fault xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <faultcode>wsse:InvalidSecurity</faultcode>
         <faultstring>Missing &lt;wsse:Security&gt; in SOAP Header</faultstring>
         <faultactor></faultactor>
      </env:Fault>
   </env:Body>
</env:Envelope>

I need to implement any policy or make another configuration for this scenario???? 我需要为此方案实施任何策略或进行其他配置?

I'm using wso2carbon (wso2esb-4.8.1). 我正在使用wso2carbon(wso2esb-4.8.1)。

Thankyou 谢谢

If you need to secure a proxy service you will have to configure security by adding a policy to the proxy service. 如果需要保护代理服务,则必须通过向代理服务添加策略来配置安全性。 This way the client connecting to the proxy service will have to have security headers as defined in the policy file. 这样,连接到代理服务的客户端将必须具有策略文件中定义的安全标头。 refer to this documentation . 请参阅本文档

If you need to connect a unsecured client to a secured backend through a proxy service, you will have to secure the endpoint for that proxy service by giving a policy file as defined by the backend. 如果需要通过代理服务将不安全的客户端连接到受保护的后端,则必须通过提供后端定义的策略文件来保护该代理服务的端点。 This way the client will not send any security headers in the request, but the ESB will add the corresponding headers when the request is sent to the backend. 这样,客户端将不会在请求中发送任何安全标头,但是当请求发送到后端时,ESB将添加相应的标头。 See QOS section of this 见QOS节

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM