I’m getting issues to create object in firewall. The ipv4 type seems to be determined by python “validators” library and it is returning a value not accepted by util.py that seems to be used to parse data to fortigate api
logs
rapid7/Fortinet FortiGate:6.0.1. Step name: create_address_object
An error occurred during plugin execution!
rapid7/Fortinet FortiGate:6.0.1. Step name: create_address_object
An error occurred during plugin execution!
The type could not be determined for the given address: [{“ip”:“185.200.116.90”,“type”:“EXTERNAL”},{“ip”:“38.132.109.186”,“type”:“EXTERNAL”}]. Please check that provided address is correct and try again.
Traceback (most recent call last):
File “/usr/local/lib/python3.8/site-packages/insightconnect_plugin_runtime-4.10.1-py3.8.egg/insightconnect_plugin_runtime/plugin.py”, line 385, in handle_step
output = self.start_step(
File “/usr/local/lib/python3.8/site-packages/insightconnect_plugin_runtime-4.10.1-py3.8.egg/insightconnect_plugin_runtime/plugin.py”, line 575, in start_step
output = func(params)
File “/usr/local/lib/python3.8/site-packages/fortinet_fortigate_rapid7_plugin-6.0.1-py3.8.egg/icon_fortinet_fortigate/actions/create_address_object/action.py”, line 26, in run
address_type = helper.determine_address_type(host)
File “/usr/local/lib/python3.8/site-packages/fortinet_fortigate_rapid7_plugin-6.0.1-py3.8.egg/icon_fortinet_fortigate/util/util.py”, line 93, in determine_address_type
raise PluginException(
insightconnect_plugin_runtime.exceptions.PluginException: An error occurred during plugin execution!
The type could not be determined for the given address: [{“ip”:“185.200.116.90”,“type”:“EXTERNAL”},{“ip”:“38.132.109.186”,“type”:“EXTERNAL”}]. Please check that provided address is correct and try again.
Code in util.py that triggers the error:
https://github.com/rapid7/insightconnect-plugins/blob/806606e05d299488a5335f1192829e3cd44268fe/plugins/fortinet_fortigate/icon_fortinet_fortigate/util/util.py#L93
It`s a bug or Am i missing something?