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:
@@ -1 +1 @@
|
||||
0.1.5
|
||||
0.2.0
|
||||
|
@@ -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
|
||||
|
@@ -1 +1 @@
|
||||
0.2.0
|
||||
0.2.1
|
||||
|
@@ -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 '
|
||||
|
@@ -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
|
||||
|
@@ -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:
|
||||
|
@@ -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")
|
||||
|
@@ -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')
|
||||
|
||||
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user