aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Moravec <pmoravec@redhat.com>2017-09-01 21:20:58 +0200
committerBryn M. Reeves <bmr@redhat.com>2017-10-27 14:06:29 +0100
commita53057797e7fb863e0b46dcb848462355503ec89 (patch)
treef3ff5e70061e7bfa799fe9006cdd6986b3851ac0
parent42d6377a42679d90ac4404b4bd210763d13eef17 (diff)
downloadsos-a53057797e7fb863e0b46dcb848462355503ec89.tar.gz
[openstack_keystone] collect domain specific config
Collect domain config directory if it exists. Resolves: #1086 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
-rw-r--r--sos/plugins/openstack_keystone.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/sos/plugins/openstack_keystone.py b/sos/plugins/openstack_keystone.py
index bdcb61d1..d8be424b 100644
--- a/sos/plugins/openstack_keystone.py
+++ b/sos/plugins/openstack_keystone.py
@@ -55,6 +55,15 @@ class OpenStackKeystone(Plugin):
"/var/log/containers/keystone/*.log"
], sizelimit=self.limit)
+ # collect domain config directory, if exists
+ self.domain_config_dir_added = False
+ self.domain_config_dir = self.get_cmd_output_now(
+ "openstack-config --get /etc/keystone/keystone.conf "
+ "identity domain_config_dir")
+ if self.domain_config_dir and os.path.isdir(self.domain_config_dir):
+ self.add_copy_spec(self.domain_config_dir)
+ self.domain_config_dir_added = True
+
if self.get_option("verify"):
self.add_cmd_output("rpm -V %s" % ' '.join(self.packages))
@@ -86,6 +95,11 @@ class OpenStackKeystone(Plugin):
regexp, r"\1*********"
)
+ # obfuscate LDAP plaintext passwords in domain config dir, if collected
+ if self.domain_config_dir_added:
+ self.do_path_regex_sub(self.domain_config_dir,
+ r"((?m)^\s*(%s)\s*=\s*)(.*)", r"\1********")
+
class DebianKeystone(OpenStackKeystone, DebianPlugin, UbuntuPlugin):