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