Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chef::Config.ssl_verify_mode :verify_none doesn't get passed on the Cheffish::ServerApi #105

Open
aespinosa opened this issue Apr 21, 2016 · 2 comments

Comments

@aespinosa
Copy link

aespinosa commented Apr 21, 2016

The documented workaround in #37 doesn't seem to get passed through the HTTP client.

I posted a wrapper cookbook against the chef-server cookbook to bootstrap users (and organizations eventually) in https://gist.github.com/aespinosa/62bf4801ac570ab76f47a644b793b194

I have done various ways of adding ssl_verify_mode and none seem to work. So far I have tried the following

  1. put Chef::Config.ssl_verify_mode inside a ruby_block
  2. put the whole chef_server parameter inside a lazy { Chef::Config.ssl_verify_mode ... } block
@lamont-granquist
Copy link
Contributor

So we need to rip Cheffish::ServerApi out and come up with a better solution to properly injecting config into Chef::ServerApi and Chef::HTTP and friends

@aespinosa
Copy link
Author

aespinosa commented Aug 11, 2018

This workaround seems to satisfy my needs. I basically added the freshly configured chef-server's certificate to the chef-client trusted certificate store.

execute 'download chefserver certs' do
  command "knife ssl fetch -c #{Chef::Config.config_file} https://#{node['fqdn']}"
  creates "#{Chef::Config.config_dir}/trusted_certs"
end


chef_user 'foo' do
  chef_server "https://#{node['fqdn']}"
   # ...
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants