From 47f04c84628e5d199a1fba4fd43504544b1ae529 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 11 Dec 2020 10:37:00 -0500 Subject: [PATCH] Provide guidance if the user tries to use defaults Default username/password is no longer a viable long term credentiol for XCC, have user clearly be told to change and that they shouldn't have to worry about the default user and password. --- confluent_server/confluent/discovery/handlers/xcc.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/confluent_server/confluent/discovery/handlers/xcc.py b/confluent_server/confluent/discovery/handlers/xcc.py index 52a03ccf..7cb69473 100644 --- a/confluent_server/confluent/discovery/handlers/xcc.py +++ b/confluent_server/confluent/discovery/handlers/xcc.py @@ -223,6 +223,8 @@ class NodeHandler(immhandler.NodeHandler): 'secret.hardwaremanagementpassword'], decrypt=True) user, passwd, isdefault = self.get_node_credentials( nodename, creds, 'USERID', 'PASSW0RD') + if not inpreconfig and isdefault: + raise Exception('Default user/password is not supported. Please set "secret.hardwaremanagementuser" and "secret.hardwaremanagementpassword" for {} to a non-default value. If the XCC is currently at defaults, it will automatically change to the specified values'.format(nodename)) savedexc = None if not self.trieddefault: if not passwd: