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:
parent
931c7f25d1
commit
59aabb0e69
@ -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)
|
||||
|
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user