<?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 CME Custom Gateway Script fails when resetting the RADIUS settings while redeploying script against in Cloud Firewall</title>
    <link>https://community.checkpoint.com/t5/Cloud-Firewall/CME-Custom-Gateway-Script-fails-when-resetting-the-RADIUS/m-p/212927#M4739</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;We have been using CP CME for a couple of years and I have been looking into what can be done smarter.&lt;/P&gt;
&lt;P&gt;When we make changes to autoprovision.json via cmd autoprov-cfg it triggers an update/redeplyment on Cloudguards in our VMSS Scale Sets.&lt;/P&gt;
&lt;P&gt;For example update / redeploying could be to add new log servers it will also trigger running the attached custom gateway script.&lt;/P&gt;
&lt;P&gt;With the custom gateway script we might be setting banner for compliance purposes or time servers and DNS etc..&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What we have added are also RADIUS authentication and that is were the problem happens.&lt;/P&gt;
&lt;P&gt;When the script runs on the running VMSS Scale Sets Gloudguards the RADIUS breaks the run-script.&lt;/P&gt;
&lt;P&gt;The error is:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="ui-provider a b c d e f g h i j k l m n o p q r s t u v w x y z ab ac ae af ag ah ai aj ak"&gt;WARNING Please make sure you do not configure the same user names on this RADIUS server and locally&lt;BR /&gt;WARNING Please make sure you do not configure the same user names on this RADIUS server and locally&lt;BR /&gt;&amp;nbsp; GAIA0101&amp;nbsp; Host already exist&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Error exception are shown in below output.&lt;/P&gt;
&lt;P&gt;################################ output from cme.log ######################################&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;2024-05-01 13:59:56,774 CME_SERVICE INFO Running script: "/bin/cg-azsea-script.sh " on target: SEATST&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;2024-05-01 14:00:07,043 CME_SERVICE INFO Resetting gateway SEATST&lt;BR /&gt;2024-05-01 14:00:07,121 CME_SERVICE INFO Deleting objects for gateway: SEATST-&lt;BR /&gt;2024-05-01 14:00:07,121 CME_SERVICE INFO Deleting objects with Policy Destructor Network Group&lt;BR /&gt;2024-05-01 14:00:11,445 CME_SERVICE INFO Gateway instance SEATST was removed successfully from CME_SEATST&amp;nbsp;network group&lt;BR /&gt;2024-05-01 14:00:11,446 CME_SERVICE ERROR Failed to provision the Security Gateway instance SEATST&lt;BR /&gt;2024-05-01 14:00:11,462 CME_SERVICE ERROR Error traceback: Traceback (most recent call last):&lt;BR /&gt;File "/opt/CPcme/cp_handlers/mgmt_autoprovision_handler.py", line 1124, in run_post_customize&amp;nbsp;instance.name)&lt;BR /&gt;File "/opt/CPcme/cp_handlers/mgmt_autoprovision_handler.py", line 1066, in run_custom_gateway_script&amp;nbsp;put_file_dict=put_file_dict)&lt;BR /&gt;File "/opt/CPcme/cp_handlers/mgmt_handler.py", line 275, in run_script&lt;BR /&gt;response = self(CPMCommand.RUN_SCRIPT, body).get(&lt;BR /&gt;File "/opt/CPcme/cp_handlers/mgmt_handler.py", line 178, in __call__&lt;BR /&gt;silent=silent)&lt;BR /&gt;File "/opt/CPcme/cp_handlers/mgmt_api_handler.py", line 245, in __call__&lt;BR /&gt;CMEExceptionCodes.MGMT_API, command=command)&lt;BR /&gt;cme_exceptions.cme_exceptions.ManagementApiException: Error Code: Management API error&lt;/P&gt;
&lt;P&gt;API call failed with command: run-script&lt;BR /&gt;Payload: {'script-name': '/bin/cg-azsea-script.sh ', 'script': '/bin/cg-azsea-script.sh ', 'targets': ['SEATST']}&lt;BR /&gt;&lt;STRONG&gt;Error details: WARNING Please make sure you do not configure the same user names on this RADIUS server and locally, WARNING Please make sure you do not configure the same user name&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;s on this RA...&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;During handling of the above exception, another exception occurred:&lt;/P&gt;
&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt;File "/opt/CPcme/service/cme_service.py", line 533, in sync&lt;BR /&gt;is_setup_gw_succeed = management.autoprovision_handler.set_gateway(instance, gw, auto_hf)&lt;BR /&gt;File "/opt/CPcme/cp_handlers/mgmt_autoprovision_handler.py", line 1473, in set_gateway&lt;BR /&gt;self.provision_gateway(instance, gw, auto_hf, gw_tags, simple_gateway)&lt;BR /&gt;File "/opt/CPcme/cp_handlers/mgmt_autoprovision_handler.py", line 2857, in provision_gateway&lt;BR /&gt;self.run_post_customize(instance=instance, gw=gw, gw_tags=gw_tags)&lt;BR /&gt;File "/opt/CPcme/cp_handlers/mgmt_autoprovision_handler.py", line 1133, in run_post_customize&lt;BR /&gt;raise Exception(f'post-customize gateway failed: {str(e)}')&lt;BR /&gt;&lt;STRONG&gt;Exception: post-customize gateway failed: Error Code: Management API error&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;API call failed with command: run-script&lt;BR /&gt;Payload: {'script-name': '/bin/cg-azsea-script.sh ', 'script': '/bin/cg-azsea-script.sh ', 'targets': ['SEATST']}&lt;BR /&gt;&lt;STRONG&gt;Error details: WARNING Please make sure you do not configure the same user names on this RADIUS server and locally, WARNING Please make sure you do not configure the same user name&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;s on this RA...&lt;/STRONG&gt;&lt;BR /&gt;2024-05-01 14:00:13,499 CME_SERVICE INFO VMSS hub-cldgd-dev-scaleset, is managed by private ip address through eth1&lt;/P&gt;
&lt;P&gt;################################ output from cme.log ######################################&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can this be solved? I have added the script as an attachment&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 03 May 2024 05:04:05 GMT</pubDate>
    <dc:creator>Kim_Moberg</dc:creator>
    <dc:date>2024-05-03T05:04:05Z</dc:date>
    <item>
      <title>CME Custom Gateway Script fails when resetting the RADIUS settings while redeploying script against</title>
      <link>https://community.checkpoint.com/t5/Cloud-Firewall/CME-Custom-Gateway-Script-fails-when-resetting-the-RADIUS/m-p/212927#M4739</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;We have been using CP CME for a couple of years and I have been looking into what can be done smarter.&lt;/P&gt;
&lt;P&gt;When we make changes to autoprovision.json via cmd autoprov-cfg it triggers an update/redeplyment on Cloudguards in our VMSS Scale Sets.&lt;/P&gt;
&lt;P&gt;For example update / redeploying could be to add new log servers it will also trigger running the attached custom gateway script.&lt;/P&gt;
&lt;P&gt;With the custom gateway script we might be setting banner for compliance purposes or time servers and DNS etc..&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What we have added are also RADIUS authentication and that is were the problem happens.&lt;/P&gt;
&lt;P&gt;When the script runs on the running VMSS Scale Sets Gloudguards the RADIUS breaks the run-script.&lt;/P&gt;
&lt;P&gt;The error is:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="ui-provider a b c d e f g h i j k l m n o p q r s t u v w x y z ab ac ae af ag ah ai aj ak"&gt;WARNING Please make sure you do not configure the same user names on this RADIUS server and locally&lt;BR /&gt;WARNING Please make sure you do not configure the same user names on this RADIUS server and locally&lt;BR /&gt;&amp;nbsp; GAIA0101&amp;nbsp; Host already exist&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Error exception are shown in below output.&lt;/P&gt;
&lt;P&gt;################################ output from cme.log ######################################&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;2024-05-01 13:59:56,774 CME_SERVICE INFO Running script: "/bin/cg-azsea-script.sh " on target: SEATST&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;2024-05-01 14:00:07,043 CME_SERVICE INFO Resetting gateway SEATST&lt;BR /&gt;2024-05-01 14:00:07,121 CME_SERVICE INFO Deleting objects for gateway: SEATST-&lt;BR /&gt;2024-05-01 14:00:07,121 CME_SERVICE INFO Deleting objects with Policy Destructor Network Group&lt;BR /&gt;2024-05-01 14:00:11,445 CME_SERVICE INFO Gateway instance SEATST was removed successfully from CME_SEATST&amp;nbsp;network group&lt;BR /&gt;2024-05-01 14:00:11,446 CME_SERVICE ERROR Failed to provision the Security Gateway instance SEATST&lt;BR /&gt;2024-05-01 14:00:11,462 CME_SERVICE ERROR Error traceback: Traceback (most recent call last):&lt;BR /&gt;File "/opt/CPcme/cp_handlers/mgmt_autoprovision_handler.py", line 1124, in run_post_customize&amp;nbsp;instance.name)&lt;BR /&gt;File "/opt/CPcme/cp_handlers/mgmt_autoprovision_handler.py", line 1066, in run_custom_gateway_script&amp;nbsp;put_file_dict=put_file_dict)&lt;BR /&gt;File "/opt/CPcme/cp_handlers/mgmt_handler.py", line 275, in run_script&lt;BR /&gt;response = self(CPMCommand.RUN_SCRIPT, body).get(&lt;BR /&gt;File "/opt/CPcme/cp_handlers/mgmt_handler.py", line 178, in __call__&lt;BR /&gt;silent=silent)&lt;BR /&gt;File "/opt/CPcme/cp_handlers/mgmt_api_handler.py", line 245, in __call__&lt;BR /&gt;CMEExceptionCodes.MGMT_API, command=command)&lt;BR /&gt;cme_exceptions.cme_exceptions.ManagementApiException: Error Code: Management API error&lt;/P&gt;
&lt;P&gt;API call failed with command: run-script&lt;BR /&gt;Payload: {'script-name': '/bin/cg-azsea-script.sh ', 'script': '/bin/cg-azsea-script.sh ', 'targets': ['SEATST']}&lt;BR /&gt;&lt;STRONG&gt;Error details: WARNING Please make sure you do not configure the same user names on this RADIUS server and locally, WARNING Please make sure you do not configure the same user name&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;s on this RA...&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;During handling of the above exception, another exception occurred:&lt;/P&gt;
&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt;File "/opt/CPcme/service/cme_service.py", line 533, in sync&lt;BR /&gt;is_setup_gw_succeed = management.autoprovision_handler.set_gateway(instance, gw, auto_hf)&lt;BR /&gt;File "/opt/CPcme/cp_handlers/mgmt_autoprovision_handler.py", line 1473, in set_gateway&lt;BR /&gt;self.provision_gateway(instance, gw, auto_hf, gw_tags, simple_gateway)&lt;BR /&gt;File "/opt/CPcme/cp_handlers/mgmt_autoprovision_handler.py", line 2857, in provision_gateway&lt;BR /&gt;self.run_post_customize(instance=instance, gw=gw, gw_tags=gw_tags)&lt;BR /&gt;File "/opt/CPcme/cp_handlers/mgmt_autoprovision_handler.py", line 1133, in run_post_customize&lt;BR /&gt;raise Exception(f'post-customize gateway failed: {str(e)}')&lt;BR /&gt;&lt;STRONG&gt;Exception: post-customize gateway failed: Error Code: Management API error&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;API call failed with command: run-script&lt;BR /&gt;Payload: {'script-name': '/bin/cg-azsea-script.sh ', 'script': '/bin/cg-azsea-script.sh ', 'targets': ['SEATST']}&lt;BR /&gt;&lt;STRONG&gt;Error details: WARNING Please make sure you do not configure the same user names on this RADIUS server and locally, WARNING Please make sure you do not configure the same user name&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;s on this RA...&lt;/STRONG&gt;&lt;BR /&gt;2024-05-01 14:00:13,499 CME_SERVICE INFO VMSS hub-cldgd-dev-scaleset, is managed by private ip address through eth1&lt;/P&gt;
&lt;P&gt;################################ output from cme.log ######################################&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can this be solved? I have added the script as an attachment&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2024 05:04:05 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Cloud-Firewall/CME-Custom-Gateway-Script-fails-when-resetting-the-RADIUS/m-p/212927#M4739</guid>
      <dc:creator>Kim_Moberg</dc:creator>
      <dc:date>2024-05-03T05:04:05Z</dc:date>
    </item>
    <item>
      <title>Re: CME Custom Gateway Script fails when resetting the RADIUS settings while redeploying script agai</title>
      <link>https://community.checkpoint.com/t5/Cloud-Firewall/CME-Custom-Gateway-Script-fails-when-resetting-the-RADIUS/m-p/213961#M4751</link>
      <description>&lt;P&gt;Hello Kim,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Based on my examination of the SR, we suspect the problem lies within the script due to an erroneous in the&amp;nbsp; management API call.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Needs to verify that the script run successfully when invoked from the management using mgmt_cli run-script.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 12 May 2024 15:24:40 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Cloud-Firewall/CME-Custom-Gateway-Script-fails-when-resetting-the-RADIUS/m-p/213961#M4751</guid>
      <dc:creator>Shay_Levin</dc:creator>
      <dc:date>2024-05-12T15:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: CME Custom Gateway Script fails when resetting the RADIUS settings while redeploying script agai</title>
      <link>https://community.checkpoint.com/t5/Cloud-Firewall/CME-Custom-Gateway-Script-fails-when-resetting-the-RADIUS/m-p/214001#M4755</link>
      <description>&lt;P&gt;Hello Shay,&lt;BR /&gt;&lt;BR /&gt;I can also see mgmt api call generate an error but I do now run any Mgmt CLI commands via the script in itself.&lt;/P&gt;
&lt;P&gt;If I run the script directly on the gateway I do not get the error other than standard RADIUS warning.&lt;/P&gt;
&lt;P&gt;Basically my impression is a pure error handling of such condition and if we any one working on with cloudguards and using custom gateways script might have an experienced similar issue, or am I wrong here?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2024 09:19:34 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Cloud-Firewall/CME-Custom-Gateway-Script-fails-when-resetting-the-RADIUS/m-p/214001#M4755</guid>
      <dc:creator>Kim_Moberg</dc:creator>
      <dc:date>2024-05-13T09:19:34Z</dc:date>
    </item>
  </channel>
</rss>

