diff options
author | Pavel Moravec <pmoravec@redhat.com> | 2021-06-15 13:08:57 +0200 |
---|---|---|
committer | Jake Hunsaker <jhunsake@redhat.com> | 2021-06-15 10:31:16 -0400 |
commit | ab12f345ae477b4890bbd809ec0ec4267d66023c (patch) | |
tree | 3ba7052968a66e7b79d4c2ae7f24867dfb23e13e | |
parent | 892bbd8114703f5a4d23aa77ba5829b7ba59446f (diff) | |
download | sos-ab12f345ae477b4890bbd809ec0ec4267d66023c.tar.gz |
[pulpcore] obfuscate two passwords from 'dynaconf list'
The command also prints content of /etc/pulp/settings.py
where we need to also obfuscate the SECRET_KEY and PASSWORD values.
Resolves: #2583
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
-rw-r--r-- | sos/report/plugins/pulpcore.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sos/report/plugins/pulpcore.py b/sos/report/plugins/pulpcore.py index 20403814..ccaac318 100644 --- a/sos/report/plugins/pulpcore.py +++ b/sos/report/plugins/pulpcore.py @@ -115,6 +115,16 @@ class PulpCore(Plugin, IndependentPlugin): "/etc/pulp/settings.py", r"(PASSWORD\S*\s*:\s*)(.*)", r"\1********") + # apply the same for "dynaconf list" output that prints settings.py + # in a pythonic format + self.do_cmd_output_sub( + "dynaconf list", + r"(SECRET_KEY<str>\s*)'(.*)'", + r"\1********") + self.do_cmd_output_sub( + "dynaconf list", + r"(PASSWORD\S*\s*:\s*)(.*)", + r"\1********") # vim: set et ts=4 sw=4 : |