如何在 Soap UI 5.0.0 中解密来自 WSO2 安全代理服务的接收消息 [英] How to Decrypt Recieving Message from WSO2 Secured Proxy Service in Soap UI 5.0.0

查看:23
本文介绍了如何在 Soap UI 5.0.0 中解密来自 WSO2 安全代理服务的接收消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 WSO2 ESB 中调用安全代理服务.我遵循了这个教程.我已经成功调用了代理服务.我还在我的代理服务Out"中收到了响应.顺序.但是当我将此响应发送回 SOAPUI 时.我面临一些问题.

I am trying to call a secure proxy service in WSO2 ESB. I followed this tutorial. I have successfully called the proxy service. I have also received the response in my proxy service "Out" sequence. But when I am sending this response back to SOAPUI. I am facing certain problems.

我已经完成了教程中提到的所有配置.

I have done all the configurations as mentioned in the tutorial.

第一种方法:

当我尝试发送我的请求并定义身份验证"时属性方式如下.其中我包括传出 WSS 和传入 WSS,First SoapUI 要求输入密码(密码为wso2carbon")然后显示错误.

When I try to send my request and define "Authentication" Properties in the following way. In which i include both the Outgoing WSS and Incoming WSS, First SoapUI asks for password(password is "wso2carbon") then it shows error.

错误:

Error Getting Response :null

第二种方式:

当我只在身份验证属性"中包含传出 WSS 时,SoapUI 不会要求输入密码,也会得到响应.但是响应是加密的,不包含我的结果.

When i only include Outgoing WSS in the "Authentication Properties", SoapUI didn't ask for password and also gets a response. But the response is encrypted and didn't contain my result.

回应:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
   <soapenv:Header>
      <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <wsu:Timestamp wsu:Id="Timestamp-174" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsu:Created>2015-02-18T16:18:38.284Z</wsu:Created>
            <wsu:Expires>2015-02-18T16:23:38.284Z</wsu:Expires>
         </wsu:Timestamp>
         <xenc:EncryptedKey Id="EncKeyId-F8FEAAA25C72C38AF11424276318297215">
            <xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"/>
            <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
               <wsse:SecurityTokenReference>
                  <wsse:KeyIdentifier EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/oasis-wss-soap-message-security-1.1#ThumbprintSHA1">a/jhNus21KVuoFx65LmkW2O/l10=</wsse:KeyIdentifier>
               </wsse:SecurityTokenReference>
            </ds:KeyInfo>
            <xenc:CipherData>
               <xenc:CipherValue>R4aI0V2uS7h64n7qEMwzvs6iFN9YCTM7iMW7N+L3IxMP+Z7R9wwzlJpJ4vE3+tunVZyqdHzuOxGP0b3LLhNUsc7ys9QByvJoID3RkfkBlSz4AstOffL4t4CKIepx4fGXccFj0cvKxDrv/4SNREO2cQsHtYnsl/LOktxsq3Cd3kc=</xenc:CipherValue>
            </xenc:CipherData>
            <xenc:ReferenceList>
               <xenc:DataReference URI="#EncDataId-177"/>
            </xenc:ReferenceList>
         </xenc:EncryptedKey>
         <wsse11:SignatureConfirmation Value="ZhUpeBE6eupgRfq+ZBKCb7lvdNeSfC/XP+9q9pgr41u53oFa93+yJ0lM5E+nqlK/8NvW4We8RYUSLwNZiJZnZ5bHBXADR9+mGsWi+mGv2grpSNS1/x40bsTSfbe+YTL1azQQNrdyFUBZHazX9I6VXaau1rYS6Wak1MC7Ndtmas4=" wsu:Id="SigConf-175" xmlns:wsse11="http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"/>
         <ds:Signature Id="Signature-176" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
            <ds:SignedInfo>
               <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
               <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
               <ds:Reference URI="#Id-1240651390">
                  <ds:Transforms>
                     <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
                  </ds:Transforms>
                  <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
                  <ds:DigestValue>E9q9gvsO64SKD7LFluO62pEpFIM=</ds:DigestValue>
               </ds:Reference>
               <ds:Reference URI="#Timestamp-174">
                  <ds:Transforms>
                     <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
                  </ds:Transforms>
                  <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
                  <ds:DigestValue>Y8ICfco6fqwNx0SC6eVN+fWGo6M=</ds:DigestValue>
               </ds:Reference>
               <ds:Reference URI="#SigConf-175">
                  <ds:Transforms>
                     <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
                  </ds:Transforms>
                  <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
                  <ds:DigestValue>VJe/lgh2CALKbFN1B+YKif6HJVM=</ds:DigestValue>
               </ds:Reference>
            </ds:SignedInfo>
            <ds:SignatureValue>FbmcmvnHalQH14UiN9m6sVNsFoy0/IAS5tsdg2hg7n5kxD/MiNz/MS9w/q0VESAT61eV4/u8p+ho
HP0ehudU2s+U/PjGNU2M2eG7hI4T43gfdXLaOOemv4LcOeJwLTTp0at2AC2CRexUNmUMQ1UhQsoU
qrDYb/fHh47p+sOkbGE=</ds:SignatureValue>
            <ds:KeyInfo Id="KeyId-F8FEAAA25C72C38AF11424276318286212">
               <wsse:SecurityTokenReference wsu:Id="STRId-F8FEAAA25C72C38AF11424276318286213" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
                  <wsse:KeyIdentifier EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/oasis-wss-soap-message-security-1.1#ThumbprintSHA1">a/jhNus21KVuoFx65LmkW2O/l10=</wsse:KeyIdentifier>
               </wsse:SecurityTokenReference>
            </ds:KeyInfo>
         </ds:Signature>
      </wsse:Security>
   </soapenv:Header>
   <soapenv:Body wsu:Id="Id-1240651390" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
      <xenc:EncryptedData Id="EncDataId-177" Type="http://www.w3.org/2001/04/xmlenc#Content">
         <xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes256-cbc"/>
         <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
            <wsse:SecurityTokenReference xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
               <wsse:Reference URI="#EncKeyId-F8FEAAA25C72C38AF11424276318297215"/>
            </wsse:SecurityTokenReference>
         </ds:KeyInfo>
         <xenc:CipherData>
            <xenc:CipherValue>Jg/EODedQJtbgBYc7xUa86fAtgALcbsHoiwDLJkyoPLOq1+Se+A/HEQOnmYwJhl7prw7pVK0ap3N
4F3Yvw3gZu0cdS+AUEAikrUzYdMwJAbQ8BYGSqK5IFdHourk74cFsshMYaMLqkwIgN+ZvmPuHxI8
tZCv+DF0kHecsq7qLXIfjxvI87TNygkzaj9gOex/</xenc:CipherValue>
         </xenc:CipherData>
      </xenc:EncryptedData>
   </soapenv:Body>
</soapenv:Envelope>

注意:

在任何情况下,ESB 日志中都没有错误.我正在使用 WSO2 ESB 4.8.1.和 SoapUI 5.0.0.如果您需要有关我的代理服务代码和我的请求的更多信息,它与教程中提到的完全相同.而且它工作正常,因为在 ESB 的外序列中有响应.

There is no error in ESB Logs in any case. I am using WSO2 ESB 4.8.1. and SoapUI 5.0.0. If you need any more information about my proxy service code and my request, it is exactly same as mentioned in the tutorial. And it works fine because there is a response in out sequence of ESB.

问题:

我想了解两件事,首先为什么我的回复是加密形式的,以及如何解密.二 为什么在包含Incoming WSS"时,根本没有响应?

I want to understand two things , first why is my response in in encrypted form and how to decrypt it. Second Why when in include "Incoming WSS", there is no response at all?

推荐答案

从 SoapUI 4.5(有效)升级到 5.1.3(无效)后,我花了一段时间才弄清楚有同样的问题.

Well that took me a while to figure out as had same issue after upgrading from SoapUI 4.5 (which worked) to 5.1.3 (which didn't).

错误在这个文件中:C:Program FilesSmartBearSoapUI-5.1.3insoapui-errors.log

The error is in this file: C:Program FilesSmartBearSoapUI-5.1.3insoapui-errors.log

最简单的解决方法是:

  1. 转到 C:Program FilesSmartBearSoapUI-5.1.3lib
  2. 重命名wss4j-1.6.16.jar 到 wss4j-1.6.16.jar.old
  3. 将 wss4j-1.6.2.jar 从 SoapUI 4.5 的同一位置复制到此文件夹.

重新启动,它现在可以工作了.

Restart and it works now.

基于此链接的答案非常感谢 Thorsten 为我指明了正确的方向:http://community.smartbear.com/t5/SoapUI-NG/SoapUI-4-5-difference-Getting-Error-getting-response-NULL/mp/41816/highlight/true#M21455

Answer based on this link so credit to Thorsten to pointing me in the right direction: http://community.smartbear.com/t5/SoapUI-NG/SoapUI-4-5-difference-Getting-Error-getting-response-NULL/m-p/41816/highlight/true#M21455

这篇关于如何在 Soap UI 5.0.0 中解密来自 WSO2 安全代理服务的接收消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆