From 38754722e08e1c9b48af39a11cc455916e1f9161 Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Tue, 28 Nov 2023 19:00:23 -0500 Subject: Fix connection security state saving Fix parsing of connection security state from the .ini file to match what is getting written out, and update the canned default .ini file to match the changes. Bug-AGL: SPEC-4997 Change-Id: I49060a8bb4f08ba0ffa0cf1748bab2203716e032 Signed-off-by: Scott Murray --- extras/config.ini | 10 +++++----- extras/config.py | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'extras') diff --git a/extras/config.ini b/extras/config.ini index 54e3424..2fcbbed 100644 --- a/extras/config.ini +++ b/extras/config.ini @@ -15,7 +15,7 @@ cacert = default # ip= # port= # protocol= # ws/grpc -> kuksa-val-server, grpc -> databroker -# insecure= # Note: Use insecure mode only if server is also running in insecure mode +# insecure= # Note: Use insecure mode only if server is also running in insecure mode # cacert= # token= # tls_server_name= @@ -24,7 +24,7 @@ cacert = default ip=localhost port=8090 protocol=ws -insecure=false +insecure=False token=default tls_server_name= @@ -33,7 +33,7 @@ tls_server_name= ip=localhost port=55555 protocol=grpc -insecure=false +insecure=False token=default tls_server_name=Server @@ -42,7 +42,7 @@ tls_server_name=Server ip=localhost port=8090 protocol=ws -insecure=false +insecure=False cacert=default token=default tls_server_name= @@ -52,7 +52,7 @@ tls_server_name= ip=10.42.0.95 port=55555 protocol=grpc -insecure=false +insecure=False cacert=default token=default tls_server_name=Server diff --git a/extras/config.py b/extras/config.py index 1a10719..f8e5ccb 100644 --- a/extras/config.py +++ b/extras/config.py @@ -82,7 +82,7 @@ def select_config(preferred_config): KUKSA_CONFIG['ip'] = config[preferred_config]['ip'] KUKSA_CONFIG['port'] = config[preferred_config]['port'] KUKSA_CONFIG['protocol'] = config[preferred_config]['protocol'] - KUKSA_CONFIG['insecure'] = False if config[preferred_config]['insecure'] == 'false' else True + KUKSA_CONFIG['insecure'] = False if config[preferred_config]['insecure'] == 'False' else True if config.has_option(preferred_config, 'cacert'): KUKSA_CONFIG['cacertificate'] = config[preferred_config]['cacert'] if os.path.exists( @@ -163,4 +163,4 @@ if not config.has_section('user-session'): 'token': "", 'tls_server_name': "", } - save_session_config(temp, 'default', 'default') \ No newline at end of file + save_session_config(temp, 'default', 'default') -- cgit 1.2.3-korg