From 4bcdc375c02b9fba14b31422eb9643feb169d679 Mon Sep 17 00:00:00 2001 From: rmurray-r7 Date: Mon, 28 Oct 2024 14:42:41 +0000 Subject: [PATCH] [SOAR-18025] Cloudflare - Snyk Vulnerability, SDK Bump and Unit test fix (#2905) * snyk, sdk and unit test fix * fixing unit test paths * \n * Fixing help.md --- plugins/cloudflare/.CHECKSUM | 20 +- plugins/cloudflare/Dockerfile | 18 +- plugins/cloudflare/bin/icon_cloudflare | 24 +- plugins/cloudflare/help.md | 613 +++++++++--------- .../icon_cloudflare/actions/__init__.py | 15 +- .../actions/createZoneAccessRule/__init__.py | 2 +- .../actions/createZoneAccessRule/schema.py | 113 +--- .../actions/deleteZoneAccessRule/__init__.py | 2 +- .../actions/deleteZoneAccessRule/schema.py | 16 +- .../actions/getAccounts/__init__.py | 2 +- .../actions/getAccounts/schema.py | 197 ++---- .../actions/getLists/__init__.py | 2 +- .../actions/getLists/schema.py | 57 +- .../actions/getZoneAccessRules/__init__.py | 2 +- .../actions/getZoneAccessRules/schema.py | 113 +--- .../actions/getZones/__init__.py | 2 +- .../actions/getZones/schema.py | 553 ++++++---------- .../icon_cloudflare/connection/__init__.py | 2 +- .../icon_cloudflare/connection/schema.py | 18 +- .../icon_cloudflare/tasks/__init__.py | 2 + .../icon_cloudflare/triggers/__init__.py | 3 +- .../icon_cloudflare/util/helpers.py | 8 +- plugins/cloudflare/plugin.spec.yaml | 31 +- plugins/cloudflare/requirements.txt | 2 +- plugins/cloudflare/setup.py | 4 +- .../unit_test/test_create_zone_access_rule.py | 2 +- .../unit_test/test_delete_zone_access_rule.py | 2 +- .../cloudflare/unit_test/test_get_accounts.py | 2 +- .../cloudflare/unit_test/test_get_lists.py | 2 +- .../unit_test/test_get_zone_access_rules.py | 2 +- .../cloudflare/unit_test/test_get_zones.py | 2 +- 31 files changed, 760 insertions(+), 1073 deletions(-) mode change 100755 => 100644 plugins/cloudflare/help.md create mode 100644 plugins/cloudflare/icon_cloudflare/tasks/__init__.py diff --git a/plugins/cloudflare/.CHECKSUM b/plugins/cloudflare/.CHECKSUM index b998c3594d..b95f3825eb 100644 --- a/plugins/cloudflare/.CHECKSUM +++ b/plugins/cloudflare/.CHECKSUM @@ -1,35 +1,35 @@ { - "spec": "fe53c542f3b291d041d4a252ce4094ee", - "manifest": "1121dcc90662f0aa4d35713f5748ff87", - "setup": "ed76788111135900c021c6676b2d4785", + "spec": "17d49926f52933cd5a744f82039f2ffb", + "manifest": "f547bed16c5601f68b2547a7fb26806c", + "setup": "46f973133df4e5e84d5e9d6c1394e711", "schemas": [ { "identifier": "createZoneAccessRule/schema.py", - "hash": "e659fecf60f6568eef94a6eeb5d2d2af" + "hash": "bcb7805d78e35adb55b83805d2b851b6" }, { "identifier": "deleteZoneAccessRule/schema.py", - "hash": "b3ca7e6fda35f9155f052491b6637b82" + "hash": "992eb6fe2e85cd9f1fdcc3de0717131a" }, { "identifier": "getAccounts/schema.py", - "hash": "42d2852c752661b498fbe4e58c5d815f" + "hash": "0d0406706b0f0804daae4490ee3259a4" }, { "identifier": "getLists/schema.py", - "hash": "655aadce3b13eca92e61e63f572d3f7b" + "hash": "eeb2e7f22904112e8999f09337e3f11c" }, { "identifier": "getZoneAccessRules/schema.py", - "hash": "e55a70ab8e16ed8d37f2d8d97af64369" + "hash": "aca2d59713088dbe9c352a2385ca2746" }, { "identifier": "getZones/schema.py", - "hash": "a4440f0524b6d4582986fc0580e95faf" + "hash": "26bc28ab7033fd33bdfc2a8a96cfe7ae" }, { "identifier": "connection/schema.py", - "hash": "922e1bccbfd76e8eb2367ae1b18c51d2" + "hash": "0def942bad267cc268e86f8a6aad2f15" } ] } \ No newline at end of file diff --git a/plugins/cloudflare/Dockerfile b/plugins/cloudflare/Dockerfile index 4ae174a4ca..57520da5af 100755 --- a/plugins/cloudflare/Dockerfile +++ b/plugins/cloudflare/Dockerfile @@ -1,26 +1,20 @@ -FROM rapid7/insightconnect-python-3-38-plugin:4 -# Refer to the following documentation for available SDK parent images: https://komand.github.io/python/sdk.html#version +FROM --platform=linux/amd64 rapid7/insightconnect-python-3-slim-plugin:6.1.4 LABEL organization=rapid7 LABEL sdk=python -# Add any custom package dependencies here -# NOTE: Add pip packages to requirements.txt - -# End package dependencies - -# Add source code WORKDIR /python/src + ADD ./plugin.spec.yaml /plugin.spec.yaml -ADD . /python/src +ADD ./requirements.txt /python/src/requirements.txt -# Install pip dependencies RUN if [ -f requirements.txt ]; then pip install -r requirements.txt; fi -# Install plugin +ADD . /python/src + RUN python setup.py build && python setup.py install # User to run plugin code. The two supported users are: root, nobody USER nobody -ENTRYPOINT ["/usr/local/bin/icon_cloudflare"] \ No newline at end of file +ENTRYPOINT ["/usr/local/bin/icon_cloudflare"] diff --git a/plugins/cloudflare/bin/icon_cloudflare b/plugins/cloudflare/bin/icon_cloudflare index b3cfd75de7..220e3e7007 100755 --- a/plugins/cloudflare/bin/icon_cloudflare +++ b/plugins/cloudflare/bin/icon_cloudflare @@ -1,12 +1,12 @@ #!/usr/bin/env python -# GENERATED BY KOMAND SDK - DO NOT EDIT +# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT import os import json from sys import argv Name = "Cloudflare" Vendor = "rapid7" -Version = "1.0.0" +Version = "1.0.1" Description = "Cloudflare is a global network designed to make everything you connect to the Internet secure, private, fast, and reliable. This plugin allows you to list accounts, zones, zone access rules and lists and create or delete access rules for specific zones" @@ -23,7 +23,7 @@ def main(): monkey.patch_all() import insightconnect_plugin_runtime - from icon_cloudflare import connection, actions, triggers + from icon_cloudflare import connection, actions, triggers, tasks class ICONCloudflare(insightconnect_plugin_runtime.Plugin): def __init__(self): @@ -34,18 +34,18 @@ def main(): description=Description, connection=connection.Connection() ) - self.add_action(actions.CreateZoneAccessRule()) - - self.add_action(actions.DeleteZoneAccessRule()) - self.add_action(actions.GetAccounts()) - + + self.add_action(actions.GetZones()) + self.add_action(actions.GetLists()) - + + self.add_action(actions.CreateZoneAccessRule()) + + self.add_action(actions.DeleteZoneAccessRule()) + self.add_action(actions.GetZoneAccessRules()) - - self.add_action(actions.GetZones()) - + """Run plugin""" cli = insightconnect_plugin_runtime.CLI(ICONCloudflare()) diff --git a/plugins/cloudflare/help.md b/plugins/cloudflare/help.md old mode 100755 new mode 100644 index 4ed2b367ea..4f944cd086 --- a/plugins/cloudflare/help.md +++ b/plugins/cloudflare/help.md @@ -36,11 +36,11 @@ For all zones: ## Setup -The connection configuration accepts the following parameters: +The connection configuration accepts the following parameters: -|Name|Type|Default|Required|Description|Enum|Example| -|----|----|-------|--------|-----------|----|-------| -|apiToken|credential_secret_key|None|True|A Cloudflare API token with a specific scope and permissions|None|{"secretKey": "ABc123456789s-TeSt987654_3x4mpleTOkeN012"}| +|Name|Type|Default|Required|Description|Enum|Example|Placeholder|Tooltip| +| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | +|apiToken|credential_secret_key|None|True|A Cloudflare API token with a specific scope and permissions|None|{"secretKey": "ABc123456789s-TeSt987654_3x4mpleTOkeN012"}|None|None| Example input: @@ -56,114 +56,6 @@ Example input: ### Actions -#### Get Zone Access Rules - -This action is used to fetch IP Access rules of a zone. You can filter the results using several optional parameters. - -##### Input - -|Name|Type|Default|Required|Description|Enum|Example| -|----|----|-------|--------|-----------|----|-------| -|configurationTarget|string|all|False|The target to search in existing rules|['all', 'IP address', 'IP range', 'ASN', 'country']|IP address| -|configurationValue|string|None|False|The target value to search for in existing rules|None|198.51.100.1| -|direction|string|desc|False|Direction to order results|['desc', 'asc']|desc| -|match|string|all|False|Whether to match all search requirements or at least one (any)|['all', 'any']|all| -|mode|string|all|False|The action that was applied to a matched request|['all', 'block', 'challenge', 'whitelist', 'JS challenge', 'managed challenge']|all| -|notes|string|None|False|The string to search for in the notes of existing IP Access rules|None|My notes| -|order|string|mode|False|Field to order zones by|['configuration target', 'configuration value', 'mode']|mode| -|page|integer|None|False|Page number of paginated results|None|1| -|perPage|integer|None|False|Maximum number of results per page|None|10| -|zoneId|string|None|True|The ID of the zone for which you want to list the access rules|None|9de5069c5afe602b2ea0a04b66beb2c0| - -Example input: - -``` -{ - "configurationTarget": "IP address", - "configurationValue": "198.51.100.1", - "direction": "desc", - "match": "all", - "mode": "all", - "notes": "My notes", - "order": "mode", - "page": 1, - "perPage": 10, - "zoneId": "9de5069c5afe602b2ea0a04b66beb2c0" -} -``` - -##### Output - -|Name|Type|Required|Description|Example| -|----|----|--------|-----------|-------| -|accessRules|[]accessRule|False|List of zone access rules|[]| - -Example output: - -``` -{ - "accessRules": [ - { - "id": "9de5069c5afe602b2ea0a04b66beb2c0", - "paused": false, - "modifiedOn": "2023-02-15T13:10:28.008463675Z", - "allowedModes": [ - "whitelist", - "block", - "challenge", - "js_challenge", - "managed_challenge" - ], - "mode": "block", - "notes": "My notes", - "configuration": { - "target": "ip", - "value": "198.51.100.1" - }, - "scope": { - "id": "9de5069c5afe602b2ea0a04b66beb2c0", - "name": "example.com", - "type": "zone" - }, - "createdOn": "2023-02-15T13:10:28.008463675Z" - } - ] -} -``` - -#### Delete Zone Access Rule - -This action is used to delete an IP access rule defined at the zone level. - -##### Input - -|Name|Type|Default|Required|Description|Enum|Example| -|----|----|-------|--------|-----------|----|-------| -|ruleId|string|None|True|ID of the access rule you want to delete|None|9de5069c5afe602b2ea0a04b66beb2c0| -|zoneId|string|None|True|ID of the zone for which you want to delete an access rule|None|9de5069c5afe602b2ea0a04b66beb2c0| - -Example input: - -``` -{ - "ruleId": "9de5069c5afe602b2ea0a04b66beb2c0", - "zoneId": "9de5069c5afe602b2ea0a04b66beb2c0" -} -``` - -##### Output - -|Name|Type|Required|Description|Example| -|----|----|--------|-----------|-------| -|success|boolean|True|Whether the action was successful|True| - -Example output: - -``` -{ - "success": true -} -``` #### Create Zone Access Rule @@ -171,15 +63,13 @@ This action creates a new access rule for a zone. ##### Input -|Name|Type|Default|Required|Description|Enum|Example| -|----|----|-------|--------|-----------|----|-------| -|mode|string|block|True|The action to apply to a matched request|['block', 'challenge', 'whitelist', 'JS challenge', 'managed challenge']|block| -|notes|string|None|False|An informative summary of the rule, typically used as a reminder or explanation|None|This rule is enabled because of an event that occurred on date X| -|target|string|None|True|The configuration target in which you can specify IPv4, IPv6, IP range, AS number or two-letter ISO-3166-1 alpha-2 country code|None|198.51.100.1| -|zoneId|string|None|True|ID of the zone for which you want to create an access rule|None|9de5069c5afe602b2ea0a04b66beb2c0| - -More information about the configuration target can be found [here](https://developers.cloudflare.com/waf/tools/ip-access-rules/parameters/). - +|Name|Type|Default|Required|Description|Enum|Example|Placeholder|Tooltip| +| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | +|mode|string|block|True|The action to apply to a matched request|["block", "challenge", "whitelist", "JS challenge", "managed challenge"]|block|None|None| +|notes|string|None|False|An informative summary of the rule, typically used as a reminder or explanation|None|This rule is enabled because of an event that occurred on date X|None|None| +|target|string|None|True|The configuration target in which you can specify IPv4, IPv6, IP range, AS number or two-letter ISO-3166-1 alpha-2 country code|None|198.51.100.1|None|None| +|zoneId|string|None|True|ID of the zone for which you want to create an access rule|None|9de5069c5afe602b2ea0a04b66beb2c0|None|None| + Example input: ``` @@ -194,9 +84,9 @@ Example input: ##### Output |Name|Type|Required|Description|Example| -|----|----|--------|-----------|-------| +| :--- | :--- | :--- | :--- | :--- | |accessRule|accessRule|False|Information about the created access rule|{}| - + Example output: ``` @@ -228,19 +118,53 @@ Example output: } ``` +#### Delete Zone Access Rule + +This action is used to delete an IP access rule defined at the zone level. + +##### Input + +|Name|Type|Default|Required|Description|Enum|Example|Placeholder|Tooltip| +| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | +|ruleId|string|None|True|ID of the access rule you want to delete|None|9de5069c5afe602b2ea0a04b66beb2c0|None|None| +|zoneId|string|None|True|ID of the zone for which you want to delete an access rule|None|9de5069c5afe602b2ea0a04b66beb2c0|None|None| + +Example input: + +``` +{ + "ruleId": "9de5069c5afe602b2ea0a04b66beb2c0", + "zoneId": "9de5069c5afe602b2ea0a04b66beb2c0" +} +``` + +##### Output + +|Name|Type|Required|Description|Example| +| :--- | :--- | :--- | :--- | :--- | +|success|boolean|True|Whether the action was successful|True| + +Example output: + +``` +{ + "success": true +} +``` + #### Get Accounts This action is used to list all accounts you have ownership or verified access to. ##### Input -|Name|Type|Default|Required|Description|Enum|Example| -|----|----|-------|--------|-----------|----|-------| -|direction|string|desc|False|Direction to order results|['desc', 'asc']|desc| -|name|string|None|False|Name of the account|None|Example Account| -|page|integer|None|False|Page number of paginated results|None|1| -|perPage|integer|None|False|Maximum number of results per page|None|10| - +|Name|Type|Default|Required|Description|Enum|Example|Placeholder|Tooltip| +| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | +|direction|string|desc|False|Direction to order results|["desc", "asc"]|desc|None|None| +|name|string|None|False|Name of the account|None|Example Account|None|None| +|page|integer|None|False|Page number of paginated results|None|1|None|None| +|perPage|integer|None|False|Maximum number of results per page|None|10|None|None| + Example input: ``` @@ -255,9 +179,9 @@ Example input: ##### Output |Name|Type|Required|Description|Example| -|----|----|--------|-----------|-------| +| :--- | :--- | :--- | :--- | :--- | |accounts|[]account|False|List of accounts|[]| - + Example output: ``` @@ -290,10 +214,10 @@ This action is used to fetch all lists in the account. ##### Input -|Name|Type|Default|Required|Description|Enum|Example| -|----|----|-------|--------|-----------|----|-------| -|accountId|string|None|True|Identifier of the account|None|9de5069c5afe602b2ea0a04b66beb2c0| - +|Name|Type|Default|Required|Description|Enum|Example|Placeholder|Tooltip| +| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | +|accountId|string|None|True|Identifier of the account|None|9de5069c5afe602b2ea0a04b66beb2c0|None|None| + Example input: ``` @@ -305,9 +229,9 @@ Example input: ##### Output |Name|Type|Required|Description|Example| -|----|----|--------|-----------|-------| +| :--- | :--- | :--- | :--- | :--- | |lists|[]list|False|Results containing all lists in the account|[]| - + Example output: ``` @@ -327,24 +251,99 @@ Example output: } ``` -#### Get Zones +#### Get Zone Access Rules -This action is used to list your zones using different filters. +This action is used to fetch IP Access rules of a zone. You can filter the results using several optional parameters. ##### Input -|Name|Type|Default|Required|Description|Enum|Example| -|----|----|-------|--------|-----------|----|-------| -|accountId|string|None|False|Identifier of the account|None|9de5069c5afe602b2ea0a04b66beb2c0| -|accountName|string|None|False|Name of the account|None|Example Account| -|direction|string|desc|False|Direction to order results|['desc', 'asc']|desc| -|match|string|all|False|Whether to match all search requirements or at least one (any)|['all', 'any']|all| -|name|string|None|False|Name of the domain|None|example.com| -|order|string|name|False|Field to order zones by|['account ID', 'account name', 'name', 'status']|name| -|page|integer|None|False|Page number of paginated results|None|1| -|perPage|integer|None|False|Maximum number of results per page|None|10| -|status|string|all|False|Status of the zone|['all', 'active', 'pending', 'initializing', 'moved', 'deleted', 'deactivated']|all| +|Name|Type|Default|Required|Description|Enum|Example|Placeholder|Tooltip| +| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | +|configurationTarget|string|all|False|The target to search in existing rules|["all", "IP address", "IP range", "ASN", "country"]|IP address|None|None| +|configurationValue|string|None|False|The target value to search for in existing rules|None|198.51.100.1|None|None| +|direction|string|desc|False|Direction to order results|["desc", "asc"]|desc|None|None| +|match|string|all|False|Whether to match all search requirements or at least one (any)|["all", "any"]|all|None|None| +|mode|string|all|False|The action that was applied to a matched request|["all", "block", "challenge", "whitelist", "JS challenge", "managed challenge"]|all|None|None| +|notes|string|None|False|The string to search for in the notes of existing IP Access rules|None|My notes|None|None| +|order|string|mode|False|Field to order zones by|["configuration target", "configuration value", "mode"]|mode|None|None| +|page|integer|None|False|Page number of paginated results|None|1|None|None| +|perPage|integer|None|False|Maximum number of results per page|None|10|None|None| +|zoneId|string|None|True|The ID of the zone for which you want to list the access rules|None|9de5069c5afe602b2ea0a04b66beb2c0|None|None| + +Example input: + +``` +{ + "configurationTarget": "IP address", + "configurationValue": "198.51.100.1", + "direction": "desc", + "match": "all", + "mode": "all", + "notes": "My notes", + "order": "mode", + "page": 1, + "perPage": 10, + "zoneId": "9de5069c5afe602b2ea0a04b66beb2c0" +} +``` +##### Output + +|Name|Type|Required|Description|Example| +| :--- | :--- | :--- | :--- | :--- | +|accessRules|[]accessRule|False|List of zone access rules|[]| + +Example output: + +``` +{ + "accessRules": [ + { + "id": "9de5069c5afe602b2ea0a04b66beb2c0", + "paused": false, + "modifiedOn": "2023-02-15T13:10:28.008463675Z", + "allowedModes": [ + "whitelist", + "block", + "challenge", + "js_challenge", + "managed_challenge" + ], + "mode": "block", + "notes": "My notes", + "configuration": { + "target": "ip", + "value": "198.51.100.1" + }, + "scope": { + "id": "9de5069c5afe602b2ea0a04b66beb2c0", + "name": "example.com", + "type": "zone" + }, + "createdOn": "2023-02-15T13:10:28.008463675Z" + } + ] +} +``` + +#### Get Zones + +This action is used to list your zones using different filters + +##### Input + +|Name|Type|Default|Required|Description|Enum|Example|Placeholder|Tooltip| +| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | +|accountId|string|None|False|Identifier of the account|None|9de5069c5afe602b2ea0a04b66beb2c0|None|None| +|accountName|string|None|False|Name of the account|None|Example Account|None|None| +|direction|string|desc|False|Direction to order results|["desc", "asc"]|desc|None|None| +|match|string|all|False|Whether to match all search requirements or at least one (any)|["all", "any"]|all|None|None| +|name|string|None|False|Name of the domain|None|example.com|None|None| +|order|string|name|False|Field to order zones by|["account ID", "account name", "name", "status"]|name|None|None| +|page|integer|None|False|Page number of paginated results|None|1|None|None| +|perPage|integer|None|False|Maximum number of results per page|None|10|None|None| +|status|string|all|False|Status of the zone|["all", "active", "pending", "initializing", "moved", "deleted", "deactivated"]|all|None|None| + Example input: ``` @@ -364,9 +363,9 @@ Example input: ##### Output |Name|Type|Required|Description|Example| -|----|----|--------|-----------|-------| +| :--- | :--- | :--- | :--- | :--- | |zones|[]zone|False|List of zones for given filters|[]| - + Example output: ``` @@ -485,164 +484,167 @@ Example output: ] } ``` - ### Triggers - -_This plugin does not contain any triggers._ - -### Custom Output Types - -#### accessRule - -|Name|Type|Required|Description| -|----|----|--------|-----------| -|Allowed Modes|[]string|False|Allowed modes| -|Configuration|configuration|False|Configuration| -|Created On|string|False|Created on| -|Access Rule ID|string|False|Identifier of the access rule| -|Mode|string|False|Mode| -|Modified On|string|False|Modified on| -|Paused|boolean|False|Paused| -|Scope|scope|False|Scope| - -#### account - -|Name|Type|Required|Description| -|----|----|--------|-----------| -|Created On|string|False|Created on| -|Account ID|string|False|Identifier of the account| -|Legacy Flags|legacyFlags|False|Legacy Flags| -|Account Name|string|False|Name of the account| -|Settings|settings|False|Account settings| -|Account Type|string|False|Type of the account| - -#### configuration - -|Name|Type|Required|Description| -|----|----|--------|-----------| -|Target|string|False|Target| -|Value|string|False|Value| - -#### legacyFlags - -|Name|Type|Required|Description| -|----|----|--------|-----------| -|Enterprise Zone Quota|zoneQuota|False|Enterprise Zone Quota| - -#### list - -|Name|Type|Required|Description| -|----|----|--------|-----------| -|Created On|string|False|Created on| -|Description|string|False|Description| -|List ID|string|False|Identifier of the list| -|Kind|string|False|Kind| -|Modified On|string|False|Modified on| -|List Name|string|False|Name of the list| -|Num Items|integer|False|Number of items| -|Num Referencing Filters|integer|False|Number of referencing filters| - -#### meta - -|Name|Type|Required|Description| -|----|----|--------|-----------| -|Custom Certificate Quota|integer|False|Custom certificate quota| -|Multiple Railguns Allowed|boolean|False|Multiple railguns allowed| -|Page Rule Quota|integer|False|Page rule quota| -|Phishing Detected|boolean|False|Phishing detected| -|Step|integer|False|Step| - -#### owner - -|Name|Type|Required|Description| -|----|----|--------|-----------| -|Email|string|False|Email| -|ID|string|False|ID| -|Type|string|False|Type| - -#### plan - -|Name|Type|Required|Description| -|----|----|--------|-----------| -|Can Subscribe|boolean|False|Can subscribe| -|Currency|string|False|Currency| -|Externally Managed|boolean|False|Externally managed| -|Frequency|string|False|Frequency| -|ID|string|False|ID| -|Is Subscribed|boolean|False|Is subscribed| -|Legacy Discount|boolean|False|Legacy discount| -|Legacy ID|string|False|Legacy ID| -|Name|string|False|Name| -|Price|integer|False|Price| - -#### scope - -|Name|Type|Required|Description| -|----|----|--------|-----------| -|ID|string|False|ID| -|Name|string|False|Name| -|Type|string|False|Type| - -#### settings - -|Name|Type|Required|Description| -|----|----|--------|-----------| -|API Access Enabled|boolean|False|API access enabled| -|Enforce Two Factor Authentication|boolean|False|Enforce two factor authentication| - -#### tenant - -|Name|Type|Required|Description| -|----|----|--------|-----------| -|ID|string|False|Identifier| -|Name|string|False|Name| - -#### tenantUnit - -|Name|Type|Required|Description| -|----|----|--------|-----------| -|ID|string|False|Identifier| - -#### zone - -|Name|Type|Required|Description| -|----|----|--------|-----------| -|Account|tenant|False|Account| -|Activated On|string|False|Activated on| -|Created On|string|False|Created on| -|Development Mode|integer|False|Development mode| -|Zone ID|string|False|Identifier of the zone| -|Meta|meta|False|Meta| -|Modified On|string|False|Modified on| -|Zone Name|string|False|Name of the zone| -|Name Servers|[]string|False|Name servers| -|Original DNS Host|string|False|Original DNS host| -|Original Name Servers|[]string|False|Original name servers| -|Original Registrar|string|False|Original registrar| -|Owner|owner|False|Owner| -|Paused|boolean|False|Paused| -|Permissions|[]string|False|Permissions| -|Plan|plan|False|Plan| -|Zone Status|string|False|Status of the zone| -|Tenant|tenant|False|Tenant| -|Tenant Unit|tenantUnit|False|Tenant unit| -|Type|string|False|Type of the zone| - -#### zoneQuota - -|Name|Type|Required|Description| -|----|----|--------|-----------| -|Current|integer|False|Current| -|Maximum|integer|False|Maximum| -|Available|integer|False|Available| + +*This plugin does not contain any triggers.* +### Tasks + +*This plugin does not contain any tasks.* + +### Custom Types + +**meta** + +|Name|Type|Default|Required|Description|Example| +| :--- | :--- | :--- | :--- | :--- | :--- | +|Custom Certificate Quota|integer|None|False|Custom certificate quota|None| +|Multiple Railguns Allowed|boolean|None|False|Multiple railguns allowed|None| +|Page Rule Quota|integer|None|False|Page rule quota|None| +|Phishing Detected|boolean|None|False|Phishing detected|None| +|Step|integer|None|False|Step|None| + +**owner** + +|Name|Type|Default|Required|Description|Example| +| :--- | :--- | :--- | :--- | :--- | :--- | +|Email|string|None|False|Email|None| +|ID|string|None|False|ID|None| +|Type|string|None|False|Type|None| + +**plan** + +|Name|Type|Default|Required|Description|Example| +| :--- | :--- | :--- | :--- | :--- | :--- | +|Can Subscribe|boolean|None|False|Can subscribe|None| +|Currency|string|None|False|Currency|None| +|Externally Managed|boolean|None|False|Externally managed|None| +|Frequency|string|None|False|Frequency|None| +|ID|string|None|False|ID|None| +|Is Subscribed|boolean|None|False|Is subscribed|None| +|Legacy Discount|boolean|None|False|Legacy discount|None| +|Legacy ID|string|None|False|Legacy ID|None| +|Name|string|None|False|Name|None| +|Price|integer|None|False|Price|None| + +**tenant** + +|Name|Type|Default|Required|Description|Example| +| :--- | :--- | :--- | :--- | :--- | :--- | +|ID|string|None|False|Identifier|None| +|Name|string|None|False|Name|None| + +**tenantUnit** + +|Name|Type|Default|Required|Description|Example| +| :--- | :--- | :--- | :--- | :--- | :--- | +|ID|string|None|False|Identifier|None| + +**scope** + +|Name|Type|Default|Required|Description|Example| +| :--- | :--- | :--- | :--- | :--- | :--- | +|ID|string|None|False|ID|None| +|Name|string|None|False|Name|None| +|Type|string|None|False|Type|None| + +**configuration** + +|Name|Type|Default|Required|Description|Example| +| :--- | :--- | :--- | :--- | :--- | :--- | +|Target|string|None|False|Target|None| +|Value|string|None|False|Value|None| + +**zoneQuota** + +|Name|Type|Default|Required|Description|Example| +| :--- | :--- | :--- | :--- | :--- | :--- | +|Current|integer|None|False|Current|None| +|Maximum|integer|None|False|Maximum|None| +|Available|integer|None|False|Available|None| + +**legacyFlags** + +|Name|Type|Default|Required|Description|Example| +| :--- | :--- | :--- | :--- | :--- | :--- | +|Enterprise Zone Quota|zoneQuota|None|False|Enterprise Zone Quota|None| + +**settings** + +|Name|Type|Default|Required|Description|Example| +| :--- | :--- | :--- | :--- | :--- | :--- | +|API Access Enabled|boolean|None|False|API access enabled|None| +|Enforce Two Factor Authentication|boolean|None|False|Enforce two factor authentication|None| + +**account** + +|Name|Type|Default|Required|Description|Example| +| :--- | :--- | :--- | :--- | :--- | :--- | +|Created On|string|None|False|Created on|None| +|Account ID|string|None|False|Identifier of the account|None| +|Legacy Flags|legacyFlags|None|False|Legacy Flags|None| +|Account Name|string|None|False|Name of the account|None| +|Settings|settings|None|False|Account settings|None| +|Account Type|string|None|False|Type of the account|None| + +**accessRule** + +|Name|Type|Default|Required|Description|Example| +| :--- | :--- | :--- | :--- | :--- | :--- | +|Allowed Modes|[]string|None|False|Allowed modes|None| +|Configuration|configuration|None|False|Configuration|None| +|Created On|string|None|False|Created on|None| +|Access Rule ID|string|None|False|Identifier of the access rule|None| +|Mode|string|None|False|Mode|None| +|Modified On|string|None|False|Modified on|None| +|Paused|boolean|None|False|Paused|None| +|Scope|scope|None|False|Scope|None| + +**list** + +|Name|Type|Default|Required|Description|Example| +| :--- | :--- | :--- | :--- | :--- | :--- | +|Created On|string|None|False|Created on|None| +|Description|string|None|False|Description|None| +|List ID|string|None|False|Identifier of the list|None| +|Kind|string|None|False|Kind|None| +|Modified On|string|None|False|Modified on|None| +|List Name|string|None|False|Name of the list|None| +|Num Items|integer|None|False|Number of items|None| +|Num Referencing Filters|integer|None|False|Number of referencing filters|None| + +**zone** + +|Name|Type|Default|Required|Description|Example| +| :--- | :--- | :--- | :--- | :--- | :--- | +|Account|tenant|None|False|Account|None| +|Activated On|string|None|False|Activated on|None| +|Created On|string|None|False|Created on|None| +|Development Mode|integer|None|False|Development mode|None| +|Zone ID|string|None|False|Identifier of the zone|None| +|Meta|meta|None|False|Meta|None| +|Modified On|string|None|False|Modified on|None| +|Zone Name|string|None|False|Name of the zone|None| +|Name Servers|[]string|None|False|Name servers|None| +|Original DNS Host|string|None|False|Original DNS host|None| +|Original Name Servers|[]string|None|False|Original name servers|None| +|Original Registrar|string|None|False|Original registrar|None| +|Owner|owner|None|False|Owner|None| +|Paused|boolean|None|False|Paused|None| +|Permissions|[]string|None|False|Permissions|None| +|Plan|plan|None|False|Plan|None| +|Zone Status|string|None|False|Status of the zone|None| +|Tenant|tenant|None|False|Tenant|None| +|Tenant Unit|tenantUnit|None|False|Tenant unit|None| +|Type|string|None|False|Type of the zone|None| ## Troubleshooting - -_This plugin does not contain any troubleshooting information._ + +*This plugin does not contain a troubleshooting.* # Version History +* 1.0.1 - Bumping requirements.txt | SDK bump to 6.1.4 * 1.0.0 - Initial plugin | Add Get Accounts, Get Zones, Get Lists, Get Zone Access Rules, Create Zone Access Rule and Delete Zone Access Rule actions # Links @@ -651,5 +653,4 @@ _This plugin does not contain any troubleshooting information._ ## References -* [Cloudflare](https://www.cloudflare.com) - +* [Cloudflare](https://developers.cloudflare.com/api/) \ No newline at end of file diff --git a/plugins/cloudflare/icon_cloudflare/actions/__init__.py b/plugins/cloudflare/icon_cloudflare/actions/__init__.py index c7fd8f8eb0..b4ad3e82a1 100755 --- a/plugins/cloudflare/icon_cloudflare/actions/__init__.py +++ b/plugins/cloudflare/icon_cloudflare/actions/__init__.py @@ -1,7 +1,14 @@ -# GENERATED BY KOMAND SDK - DO NOT EDIT -from .createZoneAccessRule.action import CreateZoneAccessRule -from .deleteZoneAccessRule.action import DeleteZoneAccessRule +# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT + from .getAccounts.action import GetAccounts + +from .getZones.action import GetZones + from .getLists.action import GetLists + +from .createZoneAccessRule.action import CreateZoneAccessRule + +from .deleteZoneAccessRule.action import DeleteZoneAccessRule + from .getZoneAccessRules.action import GetZoneAccessRules -from .getZones.action import GetZones + diff --git a/plugins/cloudflare/icon_cloudflare/actions/createZoneAccessRule/__init__.py b/plugins/cloudflare/icon_cloudflare/actions/createZoneAccessRule/__init__.py index 632a0422dc..12f1dce461 100755 --- a/plugins/cloudflare/icon_cloudflare/actions/createZoneAccessRule/__init__.py +++ b/plugins/cloudflare/icon_cloudflare/actions/createZoneAccessRule/__init__.py @@ -1,2 +1,2 @@ -# GENERATED BY KOMAND SDK - DO NOT EDIT +# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT from .action import CreateZoneAccessRule diff --git a/plugins/cloudflare/icon_cloudflare/actions/createZoneAccessRule/schema.py b/plugins/cloudflare/icon_cloudflare/actions/createZoneAccessRule/schema.py index c59e6ec71e..91a6d8e3b7 100755 --- a/plugins/cloudflare/icon_cloudflare/actions/createZoneAccessRule/schema.py +++ b/plugins/cloudflare/icon_cloudflare/actions/createZoneAccessRule/schema.py @@ -1,4 +1,4 @@ -# GENERATED BY KOMAND SDK - DO NOT EDIT +# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT import insightconnect_plugin_runtime import json @@ -12,14 +12,14 @@ class Input: NOTES = "notes" TARGET = "target" ZONEID = "zoneId" - + class Output: ACCESSRULE = "accessRule" - + class CreateZoneAccessRuleInput(insightconnect_plugin_runtime.Input): - schema = json.loads(""" + schema = json.loads(r""" { "type": "object", "title": "Variables", @@ -61,7 +61,8 @@ class CreateZoneAccessRuleInput(insightconnect_plugin_runtime.Input): "mode", "target", "zoneId" - ] + ], + "definitions": {} } """) @@ -70,7 +71,7 @@ def __init__(self): class CreateZoneAccessRuleOutput(insightconnect_plugin_runtime.Output): - schema = json.loads(""" + schema = json.loads(r""" { "type": "object", "title": "Variables", @@ -87,6 +88,24 @@ class CreateZoneAccessRuleOutput(insightconnect_plugin_runtime.Output): "type": "object", "title": "accessRule", "properties": { + "id": { + "type": "string", + "title": "Access Rule ID", + "description": "Identifier of the access rule", + "order": 1 + }, + "paused": { + "type": "boolean", + "title": "Paused", + "description": "Paused", + "order": 2 + }, + "modifiedOn": { + "type": "string", + "title": "Modified On", + "description": "Modified on", + "order": 3 + }, "allowedModes": { "type": "array", "title": "Allowed Modes", @@ -96,91 +115,29 @@ class CreateZoneAccessRuleOutput(insightconnect_plugin_runtime.Output): }, "order": 4 }, - "configuration": { - "$ref": "#/definitions/configuration", - "title": "Configuration", - "description": "Configuration", - "order": 6 - }, - "createdOn": { - "type": "string", - "title": "Created On", - "description": "Created on", - "order": 8 - }, - "id": { - "type": "string", - "title": "Access Rule ID", - "description": "Identifier of the access rule", - "order": 1 - }, "mode": { "type": "string", "title": "Mode", "description": "Mode", "order": 5 }, - "modifiedOn": { - "type": "string", - "title": "Modified On", - "description": "Modified on", - "order": 3 - }, - "paused": { - "type": "boolean", - "title": "Paused", - "description": "Paused", - "order": 2 + "configuration": { + "$ref": "#/definitions/configuration", + "title": "Configuration", + "description": "Configuration", + "order": 6 }, "scope": { "$ref": "#/definitions/scope", "title": "Scope", "description": "Scope", "order": 7 - } - }, - "definitions": { - "configuration": { - "type": "object", - "title": "configuration", - "properties": { - "target": { - "type": "string", - "title": "Target", - "description": "Target", - "order": 1 - }, - "value": { - "type": "string", - "title": "Value", - "description": "Value", - "order": 2 - } - } }, - "scope": { - "type": "object", - "title": "scope", - "properties": { - "id": { - "type": "string", - "title": "ID", - "description": "ID", - "order": 1 - }, - "name": { - "type": "string", - "title": "Name", - "description": "Name", - "order": 2 - }, - "type": { - "type": "string", - "title": "Type", - "description": "Type", - "order": 3 - } - } + "createdOn": { + "type": "string", + "title": "Created On", + "description": "Created on", + "order": 8 } } }, diff --git a/plugins/cloudflare/icon_cloudflare/actions/deleteZoneAccessRule/__init__.py b/plugins/cloudflare/icon_cloudflare/actions/deleteZoneAccessRule/__init__.py index 517b5b8b0f..5598a54f26 100755 --- a/plugins/cloudflare/icon_cloudflare/actions/deleteZoneAccessRule/__init__.py +++ b/plugins/cloudflare/icon_cloudflare/actions/deleteZoneAccessRule/__init__.py @@ -1,2 +1,2 @@ -# GENERATED BY KOMAND SDK - DO NOT EDIT +# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT from .action import DeleteZoneAccessRule diff --git a/plugins/cloudflare/icon_cloudflare/actions/deleteZoneAccessRule/schema.py b/plugins/cloudflare/icon_cloudflare/actions/deleteZoneAccessRule/schema.py index 20303ddfe8..9a688b4faa 100755 --- a/plugins/cloudflare/icon_cloudflare/actions/deleteZoneAccessRule/schema.py +++ b/plugins/cloudflare/icon_cloudflare/actions/deleteZoneAccessRule/schema.py @@ -1,4 +1,4 @@ -# GENERATED BY KOMAND SDK - DO NOT EDIT +# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT import insightconnect_plugin_runtime import json @@ -10,14 +10,14 @@ class Component: class Input: RULEID = "ruleId" ZONEID = "zoneId" - + class Output: SUCCESS = "success" - + class DeleteZoneAccessRuleInput(insightconnect_plugin_runtime.Input): - schema = json.loads(""" + schema = json.loads(r""" { "type": "object", "title": "Variables", @@ -38,7 +38,8 @@ class DeleteZoneAccessRuleInput(insightconnect_plugin_runtime.Input): "required": [ "ruleId", "zoneId" - ] + ], + "definitions": {} } """) @@ -47,7 +48,7 @@ def __init__(self): class DeleteZoneAccessRuleOutput(insightconnect_plugin_runtime.Output): - schema = json.loads(""" + schema = json.loads(r""" { "type": "object", "title": "Variables", @@ -61,7 +62,8 @@ class DeleteZoneAccessRuleOutput(insightconnect_plugin_runtime.Output): }, "required": [ "success" - ] + ], + "definitions": {} } """) diff --git a/plugins/cloudflare/icon_cloudflare/actions/getAccounts/__init__.py b/plugins/cloudflare/icon_cloudflare/actions/getAccounts/__init__.py index 8919341968..24f56b4fc7 100755 --- a/plugins/cloudflare/icon_cloudflare/actions/getAccounts/__init__.py +++ b/plugins/cloudflare/icon_cloudflare/actions/getAccounts/__init__.py @@ -1,2 +1,2 @@ -# GENERATED BY KOMAND SDK - DO NOT EDIT +# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT from .action import GetAccounts diff --git a/plugins/cloudflare/icon_cloudflare/actions/getAccounts/schema.py b/plugins/cloudflare/icon_cloudflare/actions/getAccounts/schema.py index bb51bec52e..6fbbe67db8 100755 --- a/plugins/cloudflare/icon_cloudflare/actions/getAccounts/schema.py +++ b/plugins/cloudflare/icon_cloudflare/actions/getAccounts/schema.py @@ -1,4 +1,4 @@ -# GENERATED BY KOMAND SDK - DO NOT EDIT +# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT import insightconnect_plugin_runtime import json @@ -12,14 +12,14 @@ class Input: NAME = "name" PAGE = "page" PERPAGE = "perPage" - + class Output: ACCOUNTS = "accounts" - + class GetAccountsInput(insightconnect_plugin_runtime.Input): - schema = json.loads(""" + schema = json.loads(r""" { "type": "object", "title": "Variables", @@ -53,7 +53,8 @@ class GetAccountsInput(insightconnect_plugin_runtime.Input): "description": "Maximum number of results per page", "order": 3 } - } + }, + "definitions": {} } """) @@ -62,7 +63,7 @@ def __init__(self): class GetAccountsOutput(insightconnect_plugin_runtime.Output): - schema = json.loads(""" + schema = json.loads(r""" { "type": "object", "title": "Variables", @@ -82,161 +83,41 @@ class GetAccountsOutput(insightconnect_plugin_runtime.Output): "type": "object", "title": "account", "properties": { - "createdOn": { - "type": "string", - "title": "Created On", - "description": "Created on", - "order": 6 - }, "id": { "type": "string", "title": "Account ID", "description": "Identifier of the account", "order": 1 }, - "legacyFlags": { - "$ref": "#/definitions/legacyFlags", - "title": "Legacy Flags", - "description": "Legacy Flags", - "order": 5 - }, "name": { "type": "string", "title": "Account Name", "description": "Name of the account", "order": 2 }, - "settings": { - "$ref": "#/definitions/settings", - "title": "Settings", - "description": "Account settings", - "order": 4 - }, "type": { "type": "string", "title": "Account Type", "description": "Type of the account", "order": 3 - } - }, - "definitions": { - "legacyFlags": { - "type": "object", - "title": "legacyFlags", - "properties": { - "enterpriseZoneQuota": { - "$ref": "#/definitions/zoneQuota", - "title": "Enterprise Zone Quota", - "description": "Enterprise Zone Quota", - "order": 1 - } - }, - "definitions": { - "zoneQuota": { - "type": "object", - "title": "zoneQuota", - "properties": { - "current": { - "type": "integer", - "title": "Current", - "description": "Current", - "order": 2 - }, - "maximum": { - "type": "integer", - "title": "Maximum", - "description": "Maximum", - "order": 1 - }, - "name": { - "type": "integer", - "title": "Available", - "description": "Available", - "order": 3 - } - } - } - } }, "settings": { - "type": "object", - "title": "settings", - "properties": { - "apiAccessEnabled": { - "type": "boolean", - "title": "API Access Enabled", - "description": "API access enabled", - "order": 2 - }, - "enforceTwofactor": { - "type": "boolean", - "title": "Enforce Two Factor Authentication", - "description": "Enforce two factor authentication", - "order": 1 - } - } + "$ref": "#/definitions/settings", + "title": "Settings", + "description": "Account settings", + "order": 4 }, - "zoneQuota": { - "type": "object", - "title": "zoneQuota", - "properties": { - "current": { - "type": "integer", - "title": "Current", - "description": "Current", - "order": 2 - }, - "maximum": { - "type": "integer", - "title": "Maximum", - "description": "Maximum", - "order": 1 - }, - "name": { - "type": "integer", - "title": "Available", - "description": "Available", - "order": 3 - } - } - } - } - }, - "legacyFlags": { - "type": "object", - "title": "legacyFlags", - "properties": { - "enterpriseZoneQuota": { - "$ref": "#/definitions/zoneQuota", - "title": "Enterprise Zone Quota", - "description": "Enterprise Zone Quota", - "order": 1 - } - }, - "definitions": { - "zoneQuota": { - "type": "object", - "title": "zoneQuota", - "properties": { - "current": { - "type": "integer", - "title": "Current", - "description": "Current", - "order": 2 - }, - "maximum": { - "type": "integer", - "title": "Maximum", - "description": "Maximum", - "order": 1 - }, - "name": { - "type": "integer", - "title": "Available", - "description": "Available", - "order": 3 - } - } + "legacyFlags": { + "$ref": "#/definitions/legacyFlags", + "title": "Legacy Flags", + "description": "Legacy Flags", + "order": 5 + }, + "createdOn": { + "type": "string", + "title": "Created On", + "description": "Created on", + "order": 6 } } }, @@ -244,16 +125,28 @@ class GetAccountsOutput(insightconnect_plugin_runtime.Output): "type": "object", "title": "settings", "properties": { + "enforceTwofactor": { + "type": "boolean", + "title": "Enforce Two Factor Authentication", + "description": "Enforce two factor authentication", + "order": 1 + }, "apiAccessEnabled": { "type": "boolean", "title": "API Access Enabled", "description": "API access enabled", "order": 2 - }, - "enforceTwofactor": { - "type": "boolean", - "title": "Enforce Two Factor Authentication", - "description": "Enforce two factor authentication", + } + } + }, + "legacyFlags": { + "type": "object", + "title": "legacyFlags", + "properties": { + "enterpriseZoneQuota": { + "$ref": "#/definitions/zoneQuota", + "title": "Enterprise Zone Quota", + "description": "Enterprise Zone Quota", "order": 1 } } @@ -262,18 +155,18 @@ class GetAccountsOutput(insightconnect_plugin_runtime.Output): "type": "object", "title": "zoneQuota", "properties": { - "current": { - "type": "integer", - "title": "Current", - "description": "Current", - "order": 2 - }, "maximum": { "type": "integer", "title": "Maximum", "description": "Maximum", "order": 1 }, + "current": { + "type": "integer", + "title": "Current", + "description": "Current", + "order": 2 + }, "name": { "type": "integer", "title": "Available", diff --git a/plugins/cloudflare/icon_cloudflare/actions/getLists/__init__.py b/plugins/cloudflare/icon_cloudflare/actions/getLists/__init__.py index e2616a6628..bf8311f7b4 100755 --- a/plugins/cloudflare/icon_cloudflare/actions/getLists/__init__.py +++ b/plugins/cloudflare/icon_cloudflare/actions/getLists/__init__.py @@ -1,2 +1,2 @@ -# GENERATED BY KOMAND SDK - DO NOT EDIT +# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT from .action import GetLists diff --git a/plugins/cloudflare/icon_cloudflare/actions/getLists/schema.py b/plugins/cloudflare/icon_cloudflare/actions/getLists/schema.py index ea59960951..a24ef0acbb 100755 --- a/plugins/cloudflare/icon_cloudflare/actions/getLists/schema.py +++ b/plugins/cloudflare/icon_cloudflare/actions/getLists/schema.py @@ -1,4 +1,4 @@ -# GENERATED BY KOMAND SDK - DO NOT EDIT +# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT import insightconnect_plugin_runtime import json @@ -9,14 +9,14 @@ class Component: class Input: ACCOUNTID = "accountId" - + class Output: LISTS = "lists" - + class GetListsInput(insightconnect_plugin_runtime.Input): - schema = json.loads(""" + schema = json.loads(r""" { "type": "object", "title": "Variables", @@ -30,7 +30,8 @@ class GetListsInput(insightconnect_plugin_runtime.Input): }, "required": [ "accountId" - ] + ], + "definitions": {} } """) @@ -39,7 +40,7 @@ def __init__(self): class GetListsOutput(insightconnect_plugin_runtime.Output): - schema = json.loads(""" + schema = json.loads(r""" { "type": "object", "title": "Variables", @@ -59,11 +60,17 @@ class GetListsOutput(insightconnect_plugin_runtime.Output): "type": "object", "title": "list", "properties": { - "createdOn": { + "id": { "type": "string", - "title": "Created On", - "description": "Created on", - "order": 7 + "title": "List ID", + "description": "Identifier of the list", + "order": 1 + }, + "name": { + "type": "string", + "title": "List Name", + "description": "Name of the list", + "order": 2 }, "description": { "type": "string", @@ -71,30 +78,12 @@ class GetListsOutput(insightconnect_plugin_runtime.Output): "description": "Description", "order": 3 }, - "id": { - "type": "string", - "title": "List ID", - "description": "Identifier of the list", - "order": 1 - }, "kind": { "type": "string", "title": "Kind", "description": "Kind", "order": 4 }, - "modifiedOn": { - "type": "string", - "title": "Modified On", - "description": "Modified on", - "order": 8 - }, - "name": { - "type": "string", - "title": "List Name", - "description": "Name of the list", - "order": 2 - }, "numItems": { "type": "integer", "title": "Num Items", @@ -106,6 +95,18 @@ class GetListsOutput(insightconnect_plugin_runtime.Output): "title": "Num Referencing Filters", "description": "Number of referencing filters", "order": 6 + }, + "createdOn": { + "type": "string", + "title": "Created On", + "description": "Created on", + "order": 7 + }, + "modifiedOn": { + "type": "string", + "title": "Modified On", + "description": "Modified on", + "order": 8 } } } diff --git a/plugins/cloudflare/icon_cloudflare/actions/getZoneAccessRules/__init__.py b/plugins/cloudflare/icon_cloudflare/actions/getZoneAccessRules/__init__.py index de33d8427f..a4052914fc 100755 --- a/plugins/cloudflare/icon_cloudflare/actions/getZoneAccessRules/__init__.py +++ b/plugins/cloudflare/icon_cloudflare/actions/getZoneAccessRules/__init__.py @@ -1,2 +1,2 @@ -# GENERATED BY KOMAND SDK - DO NOT EDIT +# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT from .action import GetZoneAccessRules diff --git a/plugins/cloudflare/icon_cloudflare/actions/getZoneAccessRules/schema.py b/plugins/cloudflare/icon_cloudflare/actions/getZoneAccessRules/schema.py index a3fde2e974..7b517db5b5 100755 --- a/plugins/cloudflare/icon_cloudflare/actions/getZoneAccessRules/schema.py +++ b/plugins/cloudflare/icon_cloudflare/actions/getZoneAccessRules/schema.py @@ -1,4 +1,4 @@ -# GENERATED BY KOMAND SDK - DO NOT EDIT +# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT import insightconnect_plugin_runtime import json @@ -18,14 +18,14 @@ class Input: PAGE = "page" PERPAGE = "perPage" ZONEID = "zoneId" - + class Output: ACCESSRULES = "accessRules" - + class GetZoneAccessRulesInput(insightconnect_plugin_runtime.Input): - schema = json.loads(""" + schema = json.loads(r""" { "type": "object", "title": "Variables", @@ -126,7 +126,8 @@ class GetZoneAccessRulesInput(insightconnect_plugin_runtime.Input): }, "required": [ "zoneId" - ] + ], + "definitions": {} } """) @@ -135,7 +136,7 @@ def __init__(self): class GetZoneAccessRulesOutput(insightconnect_plugin_runtime.Output): - schema = json.loads(""" + schema = json.loads(r""" { "type": "object", "title": "Variables", @@ -155,6 +156,24 @@ class GetZoneAccessRulesOutput(insightconnect_plugin_runtime.Output): "type": "object", "title": "accessRule", "properties": { + "id": { + "type": "string", + "title": "Access Rule ID", + "description": "Identifier of the access rule", + "order": 1 + }, + "paused": { + "type": "boolean", + "title": "Paused", + "description": "Paused", + "order": 2 + }, + "modifiedOn": { + "type": "string", + "title": "Modified On", + "description": "Modified on", + "order": 3 + }, "allowedModes": { "type": "array", "title": "Allowed Modes", @@ -164,91 +183,29 @@ class GetZoneAccessRulesOutput(insightconnect_plugin_runtime.Output): }, "order": 4 }, - "configuration": { - "$ref": "#/definitions/configuration", - "title": "Configuration", - "description": "Configuration", - "order": 6 - }, - "createdOn": { - "type": "string", - "title": "Created On", - "description": "Created on", - "order": 8 - }, - "id": { - "type": "string", - "title": "Access Rule ID", - "description": "Identifier of the access rule", - "order": 1 - }, "mode": { "type": "string", "title": "Mode", "description": "Mode", "order": 5 }, - "modifiedOn": { - "type": "string", - "title": "Modified On", - "description": "Modified on", - "order": 3 - }, - "paused": { - "type": "boolean", - "title": "Paused", - "description": "Paused", - "order": 2 + "configuration": { + "$ref": "#/definitions/configuration", + "title": "Configuration", + "description": "Configuration", + "order": 6 }, "scope": { "$ref": "#/definitions/scope", "title": "Scope", "description": "Scope", "order": 7 - } - }, - "definitions": { - "configuration": { - "type": "object", - "title": "configuration", - "properties": { - "target": { - "type": "string", - "title": "Target", - "description": "Target", - "order": 1 - }, - "value": { - "type": "string", - "title": "Value", - "description": "Value", - "order": 2 - } - } }, - "scope": { - "type": "object", - "title": "scope", - "properties": { - "id": { - "type": "string", - "title": "ID", - "description": "ID", - "order": 1 - }, - "name": { - "type": "string", - "title": "Name", - "description": "Name", - "order": 2 - }, - "type": { - "type": "string", - "title": "Type", - "description": "Type", - "order": 3 - } - } + "createdOn": { + "type": "string", + "title": "Created On", + "description": "Created on", + "order": 8 } } }, diff --git a/plugins/cloudflare/icon_cloudflare/actions/getZones/__init__.py b/plugins/cloudflare/icon_cloudflare/actions/getZones/__init__.py index 85c90edf8b..63e59419a9 100755 --- a/plugins/cloudflare/icon_cloudflare/actions/getZones/__init__.py +++ b/plugins/cloudflare/icon_cloudflare/actions/getZones/__init__.py @@ -1,2 +1,2 @@ -# GENERATED BY KOMAND SDK - DO NOT EDIT +# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT from .action import GetZones diff --git a/plugins/cloudflare/icon_cloudflare/actions/getZones/schema.py b/plugins/cloudflare/icon_cloudflare/actions/getZones/schema.py index a061aad605..b1b055f8fc 100755 --- a/plugins/cloudflare/icon_cloudflare/actions/getZones/schema.py +++ b/plugins/cloudflare/icon_cloudflare/actions/getZones/schema.py @@ -1,4 +1,4 @@ -# GENERATED BY KOMAND SDK - DO NOT EDIT +# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT import insightconnect_plugin_runtime import json @@ -17,14 +17,14 @@ class Input: PAGE = "page" PERPAGE = "perPage" STATUS = "status" - + class Output: ZONES = "zones" - + class GetZonesInput(insightconnect_plugin_runtime.Input): - schema = json.loads(""" + schema = json.loads(r""" { "type": "object", "title": "Variables", @@ -110,7 +110,8 @@ class GetZonesInput(insightconnect_plugin_runtime.Input): ], "order": 5 } - } + }, + "definitions": {} } """) @@ -119,7 +120,7 @@ def __init__(self): class GetZonesOutput(insightconnect_plugin_runtime.Output): - schema = json.loads(""" + schema = json.loads(r""" { "type": "object", "title": "Variables", @@ -135,22 +136,157 @@ class GetZonesOutput(insightconnect_plugin_runtime.Output): } }, "definitions": { + "zone": { + "type": "object", + "title": "zone", + "properties": { + "id": { + "type": "string", + "title": "Zone ID", + "description": "Identifier of the zone", + "order": 1 + }, + "name": { + "type": "string", + "title": "Zone Name", + "description": "Name of the zone", + "order": 2 + }, + "status": { + "type": "string", + "title": "Zone Status", + "description": "Status of the zone", + "order": 3 + }, + "paused": { + "type": "boolean", + "title": "Paused", + "description": "Paused", + "order": 4 + }, + "type": { + "type": "string", + "title": "Type", + "description": "Type of the zone", + "order": 5 + }, + "developmentMode": { + "type": "integer", + "title": "Development Mode", + "description": "Development mode", + "order": 6 + }, + "nameServers": { + "type": "array", + "title": "Name Servers", + "description": "Name servers", + "items": { + "type": "string" + }, + "order": 7 + }, + "originalNameServers": { + "type": "array", + "title": "Original Name Servers", + "description": "Original name servers", + "items": { + "type": "string" + }, + "order": 8 + }, + "originalRegistrar": { + "type": "string", + "title": "Original Registrar", + "description": "Original registrar", + "order": 9 + }, + "originalDnshost": { + "type": "string", + "title": "Original DNS Host", + "description": "Original DNS host", + "order": 10 + }, + "createdOn": { + "type": "string", + "title": "Created On", + "description": "Created on", + "order": 11 + }, + "modifiedOn": { + "type": "string", + "title": "Modified On", + "description": "Modified on", + "order": 12 + }, + "activatedOn": { + "type": "string", + "title": "Activated On", + "description": "Activated on", + "order": 13 + }, + "meta": { + "$ref": "#/definitions/meta", + "title": "Meta", + "description": "Meta", + "order": 14 + }, + "owner": { + "$ref": "#/definitions/owner", + "title": "Owner", + "description": "Owner", + "order": 15 + }, + "account": { + "$ref": "#/definitions/tenant", + "title": "Account", + "description": "Account", + "order": 16 + }, + "tenant": { + "$ref": "#/definitions/tenant", + "title": "Tenant", + "description": "Tenant", + "order": 17 + }, + "tenantUnit": { + "$ref": "#/definitions/tenantUnit", + "title": "Tenant Unit", + "description": "Tenant unit", + "order": 18 + }, + "permissions": { + "type": "array", + "title": "Permissions", + "description": "Permissions", + "items": { + "type": "string" + }, + "order": 19 + }, + "plan": { + "$ref": "#/definitions/plan", + "title": "Plan", + "description": "Plan", + "order": 20 + } + } + }, "meta": { "type": "object", "title": "meta", "properties": { + "step": { + "type": "integer", + "title": "Step", + "description": "Step", + "order": 1 + }, "customCertificateQuota": { "type": "integer", "title": "Custom Certificate Quota", "description": "Custom certificate quota", "order": 2 }, - "multipleRailgunsAllowed": { - "type": "boolean", - "title": "Multiple Railguns Allowed", - "description": "Multiple railguns allowed", - "order": 5 - }, "pageRuleQuota": { "type": "integer", "title": "Page Rule Quota", @@ -163,11 +299,11 @@ class GetZonesOutput(insightconnect_plugin_runtime.Output): "description": "Phishing detected", "order": 4 }, - "step": { - "type": "integer", - "title": "Step", - "description": "Step", - "order": 1 + "multipleRailgunsAllowed": { + "type": "boolean", + "title": "Multiple Railguns Allowed", + "description": "Multiple railguns allowed", + "order": 5 } } }, @@ -175,12 +311,6 @@ class GetZonesOutput(insightconnect_plugin_runtime.Output): "type": "object", "title": "owner", "properties": { - "email": { - "type": "string", - "title": "Email", - "description": "Email", - "order": 3 - }, "id": { "type": "string", "title": "ID", @@ -192,71 +322,11 @@ class GetZonesOutput(insightconnect_plugin_runtime.Output): "title": "Type", "description": "Type", "order": 2 - } - } - }, - "plan": { - "type": "object", - "title": "plan", - "properties": { - "canSubscribe": { - "type": "boolean", - "title": "Can Subscribe", - "description": "Can subscribe", - "order": 7 - }, - "currency": { - "type": "string", - "title": "Currency", - "description": "Currency", - "order": 4 - }, - "externallyManaged": { - "type": "boolean", - "title": "Externally Managed", - "description": "Externally managed", - "order": 10 - }, - "frequency": { - "type": "string", - "title": "Frequency", - "description": "Frequency", - "order": 5 }, - "id": { - "type": "string", - "title": "ID", - "description": "ID", - "order": 1 - }, - "isSubscribed": { - "type": "boolean", - "title": "Is Subscribed", - "description": "Is subscribed", - "order": 6 - }, - "legacyDiscount": { - "type": "boolean", - "title": "Legacy Discount", - "description": "Legacy discount", - "order": 9 - }, - "legacyId": { - "type": "string", - "title": "Legacy ID", - "description": "Legacy ID", - "order": 8 - }, - "name": { + "email": { "type": "string", - "title": "Name", - "description": "Name", - "order": 2 - }, - "price": { - "type": "integer", - "title": "Price", - "description": "Price", + "title": "Email", + "description": "Email", "order": 3 } } @@ -291,296 +361,69 @@ class GetZonesOutput(insightconnect_plugin_runtime.Output): } } }, - "zone": { + "plan": { "type": "object", - "title": "zone", + "title": "plan", "properties": { - "account": { - "$ref": "#/definitions/tenant", - "title": "Account", - "description": "Account", - "order": 16 - }, - "activatedOn": { - "type": "string", - "title": "Activated On", - "description": "Activated on", - "order": 13 - }, - "createdOn": { - "type": "string", - "title": "Created On", - "description": "Created on", - "order": 11 - }, - "developmentMode": { - "type": "integer", - "title": "Development Mode", - "description": "Development mode", - "order": 6 - }, "id": { "type": "string", - "title": "Zone ID", - "description": "Identifier of the zone", + "title": "ID", + "description": "ID", "order": 1 }, - "meta": { - "$ref": "#/definitions/meta", - "title": "Meta", - "description": "Meta", - "order": 14 - }, - "modifiedOn": { - "type": "string", - "title": "Modified On", - "description": "Modified on", - "order": 12 - }, "name": { "type": "string", - "title": "Zone Name", - "description": "Name of the zone", + "title": "Name", + "description": "Name", "order": 2 }, - "nameServers": { - "type": "array", - "title": "Name Servers", - "description": "Name servers", - "items": { - "type": "string" - }, - "order": 7 - }, - "originalDnshost": { - "type": "string", - "title": "Original DNS Host", - "description": "Original DNS host", - "order": 10 - }, - "originalNameServers": { - "type": "array", - "title": "Original Name Servers", - "description": "Original name servers", - "items": { - "type": "string" - }, - "order": 8 + "price": { + "type": "integer", + "title": "Price", + "description": "Price", + "order": 3 }, - "originalRegistrar": { + "currency": { "type": "string", - "title": "Original Registrar", - "description": "Original registrar", - "order": 9 - }, - "owner": { - "$ref": "#/definitions/owner", - "title": "Owner", - "description": "Owner", - "order": 15 - }, - "paused": { - "type": "boolean", - "title": "Paused", - "description": "Paused", + "title": "Currency", + "description": "Currency", "order": 4 }, - "permissions": { - "type": "array", - "title": "Permissions", - "description": "Permissions", - "items": { - "type": "string" - }, - "order": 19 - }, - "plan": { - "$ref": "#/definitions/plan", - "title": "Plan", - "description": "Plan", - "order": 20 - }, - "status": { + "frequency": { "type": "string", - "title": "Zone Status", - "description": "Status of the zone", - "order": 3 + "title": "Frequency", + "description": "Frequency", + "order": 5 }, - "tenant": { - "$ref": "#/definitions/tenant", - "title": "Tenant", - "description": "Tenant", - "order": 17 + "isSubscribed": { + "type": "boolean", + "title": "Is Subscribed", + "description": "Is subscribed", + "order": 6 }, - "tenantUnit": { - "$ref": "#/definitions/tenantUnit", - "title": "Tenant Unit", - "description": "Tenant unit", - "order": 18 + "canSubscribe": { + "type": "boolean", + "title": "Can Subscribe", + "description": "Can subscribe", + "order": 7 }, - "type": { + "legacyId": { "type": "string", - "title": "Type", - "description": "Type of the zone", - "order": 5 - } - }, - "definitions": { - "meta": { - "type": "object", - "title": "meta", - "properties": { - "customCertificateQuota": { - "type": "integer", - "title": "Custom Certificate Quota", - "description": "Custom certificate quota", - "order": 2 - }, - "multipleRailgunsAllowed": { - "type": "boolean", - "title": "Multiple Railguns Allowed", - "description": "Multiple railguns allowed", - "order": 5 - }, - "pageRuleQuota": { - "type": "integer", - "title": "Page Rule Quota", - "description": "Page rule quota", - "order": 3 - }, - "phishingDetected": { - "type": "boolean", - "title": "Phishing Detected", - "description": "Phishing detected", - "order": 4 - }, - "step": { - "type": "integer", - "title": "Step", - "description": "Step", - "order": 1 - } - } - }, - "owner": { - "type": "object", - "title": "owner", - "properties": { - "email": { - "type": "string", - "title": "Email", - "description": "Email", - "order": 3 - }, - "id": { - "type": "string", - "title": "ID", - "description": "ID", - "order": 1 - }, - "type": { - "type": "string", - "title": "Type", - "description": "Type", - "order": 2 - } - } - }, - "plan": { - "type": "object", - "title": "plan", - "properties": { - "canSubscribe": { - "type": "boolean", - "title": "Can Subscribe", - "description": "Can subscribe", - "order": 7 - }, - "currency": { - "type": "string", - "title": "Currency", - "description": "Currency", - "order": 4 - }, - "externallyManaged": { - "type": "boolean", - "title": "Externally Managed", - "description": "Externally managed", - "order": 10 - }, - "frequency": { - "type": "string", - "title": "Frequency", - "description": "Frequency", - "order": 5 - }, - "id": { - "type": "string", - "title": "ID", - "description": "ID", - "order": 1 - }, - "isSubscribed": { - "type": "boolean", - "title": "Is Subscribed", - "description": "Is subscribed", - "order": 6 - }, - "legacyDiscount": { - "type": "boolean", - "title": "Legacy Discount", - "description": "Legacy discount", - "order": 9 - }, - "legacyId": { - "type": "string", - "title": "Legacy ID", - "description": "Legacy ID", - "order": 8 - }, - "name": { - "type": "string", - "title": "Name", - "description": "Name", - "order": 2 - }, - "price": { - "type": "integer", - "title": "Price", - "description": "Price", - "order": 3 - } - } + "title": "Legacy ID", + "description": "Legacy ID", + "order": 8 }, - "tenant": { - "type": "object", - "title": "tenant", - "properties": { - "id": { - "type": "string", - "title": "ID", - "description": "Identifier", - "order": 1 - }, - "name": { - "type": "string", - "title": "Name", - "description": "Name", - "order": 2 - } - } + "legacyDiscount": { + "type": "boolean", + "title": "Legacy Discount", + "description": "Legacy discount", + "order": 9 }, - "tenantUnit": { - "type": "object", - "title": "tenantUnit", - "properties": { - "id": { - "type": "string", - "title": "ID", - "description": "Identifier", - "order": 1 - } - } + "externallyManaged": { + "type": "boolean", + "title": "Externally Managed", + "description": "Externally managed", + "order": 10 } } } diff --git a/plugins/cloudflare/icon_cloudflare/connection/__init__.py b/plugins/cloudflare/icon_cloudflare/connection/__init__.py index a515dcf6b0..c78d3356be 100755 --- a/plugins/cloudflare/icon_cloudflare/connection/__init__.py +++ b/plugins/cloudflare/icon_cloudflare/connection/__init__.py @@ -1,2 +1,2 @@ -# GENERATED BY KOMAND SDK - DO NOT EDIT +# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT from .connection import Connection diff --git a/plugins/cloudflare/icon_cloudflare/connection/schema.py b/plugins/cloudflare/icon_cloudflare/connection/schema.py index 4b368d8c3e..d4f6285d47 100755 --- a/plugins/cloudflare/icon_cloudflare/connection/schema.py +++ b/plugins/cloudflare/icon_cloudflare/connection/schema.py @@ -1,14 +1,14 @@ -# GENERATED BY KOMAND SDK - DO NOT EDIT +# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT import insightconnect_plugin_runtime import json class Input: APITOKEN = "apiToken" - + class ConnectionSchema(insightconnect_plugin_runtime.Input): - schema = json.loads(""" + schema = json.loads(r""" { "type": "object", "title": "Variables", @@ -29,18 +29,18 @@ class ConnectionSchema(insightconnect_plugin_runtime.Input): "type": "object", "title": "Credential: Secret Key", "description": "A shared secret key", + "required": [ + "secretKey" + ], "properties": { "secretKey": { "type": "string", "title": "Secret Key", - "displayType": "password", "description": "The shared secret key", - "format": "password" + "format": "password", + "displayType": "password" } - }, - "required": [ - "secretKey" - ] + } } } } diff --git a/plugins/cloudflare/icon_cloudflare/tasks/__init__.py b/plugins/cloudflare/icon_cloudflare/tasks/__init__.py new file mode 100644 index 0000000000..7020c9a4ad --- /dev/null +++ b/plugins/cloudflare/icon_cloudflare/tasks/__init__.py @@ -0,0 +1,2 @@ +# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT + diff --git a/plugins/cloudflare/icon_cloudflare/triggers/__init__.py b/plugins/cloudflare/icon_cloudflare/triggers/__init__.py index bace8db897..7020c9a4ad 100755 --- a/plugins/cloudflare/icon_cloudflare/triggers/__init__.py +++ b/plugins/cloudflare/icon_cloudflare/triggers/__init__.py @@ -1 +1,2 @@ -# GENERATED BY KOMAND SDK - DO NOT EDIT +# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT + diff --git a/plugins/cloudflare/icon_cloudflare/util/helpers.py b/plugins/cloudflare/icon_cloudflare/util/helpers.py index 4ed8e27b99..6079c2b10f 100644 --- a/plugins/cloudflare/icon_cloudflare/util/helpers.py +++ b/plugins/cloudflare/icon_cloudflare/util/helpers.py @@ -51,12 +51,12 @@ def clean(item_to_clean: Union[dict, list]) -> Union[dict, list]: def set_configuration(target: str) -> dict: - if validators.ipv4(target): + if validators.ipv4(target, cidr=False): return {"value": target, "target": "ip"} - if validators.ipv6(target): + if validators.ipv6(target, cidr=False): return {"value": target, "target": "ip6"} - if (validators.ipv4_cidr(target) and target.endswith(("/16", "/24"))) or ( - validators.ipv6_cidr(target) and target.endswith(("/32", "/48", "/64")) + if (validators.ipv4(target) and target.endswith(("/16", "/24"))) or ( + validators.ipv6(target) and target.endswith(("/32", "/48", "/64")) ): return {"value": target, "target": "ip_range"} if fullmatch("^[a-zA-Z]{2}$", target): diff --git a/plugins/cloudflare/plugin.spec.yaml b/plugins/cloudflare/plugin.spec.yaml index 5b2415befe..f6e3ca7b36 100644 --- a/plugins/cloudflare/plugin.spec.yaml +++ b/plugins/cloudflare/plugin.spec.yaml @@ -4,16 +4,45 @@ products: [insightconnect] name: cloudflare title: Cloudflare description: Cloudflare is a global network designed to make everything you connect to the Internet secure, private, fast, and reliable. This plugin allows you to list accounts, zones, zone access rules and lists and create or delete access rules for specific zones -version: 1.0.0 +version: 1.0.1 +connection_version: 1 supported_versions: ["Cloudflare API v4 2023-02-10"] vendor: rapid7 support: rapid7 +sdk: + type: slim + version: 6.1.4 + user: nobody cloud_ready: true status: [] resources: source_url: https://github.com/rapid7/insightconnect-plugins/tree/master/plugins/cloudflare license_url: https://github.com/rapid7/insightconnect-plugins/blob/master/LICENSE vendor_url: https://www.cloudflare.com +key_features: + - "Get Accounts" + - "Get Zones" + - "Get Lists" + - "Create Zone Access Rule" + - "Delete Zone Access Rule" + - "Get Zone Access Rules" +requirements: + - "Cloudflare API token" + - "The used API token must have the following permissions:\n\n + For all account:" + - "Account Filter Lists:Read`" + - "`Account Firewall Access Rules:Read`\n" + - "For all zones:" + - "`Firewall Services:Read`" + - "`Firewall Services:Edit`" + - "`Zone:Read`" +version_history: + - "1.0.1 - Bumping requirements.txt | SDK bump to 6.1.4" + - "1.0.0 - Initial plugin | Add Get Accounts, Get Zones, Get Lists, Get Zone Access Rules, Create Zone Access Rule and Delete Zone Access Rule actions" +links: + - "[Cloudflare](https://www.cloudflare.com)" +references: + - "[Cloudflare](https://developers.cloudflare.com/api/)" tags: - cloudflare - security diff --git a/plugins/cloudflare/requirements.txt b/plugins/cloudflare/requirements.txt index 0891d30dc4..e184b19748 100755 --- a/plugins/cloudflare/requirements.txt +++ b/plugins/cloudflare/requirements.txt @@ -2,4 +2,4 @@ # All dependencies must be version-pinned, eg. requests==1.2.0 # See: https://pip.pypa.io/en/stable/user_guide/#requirements-files parameterized==0.8.1 -validators==0.20.0 \ No newline at end of file +validators==0.34.0 diff --git a/plugins/cloudflare/setup.py b/plugins/cloudflare/setup.py index 8e6f35968b..147a8c00c2 100755 --- a/plugins/cloudflare/setup.py +++ b/plugins/cloudflare/setup.py @@ -1,9 +1,9 @@ -# GENERATED BY KOMAND SDK - DO NOT EDIT +# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT from setuptools import setup, find_packages setup(name="cloudflare-rapid7-plugin", - version="1.0.0", + version="1.0.1", description="Cloudflare is a global network designed to make everything you connect to the Internet secure, private, fast, and reliable. This plugin allows you to list accounts, zones, zone access rules and lists and create or delete access rules for specific zones", author="rapid7", author_email="", diff --git a/plugins/cloudflare/unit_test/test_create_zone_access_rule.py b/plugins/cloudflare/unit_test/test_create_zone_access_rule.py index 0f65b86776..7ebf090de9 100644 --- a/plugins/cloudflare/unit_test/test_create_zone_access_rule.py +++ b/plugins/cloudflare/unit_test/test_create_zone_access_rule.py @@ -5,7 +5,7 @@ from unittest import TestCase from icon_cloudflare.actions.createZoneAccessRule import CreateZoneAccessRule -from unit_test.util import Util +from util import Util from unittest.mock import patch from parameterized import parameterized from insightconnect_plugin_runtime.exceptions import PluginException diff --git a/plugins/cloudflare/unit_test/test_delete_zone_access_rule.py b/plugins/cloudflare/unit_test/test_delete_zone_access_rule.py index 70e72e8d1d..bdb669321a 100644 --- a/plugins/cloudflare/unit_test/test_delete_zone_access_rule.py +++ b/plugins/cloudflare/unit_test/test_delete_zone_access_rule.py @@ -5,7 +5,7 @@ from unittest import TestCase from icon_cloudflare.actions.deleteZoneAccessRule import DeleteZoneAccessRule -from unit_test.util import Util +from util import Util from unittest.mock import patch from parameterized import parameterized from insightconnect_plugin_runtime.exceptions import PluginException diff --git a/plugins/cloudflare/unit_test/test_get_accounts.py b/plugins/cloudflare/unit_test/test_get_accounts.py index b7e0e61e29..b29c3d74ea 100644 --- a/plugins/cloudflare/unit_test/test_get_accounts.py +++ b/plugins/cloudflare/unit_test/test_get_accounts.py @@ -5,7 +5,7 @@ from unittest import TestCase from icon_cloudflare.actions.getAccounts import GetAccounts -from unit_test.util import Util +from util import Util from unittest.mock import patch from parameterized import parameterized diff --git a/plugins/cloudflare/unit_test/test_get_lists.py b/plugins/cloudflare/unit_test/test_get_lists.py index dc255c7345..dad30dd885 100644 --- a/plugins/cloudflare/unit_test/test_get_lists.py +++ b/plugins/cloudflare/unit_test/test_get_lists.py @@ -5,7 +5,7 @@ from unittest import TestCase from icon_cloudflare.actions.getLists import GetLists -from unit_test.util import Util +from util import Util from unittest.mock import patch from parameterized import parameterized from insightconnect_plugin_runtime.exceptions import PluginException diff --git a/plugins/cloudflare/unit_test/test_get_zone_access_rules.py b/plugins/cloudflare/unit_test/test_get_zone_access_rules.py index 4e167c0698..66c6af2d7e 100644 --- a/plugins/cloudflare/unit_test/test_get_zone_access_rules.py +++ b/plugins/cloudflare/unit_test/test_get_zone_access_rules.py @@ -5,7 +5,7 @@ from unittest import TestCase from icon_cloudflare.actions.getZoneAccessRules import GetZoneAccessRules -from unit_test.util import Util +from util import Util from unittest.mock import patch from parameterized import parameterized from insightconnect_plugin_runtime.exceptions import PluginException diff --git a/plugins/cloudflare/unit_test/test_get_zones.py b/plugins/cloudflare/unit_test/test_get_zones.py index e94f6daabb..fd1724b7af 100644 --- a/plugins/cloudflare/unit_test/test_get_zones.py +++ b/plugins/cloudflare/unit_test/test_get_zones.py @@ -5,7 +5,7 @@ from unittest import TestCase from icon_cloudflare.actions.getZones import GetZones -from unit_test.util import Util +from util import Util from unittest.mock import patch from parameterized import parameterized