From e28b12c3e6795f8f930820d6eb9a2ecd5c49b9e0 Mon Sep 17 00:00:00 2001 From: Chandrika Sivaramakrishnan Date: Thu, 17 Aug 2023 16:52:48 -0700 Subject: [PATCH] Fix for issue #3099 --- volttron/platform/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/volttron/platform/__init__.py b/volttron/platform/__init__.py index 375fdb6f31..d5b0a926d6 100644 --- a/volttron/platform/__init__.py +++ b/volttron/platform/__init__.py @@ -281,17 +281,19 @@ def build_vip_address_string(vip_root, serverkey, publickey, secretkey): :raises ValueError if one of the parameters is None. """ + from volttron.platform.agent.utils import is_auth_enabled + _log.debug("root: {}, serverkey: {}, publickey: {}, secretkey: {}".format( vip_root, serverkey, publickey, secretkey)) parsed = urlparse(vip_root) - if parsed.scheme == 'tcp': + if parsed.scheme == 'tcp' and is_auth_enabled(): if not (serverkey and publickey and secretkey and vip_root): raise ValueError("All parameters must be entered.") root = "{}?serverkey={}&publickey={}&secretkey={}".format( vip_root, serverkey, publickey, secretkey) - elif parsed.scheme == 'ipc': + elif parsed.scheme == 'ipc' or not is_auth_enabled(): root = vip_root else: raise ValueError('Invalid vip root specified!')