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

Fix bug #495 #813

Merged
merged 4 commits into from
Apr 14, 2020
Merged

Fix bug #495 #813

merged 4 commits into from
Apr 14, 2020

Conversation

webmat
Copy link
Contributor

@webmat webmat commented Apr 9, 2020

Most reusable field sets in ECS are not expected at the root of the documents. As of ECS 1.5.0:

reusable field set expected at root
as no
code_signature no
geo no
group yes
hash no
interface no
os no
pe no
user yes
vlan no

Unfortunately, ever since the introduction of reusable fields, these field sets remained defined at the root nonetheless, for some of the generated artifacts.

The official documentation correctly mentions which field sets were expected at the root and which weren't. This issue however affected the following artifacts:

  • 'ecs_flat.yml'
  • the csv
  • the Elasticsearch sample templates
  • Beats field definition file

This PR does not affect the Beats field definitions for now. Even if they weren't meant to be defined there, we first need confirmation whether they've actually been used.

This PR only fixes the issue for the first 3 artifacts.

Note about 'ecs_nested.yml': this file mixes two types of information. Information about field sets, and information about field definitions. Consumers of this file must make sure to check the attribute reusable.top_level. You should skip defining fields at the root for any field sets where reusable.top_level: false.

This fixes elastic#495 for 'ecs_flat.yml', the csv and the Elasticsearch sample templates.
@webmat webmat self-assigned this Apr 9, 2020
@webmat
Copy link
Contributor Author

webmat commented Apr 9, 2020

For awareness @elastic/ecs-logging. Please make sure to review the note at the end of the PR body.

@webmat
Copy link
Contributor Author

webmat commented Apr 10, 2020

Whoa, just found a subtle bug where our Makefile's empty include would mean we skip the generation of the Beats file and the docs. Thankfully this issue was only introduced recently and didn't affect us.

Fixed in 6382d26 :)

Copy link
Contributor

@marshallmain marshallmain left a comment

Choose a reason for hiding this comment

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

LGTM

@webmat webmat merged commit 515305e into elastic:master Apr 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants