From d8889540bb141952fb06870e9f8e1b32e76ffd4e Mon Sep 17 00:00:00 2001 From: Robert <144030336+rbowden-r7@users.noreply.github.com> Date: Tue, 10 Sep 2024 11:45:24 +0100 Subject: [PATCH] SOAR-17698-Updating the constant mapping for the USBCOM region (#2778) --- plugins/mimecast/.CHECKSUM | 6 +++--- plugins/mimecast/bin/komand_mimecast | 2 +- plugins/mimecast/help.md | 1 + plugins/mimecast/komand_mimecast/util/constants.py | 13 ++++++++++++- plugins/mimecast/komand_mimecast/util/util.py | 5 ++++- plugins/mimecast/plugin.spec.yaml | 3 ++- plugins/mimecast/setup.py | 2 +- 7 files changed, 24 insertions(+), 8 deletions(-) diff --git a/plugins/mimecast/.CHECKSUM b/plugins/mimecast/.CHECKSUM index e5cdda2129..56cf132cf0 100644 --- a/plugins/mimecast/.CHECKSUM +++ b/plugins/mimecast/.CHECKSUM @@ -1,7 +1,7 @@ { - "spec": "d4c13922e4697fbe238407bfead947a6", - "manifest": "17c12af7d004c29569412c88708d0dbe", - "setup": "6ba25ff17bf993b681d3d1ad000b7062", + "spec": "b143b1d54f9da70ca370e6411fda8521", + "manifest": "6424ea420e9efa1c84e62c188ec5c7a5", + "setup": "0341b12a504b4a79cb41be01bf44cc24", "schemas": [ { "identifier": "add_group_member/schema.py", diff --git a/plugins/mimecast/bin/komand_mimecast b/plugins/mimecast/bin/komand_mimecast index 5ac3995f2c..b223b347e3 100755 --- a/plugins/mimecast/bin/komand_mimecast +++ b/plugins/mimecast/bin/komand_mimecast @@ -6,7 +6,7 @@ from sys import argv Name = "Mimecast" Vendor = "rapid7" -Version = "5.3.16" +Version = "5.3.17" Description = "[Mimecast](https://www.mimecast.com) is a set of cloud services designed to provide next generation protection against advanced email-borne threats such as malicious URLs, malware, impersonation attacks, as well as internally generated threats, with a focus on email security. This plugin utilizes the [Mimecast API](https://www.mimecast.com/developer/documentation)" diff --git a/plugins/mimecast/help.md b/plugins/mimecast/help.md index 5b70a1be25..826e4c6e9d 100644 --- a/plugins/mimecast/help.md +++ b/plugins/mimecast/help.md @@ -1014,6 +1014,7 @@ For the Create Managed URL action, the URL must include `http://` or `https://` # Version History +* 5.3.17 - Task `monitor_siem_logs` update the mapping used for the USBCOM region * 5.3.16 - Task `monitor_siem_logs` Limit the number of events per run to 7500 | bump SDK to version 6.1.0 * 5.3.15 - Fix snyk vulnerabilities | bump SDK to version 6.0.1 | Allow for the task connection tests to pass back a message along side a status * 5.3.14 - Improving task connection tests logging | bump SDK to version 5.6.1 diff --git a/plugins/mimecast/komand_mimecast/util/constants.py b/plugins/mimecast/komand_mimecast/util/constants.py index 73aade9f11..78639a9b36 100644 --- a/plugins/mimecast/komand_mimecast/util/constants.py +++ b/plugins/mimecast/komand_mimecast/util/constants.py @@ -1,6 +1,17 @@ API = "/api" REGIONS = ["EU", "DE", "US", "CA", "ZA", "AU", "Offshore", "Sandbox", "USB", "USBCOM"] -HOSTS = ["eu-api", "de-api", "us-api", "ca-api", "za-api", "au-api", "je-api", "sandbox-api", "usb-api", "uspcom-api"] +HOSTS = [ + "eu-api", + "de-api", + "us-api", + "ca-api", + "za-api", + "au-api", + "je-api", + "sandbox-api", + "usb-api", + "uspcom-api.mimecast-pscom-us", +] BASE_HOSTNAME_MAP = dict(zip(REGIONS, HOSTS)) DEFAULT_REGION = "EU" DATA_FIELD = "data" diff --git a/plugins/mimecast/komand_mimecast/util/util.py b/plugins/mimecast/komand_mimecast/util/util.py index b4945ea2e4..c7c7085aef 100644 --- a/plugins/mimecast/komand_mimecast/util/util.py +++ b/plugins/mimecast/komand_mimecast/util/util.py @@ -6,7 +6,10 @@ class Utils: @staticmethod def prepare_base_url(region: str = DEFAULT_REGION) -> str: - return f"https://{BASE_HOSTNAME_MAP.get(region)}.mimecast.com" + if region == "USBCOM": + return f"https://{BASE_HOSTNAME_MAP.get(region)}.com" + else: + return f"https://{BASE_HOSTNAME_MAP.get(region)}.mimecast.com" @staticmethod def normalize(key: str, value: str) -> dict: diff --git a/plugins/mimecast/plugin.spec.yaml b/plugins/mimecast/plugin.spec.yaml index 83507da579..77d8c509d8 100644 --- a/plugins/mimecast/plugin.spec.yaml +++ b/plugins/mimecast/plugin.spec.yaml @@ -17,7 +17,7 @@ links: - "[Mimecast](http://mimecast.com)" references: - "[Mimecast API](https://www.mimecast.com/developer/documentation)" -version: 5.3.16 +version: 5.3.17 connection_version: 5 supported_versions: ["Mimecast API 2024-06-18"] vendor: rapid7 @@ -40,6 +40,7 @@ hub_tags: keywords: [mimecast, email, cloud_enabled] features: [] version_history: +- "5.3.17 - Task `monitor_siem_logs` update the mapping used for the USBCOM region" - "5.3.16 - Task `monitor_siem_logs` Limit the number of events per run to 7500 | bump SDK to version 6.1.0" - "5.3.15 - Fix snyk vulnerabilities | bump SDK to version 6.0.1 | Allow for the task connection tests to pass back a message along side a status" - "5.3.14 - Improving task connection tests logging | bump SDK to version 5.6.1" diff --git a/plugins/mimecast/setup.py b/plugins/mimecast/setup.py index 791866e494..53ce88dc13 100755 --- a/plugins/mimecast/setup.py +++ b/plugins/mimecast/setup.py @@ -3,7 +3,7 @@ setup(name="mimecast-rapid7-plugin", - version="5.3.16", + version="5.3.17", description="[Mimecast](https://www.mimecast.com) is a set of cloud services designed to provide next generation protection against advanced email-borne threats such as malicious URLs, malware, impersonation attacks, as well as internally generated threats, with a focus on email security. This plugin utilizes the [Mimecast API](https://www.mimecast.com/developer/documentation)", author="rapid7", author_email="",