diff --git a/confluent_server/confluent/messages.py b/confluent_server/confluent/messages.py index 23e7cf4b..c1de838f 100644 --- a/confluent_server/confluent/messages.py +++ b/confluent_server/confluent/messages.py @@ -1798,11 +1798,12 @@ class CryptedAttributes(Attributes): nkv = {} for key in kv: nkv[key] = {'isset': False} + if 'hashvalue' in kv[key]: + targkey = 'hashvalue' + else: + targkey = 'cryptvalue' try: - if kv[key] is not None and kv[key]['cryptvalue'] != '': - nkv[key] = {'isset': True} - nkv[key]['inheritedfrom'] = kv[key]['inheritedfrom'] - elif kv[key] is not None and kv[key]['hashvalue'] != '': + if kv[key] is not None and kv[key][targkey] != '': nkv[key] = {'isset': True} nkv[key]['inheritedfrom'] = kv[key]['inheritedfrom'] except KeyError: diff --git a/confluent_server/confluent/plugins/configuration/attributes.py b/confluent_server/confluent/plugins/configuration/attributes.py index 170ed15d..b02f3b15 100644 --- a/confluent_server/confluent/plugins/configuration/attributes.py +++ b/confluent_server/confluent/plugins/configuration/attributes.py @@ -142,7 +142,7 @@ def retrieve_nodes(nodes, element, configmanager, inputdata): desc = '' if 'value' in currattr or 'expression' in currattr: yield msg.Attributes(node, {attribute: currattr}, desc) - elif 'cryptvalue' in currattr: + elif 'cryptvalue' in currattr or 'hashvalue' in currattr: yield msg.CryptedAttributes( node, {attribute: currattr}, desc) elif isinstance(currattr, list):