简体   繁体   中英

Jmeter Integrated Windows Authentication (NTLM)

I am a rookie when it comes to Jmeter and I am struggling to get a HTTP Request to run successfully (even for 1 iteration).

The Site being tested is an Intranet site used by staff. In terms of accessing via any browser, the homepage loads (having authenticated me as a user through my Domain Login/Password - through logging in to my laptop). From what I can gather from tools such as FIDDLER:

  • GET request to the server sent, Server response is 401 unauthorized (WWW-Authenticate: Negotiate)
  • GET REQUEST header sent back with Authorization: Negotiate HASH, Server response is 401 Unauthorized with a different WWW-Authenticate: Negotiate HASH
  • GET REQUEST sent back with same Authorization: Negotiate HASH as received in previous SERVER response. Server responds with HTTP 200.

I am struggling to get the above working in JMETER. I have tried by capturing the output from Blazemeter Chrome plugin and saving as .jmx file but replaying this results in

div id="header">h1> Server Error

h2>401 - Unauthorized: Access is denied due to invalid credentials . h3> You do not have permission to view this directory or page using the credentials that you supplied .

Any ideas as to how I should go about getting this to work would be greatly appreciated.........

JMeter comes with HTTP Authorization Manager which you can use to bypass NTLM authentication challenge. Just add it to your Test Plan and provide the following values:

  • Username: your Windows domain user name
  • Password: your Windows domain password
  • Domain: your Windows domain
  • Mechanism: BASIC_DIGEST

The HTTP Authorization Manager should automatically handle auth flow. See Windows Authentication with Apache JMeter article for more details if required.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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