Skip to content

Commit 6e6d496

Browse files
NVSHAS-10111: [cli] make 'enforce TLS verification' for accessing external services configurable (6)
1 parent e02ea1f commit 6e6d496

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

cli/prog/system.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,10 @@ def showLocalSystemConfig(data, scope):
304304
conf["allow_ns_user_export_net_policy"] = False
305305
column_map += (("allow_ns_user_export_net_policy", "Allow namespace user to export all network policies of a group that the user has read permission"),)
306306

307+
if "enable_tls_verification" not in conf:
308+
conf["enable_tls_verification"] = False
309+
column_map += (("enable_tls_verification", "Enable TLS verification for communications with external servers"),)
310+
307311
scannerAutoscaleStrategy = "Disabled"
308312
minScanners = 0
309313
maxScanners = 0
@@ -993,6 +997,13 @@ def set_system_allow_ns_user_export_net_policy(data, enable):
993997
"""Allow namespace user to export all network policies of a group that the user has read permission"""
994998
data.client.config_system(allow_ns_user_export_net_policy=enable)
995999

1000+
@set_system.command("enable_tls_verification")
1001+
@click.option("--enable/--disable", default=True, is_flag=True, help="Enable TLS verification for communications with external servers")
1002+
@click.pass_obj
1003+
def set_system_enable_tls_verification(data, enable):
1004+
"""Enable TLS verification for communications with external servers"""
1005+
data.client.config_system(enable_tls_verification=enable)
1006+
9961007
@set_system.group("monitor_service_mesh")
9971008
@click.pass_obj
9981009
def set_system_monitor_service_mesh(data):

0 commit comments

Comments
 (0)