summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorsfini <30525392+sfini@users.noreply.github.com>2017-12-15 20:43:56 +0100
committerNeil Lathwood <neil@lathwood.co.uk>2017-12-15 19:43:56 +0000
commit7b98d724002963e0e9dfce59ce024fd69b19ac13 (patch)
tree845b6be6bb5e72afc2712f90a38d27e2874dc8c2 /lib
parent3fec19ba5b6b9cc2aabb7d57d2c0e2fb2a984cef (diff)
model: Update fortios.rb (#1047)
* Update fortios.rb Modify script for discard changes private key encryption every time config is downloaded https://github.com/ytti/oxidized/issues/931 * Update fortios.rb * Update fortios.rb * Update fortios.rb Added filter for inter-controller-key and Cluster uptime. After update to version 5.6 inter-controller-key change every time config is downloaded . Cluster uptime is now present and change every time config is downloaded . * Update fortios.rb Added rsso secret configuration remove * Update fortios.rb Added (Virus-DB|Extended DB|IPS-DB|IPS-ETDB|APP-DB|INDUSTRIAL-DB|Botnet DB|IPS Malicious URL Database) to the script , as suggested in #1119
Diffstat (limited to 'lib')
-rw-r--r--lib/oxidized/model/fortios.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/oxidized/model/fortios.rb b/lib/oxidized/model/fortios.rb
index 605a596..bffaf3c 100644
--- a/lib/oxidized/model/fortios.rb
+++ b/lib/oxidized/model/fortios.rb
@@ -15,9 +15,12 @@ class FortiOS < Oxidized::Model
end
cmd :secret do |cfg|
- cfg.gsub! /(set (?:passwd|password|secondary-secret|rsso-secret|psksecret|secret|key ENC)).*/, '\\1 <configuration removed>'
+ cfg.gsub! /(set (?:passwd|password|psksecret|secret|key|group-password|secondary-secret|tertiary-secret|auth-password-l1|auth-password-l2|rsso|history0|history1|inter-controller-key ENC)).*/, '\\1 <configuration removed>'
cfg.gsub! /(set private-key).*-+END ENCRYPTED PRIVATE KEY-*"$/m , '\\1 <configuration removed>'
- cfg.gsub! /(IPS Malicious URL Database).*/, '\\1 <configuration removed>'
+ cfg.gsub! /(set ca ).*-+END CERTIFICATE-*"$/m , '\\1 <configuration removed>'
+ cfg.gsub! /(set csr ).*-+END CERTIFICATE REQUEST-*"$/m , '\\1 <configuration removed>'
+ cfg.gsub! /(Virus-DB|Extended DB|IPS-DB|IPS-ETDB|APP-DB|INDUSTRIAL-DB|Botnet DB|IPS Malicious URL Database).*/, '\\1 <configuration removed>'
+ cfg.gsub! /(Cluster uptime:).*/, '\\1 <configuration removed>'
cfg
end
@@ -46,7 +49,7 @@ class FortiOS < Oxidized::Model
cfg << cmd('end') if @vdom_enabled
- cfg << cmd('show')
+ cfg << cmd('show full-configuration')
cfg.join "\n"
end