From 741cbf7b8a98219575d8984af9b79f9eb1861f37 Mon Sep 17 00:00:00 2001 From: Raul Del Pozo Moreno Date: Mon, 16 Oct 2023 22:27:38 +0200 Subject: [PATCH 01/19] Bumped readme with Wazuh dashboard 2.10.0 --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f358cd9a23..cc74389571 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,8 @@ The following table shows the references for the versions of each component. | 4.3.x | 1.2.0 | | 4.4.0 | 2.4.1 | | 4.4.1 - 4.5.x | 2.6.0 | -| 4.6.0 - current | 2.8.0 | +| 4.6.x - 4.7.x | 2.8.0 | +| 4.8.x - current | 2.10.0 | ### Wazuh indexer From d4268fd27ba428d847aa85215ad9b741f27fc8fd Mon Sep 17 00:00:00 2001 From: Raul Del Pozo Moreno Date: Mon, 16 Oct 2023 22:27:48 +0200 Subject: [PATCH 02/19] Bumped to 2.10.0 --- stack/dashboard/base/builder.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stack/dashboard/base/builder.sh b/stack/dashboard/base/builder.sh index b109ed1e66..a4d89dad86 100755 --- a/stack/dashboard/base/builder.sh +++ b/stack/dashboard/base/builder.sh @@ -16,7 +16,7 @@ revision="$2" future="$3" repository="$4" reference="$5" -opensearch_version="2.8.0" +opensearch_version="2.10.0" base_dir=/opt/wazuh-dashboard-base # ----------------------------------------------------------------------------- From 98acce658afb33bc05281be19dfaafc2b5454578 Mon Sep 17 00:00:00 2001 From: Raul Del Pozo Moreno Date: Thu, 19 Oct 2023 15:25:25 +0200 Subject: [PATCH 03/19] Removed dashboard.chunk.1 references --- stack/dashboard/base/builder.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/stack/dashboard/base/builder.sh b/stack/dashboard/base/builder.sh index a4d89dad86..86156e22ae 100755 --- a/stack/dashboard/base/builder.sh +++ b/stack/dashboard/base/builder.sh @@ -124,10 +124,6 @@ brotli -c ./src/core/target/public/core.entry.js > ./src/core/target/public/core sed -i 's|updater\$:appUpdater\$|status:1|' ./src/plugins/opensearch_dashboards_overview/target/public/opensearchDashboardsOverview.plugin.js gzip -c ./src/plugins/opensearch_dashboards_overview/target/public/opensearchDashboardsOverview.plugin.js > ./src/plugins/opensearch_dashboards_overview/target/public/opensearchDashboardsOverview.plugin.js.gz brotli -c ./src/plugins/opensearch_dashboards_overview/target/public/opensearchDashboardsOverview.plugin.js > ./src/plugins/opensearch_dashboards_overview/target/public/opensearchDashboardsOverview.plugin.js.br -# Remove "New to OpenSearch Dashboards" message with link to OpenSearch Dashboards sample data in Dashboard plugin -sed -i 's|external_osdSharedDeps_React_default.a.createElement("p",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_\["FormattedMessage"\],{id:"dashboard.listing.createNewDashboard.newToOpenSearchDashboardsDescription",defaultMessage:"New to OpenSearch Dashboards|false\&\&external_osdSharedDeps_React_default.a.createElement("p",null,external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_OsdI18nReact_["FormattedMessage"],{id:"dashboard.listing.createNewDashboard.newToOpenSearchDashboardsDescription",defaultMessage:"New to OpenSearch Dashboards|' ./src/plugins/dashboard/target/public/dashboard.chunk.1.js -gzip -c ./src/plugins/dashboard/target/public/dashboard.chunk.1.js > ./src/plugins/dashboard/target/public/dashboard.chunk.1.js.gz -brotli -c ./src/plugins/dashboard/target/public/dashboard.chunk.1.js > ./src/plugins/dashboard/target/public/dashboard.chunk.1.js.br # Remove `home` button from the sidebar menu sed -i 's|\["EuiHorizontalRule"\],{margin:"none"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_\["EuiFlexItem"\],{grow:false,style:{flexShrink:0}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_\["EuiCollapsibleNavGroup"\]|["EuiHorizontalRule"],{margin:"none"})),false\&\&external_osdSharedDeps_React_default.a.createElem(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false,style:{flexShrink:0}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCollapsibleNavGroup"]|' ./src/core/target/public/core.entry.js # Replace OpenSearch login default configuration title with Wazuh login title text From d507c2999e680147339865e3258a36a094a106d9 Mon Sep 17 00:00:00 2001 From: Raul Del Pozo Moreno Date: Thu, 19 Oct 2023 15:26:47 +0200 Subject: [PATCH 04/19] Improved configuration path config --- stack/dashboard/base/files/etc/services/default | 1 + .../dashboard/base/files/etc/services/wazuh-dashboard.service | 2 +- stack/dashboard/deb/debian/rules | 2 -- stack/dashboard/rpm/wazuh-dashboard.spec | 4 ---- 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/stack/dashboard/base/files/etc/services/default b/stack/dashboard/base/files/etc/services/default index c4f94fd368..946d725967 100644 --- a/stack/dashboard/base/files/etc/services/default +++ b/stack/dashboard/base/files/etc/services/default @@ -5,3 +5,4 @@ chdir="/" nice="" KILL_ON_STOP_TIMEOUT=0 +OSD_PATH_CONF="/etc/wazuh-dashboard" \ No newline at end of file diff --git a/stack/dashboard/base/files/etc/services/wazuh-dashboard.service b/stack/dashboard/base/files/etc/services/wazuh-dashboard.service index 86e61a9aa2..ef1d2afd42 100644 --- a/stack/dashboard/base/files/etc/services/wazuh-dashboard.service +++ b/stack/dashboard/base/files/etc/services/wazuh-dashboard.service @@ -7,7 +7,7 @@ User=wazuh-dashboard Group=wazuh-dashboard EnvironmentFile=-/etc/default/wazuh-dashboard EnvironmentFile=-/etc/sysconfig/wazuh-dashboard -ExecStart=/usr/share/wazuh-dashboard/bin/opensearch-dashboards -c /etc/wazuh-dashboard/opensearch_dashboards.yml +ExecStart=/usr/share/wazuh-dashboard/bin/opensearch-dashboards WorkingDirectory=/usr/share/wazuh-dashboard [Install] diff --git a/stack/dashboard/deb/debian/rules b/stack/dashboard/deb/debian/rules index 6b4bcbb1ec..d7c83be509 100644 --- a/stack/dashboard/deb/debian/rules +++ b/stack/dashboard/deb/debian/rules @@ -58,8 +58,6 @@ override_dh_install: useradd -g $(GROUP) $(USER) tar -xf $(DASHBOARD_FILE) - sed -i 's/OSD_NODE_OPTS_PREFIX/OSD_PATH_CONF="\/etc\/wazuh-dashboard" OSD_NODE_OPTS_PREFIX/g' "wazuh-dashboard-base/bin/opensearch-dashboards" - sed -i 's/OSD_USE_NODE_JS_FILE_PATH/OSD_PATH_CONF="\/etc\/wazuh-dashboard" OSD_USE_NODE_JS_FILE_PATH/g' "wazuh-dashboard-base/bin/opensearch-dashboards-keystore" mkdir -p $(TARGET_DIR)$(CONFIG_DIR) mkdir -p $(TARGET_DIR)$(INSTALLATION_DIR) diff --git a/stack/dashboard/rpm/wazuh-dashboard.spec b/stack/dashboard/rpm/wazuh-dashboard.spec index 6627f37401..a287fe9ed8 100644 --- a/stack/dashboard/rpm/wazuh-dashboard.spec +++ b/stack/dashboard/rpm/wazuh-dashboard.spec @@ -55,10 +55,6 @@ useradd -g %{GROUP} %{USER} tar -xf %{DASHBOARD_FILE} -# Set custom config dir -sed -i 's/OSD_NODE_OPTS_PREFIX/OSD_PATH_CONF="\/etc\/wazuh-dashboard" OSD_NODE_OPTS_PREFIX/g' "wazuh-dashboard-base/bin/opensearch-dashboards" -sed -i 's/OSD_USE_NODE_JS_FILE_PATH/OSD_PATH_CONF="\/etc\/wazuh-dashboard" OSD_USE_NODE_JS_FILE_PATH/g' "wazuh-dashboard-base/bin/opensearch-dashboards-keystore" - # ----------------------------------------------------------------------------- %install From 405403c7b33dde4293d0f606507a7fc72c4ac179 Mon Sep 17 00:00:00 2001 From: Raul Del Pozo Moreno Date: Thu, 19 Oct 2023 15:28:00 +0200 Subject: [PATCH 05/19] Added setcap to fallback node --- stack/dashboard/deb/debian/postinst | 1 + stack/dashboard/rpm/wazuh-dashboard.spec | 1 + 2 files changed, 2 insertions(+) diff --git a/stack/dashboard/deb/debian/postinst b/stack/dashboard/deb/debian/postinst index 71d13281d7..e33c07afdb 100644 --- a/stack/dashboard/deb/debian/postinst +++ b/stack/dashboard/deb/debian/postinst @@ -27,6 +27,7 @@ case "$1" in chmod 750 "${TARGET_DIR}""${INSTALLATION_DIR}" chown -R "${NAME}":"${NAME}" "${TARGET_DIR}""${INSTALLATION_DIR}" setcap 'cap_net_bind_service=+ep' "${INSTALLATION_DIR}"/node/bin/node + setcap 'cap_net_bind_service=+ep' "${INSTALLATION_DIR}"/node/fallback/bin/node if [ -f "${INSTALLATION_DIR}"/"${NAME}".restart ]; then rm -f "${INSTALLATION_DIR}"/"${NAME}".restart if command -v systemctl > /dev/null 2>&1 && systemctl > /dev/null 2>&1 ; then diff --git a/stack/dashboard/rpm/wazuh-dashboard.spec b/stack/dashboard/rpm/wazuh-dashboard.spec index a287fe9ed8..1eac32416e 100644 --- a/stack/dashboard/rpm/wazuh-dashboard.spec +++ b/stack/dashboard/rpm/wazuh-dashboard.spec @@ -131,6 +131,7 @@ fi %post setcap 'cap_net_bind_service=+ep' %{INSTALL_DIR}/node/bin/node +setcap 'cap_net_bind_service=+ep' %{INSTALL_DIR}/node/fallback/bin/node # ----------------------------------------------------------------------------- From 4f9562543ddfa0212f6aabeec0565c28c0e99bb1 Mon Sep 17 00:00:00 2001 From: Raul Del Pozo Moreno Date: Thu, 19 Oct 2023 18:21:43 +0200 Subject: [PATCH 06/19] Removed config sed --- stack/dashboard/base/builder.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/stack/dashboard/base/builder.sh b/stack/dashboard/base/builder.sh index 86156e22ae..613aa4f922 100755 --- a/stack/dashboard/base/builder.sh +++ b/stack/dashboard/base/builder.sh @@ -89,9 +89,6 @@ cp ./etc/styles.js ./src/core/server/rendering/views/styles.js # Replace App Title sed -i "s|defaultValue: ''|defaultValue: \'Wazuh\'|g" ./src/core/server/opensearch_dashboards_config.js sed -i "90s|defaultValue: true|defaultValue: false|g" ./src/core/server/opensearch_dashboards_config.js -# Replace config path -sed -i "s'\$DIR/config'/etc/wazuh-dashboard'g" ./bin/opensearch-dashboards-keystore -sed -i "s'\$DIR/config'/etc/wazuh-dashboard'g" ./bin/opensearch-dashboards-plugin # Add fix to Node variables as Node is not using the NODE_OPTIONS environment variables sed -i 's/NODE_OPTIONS="$OSD_NODE_OPTS_PREFIX $OSD_NODE_OPTS $NODE_OPTIONS"/NODE_OPTIONS="$OSD_NODE_OPTS_PREFIX $OSD_NODE_OPTS $NODE_OPTIONS"\n/g' ./bin/use_node sed -i 's/exec "${NODE}"/NODE_ENV=production exec "${NODE}" ${NODE_OPTIONS} /g' ./bin/use_node From d97c95d2b4967574d25b59749e50ab456237dfbd Mon Sep 17 00:00:00 2001 From: Raul Del Pozo Moreno Date: Fri, 20 Oct 2023 00:45:33 +0200 Subject: [PATCH 07/19] Restore keystore sed --- stack/dashboard/deb/debian/rules | 4 ++++ stack/dashboard/rpm/wazuh-dashboard.spec | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/stack/dashboard/deb/debian/rules b/stack/dashboard/deb/debian/rules index d7c83be509..ee34c21978 100644 --- a/stack/dashboard/deb/debian/rules +++ b/stack/dashboard/deb/debian/rules @@ -59,6 +59,10 @@ override_dh_install: tar -xf $(DASHBOARD_FILE) + # Set custom config dir + sed -i 's/OSD_NODE_OPTS_PREFIX/OSD_PATH_CONF="\/etc\/wazuh-dashboard" OSD_NODE_OPTS_PREFIX/g' "wazuh-dashboard-base/bin/opensearch-dashboards" + sed -i 's/OSD_USE_NODE_JS_FILE_PATH/OSD_PATH_CONF="\/etc\/wazuh-dashboard" OSD_USE_NODE_JS_FILE_PATH/g' "wazuh-dashboard-base/bin/opensearch-dashboards-keystore" + mkdir -p $(TARGET_DIR)$(CONFIG_DIR) mkdir -p $(TARGET_DIR)$(INSTALLATION_DIR) mkdir -p $(TARGET_DIR)/etc/systemd/system diff --git a/stack/dashboard/rpm/wazuh-dashboard.spec b/stack/dashboard/rpm/wazuh-dashboard.spec index 1eac32416e..ddf2749809 100644 --- a/stack/dashboard/rpm/wazuh-dashboard.spec +++ b/stack/dashboard/rpm/wazuh-dashboard.spec @@ -55,6 +55,10 @@ useradd -g %{GROUP} %{USER} tar -xf %{DASHBOARD_FILE} +# Set custom config dir +sed -i 's/OSD_NODE_OPTS_PREFIX/OSD_PATH_CONF="\/etc\/wazuh-dashboard" OSD_NODE_OPTS_PREFIX/g' "wazuh-dashboard-base/bin/opensearch-dashboards" +sed -i 's/OSD_USE_NODE_JS_FILE_PATH/OSD_PATH_CONF="\/etc\/wazuh-dashboard" OSD_USE_NODE_JS_FILE_PATH/g' "wazuh-dashboard-base/bin/opensearch-dashboards-keystore" + # ----------------------------------------------------------------------------- %install From 4f085b721dc5444a1da581e5197e73d426335723 Mon Sep 17 00:00:00 2001 From: Raul Del Pozo Moreno Date: Fri, 20 Oct 2023 00:50:12 +0200 Subject: [PATCH 08/19] Changed Authorization to authorization to equate with OpenSearch Dashboard --- stack/dashboard/base/files/etc/opensearch_dashboards.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stack/dashboard/base/files/etc/opensearch_dashboards.yml b/stack/dashboard/base/files/etc/opensearch_dashboards.yml index ccdac621c6..538728402d 100644 --- a/stack/dashboard/base/files/etc/opensearch_dashboards.yml +++ b/stack/dashboard/base/files/etc/opensearch_dashboards.yml @@ -4,7 +4,7 @@ opensearch.hosts: https://localhost:9200 opensearch.ssl.verificationMode: certificate #opensearch.username: #opensearch.password: -opensearch.requestHeadersAllowlist: ["securitytenant","Authorization"] +opensearch.requestHeadersAllowlist: ["securitytenant","authorization"] opensearch_security.multitenancy.enabled: false opensearch_security.readonly_mode.roles: ["kibana_read_only"] server.ssl.enabled: true From 28bb4cf8d0536747501ccf1ce839b0c79d01d11b Mon Sep 17 00:00:00 2001 From: Raul Del Pozo Moreno Date: Mon, 23 Oct 2023 15:12:19 +0200 Subject: [PATCH 09/19] Improved %files section --- stack/dashboard/rpm/wazuh-dashboard.spec | 202 +++++++---------------- 1 file changed, 60 insertions(+), 142 deletions(-) diff --git a/stack/dashboard/rpm/wazuh-dashboard.spec b/stack/dashboard/rpm/wazuh-dashboard.spec index ddf2749809..ac83c1c94a 100644 --- a/stack/dashboard/rpm/wazuh-dashboard.spec +++ b/stack/dashboard/rpm/wazuh-dashboard.spec @@ -213,15 +213,17 @@ rm -fr %{buildroot} %files %defattr(-,%{USER},%{GROUP}) -%dir %attr(750, %{USER}, %{GROUP}) %{CONFIG_DIR} -%attr(0750, %{USER}, %{GROUP}) "/etc/default/wazuh-dashboard" -%config(noreplace) %attr(0640, %{USER}, %{GROUP}) "%{CONFIG_DIR}/opensearch_dashboards.yml" -%attr(440, %{USER}, %{GROUP}) %{INSTALL_DIR}/VERSION +%dir %attr(750, %{USER}, %{GROUP}) %{CONFIG_DIR} %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR} +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/node" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/node_modules" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/data" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/plugins" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/bin" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/config" %dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src" %dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/core" -%attr(-, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/core/*" %dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin" %dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/remove" %dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/list" @@ -241,7 +243,6 @@ rm -fr %{buildroot} %dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/optimize/bundles_route/__fixtures__/plugin" %dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/optimize/bundles_route/__fixtures__/plugin/foo" %dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/plugins" -%attr(-, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/plugins/* %dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli" %dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli/serve" %dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli/serve/integration_tests" @@ -260,153 +261,70 @@ rm -fr %{buildroot} %dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/config" %dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/keystore" %dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/ui" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/ui/apm" %dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/ui/ui_render" %dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/ui/ui_render/bootstrap" -%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/ui/apm" %dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/docs" -%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/node_modules" -%attr(-, %{USER}, %{GROUP}) "%{INSTALL_DIR}/node_modules/*" -%attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/node_modules/.yarn-integrity" -%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/node" + +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/*.json" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/*.yml" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/*.txt" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/*.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/*.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/remove/*.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/list/*.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/*.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/downloaders/*.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/__fixtures__/replies/*.zip" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/__fixtures__/replies/*.jpg" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_keystore/*.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_keystore/utils/*.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/setup_node_env/*.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/setup_node_env/root/*.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/setup_node_env/harden/*.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/optimize/*.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/optimize/bundles_route/*.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/optimize/bundles_route/__fixtures__/plugin/foo/*.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/optimize/bundles_route/__fixtures__/*.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli/*.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli/serve/*.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli/serve/integration_tests/__fixtures__/*.yml" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli/serve/integration_tests/__fixtures__/reload_logging_config/*.yml" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/lib/*.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/utils/*.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/*.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/logging/*.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/logging/rotate/*.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/core/*.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/i18n/*.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/i18n/localization/*.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/warnings/*.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/http/*.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/config/*.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/keystore/*.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/ui/*.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/ui/ui_render/*.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/ui/ui_render/bootstrap/*.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/ui/ui_render/bootstrap/*.hbs" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/ui/apm/*.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/docs/*.js" + %attr(-, %{USER}, %{GROUP}) "%{INSTALL_DIR}/node/*" -%attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/node/bin/node" -%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/data" -%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/plugins" +%attr(-, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/core/*" +%attr(-, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/plugins/* +%attr(-, %{USER}, %{GROUP}) "%{INSTALL_DIR}/node_modules/*" %attr(-, %{USER}, %{GROUP}) "%{INSTALL_DIR}/plugins/*" -%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/bin" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/remove/settings.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/remove/index.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/remove/remove.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/dev.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/list/index.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/list/list.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/lib/logger.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/lib/errors.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/lib/log_warnings.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/opensearch_dashboards.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/downloaders/file.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/downloaders/http.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/zip.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/download.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/install.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/settings.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/rename.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/index.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/__fixtures__/replies/invalid_name.zip" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/__fixtures__/replies/test_plugin_different_version.zip" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/__fixtures__/replies/banana.jpg" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/__fixtures__/replies/test_plugin_no_opensearch_dashboards.zip" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/__fixtures__/replies/test_plugin.zip" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/__fixtures__/replies/corrupt.zip" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/__fixtures__/replies/test_plugin_many.zip" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/cleanup.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/pack.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/progress.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/cli.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/dist.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_keystore/cli_keystore.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_keystore/add.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_keystore/create.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_keystore/utils/index.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_keystore/utils/prompt.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_keystore/dev.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_keystore/get_keystore.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_keystore/remove.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_keystore/dist.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_keystore/list.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/apm.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/setup_node_env/root/force.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/setup_node_env/root/is_root.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/setup_node_env/root/index.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/setup_node_env/polyfill.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/setup_node_env/node_version_validator.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/setup_node_env/index.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/setup_node_env/harden/index.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/setup_node_env/harden/child_process.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/setup_node_env/harden/lodash_template.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/setup_node_env/no_transpilation.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/setup_node_env/exit_on_warning.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/setup_node_env/dist.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/optimize/np_ui_plugin_public_dirs.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/optimize/index.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/optimize/optimize_mixin.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/optimize/bundles_route/proxy_bundles_route.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/optimize/bundles_route/file_hash.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/optimize/bundles_route/file_hash_cache.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/optimize/bundles_route/index.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/optimize/bundles_route/__fixtures__/plugin/foo/plugin.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/optimize/bundles_route/__fixtures__/outside_output.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/optimize/bundles_route/bundles_route.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/optimize/bundles_route/dynamic_asset_response.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli/command.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli/help.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli/cli.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli/serve/serve.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli/serve/read_keystore.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli/serve/integration_tests/__fixtures__/invalid_config.yml" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli/serve/integration_tests/__fixtures__/reload_logging_config/opensearch_dashboards_log_file.test.yml" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli/serve/integration_tests/__fixtures__/reload_logging_config/opensearch_dashboards_log_console.test.yml" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli/serve/integration_tests/__fixtures__/reload_logging_config/opensearch_dashboards.test.yml" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli/dist.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/utils/index.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/utils/unset.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/utils/version.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/utils/artifact_type.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/utils/deep_clone_with_buffers.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/logging/rotate/index.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/logging/rotate/log_rotator.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/logging/apply_filters_to_keys.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/logging/log_format.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/logging/log_reporter.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/logging/log_format_json.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/logging/log_with_metadata.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/logging/index.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/logging/configuration.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/logging/log_interceptor.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/logging/log_format_string.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/core/index.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/i18n/localization/index.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/i18n/localization/telemetry_localization_collector.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/i18n/localization/file_integrity.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/i18n/index.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/i18n/get_translations_path.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/i18n/constants.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/osd_server.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/warnings/index.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/http/index.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/http/register_hapi_plugins.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/http/setup_base_path_provider.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/config/override.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/config/complete.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/config/index.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/config/schema.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/config/config.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/keystore/keystore.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/keystore/index.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/keystore/errors.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/ui/ui_mixin.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/ui/ui_render/ui_render_mixin.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/ui/ui_render/index.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/ui/ui_render/bootstrap/osd_bundles_loader_source.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/ui/ui_render/bootstrap/index.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/ui/ui_render/bootstrap/template.js.hbs" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/ui/ui_render/bootstrap/app_bootstrap.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/ui/index.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/ui/apm/index.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/docs/docs_repo.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/docs/cli.js" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/package.json" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/manifest.yml" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/LICENSE.txt" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/NOTICE.txt" -%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/README.txt" + +%attr(440, %{USER}, %{GROUP}) "%{INSTALL_DIR}/VERSION" +%attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/node_modules/.yarn-integrity" %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/bin/use_node" %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/bin/opensearch-dashboards" %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/bin/opensearch-dashboards-plugin" %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/bin/opensearch-dashboards-keystore" -%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/config" +%attr(750, %{USER}, %{GROUP}) "/etc/default/wazuh-dashboard" %attr(640, %{USER}, %{GROUP}) "%{CONFIG_DIR}/node.options" %attr(640, root, root) "/etc/systemd/system/wazuh-dashboard.service" +%config(noreplace) %attr(640, %{USER}, %{GROUP}) "%{CONFIG_DIR}/opensearch_dashboards.yml" %changelog * Fri Dec 15 2023 support - 4.8.0 From 7a51a26ecfe72619d3eaf5b7bb041349486e830a Mon Sep 17 00:00:00 2001 From: Raul Del Pozo Moreno Date: Mon, 23 Oct 2023 16:16:50 +0200 Subject: [PATCH 10/19] Fixed binaries sed --- stack/dashboard/deb/debian/rules | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/stack/dashboard/deb/debian/rules b/stack/dashboard/deb/debian/rules index ee34c21978..6b4bcbb1ec 100644 --- a/stack/dashboard/deb/debian/rules +++ b/stack/dashboard/deb/debian/rules @@ -58,10 +58,8 @@ override_dh_install: useradd -g $(GROUP) $(USER) tar -xf $(DASHBOARD_FILE) - - # Set custom config dir - sed -i 's/OSD_NODE_OPTS_PREFIX/OSD_PATH_CONF="\/etc\/wazuh-dashboard" OSD_NODE_OPTS_PREFIX/g' "wazuh-dashboard-base/bin/opensearch-dashboards" - sed -i 's/OSD_USE_NODE_JS_FILE_PATH/OSD_PATH_CONF="\/etc\/wazuh-dashboard" OSD_USE_NODE_JS_FILE_PATH/g' "wazuh-dashboard-base/bin/opensearch-dashboards-keystore" + sed -i 's/OSD_NODE_OPTS_PREFIX/OSD_PATH_CONF="\/etc\/wazuh-dashboard" OSD_NODE_OPTS_PREFIX/g' "wazuh-dashboard-base/bin/opensearch-dashboards" + sed -i 's/OSD_USE_NODE_JS_FILE_PATH/OSD_PATH_CONF="\/etc\/wazuh-dashboard" OSD_USE_NODE_JS_FILE_PATH/g' "wazuh-dashboard-base/bin/opensearch-dashboards-keystore" mkdir -p $(TARGET_DIR)$(CONFIG_DIR) mkdir -p $(TARGET_DIR)$(INSTALLATION_DIR) From 3e0901d3a8f84f83ede9da1915f8d74f41320965 Mon Sep 17 00:00:00 2001 From: Raul Del Pozo Moreno Date: Mon, 23 Oct 2023 16:18:27 +0200 Subject: [PATCH 11/19] Added missing end line --- stack/dashboard/base/files/etc/services/default | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stack/dashboard/base/files/etc/services/default b/stack/dashboard/base/files/etc/services/default index 946d725967..250239f4c8 100644 --- a/stack/dashboard/base/files/etc/services/default +++ b/stack/dashboard/base/files/etc/services/default @@ -5,4 +5,4 @@ chdir="/" nice="" KILL_ON_STOP_TIMEOUT=0 -OSD_PATH_CONF="/etc/wazuh-dashboard" \ No newline at end of file +OSD_PATH_CONF="/etc/wazuh-dashboard" From c85e0f02a0c743755cbd9a853e99e92f4613d8ef Mon Sep 17 00:00:00 2001 From: Antonio <34042064+Desvelao@users.noreply.github.com> Date: Mon, 23 Oct 2023 17:05:39 +0200 Subject: [PATCH 12/19] Modify the side menu and remove the mlCommonsDashboards plugin on Wazuh dashboard (#2540) * feat(wazuh-dashboard): replace default application to /app/wz-home (#2497) * Change the category of built-in applications on Wazuh dashboard (#2496) * feat(wazuh-dashboard): Change the category of built-in applications * feat(wazuh-dashboard): change order value to Explore app category * feat(wazuh-dashboard): change name to Management category * feat: replace order for built-in applications * feat(dashboard): replace icon for Explore app category * fix(dahsboard): icon for Explore app category * feat(dashboard): avoid the registration of Overview application of Management category and minor fixes * fix(dashbord): comment * fix: remove comment * feat(dashboard): remove mlCommonsDashboards plugin --- stack/dashboard/base/builder.sh | 107 +++++++++++++++++- .../base/files/etc/opensearch_dashboards.yml | 2 +- 2 files changed, 107 insertions(+), 2 deletions(-) diff --git a/stack/dashboard/base/builder.sh b/stack/dashboard/base/builder.sh index 613aa4f922..aeca4c57a8 100755 --- a/stack/dashboard/base/builder.sh +++ b/stack/dashboard/base/builder.sh @@ -93,7 +93,7 @@ sed -i "90s|defaultValue: true|defaultValue: false|g" ./src/core/server/opensear sed -i 's/NODE_OPTIONS="$OSD_NODE_OPTS_PREFIX $OSD_NODE_OPTS $NODE_OPTIONS"/NODE_OPTIONS="$OSD_NODE_OPTS_PREFIX $OSD_NODE_OPTS $NODE_OPTIONS"\n/g' ./bin/use_node sed -i 's/exec "${NODE}"/NODE_ENV=production exec "${NODE}" ${NODE_OPTIONS} /g' ./bin/use_node # Replace the redirection to `home` in the header logo -sed -i "s'/app/home'/app/wazuh'g" ./src/core/target/public/core.entry.js +sed -i "s'/app/home'/app/wz-home'g" ./src/core/target/public/core.entry.js # Replace others redirections to `home` sed -i 's/navigateToApp("home")/navigateToApp("wazuh")/g' ./src/core/target/public/core.entry.js # Changed from Opensearch Documentation links to Wazuh Documentation @@ -143,6 +143,110 @@ brotli -c ./plugins/securityDashboards/target/public/securityDashboards.plugin.j # Generate compressed files gzip -c ./plugins/securityDashboards/target/public/securityDashboards.chunk.5.js > ./plugins/securityDashboards/target/public/securityDashboards.chunk.5.js.gz brotli -c ./plugins/securityDashboards/target/public/securityDashboards.chunk.5.js > ./plugins/securityDashboards/target/public/securityDashboards.chunk.5.js.br + +# Define categories +category_explore='{id:"explore",label:"Explore",order:500,euiIconType:"search"}' +category_dashboard_management='{id:"management",label:"Indexer/dashboard Management",order:5e3,euiIconType:"managementApp"}' + +# Add custom categories (explore) to the built-in +sed -i -e "s|DEFAULT_APP_CATEGORIES=Object.freeze({|DEFAULT_APP_CATEGORIES=Object.freeze({explore:${category_explore},|" ./src/core/target/public/core.entry.js + +# Replace management built-in app category +sed -i -e "s|management:{id:\"management\",label:external_osdSharedDeps_OsdI18n_\[\"i18n\"\].translate(\"core.ui.managementNavList.label\",{defaultMessage:\"Management\"}),order:5e3,euiIconType:\"managementApp\"}|management:${category_dashboard_management}|" ./src/core/target/public/core.entry.js + +# Replace app category to Discover app +sed -i -e 's|category:core_public_\["DEFAULT_APP_CATEGORIES"\].opensearchDashboards|category:core_public_["DEFAULT_APP_CATEGORIES"].explore|' ./src/plugins/discover/target/public/discover.plugin.js + +# Replace app category to Dashboard app +sed -i -e 's|category:core_public_\["DEFAULT_APP_CATEGORIES"\].opensearchDashboards|category:core_public_["DEFAULT_APP_CATEGORIES"].explore|' ./src/plugins/dashboard/target/public/dashboard.plugin.js + +# Replace app category to Visualize app +sed -i -e 's|category:core_public_\["DEFAULT_APP_CATEGORIES"\].opensearchDashboards|category:core_public_["DEFAULT_APP_CATEGORIES"].explore|' ./src/plugins/visualize/target/public/visualize.plugin.js + +# Replace app category to Reporting app +sed -i -e "s|category:{id:\"opensearch\",label:_i18n.i18n.translate(\"opensearch.reports.categoryName\",{defaultMessage:\"OpenSearch Plugins\"}),order:2e3}|category:${category_explore}|" ./plugins/reportsDashboards/target/public/reportsDashboards.plugin.js + +# Replace app category to Alerting app +sed -i -e "s|category:{id:\"opensearch\",label:\"OpenSearch Plugins\",order:2e3}|category:${category_explore}|" ./plugins/alertingDashboards/target/public/alertingDashboards.plugin.js + +# Replace app category to Maps app +sed -i -e "s|category:{id:\"opensearch\",label:\"OpenSearch Plugins\",order:2e3}|category:${category_explore}|" ./plugins/customImportMapDashboards/target/public/customImportMapDashboards.plugin.js + +# Replace app category to Notifications app +sed -i -e "s|category:DEFAULT_APP_CATEGORIES.management|category:${category_explore}|" ./plugins/notificationsDashboards/target/public/notificationsDashboards.plugin.js + +# Replace app category to Index Management app +sed -i -e "s|category:DEFAULT_APP_CATEGORIES.management|category:${category_dashboard_management}|g" ./plugins/indexManagementDashboards/target/public/indexManagementDashboards.plugin.js + +# Replace app category to Dev Tools app +sed -i -e "s|category:public_["DEFAULT_APP_CATEGORIES"].management|category:${category_dashboard_management}|g" ./src/plugins/dev_tools/target/public/devTools.plugin.js + +# Replace app category to Dashboards Management (Stack management) app +sed -i -e "s|category:public_["DEFAULT_APP_CATEGORIES"].management|category:${category_dashboard_management}|g" ./src/plugins/management/target/public/management.plugin.js + +# Replace app category to Security app +sed -i -e "s|category:DEFAULT_APP_CATEGORIES.management|category:${category_dashboard_management}|g" ./plugins/securityDashboards/target/public/securityDashboards.plugin.js + +# Replace app order to Discover app +app_order_discover=1000 +sed -i -e "s|order:1e3|order:${app_order_discover}|g" ./src/plugins/discover/target/public/discover.plugin.js + +# Replace app order to Dashboard app +app_order_dashboard=1010 +sed -i -e "s|order:2500|order:${app_order_dashboard}|g" ./src/plugins/dashboard/target/public/dashboard.plugin.js + +# Replace app order to Visualize app +app_order_visualize=1020 +sed -i -e "s|order:8e3|order:${app_order_visualize}|g" ./src/plugins/visualize/target/public/visualize.plugin.js + +# Replace app order to Dev tools app +app_order_dev_tools=9010 +sed -i -e "s|order:9070|order:${app_order_dev_tools}|g" ./src/plugins/dev_tools/target/public/devTools.plugin.js + +# Replace app order to Dashboard management app +app_order_dashboard_management=9020 +sed -i -e "s|order:9030|order:${app_order_dashboard_management}|g" ./src/plugins/management/target/public/management.plugin.js + +# Replace app order to Security app +app_order_security=9030 +sed -i -e "s|order:9050|order:${app_order_security}|g" ./plugins/securityDashboards/target/public/securityDashboards.plugin.js + +# Replace app order to Index management app +app_order_index_management=9040 +sed -i -e "s|order:9010|order:${app_order_index_management}|g" ./plugins/indexManagementDashboards/target/public/indexManagementDashboards.plugin.js + +# Replace app order to Snapshot management app +app_order_snapshot_management=9050 +sed -i -e "s|order:9020|order:${app_order_snapshot_management}|g" ./plugins/indexManagementDashboards/target/public/indexManagementDashboards.plugin.js + +# Avoid the management Overview application is registered to feature catalogue +sed -i -e "s|home.featureCatalogue|false \&\& home.featureCatalogue|g" ./src/plugins/management_overview/target/public/managementOverview.plugin.js + +# Avoid the management Overview application is registered (appear on side menu) +sed -i -e "s|application.register|false \&\& application.register|g" ./src/plugins/management_overview/target/public/managementOverview.plugin.js + +files_to_recreate=( + ./src/core/target/public/core.entry.js + ./src/plugins/discover/target/public/discover.plugin.js + ./src/plugins/dashboard/target/public/dashboard.plugin.js + ./src/plugins/visualize/target/public/visualize.plugin.js + ./plugins/reportsDashboards/target/public/reportsDashboards.plugin.js + ./plugins/alertingDashboards/target/public/alertingDashboards.plugin.js + ./plugins/customImportMapDashboards/target/public/customImportMapDashboards.plugin.js + ./plugins/notificationsDashboards/target/public/notificationsDashboards.plugin.js + ./plugins/indexManagementDashboards/target/public/indexManagementDashboards.plugin.js + ./src/plugins/dev_tools/target/public/devTools.plugin.js + ./src/plugins/management/target/public/management.plugin.js + ./plugins/securityDashboards/target/public/securityDashboards.plugin.js + ./src/plugins/management_overview/target/public/managementOverview.plugin.js +) + +for value in "${files_to_recreate[@]}" +do + gzip -c "$value" > "$value.gz" + brotli -c "$value" > "$value.br" +done + # Add VERSION file cp /root/VERSION . # Add exception for wazuh plugin install @@ -164,6 +268,7 @@ mv ./package.json.tmp ./package.json /bin/bash ./bin/opensearch-dashboards-plugin remove observabilityDashboards --allow-root /bin/bash ./bin/opensearch-dashboards-plugin remove securityAnalyticsDashboards --allow-root /bin/bash ./bin/opensearch-dashboards-plugin remove searchRelevanceDashboards --allow-root +/bin/bash ./bin/opensearch-dashboards-plugin remove mlCommonsDashboards --allow-root find -type d -exec chmod 750 {} \; find -type f -perm 644 -exec chmod 640 {} \; diff --git a/stack/dashboard/base/files/etc/opensearch_dashboards.yml b/stack/dashboard/base/files/etc/opensearch_dashboards.yml index 538728402d..b5a48982de 100644 --- a/stack/dashboard/base/files/etc/opensearch_dashboards.yml +++ b/stack/dashboard/base/files/etc/opensearch_dashboards.yml @@ -11,5 +11,5 @@ 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/wazuh +uiSettings.overrides.defaultRoute: /app/wz-home From 340b9c9a7d15b1910c1d274b6c6b35d4c365d10b Mon Sep 17 00:00:00 2001 From: Antonio <34042064+Desvelao@users.noreply.github.com> Date: Wed, 25 Oct 2023 16:50:42 +0200 Subject: [PATCH 13/19] fix: header button navigation to home application (wz-home) (#2556) --- stack/dashboard/base/builder.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/stack/dashboard/base/builder.sh b/stack/dashboard/base/builder.sh index aeca4c57a8..77e626ddef 100755 --- a/stack/dashboard/base/builder.sh +++ b/stack/dashboard/base/builder.sh @@ -92,10 +92,12 @@ sed -i "90s|defaultValue: true|defaultValue: false|g" ./src/core/server/opensear # Add fix to Node variables as Node is not using the NODE_OPTIONS environment variables sed -i 's/NODE_OPTIONS="$OSD_NODE_OPTS_PREFIX $OSD_NODE_OPTS $NODE_OPTIONS"/NODE_OPTIONS="$OSD_NODE_OPTS_PREFIX $OSD_NODE_OPTS $NODE_OPTIONS"\n/g' ./bin/use_node sed -i 's/exec "${NODE}"/NODE_ENV=production exec "${NODE}" ${NODE_OPTIONS} /g' ./bin/use_node +# Replace the redirections to home app +app_home='wz-home' # Replace the redirection to `home` in the header logo -sed -i "s'/app/home'/app/wz-home'g" ./src/core/target/public/core.entry.js +sed -i "s'/app/home'/app/${app_home}'g" ./src/core/target/public/core.entry.js # Replace others redirections to `home` -sed -i 's/navigateToApp("home")/navigateToApp("wazuh")/g' ./src/core/target/public/core.entry.js +sed -i "s/navigateToApp(\"home\")/navigateToApp(\"${app_home}\")/g" ./src/core/target/public/core.entry.js # Changed from Opensearch Documentation links to Wazuh Documentation # Help menu ## Help header - Version From 376b9bb780658710e20344f1ef70b890790b86bf Mon Sep 17 00:00:00 2001 From: Raul Del Pozo Moreno Date: Thu, 26 Oct 2023 01:15:43 +0200 Subject: [PATCH 14/19] Improved customizations and adapted OpenSearch internal changes --- stack/dashboard/base/builder.sh | 170 +++++++++++++++++++++----------- 1 file changed, 113 insertions(+), 57 deletions(-) diff --git a/stack/dashboard/base/builder.sh b/stack/dashboard/base/builder.sh index 77e626ddef..caf9f67e36 100755 --- a/stack/dashboard/base/builder.sh +++ b/stack/dashboard/base/builder.sh @@ -8,7 +8,7 @@ # License (version 2) as published by the FSF - Free Software # Foundation. -set -e +set -ex # Script parameters to build the package architecture="$1" @@ -19,6 +19,8 @@ reference="$5" opensearch_version="2.10.0" base_dir=/opt/wazuh-dashboard-base +# ----------------------------------------------------------------------------- +# Set environment # ----------------------------------------------------------------------------- if [ -z "${revision}" ]; then @@ -42,7 +44,7 @@ if [ "${future}" = "yes" ];then fi wazuh_minor=$(echo ${version} | cut -c1-3) -# Obtain Wazuh plugin URL +# Obtain the Wazuh plugin URL if [ "${repository}" ];then valid_url='(https?|ftp|file)://[-[:alnum:]\+&@#/%?=~_|!:,.;]*[-[:alnum:]\+&@#/%=~_|]' if [[ $repository =~ $valid_url ]];then @@ -58,11 +60,14 @@ else url="https://packages-dev.wazuh.com/pre-release/ui/dashboard/wazuh-${version}-${revision}.zip" fi -# ----------------------------------------------------------------------------- - +# Set directories mkdir -p /tmp/output cd /opt +# ----------------------------------------------------------------------------- +# Install OpenSeach Dashboards +# ----------------------------------------------------------------------------- + curl -sL https://artifacts.opensearch.org/releases/bundle/opensearch-dashboards/"${opensearch_version}"/opensearch-dashboards-"${opensearch_version}"-linux-${architecture}.tar.gz | tar xz pip3 install pathfix.py @@ -74,31 +79,64 @@ cd "${base_dir}" find -type l -exec rm -rf {} \; rm -rf ./config/* cp -r /root/stack/dashboard/base/files/etc ./ + +# ----------------------------------------------------------------------------- +# OpenSeach Dashboards Node fixes +# ----------------------------------------------------------------------------- + +# Add fix to Node variables as Node is not using the NODE_OPTIONS environment variables +sed -i 's/NODE_OPTIONS="$OSD_NODE_OPTS_PREFIX $OSD_NODE_OPTS $NODE_OPTIONS"/NODE_OPTIONS="$OSD_NODE_OPTS_PREFIX $OSD_NODE_OPTS $NODE_OPTIONS"\n/g' ./bin/use_node +sed -i 's/exec "${NODE}"/NODE_ENV=production exec "${NODE}" ${NODE_OPTIONS} /g' ./bin/use_node + +# ----------------------------------------------------------------------------- +# Provision data (SVG, Styles) +# ----------------------------------------------------------------------------- + +# Styles cp ./etc/custom_welcome/template.js.hbs ./src/legacy/ui/ui_render/bootstrap/template.js.hbs cp ./etc/custom_welcome/light_theme.style.css ./src/core/server/core_app/assets/legacy_light_theme.css -cp ./etc/custom_welcome/*svg ./src/core/server/core_app/assets/ -cp ./etc/custom_welcome/Assets/default_branding/logo_full_alpha.svg ./src/core/server/core_app/assets/default_branding/opensearch_logo_default_mode.svg -cp ./etc/custom_welcome/Assets/default_branding/logo_full_alpha.svg ./src/core/server/core_app/assets/default_branding/opensearch_logo_dark_mode.svg -cp ./etc/custom_welcome/Assets/default_branding/home.svg ./src/core/server/core_app/assets/default_branding/ -cp ./etc/custom_welcome/Assets/default_branding/home_dark_mode.svg ./src/core/server/core_app/assets/default_branding/ +# SVG +cp ./etc/custom_welcome/*svg ./src/core/server/core_app/assets/logos/ +# Copy Home button +cp ./etc/custom_welcome/Assets/default_branding/home.svg ./src/core/server/core_app/assets/logos/ +cp ./etc/custom_welcome/Assets/default_branding/home_dark_mode.svg ./src/core/server/core_app/assets/logos/ +# Copy favicons cp ./etc/custom_welcome/Assets/Favicons/* ./src/core/server/core_app/assets/favicons/ cp ./etc/custom_welcome/Assets/Favicons/favicon.ico ./src/core/server/core_app/assets/favicons/favicon.ico +# Copy loaders cp ./etc/http_service.js ./src/core/server/http/http_service.js cp ./etc/template.js ./src/core/server/rendering/views/template.js cp ./etc/styles.js ./src/core/server/rendering/views/styles.js + +# ----------------------------------------------------------------------------- +# Customize OpenSearch Dashboards with Wazuh +# ----------------------------------------------------------------------------- + # Replace App Title sed -i "s|defaultValue: ''|defaultValue: \'Wazuh\'|g" ./src/core/server/opensearch_dashboards_config.js sed -i "90s|defaultValue: true|defaultValue: false|g" ./src/core/server/opensearch_dashboards_config.js -# Add fix to Node variables as Node is not using the NODE_OPTIONS environment variables -sed -i 's/NODE_OPTIONS="$OSD_NODE_OPTS_PREFIX $OSD_NODE_OPTS $NODE_OPTIONS"/NODE_OPTIONS="$OSD_NODE_OPTS_PREFIX $OSD_NODE_OPTS $NODE_OPTIONS"\n/g' ./bin/use_node -sed -i 's/exec "${NODE}"/NODE_ENV=production exec "${NODE}" ${NODE_OPTIONS} /g' ./bin/use_node -# Replace the redirections to home app -app_home='wz-home' -# Replace the redirection to `home` in the header logo -sed -i "s'/app/home'/app/${app_home}'g" ./src/core/target/public/core.entry.js -# Replace others redirections to `home` -sed -i "s/navigateToApp(\"home\")/navigateToApp(\"${app_home}\")/g" ./src/core/target/public/core.entry.js -# Changed from Opensearch Documentation links to Wazuh Documentation + +## Remove OpenSearch from the upper bar with empty svg +cp ./etc/custom_welcome/Assets/default_branding/logo_full_alpha.svg ./src/core/server/core_app/assets/logos/opensearch_dashboards.svg +cp ./etc/custom_welcome/Assets/default_branding/logo_full_alpha.svg ./src/core/server/core_app/assets/logos/opensearch_dashboards_on_light.svg +cp ./etc/custom_welcome/Assets/default_branding/logo_full_alpha.svg ./src/core/server/core_app/assets/logos/opensearch_dashboards_on_darke.svg + +# Remove the `home` button from the sidebar menu +sed -i 's|\["EuiHorizontalRule"\],{margin:"none"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_\["EuiFlexItem"\],{grow:false,style:{flexShrink:0}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_\["EuiCollapsibleNavGroup"\]|["EuiHorizontalRule"],{margin:"none"})),false\&\&external_osdSharedDeps_React_default.a.createElem(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false,style:{flexShrink:0}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCollapsibleNavGroup"]|' ./src/core/target/public/core.entry.js + +# Remove OpenSearch login default configuration title and subtitle +sed -i 's|Log in to OpenSearch Dashboards||g' ./plugins/securityDashboards/server/index.js +sed -i 's|Log in to OpenSearch Dashboards||g' ./plugins/securityDashboards/target/public/securityDashboards.chunk.5.js +sed -i 's|If you have forgotten your username or password, contact your system administrator.||g' ./plugins/securityDashboards/server/index.js +sed -i 's|If you have forgotten your username or password, contact your system administrator.||g' ./plugins/securityDashboards/target/public/securityDashboards.chunk.5.js + +# Disable first-time pop-up tenant selector +sed -i 's|setShouldShowTenantPopup(shouldShowTenantPopup)|setShouldShowTenantPopup(false)|g' ./plugins/securityDashboards/target/public/securityDashboards.plugin.js + +# Remove the Overview plugin from the OpenSearch Dashboards menu. +# Remove the "updater" property and set the plugin "status" as inaccessible (status:1) +sed -i 's|updater\$:appUpdater\$|status:1|' ./src/plugins/opensearch_dashboards_overview/target/public/opensearchDashboardsOverview.plugin.js + # Help menu ## Help header - Version sed -i 's|"core.ui.chrome.headerGlobalNav.helpMenuVersion",defaultMessage:"v {version}"|"core.ui.chrome.headerGlobalNav.helpMenuVersion",defaultMessage:"v'${version}'"|' ./src/core/target/public/core.entry.js @@ -108,43 +146,44 @@ sed -i 's|href:opensearchDashboardsDocLink,|href:"https://documentation.wazuh.co ## Help link - Ask OpenSearch sed -i 's|Ask OpenSearch|Ask Wazuh|' ./src/core/target/public/core.entry.js sed -i 's|OPENSEARCH_DASHBOARDS_ASK_OPENSEARCH_LINK="https://github.com/opensearch-project"|OPENSEARCH_DASHBOARDS_ASK_OPENSEARCH_LINK="https://wazuh.com/community/join-us-on-slack"|' ./src/core/target/public/core.entry.js +## Help link - Community +sed -i 's|OPENSEARCH_DASHBOARDS_ASK_OPENSEARCH_LINK="https://forum.opensearch.org/"|OPENSEARCH_DASHBOARDS_ASK_OPENSEARCH_LINK="https://wazuh.com/community/join-us-on-slack"|' ./src/core/target/public/core.entry.js +sed -i 's|OPENSEARCH_DASHBOARDS_ASK_OPENSEARCH_LINK="https://forum.opensearch.org/"|OPENSEARCH_DASHBOARDS_ASK_OPENSEARCH_LINK="https://wazuh.com/community/join-us-on-slack"|' ./plugins/alertingDashboards/target/public/alertingDashboards.plugin.js +sed -i 's|OPENSEARCH_DASHBOARDS_ASK_OPENSEARCH_LINK="https://forum.opensearch.org/"|OPENSEARCH_DASHBOARDS_ASK_OPENSEARCH_LINK="https://wazuh.com/community/join-us-on-slack"|' ./plugins/indexManagementDashboards/target/public/indexManagementDashboards.plugin.js +sed -i 's|OPENSEARCH_DASHBOARDS_ASK_OPENSEARCH_LINK="https://forum.opensearch.org/"|OPENSEARCH_DASHBOARDS_ASK_OPENSEARCH_LINK="https://wazuh.com/community/join-us-on-slack"|' ./plugins/notificationsDashboards/target/public/notificationsDashboards.plugin.js +sed -i 's|OPENSEARCH_DASHBOARDS_ASK_OPENSEARCH_LINK="https://forum.opensearch.org/"|OPENSEARCH_DASHBOARDS_ASK_OPENSEARCH_LINK="https://wazuh.com/community/join-us-on-slack"|' ./plugins/securityDashboards/target/public/securityDashboards.plugin.js ## Help link - Give feedback -sed -i 's|OPENSEARCH_DASHBOARDS_FEEDBACK_LINK="https://github.com/opensearch-project"|OPENSEARCH_DASHBOARDS_FEEDBACK_LINK="https://wazuh.com/community/join-us-on-slack"|' ./src/core/target/public/core.entry.js +sed -i 's|https://survey.opensearch.org|https://wazuh.com/community/join-us-on-slack|' src/core/server/opensearch_dashboards_config.js ## Help link - Open an issue in GitHub sed -i 's|GITHUB_CREATE_ISSUE_LINK="https://github.com/opensearch-project/OpenSearch-Dashboards/issues/new/choose"|GITHUB_CREATE_ISSUE_LINK="https://github.com/wazuh/wazuh/issues/new/choose"|' ./src/core/target/public/core.entry.js -# Replace home logo -sed -i 's|DEFAULT_MARK="opensearch_mark_default_mode.svg"|DEFAULT_MARK="home.svg"|g' ./src/core/target/public/core.entry.js -sed -i 's|DEFAULT_DARK_MARK="opensearch_mark_dark_mode.svg"|DEFAULT_DARK_MARK="home_dark_mode.svg"|g' ./src/core/target/public/core.entry.js -# Build the compressed files -gzip -c ./src/core/target/public/core.entry.js > ./src/core/target/public/core.entry.js.gz -brotli -c ./src/core/target/public/core.entry.js > ./src/core/target/public/core.entry.js.br -# Remove Overview plugin from the OpenSearch Dashboards menu. -# Remove "updater" property and set the plugin "status" as inaccesible (status:1) -sed -i 's|updater\$:appUpdater\$|status:1|' ./src/plugins/opensearch_dashboards_overview/target/public/opensearchDashboardsOverview.plugin.js -gzip -c ./src/plugins/opensearch_dashboards_overview/target/public/opensearchDashboardsOverview.plugin.js > ./src/plugins/opensearch_dashboards_overview/target/public/opensearchDashboardsOverview.plugin.js.gz -brotli -c ./src/plugins/opensearch_dashboards_overview/target/public/opensearchDashboardsOverview.plugin.js > ./src/plugins/opensearch_dashboards_overview/target/public/opensearchDashboardsOverview.plugin.js.br -# Remove `home` button from the sidebar menu -sed -i 's|\["EuiHorizontalRule"\],{margin:"none"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_\["EuiFlexItem"\],{grow:false,style:{flexShrink:0}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_\["EuiCollapsibleNavGroup"\]|["EuiHorizontalRule"],{margin:"none"})),false\&\&external_osdSharedDeps_React_default.a.createElem(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false,style:{flexShrink:0}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCollapsibleNavGroup"]|' ./src/core/target/public/core.entry.js -# Replace OpenSearch login default configuration title with Wazuh login title text -sed -i 's|Log in to OpenSearch Dashboards||g' ./plugins/securityDashboards/server/index.js -sed -i 's|If you have forgotten your username or password, contact your system administrator.||g' ./plugins/securityDashboards/server/index.js -# Replace OpenSearch login logo with Wazuh login logo -sed -i 's|opensearch_logo_h_default.a|"/ui/Wazuh-Logo.svg"|g' ./plugins/securityDashboards/target/public/securityDashboards.chunk.5.js -# Replace OpenSearch login title with Wazuh login title -sed -i 's|Log in to OpenSearch Dashboards||g' ./plugins/securityDashboards/target/public/securityDashboards.chunk.5.js -# Replace OpenSearch login subtitle with Wazuh login subtitle -sed -i 's|If you have forgotten your username or password, contact your system administrator.||g' ./plugins/securityDashboards/target/public/securityDashboards.chunk.5.js -# Disable first time pop-up tenant selector -sed -i 's|setShouldShowTenantPopup(shouldShowTenantPopup)|setShouldShowTenantPopup(false)|g' ./plugins/securityDashboards/target/public/securityDashboards.plugin.js -# Replace home logo -sed -i 's|DEFAULT_MARK="opensearch_mark_default_mode.svg"|DEFAULT_MARK="home.svg"|g' ./plugins/securityDashboards/target/public/securityDashboards.plugin.js -sed -i 's|DEFAULT_DARK_MARK="opensearch_mark_dark_mode.svg"|DEFAULT_DARK_MARK="home_dark_mode.svg"|g' ./plugins/securityDashboards/target/public/securityDashboards.plugin.js -gzip -c ./plugins/securityDashboards/target/public/securityDashboards.plugin.js > ./plugins/securityDashboards/target/public/securityDashboards.plugin.js.gz -brotli -c ./plugins/securityDashboards/target/public/securityDashboards.plugin.js > ./plugins/securityDashboards/target/public/securityDashboards.plugin.js.br -# Generate compressed files -gzip -c ./plugins/securityDashboards/target/public/securityDashboards.chunk.5.js > ./plugins/securityDashboards/target/public/securityDashboards.chunk.5.js.gz -brotli -c ./plugins/securityDashboards/target/public/securityDashboards.chunk.5.js > ./plugins/securityDashboards/target/public/securityDashboards.chunk.5.js.br +# Custom logos +## Custom logos - Home button logo +sed -i 's|MARK_THEMED="ui/logos/opensearch_mark.svg"|MARK_THEMED="ui/logos/home.svg"|g' ./src/core/target/public/core.entry.js +sed -i 's|MARK_ON_LIGHT="ui/logos/opensearch_mark_on_light.svg"|MARK_ON_LIGHT="ui/logos/home.svg"|g' ./src/core/target/public/core.entry.js +sed -i 's|MARK_ON_DARK="ui/logos/opensearch_mark_on_dark.svg"|MARK_ON_DARK="ui/logos/home_dark_mode.svg"|g' ./src/core/target/public/core.entry.js +sed -i 's|MARK_THEMED="ui/logos/opensearch_mark.svg"|MARK_THEMED="ui/logos/home.svg"|g' ./plugins/securityDashboards/target/public/securityDashboards.plugin.js +sed -i 's|MARK_ON_LIGHT="ui/logos/opensearch_mark_on_light.svg"|MARK_ON_LIGHT="ui/logos/home.svg"|g' ./plugins/securityDashboards/target/public/securityDashboards.plugin.js +sed -i 's|MARK_ON_DARK="ui/logos/opensearch_mark_on_dark.svg"|MARK_ON_DARK="ui/logos/home_dark_mode.svg"|g' ./plugins/securityDashboards/target/public/securityDashboards.plugin.js +## Custom logos - Login logo +sed -i 's|OPENSEARCH_ON_LIGHT="ui/logos/opensearch_on_light.svg"|OPENSEARCH_ON_LIGHT="ui/logos/Wazuh-Logo.svg"|g' ./plugins/alertingDashboards/target/public/alertingDashboards.plugin.js +sed -i 's|OPENSEARCH_ON_DARK="ui/logos/opensearch_on_dark.svg"|OPENSEARCH_ON_DARK="ui/logos/Wazuh-Logo.svg"|g' ./plugins/alertingDashboards/target/public/alertingDashboards.plugin.js +sed -i 's|OPENSEARCH_ON_LIGHT="ui/logos/opensearch_on_light.svg"|OPENSEARCH_ON_LIGHT="ui/logos/Wazuh-Logo.svg"|g' ./plugins/indexManagementDashboards/target/public/indexManagementDashboards.plugin.js +sed -i 's|OPENSEARCH_ON_DARK="ui/logos/opensearch_on_dark.svg"|OPENSEARCH_ON_DARK="ui/logos/Wazuh-Logo.svg"|g' ./plugins/indexManagementDashboards/target/public/indexManagementDashboards.plugin.js +sed -i 's|OPENSEARCH_ON_LIGHT="ui/logos/opensearch_on_light.svg"|OPENSEARCH_ON_LIGHT="ui/logos/Wazuh-Logo.svg"|g' ./plugins/notificationsDashboards/target/public/notificationsDashboards.plugin.js +sed -i 's|OPENSEARCH_ON_DARK="ui/logos/opensearch_on_dark.svg"|OPENSEARCH_ON_DARK="ui/logos/Wazuh-Logo.svg"|g' ./plugins/notificationsDashboards/target/public/notificationsDashboards.plugin.js +sed -i 's|OPENSEARCH_ON_LIGHT="ui/logos/opensearch_on_light.svg"|OPENSEARCH_ON_LIGHT="ui/logos/Wazuh-Logo.svg"|g' ./plugins/securityDashboards/target/public/securityDashboards.plugin.js +sed -i 's|OPENSEARCH_ON_DARK="ui/logos/opensearch_on_dark.svg"|OPENSEARCH_ON_DARK="ui/logos/Wazuh-Logo.svg"|g' ./plugins/securityDashboards/target/public/securityDashboards.plugin.js +sed -i 's|OPENSEARCH_ON_LIGHT="ui/logos/opensearch_on_light.svg"|OPENSEARCH_ON_LIGHT="ui/logos/Wazuh-Logo.svg"|g' ./src/core/target/public/core.entry.js +sed -i 's|OPENSEARCH_ON_DARK="ui/logos/opensearch_on_dark.svg"|OPENSEARCH_ON_DARK="ui/logos/Wazuh-Logo.svg"|g' ./src/core/target/public/core.entry.js + +# Redirections +## Redirections - Replace the redirections to the home app +app_home='wz-home' +## Redirections - Replace the redirection to `home` in the header logo +sed -i "s'/app/home'/app/${app_home}'g" ./src/core/target/public/core.entry.js +## Redirections - Replace others redirections to `home` +sed -i "s/navigateToApp(\"home\")/navigateToApp(\"${app_home}\")/g" ./src/core/target/public/core.entry.js # Define categories category_explore='{id:"explore",label:"Explore",order:500,euiIconType:"search"}' @@ -177,7 +216,7 @@ sed -i -e "s|category:{id:\"opensearch\",label:\"OpenSearch Plugins\",order:2e3} # Replace app category to Notifications app sed -i -e "s|category:DEFAULT_APP_CATEGORIES.management|category:${category_explore}|" ./plugins/notificationsDashboards/target/public/notificationsDashboards.plugin.js -# Replace app category to Index Management app +# Replace app category to Index Management app sed -i -e "s|category:DEFAULT_APP_CATEGORIES.management|category:${category_dashboard_management}|g" ./plugins/indexManagementDashboards/target/public/indexManagementDashboards.plugin.js # Replace app category to Dev Tools app @@ -221,12 +260,13 @@ sed -i -e "s|order:9010|order:${app_order_index_management}|g" ./plugins/indexMa app_order_snapshot_management=9050 sed -i -e "s|order:9020|order:${app_order_snapshot_management}|g" ./plugins/indexManagementDashboards/target/public/indexManagementDashboards.plugin.js -# Avoid the management Overview application is registered to feature catalogue +# Avoid the management Overview application is registered to feature catalog sed -i -e "s|home.featureCatalogue|false \&\& home.featureCatalogue|g" ./src/plugins/management_overview/target/public/managementOverview.plugin.js -# Avoid the management Overview application is registered (appear on side menu) +# Avoid the management Overview application is registered (appears on the side menu) sed -i -e "s|application.register|false \&\& application.register|g" ./src/plugins/management_overview/target/public/managementOverview.plugin.js +# Generate compressed files files_to_recreate=( ./src/core/target/public/core.entry.js ./src/plugins/discover/target/public/discover.plugin.js @@ -241,6 +281,8 @@ files_to_recreate=( ./src/plugins/management/target/public/management.plugin.js ./plugins/securityDashboards/target/public/securityDashboards.plugin.js ./src/plugins/management_overview/target/public/managementOverview.plugin.js + ./plugins/securityDashboards/target/public/securityDashboards.chunk.5.js + ./src/plugins/opensearch_dashboards_overview/target/public/opensearchDashboardsOverview.plugin.js ) for value in "${files_to_recreate[@]}" @@ -249,11 +291,17 @@ do brotli -c "$value" > "$value.br" done +# ----------------------------------------------------------------------------- +# Wazuh customizations +# ----------------------------------------------------------------------------- + # Add VERSION file cp /root/VERSION . -# Add exception for wazuh plugin install + +# Add an exception for wazuh plugin install wazuh_plugin="if (plugin.includes(\'wazuh\')) {\n return plugin;\n } else {\n return \`\${LATEST_PLUGIN_BASE_URL}\/\${version}\/latest\/\${platform}\/\${arch}\/tar\/builds\/opensearch-dashboards\/plugins\/\${plugin}-\${version}.zip\`;\n }" sed -i "s|return \`\${LATEST_PLUGIN_BASE_URL}\/\${version}\/latest\/\${platform}\/\${arch}\/tar\/builds\/opensearch-dashboards\/plugins\/\${plugin}-\${version}.zip\`;|$wazuh_plugin|" ./src/cli_plugin/install/settings.js + # Generate build number for package.json curl -sO ${url} unzip *.zip 'opensearch-dashboards/wazuh/package.json' @@ -263,6 +311,9 @@ rm -f ./*.zip jq ".build.number=${build_number}" ./package.json > ./package.json.tmp mv ./package.json.tmp ./package.json +# ----------------------------------------------------------------------------- +# Clean +# ----------------------------------------------------------------------------- # Remove plugins /bin/bash ./bin/opensearch-dashboards-plugin remove queryWorkbenchDashboards --allow-root @@ -272,12 +323,17 @@ mv ./package.json.tmp ./package.json /bin/bash ./bin/opensearch-dashboards-plugin remove searchRelevanceDashboards --allow-root /bin/bash ./bin/opensearch-dashboards-plugin remove mlCommonsDashboards --allow-root +# ----------------------------------------------------------------------------- +# Set permissions +# ----------------------------------------------------------------------------- + find -type d -exec chmod 750 {} \; find -type f -perm 644 -exec chmod 640 {} \; find -type f -perm 755 -exec chmod 750 {} \; find -type f -perm 744 -exec chmod 740 {} \; - +# ----------------------------------------------------------------------------- +# Create the base file # ----------------------------------------------------------------------------- # Base output From 3afd05e8d936ac4e113df53987de1eac704ddffd Mon Sep 17 00:00:00 2001 From: Raul Del Pozo Moreno Date: Thu, 26 Oct 2023 01:16:01 +0200 Subject: [PATCH 15/19] Updated to 2.10.0 changes --- .../etc/custom_welcome/light_theme.style.css | 236 ++++++++++++++---- 1 file changed, 192 insertions(+), 44 deletions(-) diff --git a/stack/dashboard/base/files/etc/custom_welcome/light_theme.style.css b/stack/dashboard/base/files/etc/custom_welcome/light_theme.style.css index 8532a673cc..e332ef08c8 100644 --- a/stack/dashboard/base/files/etc/custom_welcome/light_theme.style.css +++ b/stack/dashboard/base/files/etc/custom_welcome/light_theme.style.css @@ -1,7 +1,18 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + * Any modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + /*! * Bootstrap v3.3.6 (http://getbootstrap.com) * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ /* @notice * This product bundles bootstrap@3.3.6 which is available under a @@ -60,13 +71,71 @@ margin-left: -15px; margin-right: -15px; } -.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 { +.col-xs-1, +.col-sm-1, +.col-md-1, +.col-lg-1, +.col-xs-2, +.col-sm-2, +.col-md-2, +.col-lg-2, +.col-xs-3, +.col-sm-3, +.col-md-3, +.col-lg-3, +.col-xs-4, +.col-sm-4, +.col-md-4, +.col-lg-4, +.col-xs-5, +.col-sm-5, +.col-md-5, +.col-lg-5, +.col-xs-6, +.col-sm-6, +.col-md-6, +.col-lg-6, +.col-xs-7, +.col-sm-7, +.col-md-7, +.col-lg-7, +.col-xs-8, +.col-sm-8, +.col-md-8, +.col-lg-8, +.col-xs-9, +.col-sm-9, +.col-md-9, +.col-lg-9, +.col-xs-10, +.col-sm-10, +.col-md-10, +.col-lg-10, +.col-xs-11, +.col-sm-11, +.col-md-11, +.col-lg-11, +.col-xs-12, +.col-sm-12, +.col-md-12, +.col-lg-12 { position: relative; min-height: 1px; padding-left: 15px; padding-right: 15px; } -.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 { +.col-xs-1, +.col-xs-2, +.col-xs-3, +.col-xs-4, +.col-xs-5, +.col-xs-6, +.col-xs-7, +.col-xs-8, +.col-xs-9, +.col-xs-10, +.col-xs-11, +.col-xs-12 { float: left; } .col-xs-12 { @@ -223,7 +292,18 @@ margin-left: 0%; } @media (min-width: 768px) { - .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 { + .col-sm-1, + .col-sm-2, + .col-sm-3, + .col-sm-4, + .col-sm-5, + .col-sm-6, + .col-sm-7, + .col-sm-8, + .col-sm-9, + .col-sm-10, + .col-sm-11, + .col-sm-12 { float: left; } .col-sm-12 { @@ -381,7 +461,18 @@ } } @media (min-width: 992px) { - .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 { + .col-md-1, + .col-md-2, + .col-md-3, + .col-md-4, + .col-md-5, + .col-md-6, + .col-md-7, + .col-md-8, + .col-md-9, + .col-md-10, + .col-md-11, + .col-md-12 { float: left; } .col-md-12 { @@ -539,7 +630,18 @@ } } @media (min-width: 1200px) { - .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 { + .col-lg-1, + .col-lg-2, + .col-lg-3, + .col-lg-4, + .col-lg-5, + .col-lg-6, + .col-lg-7, + .col-lg-8, + .col-lg-9, + .col-lg-10, + .col-lg-11, + .col-lg-12 { float: left; } .col-lg-12 { @@ -829,7 +931,7 @@ table th[class*="col-"] { .table > thead > tr.info > th, .table > tbody > tr.info > th, .table > tfoot > tr.info > th { - background-color: #3595F9; + background-color: #006BB4; } .table-hover > tbody > tr > td.info:hover, .table-hover > tbody > tr > th.info:hover, @@ -941,12 +1043,16 @@ table th[class*="col-"] { background-image: none; border: 1px solid #D3DAE6; border-radius: 4px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; + -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; } .form-control:focus { - border-color: #3595F9; + border-color: #006BB4; outline: 0; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(0, 107, 180, 0.6); box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(0, 107, 180, 0.6); } .form-control::-moz-placeholder { @@ -1164,10 +1270,12 @@ select[multiple].input-lg { } .has-success .form-control { border-color: #FFF; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); } .has-success .form-control:focus { border-color: #e6e6e6; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ffffff; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ffffff; } .has-success .input-group-addon { @@ -1192,10 +1300,12 @@ select[multiple].input-lg { } .has-warning .form-control { border-color: #FFF; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); } .has-warning .form-control:focus { border-color: #e6e6e6; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ffffff; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ffffff; } .has-warning .input-group-addon { @@ -1220,10 +1330,12 @@ select[multiple].input-lg { } .has-error .form-control { border-color: #FFF; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); } .has-error .form-control:focus { border-color: #e6e6e6; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ffffff; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ffffff; } .has-error .input-group-addon { @@ -1381,7 +1493,7 @@ a.text-danger:focus { color: #e6e6e6; } .bg-info { - background-color: #3595F9; + background-color: #006BB4; } a.bg-info:hover, a.bg-info:focus { @@ -1407,6 +1519,8 @@ a.bg-info:focus { } .fade { opacity: 0; + -webkit-transition: opacity 0.15s linear; + -o-transition: opacity 0.15s linear; transition: opacity 0.15s linear; } .fade.in { @@ -1428,8 +1542,11 @@ tbody.collapse.in { position: relative; height: 0; overflow: hidden; + -webkit-transition-property: height, visibility; transition-property: height, visibility; + -webkit-transition-duration: 0.35s; transition-duration: 0.35s; + -webkit-transition-timing-function: ease; transition-timing-function: ease; } /** @@ -1475,6 +1592,7 @@ tbody.collapse.in { .btn.active { outline: 0; background-image: none; + -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); } .btn.disabled, @@ -1483,6 +1601,7 @@ fieldset[disabled] .btn { cursor: not-allowed; opacity: 0.65; filter: alpha(opacity=65); + -webkit-box-shadow: none; box-shadow: none; } a.btn.disabled, @@ -1491,8 +1610,8 @@ fieldset[disabled] a.btn { } .btn-default { color: #FFF; - background-color: #3595F9; - border-color: #3595F9; + background-color: #006BB4; + border-color: #006BB4; } .btn-default:focus, .btn-default.focus { @@ -1539,17 +1658,17 @@ fieldset[disabled] .btn-default:focus, .btn-default.disabled.focus, .btn-default[disabled].focus, fieldset[disabled] .btn-default.focus { - background-color: #3595F9; - border-color: #3595F9; + background-color: #006BB4; + border-color: #006BB4; } .btn-default .badge { - color: #3595F9; + color: #006BB4; background-color: #FFF; } .btn-primary { color: #FFF; - background-color: #3595F9; - border-color: #3595F9; + background-color: #006BB4; + border-color: #006BB4; } .btn-primary:focus, .btn-primary.focus { @@ -1596,11 +1715,11 @@ fieldset[disabled] .btn-primary:focus, .btn-primary.disabled.focus, .btn-primary[disabled].focus, fieldset[disabled] .btn-primary.focus { - background-color: #3595F9; - border-color: #3595F9; + background-color: #006BB4; + border-color: #006BB4; } .btn-primary .badge { - color: #3595F9; + color: #006BB4; background-color: #FFF; } .btn-xs { @@ -1803,6 +1922,7 @@ fieldset[disabled] .btn-primary.focus { padding: 10px 10px; border-top: 1px solid transparent; border-bottom: 1px solid transparent; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); margin-top: 6.5px; margin-bottom: 6.5px; @@ -1872,6 +1992,7 @@ fieldset[disabled] .btn-primary.focus { margin-right: 0; padding-top: 0; padding-bottom: 0; + -webkit-box-shadow: none; box-shadow: none; } } @@ -2123,10 +2244,19 @@ button.close { outline: 0; } .modal.fade .modal-dialog { + -webkit-transform: translate(0, -25%); + -ms-transform: translate(0, -25%); + -o-transform: translate(0, -25%); transform: translate(0, -25%); + -webkit-transition: -webkit-transform 0.3s ease-out; + -moz-transition: -moz-transform 0.3s ease-out; + -o-transition: -o-transform 0.3s ease-out; transition: transform 0.3s ease-out; } .modal.in .modal-dialog { + -webkit-transform: translate(0, 0); + -ms-transform: translate(0, 0); + -o-transform: translate(0, 0); transform: translate(0, 0); } .modal-open .modal { @@ -2144,6 +2274,7 @@ button.close { border: 1px solid #98A2B3; border: 1px solid rgba(0, 0, 0, 0.2); border-radius: 4px; + -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5); box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5); background-clip: padding-box; outline: 0; @@ -2198,6 +2329,7 @@ button.close { margin: 30px auto; } .modal-content { + -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); } .modal-sm { @@ -2231,6 +2363,7 @@ button.close { margin-bottom: 20px; background-color: #b8bec8; border-radius: 4px; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); } .progress-bar { @@ -2242,40 +2375,53 @@ button.close { color: #FFF; text-align: center; background-color: #54B399; + -webkit-transition: width 0.6s ease; + -o-transition: width 0.6s ease; transition: width 0.6s ease; } .progress-striped .progress-bar, .progress-bar-striped { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-size: 40px 40px; } .progress.active .progress-bar, .progress-bar.active { -webkit-animation: progress-bar-stripes 2s linear infinite; + -o-animation: progress-bar-stripes 2s linear infinite; animation: progress-bar-stripes 2s linear infinite; } .progress-bar-success { background-color: #017D73; } .progress-striped .progress-bar-success { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .progress-bar-info { - background-color: #3595F9; + background-color: #006BB4; } .progress-striped .progress-bar-info { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .progress-bar-warning { background-color: #F5A700; } .progress-striped .progress-bar-warning { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .progress-bar-danger { background-color: #BD271E; } .progress-striped .progress-bar-danger { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .list-group { @@ -2394,7 +2540,7 @@ button.list-group-item-success.active:focus { } .list-group-item-info { color: #FFF; - background-color: #3595F9; + background-color: #006BB4; } a.list-group-item-info, button.list-group-item-info { @@ -2520,7 +2666,7 @@ button.list-group-item-danger.active:focus { .nav .open > a:hover, .nav .open > a:focus { background-color: #D3DAE6; - border-color: #3595F9; + border-color: #006BB4; } .nav .nav-divider { height: 1px; @@ -2614,7 +2760,7 @@ button.list-group-item-danger.active:focus { .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus { color: #FFF; - background-color: #3595F9; + background-color: #006BB4; } .nav-stacked > li { float: none; @@ -2723,7 +2869,7 @@ button.list-group-item-danger.active:focus { color: #e6e6e6; } .alert-info { - background-color: #3595F9; + background-color: #006BB4; border-color: #004d81; color: #FFF; } @@ -3134,9 +3280,7 @@ button.list-group-item-danger.active:focus { white-space: nowrap; } .dropdown-menu > li > button { - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; + appearance: none; background: none; border: none; width: 100%; @@ -3359,7 +3503,7 @@ select[multiple].input-group-sm > .input-group-addon { padding: 5px 15px; line-height: 1.42857143; text-decoration: none; - color: #3595F9; + color: #006BB4; background-color: transparent; border: 1px solid transparent; margin-left: -1px; @@ -3380,7 +3524,7 @@ select[multiple].input-group-sm > .input-group-addon { .pagination > li > a:focus, .pagination > li > span:focus { z-index: 2; - color: #3595F9; + color: #006BB4; background-color: rgba(0, 0, 0, 0); border-color: transparent; } @@ -3479,7 +3623,7 @@ select[multiple].input-group-sm > .input-group-addon { } .label { display: inline; - padding: .2em .6em .3em; + padding: 0.2em 0.6em 0.3em; font-size: 75%; font-weight: bold; line-height: 1; @@ -3487,7 +3631,7 @@ select[multiple].input-group-sm > .input-group-addon { text-align: center; white-space: nowrap; vertical-align: baseline; - border-radius: .25em; + border-radius: 0.25em; } a.label:hover, a.label:focus { @@ -3499,7 +3643,7 @@ a.label:focus { display: none; } .label-default { - background-color: #3595F9; + background-color: #006BB4; } .label-default[href]:hover, .label-default[href]:focus { @@ -3520,7 +3664,7 @@ a.label:focus { background-color: #014a44; } .label-info { - background-color: #3595F9; + background-color: #006BB4; } .label-info[href]:hover, .label-info[href]:focus { @@ -3545,6 +3689,7 @@ a.label:focus { background-color: #FFF; border: 1px solid transparent; border-radius: 4px; + -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05); box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05); } .panel-body { @@ -3833,14 +3978,14 @@ a.label:focus { } .panel-info > .panel-heading { color: #FFF; - background-color: #3595F9; + background-color: #006BB4; border-color: #004d81; } .panel-info > .panel-heading + .panel-collapse > .panel-body { border-top-color: #004d81; } .panel-info > .panel-heading .badge { - color: #3595F9; + color: #006BB4; background-color: #FFF; } .panel-info > .panel-footer + .panel-collapse > .panel-body { @@ -4113,12 +4258,12 @@ a.label:focus { background-color: #FFF; color: #F5F7FA; } -.navbar-inverse .kbnGlobalNav__logoBrand { +.navbar-inverse .osdGlobalNav__logoBrand { height: 45px; width: 252px; background-color: #4b4f5d; } -.navbar-inverse .kbnGlobalNav__smallLogoBrand { +.navbar-inverse .osdGlobalNav__smallLogoBrand { height: 45px; width: 45px; background-color: #4b4f5d; @@ -4130,10 +4275,7 @@ a.label:focus { .navbar-brand { cursor: default; font-size: 1.8em; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; + user-select: none; } .navbar-nav { font-size: 12px; @@ -4163,7 +4305,7 @@ a.label:focus { } .text-info, .text-info:hover { - color: #3595F9; + color: #006BB4; } table .success, .table .success, @@ -4196,10 +4338,12 @@ table .info a, .form-control, input { border-width: 1px; + -webkit-box-shadow: none; box-shadow: none; } .form-control:focus, input:focus { + -webkit-box-shadow: none; box-shadow: none; } .has-warning .help-block, @@ -4269,9 +4413,11 @@ input:focus { } .panel { border-radius: 0; + -webkit-box-shadow: 0 0 0 rgba(0, 0, 0, 0); box-shadow: 0 0 0 rgba(0, 0, 0, 0); } .progress { + -webkit-box-shadow: none; box-shadow: none; } .progress .progress-bar { @@ -4279,12 +4425,14 @@ input:focus { line-height: 10px; } .well { + -webkit-box-shadow: none; box-shadow: none; } + /*------------- WAZUH -------------*/ .wz-login { - background: url(./wazuh_wazuh_bg.svg) !important; + background: url(./logos/wazuh_wazuh_bg.svg) !important; width: 100% !important; height: 100% !important; background-size: cover !important; @@ -4345,5 +4493,5 @@ div.euiFormRow > div.euiFormRow__fieldWrapper > button { } .loginWelcome__logo { - background: url(./wazuh_logo_circle.svg) center center no-repeat !important; + background: url(./logos/Wazuh-Logo.svg) center center no-repeat !important; } From c6663177f7631ceeb569b5d21b1c545ec2a19b59 Mon Sep 17 00:00:00 2001 From: Raul Del Pozo Moreno Date: Thu, 26 Oct 2023 17:10:01 +0200 Subject: [PATCH 16/19] Added APP defaultRoute replace to new wz-home --- stack/dashboard/deb/debian/postinst | 4 ++++ stack/dashboard/rpm/wazuh-dashboard.spec | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/stack/dashboard/deb/debian/postinst b/stack/dashboard/deb/debian/postinst index e33c07afdb..bd4afd0999 100644 --- a/stack/dashboard/deb/debian/postinst +++ b/stack/dashboard/deb/debian/postinst @@ -46,6 +46,10 @@ case "$1" in runuser "${NAME}" --shell="/bin/bash" --command="echo kibanaserver | ${INSTALLATION_DIR}/bin/opensearch-dashboards-keystore add opensearch.password --stdin" > /dev/null 2>&1 chmod 640 "${CONFIG_DIR}"/opensearch_dashboards.keystore fi + + if ! grep -q "/app/wz-home" "${CONFIG_DIR}"/opensearch_dashboards.yml; then + sed -i 's/\/app\/wazuh/\/app\/wz-home/g' "${CONFIG_DIR}"/opensearch_dashboards.yml + fi ;; diff --git a/stack/dashboard/rpm/wazuh-dashboard.spec b/stack/dashboard/rpm/wazuh-dashboard.spec index ac83c1c94a..3bd3792678 100644 --- a/stack/dashboard/rpm/wazuh-dashboard.spec +++ b/stack/dashboard/rpm/wazuh-dashboard.spec @@ -192,6 +192,10 @@ elif [ ! -f %{CONFIG_DIR}/opensearch_dashboards.keystore ]; then chmod 640 "%{CONFIG_DIR}"/opensearch_dashboards.keystore fi +if ! grep -q "/app/wz-home" %{CONFIG_DIR}/opensearch_dashboards.yml; then + sed -i 's/\/app\/wazuh/\/app\/wz-home/g' %{CONFIG_DIR}/opensearch_dashboards.yml +fi + if [ -f %{INSTALL_DIR}/wazuh-dashboard.restart ]; then rm -f %{INSTALL_DIR}/wazuh-dashboard.restart if command -v systemctl > /dev/null 2>&1 && systemctl > /dev/null 2>&1; then From ea213aa0c1eed0d05771e4ba70850a278a4cc5bd Mon Sep 17 00:00:00 2001 From: Raul Del Pozo Moreno Date: Thu, 26 Oct 2023 22:07:02 +0200 Subject: [PATCH 17/19] Added output directory --- .gitignore | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 867e7a97a6..ac127f4468 100644 --- a/.gitignore +++ b/.gitignore @@ -19,8 +19,6 @@ ova/Config_files/filebeat.yml *.pkg.tar.zst .gradle .java -stack/dashboard/base/output -stack/indexer/base/output stack/indexer/rpm/output stack/indexer/deb/output .cache @@ -42,3 +40,4 @@ unattended_installer/wazuh-certs-tool.sh unattended_installer/wazuh-passwords-tool.sh unattended_installer/wazuh-passwords.txt tests/unattended/unit/*.log +output \ No newline at end of file From 5272da642b25d18f0ba5fdc2872e3d9a6433cccb Mon Sep 17 00:00:00 2001 From: Raul Del Pozo Moreno Date: Thu, 26 Oct 2023 22:07:23 +0200 Subject: [PATCH 18/19] Added end line --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index ac127f4468..9b7c195b3c 100644 --- a/.gitignore +++ b/.gitignore @@ -40,4 +40,4 @@ unattended_installer/wazuh-certs-tool.sh unattended_installer/wazuh-passwords-tool.sh unattended_installer/wazuh-passwords.txt tests/unattended/unit/*.log -output \ No newline at end of file +output From c1504e2db6bcf17edb60611060516e8df7309982 Mon Sep 17 00:00:00 2001 From: Antonio <34042064+Desvelao@users.noreply.github.com> Date: Fri, 3 Nov 2023 09:54:41 +0100 Subject: [PATCH 19/19] feat(dashboard): change the order of Explore category and title of Indexer/dashboard management category (#2578) --- stack/dashboard/base/builder.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stack/dashboard/base/builder.sh b/stack/dashboard/base/builder.sh index caf9f67e36..229739ed64 100755 --- a/stack/dashboard/base/builder.sh +++ b/stack/dashboard/base/builder.sh @@ -186,8 +186,8 @@ sed -i "s'/app/home'/app/${app_home}'g" ./src/core/target/public/core.entry.js sed -i "s/navigateToApp(\"home\")/navigateToApp(\"${app_home}\")/g" ./src/core/target/public/core.entry.js # Define categories -category_explore='{id:"explore",label:"Explore",order:500,euiIconType:"search"}' -category_dashboard_management='{id:"management",label:"Indexer/dashboard Management",order:5e3,euiIconType:"managementApp"}' +category_explore='{id:"explore",label:"Explore",order:100,euiIconType:"search"}' +category_dashboard_management='{id:"management",label:"Indexer/dashboard management",order:5e3,euiIconType:"managementApp"}' # Add custom categories (explore) to the built-in sed -i -e "s|DEFAULT_APP_CATEGORIES=Object.freeze({|DEFAULT_APP_CATEGORIES=Object.freeze({explore:${category_explore},|" ./src/core/target/public/core.entry.js