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

Add initial stab at mime_type for file objects #760

Merged
merged 5 commits into from Mar 4, 2020

Conversation

dcode
Copy link
Contributor

@dcode dcode commented Feb 24, 2020

Address #749 file objects.

While "Content-Type" in HTTP headers and related protocols utilize
MIME type descriptions, they are offered as a hint to the other
end of the connection so they know how to handle the data. However,
in the context of a file, the MIME type should be more authoritative
in that tools like Zeek, Suricata, and other tools that use
libmagic or yara to detect filetypes provide information based upon
a match to a pattern of bytes.

For #554, I think retaining the headers as Content-Type makes sense
as this is the configured value set by the server (or client). I think
it is useful to compare what was advertised vs what was actually sent,
e.g. the header value in http.response.content-type vs file.mime_type
of the file transferred.

Copy link
Contributor

@webmat webmat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @dcode!

I agree with adding it only to file, to start. Only one small adjustment to the description, and this can go in 👍

In the future, please make the reformatting into its own commit, then the actual changes as different commits. Makes the reviewing easier :-)

schemas/file.yml Outdated Show resolved Hide resolved
@webmat
Copy link
Contributor

webmat commented Feb 25, 2020

Ping @neu5ron

@dcode dcode added the 1.5.0 label Mar 2, 2020
Copy link
Contributor

@webmat webmat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the adjustment.

I'll take care of the changelog conflict when merging.

@webmat webmat merged commit 461cdc3 into elastic:master Mar 4, 2020
@dcode dcode deleted the dcode/file-mime branch March 25, 2020 14:51
@webmat webmat mentioned this pull request Mar 25, 2020
dcode added a commit to dcode/ecs that referenced this pull request Apr 15, 2020
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.

None yet

2 participants