diff --git a/confluent_server/confluent/config/attributes.py b/confluent_server/confluent/config/attributes.py index 42fd6beb..e9d2a56d 100644 --- a/confluent_server/confluent/config/attributes.py +++ b/confluent_server/confluent/config/attributes.py @@ -101,7 +101,7 @@ node = { 'description': 'The password of the local root password. ' 'This is stored as a non-recoverable hash.', }, - 'deployment.apikey': { + 'crypted.selfapikey': { 'description': ('Crypt of api key for self api requests by node'), }, 'deployment.apiarmed': { diff --git a/confluent_server/confluent/credserver.py b/confluent_server/confluent/credserver.py index 735110ee..dec553f8 100644 --- a/confluent_server/confluent/credserver.py +++ b/confluent_server/confluent/credserver.py @@ -69,7 +69,7 @@ class CredServer(object): client.close() return echotoken = util.stringify(client.recv(tlv[1])) - cfgupdate = {nodename: {'deployment.apikey': echotoken, 'deployment.apiarmed': ''}} + cfgupdate = {nodename: {'crypted.selfapikey': echotoken, 'deployment.apiarmed': ''}} if apiarmed == 'continuous': del cfgupdate[nodename]['deployment.apiarmed'] self.cfm.set_node_attributes(cfgupdate) diff --git a/confluent_server/confluent/selfservice.py b/confluent_server/confluent/selfservice.py index 1c48bca7..d271174e 100644 --- a/confluent_server/confluent/selfservice.py +++ b/confluent_server/confluent/selfservice.py @@ -27,8 +27,8 @@ def handle_request(env, start_response): yield 'Unauthorized' return cfg = configmanager.ConfigManager(None) - eak = cfg.get_node_attributes(nodename, 'deployment.apikey').get( - nodename, {}).get('deployment.apikey', {}).get('value', None) + eak = cfg.get_node_attributes(nodename, 'crypted.selfapikey').get( + nodename, {}).get('crypted.selfapikey', {}).get('value', None) if not eak: start_response('401 Unauthorized', []) yield 'Unauthorized'