aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Moravec <pmoravec@redhat.com>2021-05-25 12:02:05 +0200
committerJake Hunsaker <jhunsake@redhat.com>2021-05-26 09:34:11 -0400
commit61b083de3c43f86f152c810ddf888c5dad073165 (patch)
tree89295c2f9a1d6baa2143b0f160e6323b059e6681
parent681a6ee9ac5b82e883c312273384fa9bbbd86681 (diff)
downloadsos-61b083de3c43f86f152c810ddf888c5dad073165.tar.gz
[candlepin] collect /etc/candlepin/broker.xml
The file contains important config about internal candlepin broker routing. Also, apply scrubbing of two passwords on a single line / in one URI. Resolves: #2558 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
-rw-r--r--sos/report/plugins/candlepin.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/sos/report/plugins/candlepin.py b/sos/report/plugins/candlepin.py
index 5ad94997..7d3ca16c 100644
--- a/sos/report/plugins/candlepin.py
+++ b/sos/report/plugins/candlepin.py
@@ -58,6 +58,7 @@ class Candlepin(Plugin, RedHatPlugin):
# Allow limiting on logrotated logs
self.add_copy_spec([
"/etc/candlepin/candlepin.conf",
+ "/etc/candlepin/broker.xml",
"/var/log/candlepin/audit*.log*",
"/var/log/candlepin/candlepin.log[.-]*",
"/var/log/candlepin/cpdb*.log*",
@@ -110,5 +111,9 @@ class Candlepin(Plugin, RedHatPlugin):
self.do_file_sub("/etc/candlepin/candlepin.conf", reg, repl)
cpdbreg = r"(--password=)([a-zA-Z0-9]*)"
self.do_file_sub("/var/log/candlepin/cpdb.log", cpdbreg, repl)
+ for key in ["trustStorePassword", "keyStorePassword"]:
+ self.do_file_sub("/etc/candlepin/broker.xml",
+ r"%s=(\w*)([;<])" % key,
+ r"%s=********\2" % key)
# vim: set et ts=4 sw=4 :