82917

JMeter NTLM authentication failing

Question:

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 <a href="https://www.blazemeter.com/blog/windows-authentication-apache-jmeter" rel="nofollow">BlazeMeter guide</a>

My Authorization Manager has the following values:

<ul><li>Base URL: https:// [test site] </li> <li>Username: [my user name] </li> <li>Password: [my password] </li> <li>Domain: Same as base URL </li> <li>Mechanism: BASIC_DIGEST</li> </ul>

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

I tried the following, but still get a 401 error. Any suggestions?

<ul><li>Changing all HTTP Request implementations to HTTPClient4</li> <li>Setting httpclient4.auth.preemptive=true in the user.properties</li> <li>Enable Use KeepAlive option </li> </ul>

Answer1:

As per <a href="https://www.blazemeter.com/blog/windows-authentication-apache-jmeter" rel="nofollow">Windows Authentication with Apache JMeter</a> guide you should replace Domain to not to be your base URL but rather Windows Domain name. As per the referenced guide:

<blockquote>

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.

</blockquote>

<a href="https://i.stack.imgur.com/2k2pG.png" rel="nofollow"><img alt="JMeter Windows Domain Name" class="b-lazy" data-src="https://i.stack.imgur.com/2k2pG.png" data-original="https://i.stack.imgur.com/2k2pG.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" /></a>

You can also figure out your domain name by running <a href="https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-xp/bb491007(v=technet.10)" rel="nofollow">systeminfo</a> command like:

systeminfo | find "Domain"

Recommend

  • In an online chess game, how to minimize the effect of lag to time controls?
  • Airflow latency between tasks
  • error 204 in a Google App Engine API in java
  • Need help about sound processing
  • Can I read an iPhone beacon with Windows.Devices.Bluetooth.Advertisement.BluetoothLEManufacturerData
  • Dynamically switching connect in Modelica
  • nonblocking BIO_do_connect blocked when there is no internet connected
  • Redux Form - Not able to type anything in input
  • Get history of file changes from TFS to implement custom “blame”-behaviour of exceptions
  • Content-Length header not returned from Pylons response
  • copying resource to sdcard gives a damaged file in android
  • Spark fat jar to run multiple versions on YARN
  • Change multiple background-images with jQuery
  • NHibernate Validation Localization with S#arp Architecture
  • How can I send an e-mail from a vbs script
  • Using $this when not in object context
  • Android screen density dpi vs ppi
  • Array.prototype.includes - not transformed with babel
  • Volley JsonObjectRequest send headers in GET Request
  • Accessing IRQ description array within a module and displaying action names
  • DirectX11 ClearRenderTargetViewback with transparent buffer?
  • Does CUDA 5 support STL or THRUST inside the device code?
  • How to apply VCL Styles to DLL-based forms in Inno Setup?
  • Can a Chrome extension content script make an jQuery AJAX request for an html file that is itself a
  • Change an a tag attribute in JavaScript based on screen width
  • Build own AppleScript numerical error handling
  • Websockets service method fails during R startup
  • Google cloud sdk not working when python points python3
  • Warning: Can't call setState (or forceUpdate) on an unmounted component
  • Is there a mandatory requirement to switch app.yaml?
  • Hits per day in Google Big Query
  • FormattedException instead of throw new Exception(string.Format(…)) in .NET
  • Getting Messege Twice Using IMvxMessenger
  • Can Visual Studio XAML designer handle font family names with spaces as a resource?
  • Linking SubReports Without LinkChild/LinkMaster
  • How can I remove ASP.NET Designer.cs files?
  • Are Kotlin's Float, Int etc optimised to built-in types in the JVM? [duplicate]
  • Is it possible to post an object from jquery to bottle.py?
  • Can't mass-assign protected attributes when import data from csv file
  • XCode 8, some methods disappeared ? ex: layoutAttributesClass() -> AnyClass