Skip to content

fix(wazuh): fall back from empty request credentials - #519

Open
Moviw wants to merge 1 commit into
chaitin:mainfrom
Moviw:fix/wazuh-empty-credentials-fallback
Open

fix(wazuh): fall back from empty request credentials#519
Moviw wants to merge 1 commit into
chaitin:mainfrom
Moviw:fix/wazuh-empty-credentials-fallback

Conversation

@Moviw

@Moviw Moviw commented Sep 4, 2026

Copy link
Copy Markdown

Summary

  • fall back to instance secrets when proto3 request credentials decode as empty strings
  • preserve explicit non-empty request credential overrides
  • add a focused regression test for the empty-request path

Closes #506

Integration and compliance

  • Target: Wazuh Manager API 4.x (POST /security/user/authenticate, GET /agents)
  • Interface source: Wazuh public REST API documentation
  • Implementation: original change to the existing integration; no new SDK or dependency
  • Credentials: users provide the Wazuh username and password through OctoBus instance secrets
  • Rate limits / terms: no new requests or changed request frequency
  • Risk: ListAgents is read-only; no high-risk device operation is added
  • Test data: local mock responses only; no real credentials or customer data

Validation

  • npm test -- --service-dir wazuh__siem (48 passed)
  • npm run validate -- --service-dir wazuh__siem
  • npm run pack:check
  • task all (lint, unit/integration/e2e tests, smoke tests, static build)
  • mutation check: restoring the old fallback makes the new regression test fail

The optional per-service coverage command still reports the repository baseline branch-coverage shortfall (88.35% after this change versus 88.30% before); all 48 tests pass.

Signed-off-by: Zimo Xu <xvzimo@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Wazuh SIEM service ignores instance secret when request leaves username/password empty

1 participant