Oliver Eichler ha scritto:
> Hm, I would have done it the same way. Fabrice played with that stuff once 
> and had some issues, too. But I don't remember the details. Maybe probing 
> with wireshark gives a bit of additional information on what's failing.

First, let's have a look at what happens when proxy authentication does 
work.

Here's an excerpt of HTTP packets exchanged between JOSM (which supports 
proxy connectivity pretty well) and my proxy server, sniffed with wireshark:

-----------------------------------------------------------------------
359     18.882631000    10.11.44.241    10.11.21.150    HTTP    279     GET 
http://tile.openstreetmap.org/10/531/369.png HTTP/1.1
389     19.023897000    10.11.21.150    10.11.44.241    HTTP    1228    
HTTP/1.1 407 Proxy 
Authentication Required  (text/html)
435     19.076748000    10.11.44.241    10.11.21.150    HTTP    387     GET 
http://tile.openstreetmap.org/10/531/369.png HTTP/1.1 , NTLMSSP_NEGOTIATE
444     19.094588000    10.11.21.150    10.11.44.241    HTTP    178     
HTTP/1.1 407 Proxy 
Authentication Required , NTLMSSP_CHALLENGE (text/html)
461     19.105225000    10.11.44.241    10.11.21.150    HTTP    547     GET 
http://tile.openstreetmap.org/10/530/368.png HTTP/1.1 , NTLMSSP_AUTH, 
User: MY_DOMAIN\my_user
500     19.351147000    10.11.21.150    10.11.44.241    HTTP    1371    
HTTP/1.1 200 OK  (PNG)
-----------------------------------------------------------------------

And here are details of packet 461, which contains authentication data 
transmitted to the server:

-----------------------------------------------------------------------
[truncated] Proxy-authorization: NTLM 
TlRMTVNTUAADAAAAGAAYAIQAAAAYABgAnAAAABQAFABIAAAAFAAUAFwAAAAUABQAcAAAAAAAAAC0AAAABYKIogUBKAoAAAAPRgBFAFIAUgBFAFIATwBOAEUAVABjAGEAdgBhAGwAZABhAHYAaQAxAEQASQBUAEEAMQA4ADIANgA2ADIA/pQZE5JCPIsAAAAAAAAAAAAAA
NTLM Secure Service Provider
NTLMSSP identifier: NTLMSSP
NTLM Message Type: NTLMSSP_AUTH (0x00000003)
Lan Manager Response: fe94191392423c8b00000000000000000000000000000000
NTLM Client Challenge: fe94191392423c8b
NTLM Response: 65a0133a269c38f849096f367ea73dbd3f3ab3256415d232
Domain name: MY_DOMAIN
User name: my_user
Host name: my_host
Session Key: Empty
Flags: 0xa2888205
Version 5.1 (Build 2600); NTLM Current Revision 15
-----------------------------------------------------------------------


By comparison, here's what I get when I perform a similar request with 
QLandkarte GT (downloaded build version 1.5.1 for Windows). Please 
notice that the client does not reply at all to the server's 
authentication request:

-----------------------------------------------------------------------
212     13.366244000    10.11.44.241    10.11.21.151    HTTP    242     GET 
http://tile.openstreetmap.org/0/0/-1.png HTTP/1.1
228     13.374234000    10.11.21.151    10.11.44.241    HTTP    1228    
HTTP/1.1 407 Proxy 
Authentication Required  (text/html)
-----------------------------------------------------------------------


Finally, I'm sending the log when I try the same thing with the version 
I recompiled, where I pass username and password to 
QNetworkProxy::setApplicationProxy():

-----------------------------------------------------------------------
200     12.264664000    10.11.44.241    10.11.21.151    HTTP    242     GET 
http://tile.openstreetmap.org/0/0/-1.png HTTP/1.1
216     12.273321000    10.11.21.151    10.11.44.241    HTTP    1228    
HTTP/1.1 407 Proxy 
Authentication Required  (text/html)
253     12.284451000    10.11.44.241    10.11.21.151    HTTP    314     GET 
http://tile.openstreetmap.org/0/0/-1.png HTTP/1.1 , NTLMSSP_NEGOTIATE
276     12.333578000    10.11.21.151    10.11.44.241    HTTP    178     
HTTP/1.1 407 Proxy 
Authentication Required , NTLMSSP_CHALLENGE (text/html)
298     12.340180000    10.11.44.241    10.11.21.151    HTTP    674     GET 
http://tile.openstreetmap.org/0/1/-1.png HTTP/1.1 , NTLMSSP_AUTH, User: 
MY_DOMAIN\
308     12.367010000    10.11.21.151    10.11.44.241    HTTP    1232    
HTTP/1.1 407 Proxy 
Authentication Required  (text/html)
-----------------------------------------------------------------------

Details of packet 298:

-----------------------------------------------------------------------
[truncated] Proxy-Authorization: NTLM 
TlRMTVNTUAADAAAAAAAAAFQAAADaANoAVAAAABQAFABAAAAAAAAAAFQAAAAAAAAAVAAAAAAAAAAAAAAAAQIAAEYARQBSAFIARQBSAE8ATgBFAFQAV12u0BfFzp5lcm7ma6MtJAEBAAAAAAAAgLQWjpmVzQFhMGMzZTFhOQAAAAACABQARgBFAFIAUgBFAFIATwBOAEUAV
NTLM Secure Service Provider
NTLMSSP identifier: NTLMSSP
NTLM Message Type: NTLMSSP_AUTH (0x00000003)
Lan Manager Response: Empty
NTLM Response: 575daed017c5ce9e65726ee66ba32d240101000000000000...
NTLM Client Challenge: 6130633365316139
Domain name: MY_DOMAIN
User name: NULL
Host name: NULL
Session Key: Empty
Flags: 0x00000201
-----------------------------------------------------------------------


So, something has changed. Now authentication data is sent to server. 
However, they are incomplete--user name is NULL!

I need to further investigate QNetworkProxy class.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Qlandkartegt-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qlandkartegt-users

Reply via email to