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 proxy |
| 7 | HTTP proxy NTLM auth |
| 8 | HTTP Digest auth |
| 9 | NTLM |
| 10 | </keywords> |
| 11 | </info> |
| 12 | |
| 13 | # Server-side |
| 14 | <reply> |
| 15 | |
| 16 | # this is returned first since we get no proxy-auth |
| 17 | <data> |
| 18 | HTTP/1.1 407 Authorization Required to proxy me my dear swsclose
|
| 19 | Proxy-Authenticate: NTLM
|
| 20 |
|
| 21 | And you should ignore this data. |
| 22 | </data> |
| 23 | |
| 24 | # then this is returned since we get no server-auth |
| 25 | <data1000> |
| 26 | HTTP/1.1 200 Authorizated fine
|
| 27 | Content-Length: 27
|
| 28 |
|
| 29 | Welcome to the end station |
| 30 | </data1000> |
| 31 | |
| 32 | <data1001> |
| 33 | HTTP/1.1 407 NTLM type-1 received sending back type-2
|
| 34 | Server: Microsoft-IIS/5.0
|
| 35 | Content-Length: 34
|
| 36 | Content-Type: text/html; charset=iso-8859-1
|
| 37 | Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
|
| 38 |
|
| 39 | This is not the real page either! |
| 40 | </data1001> |
| 41 | |
| 42 | # This is supposed to be returned when the server gets the second |
| 43 | # Authorization: NTLM line passed-in from the client |
| 44 | <data1002> |
| 45 | HTTP/1.1 401 You now need to authenticate with the host
|
| 46 | Server: Microsoft-IIS/5.0
|
| 47 | WWW-Authenticate: Digest realm="r e a l m", nonce="abcdef"
|
| 48 | Content-Length: 46
|
| 49 | Content-Type: text/html; charset=iso-8859-1
|
| 50 |
|
| 51 | We have not authenticated with the server yet |
| 52 | </data1002> |
| 53 | |
| 54 | <datacheck> |
| 55 | HTTP/1.1 407 NTLM type-1 received sending back type-2
|
| 56 | Server: Microsoft-IIS/5.0
|
| 57 | Content-Length: 34
|
| 58 | Content-Type: text/html; charset=iso-8859-1
|
| 59 | Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
|
| 60 |
|
| 61 | HTTP/1.1 401 You now need to authenticate with the host
|
| 62 | Server: Microsoft-IIS/5.0
|
| 63 | WWW-Authenticate: Digest realm="r e a l m", nonce="abcdef"
|
| 64 | Content-Length: 46
|
| 65 | Content-Type: text/html; charset=iso-8859-1
|
| 66 |
|
| 67 | HTTP/1.1 200 Authorizated fine
|
| 68 | Content-Length: 27
|
| 69 |
|
| 70 | Welcome to the end station |
| 71 | </datacheck> |
| 72 | </reply> |
| 73 | |
| 74 | # Client-side |
| 75 | <client> |
| 76 | <server> |
| 77 | http |
| 78 | </server> |
| 79 | <features> |
| 80 | NTLM |
| 81 | SSL |
| 82 | !SSPI |
| 83 | proxy |
| 84 | </features> |
| 85 | <name> |
| 86 | HTTP with proxy-requiring-NTLM to site-requiring-Digest |
| 87 | </name> |
| 88 | <command> |
| 89 | http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --digest --user digest:alot |
| 90 | </command> |
| 91 | </client> |
| 92 | |
| 93 | # Verify data after the test has been "shot" |
| 94 | <verify> |
| 95 | <protocol> |
| 96 | GET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1
|
| 97 | Host: data.from.server.requiring.digest.hohoho.com
|
| 98 | Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
|
| 99 | User-Agent: curl/%VERSION
|
| 100 | Accept: */*
|
| 101 | Proxy-Connection: Keep-Alive
|
| 102 |
|
| 103 | GET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1
|
| 104 | Host: data.from.server.requiring.digest.hohoho.com
|
| 105 | Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
|
| 106 | User-Agent: curl/%VERSION
|
| 107 | Accept: */*
|
| 108 | Proxy-Connection: Keep-Alive
|
| 109 |
|
| 110 | GET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1
|
| 111 | Host: data.from.server.requiring.digest.hohoho.com
|
| 112 | Authorization: Digest username="digest", realm="r e a l m", nonce="abcdef", uri="/%TESTNUMBER", response="95d48591985a03c4b49cb962aa7bd3e6"
|
| 113 | User-Agent: curl/%VERSION
|
| 114 | Accept: */*
|
| 115 | Proxy-Connection: Keep-Alive
|
| 116 |
|
| 117 | </protocol> |
| 118 | </verify> |
| 119 | </testcase> |