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

winlogbeat/sys/winevent: do not interpret dots as JSON path separators #34549

Merged
merged 1 commit into from
Feb 15, 2023

Conversation

efd6
Copy link
Contributor

@efd6 efd6 commented Feb 10, 2023

What does this PR do?

In some locales, Windows abbreviates event data keys with dots. This happens in Spanish for example where the English 'ID' is rendered as 'Id.' When using mapstr.Put, this dot is interpreted as a path separator, breaking the structure of the document and ultimately leading to an ingest failure. So use opaque key map insertion.

Why is it important?

Breaks data ingestion in some lacales.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Author's Checklist

How to test this PR locally

Related issues

Use cases

Screenshots

Logs

@efd6 efd6 added bug Winlogbeat Team:Security-External Integrations backport-v7.17.0 Automated backport with mergify 8.8-candidate backport-v8.6.0 Automated backport with mergify backport-v8.7.0 Automated backport with mergify labels Feb 10, 2023
@efd6 efd6 self-assigned this Feb 10, 2023
@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Feb 10, 2023
In some locales, Windows abbreviates event data keys with dots. This
happens in Spanish for example where the English 'ID' is rendered as 'Id.'
When using mapstr.Put, this dot is interpreted as a path separator,
breaking the structure of the document and ultimately leading to an
ingest failure. So use opaque key map insertion.
@efd6
Copy link
Contributor Author

efd6 commented Feb 10, 2023

The linter is broken. golangci/golangci-lint-action#624

@efd6 efd6 marked this pull request as ready for review February 10, 2023 04:07
@efd6 efd6 requested a review from a team as a code owner February 10, 2023 04:07
@elasticmachine
Copy link
Collaborator

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-02-10T03:21:00.937+0000

  • Duration: 74 min 0 sec

Test stats 🧪

Test Results
Failed 0
Passed 25908
Skipped 1962
Total 27870

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@efd6 efd6 merged commit ab589ce into elastic:main Feb 15, 2023
mergify bot pushed a commit that referenced this pull request Feb 15, 2023
#34549)

In some locales, Windows abbreviates event data keys with dots. This
happens in Spanish for example where the English 'ID' is rendered as 'Id.'
When using mapstr.Put, this dot is interpreted as a path separator,
breaking the structure of the document and ultimately leading to an
ingest failure. So use opaque key map insertion.

(cherry picked from commit ab589ce)

# Conflicts:
#	winlogbeat/sys/winevent/maputil.go
mergify bot pushed a commit that referenced this pull request Feb 15, 2023
#34549)

In some locales, Windows abbreviates event data keys with dots. This
happens in Spanish for example where the English 'ID' is rendered as 'Id.'
When using mapstr.Put, this dot is interpreted as a path separator,
breaking the structure of the document and ultimately leading to an
ingest failure. So use opaque key map insertion.

(cherry picked from commit ab589ce)
mergify bot pushed a commit that referenced this pull request Feb 15, 2023
#34549)

In some locales, Windows abbreviates event data keys with dots. This
happens in Spanish for example where the English 'ID' is rendered as 'Id.'
When using mapstr.Put, this dot is interpreted as a path separator,
breaking the structure of the document and ultimately leading to an
ingest failure. So use opaque key map insertion.

(cherry picked from commit ab589ce)
efd6 added a commit that referenced this pull request Feb 15, 2023
#34549) (#34594)

In some locales, Windows abbreviates event data keys with dots. This
happens in Spanish for example where the English 'ID' is rendered as 'Id.'
When using mapstr.Put, this dot is interpreted as a path separator,
breaking the structure of the document and ultimately leading to an
ingest failure. So use opaque key map insertion.

(cherry picked from commit ab589ce)

Co-authored-by: Dan Kortschak <90160302+efd6@users.noreply.github.com>
efd6 added a commit that referenced this pull request Feb 15, 2023
#34549) (#34595)

In some locales, Windows abbreviates event data keys with dots. This
happens in Spanish for example where the English 'ID' is rendered as 'Id.'
When using mapstr.Put, this dot is interpreted as a path separator,
breaking the structure of the document and ultimately leading to an
ingest failure. So use opaque key map insertion.

(cherry picked from commit ab589ce)

Co-authored-by: Dan Kortschak <90160302+efd6@users.noreply.github.com>
efd6 added a commit that referenced this pull request Feb 28, 2023
…s as JSON path separators (#34593)

* winlogbeat/sys/winevent: do not interpret dots as JSON path separators (#34549)

In some locales, Windows abbreviates event data keys with dots. This
happens in Spanish for example where the English 'ID' is rendered as 'Id.'
When using mapstr.Put, this dot is interpreted as a path separator,
breaking the structure of the document and ultimately leading to an
ingest failure. So use opaque key map insertion.

(cherry picked from commit ab589ce)

# Conflicts:
#	winlogbeat/sys/winevent/maputil.go

* resolve conflicts

Requires backport of testing infrastructure.

---------

Co-authored-by: Dan Kortschak <90160302+efd6@users.noreply.github.com>
Co-authored-by: Dan Kortschak <dan.kortschak@elastic.co>
chrisberkhout pushed a commit that referenced this pull request Jun 1, 2023
#34549)

In some locales, Windows abbreviates event data keys with dots. This
happens in Spanish for example where the English 'ID' is rendered as 'Id.'
When using mapstr.Put, this dot is interpreted as a path separator,
breaking the structure of the document and ultimately leading to an
ingest failure. So use opaque key map insertion.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.8-candidate backport-v7.17.0 Automated backport with mergify backport-v8.6.0 Automated backport with mergify backport-v8.7.0 Automated backport with mergify bug Winlogbeat
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Winlogbeat] failed to parse field [winlog.event_data.Id] of type [keyword] when id contains .
3 participants