aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbvassova <bvassova@redhat.com>2021-07-26 16:20:39 +0200
committerJake Hunsaker <jhunsake@redhat.com>2021-08-03 15:30:31 -0400
commit939d00f473f4861932134b5c80aec40a330964aa (patch)
tree6becdd597bd527278c4f35d2db3d6bb130e96419
parentbc2322d2e7f7af42b4f581843435d500d7a6b150 (diff)
downloadsos-939d00f473f4861932134b5c80aec40a330964aa.tar.gz
[pulp] adding obfuscation of proxy_password in
/etc/pulp/server/plugins.conf.d/ Resolves: #2564 Signed-off-by: Barbora Vassova bvassova@redhat.com
-rw-r--r--sos/report/plugins/pulp.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sos/report/plugins/pulp.py b/sos/report/plugins/pulp.py
index ca49ff06..5a620751 100644
--- a/sos/report/plugins/pulp.py
+++ b/sos/report/plugins/pulp.py
@@ -160,8 +160,8 @@ class Pulp(Plugin, RedHatPlugin):
# Now handle JSON-formatted data in the same /etc/pulp directory
# structure. We use a different substitution string here to preserve
# the file's JSON syntax.
- jreg = r"(\s*\".*(passw|cred|token|secret).*\"\s*:\s*\")(.*)(\")"
- repl = r"\1********\4"
+ jreg = r"(\s*\".*(passw|cred|token|secret).*\"\s*:(\s))(.*)(\w+)"
+ repl = r"\1********"
self.do_path_regex_sub("/etc/pulp(.*)(.json$)", jreg, repl)
# obfuscate SECRET_KEY = .. and 'PASSWORD': .. in dynaconf list output