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!

Stay Connected: Your Guide to July Tech Talks, Office Hours, and Webinars!

What are Community Office Hours?Community Office Hours is an interactive 60-minute Zoom series where ...

Updated Data Type Articles, Anniversary Celebrations, and More on Splunk Lantern

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

A Prelude to .conf25: Your Guide to Splunk University

Heading to Boston this September for .conf25? Get a jumpstart by arriving a few days early for Splunk ...