Skip to content

Commit

Permalink
Merge branch 'wazuh:4.9.0' into 4.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
yenienserrano authored Sep 10, 2024
2 parents ec53c0d + 2d46edd commit fdfea99
Show file tree
Hide file tree
Showing 38 changed files with 260 additions and 1,194 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/build_wazuh_dashboard_with_plugins.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
run-name: Build ${{ inputs.system }} wazuh-dashboard on ${{ inputs.architecture }} ${{ inputs.is_stage && '- is stage' || '' }} ${{ inputs.checksum && '- checksum' || '' }} ${{ inputs.debug && '- debug' || '' }} ${{ inputs.id }}
name: Build Wazuh dashboard with plugins

on:
workflow_dispatch:
Expand Down Expand Up @@ -102,21 +103,21 @@ jobs:
build-base:
needs: [validate-inputs]
name: Build dashboard
uses: wazuh/wazuh-dashboard/.github/workflows/build_base.yml@4.9.0
uses: wazuh/wazuh-dashboard/.github/workflows/build_base.yml@v4.9.0-2
with:
CHECKOUT_TO: ${{ github.head_ref || github.ref_name }}

build-main-plugins:
needs: [validate-inputs]
name: Build plugins
uses: wazuh/wazuh-dashboard-plugins/.github/workflows/manual-build.yml@4.9.0
uses: wazuh/wazuh-dashboard-plugins/.github/workflows/manual-build.yml@v4.9.0
with:
reference: ${{ inputs.reference_wazuh_plugins }}

build-security-plugin:
needs: [validate-inputs]
name: Build security plugin
uses: wazuh/wazuh-security-dashboards-plugin/.github/workflows/manual-build.yml@4.9.0
uses: wazuh/wazuh-security-dashboards-plugin/.github/workflows/manual-build.yml@v4.9.0
with:
reference: ${{ inputs.reference_security_plugins }}

Expand Down Expand Up @@ -217,7 +218,13 @@ jobs:
run: |
echo "Uploading package"
aws s3 cp ${{ env.CURRENT_DIR }}/dev-tools/build-packages/output/${{ inputs.system }}/${{env.PACKAGE_NAME}} s3://packages-dev.internal.wazuh.com/development/wazuh/4.x/main/packages/
if [ "${{ inputs.checksum }}" = "true" ]; then
echo "Uploading checksum"
aws s3 cp ${{ env.CURRENT_DIR }}/dev-tools/build-packages/output/${{ inputs.system }}/${{env.PACKAGE_NAME}}.sha512 s3://packages-dev.internal.wazuh.com/development/wazuh/4.x/main/packages/
fi
s3uri="s3://packages-dev.internal.wazuh.com/development/wazuh/4.x/main/packages/${{env.PACKAGE_NAME}}"
echo "S3 URI: ${s3uri}"
- name: Upload SHA512
if: ${{ inputs.checksum }}
run: |
echo "Uploading checksum"
aws s3 cp ${{ env.CURRENT_DIR }}/dev-tools/build-packages/output/${{ inputs.system }}/${{env.PACKAGE_NAME}}.sha512 s3://packages-dev.internal.wazuh.com/development/wazuh/4.x/main/packages/
s3uri="s3://packages-dev.internal.wazuh.com/development/wazuh/4.x/main/packages/${{env.PACKAGE_NAME}}.sha512"
echo "S3 sha512 URI: ${s3uri}"
2 changes: 1 addition & 1 deletion .github/workflows/cypress_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ env:
TEST_REPO: ${{ inputs.test_repo != '' && inputs.test_repo || 'opensearch-project/opensearch-dashboards-functional-test' }}
TEST_BRANCH: "${{ inputs.test_branch != '' && inputs.test_branch || github.base_ref }}"
FTR_PATH: 'ftr'
START_CMD: 'node ../scripts/opensearch_dashboards --dev --no-base-path --no-watch --savedObjects.maxImportPayloadBytes=10485760 --server.maxPayloadBytes=1759977 --logging.json=false --data.search.aggs.shardDelay.enabled=true'
START_CMD: 'node ../scripts/opensearch_dashboards --dev --no-base-path --no-watch --savedObjects.maxImportPayloadBytes=10485760 --server.maxPayloadBytes=1759977 --logging.json=false --data.search.aggs.shardDelay.enabled=true --opensearchDashboards.branding.useExpandedHeader=true'
OPENSEARCH_SNAPSHOT_CMD: 'node ../scripts/opensearch snapshot -E cluster.routing.allocation.disk.threshold_enabled=false'
CYPRESS_BROWSER: 'chromium'
CYPRESS_VISBUILDER_ENABLED: true
Expand Down
1,011 changes: 12 additions & 999 deletions CHANGELOG.md

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions config/opensearch_dashboards.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ server.host: 0.0.0.0
server.port: 443
opensearch.hosts: https://localhost:9200
opensearch.ssl.verificationMode: certificate
#opensearch.username:
#opensearch.password:
opensearch.requestHeadersAllowlist: ["securitytenant","Authorization"]
opensearch_security.multitenancy.enabled: false
opensearch_security.readonly_mode.roles: ["kibana_read_only"]
Expand All @@ -10,6 +12,3 @@ server.ssl.key: "/etc/wazuh-dashboard/certs/dashboard-key.pem"
server.ssl.certificate: "/etc/wazuh-dashboard/certs/dashboard.pem"
opensearch.ssl.certificateAuthorities: ["/etc/wazuh-dashboard/certs/root-ca.pem"]
uiSettings.overrides.defaultRoute: /app/wz-home

opensearchDashboards.branding:
useExpandedHeader: false
1 change: 1 addition & 0 deletions dev-tools/build-packages/config/default
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ chdir="/"
nice=""
KILL_ON_STOP_TIMEOUT=0

OSD_PATH_CONF="/etc/wazuh-dashboard"
2 changes: 1 addition & 1 deletion dev-tools/build-packages/config/wazuh-dashboard.service
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
1 change: 1 addition & 0 deletions dev-tools/build-packages/deb/debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ configure)
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
Expand Down
4 changes: 4 additions & 0 deletions dev-tools/build-packages/deb/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ 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)
Expand Down Expand Up @@ -95,6 +98,7 @@ override_dh_fixperms:
chmod 440 $(TARGET_DIR)$(INSTALLATION_DIR)/VERSION
chmod 750 $(TARGET_DIR)/etc/systemd/system/wazuh-dashboard
chmod 750 $(TARGET_DIR)/etc/default/wazuh-dashboard
chmod 640 "$(TARGET_DIR)$(CONFIG_DIR)"/opensearch_dashboards.yml
chmod 640 "$(TARGET_DIR)$(CONFIG_DIR)"/node.options
chmod 640 $(TARGET_DIR)/etc/systemd/system/wazuh-dashboard.service
find "$(TARGET_DIR)$(INSTALLATION_DIR)" -type d -exec chmod 750 {} \;
Expand Down
4 changes: 4 additions & 0 deletions dev-tools/build-packages/rpm/wazuh-dashboard.spec
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ useradd -g %{GROUP} %{USER}
%build

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"


# -----------------------------------------------------------------------------

Expand Down Expand Up @@ -125,6 +128,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

if [ ! -f %{INSTALLATION_DIR}/config/opensearch_dashboards.keystore ]; then
runuser %{USER} --shell="/bin/bash" --command="%{INSTALL_DIR}/bin/opensearch-dashboards-keystore create" > /dev/null 2>&1
Expand Down
3 changes: 0 additions & 3 deletions docker/config/opensearch_dashboards.dev.security.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
server.host: "0.0.0.0"

opensearchDashboards.branding:
useExpandedHeader: false

opensearch.hosts: ["https://indexer:9200"]
opensearch.ssl.verificationMode: none
opensearch.username: "kibanaserver"
Expand Down
3 changes: 0 additions & 3 deletions docker/config/opensearch_dashboards.dev.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
server.host: "0.0.0.0"

opensearchDashboards.branding:
useExpandedHeader: false
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"wazuh": {
"version": "4.9.0",
"revision": "00"
"revision": "07"
},
"homepage": "https://opensearch.org",
"bugs": {
Expand Down Expand Up @@ -118,7 +118,6 @@
"**/eslint-plugin-mocha-next/mocha": "npm:mocha@^10.1.0",
"**/xml2js": "^0.5.0",
"**/yaml": "^2.2.2"

},
"workspaces": {
"packages": [
Expand Down Expand Up @@ -240,7 +239,6 @@
"uuid": "3.3.2",
"whatwg-fetch": "^3.0.0",
"yauzl": "^2.10.0"

},
"devDependencies": {
"@babel/core": "^7.22.9",
Expand Down
12 changes: 12 additions & 0 deletions packages/osd-plugin-helpers/src/integration_tests/build.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,15 @@ it('builds a generated plugin into a viable archive', async () => {
info running @osd/optimizer
│ info initialized, 0 bundles cached
│ info starting worker [1 bundle]
│ warn worker stderr Browserslist: caniuse-lite is outdated. Please run:
│ warn worker stderr npx update-browserslist-db@latest
│ warn worker stderr Why you should do it regularly: https://github.com/browserslist/update-db#readme
│ succ 1 bundles compiled successfully after <time>
info copying assets from \`public/assets\` to build
info copying server source into the build and converting with babel
Browserslist: caniuse-lite is outdated. Please run:
npx update-browserslist-db@latest
Why you should do it regularly: https://github.com/browserslist/update-db#readme
info running yarn to install dependencies
info compressing plugin into [fooTestPlugin-1.0.0.zip]
info cleaning up compression temporary artifacts"
Expand Down Expand Up @@ -189,9 +195,15 @@ it('builds a non-semver generated plugin into a viable archive', async () => {
info running @osd/optimizer
│ info initialized, 0 bundles cached
│ info starting worker [1 bundle]
│ warn worker stderr Browserslist: caniuse-lite is outdated. Please run:
│ warn worker stderr npx update-browserslist-db@latest
│ warn worker stderr Why you should do it regularly: https://github.com/browserslist/update-db#readme
│ succ 1 bundles compiled successfully after <time>
info copying assets from \`public/assets\` to build
info copying server source into the build and converting with babel
Browserslist: caniuse-lite is outdated. Please run:
npx update-browserslist-db@latest
Why you should do it regularly: https://github.com/browserslist/update-db#readme
info running yarn to install dependencies
info compressing plugin into [fooTestPlugin-1.0.0.x.zip]
info cleaning up compression temporary artifacts"
Expand Down
18 changes: 9 additions & 9 deletions src/core/common/logos/__snapshots__/get_logos.test.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/core/common/logos/get_logos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ export const CENTER_MARK_THEMED = 'ui/logos/wazuh_center_mark.svg';
export const CENTER_MARK_ON_LIGHT = 'ui/logos/wazuh_center_mark_on_light.svg';
export const CENTER_MARK_ON_DARK = 'ui/logos/wazuh_center_mark_on_dark.svg';
export const ANIMATED_MARK_THEMED = 'ui/logos/spinner.svg';
export const ANIMATED_MARK_ON_LIGHT = 'ui/logos/spinner_on_light.gif';
export const ANIMATED_MARK_ON_DARK = 'ui/logos/spinner_on_dark.gif';
export const ANIMATED_MARK_ON_LIGHT = 'ui/logos/spinner_on_light.svg';
export const ANIMATED_MARK_ON_DARK = 'ui/logos/spinner_on_dark.svg';

interface AssetOption {
url?: string;
Expand Down
Loading

0 comments on commit fdfea99

Please sign in to comment.