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

crowdstrike.fdr: avoid mapping conflict when host metadata is not an object #12375

Open
wants to merge 2 commits into
base: backport-crowdstrike-1.46
Choose a base branch
from

Conversation

chemamartinez
Copy link
Contributor

@chemamartinez chemamartinez commented Jan 16, 2025

Proposed commit message

Found this error in a live scenario:

{\"type\":\"document_parsing_exception\",\"reason\":\"[1:2175] object mapping for [crowdstrike.info.host] tried to parse field [host] as object, but found a concrete value\"}, dropping event!

Where event being dropped contains metadata host info as follows:

{
  "metadata": {
    "host": "example_host_name"
  }
}

metadata.host is supposed to be an object with several host fields, so when it is renamed to crowdstrike.info.host it causes the error above, as this field is mapped as an object.

This fix is being backported to skip the current minimum required Kibana version (8.16.0).

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.
  • I have verified that any added dashboard complies with Kibana's Dashboard good practices

@chemamartinez chemamartinez added Integration:crowdstrike CrowdStrike bugfix Pull request that fixes a bug issue Team:Security-Service Integrations Security Service Integrations Team [elastic/security-service-integrations] labels Jan 16, 2025
@chemamartinez chemamartinez self-assigned this Jan 16, 2025
@chemamartinez chemamartinez force-pushed the fix-crowdstrike-host-metadata branch from 680cb17 to 06b176e Compare January 16, 2025 16:41
@chemamartinez chemamartinez marked this pull request as ready for review January 16, 2025 16:42
@chemamartinez chemamartinez requested a review from a team as a code owner January 16, 2025 16:42
@elasticmachine
Copy link

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

Copy link
Member

@andrewkroh andrewkroh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add a test case for this.

Another solution would be to adopt subobjects: false for the data stream.

@elastic-vault-github-plugin-prod

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@elasticmachine
Copy link

💚 Build Succeeded

cc @chemamartinez

Copy link

@chemamartinez
Copy link
Contributor Author

Can you please add a test case for this.

I will add a test case.

Another solution would be to adopt subobjects: false for the data stream.

Isn't the subject approach conditioned by elastic/kibana#193044? this was fixed for 8.17 and this fix needs to work in older versions.

@andrewkroh
Copy link
Member

Isn't the subject approach conditioned by elastic/kibana#193044? this was fixed for 8.17 and this fix needs to work in older versions.

Probably. I know the fix is required when you set subobects at the field level, but not sure about when you change it at the data stream level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Pull request that fixes a bug issue Integration:crowdstrike CrowdStrike Team:Security-Service Integrations Security Service Integrations Team [elastic/security-service-integrations]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants