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

Error in parsing of acknowledged field for Darktrace integration #11505

Open
arvchristos opened this issue Oct 24, 2024 · 2 comments · May be fixed by #11517
Open

Error in parsing of acknowledged field for Darktrace integration #11505

arvchristos opened this issue Oct 24, 2024 · 2 comments · May be fixed by #11517
Assignees
Labels
Integration:darktrace Darktrace Team:Security-Service Integrations Security Service Integrations Team [elastic/security-service-integrations]

Comments

@arvchristos
Copy link

arvchristos commented Oct 24, 2024

Hello,

While using the Darktrace integration for Elastic, we encountered several parsing errors while ingesting model breaches. These errors refer to the acknowledged field of the JSON stream, which is a JSON field with the following format:

    "acknowledged": {
        "time":1728987633000,
        "username": "[email protected]"
    }

However, as you can see in the lines below, this is treated as boolean:
https://github.com/elastic/integrations/blob/main/packages/darktrace/data_stream/model_breach_alert/elasticsearch/ingest_pipeline/default.yml#L493-L497

- convert:
      field: json.acknowledged
      target_field: darktrace.model_breach_alert.is_acknowledged
      type: boolean
      ignore_missing: true

This parser seems quite off. The error messages we get are the following:

[{time=1728987633000, [email protected]}] is not a boolean value, cannot convert to boolean

This value is useful, however it does not add too much value as it is only a snapshot of the model breach at the time of ingestion. As far as I know, elastic agent cannot update documents already ingested and a breach that is not acknowledged on ingestion may be acknowledged later on so by the time of query this field is already stale.

I suggest either removing it completely or fixing the parsing.

Thank you for the great integration,

@jamiehynds jamiehynds added the Team:Security-Service Integrations Security Service Integrations Team [elastic/security-service-integrations] label Oct 24, 2024
@elasticmachine
Copy link

Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)

@efd6
Copy link
Contributor

efd6 commented Oct 25, 2024

@arvchristos ISTM that we can just set darktrace.model_breach_alert.is_acknowledged to true if acknowledged.time exists and is in the past. Would that work for you?

I was unable to find any documentation for the logging format/fields used by Darktrace, that is not published by someone else. Are you aware of any? Are you able to donate some sanitised logs for testing?

@efd6 efd6 linked a pull request Oct 25, 2024 that will close this issue
5 tasks
@efd6 efd6 self-assigned this Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Integration:darktrace Darktrace Team:Security-Service Integrations Security Service Integrations Team [elastic/security-service-integrations]
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants