Skip to content

Commit

Permalink
Merge pull request #3105 from schandrika/non_auth_fix_3099
Browse files Browse the repository at this point in the history
Fix for issue #3099
  • Loading branch information
shwethanidd committed Aug 18, 2023
2 parents a39657d + e28b12c commit 3f86957
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions volttron/platform/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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!')
Expand Down

0 comments on commit 3f86957

Please sign in to comment.