From 082c228f98e1d7545a9d5d7abe10bd35691d85c9 Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Wed, 7 Jul 2010 18:29:19 -0700 Subject: use a flag for cert subject --- nova/auth/users.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'nova/auth') diff --git a/nova/auth/users.py b/nova/auth/users.py index 1fc97345f..1a270733e 100644 --- a/nova/auth/users.py +++ b/nova/auth/users.py @@ -100,6 +100,10 @@ flags.DEFINE_string('credential_cert_file', 'cert.pem', 'Filename of certificate in credentials zip') flags.DEFINE_string('credential_rc_file', 'novarc', 'Filename of rc in credentials zip') +flags.DEFINE_string('credential_cert_subject', + '/C=US/ST=California/L=MountainView/O=AnsoLabs/' + 'OU=NovaDev/CN=%s-%s' + 'Subject for certificate for users') flags.DEFINE_string('vpn_ip', '127.0.0.1', 'Public IP for the cloudpipe VPN servers') @@ -516,7 +520,7 @@ class UserManager(object): def __cert_subject(self, uid): # FIXME(ja) - this should be pulled from a global configuration - return "/C=US/ST=California/L=MountainView/O=AnsoLabs/OU=NovaDev/CN=%s-%s" % (uid, str(datetime.datetime.utcnow().isoformat())) + return FLAGS.credential_cert_subject % (uid, utils.isotime()) class LDAPWrapper(object): -- cgit From f5ce5b5750120012287d78ea0a40598ec0eefd47 Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Thu, 8 Jul 2010 09:42:11 -0700 Subject: missed a comma --- nova/auth/users.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nova/auth') diff --git a/nova/auth/users.py b/nova/auth/users.py index 1a270733e..671fdbdbf 100644 --- a/nova/auth/users.py +++ b/nova/auth/users.py @@ -102,7 +102,7 @@ flags.DEFINE_string('credential_rc_file', 'novarc', 'Filename of rc in credentials zip') flags.DEFINE_string('credential_cert_subject', '/C=US/ST=California/L=MountainView/O=AnsoLabs/' - 'OU=NovaDev/CN=%s-%s' + 'OU=NovaDev/CN=%s-%s', 'Subject for certificate for users') flags.DEFINE_string('vpn_ip', '127.0.0.1', 'Public IP for the cloudpipe VPN servers') -- cgit From 732707903f65fc126c147fc0a0839a3639b8d976 Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Mon, 12 Jul 2010 15:11:41 -0500 Subject: fixed bug in auth group_exists it was using the name instead of the dn --- nova/auth/users.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nova/auth') diff --git a/nova/auth/users.py b/nova/auth/users.py index 671fdbdbf..769983e83 100644 --- a/nova/auth/users.py +++ b/nova/auth/users.py @@ -710,7 +710,7 @@ class LDAPWrapper(object): def __create_group(self, group_dn, name, uid, description, member_uids = None): - if self.group_exists(name): + if self.group_exists(group_dn): raise exception.Duplicate("Group can't be created because " "group %s already exists" % name) members = [] -- cgit