bosh icon indicating copy to clipboard operation
bosh copied to clipboard

Self Signed SSL Certs and Excon

Open jesseproudman opened this issue 13 years ago • 8 comments

This is similar to the issue reported here: https://github.com/cloudfoundry-community/bosh-bootstrap/pull/235

When calling bosh from the command line, if the remote server is using an SSL certificate, Excon bombs. The resolution is to either pass in the SSL certificate paths to Excon, or use:

Excon.defaults[:ssl_verify_peer] = false

Looking through the call stack, I don't see a great place to inject that. I'm happy to make the change if some one can direct me on how they'd prefer to see it done

jesseproudman avatar Sep 11 '13 01:09 jesseproudman

@blueboxjesse We suggest adding an environment variable OPENSTACK_SSL_VERIFY_PEER to the OpenStack CPI that can be used to turn of SSL verification.

@frodenas Any thoughts?

@andreasmaier / @mmb

andreasmaier avatar Sep 11 '13 17:09 andreasmaier

I can do that. Any suggestions / requirements on where in the code stack you would prefer that variable be checked for an the Excon settings modified?

jesseproudman avatar Sep 11 '13 17:09 jesseproudman

You'll need to modify the Bosh OpenStack CPI and the Bosh Registry in order to pass the connection options to fog.

Also, modify the Bosh release to accept other connection options (both director and registry). Be careful because we cannot use environment vars here.

frodenas avatar Sep 11 '13 17:09 frodenas

@frodenas Agreed a config option is a better solution than an environment variable. If not present it should leave ssl verification on.

@mmb / @AndreasMaier

andreasmaier avatar Sep 12 '13 16:09 andreasmaier

Happy to implement this... Sounds like a config option would be the best bet. Any preferences on where to read that config option and force Excon preference? This seems to touch so much of the codebase...

jesseproudman avatar Sep 14 '13 01:09 jesseproudman

Director & Registry reads the config options from config files generated using templates (located at director and registry jobs). So the 1st step is to allow the required options at the template files.

Then they pass that options to the CPI and Registry. So we need to read the new options and pass them to fog (director and registry).

And that's all!

frodenas avatar Sep 14 '13 18:09 frodenas

Submitted PR for this.

jesseproudman avatar Sep 15 '13 04:09 jesseproudman

We are closing this issue because its pull requests (namely #434) have been resolved.

Thanks for the contribution, CF Community Pair (@adamstegman & @mbhave)

adamstegman avatar May 06 '14 21:05 adamstegman