JMeter NTLM身份验证失败 [英] JMeter NTLM authentication failing
问题描述
我对JMeter相对较新,但是我很难让HTTP Sampler进入安全的网页.我认为它需要NTLM身份验证,因此我使用了HTTP授权管理器来传递
I'm relatively new to JMeter, but I am having a hard time getting an HTTP Sampler to land on a secured webpage. I think it requires NTLM authentication, so I used the HTTP Authorization Manager to pass credentials as specified in the BlazeMeter guide
我的授权管理器具有以下值:
My Authorization Manager has the following values:
- 基本URL:https://[测试站点]
- 用户名:[我的用户名]
- 密码:[我的密码]
- 域:与基本URL相同
- 机制:BASIC_DIGEST
但是,我只收到401错误(请参见下面的采样器消息)
However, I just get a 401 error (see Sampler Message below)
Thread Name: Thread Group 1-1
Sample Start: 2018-02-21 15:55:18 PST
Load time: 26
Connect Time: 0
Latency: 26
Size in bytes: 1602
Sent bytes:229
Headers size in bytes: 309
Body size in bytes: 1293
Sample Count: 1
Error Count: 1
Data type ("text"|"bin"|""): text
Response code: 401
Response message: 401
Response headers:
HTTP/1.1 401 401
Content-Type: text/html
Content-Language: en
Server: Microsoft-IIS/7.5
WWW-Authenticate: Negotiate
WWW-Authenticate: NTLM
WWW-Authenticate: Basic realm="BasicSecurityFilterProvider"
X-Powered-By: ASP.NET
Date: Wed, 21 Feb 2018 23:55:18 GMT
Connection: close
Content-Length: 1293
HTTPSampleResult fields:
ContentType: text/html
DataEncoding: iso-8859-1
我尝试了以下操作,但仍然出现401错误.有什么建议吗?
I tried the following, but still get a 401 error. Any suggestions?
- 将所有HTTP请求实现更改为HTTPClient4
- 在user.properties中设置httpclient4.auth.preemptive = true
- 启用使用KeepAlive"选项
推荐答案
按照使用Apache JMeter进行Windows身份验证指南,您应该将Domain
替换为您的基本URL,而不是Windows域名.按照参考指南:
As per Windows Authentication with Apache JMeter guide you should replace Domain
to not to be your base URL but rather Windows Domain name. As per the referenced guide:
域:应该是您在Windows安全性弹出窗口中看到的内容",因为这是真实浏览器的作用.如果不确定,可以在该字段中输入完全限定的域名.
Domain: should be "what you see in Windows Security pop-up" as this is what real browsers do. If you are uncertain you can type a fully qualified domain name into that field.
You can also figure out your domain name by running systeminfo command like:
systeminfo | find "Domain"
这篇关于JMeter NTLM身份验证失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!