简体   繁体   English

Jmeter HTTP请求在NTLM身份验证后保持循环循环重定向

[英]Jmeter HTTP Request keep redirecting in circular loop after NTLM authentication

I'm relatively new to JMeter. 我是JMeter的新手。 I am tring to get Jmeter HTTP Sampler to land on a secured webpage that developed using Drupal 8. I think it requires NTLM authentication, so I used the HTTP Authorization Manager to pass credentials as specified in the BlazeMeter guide 我打算让Jmeter HTTP Sampler登陆使用Drupal 8开发的安全网页。我认为它需要NTLM身份验证,因此我使用了HTTP Authorization Manager来传递BlazeMeter指南中指定的凭据。

My Authorization Manager has the following values: 我的授权管理器具有以下值:

Base URL: https:// [test site]
Username: [my user name]
Password: [my password]
Domain: my domain
Mechanism: BASIC_DIGEST

From the jmeter log, I can see that I got authenticated. 从jmeter日志中,我可以看到我已通过身份验证。

2019-08-16 14:21:08,975 DEBUG oahieMainClientExec: Connection can be kept alive indefinitely 2019-08-16 14:21:08,975 DEBUG oahiaHttpAuthenticator: Authentication succeeded 2019-08-16 14:21:08,976 DEBUG oahcpResponseProcessCookies: Cookie spec not specified in HTTP context 2019-08-16 14:21:08,975 DEBUG oahieMainClientExec:可以无限期保持连接2019-08-16 14:21:08,975 DEBUG oahiaHttpAuthenticator:身份验证成功2019-08-16 14:21:08,976 DEBUG oahcpResponseProcessCookies:Cookie规范不在HTTP上下文中指定

========================= ========================

However, I didn't get redirect to the secured webpage. 但是,我没有重定向到受保护的网页。 Instead, it redirects me to my homepage URL, then it redirects me to another url with double encoding, then it redirect me back to my homepage url and keep redirecting in a loop. 相反,它会将我重定向到我的主页URL,然后将我重定向到具有双重编码的另一个URL,然后将我重定向回到我的主页URL,并保持循环重定向。 Then the request error out after 20 re-directs. 然后,在20次重定向后,请求错误消失了。

We are not too sure why it happens. 我们不太确定为什么会这样。 We are not too sure if this relate to cookie and we already add HTTP Cookie Manager to the Jmeter Thread Group. 我们不太确定这是否与Cookie有关,我们已经将HTTP Cookie Manager添加到Jmeter线程组中。

Also, if I copy the URL from jmeter that has the authentication credential where it redirect to, and paste on the IE browser, and I am able to lauch the site. 另外,如果我从jmeter复制具有重定向到的身份验证凭据的URL,然后将其粘贴到IE浏览器中,那么我就可以对网站进行排版。 It is only issue in Jmeter. 这仅在Jmeter中存在。

Thank you for any input! 谢谢您的投入!

  1. Try configuring the HTTP Cookie Manager 's "Policy" to something less restrictive, ie Netscape 尝试将HTTP Cookie Manager的“策略”配置为限制较少的内容,即Netscape

    在此处输入图片说明

  2. Try adding the next line to user.properties file: 尝试将下一行添加到user.properties文件:

     CookieManager.check.cookies=false 

    Check out HTTP Cookie Manager Advanced Usage - A Guide for more information 查看HTTP Cookie Manager高级用法-有关更多信息的指南

  3. If nothing helps you can always extract necessary cookie(s) from the Set-Cookie header using Regular Expression Extractor and add them to the HTTP Cookie Manager manually. 如果没有帮助,您始终可以使用正则表达式提取器Set-Cookie标头中提取必要的cookie,然后将其手动添加到HTTP Cookie Manager。

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

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