Security

REST API Modular input "EOF occured in violation of protocol"

mactho
New Member

Hello
I have the REST API Modular Input APP on a Universal Forwarder configured to consume (make rest calls) to management/health endpoints on rabbit queues. However I get this error turning up in the splunkd.log file whenever the app attempts to contact the endpoint:

Exception performing request: [Errno 8] _ssl.c:490: EOF occurred in violation of protocol

inputs.conf ssl section:

[SSL]
serverCert = <path to my trust store>

Was working fine on HTTP but then stopped working on HTTPS

Tags (1)
0 Karma

Damien_Dallimor
Ultra Champion

That error message and the SSL stanza have absolutely nothing to do with the REST Mod Input.

What are you actually trying to accomplish? Guessing here , but are you trying to setup client certificate based authentication for a HTTPs request using the REST Mod Input ?

0 Karma

mactho
New Member

Ok I have it sorted. I had to implement this :

class MyAdapter(HTTPAdapter):
    def init_poolmanager(self, connections, maxsize, block=False):
        self.poolmanager = PoolManager(num_pools=connections,
                                       maxsize=maxsize,
                                       block=block,
                                       ssl_version=ssl.PROTOCOL_TLSv1)


        s = requests.Session()
        s.mount('https://', MyAdapter())

in rest.py and then use the session object to make the request.

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...