Skip to content
This repository has been archived by the owner on Jul 26, 2023. It is now read-only.

Commit

Permalink
Merge pull request #138 from wazuh/137-release-4.2.4
Browse files Browse the repository at this point in the history
Release v4.2.4
  • Loading branch information
teddytpc1 committed Nov 2, 2021
2 parents 7c41121 + 5372df3 commit 0a63250
Show file tree
Hide file tree
Showing 20 changed files with 55 additions and 100 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# Change Log
All notable changes to this project will be documented in this file.

## Wazuh Chef v4.2.4

### Added

- Update to Wazuh [v4.2.4](https://github.com/wazuh/wazuh/blob/v4.2.4/CHANGELOG.md#v424)

### Fixed

- References to ossec- files were modified by the new wazuh- nomenclature.
- Checks on the ossec-init.conf file, which does not exist since version 4.1.0, have been removed.

## Wazuh Chef v4.0.4_1.11.0

### Added
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Deploy the Wazuh platform using Chef cookbooks. Chef recipes are prepared for in

| Wazuh version | Elastic | ODFE |
|---------------|---------|--------|
| v4.2.4 | v7.10.2 | v1.13.2|
| v4.0.4 | v7.9.3 | v1.11.0|

## Dependencies
Expand Down
8 changes: 4 additions & 4 deletions cookbooks/elastic-stack/attributes/versions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

# ELK
default['elk']['major_version'] = '7.x'
default['elk']['patch_version'] = '7.9.3'
default['elk']['patch_version'] = '7.11.2'

# Wazuh
default['wazuh']['major_version'] = '4.x'
default['wazuh']['minor_version'] = '4.0'
default['wazuh']['patch_version'] = '4.0.4'
default['wazuh']['minor_version'] = '4.2'
default['wazuh']['patch_version'] = '4.2.4'

# Kibana
default['wazuh']['kibana_plugin_version'] = '4.0.4_7.9.3'
default['wazuh']['kibana_plugin_version'] = '4.2.4_7.10.2'
2 changes: 1 addition & 1 deletion cookbooks/elastic-stack/recipes/kibana.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
source 'kibana.yml.erb'
owner 'kibana'
group 'kibana'
mode 0o755
mode 0755
variables({
server_port: node['kibana']['yml']['server']['port'],
server_host: node['kibana']['yml']['server']['host'],
Expand Down
6 changes: 3 additions & 3 deletions cookbooks/filebeat-oss/attributes/versions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

# ELK
default['elk']['major_version'] = "7.x"
default['elk']['patch_version'] = "7.9.1"
default['elk']['patch_version'] = "7.10.2"

# Wazuh
default['wazuh']['major_version'] = "4.x"
default['wazuh']['minor_version'] = "4.0"
default['wazuh']['patch_version'] = "4.0.4"
default['wazuh']['minor_version'] = "4.2"
default['wazuh']['patch_version'] = "4.2.4"
6 changes: 3 additions & 3 deletions cookbooks/filebeat/attributes/versions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

# ELK
default['elk']['major_version'] = "7.x"
default['elk']['patch_version'] = "7.9.3"
default['elk']['patch_version'] = "7.10.2"

# Wazuh
default['wazuh']['major_version'] = "4.x"
default['wazuh']['minor_version'] = "4.0"
default['wazuh']['patch_version'] = "4.0.4"
default['wazuh']['minor_version'] = "4.2"
default['wazuh']['patch_version'] = "4.2.4"
10 changes: 5 additions & 5 deletions cookbooks/opendistro/attributes/versions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
# Author:: Wazuh <info@wazuh.com>

# Elastic Stack
default['elk']['patch_version'] = '7.9.1'
default['elk']['patch_version'] = '7.10.2'

# Opendistro
default['odfe']['patch_version'] = '1.11.0'
default['odfe']['patch_version'] = '1.13.2'

# Wazuh
default['wazuh']['major_version'] = '4.x'
default['wazuh']['minor_version'] = '4.0'
default['wazuh']['patch_version'] = '4.0.4'
default['wazuh']['minor_version'] = '4.2'
default['wazuh']['patch_version'] = '4.2.4'

# Kibana
default['wazuh']['kibana_plugin_version'] = '4.0.4_7.9.1'
default['wazuh']['kibana_plugin_version'] = '4.2.4_7.10.2'

# Search guard
default['searchguard']['version'] = '1.8'
2 changes: 1 addition & 1 deletion cookbooks/opendistro/recipes/kibana.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
server_host: (node['kibana']['yml']['server']['host']).to_s,
elasticsearch_hosts: node['kibana']['yml']['elasticsearch']['hosts']
})
mode 0o755
mode 0755
end

# Update the optimize and plugins directories permissions
Expand Down
6 changes: 3 additions & 3 deletions cookbooks/opendistro/recipes/prerequisites.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,19 @@

if node['platform_version'] >= '8'
dnf_package 'Install prerequisites packages' do
package_name %w[java-11-openjdk-devel libcap]
package_name %w[java-11-openjdk libcap]
action :install
end
else
yum_package 'Install prerequisites packages' do
package_name %w[java-11-openjdk-devel libcap]
package_name %w[java-11-openjdk libcap]
action :install
end
end
when 'opensuseleap', 'suse'
# Install zypper prerequisites
zypper_package 'Install prerequisites packages' do
package_name %w[libcap2 java-11-openjdk-devel]
package_name %w[libcap2 java-11-openjdk]
end
else
raise 'Currently platforn not supported yet. Feel free to open an issue on https://www.github.com/wazuh/wazuh-chef if you consider that support for a specific OS should be added'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@
it { should be_installed }
end

describe package('java-11-openjdk-devel') do
describe package('java-11-openjdk') do
it { should be_installed }
end
when 'suse'
describe package('libcap2') do
it { should be_installed }
end

describe package('java-11-openjdk-devel') do
describe package('java-11-openjdk') do
it { should be_installed }
end
end
Expand Down
4 changes: 2 additions & 2 deletions cookbooks/wazuh_agent/attributes/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
# Author:: Wazuh <info@wazuh.com

default['wazuh']['major_version'] = "4.x"
default['wazuh']['minor_version'] = "4.0"
default['wazuh']['patch_version'] = "4.0.4"
default['wazuh']['minor_version'] = "4.2"
default['wazuh']['patch_version'] = "4.2.4"
13 changes: 0 additions & 13 deletions cookbooks/wazuh_agent/recipes/common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,6 @@
# limitations under the License.
#

ruby_block 'ossec install_type' do
block do
File.open('/var/ossec/etc/ossec-init.conf') do |file|
file.each_line do |line|
if line =~ /^TYPE="([^"]+)"/
type = Regexp.last_match(1)
break
end
end
end
end
end

# Gyoku renders the XML.
chef_gem 'gyoku' do
compile_time false if respond_to?(:compile_time)
Expand Down
19 changes: 4 additions & 15 deletions cookbooks/wazuh_agent/test/integration/wazuh_agent/common_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,24 @@
its('exit_status') { should eq 0 }
end

describe command('ps -ef | grep ossec-logcollector') do
describe command('ps -ef | grep wazuh-logcollector') do
its('exit_status') { should eq 0 }
end

describe command('ps -ef | grep ossec-syscheckd') do
describe command('ps -ef | grep wazuh-syscheckd') do
its('exit_status') { should eq 0 }
end

describe command('ps -ef | grep ossec-execd') do
describe command('ps -ef | grep wazuh-execd') do
its('exit_status') { should eq 0 }
end

describe command('ps -ef | grep ossec-agentd') do
describe command('ps -ef | grep wazuh-agentd') do
its('exit_status') { should eq 0 }
end

# Check OSSEC dir

describe file('/var/ossec/etc/ossec-init.conf') do
it { should be_symlink }
end

describe file('/var/ossec') do
it { should be_directory }
its('mode') { should cmp '0750' }
Expand All @@ -45,13 +41,6 @@
its('group') { should cmp 'ossec' }
end

describe file('/etc/ossec-init.conf') do
it { should exist }
its('owner') { should cmp 'root' }
its('group') { should cmp 'ossec' }
its('mode') { should cmp '0640' }
end

describe file('/var/ossec/etc/ossec.conf') do
it { should exist }
its('owner') { should cmp 'root' }
Expand Down
4 changes: 2 additions & 2 deletions cookbooks/wazuh_manager/attributes/versions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
# Author:: Wazuh <info@wazuh.com

default['wazuh']['major_version'] = "4.x"
default['wazuh']['minor_version'] = "4.0"
default['wazuh']['patch_version'] = "4.0.4"
default['wazuh']['minor_version'] = "4.2"
default['wazuh']['patch_version'] = "4.2.4"
9 changes: 0 additions & 9 deletions cookbooks/wazuh_manager/recipes/common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,6 @@
type = 'local'
else
type = "test"

File.open('/var/ossec/etc/ossec-init.conf') do |file|
file.each_line do |line|
if line =~ /^TYPE="([^"]+)"/
type = Regexp.last_match(1)
break
end
end
end
end

node.normal['ossec']['install_type'] = type
Expand Down
4 changes: 2 additions & 2 deletions cookbooks/wazuh_manager/recipes/manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
# Auth need to be enable only in master node.
if node['ossec']['conf']['cluster']['node_type'] == 'master'
execute 'Enable Authd' do
command '/var/ossec/bin/ossec-control enable auth'
not_if "ps axu | grep ossec-authd | grep -v grep"
command '/var/ossec/bin/wazuh-control enable auth'
not_if "ps axu | grep wazuh-authd | grep -v grep"
end
end

Expand Down
13 changes: 0 additions & 13 deletions cookbooks/wazuh_manager/templates/default/api.yaml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,6 @@
host: <%= @host %>
port: <%= @port %>

# Set this option to "yes" in case the API is running behind a proxy server. Values: yes, no
behind_proxy_server: no

# Advanced configuration

https:
enabled: yes
key: "api/configuration/ssl/server.key"
cert: "api/configuration/ssl/server.crt"
use_ca: False
ca: "api/configuration/ssl/ca.crt"
ssl_cipher: "TLSv1.2"

# Logging configuration
# Values for API log level: disabled, info, warning, error, debug, debug2 (each level includes the previous level).
logs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,48 +17,44 @@
its('exit_status') { should eq 0 }
end

describe command('ps -ef | grep ossec-monitord') do
describe command('ps -ef | grep wazuh-monitord') do
its('exit_status') { should eq 0 }
end

describe command('ps -ef | grep ossec-logcollector') do
describe command('ps -ef | grep wazuh-logcollector') do
its('exit_status') { should eq 0 }
end

describe command('ps -ef | grep ossec-remoted') do
describe command('ps -ef | grep wazuh-remoted') do
its('exit_status') { should eq 0 }
end

describe command('ps -ef | grep ossec-syscheckd') do
describe command('ps -ef | grep wazuh-syscheckd') do
its('exit_status') { should eq 0 }
end

describe command('ps -ef | grep ossec-analysisd') do
describe command('ps -ef | grep wazuh-analysisd') do
its('exit_status') { should eq 0 }
end

describe command('ps -ef | grep ossec-execd') do
describe command('ps -ef | grep wazuh-execd') do
its('exit_status') { should eq 0 }
end

describe command('ps -ef | grep wazuh-db') do
its('exit_status') { should eq 0 }
end

describe command('ps -ef | grep ossec-authd') do
describe command('ps -ef | grep wazuh-authd') do
its('exit_status') { should eq 0 }
end

describe command('ps -ef | grep ossec-apid') do
describe command('ps -ef | grep wazuh-apid') do
its('exit_status') { should eq 0 }
end

# Check OSSEC dir

describe file('/var/ossec/etc/ossec-init.conf') do
it { should be_symlink }
end

describe file('/var/ossec') do
it { should be_directory }
its('mode') { should cmp '0750' }
Expand All @@ -73,13 +69,6 @@
its('group') { should cmp 'ossec' }
end

describe file('/etc/ossec-init.conf') do
it { should exist }
its('owner') { should cmp 'root' }
its('group') { should cmp 'ossec' }
its('mode') { should cmp '0640' }
end

describe file('/var/ossec/etc/shared/default/agent.conf') do
it { should exist }
its('owner') { should cmp 'ossec' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@

describe port(1515) do
it { should be_listening }
its('processes') {should include 'ossec-authd'}
its('processes') {should include 'wazuh-authd'}
end

describe port(1514) do
it { should be_listening }
its('processes') {should include 'ossec-remoted'}
its('processes') {should include 'wazuh-remoted'}
end
2 changes: 1 addition & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
license 'Apache 2.0'
description 'Installs/Configures Wazuh with chef cookbooks'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '4.0.4'
version '4.2.4'
chef_version '>= 15.0'

%w(redhat centos oracle).each do |el|
Expand Down

0 comments on commit 0a63250

Please sign in to comment.