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

Cherry-pick #23236 to 7.11: [Filebeat] Improve Suricata error handling #23807

Merged
merged 2 commits into from
Feb 4, 2021

Conversation

andrewkroh
Copy link
Member

@andrewkroh andrewkroh commented Feb 2, 2021

Cherry-pick of PR #23236 to 7.11 branch. Original message:

What does this PR do?

This fixes several errors processing EVE logs.

  • Fix null dereference of suricata.eve.http.status. Even for http events it can be null.
  • Remove unused field mapping for suricata.eve.flow.end
  • Improve error.message details in pipeline on_failure handlers.
  • Add tags to script processors to improve error messages.
  • Rename suricata.eve.http.http_port to url.port.
  • Add remove processor to on_failure handler to remove any alias field to prevent indexing errors.
  • Ignore errors parsing TLS version. The pipeline got a value of "UNDETERMINED" that caused an error.
  • Ignore errors parsing TLS subject/issuer DNs with kv. If a value contain the value_split string like "Nutanix, Inc." it can fail.

Why is it important?

Errors were preventing remove processors from running. This left concrete values in the events for fields that are mapped as alias. Those events were rejected.

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.

@elasticmachine
Copy link
Collaborator

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

@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 2, 2021
This fixes several errors processing EVE logs.

Fix null dereference of suricata.eve.http.status. Even for http events it can be null.
Remove unused field mapping for suricata.eve.flow.end
Improve error.message details in pipeline on_failure handlers.
Add tags to script processors to improve error messages.
Rename suricata.eve.http.http_port to url.port.
Add remove processor to on_failure handler to remove any alias field to prevent indexing errors.
Ignore errors parsing TLS version. The pipeline got a value of "UNDETERMINED" that caused an error.
Ignore errors parsing TLS subject/issuer DNs with kv. If a value contain the value_split string like "Nutanix, Inc." it can fail.

(cherry picked from commit 11c5367)
@elasticmachine
Copy link
Collaborator

elasticmachine commented Feb 2, 2021

💚 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

Expand to view the summary

Build stats

  • Build Cause: Pull request #23807 updated

    • Start Time: 2021-02-02T22:07:58.632+0000
  • Duration: 50 min 48 sec

  • Commit: 4041a4f

Test stats 🧪

Test Results
Failed 0
Passed 12745
Skipped 2047
Total 14792

Steps errors 1

Expand to view the steps failures

x-pack/filebeat-windows-7-windows-7 - Install Go/Mage/Python 1.14.14
  • Took 0 min 8 sec . View more details on here
  • Description: .ci/scripts/install-tools.bat

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 12745
Skipped 2047
Total 14792

@andrewkroh andrewkroh merged commit e1ccdd3 into elastic:7.11 Feb 4, 2021
@zube zube bot removed the [zube]: Done label May 6, 2021
@andrewkroh andrewkroh deleted the backport_23236_7.11 branch January 14, 2022 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants