How to Disable SSL Certificate Verification for Logstash-Plugin (installing plugins)

This is more of an information post than a question, because I noticed several unanswered questions along these lines while searching for a solution myself.
The problem occurs when trying to use bin/logstash-plugin to install a plugin behind a corporate firewall where the SSL certificate cannot be verified. One encounters a ruby error saying ERROR: Something went wrong when installing <PLUGIN>, message: certificate verify failed.

Well, I found a solution after some digging which seems to have worked for me.

You will need to edit a file called ${LOGSTASH_HOME}/lib/pluginmanager/install.rb

Somewhere near the beginning of the file (I placed it just after the "require" statements), place the following line of code:
OpenSSL::SSL.const_set(:VERIFY_PEER, OpenSSL::SSL::VERIFY_NONE)

Now when you run bin/logstash-plugin install you will get a big warning message from Ruby telling how you should not be disabling certificate verification, but your plugin should install correctly.

4 Likes

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.