quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

test2030 (7719B)


      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 <!--
     18 
     19  Explanation for the duplicate 400 requests:
     20 
     21  libcurl doesn't detect that a given Digest password is wrong already on the
     22  first 401 response (as the data400 gives). libcurl will instead consider the
     23  new response just as a duplicate and it sends another and detects the auth
     24  problem on the second 401 response!
     25 
     26 -->
     27 
     28 
     29 <!-- First request has NTLM auth, wrong password -->
     30 <data100>
     31 HTTP/1.1 401 Need Digest or NTLM auth
     32 Server: Microsoft-IIS/5.0
     33 Content-Type: text/html; charset=iso-8859-1
     34 Content-Length: 27
     35 WWW-Authenticate: NTLM
     36 WWW-Authenticate: Digest realm="testrealm", nonce="1"
     37 
     38 This is not the real page!
     39 </data100>
     40 
     41 <data1101>
     42 HTTP/1.1 401 NTLM intermediate
     43 Server: Microsoft-IIS/5.0
     44 Content-Type: text/html; charset=iso-8859-1
     45 Content-Length: 33
     46 WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAACGgAEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
     47 
     48 This is still not the real page!
     49 </data1101>
     50 
     51 <data1102>
     52 HTTP/1.1 401 Sorry wrong password
     53 Server: Microsoft-IIS/5.0
     54 Content-Type: text/html; charset=iso-8859-1
     55 Content-Length: 29
     56 WWW-Authenticate: Digest realm="testrealm", nonce="2"
     57 WWW-Authenticate: NTLM
     58 
     59 This is a bad password page!
     60 </data1102>
     61 
     62 <!-- Second request has Digest auth, right password -->
     63 <data200>
     64 HTTP/1.1 401 Need Digest or NTLM auth (2)
     65 Server: Microsoft-IIS/5.0
     66 Content-Type: text/html; charset=iso-8859-1
     67 Content-Length: 27
     68 WWW-Authenticate: NTLM
     69 WWW-Authenticate: Digest realm="testrealm", nonce="3"
     70 
     71 This is not the real page!
     72 </data200>
     73 
     74 <data1200>
     75 HTTP/1.1 200 Things are fine in server land
     76 Server: Microsoft-IIS/5.0
     77 Content-Type: text/html; charset=iso-8859-1
     78 Content-Length: 32
     79 
     80 Finally, this is the real page!
     81 </data1200>
     82 
     83 <!-- Third request has NTLM auth, wrong password -->
     84 <data300>
     85 HTTP/1.1 401 Need Digest or NTLM auth (3)
     86 Server: Microsoft-IIS/5.0
     87 Content-Type: text/html; charset=iso-8859-1
     88 Content-Length: 27
     89 WWW-Authenticate: Digest realm="testrealm", nonce="4"
     90 WWW-Authenticate: NTLM
     91 
     92 This is not the real page!
     93 </data300>
     94 
     95 <data1301>
     96 HTTP/1.1 401 NTLM intermediate (2)
     97 Server: Microsoft-IIS/5.0
     98 Content-Type: text/html; charset=iso-8859-1
     99 Content-Length: 33
    100 WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAACGgAEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
    101 
    102 This is still not the real page!
    103 </data1301>
    104 
    105 <data1302>
    106 HTTP/1.1 401 Sorry wrong password (2)
    107 Server: Microsoft-IIS/5.0
    108 Content-Type: text/html; charset=iso-8859-1
    109 Content-Length: 29
    110 WWW-Authenticate: NTLM
    111 WWW-Authenticate: Digest realm="testrealm", nonce="5"
    112 
    113 This is a bad password page!
    114 </data1302>
    115 
    116 <!-- Fourth request has Digest auth, wrong password -->
    117 <data400>
    118 HTTP/1.1 401 Need Digest or NTLM auth (4)
    119 Server: Microsoft-IIS/5.0
    120 Content-Type: text/html; charset=iso-8859-1
    121 Content-Length: 27
    122 WWW-Authenticate: Digest realm="testrealm", nonce="6"
    123 WWW-Authenticate: NTLM
    124 
    125 This is not the real page!
    126 </data400>
    127 
    128 <data1400>
    129 HTTP/1.1 401 Sorry wrong password (3)
    130 Server: Microsoft-IIS/5.0
    131 Content-Type: text/html; charset=iso-8859-1
    132 Content-Length: 29
    133 WWW-Authenticate: NTLM
    134 WWW-Authenticate: Digest realm="testrealm", nonce="7"
    135 
    136 This is a bad password page!
    137 </data1400>
    138 
    139 <!-- Fifth request has Digest auth, right password -->
    140 <data500>
    141 HTTP/1.1 401 Need Digest or NTLM auth (5)
    142 Server: Microsoft-IIS/5.0
    143 Content-Type: text/html; charset=iso-8859-1
    144 Content-Length: 27
    145 WWW-Authenticate: Digest realm="testrealm", nonce="8"
    146 WWW-Authenticate: NTLM
    147 
    148 This is not the real page!
    149 </data500>
    150 
    151 <data1500>
    152 HTTP/1.1 200 Things are fine in server land (2)
    153 Server: Microsoft-IIS/5.0
    154 Content-Type: text/html; charset=iso-8859-1
    155 Content-Length: 32
    156 
    157 Finally, this is the real page!
    158 </data1500>
    159 
    160 <datacheck>
    161 HTTP/1.1 401 NTLM intermediate
    162 Server: Microsoft-IIS/5.0
    163 Content-Type: text/html; charset=iso-8859-1
    164 Content-Length: 33
    165 WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAACGgAEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
    166 
    167 HTTP/1.1 401 Sorry wrong password
    168 Server: Microsoft-IIS/5.0
    169 Content-Type: text/html; charset=iso-8859-1
    170 Content-Length: 29
    171 WWW-Authenticate: Digest realm="testrealm", nonce="2"
    172 WWW-Authenticate: NTLM
    173 
    174 This is a bad password page!
    175 HTTP/1.1 200 Things are fine in server land
    176 Server: Microsoft-IIS/5.0
    177 Content-Type: text/html; charset=iso-8859-1
    178 Content-Length: 32
    179 
    180 Finally, this is the real page!
    181 HTTP/1.1 401 NTLM intermediate (2)
    182 Server: Microsoft-IIS/5.0
    183 Content-Type: text/html; charset=iso-8859-1
    184 Content-Length: 33
    185 WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAACGgAEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
    186 
    187 HTTP/1.1 401 Sorry wrong password (2)
    188 Server: Microsoft-IIS/5.0
    189 Content-Type: text/html; charset=iso-8859-1
    190 Content-Length: 29
    191 WWW-Authenticate: NTLM
    192 WWW-Authenticate: Digest realm="testrealm", nonce="5"
    193 
    194 This is a bad password page!
    195 HTTP/1.1 401 Sorry wrong password (3)
    196 Server: Microsoft-IIS/5.0
    197 Content-Type: text/html; charset=iso-8859-1
    198 Content-Length: 29
    199 WWW-Authenticate: NTLM
    200 WWW-Authenticate: Digest realm="testrealm", nonce="7"
    201 
    202 HTTP/1.1 401 Sorry wrong password (3)
    203 Server: Microsoft-IIS/5.0
    204 Content-Type: text/html; charset=iso-8859-1
    205 Content-Length: 29
    206 WWW-Authenticate: NTLM
    207 WWW-Authenticate: Digest realm="testrealm", nonce="7"
    208 
    209 This is a bad password page!
    210 HTTP/1.1 200 Things are fine in server land (2)
    211 Server: Microsoft-IIS/5.0
    212 Content-Type: text/html; charset=iso-8859-1
    213 Content-Length: 32
    214 
    215 Finally, this is the real page!
    216 </datacheck>
    217 
    218 </reply>
    219 
    220 # Client-side
    221 <client>
    222 <features>
    223 NTLM
    224 SSL
    225 !SSPI
    226 digest
    227 </features>
    228 <server>
    229 http
    230 </server>
    231 <tool>
    232 lib2023
    233 </tool>
    234 
    235 <name>
    236 HTTP authorization retry (NTLM switching to Digest)
    237 </name>
    238 <command>
    239 http://%HOSTIP:%HTTPPORT/%TESTNUMBER ntlm digest
    240 </command>
    241 </client>
    242 
    243 # Verify data after the test has been "shot"
    244 <verify>
    245 <protocol>
    246 GET /%TESTNUMBER0100 HTTP/1.1
    247 Host: %HOSTIP:%HTTPPORT
    248 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
    249 Accept: */*
    250 
    251 GET /%TESTNUMBER0100 HTTP/1.1
    252 Host: %HOSTIP:%HTTPPORT
    253 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyV09SS1NUQVRJT04=
    254 Accept: */*
    255 
    256 GET /%TESTNUMBER0200 HTTP/1.1
    257 Host: %HOSTIP:%HTTPPORT
    258 Authorization: Digest username="testuser", realm="testrealm", nonce="2", uri="/%TESTNUMBER0200", response="2f2d784ba53a0a307758a90e98d25c27"
    259 Accept: */*
    260 
    261 GET /%TESTNUMBER0300 HTTP/1.1
    262 Host: %HOSTIP:%HTTPPORT
    263 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
    264 Accept: */*
    265 
    266 GET /%TESTNUMBER0300 HTTP/1.1
    267 Host: %HOSTIP:%HTTPPORT
    268 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyV09SS1NUQVRJT04=
    269 Accept: */*
    270 
    271 GET /%TESTNUMBER0400 HTTP/1.1
    272 Host: %HOSTIP:%HTTPPORT
    273 Authorization: Digest username="testuser", realm="testrealm", nonce="5", uri="/%TESTNUMBER0400", response="d6262e9147db08c62ff2f53b515861e8"
    274 Accept: */*
    275 
    276 GET /%TESTNUMBER0400 HTTP/1.1
    277 Host: %HOSTIP:%HTTPPORT
    278 Authorization: Digest username="testuser", realm="testrealm", nonce="5", uri="/%TESTNUMBER0400", response="d6262e9147db08c62ff2f53b515861e8"
    279 Accept: */*
    280 
    281 GET /%TESTNUMBER0500 HTTP/1.1
    282 Host: %HOSTIP:%HTTPPORT
    283 Authorization: Digest username="testuser", realm="testrealm", nonce="7", uri="/%TESTNUMBER0500", response="198757e61163a779cf24ed4c49c1ad7d"
    284 Accept: */*
    285 
    286 </protocol>
    287 </verify>
    288 </testcase>