aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJose Castillo <jcastillo@redhat.com>2017-09-09 11:00:59 +0100
committerBryn M. Reeves <bmr@redhat.com>2018-04-04 16:27:45 +0100
commit0be652d6a69dfcdb7859209f110d465d67959b54 (patch)
treeb26da57be6446012454064b134a882bd4cf4982c
parent903e1c1508eeae6f218e01e56825c68726f017e8 (diff)
downloadsos-0be652d6a69dfcdb7859209f110d465d67959b54.tar.gz
[rabbitmq] Mask default password in rabbitmq.conf
Use do_file_sub() to mask the default password in the config file /etc/rabbitmq/rabbitmq.conf, and solve issue #840. Fixes: #840 Closes: #1100 Signed-off-by: Jose Castillo <jcastillo@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/rabbitmq.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/sos/plugins/rabbitmq.py b/sos/plugins/rabbitmq.py
index 8057dd90..f7528f8e 100644
--- a/sos/plugins/rabbitmq.py
+++ b/sos/plugins/rabbitmq.py
@@ -60,5 +60,8 @@ class RabbitMQ(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
"/var/log/containers/rabbitmq/*"
], sizelimit=self.get_option('log_size'))
+ def postproc(self):
+ self.do_file_sub("/etc/rabbitmq/rabbitmq.conf",
+ r"(\s*default_pass\s*,\s*)\S+", r"\1<<***>>},")
# vim: set et ts=4 sw=4 :