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 Negotiate auth (stub ntlm) |
| 7 | </keywords> |
| 8 | </info> |
| 9 | # Server-side |
| 10 | <reply> |
| 11 | <!-- First request, expect 401 (ntlm challenge) --> |
| 12 | <data1> |
| 13 | HTTP/1.1 401 Authorization Required |
| 14 | Server: Microsoft-IIS/7.0 |
| 15 | Content-Type: text/html; charset=iso-8859-1 |
| 16 | WWW-Authenticate: Negotiate Qw== |
| 17 | Content-Length: 19 |
| 18 | |
| 19 | Still not yet sir! |
| 20 | </data1> |
| 21 | <!-- Second request, expect success --> |
| 22 | <data2> |
| 23 | HTTP/1.1 200 Things are fine in server land |
| 24 | Server: Microsoft-IIS/7.0 |
| 25 | Content-Type: text/html; charset=iso-8859-1 |
| 26 | WWW-Authenticate: Negotiate RA== |
| 27 | Content-Length: 15 |
| 28 | |
| 29 | Nice auth sir! |
| 30 | </data2> |
| 31 | <datacheck> |
| 32 | HTTP/1.1 401 Authorization Required |
| 33 | Server: Microsoft-IIS/7.0 |
| 34 | Content-Type: text/html; charset=iso-8859-1 |
| 35 | WWW-Authenticate: Negotiate Qw== |
| 36 | Content-Length: 19 |
| 37 | |
| 38 | HTTP/1.1 200 Things are fine in server land |
| 39 | Server: Microsoft-IIS/7.0 |
| 40 | Content-Type: text/html; charset=iso-8859-1 |
| 41 | WWW-Authenticate: Negotiate RA== |
| 42 | Content-Length: 15 |
| 43 | |
| 44 | Nice auth sir! |
| 45 | </datacheck> |
| 46 | </reply> |
| 47 | |
| 48 | # Client-side |
| 49 | <client> |
| 50 | <server> |
| 51 | http |
| 52 | </server> |
| 53 | <name> |
| 54 | HTTP Negotiate authentication (stub ntlm) |
| 55 | </name> |
| 56 | <features> |
| 57 | GSS-API |
| 58 | ld_preload |
| 59 | !debug |
| 60 | </features> |
| 61 | <setenv> |
| 62 | LD_PRELOAD=%PWD/libtest/.libs/libstubgss.so |
| 63 | CURL_STUB_GSS_CREDS="NTLM_Alice" |
| 64 | </setenv> |
| 65 | <command> |
| 66 | -u: --negotiate http://%HOSTIP:%HTTPPORT/%TESTNUMBER |
| 67 | </command> |
| 68 | </client> |
| 69 | |
| 70 | # Verify data after the test has been "shot" |
| 71 | <verify> |
| 72 | <protocol> |
| 73 | GET /%TESTNUMBER HTTP/1.1
|
| 74 | Host: %HOSTIP:%HTTPPORT
|
| 75 | Authorization: Negotiate Ik5UTE1fQWxpY2UiOkhUVFBAMTI3LjAuMC4xOjI6QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQQ==
|
| 76 | User-Agent: curl/%VERSION
|
| 77 | Accept: */*
|
| 78 |
|
| 79 | GET /%TESTNUMBER HTTP/1.1
|
| 80 | Host: %HOSTIP:%HTTPPORT
|
| 81 | Authorization: Negotiate Ik5UTE1fQWxpY2UiOkhUVFBAMTI3LjAuMC4xOjM6QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQQ==
|
| 82 | User-Agent: curl/%VERSION
|
| 83 | Accept: */*
|
| 84 |
|
| 85 | </protocol> |
| 86 | </verify> |
| 87 | </testcase> |