Skip to content

Commit

Permalink
Release 5.0.0 (#82)
Browse files Browse the repository at this point in the history
* Add new filters for flow and intrusion (#79)

* Add new filters for flow and intrusion

* Update intrusion_threat_intelligence.conf.erb

* Update netflow_threat_intelligence.conf.erb

* Update config.rb

* Release

---------

Co-authored-by: Miguel Álvarez <[email protected]>
  • Loading branch information
nilsver and malvads authored Dec 30, 2024
1 parent ff35d01 commit f46969c
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
cookbook-logstash CHANGELOG
===============

## 5.0.0

- Miguel Álvarez
- [fcbea79] Add new filters for flow and intrusion (#79)

## 4.0.0

- manegron
Expand Down
2 changes: 1 addition & 1 deletion resources/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
maintainer_email '[email protected]'
license 'AGPL-3.0'
description 'Installs/Configures cookbook-logstash'
version '4.0.0'
version '5.0.0'
24 changes: 24 additions & 0 deletions resources/providers/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,19 @@
notifies :restart, 'service[logstash]', :delayed unless node['redborder']['leader_configuring']
end

memcached_servers = node['redborder']['memcached']['hosts']

template "#{pipelines_dir}/netflow/05_threat_intelligence.conf" do
source 'netflow_threat_intelligence.conf.erb'
owner user
group user
mode '0644'
ignore_failure true
cookbook 'logstash'
variables(memcached_servers: memcached_servers)
notifies :restart, 'service[logstash]', :delayed unless node['redborder']['leader_configuring']
end

template "#{pipelines_dir}/netflow/90_splitflow.conf" do
source 'netflow_splitflow.conf.erb'
owner user
Expand Down Expand Up @@ -912,6 +925,17 @@
notifies :restart, 'service[logstash]', :delayed unless node['redborder']['leader_configuring']
end

template "#{pipelines_dir}/intrusion/07_threat_intelligence.conf" do
source 'intrusion_threat_intelligence.conf.erb'
owner user
group user
mode '0644'
ignore_failure true
cookbook 'logstash'
variables(memcached_servers: memcached_servers)
notifies :restart, 'service[logstash]', :delayed unless node['redborder']['leader_configuring']
end

template "#{pipelines_dir}/intrusion/98_encode.conf" do
source 'intrusion_encode.conf.erb'
owner user
Expand Down
13 changes: 13 additions & 0 deletions resources/templates/default/intrusion_threat_intelligence.conf.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
filter {
threatintelligence {
memcached_servers => <%=@memcached_servers%>
key_mapping => {
"src" => "src_is_malicious"
"dst" => "dst_is_malicious"
"public_ip" => "src_is_malicious"
"sha256" => "sha256_is_malicious"
"file_uri" => "file_uri_is_malicious"
"file_hostname" => "file_hostname_is_malicious"
}
}
}
10 changes: 10 additions & 0 deletions resources/templates/default/netflow_threat_intelligence.conf.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
filter {
threatintelligence {
memcached_servers => <%=@memcached_servers%>
key_mapping => {
"lan_ip" => "lan_ip_is_malicious"
"wan_ip" => "wan_ip_is_malicious"
"public_ip" => "public_ip_is_malicious"
}
}
}

0 comments on commit f46969c

Please sign in to comment.