summaryrefslogtreecommitdiff
path: root/lib/oxidized/model
diff options
context:
space:
mode:
authorytti <saku@ytti.fi>2018-03-17 15:56:48 +0200
committerGitHub <noreply@github.com>2018-03-17 15:56:48 +0200
commitbeacfeaea9b12a7844796921b5807e531db5468c (patch)
treefbd58e569fb3554a0c7319a939efbd1d252417f4 /lib/oxidized/model
parent2a73c309b1b375067aea97b277e823994162f28c (diff)
parent227f1af00c6d43e9627fa2803d90617bebcd1d83 (diff)
Merge pull request #1223 from yzguy/junos_password_removal
add secrets to sanitize in JunOS
Diffstat (limited to 'lib/oxidized/model')
-rw-r--r--lib/oxidized/model/junos.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/oxidized/model/junos.rb b/lib/oxidized/model/junos.rb
index 2f59414..2ea0179 100644
--- a/lib/oxidized/model/junos.rb
+++ b/lib/oxidized/model/junos.rb
@@ -13,7 +13,10 @@ class JunOS < Oxidized::Model
end
cmd :secret do |cfg|
- cfg.gsub!(/encrypted-password (\S+).*/, '<secret removed>')
+ cfg.gsub!(/encrypted-password (\S+).*/, 'encrypted-password <secret removed>')
+ cfg.gsub!(/pre-shared-key ascii-text (\S+).*/, 'pre-shared-key ascii-text <secret removed>')
+ cfg.gsub!(/pre-shared-key hexadecimal (\S+).*/, 'pre-shared-key hexadecimal <secret removed>')
+ cfg.gsub!(/authentication-key (\S+).*/, 'authentication-key <secret removed>')
cfg.gsub!(/community (\S+) {/, 'community <hidden> {')
cfg
end