diff options
author | Colin Stubbs <cstubbs@gmail.com> | 2016-04-08 20:50:23 +1000 |
---|---|---|
committer | Colin Stubbs <cstubbs@gmail.com> | 2016-04-08 20:50:23 +1000 |
commit | 5bce86bfe86e4b22740f92568312498fde9104b3 (patch) | |
tree | ecaa4c02f8be285f7f96a443447dd557d42d3365 /lib | |
parent | 4961d47d70231de74b2a94b52b8435e612213f5b (diff) |
Fix for issue ytti/382, filters out additional credentials/secrets
which change regularly in some way. Tested with BIG-IP v11.6.1
Diffstat (limited to 'lib')
-rw-r--r-- | lib/oxidized/model/tmos.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/oxidized/model/tmos.rb b/lib/oxidized/model/tmos.rb index 3570015..390046d 100644 --- a/lib/oxidized/model/tmos.rb +++ b/lib/oxidized/model/tmos.rb @@ -3,10 +3,12 @@ class TMOS < Oxidized::Model comment '# ' cmd :secret do |cfg| - cfg.gsub!(/password (\S+)/, 'password <secret removed>') - cfg.gsub!(/passphrase (\S+)/, 'passphrase <secret removed>') - cfg.gsub!(/community (\S+)/, 'community <secret removed>') - cfg.gsub!(/community-name (\S+)/, 'community-name <secret removed>') + cfg.gsub!(/^([\s\t]*)secret \S+/, '\1secret <secret removed>') + cfg.gsub!(/^([\s\t]*\S*)password \S+/, '\1password <secret removed>') + cfg.gsub!(/^([\s\t]*\S*)passphrase \S+/, '\1passphrase <secret removed>') + cfg.gsub!(/community \S+/, 'community <secret removed>') + cfg.gsub!(/community-name \S+/, 'community-name <secret removed>') + cfg.gsub!(/^([\s\t]*\S*)encrypted \S+$/, '\1encrypted <secret removed>') cfg end |