-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Processors] Mime-Type Detection #22940
Conversation
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
The E2E tests appear to be triggered by the packaging job which got triggered by the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little concerned about performance implications of xml.Unmarshal.
others are little things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* Add mimetype processor * Add mimetype detection for packetbeat * Update changelog * Rev go.sum * Refactor for reusability and rename to detect_mime_type * reformat imports * update docs * Update maxHeaderSize name and add comment on the fallback behavior (cherry picked from commit 5f52979)
* [Processors] Mime-Type Detection (#22940) * Add mimetype processor * Add mimetype detection for packetbeat * Update changelog * Rev go.sum * Refactor for reusability and rename to detect_mime_type * reformat imports * update docs * Update maxHeaderSize name and add comment on the fallback behavior (cherry picked from commit 5f52979) * Fix up changelog
What does this PR do?
Adds a basic mime type sniffer beats processor and uses it in
packetbeat
. This allows us to implement the new ECS 1.7http.*.mime_type
fields.Basically we do the following:
net/http
sniffer says this is plain text (no binary encoding/html detected), attempt to determine if we have some sort of "specially encoded" text (i.e. json, xml, etc.)Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Related issues