简体   繁体   English

Jmeter 使用 wsHttpBinding 和 TransportWithMessageCredential 针对 WCF 服务进行负载测试

[英]Jmeter load tests against WCF service with wsHttpBinding and TransportWithMessageCredential

I have a few WCF Services with wsHttpBinding with TransportWithMessageCredential security.我有一些带有 wsHttpBinding 和 TransportWithMessageCredential 安全性的 WCF 服务。 Windows credentials must be provided on each request and therefore are used for authentication (by design by AD), authorization (with AD by AZman) and to identity the user who performed the action (auditory purposes). Windows 凭据必须在每个请求中提供,因此用于身份验证(由 AD 设计)、授权(由 AZman 使用 AD)和识别执行操作的用户(听觉目的)。

The thing is now I need to perform some load tests on these services, using Jmeter, and I'm strugling how can I authenticate the user for each request, I was wondering if anyone had ever mede this?现在的问题是我需要使用 Jmeter 对这些服务执行一些负载测试,我正在努力如何为每个请求对用户进行身份验证,我想知道是否有人曾经做过这个?

I really need to test with this security concern because the authentication and authorization processes are part of the load tests itself.我真的需要测试这个安全问题,因为身份验证和授权过程是负载测试本身的一部分。 I could remove them but then the load tests wouldn't be accurate.我可以删除它们,但负载测试将不准确。

The solutions I have in my mind are:我想到的解决方案是:

  1. Ensure this is possible to achieve via JMeter确保这可以通过 JMeter 实现
  2. Create a WCF Routing Service on top of these services, exposed as basicHttpsBinding which then routes the requests to appropriate destination service, performing impersonation (seems to be a choise but it is not the original test case as well)在这些服务之上创建一个 WCF 路由服务,暴露为 basicHttpsBinding,然后将请求路由到适当的目标服务,执行模拟(似乎是一个选择,但它也不是原始测试用例)
  3. Remove security for load test purposes, but then a part of the tests would be removed as well (along with security)出于负载测试目的删除安全性,但随后也会删除一部分测试(连同安全性)

Out of box JMeter doesn't support any SOAP security implementations so you might want to use ie WS Security for SOAP plugin开箱即用 JMeter 不支持任何 SOAP 安全实现,因此您可能希望使用WS Security for SOAP插件

You should be able to provide your Windows credentials via SOAP Message UsernameToken您应该能够通过SOAP Message UsernameToken提供您的 Windows 凭据

在此处输入图像描述

and the plugin will generate the relevant wsse:Username token并且插件将生成相关的wsse:Username 令牌

More information: Running SOAP WS-Security Load Tests in JMeter更多信息: 在 JMeter 中运行 SOAP WS-Security 负载测试

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

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