test2030 7.5 KB

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