diff options
author | Felipe Reyes <felipe.reyes@canonical.com> | 2019-07-22 15:22:59 -0400 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2019-10-01 15:01:28 +0100 |
commit | 4c42501ea60850874af6d748cf5350fc0c81b0be (patch) | |
tree | 6ee535ed312a2fa3363fdda8e48718548ff5afa7 | |
parent | 9f3f4fe616547a704ae64bc340d834dd93ed84c0 (diff) | |
download | sos-4c42501ea60850874af6d748cf5350fc0c81b0be.tar.gz |
[maas] obfuscate database password
regiond.conf file contains the password used to connect to maas
database, this change will remove it from the generated output.
Resolves: #1734
Signed-off-by: Felipe Reyes <felipe.reyes@canonical.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/plugins/maas.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sos/plugins/maas.py b/sos/plugins/maas.py index ea038e86..342cfe77 100644 --- a/sos/plugins/maas.py +++ b/sos/plugins/maas.py @@ -66,4 +66,9 @@ class Maas(Plugin, UbuntuPlugin): self._log_error( "Cannot login into MAAS remote API with provided creds.") + def postproc(self): + self.do_file_sub("/etc/maas/regiond.conf", + r"(database_pass\s*:\s*)(.*)", + r"\1********") + # vim: set et ts=4 sw=4 : |