<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: mgmt_enable_api   = &amp;quot;all&amp;quot;  don't work anymore in my terraform deployment in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-enable-api-quot-all-quot-don-t-work-anymore-in-my-terraform/m-p/205597#M8335</link>
    <description>&lt;P&gt;The &lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/set-api-settings~v1.9.1%20" target="_self"&gt;set api-settings&lt;/A&gt; call only accepts special values. Try "&lt;SPAN&gt;all ip addresses".&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Feb 2024 14:55:52 GMT</pubDate>
    <dc:creator>Bob_Zimmerman</dc:creator>
    <dc:date>2024-02-09T14:55:52Z</dc:date>
    <item>
      <title>mgmt_enable_api   = "all"  don't work anymore in my terraform deployment</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-enable-api-quot-all-quot-don-t-work-anymore-in-my-terraform/m-p/205573#M8334</link>
      <description>&lt;P&gt;Hi, I'm having problems with the deployment with Terraform on Azure of new Management Servers which do not enable web api for all IP addresses despite the mgmt_enable_api = "all" parameter being set. This can also be done using one of the ready-made test modules on your GitHub repositories.&lt;BR /&gt;The strange thing is that until a few days ago this setting worked correctly and it was possible to connect via web-api. Has anyone had the same problem?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2024 13:00:26 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-enable-api-quot-all-quot-don-t-work-anymore-in-my-terraform/m-p/205573#M8334</guid>
      <dc:creator>Antonio_Opromol</dc:creator>
      <dc:date>2024-02-09T13:00:26Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_enable_api   = "all"  don't work anymore in my terraform deployment</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-enable-api-quot-all-quot-don-t-work-anymore-in-my-terraform/m-p/205597#M8335</link>
      <description>&lt;P&gt;The &lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/set-api-settings~v1.9.1%20" target="_self"&gt;set api-settings&lt;/A&gt; call only accepts special values. Try "&lt;SPAN&gt;all ip addresses".&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2024 14:55:52 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-enable-api-quot-all-quot-don-t-work-anymore-in-my-terraform/m-p/205597#M8335</guid>
      <dc:creator>Bob_Zimmerman</dc:creator>
      <dc:date>2024-02-09T14:55:52Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_enable_api   = "all"  don't work anymore in my terraform deployment</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-enable-api-quot-all-quot-don-t-work-anymore-in-my-terraform/m-p/205598#M8336</link>
      <description>&lt;P&gt;I'm using Terraform and pass the parameters of the Management during deployment as follow&lt;/P&gt;&lt;P&gt;custom_data = templatefile("${path.module}/cloud-init.sh", {&lt;BR /&gt;installation_type = var.installation_type_mgmt&lt;BR /&gt;allow_upload_download = var.allow_upload_download&lt;BR /&gt;os_version = var.os_version&lt;BR /&gt;template_name = var.template_name&lt;BR /&gt;template_version = var.template_version&lt;BR /&gt;template_type = var.template_type&lt;BR /&gt;is_blink = var.is_blink&lt;BR /&gt;bootstrap_script64 = base64encode(var.bootstrap_script)&lt;BR /&gt;location = azurerm_resource_group.mainmgmt.location&lt;BR /&gt;management_GUI_client_network = var.management_GUI_client_network&lt;BR /&gt;enable_api = var.mgmt_enable_api&lt;BR /&gt;admin_shell = var.admin_shell&lt;BR /&gt;serial_console_password_hash = var.serial_console_password_hash&lt;BR /&gt;maintenance_mode_password_hash = var.maintenance_mode_password_hash&lt;BR /&gt;})&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Until 2-3 days ago worked well with&amp;nbsp;enable_api = "all".&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now seems that this value is no more able to set the value to all ip addresses.&lt;/P&gt;&lt;P&gt;I've already tried with "all ip addresses" and "All", but noting now change and when I try to connect as follow&lt;/P&gt;&lt;P&gt;# Connecting to ckpmgmt&lt;BR /&gt;provider "checkpoint" {&lt;BR /&gt;server = tostring(local.mgmt_pubip_real)&lt;BR /&gt;username = var.default_admin_username_gaia&lt;BR /&gt;password = var.admin_password_mgmt&lt;BR /&gt;context = var.provider-context&lt;BR /&gt;timeout = "180"&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;with context = "web_api" I receive the error that the connection is not possible because is not setted "all ip addresses" infact with SmartConsole I see that is set to accept api connections only from management.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the test I've used the code from the following gihub repository:&amp;nbsp;&lt;A href="https://github.com/CheckPointSW/CloudGuardIaaS/tree/master/terraform/azure/management-new-vnet" target="_blank"&gt;https://github.com/CheckPointSW/CloudGuardIaaS/tree/master/terraform/azure/management-new-vnet&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2024 19:46:58 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-enable-api-quot-all-quot-don-t-work-anymore-in-my-terraform/m-p/205598#M8336</guid>
      <dc:creator>Antonio_Opromol</dc:creator>
      <dc:date>2024-02-09T19:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_enable_api   = "all"  don't work anymore in my terraform deployment</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-enable-api-quot-all-quot-don-t-work-anymore-in-my-terraform/m-p/205629#M8337</link>
      <description>&lt;P&gt;If the API is not configured to allow access from the relevant IP, anything relying on the API will fail.&lt;BR /&gt;This means you need to fix this issue in SmartConsole before attempting to use Terraform.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Feb 2024 01:21:17 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-enable-api-quot-all-quot-don-t-work-anymore-in-my-terraform/m-p/205629#M8337</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2024-02-10T01:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_enable_api   = "all"  don't work anymore in my terraform deployment</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-enable-api-quot-all-quot-don-t-work-anymore-in-my-terraform/m-p/205642#M8338</link>
      <description>&lt;P&gt;I know, but why until fee days ago during the vm creation with the cloud-init parametrrs passed as arguments worked?&lt;/P&gt;</description>
      <pubDate>Sat, 10 Feb 2024 09:34:45 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-enable-api-quot-all-quot-don-t-work-anymore-in-my-terraform/m-p/205642#M8338</guid>
      <dc:creator>Antonio_Opromol</dc:creator>
      <dc:date>2024-02-10T09:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_enable_api   = "all"  don't work anymore in my terraform deployment</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-enable-api-quot-all-quot-don-t-work-anymore-in-my-terraform/m-p/205650#M8339</link>
      <description>&lt;P&gt;If I look in cloud_configure_azure_instance.py file on the management server instance deployed (R81.20) I see are defined the function to enable api on management and set the access permission:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;def accepted_api_calls_from_allowed_value(self, enable_api_to):&lt;BR /&gt;"""#TODO fixDocstring"""&lt;BR /&gt;switcher = {&lt;BR /&gt;object_to_str(EnableApiAllowedValues.ALL):&lt;BR /&gt;EnableApiToCommand.ALL,&lt;BR /&gt;object_to_str(EnableApiAllowedValues.MANAGEMENT_ONLY):&lt;BR /&gt;EnableApiToCommand.&lt;BR /&gt;MANAGEMENT_ONLY,&lt;BR /&gt;object_to_str(EnableApiAllowedValues.GUI_CLIENTS):&lt;BR /&gt;EnableApiToCommand.&lt;BR /&gt;GUI_CLIENTS&lt;BR /&gt;}&lt;BR /&gt;return (switcher.get(enable_api_to))&lt;/P&gt;&lt;P&gt;def run_enable_api_commands(self, enable_api_to):&lt;BR /&gt;"""#TODO fixDocstring"""&lt;BR /&gt;accepted_api_calls_from = object_to_str(&lt;BR /&gt;self.accepted_api_calls_from_allowed_value(&lt;BR /&gt;enable_api_to.lower()))&lt;BR /&gt;enable_api_commands = ['api start',&lt;BR /&gt;'mgmt_cli -r true set-api-settings '&lt;BR /&gt;'accepted-api-calls-from "{}" --domain '&lt;BR /&gt;'\'System Data\''.format(&lt;BR /&gt;accepted_api_calls_from),&lt;BR /&gt;'api reconf']&lt;BR /&gt;for command in enable_api_commands:&lt;BR /&gt;try:&lt;BR /&gt;out, status = run_cmd(command)&lt;BR /&gt;except Exception as e:&lt;BR /&gt;log('{}'.format(e), level=logging.ERROR)&lt;/P&gt;&lt;P&gt;def enable_api(self):&lt;BR /&gt;"""#TODO fixDocstring"""&lt;BR /&gt;enable_api_to = self.template_vars[ENABLE_API]&lt;BR /&gt;is_valid_value = enable_api_to.lower() in (value.lower() for&lt;BR /&gt;value in&lt;BR /&gt;ENABLE_API_ALLOW_VALUES)&lt;BR /&gt;if is_valid_value:&lt;BR /&gt;self.run_enable_api_commands(enable_api_to)&lt;BR /&gt;else:&lt;BR /&gt;log(&lt;BR /&gt;"-- Error message: invalid value for 'enableApi' parameter. "&lt;BR /&gt;"The invalid value {} should be replaced by one of the "&lt;BR /&gt;"following values: {} or 'disable'.".format(&lt;BR /&gt;enable_api_to, ENABLE_API_ALLOW_VALUES),&lt;BR /&gt;level=logging.ERROR)&lt;/P&gt;&lt;P&gt;def enable_api_if_needed(self):&lt;BR /&gt;"""#TODO fixDocstring"""&lt;BR /&gt;enable_api = self.template_vars.get(ENABLE_API)&lt;BR /&gt;if not enable_api or enable_api == EnableApiAllowedValues.DISABLE:&lt;BR /&gt;pass&lt;BR /&gt;else:&lt;BR /&gt;self.enable_api()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;In the file cloud_config_globals.py there are defined these two classes that confirm that I need to use the "all" value that is managed as "all ip addresses":&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;class EnableApiAllowedValues(set):&lt;BR /&gt;"""#TODO fixDocstring"""&lt;BR /&gt;DISABLE = "disable"&lt;BR /&gt;ALL = "all"&lt;BR /&gt;MANAGEMENT_ONLY = "management_only"&lt;BR /&gt;GUI_CLIENTS = "gui_clients"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;class EnableApiToCommand(set):&lt;BR /&gt;"""#TODO fixDocstring"""&lt;BR /&gt;DISABLE = "disable"&lt;BR /&gt;ALL = "all ip addresses"&lt;BR /&gt;MANAGEMENT_ONLY = "management server only"&lt;BR /&gt;GUI_CLIENTS = "all ip addresses that can be used for gui clients"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I need to understand why in my case the api are correctly enabled and started, but the access permissions are not set to any ip address despite the parameter is set to "all" but only in my latest days instead before was correctly setted to any and not to the default value "management server only".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Feb 2024 16:36:32 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-enable-api-quot-all-quot-don-t-work-anymore-in-my-terraform/m-p/205650#M8339</guid>
      <dc:creator>Antonio_Opromol</dc:creator>
      <dc:date>2024-02-10T16:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_enable_api   = "all"  don't work anymore in my terraform deployment</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-enable-api-quot-all-quot-don-t-work-anymore-in-my-terraform/m-p/205668#M8340</link>
      <description>&lt;P&gt;If I'm looking to the right scrypts, I see that the command used to set the api access is&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;mgmt_cli -r true set-api-settings '&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'accepted-api-calls-from "{}" --domain '&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'\'System Data\''.format(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;accepted_api_calls_from)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But I can't execute this command on a non MDS management, as say the error if try to run this command manually. I think this is the problem, but I don't understand why before has worked.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Feb 2024 22:06:06 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-enable-api-quot-all-quot-don-t-work-anymore-in-my-terraform/m-p/205668#M8340</guid>
      <dc:creator>Antonio_Opromol</dc:creator>
      <dc:date>2024-02-10T22:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_enable_api   = "all"  don't work anymore in my terraform deployment</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-enable-api-quot-all-quot-don-t-work-anymore-in-my-terraform/m-p/205977#M8341</link>
      <description>&lt;P&gt;Solved, after debug I've found that the problem was due to a FTW that doesn't accept my hash password for serial and maintenance, so passing an empty string the FWA finish correctly and the api access are set correctly to any ip address.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 16:43:31 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-enable-api-quot-all-quot-don-t-work-anymore-in-my-terraform/m-p/205977#M8341</guid>
      <dc:creator>Antonio_Opromol</dc:creator>
      <dc:date>2024-02-13T16:43:31Z</dc:date>
    </item>
  </channel>
</rss>

