From 86cce54ef115264873e09d620d0951fc557e472d Mon Sep 17 00:00:00 2001 From: Pavel Moravec Date: Sat, 21 Dec 2019 09:04:59 +0100 Subject: [foreman] obfuscate storepass and candlepin password cpdb --password '..' needs to be obfuscated in foreman-maintain.log -[src|]storepass .. on few places in satellite.log needs the same Resolves: #1901 Signed-off-by: Pavel Moravec Signed-off-by: Jake Hunsaker --- sos/plugins/foreman.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sos/plugins/foreman.py b/sos/plugins/foreman.py index 1d02777f..557c5702 100644 --- a/sos/plugins/foreman.py +++ b/sos/plugins/foreman.py @@ -241,8 +241,8 @@ class Foreman(Plugin): return _dbcmd % (self.dbhost, csvformat, quote(query)) def postproc(self): - satreg = r"((foreman.*)?(\"::(foreman(.*?)|katello).*)?(::(.*)::.*" \ - r"(passw|cred|token|secret|key).*(\")?:))(.*)" + satreg = r"((foreman.*)?(\"::(foreman(.*?)|katello).*)?((::(.*)::.*" \ + r"(passw|cred|token|secret|key).*(\")?:)|(storepass )))(.*)" self.do_path_regex_sub( "/var/log/foreman-installer/sat*", satreg, @@ -270,7 +270,7 @@ class Foreman(Plugin): r"\1********") self.do_path_regex_sub( "/var/log/foreman-maintain/foreman-maintain.log*", - r"((passw|cred|token|secret)=)(.*)", + r"(((passw|cred|token|secret)=)|(password ))(.*)", r"\1********") self.do_path_regex_sub( "/var/log/%s*/foreman-ssl_access_ssl.log*" % self.apachepkg, -- cgit