diff --git a/production/elastic/wazuh_cf_kibana.sh b/production/elastic/wazuh_cf_kibana.sh index e6e03de..adf2698 100644 --- a/production/elastic/wazuh_cf_kibana.sh +++ b/production/elastic/wazuh_cf_kibana.sh @@ -232,7 +232,7 @@ echo "Setcap executed" >> /tmp/deploy.log get_plugin_url(){ if [[ ${InstallType} == 'packages' ]] then - plugin_url="https://packages.wazuh.com/wazuhapp/wazuhapp-${wazuh_major}.${wazuh_minor}.${wazuh_patch}_${elastic_major_version}.${elastic_minor_version}.${elastic_patch_version}.zip" + plugin_url="https://packages.wazuh.com/4.x/ui/kibana/wazuh_kibana-${wazuh_major}.${wazuh_minor}.${wazuh_patch}_${elastic_major_version}.${elastic_minor_version}.${elastic_patch_version}.zip" elif [[ ${InstallType} == 'sources' ]] then BRANCH="$wazuh_major.$wazuh_minor-$elastic_major_version.$elastic_minor_version" diff --git a/production/wazuh/cluster/wazuh_cf_master.sh b/production/wazuh/cluster/wazuh_cf_master.sh index ce52a98..078f23f 100644 --- a/production/wazuh/cluster/wazuh_cf_master.sh +++ b/production/wazuh/cluster/wazuh_cf_master.sh @@ -55,6 +55,7 @@ name=Wazuh repository baseurl=https://packages.wazuh.com/4.x/yum/ protect=1 EOF +yum install wazuh-manager -y elif [[ ${InstallType} == 'sources' ]] then @@ -183,6 +184,19 @@ systemctl restart wazuh-manager systemctl enable wazuh-manager echo "Restarted Wazuh manager." >> /tmp/deploy.log +# API configuration +# ensure the API is running +systemctl restart wazuh-api + +# get token + +TOKEN=$(curl -u wazuh:wazuh -k -X GET "https://localhost:55000/security/user/authenticate?raw=true") + +# Change default password +curl -k -X PUT "https://localhost:55000/security/users/1" -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"password":$ssh_password}' + +# get new token +TOKEN=$(curl -u wazuh:$ssh_password -k -X GET "https://localhost:55000/security/user/authenticate?raw=true") # Installing Filebeat yum -y install filebeat-${elastic_version} diff --git a/production/wazuh/cluster/wazuh_cf_worker.sh b/production/wazuh/cluster/wazuh_cf_worker.sh index c85a853..e57bdc4 100644 --- a/production/wazuh/cluster/wazuh_cf_worker.sh +++ b/production/wazuh/cluster/wazuh_cf_worker.sh @@ -41,6 +41,7 @@ name=Wazuh repository baseurl=https://packages.wazuh.com/4.x/yum/ protect=1 EOF +yum install wazuh-manager -y elif [[ ${InstallType} == 'sources' ]] then diff --git a/production/wazuh_template.yml b/production/wazuh_template.yml index b2e7d6d..bac36b7 100644 --- a/production/wazuh_template.yml +++ b/production/wazuh_template.yml @@ -171,8 +171,10 @@ Parameters: - 7.8.0_3.13.1 - 7.9.1_3.13.2 - 7.9.2_3.13.2 + - 7.9.2_4.0.0 + ConstraintDescription: Format is ElasticVersion_WazuhVersion - Default: 7.9.2_3.13.2 + Default: 7.9.2_4.0.0 Description: Elastic and Wazuh versions to be installed Type: String WazuhInstanceType: @@ -533,7 +535,7 @@ Resources: group: root /tmp/wazuh_cf_bootstrap_elastic.sh: source: !Sub >- - https://raw.githubusercontent.com/wazuh/wazuh-cloudformation/master/production/elastic/wazuh_cf_bootstrap_elastic.sh + https://raw.githubusercontent.com/wazuh/wazuh-cloudformation/feature-adapt-4.0/production/elastic/wazuh_cf_bootstrap_elastic.sh mode: '000700' owner: root group: root @@ -612,7 +614,7 @@ Resources: group: root /tmp/wazuh_cf_elastic.sh: source: !Sub >- - https://raw.githubusercontent.com/wazuh/wazuh-cloudformation/master/production/elastic/wazuh_cf_elastic.sh + https://raw.githubusercontent.com/wazuh/wazuh-cloudformation/feature-adapt-4.0/production/elastic/wazuh_cf_elastic.sh mode: '000700' owner: root group: root @@ -691,7 +693,7 @@ Resources: group: root /tmp/wazuh_cf_elastic.sh: source: !Sub >- - https://raw.githubusercontent.com/wazuh/wazuh-cloudformation/master/production/elastic/wazuh_cf_elastic.sh + https://raw.githubusercontent.com/wazuh/wazuh-cloudformation/feature-adapt-4.0/production/elastic/wazuh_cf_elastic.sh mode: '000700' owner: root group: root @@ -992,7 +994,7 @@ Resources: group: root /tmp/wazuh_cf_kibana.sh: source: !Sub >- - https://raw.githubusercontent.com/wazuh/wazuh-cloudformation/master/production/elastic/wazuh_cf_kibana.sh + https://raw.githubusercontent.com/wazuh/wazuh-cloudformation/feature-adapt-4.0/production/elastic/wazuh_cf_kibana.sh mode: '000700' owner: root group: root @@ -1075,7 +1077,7 @@ Resources: group: root /tmp/wazuh_cf_master.sh: source: !Sub >- - https://raw.githubusercontent.com/wazuh/wazuh-cloudformation/master/production/wazuh/cluster/wazuh_cf_master.sh + https://raw.githubusercontent.com/wazuh/wazuh-cloudformation/feature-adapt-4.0/production/wazuh/cluster/wazuh_cf_master.sh mode: '000700' owner: root group: root @@ -1158,7 +1160,7 @@ Resources: group: root /tmp/wazuh_cf_worker.sh: source: !Sub >- - https://raw.githubusercontent.com/wazuh/wazuh-cloudformation/master/production/wazuh/cluster/wazuh_cf_worker.sh + https://raw.githubusercontent.com/wazuh/wazuh-cloudformation/feature-adapt-4.0/production/wazuh/cluster/wazuh_cf_worker.sh mode: '000700' owner: root group: root