mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-25 19:10:10 +00:00
Support proper readback of crypted
crypted attributes should be treated about the same as passwords.
This commit is contained in:
parent
890793068c
commit
e2aaa2afb4
@ -1802,6 +1802,9 @@ class CryptedAttributes(Attributes):
|
||||
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'] != '':
|
||||
nkv[key] = {'isset': True}
|
||||
nkv[key]['inheritedfrom'] = kv[key]['inheritedfrom']
|
||||
except KeyError:
|
||||
pass
|
||||
self.notnode = name is None
|
||||
|
@ -57,7 +57,7 @@ def retrieve_nodegroup(nodegroup, element, configmanager, inputdata):
|
||||
val['desc'] = 'The noderange this group is expanded ' \
|
||||
'to when used in noderange, exclusive with static ' \
|
||||
'nodes'
|
||||
if attribute.startswith('secret.'):
|
||||
if attribute.startswith('secret.') or attribute.startswith('crypted.'):
|
||||
yield msg.CryptedAttributes(
|
||||
kv={attribute: val},
|
||||
desc=allattributes.node[attribute]['description'])
|
||||
@ -117,7 +117,7 @@ def retrieve_nodes(nodes, element, configmanager, inputdata):
|
||||
val = []
|
||||
else: # no setting, provide a blank
|
||||
val = {'value': None}
|
||||
if attribute.startswith('secret.'):
|
||||
if attribute.startswith('secret.') or attribute.startswith('crypted.'):
|
||||
yield msg.CryptedAttributes(
|
||||
node, {attribute: val},
|
||||
allattributes.node.get(
|
||||
|
Loading…
Reference in New Issue
Block a user