簡體   English   中英

Secure Webservice(NTLM) - Jmeter

[英]Secure Webservice (NTLM) - Jmeter

我正在嘗試使用Jmeter測試Web服務。 Web服務受NTLM身份驗證(windows)保護。我可以使用WebService(SOAP) Request采樣器加載WSDL。 目前它只適用於我在本SO答案中提到的BurpSuit使用代理服務器(而不是SOUP UI,我使用Jmeter和BurpSuite)。

但是我不想使用代理服務器,而是想在Jmeter中使用NTLM身份驗證直接使用Web服務。我已經嘗試過使用ntlm身份驗證的HTTP Authentication Manager 但它仍然在響應中提供401 Authorization Required

謝謝您的幫助。

取樣器結果。

Thread Name: WebSVC 1-1
Sample Start: 2010-06-28 13:54:08 IST
Load time: 752
Latency: 0
Size in bytes: 401
Sample Count: 1
Error Count: 0
Response code: 200
Response message: OK

Response headers:
Date=Mon, 28 Jun 2010 08:24:08 GMT
Server=Apache/2.2.9 (Unix) DAV/2 mod_jk/1.2.26
Connection=close
WWW-Authenticate=NTLM


SampleResult fields:
ContentType: text/html; charset=iso-8859-1
DataEncoding: iso-8859-1

和回應

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>401 Authorization Required</title>
</head><body>
<h1>Authorization Required</h1>
<p>This server could not verify that you
are authorized to access the document
requested.  Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn't understand how to supply
the credentials required.</p>
</body></html>

我設法使用SOAP/XML-RPC Request Sampler並啟用了Use keepAlive選項(Ofcourse借助HTTP Authentication Manager

您可以將安全參數添加到標頭中。

 <soapenv:Header>  <wsse:Security soapenv:mustUnderstand="1" 
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> 
         <wsse:UsernameToken> 
            <wsse:Username>USERNAME_PARAM</wsse:Username> 
            <wsse:Password 
Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">PASSWORD_PARAM</wsse:Password> 
         </wsse:UsernameToken> 
      </wsse:Security> 

在HTTP授權管理器中,您是否為“基本URL”字段提供值?
如果是,請使用以下格式: https :// $ {soap_domain}(請注意安全的http)。

我的授權失敗問題困擾了我一段時間,但發現一個快速的解決方法是將基本URL字段留空並僅提供用戶名和密碼。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM