<?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 Re: How to solve security issue when using Rest API to connect to splunk? in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/How-to-solve-security-issue-when-using-Rest-API-to-connect-to/m-p/697672#M11683</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/260286"&gt;@shai&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;In this scenario, you'll need to combine your certs along with SplunkCloud certificates. Just append the CA file to include self signed certificate and SplunkCloud rootCA and use the same for communication. This chain will help you communicate with both Splunk Enterprise On-Prem and SplunkCloud environment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Tejas.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;The above solution helps, an upvote is appreciated.!!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 29 Aug 2024 07:40:24 GMT</pubDate>
    <dc:creator>tej57</dc:creator>
    <dc:date>2024-08-29T07:40:24Z</dc:date>
    <item>
      <title>How to solve security issue when using Rest API to connect to splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-solve-security-issue-when-using-Rest-API-to-connect-to/m-p/697474#M11681</link>
      <description>&lt;P&gt;I develop an app on a private Splunk Enterprise server and have a piece of code that accesses the rest api:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;# Use Splunk REST API to get all input parameters
splunkd_uri = os.environ.get("SPLUNKD_URI", "https://127.0.0.1:8089")

endpoint = f"{splunkd_uri}/servicesNS/nobody/{app_name}/data/inputs/{app_name}"

headers = {
'Authorization': f'Splunk {session_key}'
}

response = requests.get(endpoint, headers=headers, verify=False, timeout=30)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Everything works locally but when I run app-inspect before submitting to splunkcloud I get:&lt;BR /&gt;&lt;BR /&gt;FAILURE: If you are using requests.get to talk to your own infra&lt;BR /&gt;with non-public PKI, make sure you bundle your own CA certs as part&lt;BR /&gt;of your app and pass the path into requests.get as an arg. File:&lt;BR /&gt;bin\utils\splunk_rest.py Line Number: 19&lt;BR /&gt;&lt;BR /&gt;I am trying to understand how to solve this issue, because if I put a CA that matches the server I am working on, it will not satisfy the splunkcloud server that my clients will use. &lt;BR /&gt;&lt;BR /&gt;I think I am misunderstanding a core piece around how to utilize Rest API pragmatically.&lt;/P&gt;
&lt;P&gt;What is the correct way to go about this? &lt;BR /&gt;Can it work both for Splunk enterprise and on Splunk Cloud?&lt;BR /&gt;&lt;BR /&gt;any clue or tip may help&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2024 15:51:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-solve-security-issue-when-using-Rest-API-to-connect-to/m-p/697474#M11681</guid>
      <dc:creator>shai</dc:creator>
      <dc:date>2024-08-27T15:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to solve security issue when using Rest API to connect to splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-solve-security-issue-when-using-Rest-API-to-connect-to/m-p/697672#M11683</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/260286"&gt;@shai&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;In this scenario, you'll need to combine your certs along with SplunkCloud certificates. Just append the CA file to include self signed certificate and SplunkCloud rootCA and use the same for communication. This chain will help you communicate with both Splunk Enterprise On-Prem and SplunkCloud environment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Tejas.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;The above solution helps, an upvote is appreciated.!!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 07:40:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-solve-security-issue-when-using-Rest-API-to-connect-to/m-p/697672#M11683</guid>
      <dc:creator>tej57</dc:creator>
      <dc:date>2024-08-29T07:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to solve security issue when using Rest API to connect to splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-solve-security-issue-when-using-Rest-API-to-connect-to/m-p/698478#M11686</link>
      <description>&lt;P&gt;Thank you for the kind reply!&lt;BR /&gt;Where can I find&amp;nbsp;&lt;SPAN&gt;SplunkCloud rootCA&amp;nbsp;?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Sep 2024 13:41:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-solve-security-issue-when-using-Rest-API-to-connect-to/m-p/698478#M11686</guid>
      <dc:creator>shai</dc:creator>
      <dc:date>2024-09-08T13:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to solve security issue when using Rest API to connect to splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-solve-security-issue-when-using-Rest-API-to-connect-to/m-p/698601#M11688</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/260286"&gt;@shai&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;You can find the SplunkCloud root CA from the Universal Forwarder package present on your SplunkCloud search head. It gives you a forwarder package with preconfigured outputs to forward the data to SplunkCloud indexers. Within the same app, you can find the certificates that you need to append your self signed ones with. The package name should go something like this - 100_&amp;lt;&amp;lt;stack_name&amp;gt;&amp;gt;_splunkcloud&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Tejas.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2024 06:51:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-solve-security-issue-when-using-Rest-API-to-connect-to/m-p/698601#M11688</guid>
      <dc:creator>tej57</dc:creator>
      <dc:date>2024-09-10T06:51:08Z</dc:date>
    </item>
  </channel>
</rss>

