Jmeter Secure WS- 用于加密数据的安全 SOAP Web 服务
Jmeter Secure WS- Security SOAP Webservices for encrypted data
我计划使用 JMeter 对 WS-Security SOAP Web 服务进行性能测试。我观察到请求中发送的数据是使用 Apache CXF 加密的。我有什么地方可以将这些值发送到服务器并使用 Jmeter 获取值。我调查过
https://www.blazemeter.com/blog/take-pain-out-load-testing-secure-web-services
也是,但是由于"A security error was encountered when verifying the message."
我无法通过
在尝试了 Dmitri 提供的解决方案后,我发现 SOAP UI 和 JMeter 的请求存在以下差异。 Jmeter 请求中缺少以下内容,而 SOAP UI
<ds:Reference URI="#id-5082">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
<ec:InclusiveNamespaces PrefixList="ser" xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transform>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<ds:DigestValue>qSF7n7bkl2cKYVZvDwT7ur77AdSeT4/kqbdEqPfkzVA=</ds:DigestValue>
</ds:Reference>
和
<wsu:Timestamp wsu:Id="TS-5081">
<wsu:Created>2017-10-24T18:39:53.349Z</wsu:Created>
<wsu:Expires>2017-10-24T18:41:33.349Z</wsu:Expires>
</wsu:Timestamp>
对于时间戳,我手动将 wsse:Security/wsu:Timestamp 添加到请求中,如下所示
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://www.wso2.org/types">
<soapenv:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsu:Timestamp>
<wsu:Created>#CREATED#</wsu:Created>
<wsu:Expires>#EXPIRES#</wsu:Expires>
</wsu:Timestamp>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<typ:greet>
<name>Blazemeter</name>
</typ:greet>
</soapenv:Body>
</soapenv:Envelope>
但我仍然面临同样的问题。
Jmeter system.properties 文件已更新以包含密钥库信息。
在 HTTP 请求采样器下,我看到
响应代码:500
响应消息:
在 Jmeter 日志中也没有看到错误。
如有任何帮助,我们将不胜感激。
Apache CXF 是一种 service framework,而不是加密方法,因此为了获得答案,您需要提供尽可能多的信息。
您还可以考虑使用 jmeter-wssecurity 采样器对您的 Web 服务端点进行负载测试,它提供了简单的 GUI,允许您选择签名算法、摘要算法、证书等,因此如果您不确定您的 Web 服务您可以使用它的安全配置。
您可以使用 JMeter Plugins Manager
作为 WS Security for SOAP
包安装插件
我计划使用 JMeter 对 WS-Security SOAP Web 服务进行性能测试。我观察到请求中发送的数据是使用 Apache CXF 加密的。我有什么地方可以将这些值发送到服务器并使用 Jmeter 获取值。我调查过 https://www.blazemeter.com/blog/take-pain-out-load-testing-secure-web-services
也是,但是由于"A security error was encountered when verifying the message."
我无法通过在尝试了 Dmitri 提供的解决方案后,我发现 SOAP UI 和 JMeter 的请求存在以下差异。 Jmeter 请求中缺少以下内容,而 SOAP UI
<ds:Reference URI="#id-5082">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
<ec:InclusiveNamespaces PrefixList="ser" xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transform>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<ds:DigestValue>qSF7n7bkl2cKYVZvDwT7ur77AdSeT4/kqbdEqPfkzVA=</ds:DigestValue>
</ds:Reference>
和
<wsu:Timestamp wsu:Id="TS-5081">
<wsu:Created>2017-10-24T18:39:53.349Z</wsu:Created>
<wsu:Expires>2017-10-24T18:41:33.349Z</wsu:Expires>
</wsu:Timestamp>
对于时间戳,我手动将 wsse:Security/wsu:Timestamp 添加到请求中,如下所示
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://www.wso2.org/types">
<soapenv:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsu:Timestamp>
<wsu:Created>#CREATED#</wsu:Created>
<wsu:Expires>#EXPIRES#</wsu:Expires>
</wsu:Timestamp>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<typ:greet>
<name>Blazemeter</name>
</typ:greet>
</soapenv:Body>
</soapenv:Envelope>
但我仍然面临同样的问题。 Jmeter system.properties 文件已更新以包含密钥库信息。 在 HTTP 请求采样器下,我看到 响应代码:500 响应消息:
在 Jmeter 日志中也没有看到错误。
如有任何帮助,我们将不胜感激。
Apache CXF 是一种 service framework,而不是加密方法,因此为了获得答案,您需要提供尽可能多的信息。
您还可以考虑使用 jmeter-wssecurity 采样器对您的 Web 服务端点进行负载测试,它提供了简单的 GUI,允许您选择签名算法、摘要算法、证书等,因此如果您不确定您的 Web 服务您可以使用它的安全配置。
您可以使用 JMeter Plugins Manager
作为WS Security for SOAP
包安装插件