From f0cefcc77d593198b6e295e92a8bf05fedc8c8ff Mon Sep 17 00:00:00 2001 From: Bhuvan Arumugam Date: Sun, 8 Jul 2012 16:06:32 -0700 Subject: Keyring support for openstackclient. Bug: 1030440 If password is defined in keyring, use it; otherwise, prompt for the password. Keying is configured using command line switch, --os-use-keyring or env(OS_USE_KEYRING). * openstackclient/common/openstackkeyring.py The abstract class for keyring, specifically for openstack. The class is used to store encrypted password in keyring, without prompting for keyring password. The encrypted password is stored in ~/.openstack-keyring.cfg file. * openstack-common.py Update openstackkeyring library from openstack.common. * openstackclient/shell.py OpenStackClient.build_option_parser(): New boolean argument, --os-use-keyring, default to env(OS_USE_KEYRING). OpenStackClient.authenticate_user(): Get password from keyring, if it is defined; otherwise, prompt for the password. If user enter a password and keyring is enabled, store it in keyring. OpenStackClient.init_keyring_backend(): New method to define openstack backend for keyring. OpenStackClient.get_password_from_keyring(): New method to get password from keyring. OpenStackClient.set_password_in_keyring(): New method go set password in keyring. * toos/pip-requires Define keyring and pycrypto as one of dependent. Change-Id: I36d3a63054658c0ef0553d68b38fefbc236930ef --- openstack-common.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openstack-common.conf') diff --git a/openstack-common.conf b/openstack-common.conf index 08e091b1..6b8b86a0 100644 --- a/openstack-common.conf +++ b/openstack-common.conf @@ -1,7 +1,7 @@ [DEFAULT] # The list of modules to copy from openstack-common -modules=setup +modules=setup,openstackkeyring # The base module to hold the copy of openstack.common base=openstackclient -- cgit v1.2.1