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

modify consul_acl resource to support SSL options #442

Merged
merged 2 commits into from
May 30, 2017

Conversation

shayangz
Copy link
Contributor

Currently the consul_acl resource breaks with an SSL only Consul cluster. This PR adds ability to pass optional SSL attributes to enable using the resource in such situations.

@legal90
Copy link
Contributor

legal90 commented May 29, 2017

Hi @shayangz,
Thank you for the contribution! Adding SSL options to consul_acl is a good idea. But since ssl hash is passing through Diplomat directly to Faraday HTTP lib, may be it would be better an easier just to add a single attribute ssl to allow users to pass the desired hash?

      # @!attribute ssl
      # @return [Hash]

      attribute(:ssl, kind_of: Hash, default: {})

Then it should be possible to pass a hash with custom SSL settings:

consul_acl 'token' do
  # ... other params
  ssl({
    client_cert: '...',
    client_key: '...',
    ca_file: '...',
    ca_path: '...',
    cert_store: '...'
  })
end

as well as this one (to disable peer verification):

consul_acl 'token' do
  # ... other params
  ssl({ verify: false })
end

@shayangz
Copy link
Contributor Author

Consolidating the options into a single Hash sounds great. Updated the PR.

@legal90
Copy link
Contributor

legal90 commented May 30, 2017

@shayangz Thank you!

@legal90 legal90 merged commit eebc129 into sous-chefs:master May 30, 2017
@shayangz shayangz deleted the consul-acl-ssl branch May 30, 2017 20:54
@shayangz shayangz restored the consul-acl-ssl branch May 30, 2017 20:56
@shayangz shayangz deleted the consul-acl-ssl branch June 11, 2017 22:36
@lock
Copy link

lock bot commented Apr 25, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants