| Message: 59484 |
 |
BY: Tom Gower (catrancher) DATE: 2008-08-15 11:26 SUBJECT: RE: Issues with RubySSPI Justin,
Well, it's taken a little longer to try this than I anticipated but I finally got it done. Still having problems. I've used the 1.2.4 ruby sspi on a clean ruby installation (just ruby and gem). The results are still pretty much the same. A little more verbose with authentication errors but generally similar results. I've run the apply_sspi_patch script then run the same test as before in the same order; test_ruby_sspi.rb followed by test_net_http.rb and finally trace_proxy.rb. Once again the ouput has been snipped for brevity.
C:\ruby\lib\ruby\gems\1.8\gems\rubysspi-1.2.4>ruby test\test_ruby_sspi.rb
Loaded suite test/test_ruby_sspi
Started
....
Finished in 2.016 seconds.
4 tests, 15 assertions, 0 failures, 0 errors
C:\ruby\lib\ruby\gems\1.8\gems\rubysspi-1.2.4>ruby test\test_net_http.rb
Loaded suite test/test_net_http
Started
EE
Finished in 0.547 seconds.
1) Error:
test_head_request(NTLMTest):
RuntimeError: Error occurred during proxy negotiation. req: "NTLM TlRMTVNTUAABAA
AAt4II4gAAAAAAAAAAAAAAAAAAAAAFASgKAAAADw=="; res: #<Net::HTTPProxyAuthentication
Required 407 Proxy Authentication Required readbody=true>; Original message: Err
or: SEC_E_INVALID_TOKEN
./test/../lib/win32/sspi.rb:297:in `complete_authentication'
./test/../lib/win32/sspi/http_proxy_patch.rb:95:in `request'
c:/ruby/lib/ruby/1.8/net/http.orig.1.rb:810:in `head'
test/test_net_http.rb:40:in `test_head_request'
c:/ruby/lib/ruby/1.8/net/http.orig.1.rb:547:in `start'
c:/ruby/lib/ruby/1.8/net/http.orig.1.rb:440:in `start'
test/test_net_http.rb:39:in `test_head_request'
2) Error:
test_net_http(NTLMTest):
RuntimeError: Error occurred during proxy negotiation. req: "NTLM TlRMTVNTUAABAA
AAt4II4gAAAAAAAAAAAAAAAAAAAAAFASgKAAAADw=="; res: #<Net::HTTPProxyAuthentication
Required 407 Proxy Authentication Required readbody=true>; Original message: Err
or: SEC_E_INVALID_TOKEN
./test/../lib/win32/sspi.rb:297:in `complete_authentication'
./test/../lib/win32/sspi/http_proxy_patch.rb:95:in `request'
c:/ruby/lib/ruby/1.8/net/http.orig.1.rb:781:in `get'
test/test_net_http.rb:32:in `test_net_http'
c:/ruby/lib/ruby/1.8/net/http.orig.1.rb:547:in `start'
c:/ruby/lib/ruby/1.8/net/http.orig.1.rb:440:in `start'
test/test_net_http.rb:31:in `test_net_http'
2 tests, 4 assertions, 0 failures, 2 errors
C:\ruby\lib\ruby\gems\1.8\gems\rubysspi-1.2.4>ruby test\trace_proxy.rb
opening connection to myproxy.mycompany.com...
opened
<- "GET http://www.google.com/ HTTP/1.1\r\nAccept: */*\r\nHost: http://www.google.com\r
\nProxy-Authorization: Negotiate TlRMTVNTUAABAAAAt4II4gAAAAAAAAAAAAAAAAAAAAAFASg
KAAAADw==\r\n\r\n"
-> "HTTP/1.1 407 Proxy Authentication Required\r\n"
-> "Date: Fri, 15 Aug 2008 11:12:46 GMT\r\n"
-> "Content-Length: 257\r\n"
-> "Content-Type: text/html\r\n"
-> "Server: NetCache appliance (NetApp/5.6.1D25DEBUG3)\r\n"
-> "Proxy-Authenticate: Negotiate TlRMTVNTUAACAAAABAAEACgAAAAGggEAyKnjXRAw+kkAAA
AAAAAAAENPUlA=\r\n"
-> "\r\n"
reading 257 bytes...
-> "<HTML>\n<HEAD><TITLE>407 Proxy Authentication Required</TITLE></HEAD>\n<BODY
>\n<H1>Proxy Authentication Required</H1>\n<H4>\nUnable to complete request:<P>\
nAccess denied due to authentication failure.\r\n\n</H4>\n<HR>\n</BODY>\n</HTML>
\n "
read 257 bytes
Conn keep-alive
<- "GET http://www.google.com/ HTTP/1.1\r\nAccept: */*\r\nHost: http://www.google.com\r
\nProxy-Authorization: Negotiate TlRMTVNTUAADAAAAGAAYAGAAAAAYABgAeAAAAAQABABIAAA
ABwAHAEwAAAANAA0AUwAAAAAAAACQAAAANoIAAgUBKAoAAAAPQ09SUE5CVFhSSTFCMDAxNjM2Nzk1MzV
B6rNzVKafIDcg7U5P87OTl7g5Gi8vYnIAP/0ix2FyLuaJnVxVdrnv6mZLTG5eJ419\r\n\r\n"
-> "HTTP/1.1 200 OK\r\n"
-> "Transfer-Encoding: chunked\r\n"
-> "Date: Fri, 15 Aug 2008 11:12:46 GMT\r\n"
-> "Content-Type: text/html; charset=ISO-8859-1\r\n"
-> "Expires: Fri, 15 Aug 2008 11:12:46 GMT\r\n"
-> "Cache-Control: private, max-age=0\r\n"
-> "Set-Cookie: PREF=ID=339cd291c34efa5a:TM=1218798767:LM=1218798767:S=mrBsZQZ-c
noibVuA; expires=Sun, 15-Aug-2010 11:12:47 GMT; path=/; domain=.google.com\r\n"
-> "Server: gws\r\n"
-> "Via: 1.1 somwhere (NetCache NetApp/5.6.1D25DEBUG3)\r\n"
-> "\r\n"
-> "17e1\r\n"
reading 6113 bytes...
-> "<html><head><meta http-equiv=\"content-type\" content=\"text/html; charset=I
----------------------------Snip--------------------------------
read 6113 bytes
reading 2 bytes...
-> "\r\n"
read 2 bytes
-> "0\r\n"
-> "\r\n"
Conn keep-alive
<- "GET http://www.google.com/foobar.html HTTP/1.1\r\nAccept: */*\r\nHost: http://www.g
oogle.com\r\n\r\n"
-> "HTTP/1.1 404 Not Found\r\n"
-> "Transfer-Encoding: chunked\r\n"
-> "Date: Fri, 15 Aug 2008 11:12:46 GMT\r\n"
-> "Content-Type: text/html; charset=ISO-8859-1\r\n"
-> "Expires: Fri, 15 Aug 2008 11:12:46 GMT\r\n"
-> "Cache-Control: private, max-age=0\r\n"
-> "Server: gws\r\n"
-> "Via: 1.1 somwhere (NetCache NetApp/5.6.1D25DEBUG3)\r\n"
-> "\r\n"
-> "1baa\r\n"
reading 7082 bytes...
-> "<html><head><meta http-equiv=content-type content=\"text/html; charset=ISO-8
-----------------Snip-------------------------------------------
read 7082 bytes
reading 2 bytes...
-> "\r\n"
read 2 bytes
-> "0\r\n"
-> "\r\n"
Conn keep-alive
C:\ruby\lib\ruby\gems\1.8\gems\rubysspi-1.2.4>
Hope this is useful and we can get this fixed. If you need more info, please let me know.
Thanks,
Tom | |