test2029 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  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 NTLM auth, wrong password -->
  16. <data100>
  17. HTTP/1.1 401 Need Basic 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: Basic realm="testrealm"
  23. This is not the real page!
  24. </data100>
  25. <data1101>
  26. HTTP/1.1 401 NTLM intermediate
  27. Server: Microsoft-IIS/5.0
  28. Content-Type: text/html; charset=iso-8859-1
  29. Content-Length: 33
  30. WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAACGgAEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
  31. This is still not the real page!
  32. </data1101>
  33. <data1102>
  34. HTTP/1.1 401 Sorry wrong password
  35. Server: Microsoft-IIS/5.0
  36. Content-Type: text/html; charset=iso-8859-1
  37. Content-Length: 29
  38. WWW-Authenticate: Basic realm="testrealm"
  39. WWW-Authenticate: NTLM
  40. This is a bad password page!
  41. </data1102>
  42. <!-- Second request has Basic auth, right password -->
  43. <data200>
  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. </data200>
  50. <!-- Third request has NTLM auth, wrong password -->
  51. <data300>
  52. HTTP/1.1 401 Need Basic or NTLM auth (2)
  53. Server: Microsoft-IIS/5.0
  54. Content-Type: text/html; charset=iso-8859-1
  55. Content-Length: 27
  56. WWW-Authenticate: NTLM
  57. WWW-Authenticate: Basic realm="testrealm"
  58. This is not the real page!
  59. </data300>
  60. <data1301>
  61. HTTP/1.1 401 NTLM intermediate (2)
  62. Server: Microsoft-IIS/5.0
  63. Content-Type: text/html; charset=iso-8859-1
  64. Content-Length: 33
  65. WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAACGgAEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
  66. This is still not the real page!
  67. </data1301>
  68. <data1302>
  69. HTTP/1.1 401 Sorry wrong password (2)
  70. Server: Microsoft-IIS/5.0
  71. Content-Type: text/html; charset=iso-8859-1
  72. Content-Length: 29
  73. WWW-Authenticate: Basic realm="testrealm"
  74. WWW-Authenticate: NTLM
  75. This is a bad password page!
  76. </data1302>
  77. <!-- Fourth request has Basic auth, wrong password -->
  78. <data400>
  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. </data400>
  87. <!-- Fifth request has Basic auth, right password -->
  88. <data500>
  89. HTTP/1.1 200 Things are fine in server land (2)
  90. Server: Microsoft-IIS/5.0
  91. Content-Type: text/html; charset=iso-8859-1
  92. Content-Length: 32
  93. Finally, this is the real page!
  94. </data500>
  95. <datacheck>
  96. HTTP/1.1 401 NTLM intermediate
  97. Server: Microsoft-IIS/5.0
  98. Content-Type: text/html; charset=iso-8859-1
  99. Content-Length: 33
  100. WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAACGgAEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
  101. HTTP/1.1 401 Sorry wrong password
  102. Server: Microsoft-IIS/5.0
  103. Content-Type: text/html; charset=iso-8859-1
  104. Content-Length: 29
  105. WWW-Authenticate: Basic realm="testrealm"
  106. WWW-Authenticate: NTLM
  107. This is a bad password page!
  108. HTTP/1.1 200 Things are fine in server land
  109. Server: Microsoft-IIS/5.0
  110. Content-Type: text/html; charset=iso-8859-1
  111. Content-Length: 32
  112. Finally, this is the real page!
  113. HTTP/1.1 401 NTLM intermediate (2)
  114. Server: Microsoft-IIS/5.0
  115. Content-Type: text/html; charset=iso-8859-1
  116. Content-Length: 33
  117. WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAACGgAEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
  118. HTTP/1.1 401 Sorry wrong password (2)
  119. Server: Microsoft-IIS/5.0
  120. Content-Type: text/html; charset=iso-8859-1
  121. Content-Length: 29
  122. WWW-Authenticate: Basic realm="testrealm"
  123. WWW-Authenticate: NTLM
  124. This is a bad password page!
  125. HTTP/1.1 401 Sorry wrong password (3)
  126. Server: Microsoft-IIS/5.0
  127. Content-Type: text/html; charset=iso-8859-1
  128. Content-Length: 29
  129. WWW-Authenticate: NTLM
  130. WWW-Authenticate: Basic realm="testrealm"
  131. This is a bad password page!
  132. HTTP/1.1 200 Things are fine in server land (2)
  133. Server: Microsoft-IIS/5.0
  134. Content-Type: text/html; charset=iso-8859-1
  135. Content-Length: 32
  136. Finally, this is the real page!
  137. </datacheck>
  138. </reply>
  139. # Client-side
  140. <client>
  141. <features>
  142. NTLM
  143. SSL
  144. !SSPI
  145. </features>
  146. <server>
  147. http
  148. </server>
  149. <tool>
  150. libauthretry
  151. </tool>
  152. <name>
  153. HTTP authorization retry (NTLM switching to Basic)
  154. </name>
  155. <command>
  156. http://%HOSTIP:%HTTPPORT/%TESTNUMBER ntlm basic
  157. </command>
  158. </client>
  159. # Verify data after the test has been "shot"
  160. <verify>
  161. <protocol>
  162. GET /%TESTNUMBER0100 HTTP/1.1
  163. Host: %HOSTIP:%HTTPPORT
  164. Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  165. Accept: */*
  166. GET /%TESTNUMBER0100 HTTP/1.1
  167. Host: %HOSTIP:%HTTPPORT
  168. Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyV09SS1NUQVRJT04=
  169. Accept: */*
  170. GET /%TESTNUMBER0200 HTTP/1.1
  171. Host: %HOSTIP:%HTTPPORT
  172. Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=
  173. Accept: */*
  174. GET /%TESTNUMBER0300 HTTP/1.1
  175. Host: %HOSTIP:%HTTPPORT
  176. Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  177. Accept: */*
  178. GET /%TESTNUMBER0300 HTTP/1.1
  179. Host: %HOSTIP:%HTTPPORT
  180. Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyV09SS1NUQVRJT04=
  181. Accept: */*
  182. GET /%TESTNUMBER0400 HTTP/1.1
  183. Host: %HOSTIP:%HTTPPORT
  184. Authorization: Basic dGVzdHVzZXI6d3JvbmdwYXNz
  185. Accept: */*
  186. GET /%TESTNUMBER0500 HTTP/1.1
  187. Host: %HOSTIP:%HTTPPORT
  188. Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=
  189. Accept: */*
  190. </protocol>
  191. </verify>
  192. </testcase>