xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 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 | </features> |
| 238 | <server> |
| 239 | http |
| 240 | </server> |
| 241 | <tool> |
| 242 | libauthretry |
| 243 | </tool> |
| 244 | |
| 245 | <name> |
| 246 | HTTP authorization retry (Digest switching to NTLM) |
| 247 | </name> |
| 248 | <command> |
| 249 | http://%HOSTIP:%HTTPPORT/%TESTNUMBER digest ntlm |
| 250 | </command> |
| 251 | </client> |
| 252 | |
| 253 | # Verify data after the test has been "shot" |
| 254 | <verify> |
| 255 | <protocol> |
| 256 | GET /%TESTNUMBER0100 HTTP/1.1
|
| 257 | Host: %HOSTIP:%HTTPPORT
|
| 258 | Accept: */*
|
| 259 |
|
| 260 | GET /%TESTNUMBER0100 HTTP/1.1
|
| 261 | Host: %HOSTIP:%HTTPPORT
|
| 262 | Authorization: Digest username="testuser", realm="testrealm", nonce="1", uri="/%TESTNUMBER0100", response="53c80666f5e3a4a55f92a66aaf0078bb"
|
| 263 | Accept: */*
|
| 264 |
|
| 265 | GET /%TESTNUMBER0200 HTTP/1.1
|
| 266 | Host: %HOSTIP:%HTTPPORT
|
| 267 | Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
|
| 268 | Accept: */*
|
| 269 |
|
| 270 | GET /%TESTNUMBER0200 HTTP/1.1
|
| 271 | Host: %HOSTIP:%HTTPPORT
|
| 272 | Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoABAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyV09SS1NUQVRJT04=
|
| 273 | Accept: */*
|
| 274 |
|
| 275 | GET /%TESTNUMBER0300 HTTP/1.1
|
| 276 | Host: %HOSTIP:%HTTPPORT
|
| 277 | Accept: */*
|
| 278 |
|
| 279 | GET /%TESTNUMBER0300 HTTP/1.1
|
| 280 | Host: %HOSTIP:%HTTPPORT
|
| 281 | Authorization: Digest username="testuser", realm="testrealm", nonce="4", uri="/%TESTNUMBER0300", response="1aa5d90da9803ca12d04b24e0f19476e"
|
| 282 | Accept: */*
|
| 283 |
|
| 284 | GET /%TESTNUMBER0400 HTTP/1.1
|
| 285 | Host: %HOSTIP:%HTTPPORT
|
| 286 | Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
|
| 287 | Accept: */*
|
| 288 |
|
| 289 | GET /%TESTNUMBER0400 HTTP/1.1
|
| 290 | Host: %HOSTIP:%HTTPPORT
|
| 291 | Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyV09SS1NUQVRJT04=
|
| 292 | Accept: */*
|
| 293 |
|
| 294 | GET /%TESTNUMBER0500 HTTP/1.1
|
| 295 | Host: %HOSTIP:%HTTPPORT
|
| 296 | Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
|
| 297 | Accept: */*
|
| 298 |
|
| 299 | GET /%TESTNUMBER0500 HTTP/1.1
|
| 300 | Host: %HOSTIP:%HTTPPORT
|
| 301 | Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoABAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyV09SS1NUQVRJT04=
|
| 302 | Accept: */*
|
| 303 |
|
| 304 | </protocol> |
| 305 | </verify> |
| 306 | </testcase> |