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