vagrant-proxmox icon indicating copy to clipboard operation
vagrant-proxmox copied to clipboard

Option to set ":verify_ssl => false" ?

Open jd666 opened this issue 4 years ago • 2 comments

My proxmox cluster is on an internal network. Would it be possible to disable the SSL cert verification via an optional parameter for the proxmox provider endpoint? proxmox.verify_ssl = false could then be translated to :verify_ssl => false for the RestClient calls.

Log output:

$ RESTCLIENT_LOG=stdout vagrant up --provider proxmox
RestClient.post "https://proxmox:8006/api2/json/access/ticket", "username=vagrant&password=password", "Accept"=>"*/*", "Accept-Encoding"=>"gzip, deflate", "Content-Length"=>"41", "Content-Type"=>"application/x-www-form-urlencoded", "User-Agent"=>"rest-client/2.0.2 (linux-gnu x86_64) ruby/2.7.1p83"
Unable to communicate with proxmox server:

ConnectProxmox: SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get local issuer certificate)

jd666 avatar Jul 16 '20 11:07 jd666

I am in a similar situation and would greatly appreciate this feature.

BramMusters avatar Jul 24 '20 14:07 BramMusters

As a workaround you can add wrapper for RestClient::Request class into lib/vagrant-proxmox/proxmox/connection.rb:

module RestClient
    class Request
        orig_initialize = instance_method(:initialize)

        define_method(:initialize) do |args|
            args[:verify_ssl] = false
            orig_initialize.bind(self).(args)
        end
    end
end

source

2b avatar Mar 15 '21 11:03 2b