Skip to content

Commit 748e8ad

Browse files
pmoravecpafernanr
authored andcommitted
[juju] obfuscate keys from Nova compute logs
Resolves: #4129 Closes: #4132 Signed-off-by: Pavel Moravec <[email protected]>
1 parent b441eeb commit 748e8ad

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

sos/report/plugins/juju.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,11 @@ def postproc(self):
218218
keys_regex = fr"(^\s*({'|'.join(protect_keys)})\s*:\s*)(.*)"
219219
sub_regex = r"\1*********"
220220
self.do_path_regex_sub(agents_path, keys_regex, sub_regex)
221+
222+
# Redact keys from Nova compute logs
223+
self.do_path_regex_sub("/var/log/juju/unit-nova-compute-*.log*",
224+
r"auth\(key=(.*)\)", r"auth(key=******)")
225+
221226
# Redact certificates
222227
self.do_file_private_sub(agents_path)
223228
self.do_cmd_private_sub('juju controllers')

0 commit comments

Comments
 (0)