Skip to content

Commit

Permalink
SOAR-17021-Adding in a connection test for task (#2581)
Browse files Browse the repository at this point in the history
* SOAR-17021-Adding in a connection test for task

* SOAR-17021-Adding in a connection test for task

* SOAR-17021-Adding in a connection test for task

* SOAR-17021-Adding in a connection test for task

* SOAR-17021-Adding in a connection test for task

* SOAR-17021-Adding in a connection test for task
  • Loading branch information
rbowden-r7 authored and Dympna Laverty committed Jun 18, 2024
1 parent b06970a commit c4a9e50
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 8 deletions.
6 changes: 3 additions & 3 deletions plugins/mimecast/.CHECKSUM
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"spec": "2d101ebff407edd94c5757f53b5c11be",
"manifest": "1ab68873d2a221ff0ffb1a412f9747b4",
"setup": "5b681969411ccd987549d822b165cc8d",
"spec": "81ae590a7dff160854b0f0d45ea33a60",
"manifest": "8b809555540a84bd55faa2f3a0f131c5",
"setup": "d68363a9feac9751efa37d92abe9393e",
"schemas": [
{
"identifier": "add_group_member/schema.py",
Expand Down
2 changes: 1 addition & 1 deletion plugins/mimecast/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=linux/amd64 rapid7/insightconnect-python-3-slim-plugin:5.4.9
FROM --platform=linux/amd64 rapid7/insightconnect-python-3-slim-plugin:5.5.3

LABEL organization=rapid7
LABEL sdk=python
Expand Down
2 changes: 1 addition & 1 deletion plugins/mimecast/bin/komand_mimecast
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ from sys import argv

Name = "Mimecast"
Vendor = "rapid7"
Version = "5.3.12"
Version = "5.3.13"
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)"


Expand Down
1 change: 1 addition & 0 deletions plugins/mimecast/help.md
Original file line number Diff line number Diff line change
Expand Up @@ -1014,6 +1014,7 @@ Example output:

# Version History

* 5.3.13 - Adding in task connection tests | bump SDK to version 5.5.3
* 5.3.12 - Task `monitor_siem_logs` to ingest events if there is no datetime field | bump version of werkzeug used
* 5.3.11 - Task `monitor_siem_logs` to now use 24hrs as initial lookback, then 7 days for normal running | Task `monitor_siem_logs` allowing for a date to be supplied as a custom config | Task `monitor_siem_logs` to now log the request id of failed request to Mimecast | bump SDK to version 5.4.9
* 5.3.10 - Task `monitor_siem_logs`: To move token to next file even if there is no files found | bump SDK to 5.4.7
Expand Down
9 changes: 9 additions & 0 deletions plugins/mimecast/komand_mimecast/connection/connection.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import insightconnect_plugin_runtime
from insightconnect_plugin_runtime.exceptions import ConnectionTestException
from komand_mimecast.util.exceptions import ApiClientException
from komand_mimecast.util import util
from komand_mimecast.util.api import MimecastAPI
from .schema import ConnectionSchema, Input
Expand Down Expand Up @@ -37,3 +38,11 @@ def test(self):
data=response.get(FAIL_FIELD),
)
return {"success": True}

def test_task(self):
try:
_, _, _ = self.client.get_siem_logs("")
return {"success": True}
except ApiClientException as error:
self.logger.error(error)
raise ConnectionTestException(cause=error.cause, assistance=error.assistance, data=error.data)
5 changes: 3 additions & 2 deletions plugins/mimecast/plugin.spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ links:
- "[Mimecast](http://mimecast.com)"
references:
- "[Mimecast API](https://www.mimecast.com/developer/documentation)"
version: 5.3.12
version: 5.3.13
connection_version: 5
supported_versions: ["Mimecast API 2024-05-09"]
vendor: rapid7
support: rapid7
cloud_ready: true
sdk:
type: slim
version: 5.4.9
version: 5.5.3
user: nobody
status: []
resources:
Expand All @@ -40,6 +40,7 @@ hub_tags:
keywords: [mimecast, email, cloud_enabled]
features: []
version_history:
- "5.3.13 - Adding in task connection tests | bump SDK to version 5.5.3"
- "5.3.12 - Task `monitor_siem_logs` to ingest events if there is no datetime field | bump version of werkzeug used"
- "5.3.11 - Task `monitor_siem_logs` to now use 24hrs as initial lookback, then 7 days for normal running | Task `monitor_siem_logs` allowing for a date to be supplied as a custom config | Task `monitor_siem_logs` to now log the request id of failed request to Mimecast | bump SDK to version 5.4.9"
- "5.3.10 - Task `monitor_siem_logs`: To move token to next file even if there is no files found | bump SDK to 5.4.7"
Expand Down
2 changes: 1 addition & 1 deletion plugins/mimecast/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


setup(name="mimecast-rapid7-plugin",
version="5.3.12",
version="5.3.13",
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="",
Expand Down

0 comments on commit c4a9e50

Please sign in to comment.