Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Management of null values on indices #593

Open
4 tasks
Tracked by #22887
AlexRuiz7 opened this issue Dec 12, 2024 · 0 comments
Open
4 tasks
Tracked by #22887

Management of null values on indices #593

AlexRuiz7 opened this issue Dec 12, 2024 · 0 comments
Labels
level/task Task issue phase/feature complete Feature complete type/enhancement Enhancement issue

Comments

@AlexRuiz7
Copy link
Member

AlexRuiz7 commented Dec 12, 2024

Description

Avoid indexing void data, such as empty strings, using null instead. Null values can become searchable by defining a replacement on the index mappings. See https://opensearch.org/docs/latest/field-types/supported-field-types/index/#null-value

By default, OpenSearch replaces null values with a hyphen, for better human-readable format on visualizations and dashboards. The field is shown a null in the JSON representation of the document. The default replacement (hyphen) can be customized per field, allowing us to add any default value we see fit when there is no data for such field.

In the image below, we can see how fields using the null value are shown with a hyphen, making it clear that there is no value for such field, while fields whose value uses an empty string show nothing, which tend to be misleading as one could think something is broken in the visualization.
Image

The goal of the issue is to ensure that any value indexed follows these criteria:

  • No empty values allowed.
  • When there is no value for such a field, null is used instead.

Functional requirements

  • The Wazuh Agent sends data to the Indexer, through the Wazuh Server, with no empty values.
  • The Wazuh Engine sends data to the Indexer, through the Indexer Connector, with no empty values.
  • The Wazuh Server sends data to the Indexer, through the API on port 9200, with no empty values.
  • Every component sending data to the Indexer ensures that empty values, if present, are properly replaced with null beforehand.

Implementation restrictions

  • We are referring explicitly to the null value, not the "null" string.
  • By empty values, we refer to empty instances of:
    • String: "" --> null.
    • Arrays: [] --> null or [null].
  • Empty values must either be replaced by null or not indexed.

Plan

  • Validation of data sent by the Agent to replace empty values.
    • Owner: @wazuh/devel-xdrsiem-agent
    • Teams involved: @wazuh/devel-xdrsiem-indexer @wazuh/devel-xdrsiem-server @wazuh/devel-xdrsiem-dashboard
  • Validation of data sent by the Engine to replace empty values.
    • Owner: @wazuh/devel-xdrsiem-server
    • Teams involved: @wazuh/devel-xdrsiem-indexer @wazuh/devel-xdrsiem-dashboard
  • Validation of data sent by the Server to replace empty values.
    • Owner: @wazuh/devel-xdrsiem-server
    • Teams involved: @wazuh/devel-xdrsiem-indexer @wazuh/devel-xdrsiem-dashboard
  • Proposal of null_value parameter in the index’s mappings
    • Owner: @wazuh/devel-xdrsiem-indexer
    • Teams involved: @wazuh/devel-xdrsiem-indexer @wazuh/devel-xdrsiem-dashboard @wazuh/devel-xdrsiem-server @wazuh/devel-xdrsiem-agent
@AlexRuiz7 AlexRuiz7 added level/task Task issue type/enhancement Enhancement issue labels Dec 12, 2024
@wazuhci wazuhci moved this to Triage in XDR+SIEM/Release 5.0.0 Dec 12, 2024
@AlexRuiz7 AlexRuiz7 changed the title Management of null values on stateful modules Management of null values on indices Jan 29, 2025
@AlexRuiz7 AlexRuiz7 added the phase/feature complete Feature complete label Jan 29, 2025
@wazuhci wazuhci moved this from Triage to Backlog in XDR+SIEM/Release 5.0.0 Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/task Task issue phase/feature complete Feature complete type/enhancement Enhancement issue
Projects
Status: Backlog
Development

No branches or pull requests

1 participant