elastic / logstash

Logstash - transport and process your logs, events, or other data
https://www.elastic.co/products/logstash
Other
111 stars 3.51k forks source link

Plugin installation fails when behind proxy with NTLM authentication #8152

Open phobosq opened 7 years ago

phobosq commented 7 years ago

It is impossible to reach out to external network when traffic is routed through proxy that requires NTLM authentication. When inspecting http.rb mentioned below I found that proxy authentication is hard-coded to Basic (on line 793), and as such, it's bound to fail on most of enterprise networks.

C:\temp\elk\logstash-5.2.0>bin\logstash-plugin install logstash-filter-truncate Looking if package named: logstash-filter-truncate exists at https://artifacts.elastic.co/downloads/logstash-plugins/logstash-filter-truncate/logstash-filter-truncate-5.2.0.zip Net::HTTPServerException: 407 "Proxy Authentication Required" error! at C:/temp/elk/logstash-5.2.0/vendor/jruby/lib/ruby/1.9/net/http.rb:2641 value at C:/temp/elk/logstash-5.2.0/vendor/jruby/lib/ruby/1.9/net/http.rb:2650 connect at C:/temp/elk/logstash-5.2.0/vendor/jruby/lib/ruby/1.9/net/http.rb:796 do_start at C:/temp/elk/logstash-5.2.0/vendor/jruby/lib/ruby/1.9/net/http.rb:756 start at C:/temp/elk/logstash-5.2.0/vendor/jruby/lib/ruby/1.9/net/http.rb:745 start at C:/temp/elk/logstash-5.2.0/vendor/jruby/lib/ruby/1.9/net/http.rb:557 start at C:/temp/elk/logstash-5.2.0/lib/pluginmanager/utils/http_client.rb:13 remote_file_exist? at C:/temp/elk/logstash-5.2.0/lib/pluginmanager/utils/http_client.rb:23 get_installer_for at C:/temp/elk/logstash-5.2.0/lib/pluginmanager/pack_fetch_strategy/repository.rb:27 create at C:/temp/elk/logstash-5.2.0/lib/pluginmanager/install_strategy_factory.rb:15 each at org/jruby/RubyArray.java:1613 create at C:/temp/elk/logstash-5.2.0/lib/pluginmanager/install_strategy_factory.rb:14 execute at C:/temp/elk/logstash-5.2.0/lib/pluginmanager/install.rb:30 run at C:/temp/elk/logstash-5.2.0/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67 execute at C:/temp/elk/logstash-5.2.0/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/subcommand/execution.rb:11 run at C:/temp/elk/logstash-5.2.0/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67 run at C:/temp/elk/logstash-5.2.0/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:132 (root) at C:\temp\elk\logstash-5.2.0\lib\pluginmanager\main.rb:46

vvvvoid commented 7 years ago

i have same issue