diff options
author | Pavel Moravec <pmoravec@redhat.com> | 2019-12-21 09:04:59 +0100 |
---|---|---|
committer | Jake Hunsaker <jhunsake@redhat.com> | 2020-01-28 13:12:58 -0500 |
commit | 86cce54ef115264873e09d620d0951fc557e472d (patch) | |
tree | 0161efe332a0fe738e2c39c14e221ce574971d01 | |
parent | d334c5dedbcf7581b1b6ffde132cf6135a00d1ca (diff) | |
download | sos-86cce54ef115264873e09d620d0951fc557e472d.tar.gz |
[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 <pmoravec@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
-rw-r--r-- | sos/plugins/foreman.py | 6 |
1 files 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, |