-
Notifications
You must be signed in to change notification settings - Fork 21
Cannot specify SSL verify_mode or CA chain #47
Description
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.
Version of project: 1.0.5
Platform version: Mac OS X and Linux
Framework version: Ruby 2.2.0
Splunk version: Splunk 6.1.3