<?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 XSOAR Cisco Secure Cloud Analytics (stealthwatch) integration in Cortex XSOAR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/xsoar-cisco-secure-cloud-analytics-stealthwatch-integration/m-p/511841#M1108</link>
    <description>&lt;P&gt;If I configure the integration in SOAR using an API key from Cisco Secure Cloud Analytics, I get an authorization error:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Executed: test-module&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Instance Stealthwatch Cloud_instance_1d4e2580e-a33d-4ace-8877-59165345b343&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Arguments {}&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Start time 2022-07-27T15:48:54.437265548Z&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;2022-07-27T15:48:54.562896279Z info: (Stealthwatch Cloud_instance_1d4e2580e-a55d-4ace-8877-591658b7b343_Stealthwatch Cloud_test-module) debug-mode started.&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;#### http client print found: False.&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;#### Env {'LANG': 'C.UTF-8', 'PYTHONIOENCODING': 'UTF-8', 'HOSTNAME': '49bd2400eca7', 'PYTHON_GET_PIP_SHA256': '40ee07eac6674b8d60fce2bbabc148cf0e2f1408c167683f110fd608b8d6f416', 'PYTHON_VERSION': '2.7.18', 'https_proxy': '', 'PYTHON_PIP_VERSION': '20.3.4', 'HOME': '/root', 'http_proxy': '', 'HTTPS_PROXY': '', 'GPG_KEY': 'C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF', 'HTTP_PROXY': '', 'PATH': '/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'PYTHON_GET_PIP_URL': '&lt;A href="https://github.com/pypa/get-pip/raw/831b5dd0bec03caf24aa6d736a28dc2ba80f91cc/public/2.7/get-pip.py" target="_blank"&gt;https://github.com/pypa/get-pip/raw/831b5dd0bec03caf24aa6d736a28dc2ba80f91cc/public/2.7/get-pip.py&lt;/A&gt;', 'DOCKER_IMAGE': 'demisto/python:2.7.18.27799'}.&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;#### Params: {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"APIKey": "&amp;lt;XX_REPLACED&amp;gt;", &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"proxy": false, &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"incidentType": null, &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"isFetch": false, &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"incidentFetchInterval": "1", &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"insecure": false, &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"serverURL": "&lt;A href="https://mycompany.obsrvbl.com" target="_blank"&gt;https://mycompany.obsrvbl.com&lt;/A&gt;"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}.&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;#### Docker image: [demisto/python:2.7.18.27799]&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;#### Integration: brand: [Stealthwatch Cloud] instance: [Stealthwatch Cloud_instance_1d4e2580e-a55d-4ace-8877-591658b7b343]&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;2022-07-27T15:48:54.56354458Z debug: (Stealthwatch Cloud_instance_1d4e2580e-a55d-4ace-8877-591658b7b343_Stealthwatch Cloud_test-module) running GET request with url=&lt;A href="https://mycompany.obsrvbl.com/api/v3/alerts/alert/" target="_blank"&gt;https://mycompany.obsrvbl.com/api/v3/alerts/alert/&lt;/A&gt; params={}&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;2022-07-27T15:48:54.565385782Z info: (Stealthwatch Cloud_instance_1d4e2580e-a55d-4ace-8877-591658b7b343_Stealthwatch Cloud_test-module) python logging: DEBUG [urllib3.connectionpool] - Starting new HTTPS connection (1): mycompany.obsrvbl.com:443&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;2022-07-27T15:48:54.999865337Z info: (Stealthwatch Cloud_instance_1d4e2580e-a55d-4ace-8877-591658b7b343_Stealthwatch Cloud_test-module) python logging: DEBUG [urllib3.connectionpool] - &lt;A href="https://mycompany.obsrvbl.com:443" target="_blank"&gt;https://mycompany.obsrvbl.com:443&lt;/A&gt; "GET /api/v3/alerts/alert/ HTTP/1.1" 403 58&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;2022-07-27T15:48:55.00235194Z debug: (Stealthwatch Cloud_instance_1d4e2580e-a55d-4ace-8877-591658b7b343_Stealthwatch Cloud_test-module) 403 Client Error: Forbidden for url: &lt;A href="https://mycompany.obsrvbl.com/api/v3/alerts/alert/" target="_blank"&gt;https://mycompany.obsrvbl.com/api/v3/alerts/alert/&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;2022-07-27T15:48:55.00267294Z debug: (Stealthwatch Cloud_instance_1d4e2580e-a55d-4ace-8877-591658b7b343_Stealthwatch Cloud_test-module) 403 Client Error: Forbidden for url: &lt;A href="https://mycompany.obsrvbl.com/api/v3/alerts/alert/" target="_blank"&gt;https://mycompany.obsrvbl.com/api/v3/alerts/alert/&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Exception message is [Traceback (most recent call last):&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;File "/tmp/pyrunner/_script_docker_python_loop.py", line 735, in &amp;lt;module&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;exec(code, sub_globals, sub_globals)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;File "&amp;lt;string&amp;gt;", line 12089, in &amp;lt;module&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;File "&amp;lt;string&amp;gt;", line 11762, in list_alerts_command&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;File "&amp;lt;string&amp;gt;", line 11737, in list_alerts&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;File "&amp;lt;string&amp;gt;", line 11610, in http_request&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;HTTPError: 403 Client Error: Forbidden for url: &lt;A href="https://mycompany.obsrvbl.com/api/v3/alerts/alert/" target="_blank"&gt;https://mycompany.obsrvbl.com/api/v3/alerts/alert/&lt;/A&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;]&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;End time 2022-07-27T15:48:55.003248541Z&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The format for the API key in the SOAR config is:&amp;nbsp; &lt;A href="mailto:ApiKeyjonny.sharp@costacoffee.com:b8f59f6ec2d940868d09b841c28772ab" target="_blank"&gt;ApiKey:jon.smith@mycompanyname.com:b8f59f6ec2d940868d09b841c28772ab&lt;/A&gt;&amp;nbsp; also tried &lt;A href="mailto:ApiKeyjonny.sharp@costacoffee.com:b8f59f6ec2d940868d09b841c28772ab" target="_blank"&gt;ApiKeyjon.smith@mycompany.com:b8f59f6ec2d940868d09b841c28772ab&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I use the cli on the XSOAR server and a python script, the credentials work fine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The credentials are read from a conf file:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;root@devsiemsoar1:~/stealthwatch-cloud-sample-scripts/python# cat env.conf&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;# Enter environment information for Stealthwatch Cloud&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;[StealthwatchCloud]&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;PORTAL_URL = &lt;A href="https://gbr01.safelinks.protection.outlook.com/?url=https%3A%2F%2Furldefense.com%2Fv3%2F__http%3A%2F%2Fcostacoffee.obsrvbl.com__%3B!!Blxo567FgA!dCEL5J5On26gADwOrq-XSa_OfZRCL4MExwVj8VW2BOBG6T7yTWibvec4NeML55uUWqGwgDx9cXc2QN_6jPzXZtDUz5u6wA%24&amp;amp;data=05%7C01%7CQaiser.shah%40costacoffee.com%7C0f4ffacd52b74c37a78d08da7478e45b%7C04ed63ba990248dab4cd52b94b3a487e%7C0%7C0%7C637950359848388828%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=1zzSa2HbW3eIVPoWRFmP%2BVpT6YcpbHj3%2FzLfmX0SOgw%3D&amp;amp;reserved=0" target="_blank"&gt;mycompany.obsrvbl.com&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;API_USER = &lt;A href="mailto:jonny.sharp@costacoffee.com" target="_blank"&gt;jon.smith@mycompany.com&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;API_KEY = b8f59f6ec2d940868d09b841c28772ab&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The script to pull alerts is below:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;root@devsiemsoar1:~/stealthwatch-cloud-sample-scripts/python# cat get_alerts.py&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;#!/usr/bin/env python&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;"""&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;This script will get alerts from Stealthwatch Cloud using the REST API.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;For more information on this API, please visit:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;A href="https://gbr01.safelinks.protection.outlook.com/?url=https%3A%2F%2Furldefense.com%2Fv3%2F__https%3A%2F%2Fdeveloper.cisco.com%2Fdocs%2Fstealthwatch-cloud%2F__%3B!!Mt_FR42WkD9csi9Y!bU-j_wsj0S5sjLSkhhyxt95FmqT-yBeIXDTv7_8OGgFt0AKvPeP03QU8kqQ9HKvyKqGOtuoziY8dAY4BEcrmHzsAGy5VpkG3%24&amp;amp;data=05%7C01%7CQaiser.shah%40costacoffee.com%7C0f4ffacd52b74c37a78d08da7478e45b%7C04ed63ba990248dab4cd52b94b3a487e%7C0%7C0%7C637950359848388828%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=8PXVK85LDP7aXH3OD4Va2R4GRV8hYotnmDIL2mIsgTE%3D&amp;amp;reserved=0" target="_blank"&gt;https://developer.cisco.com/docs/stealthwatch-cloud/&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Script Dependencies:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; requests&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Depencency Installation:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ pip install requests&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;import requests&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;import json&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;import configparser&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;try:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; requests.packages.urllib3.disable_warnings()&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;except:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pass&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;# Read the config file&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;config = configparser.ConfigParser()&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;config.read("env.conf")&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;# Set the URL&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;url = https:// + config["StealthwatchCloud"]["PORTAL_URL"] + "/api/v3/alerts/alert/"&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;# Set the authorization string&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;authorization = "ApiKey " + config["StealthwatchCloud"]["API_USER"] + ":" + config["StealthwatchCloud"]["API_KEY"]&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;# Create the request headers with authorization&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;request_headers = {&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Content-Type" : "application/json",&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Accept" : "application/json",&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Authorization" : authorization&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;# Initialize the requests session&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;api_session = requests.Session()&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;# Get the list of alerts from Stealthwatch Cloud&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;response = api_session.request("GET", url, headers=request_headers, verify=False)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;# If successfully able to get list of alerts&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;if (response.status_code == 200):&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Loop through the list and print each alert&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; alerts = json.loads(response.content)["objects"]&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for alert in alerts:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #print(json.dumps(alert, indent=4)) # formatted print&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print(alert)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;# If unable to fetch list of alerts&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;else:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print("An error has ocurred, while fetching alerts, with the following code {}".format(response.status_code))&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Truncated output example:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;root@devsiemsoar1:~/stealthwatch-cloud-sample-scripts/python# /usr/bin/python get_alerts.py&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;{u'next_steps': u'Reference the supporting observations to identify the external entity that port scanned your internal entity. Determine if it is the result of planned penetration testing or other intended behavior, or if it is malicious. Update your IP scanner and allow list rules to allow the traffic if it is intended. Block the traffic if it is not intended. Update your firewall rules as necessary, including port access.', u'hostname': None, u'source_name': u'Network', u'text': u'Inbound Port Scanner on Network\nhttps://&lt;A href="https://gbr01.safelinks.protection.outlook.com/?url=https%3A%2F%2Furldefense.com%2Fv3%2F__http%3A%2F%2Fcostacoffee.obsrvbl.com%2F*%2Falerts%2F2645__%3BIw!!Blxo567FgA!dCEL5J5On26gADwOrq-XSa_OfZRCL4MExwVj8VW2BOBG6T7yTWibvec4NeML55uUWqGwgDx9cXc2QN_6jPzXZtAsW34yOw%24&amp;amp;data=05%7C01%7CQaiser.shah%40costacoffee.com%7C0f4ffacd52b74c37a78d08da7478e45b%7C04ed63ba990248dab4cd52b94b3a487e%7C0%7C0%7C637950359848544608%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=Y9eDnRnItQ1fEbth3G5d%2BV2FnqESvbCOaf8flBK%2Fak0%3D&amp;amp;reserved=0" target="_blank"&gt;mycompany.obsrvbl.com/#/alerts/2645&lt;/A&gt;', u'assigned_to_username': None, u'merit': 0, u'obj_created': u'2022-03-29T17:56:23.485636Z', u'new_comment': None, u'id': 2645, u'source_info': {u'name': u'Network', u'created': u'2021-08-28T12:16:18.684534+00:00'}, u'source': 5, u'resolved_user': None, u'natural_time': u'7\xa0hours ago', u'comments': {u'count': 32, u'text': u'32 comments', u'comments': [{u'comment': u'Updated by 4 observations', u'user': None, u'time': u'2022-07-27T09:32:56.833642+00:00'}, {u'comment': u'Updated by 1 observations', u'user': None, u'time': u'2022-07-27T07:48:20.479984+00:00'}, {u'comment': u'Updated by 2 observations', u'user': None, u'time': u'2022-07-27T07:30:06.460700+00:00'}, {u'comment': u'Updated by 1 observations', u'user': None, u'time': u'2022-07-27T06:58:38.625201+00:00'}, {u'comment': u'Updated by 1 observations', u'user': None, u'time': u'2022-07-27T05:39:33.428356+00:00'}, {u'comment': u'Updated by 3 observations', u'user': None, u'time': u'2022-07-27T05:30:59.543393+00:00'}, {u'comment': u'Updated by 2 observations', u'user': None, u'time': u'2022-07-27T05:18:20.616043+00:00'}, {u'comment': u'Updated by 1 observations', u'user': None, u'time': u'2022-07-27T01:40:47.427726+00:00'}, {u'comment': u'Updated by 1 observations', u'user': None, u'time': u'2022-07-27T01:32:01.344308+00:00'}, {u'comment': u'Updated by 2 observations', u'user': None, u'time': u'2022-07-26T21:10:47.743214+00:00'}, {u'comment': u'Updated by 2 observations', u'user': None, u'time': u'2022-07-26T18:19:29.809016+00:00'}, {u'comment': u'Updated by 2 observations', u'user': None, u'time': u'2022-07-26T17:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Anyone have any ideas why XSOAR does not accept the API key format, and comes back with HTTP 403 ‘Forbidden’ error?&amp;nbsp; CLI command works fine...&lt;/P&gt;</description>
    <pubDate>Mon, 15 Aug 2022 13:59:11 GMT</pubDate>
    <dc:creator>QShah</dc:creator>
    <dc:date>2022-08-15T13:59:11Z</dc:date>
    <item>
      <title>XSOAR Cisco Secure Cloud Analytics (stealthwatch) integration</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/xsoar-cisco-secure-cloud-analytics-stealthwatch-integration/m-p/511841#M1108</link>
      <description>&lt;P&gt;If I configure the integration in SOAR using an API key from Cisco Secure Cloud Analytics, I get an authorization error:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Executed: test-module&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Instance Stealthwatch Cloud_instance_1d4e2580e-a33d-4ace-8877-59165345b343&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Arguments {}&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Start time 2022-07-27T15:48:54.437265548Z&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;2022-07-27T15:48:54.562896279Z info: (Stealthwatch Cloud_instance_1d4e2580e-a55d-4ace-8877-591658b7b343_Stealthwatch Cloud_test-module) debug-mode started.&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;#### http client print found: False.&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;#### Env {'LANG': 'C.UTF-8', 'PYTHONIOENCODING': 'UTF-8', 'HOSTNAME': '49bd2400eca7', 'PYTHON_GET_PIP_SHA256': '40ee07eac6674b8d60fce2bbabc148cf0e2f1408c167683f110fd608b8d6f416', 'PYTHON_VERSION': '2.7.18', 'https_proxy': '', 'PYTHON_PIP_VERSION': '20.3.4', 'HOME': '/root', 'http_proxy': '', 'HTTPS_PROXY': '', 'GPG_KEY': 'C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF', 'HTTP_PROXY': '', 'PATH': '/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'PYTHON_GET_PIP_URL': '&lt;A href="https://github.com/pypa/get-pip/raw/831b5dd0bec03caf24aa6d736a28dc2ba80f91cc/public/2.7/get-pip.py" target="_blank"&gt;https://github.com/pypa/get-pip/raw/831b5dd0bec03caf24aa6d736a28dc2ba80f91cc/public/2.7/get-pip.py&lt;/A&gt;', 'DOCKER_IMAGE': 'demisto/python:2.7.18.27799'}.&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;#### Params: {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"APIKey": "&amp;lt;XX_REPLACED&amp;gt;", &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"proxy": false, &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"incidentType": null, &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"isFetch": false, &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"incidentFetchInterval": "1", &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"insecure": false, &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"serverURL": "&lt;A href="https://mycompany.obsrvbl.com" target="_blank"&gt;https://mycompany.obsrvbl.com&lt;/A&gt;"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}.&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;#### Docker image: [demisto/python:2.7.18.27799]&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;#### Integration: brand: [Stealthwatch Cloud] instance: [Stealthwatch Cloud_instance_1d4e2580e-a55d-4ace-8877-591658b7b343]&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;2022-07-27T15:48:54.56354458Z debug: (Stealthwatch Cloud_instance_1d4e2580e-a55d-4ace-8877-591658b7b343_Stealthwatch Cloud_test-module) running GET request with url=&lt;A href="https://mycompany.obsrvbl.com/api/v3/alerts/alert/" target="_blank"&gt;https://mycompany.obsrvbl.com/api/v3/alerts/alert/&lt;/A&gt; params={}&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;2022-07-27T15:48:54.565385782Z info: (Stealthwatch Cloud_instance_1d4e2580e-a55d-4ace-8877-591658b7b343_Stealthwatch Cloud_test-module) python logging: DEBUG [urllib3.connectionpool] - Starting new HTTPS connection (1): mycompany.obsrvbl.com:443&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;2022-07-27T15:48:54.999865337Z info: (Stealthwatch Cloud_instance_1d4e2580e-a55d-4ace-8877-591658b7b343_Stealthwatch Cloud_test-module) python logging: DEBUG [urllib3.connectionpool] - &lt;A href="https://mycompany.obsrvbl.com:443" target="_blank"&gt;https://mycompany.obsrvbl.com:443&lt;/A&gt; "GET /api/v3/alerts/alert/ HTTP/1.1" 403 58&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;2022-07-27T15:48:55.00235194Z debug: (Stealthwatch Cloud_instance_1d4e2580e-a55d-4ace-8877-591658b7b343_Stealthwatch Cloud_test-module) 403 Client Error: Forbidden for url: &lt;A href="https://mycompany.obsrvbl.com/api/v3/alerts/alert/" target="_blank"&gt;https://mycompany.obsrvbl.com/api/v3/alerts/alert/&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;2022-07-27T15:48:55.00267294Z debug: (Stealthwatch Cloud_instance_1d4e2580e-a55d-4ace-8877-591658b7b343_Stealthwatch Cloud_test-module) 403 Client Error: Forbidden for url: &lt;A href="https://mycompany.obsrvbl.com/api/v3/alerts/alert/" target="_blank"&gt;https://mycompany.obsrvbl.com/api/v3/alerts/alert/&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Exception message is [Traceback (most recent call last):&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;File "/tmp/pyrunner/_script_docker_python_loop.py", line 735, in &amp;lt;module&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;exec(code, sub_globals, sub_globals)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;File "&amp;lt;string&amp;gt;", line 12089, in &amp;lt;module&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;File "&amp;lt;string&amp;gt;", line 11762, in list_alerts_command&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;File "&amp;lt;string&amp;gt;", line 11737, in list_alerts&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;File "&amp;lt;string&amp;gt;", line 11610, in http_request&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;HTTPError: 403 Client Error: Forbidden for url: &lt;A href="https://mycompany.obsrvbl.com/api/v3/alerts/alert/" target="_blank"&gt;https://mycompany.obsrvbl.com/api/v3/alerts/alert/&lt;/A&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;]&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;End time 2022-07-27T15:48:55.003248541Z&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The format for the API key in the SOAR config is:&amp;nbsp; &lt;A href="mailto:ApiKeyjonny.sharp@costacoffee.com:b8f59f6ec2d940868d09b841c28772ab" target="_blank"&gt;ApiKey:jon.smith@mycompanyname.com:b8f59f6ec2d940868d09b841c28772ab&lt;/A&gt;&amp;nbsp; also tried &lt;A href="mailto:ApiKeyjonny.sharp@costacoffee.com:b8f59f6ec2d940868d09b841c28772ab" target="_blank"&gt;ApiKeyjon.smith@mycompany.com:b8f59f6ec2d940868d09b841c28772ab&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I use the cli on the XSOAR server and a python script, the credentials work fine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The credentials are read from a conf file:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;root@devsiemsoar1:~/stealthwatch-cloud-sample-scripts/python# cat env.conf&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;# Enter environment information for Stealthwatch Cloud&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;[StealthwatchCloud]&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;PORTAL_URL = &lt;A href="https://gbr01.safelinks.protection.outlook.com/?url=https%3A%2F%2Furldefense.com%2Fv3%2F__http%3A%2F%2Fcostacoffee.obsrvbl.com__%3B!!Blxo567FgA!dCEL5J5On26gADwOrq-XSa_OfZRCL4MExwVj8VW2BOBG6T7yTWibvec4NeML55uUWqGwgDx9cXc2QN_6jPzXZtDUz5u6wA%24&amp;amp;data=05%7C01%7CQaiser.shah%40costacoffee.com%7C0f4ffacd52b74c37a78d08da7478e45b%7C04ed63ba990248dab4cd52b94b3a487e%7C0%7C0%7C637950359848388828%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=1zzSa2HbW3eIVPoWRFmP%2BVpT6YcpbHj3%2FzLfmX0SOgw%3D&amp;amp;reserved=0" target="_blank"&gt;mycompany.obsrvbl.com&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;API_USER = &lt;A href="mailto:jonny.sharp@costacoffee.com" target="_blank"&gt;jon.smith@mycompany.com&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;API_KEY = b8f59f6ec2d940868d09b841c28772ab&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The script to pull alerts is below:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;root@devsiemsoar1:~/stealthwatch-cloud-sample-scripts/python# cat get_alerts.py&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;#!/usr/bin/env python&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;"""&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;This script will get alerts from Stealthwatch Cloud using the REST API.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;For more information on this API, please visit:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;A href="https://gbr01.safelinks.protection.outlook.com/?url=https%3A%2F%2Furldefense.com%2Fv3%2F__https%3A%2F%2Fdeveloper.cisco.com%2Fdocs%2Fstealthwatch-cloud%2F__%3B!!Mt_FR42WkD9csi9Y!bU-j_wsj0S5sjLSkhhyxt95FmqT-yBeIXDTv7_8OGgFt0AKvPeP03QU8kqQ9HKvyKqGOtuoziY8dAY4BEcrmHzsAGy5VpkG3%24&amp;amp;data=05%7C01%7CQaiser.shah%40costacoffee.com%7C0f4ffacd52b74c37a78d08da7478e45b%7C04ed63ba990248dab4cd52b94b3a487e%7C0%7C0%7C637950359848388828%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=8PXVK85LDP7aXH3OD4Va2R4GRV8hYotnmDIL2mIsgTE%3D&amp;amp;reserved=0" target="_blank"&gt;https://developer.cisco.com/docs/stealthwatch-cloud/&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Script Dependencies:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; requests&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Depencency Installation:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ pip install requests&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;import requests&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;import json&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;import configparser&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;try:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; requests.packages.urllib3.disable_warnings()&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;except:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pass&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;# Read the config file&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;config = configparser.ConfigParser()&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;config.read("env.conf")&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;# Set the URL&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;url = https:// + config["StealthwatchCloud"]["PORTAL_URL"] + "/api/v3/alerts/alert/"&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;# Set the authorization string&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;authorization = "ApiKey " + config["StealthwatchCloud"]["API_USER"] + ":" + config["StealthwatchCloud"]["API_KEY"]&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;# Create the request headers with authorization&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;request_headers = {&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Content-Type" : "application/json",&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Accept" : "application/json",&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Authorization" : authorization&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;# Initialize the requests session&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;api_session = requests.Session()&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;# Get the list of alerts from Stealthwatch Cloud&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;response = api_session.request("GET", url, headers=request_headers, verify=False)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;# If successfully able to get list of alerts&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;if (response.status_code == 200):&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Loop through the list and print each alert&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; alerts = json.loads(response.content)["objects"]&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for alert in alerts:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #print(json.dumps(alert, indent=4)) # formatted print&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print(alert)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;# If unable to fetch list of alerts&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;else:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print("An error has ocurred, while fetching alerts, with the following code {}".format(response.status_code))&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Truncated output example:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;root@devsiemsoar1:~/stealthwatch-cloud-sample-scripts/python# /usr/bin/python get_alerts.py&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;{u'next_steps': u'Reference the supporting observations to identify the external entity that port scanned your internal entity. Determine if it is the result of planned penetration testing or other intended behavior, or if it is malicious. Update your IP scanner and allow list rules to allow the traffic if it is intended. Block the traffic if it is not intended. Update your firewall rules as necessary, including port access.', u'hostname': None, u'source_name': u'Network', u'text': u'Inbound Port Scanner on Network\nhttps://&lt;A href="https://gbr01.safelinks.protection.outlook.com/?url=https%3A%2F%2Furldefense.com%2Fv3%2F__http%3A%2F%2Fcostacoffee.obsrvbl.com%2F*%2Falerts%2F2645__%3BIw!!Blxo567FgA!dCEL5J5On26gADwOrq-XSa_OfZRCL4MExwVj8VW2BOBG6T7yTWibvec4NeML55uUWqGwgDx9cXc2QN_6jPzXZtAsW34yOw%24&amp;amp;data=05%7C01%7CQaiser.shah%40costacoffee.com%7C0f4ffacd52b74c37a78d08da7478e45b%7C04ed63ba990248dab4cd52b94b3a487e%7C0%7C0%7C637950359848544608%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=Y9eDnRnItQ1fEbth3G5d%2BV2FnqESvbCOaf8flBK%2Fak0%3D&amp;amp;reserved=0" target="_blank"&gt;mycompany.obsrvbl.com/#/alerts/2645&lt;/A&gt;', u'assigned_to_username': None, u'merit': 0, u'obj_created': u'2022-03-29T17:56:23.485636Z', u'new_comment': None, u'id': 2645, u'source_info': {u'name': u'Network', u'created': u'2021-08-28T12:16:18.684534+00:00'}, u'source': 5, u'resolved_user': None, u'natural_time': u'7\xa0hours ago', u'comments': {u'count': 32, u'text': u'32 comments', u'comments': [{u'comment': u'Updated by 4 observations', u'user': None, u'time': u'2022-07-27T09:32:56.833642+00:00'}, {u'comment': u'Updated by 1 observations', u'user': None, u'time': u'2022-07-27T07:48:20.479984+00:00'}, {u'comment': u'Updated by 2 observations', u'user': None, u'time': u'2022-07-27T07:30:06.460700+00:00'}, {u'comment': u'Updated by 1 observations', u'user': None, u'time': u'2022-07-27T06:58:38.625201+00:00'}, {u'comment': u'Updated by 1 observations', u'user': None, u'time': u'2022-07-27T05:39:33.428356+00:00'}, {u'comment': u'Updated by 3 observations', u'user': None, u'time': u'2022-07-27T05:30:59.543393+00:00'}, {u'comment': u'Updated by 2 observations', u'user': None, u'time': u'2022-07-27T05:18:20.616043+00:00'}, {u'comment': u'Updated by 1 observations', u'user': None, u'time': u'2022-07-27T01:40:47.427726+00:00'}, {u'comment': u'Updated by 1 observations', u'user': None, u'time': u'2022-07-27T01:32:01.344308+00:00'}, {u'comment': u'Updated by 2 observations', u'user': None, u'time': u'2022-07-26T21:10:47.743214+00:00'}, {u'comment': u'Updated by 2 observations', u'user': None, u'time': u'2022-07-26T18:19:29.809016+00:00'}, {u'comment': u'Updated by 2 observations', u'user': None, u'time': u'2022-07-26T17:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Anyone have any ideas why XSOAR does not accept the API key format, and comes back with HTTP 403 ‘Forbidden’ error?&amp;nbsp; CLI command works fine...&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2022 13:59:11 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/xsoar-cisco-secure-cloud-analytics-stealthwatch-integration/m-p/511841#M1108</guid>
      <dc:creator>QShah</dc:creator>
      <dc:date>2022-08-15T13:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: XSOAR Cisco Secure Cloud Analytics (stealthwatch) integration</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/xsoar-cisco-secure-cloud-analytics-stealthwatch-integration/m-p/516133#M1238</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/230820"&gt;@QShah&lt;/a&gt;&amp;nbsp;– The required format for the Stealthwatch Cloud API key is:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;ApiKey &amp;lt;username&amp;gt;:&amp;lt;apikey&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please note the space after "ApiKey", which is consistent with your custom script. Per your post, you tried with a colon after "ApiKey" and with nothing after "ApiKey", but not with a space.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that still doesn't work, please open a support case with all of your findings, logs, and working code from this post.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2022 23:17:13 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/xsoar-cisco-secure-cloud-analytics-stealthwatch-integration/m-p/516133#M1238</guid>
      <dc:creator>asawyer</dc:creator>
      <dc:date>2022-09-27T23:17:13Z</dc:date>
    </item>
  </channel>
</rss>

