<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to make REST API call with modular data inputs for Certificate and Key based authentication? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-make-REST-API-call-with-modular-data-inputs-for/m-p/682595#M114001</link>
    <description>&lt;P&gt;I am trying to call a 3rd party API which supports Certificate and Key based authentication. I have an on-prem instance of Splunk (Version: 9.0.2) running on a VM. I have verified the API response on the VM via curl command (Command used: &lt;EM&gt;&lt;SPAN class=""&gt;curl&amp;nbsp;--cert &amp;lt;"path to .crt file"&amp;gt; --key &amp;lt;"path to .key file"&amp;gt; --header&amp;nbsp;"Authorization: &amp;lt;token&amp;gt;"&amp;nbsp;--request&amp;nbsp;GET &amp;lt;"url"&amp;gt;&lt;/SPAN&gt;&lt;/EM&gt;) which gives response for a normal user. However, when running the same curl command using shell in Splunk Add-on Builder's Modular Data Inputs, the command only works with "sudo" otherwise it gives Error 403. When checked with &lt;EM&gt;"whoami"&lt;/EM&gt;, it returns the user as root.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question 1:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Why is the curl command not working without using &lt;EM&gt;sudo&lt;/EM&gt; even when the user is root. Is there any configuration that I need to modify to make it work without using &lt;EM&gt;sudo&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question 2:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;How do I make the same API call using Python code in Modular Data Inputs of Splunk Add-on Builder.&lt;/P&gt;</description>
    <pubDate>Mon, 01 Apr 2024 09:11:22 GMT</pubDate>
    <dc:creator>21Sharma</dc:creator>
    <dc:date>2024-04-01T09:11:22Z</dc:date>
    <item>
      <title>How to make REST API call with modular data inputs for Certificate and Key based authentication?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-make-REST-API-call-with-modular-data-inputs-for/m-p/682595#M114001</link>
      <description>&lt;P&gt;I am trying to call a 3rd party API which supports Certificate and Key based authentication. I have an on-prem instance of Splunk (Version: 9.0.2) running on a VM. I have verified the API response on the VM via curl command (Command used: &lt;EM&gt;&lt;SPAN class=""&gt;curl&amp;nbsp;--cert &amp;lt;"path to .crt file"&amp;gt; --key &amp;lt;"path to .key file"&amp;gt; --header&amp;nbsp;"Authorization: &amp;lt;token&amp;gt;"&amp;nbsp;--request&amp;nbsp;GET &amp;lt;"url"&amp;gt;&lt;/SPAN&gt;&lt;/EM&gt;) which gives response for a normal user. However, when running the same curl command using shell in Splunk Add-on Builder's Modular Data Inputs, the command only works with "sudo" otherwise it gives Error 403. When checked with &lt;EM&gt;"whoami"&lt;/EM&gt;, it returns the user as root.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question 1:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Why is the curl command not working without using &lt;EM&gt;sudo&lt;/EM&gt; even when the user is root. Is there any configuration that I need to modify to make it work without using &lt;EM&gt;sudo&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question 2:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;How do I make the same API call using Python code in Modular Data Inputs of Splunk Add-on Builder.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2024 09:11:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-make-REST-API-call-with-modular-data-inputs-for/m-p/682595#M114001</guid>
      <dc:creator>21Sharma</dc:creator>
      <dc:date>2024-04-01T09:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to make REST API call with modular data inputs for Certificate and Key based authentication?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-make-REST-API-call-with-modular-data-inputs-for/m-p/682599#M114002</link>
      <description>&lt;P&gt;1. Run curl with &lt;EM&gt;-v&lt;/EM&gt; to see its operation verbosely. Most probably you're trying to read cryptographic material from a directory you don't have access to.&lt;/P&gt;&lt;P&gt;2. In order to use client certificates you can do it like this:&lt;/P&gt;&lt;P&gt;&lt;A href="https://requests.readthedocs.io/en/latest/user/advanced/#client-side-certificates" target="_blank"&gt;https://requests.readthedocs.io/en/latest/user/advanced/#client-side-certificates&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2024 09:43:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-make-REST-API-call-with-modular-data-inputs-for/m-p/682599#M114002</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-04-01T09:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to make REST API call with modular data inputs for Certificate and Key based authentication?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-make-REST-API-call-with-modular-data-inputs-for/m-p/682611#M114004</link>
      <description>&lt;P&gt;Thank you for your response &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;. I tried running curl in verbose mode. After successful connection to proxy, I am getting below error but am unable to locate squid.conf file.&lt;/P&gt;&lt;P&gt;X-Squid-Error: ERR_ACCESS_DENIED 0&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2024 11:26:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-make-REST-API-call-with-modular-data-inputs-for/m-p/682611#M114004</guid>
      <dc:creator>21Sharma</dc:creator>
      <dc:date>2024-04-01T11:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to make REST API call with modular data inputs for Certificate and Key based authentication?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-make-REST-API-call-with-modular-data-inputs-for/m-p/682616#M114005</link>
      <description>&lt;P&gt;Squid is not part of Splunk Enterprise installation. So if you're hitting squid it means either it is working as a reverse-proxy for your target service or you connect to it in order to perform the outbound connection.&lt;/P&gt;&lt;P&gt;Also - if your proxy is doing TLS inspection, cert-based mutual authentication won't work unless you create an exception in your inspection policy.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2024 12:56:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-make-REST-API-call-with-modular-data-inputs-for/m-p/682616#M114005</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-04-01T12:56:13Z</dc:date>
    </item>
  </channel>
</rss>

