test2028 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP Digest auth
  7. HTTP NTLM auth
  8. NTLM
  9. </keywords>
  10. </info>
  11. # Server-side
  12. <reply>
  13. <!-- Alternate the order that Digest and NTLM headers appear in responses to
  14. ensure that the order doesn't matter. -->
  15. <!-- First request has Digest auth, wrong password -->
  16. <data100>
  17. HTTP/1.1 401 Need Digest or NTLM auth
  18. Server: Microsoft-IIS/5.0
  19. Content-Type: text/html; charset=iso-8859-1
  20. Content-Length: 27
  21. WWW-Authenticate: NTLM
  22. WWW-Authenticate: Digest realm="testrealm", nonce="1"
  23. This is not the real page!
  24. </data100>
  25. <data1100>
  26. HTTP/1.1 401 Sorry wrong password
  27. Server: Microsoft-IIS/5.0
  28. Content-Type: text/html; charset=iso-8859-1
  29. Content-Length: 29
  30. WWW-Authenticate: Digest realm="testrealm", nonce="2"
  31. WWW-Authenticate: NTLM
  32. This is a bad password page!
  33. </data1100>
  34. <!-- Second request has NTLM auth, right password -->
  35. <data200>
  36. HTTP/1.1 401 Need Digest or NTLM auth (2)
  37. Server: Microsoft-IIS/5.0
  38. Content-Type: text/html; charset=iso-8859-1
  39. Content-Length: 27
  40. WWW-Authenticate: NTLM
  41. WWW-Authenticate: Digest realm="testrealm", nonce="3"
  42. This is not the real page!
  43. </data200>
  44. <data1201>
  45. HTTP/1.1 401 NTLM intermediate
  46. Server: Microsoft-IIS/5.0
  47. Content-Type: text/html; charset=iso-8859-1
  48. Content-Length: 33
  49. WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAACGgAEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
  50. This is still not the real page!
  51. </data1201>
  52. <data1202>
  53. HTTP/1.1 200 Things are fine in server land
  54. Server: Microsoft-IIS/5.0
  55. Content-Type: text/html; charset=iso-8859-1
  56. Content-Length: 32
  57. Finally, this is the real page!
  58. </data1202>
  59. <!-- Third request has Digest auth, wrong password -->
  60. <data300>
  61. HTTP/1.1 401 Need Digest or NTLM auth (3)
  62. Server: Microsoft-IIS/5.0
  63. Content-Type: text/html; charset=iso-8859-1
  64. Content-Length: 27
  65. WWW-Authenticate: Digest realm="testrealm", nonce="4"
  66. WWW-Authenticate: NTLM
  67. This is not the real page!
  68. </data300>
  69. <data1300>
  70. HTTP/1.1 401 Sorry wrong password (2)
  71. Server: Microsoft-IIS/5.0
  72. Content-Type: text/html; charset=iso-8859-1
  73. Content-Length: 29
  74. WWW-Authenticate: NTLM
  75. WWW-Authenticate: Digest realm="testrealm", nonce="5"
  76. This is a bad password page!
  77. </data1300>
  78. <!-- Fourth request has NTLM auth, wrong password -->
  79. <data400>
  80. HTTP/1.1 401 Need Digest or NTLM auth (4)
  81. Server: Microsoft-IIS/5.0
  82. Content-Type: text/html; charset=iso-8859-1
  83. Content-Length: 27
  84. WWW-Authenticate: Digest realm="testrealm", nonce="6"
  85. WWW-Authenticate: NTLM
  86. This is not the real page!
  87. </data400>
  88. <data1401>
  89. HTTP/1.1 401 NTLM intermediate (2)
  90. Server: Microsoft-IIS/5.0
  91. Content-Type: text/html; charset=iso-8859-1
  92. Content-Length: 33
  93. WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAACGgAEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
  94. This is still not the real page!
  95. </data1401>
  96. <data1402>
  97. HTTP/1.1 401 Sorry wrong password (3)
  98. Server: Microsoft-IIS/5.0
  99. Content-Type: text/html; charset=iso-8859-1
  100. Content-Length: 29
  101. WWW-Authenticate: NTLM
  102. WWW-Authenticate: Digest realm="testrealm", nonce="7"
  103. This is a bad password page!
  104. </data1402>
  105. <!-- Fifth request has NTLM auth, right password -->
  106. <data500>
  107. HTTP/1.1 401 Need Digest or NTLM auth (5)
  108. Server: Microsoft-IIS/5.0
  109. Content-Type: text/html; charset=iso-8859-1
  110. Content-Length: 27
  111. WWW-Authenticate: Digest realm="testrealm", nonce="8"
  112. WWW-Authenticate: NTLM
  113. This is not the real page!
  114. </data500>
  115. <data1501>
  116. HTTP/1.1 401 NTLM intermediate (3)
  117. Server: Microsoft-IIS/5.0
  118. Content-Type: text/html; charset=iso-8859-1
  119. Content-Length: 33
  120. WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAACGgAEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
  121. This is still not the real page!
  122. </data1501>
  123. <data1502>
  124. HTTP/1.1 200 Things are fine in server land (2)
  125. Server: Microsoft-IIS/5.0
  126. Content-Type: text/html; charset=iso-8859-1
  127. Content-Length: 32
  128. Finally, this is the real page!
  129. </data1502>
  130. <datacheck>
  131. HTTP/1.1 401 Need Digest or NTLM auth
  132. Server: Microsoft-IIS/5.0
  133. Content-Type: text/html; charset=iso-8859-1
  134. Content-Length: 27
  135. WWW-Authenticate: NTLM
  136. WWW-Authenticate: Digest realm="testrealm", nonce="1"
  137. HTTP/1.1 401 Sorry wrong password
  138. Server: Microsoft-IIS/5.0
  139. Content-Type: text/html; charset=iso-8859-1
  140. Content-Length: 29
  141. WWW-Authenticate: Digest realm="testrealm", nonce="2"
  142. WWW-Authenticate: NTLM
  143. This is a bad password page!
  144. HTTP/1.1 401 NTLM intermediate
  145. Server: Microsoft-IIS/5.0
  146. Content-Type: text/html; charset=iso-8859-1
  147. Content-Length: 33
  148. WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAACGgAEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
  149. HTTP/1.1 200 Things are fine in server land
  150. Server: Microsoft-IIS/5.0
  151. Content-Type: text/html; charset=iso-8859-1
  152. Content-Length: 32
  153. Finally, this is the real page!
  154. HTTP/1.1 401 Need Digest or NTLM auth (3)
  155. Server: Microsoft-IIS/5.0
  156. Content-Type: text/html; charset=iso-8859-1
  157. Content-Length: 27
  158. WWW-Authenticate: Digest realm="testrealm", nonce="4"
  159. WWW-Authenticate: NTLM
  160. HTTP/1.1 401 Sorry wrong password (2)
  161. Server: Microsoft-IIS/5.0
  162. Content-Type: text/html; charset=iso-8859-1
  163. Content-Length: 29
  164. WWW-Authenticate: NTLM
  165. WWW-Authenticate: Digest realm="testrealm", nonce="5"
  166. This is a bad password page!
  167. HTTP/1.1 401 NTLM intermediate (2)
  168. Server: Microsoft-IIS/5.0
  169. Content-Type: text/html; charset=iso-8859-1
  170. Content-Length: 33
  171. WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAACGgAEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
  172. HTTP/1.1 401 Sorry wrong password (3)
  173. Server: Microsoft-IIS/5.0
  174. Content-Type: text/html; charset=iso-8859-1
  175. Content-Length: 29
  176. WWW-Authenticate: NTLM
  177. WWW-Authenticate: Digest realm="testrealm", nonce="7"
  178. This is a bad password page!
  179. HTTP/1.1 401 NTLM intermediate (3)
  180. Server: Microsoft-IIS/5.0
  181. Content-Type: text/html; charset=iso-8859-1
  182. Content-Length: 33
  183. WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAACGgAEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
  184. HTTP/1.1 200 Things are fine in server land (2)
  185. Server: Microsoft-IIS/5.0
  186. Content-Type: text/html; charset=iso-8859-1
  187. Content-Length: 32
  188. Finally, this is the real page!
  189. </datacheck>
  190. </reply>
  191. # Client-side
  192. <client>
  193. <features>
  194. NTLM
  195. SSL
  196. !SSPI
  197. </features>
  198. <server>
  199. http
  200. </server>
  201. <tool>
  202. libauthretry
  203. </tool>
  204. <name>
  205. HTTP authorization retry (Digest switching to NTLM)
  206. </name>
  207. <command>
  208. http://%HOSTIP:%HTTPPORT/%TESTNUMBER digest ntlm
  209. </command>
  210. </client>
  211. # Verify data after the test has been "shot"
  212. <verify>
  213. <protocol>
  214. GET /%TESTNUMBER0100 HTTP/1.1
  215. Host: %HOSTIP:%HTTPPORT
  216. Accept: */*
  217. GET /%TESTNUMBER0100 HTTP/1.1
  218. Host: %HOSTIP:%HTTPPORT
  219. Authorization: Digest username="testuser", realm="testrealm", nonce="1", uri="/%TESTNUMBER0100", response="53c80666f5e3a4a55f92a66aaf0078bb"
  220. Accept: */*
  221. GET /%TESTNUMBER0200 HTTP/1.1
  222. Host: %HOSTIP:%HTTPPORT
  223. Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  224. Accept: */*
  225. GET /%TESTNUMBER0200 HTTP/1.1
  226. Host: %HOSTIP:%HTTPPORT
  227. Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoABAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyV09SS1NUQVRJT04=
  228. Accept: */*
  229. GET /%TESTNUMBER0300 HTTP/1.1
  230. Host: %HOSTIP:%HTTPPORT
  231. Accept: */*
  232. GET /%TESTNUMBER0300 HTTP/1.1
  233. Host: %HOSTIP:%HTTPPORT
  234. Authorization: Digest username="testuser", realm="testrealm", nonce="4", uri="/%TESTNUMBER0300", response="1aa5d90da9803ca12d04b24e0f19476e"
  235. Accept: */*
  236. GET /%TESTNUMBER0400 HTTP/1.1
  237. Host: %HOSTIP:%HTTPPORT
  238. Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  239. Accept: */*
  240. GET /%TESTNUMBER0400 HTTP/1.1
  241. Host: %HOSTIP:%HTTPPORT
  242. Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyV09SS1NUQVRJT04=
  243. Accept: */*
  244. GET /%TESTNUMBER0500 HTTP/1.1
  245. Host: %HOSTIP:%HTTPPORT
  246. Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  247. Accept: */*
  248. GET /%TESTNUMBER0500 HTTP/1.1
  249. Host: %HOSTIP:%HTTPPORT
  250. Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoABAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyV09SS1NUQVRJT04=
  251. Accept: */*
  252. </protocol>
  253. </verify>
  254. </testcase>