Open matthewdooler opened 8 years ago
@MatthewDooler thanks for the bug report. A couple of things:
I don't have admin access to the Splunk instance so can't pull down the exact config, but basically the setup is like this:
Does this help clear things up? If not, the fix should actually be quite easy so I can submit a PR if it's likely to be accepted!
@matthewdooler Can I relate this https://gist.github.com/imechemi/785f839a1f162e52096f6b4216538a41 as well over here?
I'm having trouble connecting to an SSL-cert-protected Splunk instance because there is no way to set the SSL verify_mode to VERIFY_PEER and pass in a CA chain. I can set my cert and key but since there is no way to pass the full CA chain which contains the required intermediate certs, then authentication fails.
The root of the problem is that the verify mode is currently hard-coded to VERIFY_NONE in lib/splunk-sdk-ruby/context.rb. This seems to be analogous to the --insecure curl flag, which doesn't just ignore the server cert but also breaks authentication when intermediate certs need to be passed in.
A potential fix to the splunk sdk would be to allow verify_mode and the path to the CA chain to be passed in, which would then be set inside context.rb (the verify_mode and ca_file attributes on Net::HTTP and ssl_context.verify_mode). I can provide a full example if that would help.
Is it likely that this could be fixed? I really can't think of a way of working around this without actually changing the sdk.