Blob Blame History Raw
From fb201fb80f27bdcc69d532ebcc3ff2ae2356edc7 Mon Sep 17 00:00:00 2001
From: Jan Jansky <jjansky@redhat.com>
Date: Mon, 4 Jan 2021 10:53:14 +0100
Subject: [PATCH] [foreman] scrub rhsm proxy_password in installer logs

Scrub potential RHSM proxy_password = <secret> in installer logs.

Related: #2144
Resolves: #2354

Signed-off-by: Jan Jansky <jjansky@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
---
 sos/plugins/foreman.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sos/plugins/foreman.py b/sos/plugins/foreman.py
index 16d8c7f..ff79b81 100644
--- a/sos/plugins/foreman.py
+++ b/sos/plugins/foreman.py
@@ -266,7 +266,8 @@ class Foreman(Plugin):
 
     def postproc(self):
         satreg = r"((foreman.*)?(\"::(foreman(.*?)|katello).*)?((::(.*)::.*" \
-              r"(passw|cred|token|secret|key).*(\")?:)|(storepass )))(.*)"
+              r"(passw|cred|token|secret|key).*(\")?:)|(storepass )" \
+              r"|(password =)))(.*)"
         self.do_path_regex_sub(
             "/var/log/foreman-installer/sat*",
             satreg,
-- 
1.8.3.1