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 | --proxy-anyauth |
| 9 | NTLM |
| 10 | </keywords> |
| 11 | </info> |
| 12 | |
| 13 | # Server-side |
| 14 | <reply> |
| 15 | |
| 16 | <data> |
| 17 | HTTP/1.1 407 Authorization Required swsclose
|
| 18 | Server: Apache/1.3.27 (Darwin) PHP/4.1.2
|
| 19 | Proxy-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
|
| 20 | Proxy-Authenticate: Basic realm="gimme all yer s3cr3ts"
|
| 21 | Proxy-Authenticate: NTLM
|
| 22 | Content-Type: text/html; charset=iso-8859-1
|
| 23 | Connection: close
|
| 24 |
|
| 25 | This is not the real page |
| 26 | </data> |
| 27 | |
| 28 | # this is returned first since we get no proxy-auth |
| 29 | <data1001> |
| 30 | HTTP/1.1 407 Authorization Required to proxy me my dear
|
| 31 | Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
|
| 32 | Content-Length: 34
|
| 33 |
|
| 34 | Hey you, authenticate or go away! |
| 35 | </data1001> |
| 36 | |
| 37 | # This is supposed to be returned when the server gets the second |
| 38 | # Authorization: NTLM line passed-in from the client |
| 39 | <data1002> |
| 40 | HTTP/1.1 200 Things are fine in proxy land swsclose
|
| 41 | Server: Microsoft-IIS/5.0
|
| 42 | Content-Type: text/html; charset=iso-8859-1
|
| 43 | Content-Length: 42
|
| 44 |
|
| 45 | Contents of that page you requested, sir. |
| 46 | </data1002> |
| 47 | |
| 48 | <datacheck> |
| 49 | HTTP/1.1 407 Authorization Required swsclose
|
| 50 | Server: Apache/1.3.27 (Darwin) PHP/4.1.2
|
| 51 | Proxy-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
|
| 52 | Proxy-Authenticate: Basic realm="gimme all yer s3cr3ts"
|
| 53 | Proxy-Authenticate: NTLM
|
| 54 | Content-Type: text/html; charset=iso-8859-1
|
| 55 | Connection: close
|
| 56 |
|
| 57 | HTTP/1.1 407 Authorization Required to proxy me my dear
|
| 58 | Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
|
| 59 | Content-Length: 34
|
| 60 |
|
| 61 | HTTP/1.1 200 Things are fine in proxy land swsclose
|
| 62 | Server: Microsoft-IIS/5.0
|
| 63 | Content-Type: text/html; charset=iso-8859-1
|
| 64 | Content-Length: 42
|
| 65 |
|
| 66 | Contents of that page you requested, sir. |
| 67 | </datacheck> |
| 68 | </reply> |
| 69 | |
| 70 | # Client-side |
| 71 | <client> |
| 72 | <server> |
| 73 | http |
| 74 | </server> |
| 75 | <features> |
| 76 | NTLM |
| 77 | SSL |
| 78 | !SSPI |
| 79 | proxy |
| 80 | </features> |
| 81 | <name> |
| 82 | HTTP POST with --proxy-anyauth, picking NTLM |
| 83 | </name> |
| 84 | <command> |
| 85 | http://%HOSTIP:%HTTPPORT/%TESTNUMBER --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-anyauth -d "postit" |
| 86 | </command> |
| 87 | </client> |
| 88 | |
| 89 | # Verify data after the test has been "shot" |
| 90 | <verify> |
| 91 | <protocol nonewline="yes"> |
| 92 | POST http://%HOSTIP:%HTTPPORT/%TESTNUMBER HTTP/1.1
|
| 93 | Host: %HOSTIP:%HTTPPORT
|
| 94 | User-Agent: curl/%VERSION
|
| 95 | Accept: */*
|
| 96 | Proxy-Connection: Keep-Alive
|
| 97 | Content-Length: 6
|
| 98 | Content-Type: application/x-www-form-urlencoded
|
| 99 |
|
| 100 | postitPOST http://%HOSTIP:%HTTPPORT/%TESTNUMBER HTTP/1.1
|
| 101 | Host: %HOSTIP:%HTTPPORT
|
| 102 | Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
|
| 103 | User-Agent: curl/%VERSION
|
| 104 | Accept: */*
|
| 105 | Proxy-Connection: Keep-Alive
|
| 106 | Content-Length: 0
|
| 107 | Content-Type: application/x-www-form-urlencoded
|
| 108 |
|
| 109 | POST http://%HOSTIP:%HTTPPORT/%TESTNUMBER HTTP/1.1
|
| 110 | Host: %HOSTIP:%HTTPPORT
|
| 111 | Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
|
| 112 | User-Agent: curl/%VERSION
|
| 113 | Accept: */*
|
| 114 | Proxy-Connection: Keep-Alive
|
| 115 | Content-Length: 6
|
| 116 | Content-Type: application/x-www-form-urlencoded
|
| 117 |
|
| 118 | postit |
| 119 | </protocol> |
| 120 | </verify> |
| 121 | </testcase> |