2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-26 11:30:23 +00:00

Fix apikey storage

Adapt to how crypted. values are handled.
This commit is contained in:
Jarrod Johnson 2020-04-21 09:01:42 -04:00
parent 931c7f25d1
commit 59aabb0e69
2 changed files with 2 additions and 2 deletions

View File

@ -69,7 +69,7 @@ class CredServer(object):
client.close()
return
echotoken = util.stringify(client.recv(tlv[1]))
cfgupdate = {nodename: {'crypted.selfapikey': echotoken, 'deployment.apiarmed': ''}}
cfgupdate = {nodename: {'crypted.selfapikey': {'hashvalue': echotoken}, 'deployment.apiarmed': ''}}
if apiarmed == 'continuous':
del cfgupdate[nodename]['deployment.apiarmed']
self.cfm.set_node_attributes(cfgupdate)

View File

@ -28,7 +28,7 @@ def handle_request(env, start_response):
return
cfg = configmanager.ConfigManager(None)
eak = cfg.get_node_attributes(nodename, 'crypted.selfapikey').get(
nodename, {}).get('crypted.selfapikey', {}).get('value', None)
nodename, {}).get('crypted.selfapikey', {}).get('hashvalue', None)
if not eak:
start_response('401 Unauthorized', [])
yield 'Unauthorized'