diff --git a/.github/install_stack/action.yml b/.github/install_stack/action.yml
index 4a346d8c..ab78987b 100644
--- a/.github/install_stack/action.yml
+++ b/.github/install_stack/action.yml
@@ -4,7 +4,7 @@ runs:
- name: Create manifest for install Wazuh stack
shell: bash
run: |
- hostname=$(sudo puppetserver ca list --all | awk '{if(NR>1)print $1;}')
+ hostname=$(sudo puppetserver ca list --all | awk '{if(NR>1)print $1;}'| sed 's/[.]$//')
sudo echo "127.0.0.1 "$hostname | sudo tee -a /etc/hosts > /dev/null
sudo echo "node "\"$hostname\"" {" | sudo tee -a /etc/puppetlabs/code/environments/production/manifests/stack.pp > /dev/null
sudo echo "class {'wazuh::manager':} -> class {'wazuh::indexer':} -> class {'wazuh::filebeat_oss':} -> class {'wazuh::dashboard':}" | sudo tee -a /etc/puppetlabs/code/environments/production/manifests/stack.pp > /dev/null
diff --git a/.github/tests/action.yml b/.github/tests/action.yml
index 745dde21..29b1e1ae 100644
--- a/.github/tests/action.yml
+++ b/.github/tests/action.yml
@@ -38,7 +38,7 @@ runs:
- name: Check documents into wazuh-alerts index
shell: bash
run: |
- docs="`curl -XGET "https://0.0.0.0:9200/wazuh-alerts*/_doc/_search" -u admin:admin -k -s | jq -r ".hits.total.value"`"
+ docs="`curl -XGET "https://0.0.0.0:9200/wazuh-alerts*/_count" -u admin:admin -k -s | jq -r ".count"`"
if [[ $docs -gt 100 ]]; then
echo "wazuh-alerts index documents: ${docs}"
else
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 158e4b09..83e1038d 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -11,7 +11,9 @@ jobs:
- name: Create enviroment variables
run: |
- cat VERSION > $GITHUB_ENV
+ cat VERSION >> $GITHUB_ENV
+ VER=`curl -s https://api.github.com/repos/wazuh/wazuh/releases/latest | grep '\"tag_name\":' | sed -E 's/.*\"([^\"]+)\".*/\1/' | cut -c 2-`
+ WAZUH_VERSION=$VER >> $GITHUB_ENV
- name: Install Puppet
uses: ./.github/debian_install
@@ -23,10 +25,32 @@ jobs:
sudo apt-get update
sudo apt-get install pdk
- - name: Create Puppet module
+ - name: Compare versions
run: |
- pdk validate
- pdk build
+ function compare_versions() {
+ operator="${2}"
+ echo $operator
+ if [ $operator == "-gt" ]; then
+ test "$(echo "$1" "$3" | tr " " "\n" | sort -V | head -n 1)" != "$1";
+ elif [ $operator == "-le" ]; then
+ test "$(echo "$1" "$3" | tr " " "\n" | sort -V | head -n 1)" == "$1";
+ elif [ $operator == "-lt" ]; then
+ test "$(echo "$1" "$3" | tr " " "\n" | sort -rV | head -n 1)" != "$1";
+ elif [ $operator == "-ge" ]; then
+ test "$(echo "$1" "$3" | tr " " "\n" | sort -rV | head -n 1)" == "$1";
+ else
+ echo "Operator not supported"
+ exit 1
+ fi
+ }
+ if compare_versions "{{ env.VERSION }}" -gt "{{ env.WAZUH_VERSION }}"; then
+ sed -i 's/packages.wazuh.com/packages-dev.wazuh.com/' manifests/repo.pp
+ sed -i 's/4.x/pre-release/' manifests/repo.pp
+ sed -i "s/'stable'/'unstable'/" manifests/repo.pp
+ fi
+
+ - name: Create Puppet module
+ run: pdk build
- name: Create artifact
uses: actions/upload-artifact@v2
@@ -42,7 +66,9 @@ jobs:
- name: Create enviroment variables
run: |
- cat VERSION > $GITHUB_ENV
+ cat VERSION >> $GITHUB_ENV
+ VER=`curl -s https://api.github.com/repos/wazuh/wazuh/releases/latest | grep '\"tag_name\":' | sed -E 's/.*\"([^\"]+)\".*/\1/' | cut -c 2-`
+ WAZUH_VERSION=$VER >> $GITHUB_ENV
- name: Install Puppet
uses: ./.github/debian_install
@@ -73,7 +99,9 @@ jobs:
- name: Create enviroment variables
run: |
- cat VERSION > $GITHUB_ENV
+ cat VERSION >> $GITHUB_ENV
+ VER=`curl -s https://api.github.com/repos/wazuh/wazuh/releases/latest | grep '\"tag_name\":' | sed -E 's/.*\"([^\"]+)\".*/\1/' | cut -c 2-`
+ WAZUH_VERSION=$VER >> $GITHUB_ENV
- name: Install Puppet
uses: ./.github/debian_install
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d4f4d843..9f42afa1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,102 @@
# Change Log
All notable changes to this project will be documented in this file.
+## Wazuh Puppet v4.9.0
+
+### Added
+
+- Support to 4.9.0 Wazuh release.
+
+## Wazuh Puppet v4.8.0
+
+### Added
+
+- Support to 4.8.0 Wazuh release.
+
+## Wazuh Puppet v4.7.1
+
+### Added
+
+- Support to 4.7.1 Wazuh release.
+
+## Wazuh Puppet v4.7.0
+
+### Added
+
+- Support to 4.7.0 Wazuh release.
+
+## Wazuh Puppet v4.6.0
+
+### Added
+
+- Support to 4.6.0 Wazuh release.
+
+## Wazuh Puppet v4.5.4
+
+### Added
+
+- Support to 4.5.4 Wazuh release.
+
+## Wazuh Puppet v4.5.3
+
+### Added
+
+- Support to 4.5.3 Wazuh release.
+
+## Wazuh Puppet v4.5.2
+
+### Added
+
+- Support to 4.5.2 Wazuh release.
+
+## Wazuh Puppet v4.5.1
+
+### Added
+
+- Support to 4.5.1 Wazuh release.
+
+## Wazuh Puppet v4.5.0
+
+### Added
+
+- Support to 4.5.0 Wazuh release.
+
+## Wazuh Puppet v4.4.5
+
+### Added
+
+- Support to 4.4.5 Wazuh release.
+
+## Wazuh Puppet v4.4.4
+
+### Added
+
+- Support to 4.4.4 Wazuh release.
+
+## Wazuh Puppet v4.4.3
+
+### Added
+
+- Support to 4.4.3 Wazuh release.
+
+## Wazuh Puppet v4.4.2
+
+### Added
+
+- Support to 4.4.2 Wazuh release.
+
+## Wazuh Puppet v4.4.1
+
+### Added
+
+- Support to 4.4.1 Wazuh release.
+
+## Wazuh Puppet v4.4.0
+
+### Added
+
+- Support to 4.4.0 Wazuh release.
+
## Wazuh Puppet v4.3.11
### Added
diff --git a/SECURITY.md b/SECURITY.md
new file mode 100644
index 00000000..54e59de1
--- /dev/null
+++ b/SECURITY.md
@@ -0,0 +1,45 @@
+# Wazuh Open Source Project Security Policy
+
+Version: 2023-06-12
+
+## Introduction
+This document outlines the Security Policy for Wazuh's open source projects. It emphasizes our commitment to maintain a secure environment for our users and contributors, and reflects our belief in the power of collaboration to identify and resolve security vulnerabilities.
+
+## Scope
+This policy applies to all open source projects developed, maintained, or hosted by Wazuh.
+
+## Reporting Security Vulnerabilities
+If you believe you've discovered a potential security vulnerability in one of our open source projects, we strongly encourage you to report it to us responsibly.
+
+Please submit your findings as security advisories under the "Security" tab in the relevant GitHub repository. Alternatively, you may send the details of your findings to [security@wazuh.com](mailto:security@wazuh.com).
+
+## Vulnerability Disclosure Policy
+Upon receiving a report of a potential vulnerability, our team will initiate an investigation. If the reported issue is confirmed as a vulnerability, we will take the following steps:
+
+- Acknowledgment: We will acknowledge the receipt of your vulnerability report and begin our investigation.
+- Validation: We will validate the issue and work on reproducing it in our environment.
+- Remediation: We will work on a fix and thoroughly test it
+- Release & Disclosure: After 90 days from the discovery of the vulnerability, or as soon as a fix is ready and thoroughly tested (whichever comes first), we will release a security update for the affected project. We will also publicly disclose the vulnerability by publishing a CVE (Common Vulnerabilities and Exposures) and acknowledging the discovering party.
+- Exceptions: In order to preserve the security of the Wazuh community at large, we might extend the disclosure period to allow users to patch their deployments.
+
+This 90-day period allows for end-users to update their systems and minimizes the risk of widespread exploitation of the vulnerability.
+
+## Automatic Scanning
+We leverage GitHub Actions to perform automated scans of our supply chain. These scans assist us in identifying vulnerabilities and outdated dependencies in a proactive and timely manner.
+
+## Credit
+We believe in giving credit where credit is due. If you report a security vulnerability to us, and we determine that it is a valid vulnerability, we will publicly credit you for the discovery when we disclose the vulnerability. If you wish to remain anonymous, please indicate so in your initial report.
+
+We do appreciate and encourage feedback from our community, but currently we do not have a bounty program. We might start bounty programs in the future.
+
+## Compliance with this Policy
+We consider the discovery and reporting of security vulnerabilities an important public service. We encourage responsible reporting of any vulnerabilities that may be found in our site or applications.
+
+Furthermore, we will not take legal action against or suspend or terminate access to the site or services of those who discover and report security vulnerabilities in accordance with this policy because of the fact.
+
+We ask that all users and contributors respect this policy and the security of our community's users by disclosing vulnerabilities to us in accordance with this policy.
+
+## Changes to this Security Policy
+This policy may be revised from time to time. Each version of the policy will be identified at the top of the page by its effective date.
+
+If you have any questions about this Security Policy, please contact us at [security@wazuh.com](mailto:security@wazuh.com).
diff --git a/VERSION b/VERSION
index 60c686e4..1799a5ac 100644
--- a/VERSION
+++ b/VERSION
@@ -1,3 +1,3 @@
-WAZUH-PUPPET_VERSION="v4.3.11"
-REVISION="40324"
-VERSION=4.3.11
\ No newline at end of file
+WAZUH-PUPPET_VERSION="v4.9.0"
+REVISION="40900"
+VERSION=4.9.0
diff --git a/kitchen/Puppetfile b/kitchen/Puppetfile
index b9d36bd1..3c8119c2 100644
--- a/kitchen/Puppetfile
+++ b/kitchen/Puppetfile
@@ -24,3 +24,6 @@ mod "wazuh/wazuh"
# A module from Github pre-packaged tarball
# mod 'puppetlabs-apache', '0.6.0', :github_tarball => 'puppetlabs/puppetlabs-apache'
+
+# A module for configure zypper repo
+# mod 'puppet-zypprepo', '4.0.1'
diff --git a/kitchen/test/integration/agent/agent_spec.rb b/kitchen/test/integration/agent/agent_spec.rb
index c3ef8cb0..424a2b32 100644
--- a/kitchen/test/integration/agent/agent_spec.rb
+++ b/kitchen/test/integration/agent/agent_spec.rb
@@ -4,7 +4,7 @@
describe package('wazuh-agent') do
it { is_expected.to be_installed }
- its('version') { is_expected.to eq '4.3.11-1' }
+ its('version') { is_expected.to eq '4.9.0-1' }
end
describe service('wazuh-agent') do
diff --git a/kitchen/test/integration/mngr/manager_spec.rb b/kitchen/test/integration/mngr/manager_spec.rb
index f1582f4e..2b623f36 100644
--- a/kitchen/test/integration/mngr/manager_spec.rb
+++ b/kitchen/test/integration/mngr/manager_spec.rb
@@ -4,7 +4,7 @@
describe package('wazuh-manager') do
it { is_expected.to be_installed }
- its('version') { is_expected.to eq '4.3.11-1' }
+ its('version') { is_expected.to eq '4.9.0-1' }
end
# Verifying service
diff --git a/manifests/activeresponse.pp b/manifests/activeresponse.pp
index 65154a57..ba03cfc3 100644
--- a/manifests/activeresponse.pp
+++ b/manifests/activeresponse.pp
@@ -17,9 +17,6 @@
$before_arg = undef,
$content_arg = 'wazuh/fragments/_activeresponse.erb'
) {
-
- require wazuh::params_manager
-
concat::fragment { $active_response_name:
target => $target_arg,
order => $order_arg,
diff --git a/manifests/agent.pp b/manifests/agent.pp
index fc88e085..5ce8dcda 100644
--- a/manifests/agent.pp
+++ b/manifests/agent.pp
@@ -7,8 +7,8 @@
$agent_package_version = $wazuh::params_agent::agent_package_version,
$agent_package_revision = $wazuh::params_agent::agent_package_revision,
- $agent_package_name = $wazuh::params_agent::agent_package_name,
- $agent_service_name = $wazuh::params_agent::agent_service_name,
+ String $agent_package_name = $wazuh::params_agent::agent_package_name,
+ String $agent_service_name = $wazuh::params_agent::agent_service_name,
$agent_service_ensure = $wazuh::params_agent::agent_service_ensure,
$agent_msi_download_location = $wazuh::params_agent::agent_msi_download_location,
@@ -18,16 +18,16 @@
# Authd registration options
$manage_client_keys = $wazuh::params_agent::manage_client_keys,
- $agent_name = $wazuh::params_agent::agent_name,
- $agent_group = $wazuh::params_agent::agent_group,
+ String $agent_name = $wazuh::params_agent::agent_name,
+ Optional[String] $agent_group = $wazuh::params_agent::agent_group,
$agent_address = $wazuh::params_agent::agent_address,
- $wazuh_agent_cert = $wazuh::params_agent::wazuh_agent_cert,
- $wazuh_agent_key = $wazuh::params_agent::wazuh_agent_key,
- $wazuh_agent_cert_path = $wazuh::params_agent::wazuh_agent_cert_path,
- $wazuh_agent_key_path = $wazuh::params_agent::wazuh_agent_key_path,
+ Optional[String] $wazuh_agent_cert = $wazuh::params_agent::wazuh_agent_cert,
+ Optional[String] $wazuh_agent_key = $wazuh::params_agent::wazuh_agent_key,
+ Optional[String] $wazuh_agent_cert_path = $wazuh::params_agent::wazuh_agent_cert_path,
+ Optional[String] $wazuh_agent_key_path = $wazuh::params_agent::wazuh_agent_key_path,
$agent_auth_password = $wazuh::params_agent::agent_auth_password,
- $wazuh_manager_root_ca_pem = $wazuh::params_agent::wazuh_manager_root_ca_pem,
- $wazuh_manager_root_ca_pem_path = $wazuh::params_agent::wazuh_manager_root_ca_pem_path,
+ Optional[String] $wazuh_manager_root_ca_pem = $wazuh::params_agent::wazuh_manager_root_ca_pem,
+ Optional[String] $wazuh_manager_root_ca_pem_path = $wazuh::params_agent::wazuh_manager_root_ca_pem_path,
## ossec.conf generation parameters
# Generation variables
@@ -246,14 +246,6 @@
# Logging
$logging_log_format = $wazuh::params_agent::logging_log_format,
) inherits wazuh::params_agent {
- # validate_bool(
- # $ossec_active_response, $ossec_rootcheck,
- # $selinux, $manage_repo,
- # )
- # This allows arrays of integers, sadly
- # (commented due to stdlib version requirement)
- validate_legacy(String, 'validate_string', $agent_package_name)
- validate_legacy(String, 'validate_string', $agent_service_name)
if (( $ossec_syscheck_whodata_directories_1 == 'yes' ) or ( $ossec_syscheck_whodata_directories_2 == 'yes' )) {
class { 'wazuh::audit':
@@ -276,7 +268,7 @@
'Linux': {
if $manage_repo {
class { 'wazuh::repo': }
- if $::osfamily == 'Debian' {
+ if $facts['os']['family'] == 'Debian' {
Class['wazuh::repo'] -> Class['apt::update'] -> Package[$agent_package_name]
} else {
Class['wazuh::repo'] -> Package[$agent_package_name]
@@ -318,11 +310,13 @@
'Linux': {
## ossec.conf generation concats
case $::operatingsystem {
- 'RedHat', 'OracleLinux':{
+ 'RedHat', 'OracleLinux', 'Suse':{
$apply_template_os = 'rhel'
- if ( $::operatingsystemrelease =~ /^8.*/ ){
+ if ( $::operatingsystemrelease =~ /^9.*/ ){
+ $rhel_version = '9'
+ }elsif ( $::operatingsystemrelease =~ /^8.*/ ){
$rhel_version = '8'
- }elsif ( $::operatingsystemrelease =~ /^7.*/ ){
+ }elsif ( $::operatingsystemrelease =~ /^7.*/ ){
$rhel_version = '7'
}elsif ( $::operatingsystemrelease =~ /^6.*/ ){
$rhel_version = '6'
@@ -338,8 +332,10 @@
}
}'Amazon':{
$apply_template_os = 'amazon'
- }'CentOS','Centos','centos','AlmaLinux':{
+ }'CentOS','Centos','centos','AlmaLinux','Rocky':{
$apply_template_os = 'centos'
+ }'SLES':{
+ $apply_template_os = 'suse'
}
default: { fail('OS not supported') }
}
@@ -487,14 +483,12 @@
# Agent registration and service setup
if ($manage_client_keys == 'yes') {
if $agent_name {
- validate_legacy(String, 'validate_string', $agent_name)
$agent_auth_option_name = "-A \"${agent_name}\""
} else {
$agent_auth_option_name = ''
}
if $agent_group {
- validate_legacy(String, 'validate_string', $agent_group)
$agent_auth_option_group = "-G \"${agent_group}\""
} else {
$agent_auth_option_group = ''
@@ -525,7 +519,6 @@
# https://documentation.wazuh.com/4.0/user-manual/registering/manager-verification/manager-verification-registration.html
if $wazuh_manager_root_ca_pem != undef {
- validate_legacy(String, 'validate_string', $wazuh_manager_root_ca_pem)
file { '/var/ossec/etc/rootCA.pem':
owner => $wazuh::params_agent::keys_owner,
group => $wazuh::params_agent::keys_group,
@@ -535,7 +528,6 @@
}
$agent_auth_option_manager = '-v /var/ossec/etc/rootCA.pem'
} elsif $wazuh_manager_root_ca_pem_path != undef {
- validate_legacy(String, 'validate_string', $wazuh_manager_root_ca_pem)
$agent_auth_option_manager = "-v ${wazuh_manager_root_ca_pem_path}"
} else {
$agent_auth_option_manager = '' # Avoid errors when compounding final command
@@ -543,8 +535,6 @@
# https://documentation.wazuh.com/4.0/user-manual/registering/manager-verification/agent-verification-registration.html
if ($wazuh_agent_cert != undef) and ($wazuh_agent_key != undef) {
- validate_legacy(String, 'validate_string', $wazuh_agent_cert)
- validate_legacy(String, 'validate_string', $wazuh_agent_key)
file { '/var/ossec/etc/sslagent.cert':
owner => $wazuh::params_agent::keys_owner,
group => $wazuh::params_agent::keys_group,
@@ -562,8 +552,6 @@
$agent_auth_option_agent = '-x /var/ossec/etc/sslagent.cert -k /var/ossec/etc/sslagent.key'
} elsif ($wazuh_agent_cert_path != undef) and ($wazuh_agent_key_path != undef) {
- validate_legacy(String, 'validate_string', $wazuh_agent_cert_path)
- validate_legacy(String, 'validate_string', $wazuh_agent_key_path)
$agent_auth_option_agent = "-x ${wazuh_agent_cert_path} -k ${wazuh_agent_key_path}"
} else {
$agent_auth_option_agent = ''
@@ -573,8 +561,9 @@
${agent_auth_option_manager} ${agent_auth_option_agent} ${agent_auth_option_password} ${agent_auth_option_address}"
exec { 'agent-auth-linux':
+ path => ['/usr/bin', '/bin', '/usr/sbin', '/sbin'],
command => $agent_auth_command,
- unless => "/bin/egrep -q '.' ${::wazuh::params_agent::keys_file}",
+ unless => "egrep -q '.' ${::wazuh::params_agent::keys_file}",
require => Concat['agent_ossec.conf'],
before => Service[$agent_service_name],
notify => Service[$agent_service_name],
@@ -632,7 +621,7 @@
# SELinux
# Requires selinux module specified in metadata.json
- if ($::osfamily == 'RedHat' and $selinux == true) {
+ if ($facts['os']['family'] == 'RedHat' and $selinux == true) {
selinux::module { 'ossec-logrotate':
ensure => 'present',
source_te => 'puppet:///modules/wazuh/ossec-logrotate.te',
@@ -645,7 +634,7 @@
firewall { '1514 wazuh-agent':
dport => $ossec_port,
proto => $ossec_protocol,
- action => 'accept',
+ jump => 'accept',
state => [
'NEW',
'RELATED',
diff --git a/manifests/certificates.pp b/manifests/certificates.pp
index 32a00780..fe4dd1f7 100644
--- a/manifests/certificates.pp
+++ b/manifests/certificates.pp
@@ -2,7 +2,7 @@
# Wazuh repository installation
class wazuh::certificates (
$wazuh_repository = 'packages.wazuh.com',
- $wazuh_version = '4.3',
+ $wazuh_version = '4.8',
) {
file { 'Configure Wazuh Certificates config.yml':
owner => 'root',
diff --git a/manifests/dashboard.pp b/manifests/dashboard.pp
index 87f3cf12..1e8141b1 100644
--- a/manifests/dashboard.pp
+++ b/manifests/dashboard.pp
@@ -3,7 +3,7 @@
class wazuh::dashboard (
$dashboard_package = 'wazuh-dashboard',
$dashboard_service = 'wazuh-dashboard',
- $dashboard_version = '4.3.11',
+ $dashboard_version = '4.9.0',
$indexer_server_ip = 'localhost',
$indexer_server_port = '9200',
$dashboard_path_certs = '/etc/wazuh-dashboard/certs',
@@ -14,17 +14,6 @@
$dashboard_server_host = '0.0.0.0',
$dashboard_server_hosts = "https://${indexer_server_ip}:${indexer_server_port}",
- # Parameters used for OpenID login
- $enable_openid_login = undef,
- $opensearch_ssl_verificationMode = undef,
- $opensearch_security_auth_type = undef,
- $opensearch_security_openid_connect_url = undef,
- $opensearch_security_openid_client_id = undef,
- $opensearch_security_openid_client_secret = undef,
- $opensearch_security_openid_base_redirect_url = undef,
- $opensearch_security_openid_verify_hostnames = undef,
-
-
# If the keystore is used, the credentials are not managed by the module (TODO).
# If use_keystore is false, the keystore is deleted, the dashboard use the credentials in the configuration file.
$use_keystore = true,
@@ -46,7 +35,7 @@
if $manage_repos {
include wazuh::repo
- if $::osfamily == 'Debian' {
+ if $facts['os']['family'] == 'Debian' {
Class['wazuh::repo'] -> Class['apt::update'] -> Package['wazuh-dashboard']
} else {
Class['wazuh::repo'] -> Package['wazuh-dashboard']
@@ -124,7 +113,7 @@
}
unless $use_keystore {
- file { '/usr/share/wazuh-dashboard/config/opensearch_dashboards.keystore':
+ file { '/etc/wazuh-dashboard/opensearch_dashboards.keystore':
ensure => absent,
require => Package['wazuh-dashboard'],
before => Service['wazuh-dashboard'],
diff --git a/manifests/filebeat_oss.pp b/manifests/filebeat_oss.pp
index 178d930a..009aa777 100644
--- a/manifests/filebeat_oss.pp
+++ b/manifests/filebeat_oss.pp
@@ -11,20 +11,20 @@
$filebeat_oss_elastic_user = 'admin',
$filebeat_oss_elastic_password = 'admin',
$filebeat_oss_version = '7.10.2',
- $wazuh_app_version = '4.3.11_7.10.2',
- $wazuh_extensions_version = 'v4.3.11',
+ $wazuh_app_version = '4.9.0_7.10.2',
+ $wazuh_extensions_version = 'v4.9.0',
$wazuh_filebeat_module = 'wazuh-filebeat-0.2.tar.gz',
$filebeat_fileuser = 'root',
$filebeat_filegroup = 'root',
$filebeat_path_certs = '/etc/filebeat/certs',
) {
- include wazuh::repo_elastic_oss
+ include wazuh::repo
if $facts['os']['family'] == 'Debian' {
- Class['wazuh::repo_elastic_oss'] -> Class['apt::update'] -> Package['filebeat']
+ Class['wazuh::repo'] -> Class['apt::update'] -> Package['filebeat']
} else {
- Class['wazuh::repo_elastic_oss'] -> Package['filebeat']
+ Class['wazuh::repo'] -> Package['filebeat']
}
package { 'filebeat':
@@ -46,10 +46,12 @@
# Needed since GitHub can only ETAG and result in changes of the mtime everytime.
# TODO: Include file into the wazuh/wazuh-puppet project or use file { checksum => '..' } for this instead of the exec construct.
exec { 'cleanup /etc/filebeat/wazuh-template.json':
- command => '/bin/rm -f /etc/filebeat/wazuh-template.json',
- onlyif => '/bin/test -f /etc/filebeat/wazuh-template.json',
- unless => "/bin/curl -s 'https://raw.githubusercontent.com/wazuh/wazuh/${wazuh_extensions_version}/extensions/elasticsearch/7.x/wazuh-template.json' | /bin/cmp -s '/etc/filebeat/wazuh-template.json'",
+ path => ['/usr/bin', '/bin', '/usr/sbin', '/sbin'],
+ command => 'rm -f /etc/filebeat/wazuh-template.json',
+ onlyif => 'test -f /etc/filebeat/wazuh-template.json',
+ unless => "curl -s 'https://raw.githubusercontent.com/wazuh/wazuh/${wazuh_extensions_version}/extensions/elasticsearch/7.x/wazuh-template.json' | cmp -s '/etc/filebeat/wazuh-template.json'",
}
+
-> file { '/etc/filebeat/wazuh-template.json':
owner => 'root',
group => 'root',
diff --git a/manifests/indexer.pp b/manifests/indexer.pp
index 0a34b24f..b8e0380c 100644
--- a/manifests/indexer.pp
+++ b/manifests/indexer.pp
@@ -2,12 +2,13 @@
# Setup for Wazuh Indexer
class wazuh::indexer (
# opensearch.yml configuration
+ $indexer_network_host = '0.0.0.0',
$indexer_cluster_name = 'wazuh-cluster',
$indexer_node_name = 'node-1',
$indexer_node_max_local_storage_nodes = '1',
$indexer_service = 'wazuh-indexer',
$indexer_package = 'wazuh-indexer',
- $indexer_version = '4.3.11-1',
+ $indexer_version = '4.9.0-1',
$indexer_fileuser = 'wazuh-indexer',
$indexer_filegroup = 'wazuh-indexer',
@@ -26,9 +27,6 @@
# JVM options
$jvm_options_memory = '1g',
-
- # Parameters used for openid login
- $openid_connect_url = undef,
) {
if $manage_repos {
include wazuh::repo
@@ -87,12 +85,6 @@
notify => Service['wazuh-indexer'],
}
- file {
- '/usr/share/wazuh-indexer/plugins/opensearch-security/securityconfig/config.yml':
- content => template('wazuh/opensearch_security_config.yml.erb'),
- notify => Service['wazuh-indexer'],
- }
-
file_line { 'Insert line initial size of total heap space':
path => '/etc/wazuh-indexer/jvm.options',
line => "-Xms${jvm_options_memory}",
@@ -153,7 +145,7 @@
}
exec { 'Initialize the Opensearch security index in Wazuh indexer':
- path => ['/usr/bin', '/bin', '/usr/sbin'],
+ path => ['/usr/bin', '/bin', '/usr/sbin', '/sbin'],
command => "/usr/share/wazuh-indexer/bin/indexer-security-init.sh && touch ${indexer_security_init_lockfile}",
creates => $indexer_security_init_lockfile,
require => Service['wazuh-indexer'],
diff --git a/manifests/manager.pp b/manifests/manager.pp
index 34551465..68b63ab9 100644
--- a/manifests/manager.pp
+++ b/manifests/manager.pp
@@ -5,7 +5,7 @@
# Installation
$server_package_version = $wazuh::params_manager::server_package_version,
- $manage_repos = $::wazuh::params_manager::manage_repos,
+ Boolean $manage_repos = $::wazuh::params_manager::manage_repos,
$manage_firewall = $wazuh::params_manager::manage_firewall,
@@ -15,10 +15,10 @@
$ossec_logall = $wazuh::params_manager::ossec_logall,
$ossec_logall_json = $wazuh::params_manager::ossec_logall_json,
- $ossec_emailnotification = $wazuh::params_manager::ossec_emailnotification,
- $ossec_emailto = $wazuh::params_manager::ossec_emailto,
- $ossec_smtp_server = $wazuh::params_manager::ossec_smtp_server,
- $ossec_emailfrom = $wazuh::params_manager::ossec_emailfrom,
+ Boolean $ossec_emailnotification = $wazuh::params_manager::ossec_emailnotification,
+ Optional[Array[String]] $ossec_emailto = $wazuh::params_manager::ossec_emailto,
+ Optional[String] $ossec_smtp_server = $wazuh::params_manager::ossec_smtp_server,
+ Optional[String] $ossec_emailfrom = $wazuh::params_manager::ossec_emailfrom,
$ossec_email_maxperhour = $wazuh::params_manager::ossec_email_maxperhour,
$ossec_email_log_source = $wazuh::params_manager::ossec_email_log_source,
$ossec_email_idsname = $wazuh::params_manager::ossec_email_idsname,
@@ -177,13 +177,11 @@
$vulnerability_detector_provider_redhat = $wazuh::params_manager::vulnerability_detector_provider_redhat,
$vulnerability_detector_provider_redhat_enabled = $wazuh::params_manager::vulnerability_detector_provider_redhat_enabled,
$vulnerability_detector_provider_redhat_os = $wazuh::params_manager::vulnerability_detector_provider_redhat_os,
- $vulnerability_detector_provider_redhat_update_from_year = $wazuh::params_manager::vulnerability_detector_provider_redhat_update_from_year,
$vulnerability_detector_provider_redhat_update_interval = $wazuh::params_manager::vulnerability_detector_provider_redhat_update_interval,
$vulnerability_detector_provider_nvd = $wazuh::params_manager::vulnerability_detector_provider_nvd,
$vulnerability_detector_provider_nvd_enabled = $wazuh::params_manager::vulnerability_detector_provider_nvd_enabled,
$vulnerability_detector_provider_nvd_os = $wazuh::params_manager::vulnerability_detector_provider_nvd_os,
- $vulnerability_detector_provider_nvd_update_from_year = $wazuh::params_manager::vulnerability_detector_provider_nvd_update_from_year,
$vulnerability_detector_provider_nvd_update_interval = $wazuh::params_manager::vulnerability_detector_provider_nvd_update_interval,
#lint:endignore
@@ -193,16 +191,25 @@
$vulnerability_detector_provider_alas = $wazuh::params_manager::vulnerability_detector_provider_alas,
$vulnerability_detector_provider_alas_enabled = $wazuh::params_manager::vulnerability_detector_provider_alas_enabled,
- $vulnerability_detector_provider_alas_os = $wazuh::params_manager::vulnerability_detector_provider_alas_os,
+ $vulnerability_detector_provider_alas_os = $wazuh::params_manager::vulnerability_detector_provider_alas_os,
$vulnerability_detector_provider_alas_update_interval = $wazuh::params_manager::vulnerability_detector_provider_alas_update_interval,
+ $vulnerability_detector_provider_suse = $wazuh::params_manager::vulnerability_detector_provider_suse,
+ $vulnerability_detector_provider_suse_enabled = $wazuh::params_manager::vulnerability_detector_provider_suse_enabled,
+ $vulnerability_detector_provider_suse_os = $wazuh::params_manager::vulnerability_detector_provider_suse_os,
+ $vulnerability_detector_provider_suse_update_interval = $wazuh::params_manager::vulnerability_detector_provider_suse_update_interval,
+
$vulnerability_detector_provider_msu = $wazuh::params_manager::vulnerability_detector_provider_msu,
$vulnerability_detector_provider_msu_enabled = $wazuh::params_manager::vulnerability_detector_provider_msu_enabled,
$vulnerability_detector_provider_msu_update_interval = $wazuh::params_manager::vulnerability_detector_provider_msu_update_interval,
+ $vulnerability_detector_provider_almalinux = $wazuh::params_manager::vulnerability_detector_provider_almalinux,
+ $vulnerability_detector_provider_almalinux_enabled = $wazuh::params_manager::vulnerability_detector_provider_almalinux_enabled,
+ $vulnerability_detector_provider_almalinux_os = $wazuh::params_manager::vulnerability_detector_provider_almalinux_os,
+ $vulnerability_detector_provider_almalinux_update_interval = $wazuh::params_manager::vulnerability_detector_provider_almalinux_update_interval,
# syslog
- $syslog_output = $wazuh::params_manager::syslog_output,
+ Boolean $syslog_output = $wazuh::params_manager::syslog_output,
$syslog_output_level = $wazuh::params_manager::syslog_output_level,
$syslog_output_port = $wazuh::params_manager::syslog_output_port,
$syslog_output_server = $wazuh::params_manager::syslog_output_server,
@@ -274,14 +281,14 @@
$ar_repeated_offenders = $wazuh::params_manager::ar_repeated_offenders,
$local_decoder_template = $wazuh::params_manager::local_decoder_template,
- $decoder_exclude = $wazuh::params_manager::decoder_exclude,
+ Array $decoder_exclude = $wazuh::params_manager::decoder_exclude,
$local_rules_template = $wazuh::params_manager::local_rules_template,
- $rule_exclude = $wazuh::params_manager::rule_exclude,
+ Array $rule_exclude = $wazuh::params_manager::rule_exclude,
$shared_agent_template = $wazuh::params_manager::shared_agent_template,
- $wazuh_manager_verify_manager_ssl = $wazuh::params_manager::wazuh_manager_verify_manager_ssl,
- $wazuh_manager_server_crt = $wazuh::params_manager::wazuh_manager_server_crt,
- $wazuh_manager_server_key = $wazuh::params_manager::wazuh_manager_server_key,
+ Boolean $wazuh_manager_verify_manager_ssl = $wazuh::params_manager::wazuh_manager_verify_manager_ssl,
+ String $wazuh_manager_server_crt = $wazuh::params_manager::wazuh_manager_server_crt,
+ String $wazuh_manager_server_key = $wazuh::params_manager::wazuh_manager_server_key,
$ossec_local_files = $::wazuh::params_manager::default_local_files,
@@ -300,6 +307,7 @@
$wazuh_api_https_use_ca = $wazuh::params_manager::wazuh_api_https_use_ca,
$wazuh_api_https_ca = $wazuh::params_manager::wazuh_api_https_ca,
$wazuh_api_logs_level = $wazuh::params_manager::wazuh_api_logs_level,
+ $wazuh_api_logs_format = $wazuh::params_manager::wazuh_api_logs_format,
$wazuh_api_ssl_ciphers = $wazuh::params_manager::wazuh_api_ssl_ciphers,
$wazuh_api_ssl_protocol = $wazuh::params_manager::wazuh_api_ssl_protocol,
@@ -323,6 +331,7 @@
$remote_commands_localfile_exceptions = $::wazuh::params_manager::remote_commands_localfile_exceptions,
$remote_commands_wodle = $::wazuh::params_manager::remote_commands_wodle,
$remote_commands_wodle_exceptions = $::wazuh::params_manager::remote_commands_wodle_exceptions,
+ $limits_eps = $::wazuh::params_manager::limits_eps,
$wazuh_api_template = $::wazuh::params_manager::wazuh_api_template,
@@ -330,12 +339,6 @@
) inherits wazuh::params_manager {
- validate_legacy(
- Boolean, 'validate_bool', $manage_repos, $syslog_output,$wazuh_manager_verify_manager_ssl
- )
- validate_legacy(
- Array, 'validate_array', $decoder_exclude, $rule_exclude
- )
## Determine which kernel and family puppet is running on. Will be used on _localfile, _rootcheck, _syscheck & _sca
@@ -344,7 +347,7 @@
}else{
$kernel = 'Linux'
- if ($::osfamily == 'Debian'){
+ if ($facts['os']['family'] == 'Debian'){
$os_family = 'debian'
}else{
$os_family = 'centos'
@@ -373,17 +376,13 @@
# This allows arrays of integers, sadly
# (commented due to stdlib version requirement)
- validate_legacy(Boolean, 'validate_bool', $ossec_emailnotification)
if ($ossec_emailnotification) {
if $ossec_smtp_server == undef {
fail('$ossec_emailnotification is enabled but $smtp_server was not set')
}
- validate_legacy(String, 'validate_string', $ossec_smtp_server)
- validate_legacy(String, 'validate_string', $ossec_emailfrom)
- validate_legacy(Array, 'validate_array', $ossec_emailto)
}
- if $::osfamily == 'windows' {
+ if $facts['os']['family'] == 'windows' {
fail('The ossec module does not yet support installing the OSSEC HIDS server on Windows')
}
@@ -392,7 +391,7 @@
if $manage_repos {
# TODO: Allow filtering of EPEL requirement
class { 'wazuh::repo':}
- if $::osfamily == 'Debian' {
+ if $facts['os']['family'] == 'Debian' {
Class['wazuh::repo'] -> Class['apt::update'] -> Package[$wazuh::params_manager::server_package]
} else {
Class['wazuh::repo'] -> Package[$wazuh::params_manager::server_package]
@@ -434,9 +433,13 @@
## Declaring variables for localfile and wodles generation
case $::operatingsystem{
- 'RedHat', 'OracleLinux':{
+ 'RedHat', 'OracleLinux', 'Rocky':{
$apply_template_os = 'rhel'
- if ( $::operatingsystemrelease =~ /^7.*/ ){
+ if ( $::operatingsystemrelease =~ /^9.*/ ){
+ $rhel_version = '9'
+ }elsif ( $::operatingsystemrelease =~ /^8.*/ ){
+ $rhel_version = '8'
+ }elsif ( $::operatingsystemrelease =~ /^7.*/ ){
$rhel_version = '7'
}elsif ( $::operatingsystemrelease =~ /^6.*/ ){
$rhel_version = '6'
@@ -637,9 +640,6 @@
if $wazuh_manager_verify_manager_ssl {
if ($wazuh_manager_server_crt != undef) and ($wazuh_manager_server_key != undef) {
- validate_legacy(
- String, 'validate_string', $wazuh_manager_server_crt, $wazuh_manager_server_key
- )
file { '/var/ossec/etc/sslmanager.key':
content => $wazuh_manager_server_key,
@@ -667,7 +667,7 @@
firewall { '1514 wazuh-manager':
dport => $ossec_remote_port,
proto => $ossec_remote_protocol,
- action => 'accept',
+ jump => 'accept',
state => [
'NEW',
'RELATED',
@@ -679,7 +679,7 @@
firewall { '1516 wazuh-manager':
dport => $ossec_cluster_port,
proto => $ossec_remote_protocol,
- action => 'accept',
+ jump => 'accept',
state => [
'NEW',
'RELATED',
diff --git a/manifests/params_agent.pp b/manifests/params_agent.pp
index 6749a7df..9fd7fac0 100644
--- a/manifests/params_agent.pp
+++ b/manifests/params_agent.pp
@@ -1,7 +1,7 @@
# Copyright (C) 2015, Wazuh Inc.
# Wazuh-Agent configuration parameters
class wazuh::params_agent {
- $agent_package_version = '4.3.11'
+ $agent_package_version = '4.9.0'
$agent_package_revision = '1'
$agent_service_ensure = 'running'
$agent_msi_download_location = 'https://packages.wazuh.com/4.x/windows'
@@ -226,6 +226,8 @@
# active-response
$active_response_linux_ca_store = '/var/ossec/etc/wpk_root.pem'
+ ## Ensure variable exists
+ $ossec_service_provider = undef
# OS specific configurations
case $::kernel {
@@ -301,7 +303,7 @@
$ossec_ruleset_user_defined_decoder_dir = 'etc/decoders'
$ossec_ruleset_user_defined_rule_dir = 'etc/rules'
- case $::osfamily {
+ case $facts['os']['family'] {
'Debian': {
$service_has_status = false
$ossec_service_provider = undef
@@ -335,7 +337,7 @@
}
}
}
- /^(wheezy|stretch|buster|bullseye|sid|precise|trusty|vivid|wily|xenial|bionic|focal|groovy|jammy)$/: {
+ /^(wheezy|stretch|buster|bullseye|bookworm|sid|precise|trusty|vivid|wily|xenial|bionic|focal|groovy|jammy)$/: {
$server_service = 'wazuh-manager'
$server_package = 'wazuh-manager'
$wodle_openscap_content = undef
@@ -463,6 +465,30 @@
$ossec_service_provider = 'redhat'
}
}
+ 'Rocky': {
+ if ( $::operatingsystemrelease =~ /^8.*/ ) {
+ $ossec_service_provider = 'redhat'
+ }
+ }
+ default: { fail('This ossec module has not been tested on your distribution') }
+ }
+ }
+ 'Suse': {
+ $service_has_status = true
+
+ $default_local_files = [
+ { 'location' => '/var/log/audit/audit.log', 'log_format' => 'audit' },
+ { 'location' => '/var/ossec/logs/active-responses.log', 'log_format' => 'syslog' },
+ { 'location' => '/var/log/messages', 'log_format' => 'syslog' },
+ { 'location' => '/var/log/secure', 'log_format' => 'syslog' },
+ { 'location' => '/var/log/maillog', 'log_format' => 'syslog' },
+ ]
+ case $::operatingsystem {
+ 'SLES': {
+ if ( $::operatingsystemrelease =~ /^(12|15).*/ ) {
+ $ossec_service_provider = 'redhat'
+ }
+ }
default: { fail('This ossec module has not been tested on your distribution') }
}
}
diff --git a/manifests/params_manager.pp b/manifests/params_manager.pp
index 70d7d236..cc5bebda 100644
--- a/manifests/params_manager.pp
+++ b/manifests/params_manager.pp
@@ -5,7 +5,7 @@
'Linux': {
# Installation
- $server_package_version = '4.3.11-1'
+ $server_package_version = '4.9.0-1'
$manage_repos = true
$manage_firewall = false
@@ -170,30 +170,28 @@
$vulnerability_detector_provider_canonical_enabled = 'no'
$vulnerability_detector_provider_canonical_os = ['trusty',
'xenial',
- 'bionic'
+ 'bionic',
+ 'focal',
+ 'jammy'
]
$vulnerability_detector_provider_canonical_update_interval = '1h'
$vulnerability_detector_provider_debian = 'yes'
$vulnerability_detector_provider_debian_enabled = 'no'
- $vulnerability_detector_provider_debian_os = ['wheezy',
- 'stretch',
- 'jessie',
- 'buster'
+ $vulnerability_detector_provider_debian_os = ['buster',
+ 'bullseye'
]
$vulnerability_detector_provider_debian_update_interval = '1h'
$vulnerability_detector_provider_redhat = 'yes'
$vulnerability_detector_provider_redhat_enabled = 'no'
- $vulnerability_detector_provider_redhat_os = ['5','6','7','8']
- $vulnerability_detector_provider_redhat_update_from_year = '2010'
+ $vulnerability_detector_provider_redhat_os = ['5','6','7','8','9']
$vulnerability_detector_provider_redhat_update_interval = '1h' # syslog
$vulnerability_detector_provider_nvd = 'yes'
$vulnerability_detector_provider_nvd_enabled = 'no'
$vulnerability_detector_provider_nvd_os = []
- $vulnerability_detector_provider_nvd_update_from_year = '2010'
$vulnerability_detector_provider_nvd_update_interval = '1h'
$vulnerability_detector_provider_arch = 'yes'
@@ -203,14 +201,33 @@
$vulnerability_detector_provider_alas = 'yes'
$vulnerability_detector_provider_alas_enabled = 'no'
$vulnerability_detector_provider_alas_os = ['amazon-linux',
- 'amazon-linux-2'
+ 'amazon-linux-2',
+ 'amazon-linux-2023'
]
$vulnerability_detector_provider_alas_update_interval = '1h'
+ $vulnerability_detector_provider_suse = 'yes'
+ $vulnerability_detector_provider_suse_enabled = 'no'
+ $vulnerability_detector_provider_suse_os = ['11-server',
+ '11-desktop',
+ '12-server',
+ '12-desktop',
+ '15-server',
+ '15-desktop'
+ ]
+ $vulnerability_detector_provider_suse_update_interval = '1h'
+
$vulnerability_detector_provider_msu = 'yes'
$vulnerability_detector_provider_msu_enabled = 'no'
$vulnerability_detector_provider_msu_update_interval = '1h'
+ $vulnerability_detector_provider_almalinux = 'yes'
+ $vulnerability_detector_provider_almalinux_enabled = 'no'
+ $vulnerability_detector_provider_almalinux_os = ['8',
+ '9'
+ ]
+ $vulnerability_detector_provider_almalinux_update_interval = '1h'
+
$syslog_output = false
$syslog_output_level = 2
$syslog_output_port = 514
@@ -367,6 +384,8 @@
# Logging configuration
# Values for API log level: disabled, info, warning, error, debug, debug2 (each level includes the previous level).
$wazuh_api_logs_level = 'info'
+ # Values for API log format: 'plain', 'json', 'plain,json', 'json,plain'
+ $wazuh_api_logs_format = 'plain'
# Cross-origin resource sharing: https://github.com/aio-libs/aiohttp-cors#usage
$wazuh_api_cors_enabled = 'no'
@@ -395,12 +414,13 @@
$remote_commands_localfile_exceptions = []
$remote_commands_wodle = 'yes'
$remote_commands_wodle_exceptions = []
+ $limits_eps = 'yes'
# Wazuh API template path
- $wazuh_api_template = 'wazuh/wazuh_api.erb'
+ $wazuh_api_template = 'wazuh/wazuh_api_yml.erb'
- case $::osfamily {
+ case $facts['os']['family'] {
'Debian': {
$agent_service = 'wazuh-agent'
@@ -441,7 +461,7 @@
}
}
}
- /^(wheezy|stretch|buster|bullseye|sid|precise|trusty|vivid|wily|xenial|bionic|focal|groovy|jammy)$/: {
+ /^(wheezy|stretch|buster|bullseye|bookworm|sid|precise|trusty|vivid|wily|xenial|bionic|focal|groovy|jammy)$/: {
$server_service = 'wazuh-manager'
$server_package = 'wazuh-manager'
$wodle_openscap_content = undef
@@ -545,6 +565,37 @@
$api_service_provider = 'redhat'
}
}
+ 'Rocky': {
+ if ( $::operatingsystemrelease =~ /^8.*/ ) {
+ $ossec_service_provider = 'redhat'
+ $api_service_provider = 'redhat'
+ }
+ }
+ default: { fail('This ossec module has not been tested on your distribution') }
+ }
+ }
+ 'Suse': {
+
+ $agent_service = 'wazuh-agent'
+ $agent_package = 'wazuh-agent'
+ $server_service = 'wazuh-manager'
+ $server_package = 'wazuh-manager'
+ $service_has_status = true
+
+ $default_local_files =[
+ { 'location' => '/var/log/audit/audit.log' , 'log_format' => 'audit'},
+ { 'location' => '/var/ossec/logs/active-responses.log' , 'log_format' => 'syslog'},
+ { 'location' => '/var/log/messages', 'log_format' => 'syslog'},
+ { 'location' => '/var/log/secure' , 'log_format' => 'syslog'},
+ { 'location' => '/var/log/maillog' , 'log_format' => 'syslog'},
+ ]
+ case $::operatingsystem {
+ 'SLES': {
+ if ( $::operatingsystemrelease =~ /^(12|15).*/ ) {
+ $ossec_service_provider = 'redhat'
+ $api_service_provider = 'redhat'
+ }
+ }
default: { fail('This ossec module has not been tested on your distribution') }
}
}
@@ -565,7 +616,7 @@
$keys_group = 'Administrators'
$agent_service = 'WazuhSvc'
- $agent_package = 'Wazuh Agent 4.3.11'
+ $agent_package = 'Wazuh Agent 4.9.0'
$server_service = ''
$server_package = ''
$api_service = ''
diff --git a/manifests/repo.pp b/manifests/repo.pp
index ded4a4b5..ccbc520b 100644
--- a/manifests/repo.pp
+++ b/manifests/repo.pp
@@ -3,7 +3,7 @@
class wazuh::repo (
) {
- case $::osfamily {
+ case $facts['os']['family'] {
'Debian' : {
if $::lsbdistcodename =~ /(jessie|wheezy|stretch|precise|trusty|vivid|wily|xenial|yakketi|groovy)/
and ! defined(Package['apt-transport-https']) {
@@ -16,7 +16,7 @@
server => 'pgp.mit.edu'
}
case $::lsbdistcodename {
- /(jessie|wheezy|stretch|buster|bullseye|sid|precise|trusty|vivid|wily|xenial|yakketi|bionic|focal|groovy|jammy)/: {
+ /(jessie|wheezy|stretch|buster|bullseye|bookworm|sid|precise|trusty|vivid|wily|xenial|yakketi|bionic|focal|groovy|jammy)/: {
apt::source { 'wazuh':
ensure => present,
@@ -33,9 +33,10 @@
default: { fail('This ossec module has not been tested on your distribution (or lsb package not installed)') }
}
}
- 'Linux', 'RedHat' : {
+ 'Linux', 'RedHat', 'Suse' : {
case $::os[name] {
- /^(CentOS|RedHat|OracleLinux|Fedora|Amazon|AlmaLinux)$/: {
+ /^(CentOS|RedHat|OracleLinux|Fedora|Amazon|AlmaLinux|Rocky|SLES)$/: {
+
if ( $::operatingsystemrelease =~ /^5.*/ ) {
$baseurl = 'https://packages.wazuh.com/4.x/yum/5/'
$gpgkey = 'http://packages.wazuh.com/key/GPG-KEY-WAZUH'
@@ -46,16 +47,30 @@
}
default: { fail('This ossec module has not been tested on your distribution.') }
}
- # Set up OSSEC repo
- yumrepo { 'wazuh':
- descr => 'WAZUH OSSEC Repository - www.wazuh.com',
- enabled => true,
- gpgcheck => 1,
- gpgkey => $gpgkey,
- baseurl => $baseurl
- }
-
+ # Set up OSSEC repo
+ case $::os[name] {
+ /^(CentOS|RedHat|OracleLinux|Fedora|Amazon|AlmaLinux)$/: {
+ yumrepo { 'wazuh':
+ descr => 'WAZUH OSSEC Repository - www.wazuh.com',
+ enabled => true,
+ gpgcheck => 1,
+ gpgkey => $gpgkey,
+ baseurl => $baseurl
+ }
+ }
+ /^(SLES)$/: {
+ zypprepo { 'wazuh':
+ ensure => present,
+ name => 'WAZUH OSSEC Repository - www.wazuh.com',
+ enabled => 1,
+ gpgcheck => 0,
+ repo_gpgcheck => 0,
+ pkg_gpgcheck => 0,
+ gpgkey => $gpgkey,
+ baseurl => $baseurl
+ }
+ }
+ }
}
- default: { fail('This ossec module has not been tested on your distribution') }
}
}
diff --git a/manifests/repo_elastic_oss.pp b/manifests/repo_elastic_oss.pp
deleted file mode 100644
index 6df73a6b..00000000
--- a/manifests/repo_elastic_oss.pp
+++ /dev/null
@@ -1,71 +0,0 @@
-# Copyright (C) 2015, Wazuh Inc.
-# Installation of Elastic-oss repository
-class wazuh::repo_elastic_oss (
-
-) {
- case $::osfamily {
- 'Debian' : {
- if ! defined(Package['apt-transport-https']) {
- ensure_packages(['apt-transport-https'], {'ensure' => 'present'})
- }
- # apt-key added by issue #34
- apt::key { 'elastic':
- id => '46095ACC8548582C1A2699A9D27D666CD88E42B4',
- source => 'https://artifacts.elastic.co/GPG-KEY-elasticsearch',
- server => 'pgp.mit.edu'
- }
- case $::lsbdistcodename {
- /(jessie|wheezy|stretch|buster|bullseye|sid|precise|trusty|vivid|wily|xenial|yakketi|bionic|focal|jammy)/: {
-
- apt::source { 'wazuh_elastic_oss':
- ensure => present,
- comment => 'This is the OSS Elastic repository',
- location => 'https://artifacts.elastic.co/packages/oss-7.x/apt',
- release => 'stable',
- repos => 'main',
- include => {
- 'src' => false,
- 'deb' => true,
- },
- }
- }
- default: { fail('This ossec module has not been tested on your distribution (or lsb package not installed)') }
- }
- }
- 'RedHat' : {
- case $::os[name] {
- /^(CentOS|RedHat|OracleLinux|Fedora|Amazon)$/: {
- if ( $::operatingsystemrelease =~ /^5.*/ ) {
- $baseurl = 'https://artifacts.elastic.co/packages/oss-7.x/yum'
- $gpgkey = 'https://artifacts.elastic.co/GPG-KEY-elasticsearch'
- } else {
- $baseurl = 'https://artifacts.elastic.co/packages/oss-7.x/yum'
- $gpgkey = 'https://artifacts.elastic.co/GPG-KEY-elasticsearch'
- }
- }
- default: { fail('This ossec module has not been tested on your distribution.') }
- }
- ## Set up Elasticsearch repo
-
- # Import GPG key
-
- exec { 'Install Elasticsearch GPG key':
- path => ['/bin', '/usr/bin'],
- command => 'rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch',
- unless => 'test $(rpm -qa gpg-pubkey | grep -i "D88E42B4" | wc -l) -eq 1',
- }
-
- # Adding repo by Puppet yumrepo resource
-
- yumrepo { 'elasticsearch':
- ensure => 'present',
- enabled => 1,
- gpgcheck => 1,
- gpgkey => $gpgkey,
- baseurl => $baseurl,
- name => 'elasticsearch',
- }
- }
- default: { fail('This ossec module has not been tested on your distribution') }
- }
- }
diff --git a/metadata.json b/metadata.json
index e4fb4b04..6cfa50fa 100644
--- a/metadata.json
+++ b/metadata.json
@@ -1,6 +1,6 @@
{
"name": "wazuh-wazuh",
- "version": "4.3.11",
+ "version": "4.9.0",
"author": "WAZUH",
"summary": "Install and configure Wazuh-HIDS client and server",
"license": "Apache-2.0",
@@ -36,6 +36,10 @@
"name": "puppetlabs/powershell",
"version_requirement": ">= 2.0.0 < 5.0.0"
},
+ {
+ "name": "puppet/zypprepo",
+ "version_requirement": "= 4.0.1"
+ },
{
"name": "puppet/archive",
"version_requirement": ">= 0.4.8 < 7.0.0"
@@ -111,7 +115,7 @@
"tags": [
"ossec",
"hids",
- "4.3",
+ "4.8",
"wazuh"
],
"pdk-version": "1.14.1",
diff --git a/templates/fragments/_vulnerability_detector.erb b/templates/fragments/_vulnerability_detector.erb
index 4be0efcf..43ac7613 100644
--- a/templates/fragments/_vulnerability_detector.erb
+++ b/templates/fragments/_vulnerability_detector.erb
@@ -29,7 +29,6 @@
<% if @vulnerability_detector_provider_redhat %>
<% if @vulnerability_detector_provider_redhat_enabled %><%= @vulnerability_detector_provider_redhat_enabled %><% end %>
- <% if @vulnerability_detector_provider_redhat_update_from_year %><%= @vulnerability_detector_provider_redhat_update_from_year %><% end %>
<% if @vulnerability_detector_provider_redhat_update_interval %><%= @vulnerability_detector_provider_redhat_update_interval %><% end %>
<% if !@vulnerability_detector_provider_redhat_os.empty? %>
<% @vulnerability_detector_provider_redhat_os.each do |os| %>
@@ -41,9 +40,8 @@
<% if @vulnerability_detector_provider_nvd %>
<% if @vulnerability_detector_provider_nvd_enabled %><%= @vulnerability_detector_provider_nvd_enabled %><% end %>
- <% if @vulnerability_detector_provider_nvd_update_from_year %><%= @vulnerability_detector_provider_nvd_update_from_year %><% end %>
<% if @vulnerability_detector_provider_nvd_update_interval %><%= @vulnerability_detector_provider_nvd_update_interval %><% end %>
-
+
<% end %>
<% if @vulnerability_detector_provider_arch %>
@@ -62,11 +60,32 @@
<% end %>
<% end %>
+<% if @vulnerability_detector_provider_suse %>
+
+ <% if @vulnerability_detector_provider_suse_enabled %><%= @vulnerability_detector_provider_suse_enabled %><% end %>
+ <% if @vulnerability_detector_provider_suse_update_interval %><%= @vulnerability_detector_provider_suse_update_interval %><% end %>
+ <% if !@vulnerability_detector_provider_suse_os.empty? %>
+ <% @vulnerability_detector_provider_suse_os.each do |os| %>
+ <%= os %>
+ <% end %>
+ <% end %>
+
+<% end %>
<% if @vulnerability_detector_provider_msu %>
<% if @vulnerability_detector_provider_msu_enabled %><%= @vulnerability_detector_provider_msu_enabled %><% end %>
<% if @vulnerability_detector_provider_msu_update_interval %><%= @vulnerability_detector_provider_msu_update_interval %><% end %>
<% end %>
+<% if @vulnerability_detector_provider_almalinux %>
+
+ <% if @vulnerability_detector_provider_almalinux_enabled %><%= @vulnerability_detector_provider_almalinux_enabled %><% end %>
+ <% if !@vulnerability_detector_provider_almalinux_os.empty? %>
+ <% @vulnerability_detector_provider_almalinux_os.each do |os| %>
+ <%= os %>
+ <% end %>
+ <% end %>
+ <% if @vulnerability_detector_provider_almalinux_update_interval %><%= @vulnerability_detector_provider_almalinux_update_interval %><% end %>
+
+<% end %>
-
\ No newline at end of file
diff --git a/templates/opensearch_dashboards_yml.erb b/templates/opensearch_dashboards_yml.erb
new file mode 100644
index 00000000..26d21c02
--- /dev/null
+++ b/templates/opensearch_dashboards_yml.erb
@@ -0,0 +1,14 @@
+server.host: <%= @dashboard_server_host %>
+server.port: <%= @dashboard_server_port %>
+opensearch.hosts: <%= @indexer_server_host %>
+opensearch.ssl.verificationMode: certificate
+#opensearch.username:
+#opensearch.password:
+opensearch.requestHeadersWhitelist: ["securitytenant","Authorization"]
+opensearch_security.multitenancy.enabled: false
+opensearch_security.readonly_mode.roles: ["kibana_read_only"]
+server.ssl.enabled: true
+server.ssl.key: "/etc/wazuh-dashboard/certs/dashboard-key.pem"
+server.ssl.certificate: "/etc/wazuh-dashboard/certs/dashboard.pem"
+opensearch.ssl.certificateAuthorities: ["/etc/wazuh-dashboard/certs/root-ca.pem"]
+uiSettings.overrides.defaultRoute: /app/wz-home
diff --git a/templates/opensearch_security_config.yml.erb b/templates/opensearch_security_config.yml.erb
deleted file mode 100644
index 40d370e5..00000000
--- a/templates/opensearch_security_config.yml.erb
+++ /dev/null
@@ -1,33 +0,0 @@
----
-_meta:
- type: "config"
- config_version: 2
-config:
- dynamic:
- http:
- anonymous_auth_enabled: false
- authc:
- basic:
- basic_internal_auth_domain:
- http_enabled: true
- transport_enabled: true
- order: 0
- http_authenticator:
- type: basic
- challenge: false
- authentication_backend:
- type: internal
- openid_auth_domain:
- http_enabled: true
- transport_enabled: true
- order: 1
- http_authenticator:
- type: openid
- challenge: false
- config:
- subject_key: preferred_username
- roles_key: roles
- openid_connect_url: <%= @openid_connect_url %>
- verify_hostnames: false
- authentication_backend:
- type: noop
diff --git a/templates/wazuh_api_yml.erb b/templates/wazuh_api_yml.erb
index f8432d25..6b2e67b0 100644
--- a/templates/wazuh_api_yml.erb
+++ b/templates/wazuh_api_yml.erb
@@ -38,10 +38,14 @@ drop_privileges: <%= @wazuh_api_drop_privileges %>
# Enable features under development
experimental_features: <%= @wazuh_api_experimental_features %>
# Enable remote commands
-remote_commands:
- localfile:
- enabled: <%= @remote_commands_localfile %>
- exceptions: <%= @remote_commands_localfile_exceptions %>
- wodle_command:
- enabled: <%= @remote_commands_wodle %>
- exceptions: <%= @remote_commands_wodle_exceptions %>
+upload_configuration:
+ remote_commands:
+ localfile:
+ allow: <%= @remote_commands_localfile %>
+ exceptions: <%= @remote_commands_localfile_exceptions %>
+ wodle_command:
+ allow: <%= @remote_commands_wodle %>
+ exceptions: []
+ limits:
+ eps:
+ allow: <%= @limits_eps %>
diff --git a/templates/wazuh_dashboard_yml.erb b/templates/wazuh_dashboard_yml.erb
index 8160974d..325fa805 100644
--- a/templates/wazuh_dashboard_yml.erb
+++ b/templates/wazuh_dashboard_yml.erb
@@ -9,16 +9,8 @@ opensearch.password: <%= @dashboard_password %>
opensearch.requestHeadersWhitelist: ["securitytenant","Authorization"]
opensearch_security.multitenancy.enabled: false
opensearch_security.readonly_mode.roles: ["kibana_read_only"]
-<% if @enable_openid_login -%>
-opensearch_security.auth.type: <%= @opensearch_security_auth_type %>
-opensearch_security.openid.connect_url: <%= @opensearch_security_openid_connect_url %>
-opensearch_security.openid.client_id: <%= @opensearch_security_openid_client_id %>
-opensearch_security.openid.client_secret: <%= @opensearch_security_openid_client_secret %>
-opensearch_security.openid.base_redirect_url: <%= @opensearch_security_openid_base_redirect_url %>
-opensearch_security.openid.verify_hostnames: <%= @opensearch_security_openid_verify_hostnames %>
-<% end -%>
server.ssl.enabled: true
server.ssl.key: "<%= @dashboard_path_certs %>/dashboard-key.pem"
server.ssl.certificate: "<%= @dashboard_path_certs %>/dashboard.pem"
opensearch.ssl.certificateAuthorities: ["<%= @dashboard_path_certs %>/root-ca.pem"]
-uiSettings.overrides.defaultRoute: /app/wazuh
+uiSettings.overrides.defaultRoute: /app/wz-home
diff --git a/templates/wazuh_indexer_yml.erb b/templates/wazuh_indexer_yml.erb
index 98e070dd..f5350c10 100644
--- a/templates/wazuh_indexer_yml.erb
+++ b/templates/wazuh_indexer_yml.erb
@@ -1,4 +1,4 @@
-network.host: "0.0.0.0"
+network.host: "<%= @indexer_network_host %>"
node.name: "<%= @indexer_node_name %>"
cluster.initial_master_nodes:
<% @indexer_cluster_initial_master_nodes.each do |node| -%>
diff --git a/templates/wazuh_yml.erb b/templates/wazuh_yml.erb
index b2286501..1e42d322 100644
--- a/templates/wazuh_yml.erb
+++ b/templates/wazuh_yml.erb
@@ -12,7 +12,7 @@
# ======================== Wazuh dashboard configuration file ========================
#
# Please check the documentation for more information about configuration options:
-# https://documentation.wazuh.com/4.3/user-manual/wazuh-dashboard/config-file.html
+# https://documentation.wazuh.com/4.8/user-manual/wazuh-dashboard/config-file.html
#
# Also, you can check our repository:
# https://github.com/wazuh/wazuh-kibana-app
@@ -117,7 +117,7 @@
#
# Disable certain index pattern names from being available in index pattern
# selector from the Wazuh app.
-# ip.ignore:
+# ip.ignore:
#
# ------------------------------ Monitoring ------------------------------------
#
@@ -159,7 +159,7 @@
#
# Enter the ID of the hosts you want to save data from, leave this empty to run
# the task on every host.
-# cron.statistics.apis:
+# cron.statistics.apis:
#
# Define the frequency of task execution using cron schedule expressions.
# cron.statistics.interval: 0 */5 * * * *
@@ -179,16 +179,16 @@
# ------------------------------ Logo customization ----------------------------
#
# Set the name of the app logo stored at /plugins/wazuh/public/assets/
-# customization.logo.app:
+# customization.logo.app:
#
# Set the name of the sidebar logo stored at /plugins/wazuh/public/assets/
-# customization.logo.sidebar:
+# customization.logo.sidebar:
#
# Set the name of the health-check logo stored at /plugins/wazuh/public/assets/
-# customization.logo.healthcheck:
+# customization.logo.healthcheck:
#
# Set the name of the reports logo (.png) stored at /plugins/wazuh/public/assets/
-# customization.logo.reports:
+# customization.logo.reports:
#
# ---------------------------- Hide manager alerts -----------------------------
#
@@ -204,10 +204,10 @@
# ------------------------------- Agent enrollment -----------------------------
#
# Specifies the Wazuh registration server, used for the agent enrollment.
-# enrollment.dns:
+# enrollment.dns:
#
# Specifies the password used to authenticate during the agent enrollment.
-# enrollment.password:
+# enrollment.password:
#
#-------------------------------- Wazuh hosts ----------------------------------
#