aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortiwillia@redhat.com <tiwillia@redhat.com>2015-03-19 09:39:59 -0400
committerBryn M. Reeves <bmr@redhat.com>2015-03-26 16:32:40 +0000
commitec30e7eaa14552c50125a0598ba86f7be107ed67 (patch)
treea1b8d178b1dc6848ca0910f420b0736615fbd64f
parent37864119e10ed6488bf787514ff9cb1b720a7af5 (diff)
downloadsos-ec30e7eaa14552c50125a0598ba86f7be107ed67.tar.gz
[openshift] Obfuscate DNS plugin credentials
DNS management plugins store credentials in their configuration files. Adding filters to scrub these configuration files. Signed-off-by: Timothy Williams <tiwillia@redhat.com>
-rw-r--r--sos/plugins/openshift.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/sos/plugins/openshift.py b/sos/plugins/openshift.py
index 1c553f2e..66d15e8a 100644
--- a/sos/plugins/openshift.py
+++ b/sos/plugins/openshift.py
@@ -133,4 +133,19 @@ class Openshift(Plugin, RedHatPlugin):
r"(.*password\s*=\s*)\S+",
r"\1********")
+ # Redact DNS plugin credentials
+ # Dynect DNS: DYNECT_PASSWORD=s0ME-p4$_w0RD._
+ plugin_dir = '/etc/openshift/plugins.d/'
+ self.do_file_sub(plugin_dir + 'openshift-origin-dns-dynect.conf',
+ r"(DYNECT_PASSWORD\s*=\s*)(.*)",
+ r"********")
+ # Fog cloud: FOG_RACKSPACE_API_KEY="apikey"
+ self.do_file_sub(plugin_dir + 'openshift-origin-dns-fog.conf',
+ r"(FOG_RACKSPACE_API_KEY\s*=\s*)(.*)",
+ r"********")
+ # ISC bind: BIND_KEYVALUE="rndc key"
+ self.do_file_sub(plugin_dir + 'openshift-origin-dns-nsupdate.conf',
+ r"(BIND_KEYVALUE\s*=\s*)(.*)",
+ r"********")
+
# vim: et ts=4 sw=4