Skip to content

Cherry-pick #18991 to 7.8: Fix translate_sid's empty target field handling#19084

Merged
andrewkroh merged 2 commits intoelastic:7.8from
andrewkroh:backport_18991_7.8
Jun 10, 2020
Merged

Cherry-pick #18991 to 7.8: Fix translate_sid's empty target field handling#19084
andrewkroh merged 2 commits intoelastic:7.8from
andrewkroh:backport_18991_7.8

Conversation

@andrewkroh
Copy link
Copy Markdown
Member

@andrewkroh andrewkroh commented Jun 9, 2020

Cherry-pick of PR #18991 to 7.8 branch. Original message:

What does this PR do?

The translate_sid processor only requires one of the three target fields to be configured. It should work properly when some of the targets are not set, but it doesn't check if they are empty strings. So it ends up adding target fields that are empty strings to the event (e.g. "": "Group").

Why is it important?

Without this fix, if some target fields were not set then the beat would produce invalid events that cannot be indexed.

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.

Related issues

The translate_sid processor only requires one of the three target fields to be configured. It should work properly when some of the targets are not set, but it doesn't check if the are empty strings. So it ends up adding target fields that are empty strings to the event (e.g. "": "Group").

Closes elastic#18990

(cherry picked from commit baccaad)
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jun 9, 2020
@elasticmachine
Copy link
Copy Markdown
Contributor

elasticmachine commented Jun 9, 2020

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #19084 updated]

  • Start Time: 2020-06-09T21:05:38.469+0000

  • Duration: 76 min 56 sec

Test stats 🧪

Test Results
Failed 0
Passed 6629
Skipped 1053
Total 7682

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jun 10, 2020
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/siem (Team:SIEM)

@andrewkroh andrewkroh merged commit 1373cc9 into elastic:7.8 Jun 10, 2020
@andrewkroh andrewkroh deleted the backport_18991_7.8 branch January 14, 2022 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants