2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-08-18 17:20:20 +00:00

Change from 'passphrase' to 'password'.

This commit is contained in:
Jarrod Johnson
2014-07-27 19:23:32 -04:00
parent bc00d71d96
commit 9b7d1d6c5b
9 changed files with 18 additions and 18 deletions

View File

@@ -1 +1 @@
0.1.5
0.2.0

View File

@@ -55,9 +55,9 @@ class Command(object):
else:
self.authenticated = False
def authenticate(self, username, passphrase):
def authenticate(self, username, password):
tlvdata.send(self.connection,
{'username': username, 'passphrase': passphrase})
{'username': username, 'password': password})
authdata = tlvdata.recv(self.connection)
if authdata['authpassed'] == 1:
self.authenticated = True

View File

@@ -1 +1 @@
0.2.0
0.2.1

View File

@@ -61,7 +61,7 @@ nic = {
}
user = {
'passphrase': {
'password': {
'description': 'The passphrase used to authenticate this user'
},
}
@@ -255,7 +255,7 @@ node = {
'this class of protocols and SNMP and IPMI, snmp and '
'ipmi utilize dedicated values.'),
},
'secret.hardwaremanagementpassphrase': {
'secret.hardwaremanagementpassword': {
'description': ('Passphrase to be set and used by protocols like SSH '
'and HTTP, where client sends passphrase over the '
'network. Given distinct security models between '

View File

@@ -578,7 +578,7 @@ class ConfigManager(object):
"""
user = self._cfgstore['users'][name]
for attribute in attributemap:
if attribute == 'passphrase':
if attribute == 'password':
salt = os.urandom(8)
#TODO: WORKERPOOL, offload password set to a worker
crypted = KDF.PBKDF2(
@@ -1163,4 +1163,4 @@ except IOError:
# group should get it then
# rinse and repeat for set on node versus set on group
# clear group attribute and assure than it becomes unset on all nodes
# set various expressions
# set various expressions

View File

@@ -151,10 +151,10 @@ def show_user(name, configmanager):
rv = {}
for attr in attrscheme.user.iterkeys():
rv[attr] = None
if attr == 'passphrase':
if attr == 'password':
if 'cryptpass' in userobj:
rv['passphrase'] = {'cryptvalue': True}
yield msg.CryptedAttributes(kv={'passphrase': rv['passphrase']},
rv['password'] = {'cryptvalue': True}
yield msg.CryptedAttributes(kv={'password': rv['password']},
desc=attrscheme.user[attr][
'description'])
else:

View File

@@ -20,7 +20,7 @@ import confluent.config.attributes as allattributes
def retrieve(nodes, element, configmanager, inputdata):
if nodes is not None:
return retrieve_nodes(nodes, element, configmanager, inputdata)
elif element[0] == 'groups':
elif element[0] == 'nodegroups':
return retrieve_nodegroup(
element[1], element[3], configmanager, inputdata)
@@ -128,7 +128,7 @@ def retrieve_nodes(nodes, element, configmanager, inputdata):
def update(nodes, element, configmanager, inputdata):
if nodes is not None:
return update_nodes(nodes, element, configmanager, inputdata)
elif element[0] == 'groups':
elif element[0] == 'nodegroups':
return update_nodegroup(
element[1], element[3], configmanager, inputdata)
raise Exception("This line should never be reached")

View File

@@ -36,7 +36,7 @@ class IpmiCommandWrapper(ipmicommand.Command):
def __init__(self, node, cfm, **kwargs):
self._attribwatcher = cfm.watch_attributes(
(node,),('secret.hardwaremanagementuser',
'secret.hardwaremanagementpassphrase', 'secret.ipmikg',
'secret.hardwaremanagementpassword', 'secret.ipmikg',
'hardwaremanagement.manager'), self._attribschanged)
super(self.__class__, self).__init__(**kwargs)
@@ -61,8 +61,8 @@ def get_conn_params(node, configdata):
username = configdata['secret.hardwaremanagementuser']['value']
else:
username = 'USERID'
if 'secret.hardwaremanagementpassphrase' in configdata:
passphrase = configdata['secret.hardwaremanagementpassphrase']['value']
if 'secret.hardwaremanagementpassword' in configdata:
passphrase = configdata['secret.hardwaremanagementpassword']['value']
else:
passphrase = 'PASSW0RD' # for lack of a better guess
if 'hardwaremanagement.manager' in configdata:
@@ -85,7 +85,7 @@ def get_conn_params(node, configdata):
_configattributes = ('secret.hardwaremanagementuser',
'secret.hardwaremanagementpassphrase',
'secret.hardwaremanagementpassword',
'secret.ipmikg', 'hardwaremanagement.manager')

View File

@@ -80,7 +80,7 @@ def sessionhdl(connection, authname, skipauth=False):
tlvdata.send(connection, {'authpassed': 0})
response = tlvdata.recv(connection)
authname = response['username']
passphrase = response['passphrase']
passphrase = response['password']
# note(jbjohnso): here, we need to authenticate, but not
# authorize a user. When authorization starts understanding
# element path, that authorization will need to be called