test2025 6.5 KB

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