From 97f9f8403a42f370832457fd68d9715fb57bbe9f Mon Sep 17 00:00:00 2001 From: Conor <93926445+cmcnally-r7@users.noreply.github.com> Date: Mon, 26 Aug 2024 15:31:58 +0100 Subject: [PATCH] Okta 4.2.10 (#2728) * Okta 4.2.10 * Fix sca & update help.md with vh * Change wording of logging --- plugins/okta/.CHECKSUM | 6 +++--- plugins/okta/bin/komand_okta | 2 +- plugins/okta/help.md | 1 + plugins/okta/komand_okta/tasks/monitor_logs/task.py | 5 +++++ plugins/okta/plugin.spec.yaml | 3 ++- plugins/okta/setup.py | 2 +- 6 files changed, 13 insertions(+), 6 deletions(-) diff --git a/plugins/okta/.CHECKSUM b/plugins/okta/.CHECKSUM index b1d4decd2d..c96cd8d3ec 100644 --- a/plugins/okta/.CHECKSUM +++ b/plugins/okta/.CHECKSUM @@ -1,7 +1,7 @@ { - "spec": "a9a2aacf5cad511f44d123437623fc0c", - "manifest": "776a43f35f3c6c84ede0c4f661c46fa7", - "setup": "47bae9aa9e36a59aa32a487d490566a5", + "spec": "682c8c8ca89ce258dd285f46885d55eb", + "manifest": "1f68b95d50a9df7a60cb482eff65c5b6", + "setup": "998ad63c0126a7c38ec7ab6ed7f7de08", "schemas": [ { "identifier": "add_user_to_group/schema.py", diff --git a/plugins/okta/bin/komand_okta b/plugins/okta/bin/komand_okta index f9f90400f4..b3fba2e1e1 100755 --- a/plugins/okta/bin/komand_okta +++ b/plugins/okta/bin/komand_okta @@ -6,7 +6,7 @@ from sys import argv Name = "Okta" Vendor = "rapid7" -Version = "4.2.9" +Version = "4.2.10" Description = "[Okta](https://www.okta.com/) is a SSO and account lifecycle management provider that allows companies to integrate their central user account system with a wide variety of other applications and services" diff --git a/plugins/okta/help.md b/plugins/okta/help.md index 752c4c683c..dad4925989 100644 --- a/plugins/okta/help.md +++ b/plugins/okta/help.md @@ -1598,6 +1598,7 @@ Actions may fail depending on the state of the resource you attempt to operate o # Version History +* 4.2.10 - Monitor Logs Task: Add exception handling if invalid subdomain provided * 4.2.9 - SDK Bump to 6.1.0 | Task Connection test added * 4.2.8 - Connection: Set appropriate error code when domain is invalid * 4.2.7 - Updated to include latest SDK v5.4.9 | Task `Monitor Logs` updated to increase max lookback cutoff to 7 days diff --git a/plugins/okta/komand_okta/tasks/monitor_logs/task.py b/plugins/okta/komand_okta/tasks/monitor_logs/task.py index ee3fabf926..f42fd4b616 100755 --- a/plugins/okta/komand_okta/tasks/monitor_logs/task.py +++ b/plugins/okta/komand_okta/tasks/monitor_logs/task.py @@ -76,6 +76,11 @@ def run(self, params={}, state={}, custom_config={}): # pylint: disable=unused- except ApiException as error: self.logger.info(f"An API Exception has been raised. Status code: {error.status_code}. Error: {error}") return [], state, False, error.status_code, error + except ConnectionError as error: + self.logger.info( + "The connection has failed, perhaps due to an invalid subdomain.\nPlease ensure the subdomain conforms to these potential formats: \n./*.okta.com ./*.oktapreview.com ./*.okta-emea.com\n" + ) + return [], state, False, 401, PluginException(preset=PluginException.Preset.NOT_FOUND, data=error) except Exception as error: self.logger.info(f"An Exception has been raised. Error: {error}") return [], state, False, 500, PluginException(preset=PluginException.Preset.UNKNOWN, data=error) diff --git a/plugins/okta/plugin.spec.yaml b/plugins/okta/plugin.spec.yaml index 8e532e554b..e2ca50e627 100644 --- a/plugins/okta/plugin.spec.yaml +++ b/plugins/okta/plugin.spec.yaml @@ -14,7 +14,7 @@ sdk: user: nobody description: "[Okta](https://www.okta.com/) is a SSO and account lifecycle management provider that allows companies to integrate their central user account system with a wide variety of other applications and services" -version: 4.2.9 +version: 4.2.10 connection_version: 4 resources: source_url: https://github.com/rapid7/insightconnect-plugins/tree/master/plugins/okta @@ -30,6 +30,7 @@ hub_tags: keywords: [sso, provisioning, deprovisioning, saml, cloud_enabled] features: [] version_history: + - "4.2.10 - Monitor Logs Task: Add exception handling if invalid subdomain provided" - "4.2.9 - SDK Bump to 6.1.0 | Task Connection test added" - "4.2.8 - Connection: Set appropriate error code when domain is invalid" - "4.2.7 - Updated to include latest SDK v5.4.9 | Task `Monitor Logs` updated to increase max lookback cutoff to 7 days" diff --git a/plugins/okta/setup.py b/plugins/okta/setup.py index 329e174663..afb0b24484 100644 --- a/plugins/okta/setup.py +++ b/plugins/okta/setup.py @@ -3,7 +3,7 @@ setup(name="okta-rapid7-plugin", - version="4.2.9", + version="4.2.10", description="[Okta](https://www.okta.com/) is a SSO and account lifecycle management provider that allows companies to integrate their central user account system with a wide variety of other applications and services", author="rapid7", author_email="",