<?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 collect event log from SEPC? in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/How-to-collect-event-log-from-SEPC/m-p/586162#M7871</link>
    <description>&lt;P&gt;Splunkers,&amp;nbsp;&lt;SPAN&gt;anyone got this data onboarded &amp;nbsp;to Splunk? If so, would you mind to share feedback or docs.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 23 Feb 2022 08:12:39 GMT</pubDate>
    <dc:creator>marend</dc:creator>
    <dc:date>2022-02-23T08:12:39Z</dc:date>
    <item>
      <title>How to collect event log from SEPC?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-collect-event-log-from-SEPC/m-p/437006#M7868</link>
      <description>&lt;P&gt;I have been tried to export and collect event log from SEPC to my internal Splunk since last week. Firstly, I found error :&lt;/P&gt;

&lt;P&gt;"requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:579)"&lt;/P&gt;

&lt;P&gt;So, I solved this problem by add more parameter (verify=False at "requests,post" method) , after that error disappeared. However, I did not found any event log in my Splunk.&lt;/P&gt;

&lt;P&gt;I have been searched the solution of this problem for 2 weeks, and cannot found any solution. So, please let me know, &lt;BR /&gt;
can you collect and forward event log from Symantec cloud to your Splunk ? and&lt;BR /&gt;
Could you please to solve this problem for me ? &lt;/P&gt;

&lt;P&gt;This is script:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;r3_url = "https://usea1.r3.securitycloud.symantec.com/r3_epmp_i"
oauth_url = "/oauth2/tokens"
#export_api = "/sccs/v1/events/export"
export_api = "/sccs/v1/events/export HTTP/1.1"
#CONFIG_INI = os.path.join('/Applications/Splunk/', 'bin', 'scripts', 'SEPCloudConfig.ini')
CONFIG_INI = os.path.join('/opt/splunk/', 'bin', 'scripts', 'SEPCloudConfig.ini')
START_DATE = 'start_date'
END_DATE = 'end_date'
CONFIG_EVENTS_SECTION = 'Events'
BATCH_SIZE = 'batch_size'
TYPE = 'event_type_filter'
CONFIG_AUTHENTICATION_SECTION = 'Authentication'
CLIENT_ID = 'client_id'
CLIENT_SECRET = 'client_secret'


def get_oauth_token(client_id, client_secret):

    headers = build_base_headers()
    headers.update({"Content-Type": "application/x-www-form-urlencoded"})

    token = b64encode(client_id + ":" + client_secret).decode("ascii")
    headers.update({"Authorization": "Basic " + token})
    params = {'grant_type': 'client_credentials'}

    response = requests.post("%s%s" % (r3_url, oauth_url),
                             headers=headers,
                             data=params, verify=False)

    if response.status_code == 200:
        data = response.json()

    return None


# Function to export events
def export_events(token, event_type, batch_size, start_date, end_date, client_id, client_secret):

    data = None

    headers = build_base_headers()
    headers.update({"Content-Type": "application/json"})
    headers.update({"Authorization": token})

    keys = ["type", "batchSize", "startDate", "endDate"]
    values = [event_type, int(batch_size), start_date, end_date]

    params = {}
    for index in range(len(keys)):
        params[keys[index]] = values[index]

    params = json.dumps(params)
    response = requests.post("%s%s" % (r3_url, export_api),
                             headers=headers,
                             data=params, verify=False)

    if response.status_code == requests.codes.ok:
        data = response.json()

    # TODO: To Test
    elif response.status_code == 401:
        token = get_oauth_token(client_id, client_secret)
        export_events(token, event_type, batch_size, start_date, end_date, client_id, client_secret)

    return data
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please help me. Thank you so much.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:00:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-collect-event-log-from-SEPC/m-p/437006#M7868</guid>
      <dc:creator>holm_arsene</dc:creator>
      <dc:date>2020-09-29T23:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to collect event log from SEPC?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-collect-event-log-from-SEPC/m-p/437007#M7869</link>
      <description>&lt;P&gt;Converted from answer to &lt;A href="https://answers.splunk.com/answers/635384/symantec-cloud-scripted-input.html#answer-719709"&gt;https://answers.splunk.com/answers/635384/symantec-cloud-scripted-input.html#answer-719709&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jan 2019 12:38:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-collect-event-log-from-SEPC/m-p/437007#M7869</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-01-30T12:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to collect event log from SEPC?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-collect-event-log-from-SEPC/m-p/437008#M7870</link>
      <description>&lt;P&gt;@holm_arsene  are you able to fetch logs?&lt;BR /&gt;
i am also facing same problem.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Mar 2020 11:52:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-collect-event-log-from-SEPC/m-p/437008#M7870</guid>
      <dc:creator>nagendra1111</dc:creator>
      <dc:date>2020-03-26T11:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to collect event log from SEPC?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-collect-event-log-from-SEPC/m-p/586162#M7871</link>
      <description>&lt;P&gt;Splunkers,&amp;nbsp;&lt;SPAN&gt;anyone got this data onboarded &amp;nbsp;to Splunk? If so, would you mind to share feedback or docs.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 08:12:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-collect-event-log-from-SEPC/m-p/586162#M7871</guid>
      <dc:creator>marend</dc:creator>
      <dc:date>2022-02-23T08:12:39Z</dc:date>
    </item>
  </channel>
</rss>

