Cisco-AMP / amp4e_splunk_events_input

BSD 2-Clause "Simplified" License
8 stars 12 forks source link

SSL Verify failed #55

Open tuxjockey opened 3 years ago

tuxjockey commented 3 years ago

Hello,

I am having a hard time in configuring the add-on. While saving the configuration, I am seeing the below error in amp4e_events_input.log

  File "/opt/splunk/lib/python2.7/site-packages/requests/sessions.py", line 468, in request
    resp = self.send(prep, **send_kwargs)
  File "/opt/splunk/lib/python2.7/site-packages/requests/sessions.py", line 571, in send
    r = adapter.send(request, **kwargs)
  File "/opt/splunk/lib/python2.7/site-packages/requests/adapters.py", line 382, in send
    raise SSLError(e, request=request)
SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:742)

2021-01-21 16:28:50,708 ERROR Amp4eEvents - SSLError(SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:742)'),),)
2021-01-21 16:28:50,708 ERROR Amp4eEvents - API Error (status 502): Request failure: <class 'requests.exceptions.SSLError'>

Not sure where exactly I can disable the SSL verification if this is the root cause. Any advise in this regard would be highly appreciated.

Thanks.

tuxjockey commented 3 years ago

Hello,

I got the SSL verification disabled by doing the below modification in bin/util/api_service.py

Change

'verify': self.__ssl_options(),

to

'verify': False,

Hope this help others.

Cheers.

samsonnguyen commented 2 years ago

Our app does not support custom certificates. All of the AMP Secure Endpoint's apis (public clouds) should be valid, but for private cloud this might present a problem.

Leaving this issue open for now as a new feature request if someone wants to tackle it.