如何解密从 Soap UI 5.0.0 中的 WSO2 安全代理服务接收的消息

2024-04-14

我正在尝试调用 WSO2 ESB 中的安全代理服务。我跟着这个tutorial http://tryitnw.blogspot.com/2013/07/invoking-secured-esb-proxy-service.html。我已成功调用代理服务。我还在代理服务“Out”序列中收到了响应。但是当我将此响应发送回 SOAPUI 时。我面临着某些问题。

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

第一种方法:

当我尝试发送请求并按以下方式定义“身份验证”属性时。其中我包括传出 WSS 和传入 WSS,首先 SoapUI 要求输入密码(密码是“wso2carbon”),然后显示错误。

Error:

Error Getting Response :null

第二种方式:

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. enter image description here

回复:

<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>

Note:

无论如何,ESB 日志中都没有错误。我正在使用 WSO2 ESB 4.8.1。和 SoapUI 5.0.0。如果您需要有关我的代理服务代码和我的请求的更多信息,它与教程中提到的完全相同。它工作得很好,因为 ESB 的顺序有响应。

Problem:

我想了解两件事,首先为什么我的响应采用加密形式以及如何解密它。 第二为什么当包含“Incoming WSS”时,根本没有响应?


好吧,我花了一段时间才发现从 SoapUI 4.5(有效)升级到 5.1.3(无效)后也出现了同样的问题。

错误在这个文件中: C:\Program Files\SmartBear\SoapUI-5.1.3\bin\soapui-errors.log

最简单的修复是这样的:

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

重新启动,现在可以使用了。

根据此链接回答,感谢托尔斯滕为我指明了正确的方向:http://community.smartbear.com/t5/SoapUI-NG/SoapUI-4-5-difference-Getting-Error-getting-response-NULL/m-p/41816/highlight/true#M21455 http://community.smartbear.com/t5/SoapUI-NG/SoapUI-4-5-difference-Getting-Error-getting-response-NULL/m-p/41816/highlight/true#M21455

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何解密从 Soap UI 5.0.0 中的 WSO2 安全代理服务接收的消息 的相关文章

随机推荐

  • Android 4.0 添加日历和事件

    我想在android 4 0及以上版本的设备中添加日历事件 目前我正在使用以下代码添加事件 if android os Build VERSION SDK INT lt 7 Uri calendars Uri parse content c
  • 如何使用摄像头直播作为活动背景?

    我正在尝试制作一个应用程序 其中我需要使用相机实时馈送作为背景 我知道这是一件愚蠢的事情 但无能为力 这是客户的要求 我尝试过使用SurfaceView但到目前为止还没有成功 到目前为止 我在 Stack Overflow 上发现的更多内容
  • 从conda为pip3创建requirements.txt

    我通常使用 conda 来管理我的环境 但现在我正在进行的项目需要比我的笔记本电脑更多的马力 因此 我尝试使用我大学的配备新英特尔至强处理器的工作站 但我没有管理员权限 而且工作站没有 conda 所以我被迫使用 virtualenv 和
  • 公共运算符 new、私有运算符删除:使用 new 时出现 C2248“无法访问私有成员”

    类具有重载运算符new and delete new是公开的 delete是私人的 在构造此类的实例时 出现以下错误 pFoo new Foo bar example cpp 1 错误 C2248 Foo operator delete 无
  • Android IAB 错误 - 需要身份验证

    我在我的应用程序中测试 In App Billing v3 时遇到问题 我无法使用测试帐户购买任何东西 它总是向我显示一个 Play 商店对话框 Error Authentication is required You must log i
  • Clang 和二进制折叠表达式 — 空参数包的诅咒

    具体来说 Clang 3 6 0 目前由 Coliru 托管 所有这些片段都是从以下位置调用的 int main foo std cout lt lt n n foo 1 2 3 以下代码 template
  • XAML 编辑器的黑色背景

    我目前正在开发一个具有白色文本和透明背景的用户控件 不幸的是 因为 VS2010 中的 XAML 设计视图具有白色背景 所以我看不到我正在设计的任何内容 我已经浏览了我能想到的所有设置对话框 但一直无法找到更改 XAML 设计器背景颜色的设
  • Android:多次播放 AudioTrack 会导致崩溃

    我正在尝试使用 AudioTrack 播放音频缓冲声音 wav 请参阅下面的代码 我需要在Thread下调用这个函数来支持同时播放 在线程下很好 正常播放声音效果很好 但是 如果我连续使用 AudioTrack 执行播放声音 即在完成第一个
  • 点冻结与点列表

    为什么pip list生成比以下更全面的列表pip freeze pip list feedparser 5 1 3 pip 1 4 1 setuptools 1 1 5 wsgiref 0 1 2 pip freeze feedparse
  • 对于大文件,使用 dataURI 创建 iframe 失败,有解决方法吗? [复制]

    这个问题在这里已经有答案了 function openNewWindow strPreviewId let newWindowViewer window open var index mapPreviewIdWithFile strPrev
  • 同一浏览器中不同用户的 Cookie

    网站页面上有一些下拉菜单 用户只有在经过身份验证后才能访问此页面 我想将此值保存到 cookie 中 并在用户返回我的网站时将其设置回下拉菜单 将当前选择的下拉选项值保存到 cookie 并稍后检索它不是问题 但是 如果我由另一个用户在同一
  • 如何在 LaTeX 中扩展文章文档类?

    我真的不需要对默认文章文档类进行大量更改 我想要的只是 重新定义页边距 我希望它们在所有页面上都相同 但与默认值不同 使用扉页 在标题页上添加更多元素 title author and date对我来说还不够 我想要company和公司lo
  • Android 版本是否有最小堆大小?

    许多帖子都谈到了 Android 堆大小 到目前为止我发现最大堆大小的唯一共同点是它至少为 16MB 但这是自 API 3 以来的限制 为了使用更多内存 人们会建议使用 NDK 或任何超出 正常 Android 开发的东西 是否有任何 An
  • 如何更改 d3 图例条目间距/对齐方式

    我有这样一个传说 如您所见 每个图例条目的宽度相同 相反 我希望每个图例条目的宽度根据条目符号和文本的宽度而变化 最终 我希望前导条目文本的末尾与后续条目符号的开头之间的距离相同 换句话说 我希望 OA 和加号之间的距离与 OI 和菱形以及
  • codeigniter 标头中重复的“set-cookie: ci-session”字段

    每次在我的控制器中使用 this gt session gt set userdata 或 this gt session gt set flashdata 时 另一个相同的 Set Cookie ci session 会添加到 http
  • 外键必须映射到概念侧参与外键关联的某些 AssociationSet 或 EntitySet

    我试图在实体框架中使用一对一 主 详细 关系 但是 我收到此错误 从第 254 443 行开始映射片段时出现问题 外键约束 options Advanced FK00 从表 options Advanced ProductID 到表 pro
  • 外部 VS2013 构建错误“错误 MSB4019:找不到导入的项目 <路径>”

    我使用 CMake 文件从命令 proms 构建一个项目 该项目可以找到here http www adobe com devnet xmp html 在构建时我遇到以下错误 C Users User Desktop XMP Toolkit
  • 使用 APISpark Restlet 扩展限制对 Restlet 资源的请求

    这是我限制分钟请求数量的代码 MethodAuthorizer ma createMethodAuthorizer ma setNext router FirewallRule rule new PeriodicFirewallCounte
  • MediaElement 是否仅在嵌入 XAML 代码时才播放?

    我有一个声音播放器类 根本没有任何视觉效果 我正在尝试使用MediaElement播放我的声音 在所有的测试项目中 MediaElement嵌入到 XAML 代码中 它工作得很好 但是 在我的纯代码版本中 即使文件已完美加载 我可以在调试器
  • 如何解密从 Soap UI 5.0.0 中的 WSO2 安全代理服务接收的消息

    我正在尝试调用 WSO2 ESB 中的安全代理服务 我跟着这个tutorial http tryitnw blogspot com 2013 07 invoking secured esb proxy service html 我已成功调用