test2031 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP NTLM auth
  7. </keywords>
  8. </info>
  9. # Server-side
  10. <reply>
  11. <!-- First request has NTLM auth, wrong password -->
  12. <data100>
  13. HTTP/1.1 401 Need NTLM auth
  14. Server: Microsoft-IIS/5.0
  15. Content-Type: text/html; charset=iso-8859-1
  16. Content-Length: 27
  17. WWW-Authenticate: NTLM
  18. This is not the real page!
  19. </data100>
  20. <data1101>
  21. HTTP/1.1 401 NTLM intermediate
  22. Server: Microsoft-IIS/5.0
  23. Content-Type: text/html; charset=iso-8859-1
  24. Content-Length: 33
  25. WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAACGgAEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
  26. This is still not the real page!
  27. </data1101>
  28. <data1102>
  29. HTTP/1.1 401 Sorry wrong password
  30. Server: Microsoft-IIS/5.0
  31. Content-Type: text/html; charset=iso-8859-1
  32. Content-Length: 29
  33. WWW-Authenticate: NTLM
  34. This is a bad password page!
  35. </data1102>
  36. <!-- Second request has NTLM auth, right password -->
  37. <data200>
  38. HTTP/1.1 401 Need NTLM auth (2)
  39. Server: Microsoft-IIS/5.0
  40. Content-Type: text/html; charset=iso-8859-1
  41. Content-Length: 27
  42. WWW-Authenticate: NTLM
  43. This is not the real page!
  44. </data200>
  45. <data1201>
  46. HTTP/1.1 401 NTLM intermediate (2)
  47. Server: Microsoft-IIS/5.0
  48. Content-Type: text/html; charset=iso-8859-1
  49. Content-Length: 33
  50. WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAACGgAEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
  51. This is still not the real page!
  52. </data1201>
  53. <data1202>
  54. HTTP/1.1 200 Things are fine in server land
  55. Server: Microsoft-IIS/5.0
  56. Content-Type: text/html; charset=iso-8859-1
  57. Content-Length: 32
  58. Finally, this is the real page!
  59. </data1202>
  60. <!-- Third request has NTLM auth, wrong password -->
  61. <data300>
  62. HTTP/1.1 401 Need NTLM auth (3)
  63. Server: Microsoft-IIS/5.0
  64. Content-Type: text/html; charset=iso-8859-1
  65. Content-Length: 27
  66. WWW-Authenticate: NTLM
  67. This is not the real page!
  68. </data300>
  69. <data1301>
  70. HTTP/1.1 401 NTLM intermediate (3)
  71. Server: Microsoft-IIS/5.0
  72. Content-Type: text/html; charset=iso-8859-1
  73. Content-Length: 33
  74. WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAACGgAEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
  75. This is still not the real page!
  76. </data1301>
  77. <data1302>
  78. HTTP/1.1 401 Sorry wrong password (2)
  79. Server: Microsoft-IIS/5.0
  80. Content-Type: text/html; charset=iso-8859-1
  81. Content-Length: 29
  82. WWW-Authenticate: NTLM
  83. This is a bad password page!
  84. </data1302>
  85. <!-- Fourth request has NTLM auth, wrong password -->
  86. <data400>
  87. HTTP/1.1 401 Need NTLM auth (4)
  88. Server: Microsoft-IIS/5.0
  89. Content-Type: text/html; charset=iso-8859-1
  90. Content-Length: 27
  91. WWW-Authenticate: NTLM
  92. This is not the real page!
  93. </data400>
  94. <data1401>
  95. HTTP/1.1 401 NTLM intermediate (4)
  96. Server: Microsoft-IIS/5.0
  97. Content-Type: text/html; charset=iso-8859-1
  98. Content-Length: 33
  99. WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAACGgAEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
  100. This is still not the real page!
  101. </data1401>
  102. <data1402>
  103. HTTP/1.1 401 Sorry wrong password (3)
  104. Server: Microsoft-IIS/5.0
  105. Content-Type: text/html; charset=iso-8859-1
  106. Content-Length: 29
  107. WWW-Authenticate: NTLM
  108. This is a bad password page!
  109. </data1402>
  110. <!-- Fifth request has NTLM auth, right password -->
  111. <data500>
  112. HTTP/1.1 401 Need NTLM auth (5)
  113. Server: Microsoft-IIS/5.0
  114. Content-Type: text/html; charset=iso-8859-1
  115. Content-Length: 27
  116. WWW-Authenticate: NTLM
  117. This is not the real page!
  118. </data500>
  119. <data1501>
  120. HTTP/1.1 401 NTLM intermediate (5)
  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. This is still not the real page!
  126. </data1501>
  127. <data1502>
  128. HTTP/1.1 200 Things are fine in server land (2)
  129. Server: Microsoft-IIS/5.0
  130. Content-Type: text/html; charset=iso-8859-1
  131. Content-Length: 32
  132. Finally, this is the real page!
  133. </data1502>
  134. <datacheck>
  135. HTTP/1.1 401 NTLM intermediate
  136. Server: Microsoft-IIS/5.0
  137. Content-Type: text/html; charset=iso-8859-1
  138. Content-Length: 33
  139. WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAACGgAEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
  140. HTTP/1.1 401 Sorry wrong password
  141. Server: Microsoft-IIS/5.0
  142. Content-Type: text/html; charset=iso-8859-1
  143. Content-Length: 29
  144. WWW-Authenticate: NTLM
  145. This is a bad password page!
  146. HTTP/1.1 401 NTLM intermediate (2)
  147. Server: Microsoft-IIS/5.0
  148. Content-Type: text/html; charset=iso-8859-1
  149. Content-Length: 33
  150. WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAACGgAEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
  151. HTTP/1.1 200 Things are fine in server land
  152. Server: Microsoft-IIS/5.0
  153. Content-Type: text/html; charset=iso-8859-1
  154. Content-Length: 32
  155. Finally, this is the real page!
  156. HTTP/1.1 401 NTLM intermediate (3)
  157. Server: Microsoft-IIS/5.0
  158. Content-Type: text/html; charset=iso-8859-1
  159. Content-Length: 33
  160. WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAACGgAEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
  161. HTTP/1.1 401 Sorry wrong password (2)
  162. Server: Microsoft-IIS/5.0
  163. Content-Type: text/html; charset=iso-8859-1
  164. Content-Length: 29
  165. WWW-Authenticate: NTLM
  166. This is a bad password page!
  167. HTTP/1.1 401 NTLM intermediate (4)
  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. This is a bad password page!
  178. HTTP/1.1 401 NTLM intermediate (5)
  179. Server: Microsoft-IIS/5.0
  180. Content-Type: text/html; charset=iso-8859-1
  181. Content-Length: 33
  182. WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAACGgAEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
  183. HTTP/1.1 200 Things are fine in server land (2)
  184. Server: Microsoft-IIS/5.0
  185. Content-Type: text/html; charset=iso-8859-1
  186. Content-Length: 32
  187. Finally, this is the real page!
  188. </datacheck>
  189. </reply>
  190. # Client-side
  191. <client>
  192. <features>
  193. NTLM
  194. SSL
  195. !SSPI
  196. </features>
  197. <server>
  198. http
  199. </server>
  200. <tool>
  201. libauthretry
  202. </tool>
  203. <name>
  204. HTTP authorization retry (NTLM)
  205. </name>
  206. <setenv>
  207. # we force our own host name, in order to make the test machine independent
  208. CURL_GETHOSTNAME=curlhost
  209. # we try to use the LD_PRELOAD hack, if not a debug build
  210. LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  211. </setenv>
  212. <command>
  213. http://%HOSTIP:%HTTPPORT/%TESTNUMBER ntlm ntlm
  214. </command>
  215. <precheck>
  216. chkhostname curlhost
  217. </precheck>
  218. </client>
  219. # Verify data after the test has been "shot"
  220. <verify>
  221. <protocol>
  222. GET /%TESTNUMBER0100 HTTP/1.1
  223. Host: %HOSTIP:%HTTPPORT
  224. Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  225. Accept: */*
  226. GET /%TESTNUMBER0100 HTTP/1.1
  227. Host: %HOSTIP:%HTTPPORT
  228. Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=
  229. Accept: */*
  230. GET /%TESTNUMBER0200 HTTP/1.1
  231. Host: %HOSTIP:%HTTPPORT
  232. Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  233. Accept: */*
  234. GET /%TESTNUMBER0200 HTTP/1.1
  235. Host: %HOSTIP:%HTTPPORT
  236. Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=
  237. Accept: */*
  238. GET /%TESTNUMBER0300 HTTP/1.1
  239. Host: %HOSTIP:%HTTPPORT
  240. Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  241. Accept: */*
  242. GET /%TESTNUMBER0300 HTTP/1.1
  243. Host: %HOSTIP:%HTTPPORT
  244. Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=
  245. Accept: */*
  246. GET /%TESTNUMBER0400 HTTP/1.1
  247. Host: %HOSTIP:%HTTPPORT
  248. Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  249. Accept: */*
  250. GET /%TESTNUMBER0400 HTTP/1.1
  251. Host: %HOSTIP:%HTTPPORT
  252. Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=
  253. Accept: */*
  254. GET /%TESTNUMBER0500 HTTP/1.1
  255. Host: %HOSTIP:%HTTPPORT
  256. Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  257. Accept: */*
  258. GET /%TESTNUMBER0500 HTTP/1.1
  259. Host: %HOSTIP:%HTTPPORT
  260. Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=
  261. Accept: */*
  262. </protocol>
  263. </verify>
  264. </testcase>