Export user id as password to keystone when using noauth
Fixes bug #969208 When using noauth, a user's password is her user id (e.g. in novarc). When we export to keystone, we should make sure the same credentials keep working rather than effectively switching all the passwords to random UUIDs which users would never have seen before. Change-Id: Ie77c622ce1952d03e836bb64167184022a02e902
This commit is contained in:
@@ -1542,16 +1542,23 @@ class ExportCommands(object):
|
||||
am = manager.AuthManager()
|
||||
|
||||
for user in am.get_users():
|
||||
# NOTE(vish): Deprecated auth uses an access key, no auth uses a
|
||||
# the user_id in place of it.
|
||||
if FLAGS.auth_strategy == 'deprecated':
|
||||
access = user.access
|
||||
else:
|
||||
access = user.id
|
||||
|
||||
user_dict = {
|
||||
'id': user.id,
|
||||
'name': user.name,
|
||||
'password': user.access,
|
||||
'password': access,
|
||||
}
|
||||
output['users'].append(user_dict)
|
||||
|
||||
ec2_cred = {
|
||||
'user_id': user.id,
|
||||
'access_key': user.access,
|
||||
'access_key': access,
|
||||
'secret_key': user.secret,
|
||||
}
|
||||
output['ec2_credentials'].append(ec2_cred)
|
||||
|
||||
Reference in New Issue
Block a user