Skip to content

Cherry-pick #18991 to 7.x: Fix translate_sid's empty target field handling#19083

Merged
andrewkroh merged 1 commit intoelastic:7.xfrom
andrewkroh:backport_18991_7.x
Jun 10, 2020
Merged

Cherry-pick #18991 to 7.x: Fix translate_sid's empty target field handling#19083
andrewkroh merged 1 commit intoelastic:7.xfrom
andrewkroh:backport_18991_7.x

Conversation

@andrewkroh
Copy link
Copy Markdown
Member

Cherry-pick of PR #18991 to 7.x 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: [marc-gr commented: jenkins run tests]

  • Start Time: 2020-06-10T11:38:42.975+0000

  • Duration: 85 min 10 sec

Test stats 🧪

Test Results
Failed 0
Passed 6691
Skipped 1069
Total 7760

Steps errors

Expand to view the steps failures

  • Name: Report to Codecov
    • Description: curl -sSLo codecov https://codecov.io/bash for i in auditbeat filebeat heartbeat libbeat metricbeat packetbeat winlogbeat journalbeat do FILE="${i}/build/coverage/full.cov" if [ -f "${FILE}" ]; then bash codecov -f "${FILE}" fi done

    • Duration: 2 min 22 sec

    • Start Time: 2020-06-10T12:20:10.440+0000

    • log

@andrewkroh
Copy link
Copy Markdown
Member Author

run tests

@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)

@marc-gr
Copy link
Copy Markdown
Contributor

marc-gr commented Jun 10, 2020

jenkins run tests

@andrewkroh andrewkroh merged commit 45d6ee7 into elastic:7.x Jun 10, 2020
@andrewkroh andrewkroh deleted the backport_18991_7.x 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